Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fulixin
dsk-operate-sys-cscec
Commits
0d5acdc9
Commit
0d5acdc9
authored
Feb 23, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix menu
parent
30f8ca3b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
188 additions
and
99 deletions
+188
-99
index.js
dsk-operate-ui/src/api/projectCostLedger/index.js
+55
-29
index.vue
...projectCostLedger/detail/components/FeedSummary/index.vue
+118
-60
index.vue
...ectCostLedger/detail/components/ProjectSideMenu/index.vue
+9
-8
index.vue
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
+6
-2
No files found.
dsk-operate-ui/src/api/projectCostLedger/index.js
View file @
0d5acdc9
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
;
/**
* 获取项目详情
* @param {*} params
* @returns
*/
export
const
getProjectDetailApi
=
(
params
=
{})
=>
request
({
url
:
""
,
method
:
"get"
,
params
});
//校验项目编码是否存在
export
function
checkProjectCodeExist
(
data
)
{
export
function
checkProjectCodeExist
(
data
)
{
return
request
({
url
:
'/cbProjectRecord/checkProjectCodeExist/'
+
data
,
url
:
'/cbProjectRecord/checkProjectCodeExist/'
+
data
,
method
:
'get'
,
})
})
;
}
//新增项目
export
function
addProject
(
data
)
{
export
function
addProject
(
data
)
{
return
request
({
url
:
'/cbProjectRecord/addProject'
,
method
:
'post'
,
data
:
data
,
})
data
:
data
,
})
;
}
//修改项目
export
function
editProjectInfo
(
data
)
{
export
function
editProjectInfo
(
data
)
{
return
request
({
url
:
'/cbProjectRecord/editProjectInfo'
,
method
:
'PUT'
,
data
:
data
,
})
data
:
data
,
})
;
}
//新增新阶段项目
export
function
addNewStageProject
(
data
)
{
export
function
addNewStageProject
(
data
)
{
return
request
({
url
:
'/cbProjectRecord/addNewStageProject'
,
method
:
'POST'
,
data
:
data
,
})
data
:
data
,
})
;
}
//获取当前项目文件上传
export
function
getProjectFileUploadDetail
(
projectId
)
{
export
function
getProjectFileUploadDetail
(
projectId
)
{
return
request
({
url
:
'/cbProjectFile/getProjectFileUploadDetail/'
+
projectId
,
url
:
'/cbProjectFile/getProjectFileUploadDetail/'
+
projectId
,
method
:
'get'
,
})
})
;
}
//获取草稿箱列表
export
function
getDraftDialogList
(
projectId
)
{
export
function
getDraftDialogList
(
projectId
)
{
return
request
({
url
:
'/cbProjectRecord/getDraftDialogList'
,
method
:
'get'
,
})
})
;
}
//上传文件
export
function
uploadCbProjectFile
(
data
)
{
export
function
uploadCbProjectFile
(
data
)
{
return
request
({
url
:
'/cbProjectFile/uploadCbProjectFile'
,
method
:
'post'
,
data
})
})
;
}
//删除文件
export
function
deleteCbProjectFile
(
fileId
)
{
export
function
deleteCbProjectFile
(
fileId
)
{
return
request
({
url
:
'/cbProjectFile/deleteCbProjectFile/'
+
fileId
,
url
:
'/cbProjectFile/deleteCbProjectFile/'
+
fileId
,
method
:
'Delete'
,
})
})
;
}
//删除草稿
export
function
deleteDraft
(
projectId
)
{
export
function
deleteDraft
(
projectId
)
{
return
request
({
url
:
'/cbProjectRecord/deleteDraft/'
+
projectId
,
url
:
'/cbProjectRecord/deleteDraft/'
+
projectId
,
method
:
'Delete'
,
})
})
;
}
//查询当前项目可删除成本阶段
export
function
getProjectCbStageNotDraft
(
relatedId
)
{
export
function
getProjectCbStageNotDraft
(
relatedId
)
{
return
request
({
url
:
'/cbProjectRecord/getProjectCbStageNotDraft/'
+
relatedId
,
url
:
'/cbProjectRecord/getProjectCbStageNotDraft/'
+
relatedId
,
method
:
'get'
,
})
})
;
}
// 工料汇总
/**
* 获取供料汇总左侧菜单
* @param {*} params
* @returns
*/
export
const
getFeedSummaryMenuTreeApi
=
(
params
=
{})
=>
request
({
url
:
"/cb/quantity/summary/subjectTree"
,
method
:
"get"
,
params
})
dsk-operate-ui/src/views/projectCostLedger/detail/components/FeedSummary/index.vue
View file @
0d5acdc9
...
...
@@ -2,7 +2,7 @@
<div
class=
"feed-summary-container"
>
<div
class=
"feed-summary-inner"
>
<div
class=
"left-side-menu"
>
<project-side-menu
:menuTree=
"menuTreeList"
:unique-opened=
"false"
:default-active=
"defaultActive"
>
<project-side-menu
:menuTree=
"menuTreeList"
:
menuOptions=
"menuOptions"
:
unique-opened=
"false"
:default-active=
"defaultActive"
>
<template
slot=
"房建类成本科目-1"
>
<img
src=
"@/assets/images/projectCostLedger/icon_cost_detail_2.svg"
alt=
""
>
<div
class=
"project-sub-menu-title-text"
>
房建类成本科目
</div>
...
...
@@ -18,74 +18,110 @@
</template>
<
script
>
import
ProjectSideMenu
from
"@/views/projectCostLedger/detail/components/ProjectSideMenu"
;
import
{
getFeedSummaryMenuTreeApi
}
from
"@/api/projectCostLedger"
;
export
default
{
name
:
"feedSummary"
,
props
:
{
// 项目ID
projectId
:
{
type
:
String
,
required
:
true
,
default
:
""
},
// 详情信息
projectDetailInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
watch
:
{
projectDetailInfo
:
{
handler
(
newValue
)
{
this
.
comProjectDetailInfo
=
newValue
?
newValue
:
{};
this
.
init
(
this
.
comProjectDetailInfo
);
},
deep
:
true
,
immediate
:
true
},
projectId
:
{
handler
(
newValue
)
{
this
.
comProjectId
=
newValue
;
},
immediate
:
true
}
},
components
:
{
ProjectSideMenu
},
data
()
{
return
{
menuOptions
:
{
nodeName
:
"name"
,
nodeValue
:
"name"
,
},
comProjectDetailInfo
:
{},
comProjectId
:
""
,
defaultActive
:
""
,
menuTreeList
:
[
{
nodeName
:
"房建类成本科目"
,
id
:
"1"
,
children
:
[
{
nodeName
:
"劳务分包工程"
,
id
:
"1-1"
,
children
:
[
{
nodeName
:
"主体工程-结构劳务"
,
id
:
"1-1-1"
,
children
:
[
{
nodeName
:
"结构劳务分包"
,
id
:
"1-1-1-1"
,
}
]
},
{
nodeName
:
"二次结构及粗装修劳务"
,
id
:
"1-2-1"
,
children
:
[
{
nodeName
:
"二次机构及粗装修劳务"
,
id
:
"1-2-1"
,
}
]
},
{
nodeName
:
"拆除、修缮、清理、改造劳..."
,
id
:
"1-3-1"
,
children
:
[
{
nodeName
:
"拆除、修缮、清理、改造劳..."
,
id
:
"1-3-1"
,
}
]
}
]
},
{
nodeName
:
"专业分包工程"
,
id
:
"2-1"
,
},
{
nodeName
:
"实体工程材料(土建)"
,
id
:
"3-1"
,
},
{
nodeName
:
"其他直接费成本"
,
id
:
"4-1"
,
},
]
},
{
nodeName
:
"未归类项目"
,
id
:
"2"
,
children
:
[]
}
//
{
//
nodeName: "房建类成本科目",
//
id: "1",
//
children: [
//
{
//
nodeName: "劳务分包工程",
//
id: "1-1",
//
children: [
//
{
//
nodeName: "主体工程-结构劳务",
//
id: "1-1-1",
//
children: [
//
{
//
nodeName: "结构劳务分包",
//
id: "1-1-1-1",
//
}
//
]
//
},
//
{
//
nodeName: "二次结构及粗装修劳务",
//
id: "1-2-1",
//
children: [
//
{
//
nodeName: "二次机构及粗装修劳务",
//
id: "1-2-1",
//
}
//
]
//
},
//
{
//
nodeName: "拆除、修缮、清理、改造劳...",
//
id: "1-3-1",
//
children: [
//
{
//
nodeName: "拆除、修缮、清理、改造劳...",
//
id: "1-3-1",
//
}
//
]
//
}
//
]
//
},
//
{
//
nodeName: "专业分包工程",
//
id: "2-1",
//
},
//
{
//
nodeName: "实体工程材料(土建)",
//
id: "3-1",
//
},
//
{
//
nodeName: "其他直接费成本",
//
id: "4-1",
//
},
//
]
//
},
//
{
//
nodeName: "未归类项目",
//
id: "2",
//
children: []
//
}
]
};
},
...
...
@@ -99,7 +135,29 @@ export default {
},
//方法集
methods
:
{
async
init
(
detail
=
{})
{
try
{
const
{
projectId
,
cbStage
}
=
detail
;
if
(
!
projectId
)
return
;
await
this
.
getFeedSummaryMenuTree
({
projectId
,
cbStage
});
}
catch
(
error
)
{
}
},
async
getFeedSummaryMenuTree
(
params
)
{
try
{
const
result
=
await
getFeedSummaryMenuTreeApi
(
params
);
if
(
result
.
code
==
200
)
{
const
_tempArray
=
result
.
data
;
this
.
menuTreeList
=
_tempArray
;
}
}
catch
(
error
)
{
}
}
},
}
</
script
>
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/components/ProjectSideMenu/index.vue
View file @
0d5acdc9
...
...
@@ -85,11 +85,11 @@ export default {
//方法集
methods
:
{
// 事件订阅
subMenuOpen
(
menuPath
)
{
this
.
$emit
(
"open"
,
menuPath
);
subMenuOpen
(
menuPath
,
menuPathArray
)
{
this
.
$emit
(
"open"
,
menuPath
,
menuPathArray
);
},
subMenuClose
(
menuPath
)
{
this
.
$emit
(
"close"
,
menuPath
);
subMenuClose
(
menuPath
,
menuPathArray
)
{
this
.
$emit
(
"close"
,
menuPath
,
menuPathArray
);
},
menuSelect
(
menuPath
)
{
const
result
=
this
.
getCurrentData
(
menuPath
);
...
...
@@ -120,11 +120,12 @@ export default {
// 合并默认配置
const
_options
=
this
.
mergeMenuOptions
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
menuOptions
)));
this
.
tempMenuOptions
=
_options
;
console
.
log
(
this
.
tempMenuOptions
);
// 映射配置
const
resultData
=
this
.
mapDataByMenuOptions
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
comMenuTree
)),
_options
);
if
(
resultData
)
{
this
.
tempMenuTree
=
resultData
;
}
//
const resultData = this.mapDataByMenuOptions(JSON.parse(JSON.stringify(this.comMenuTree)), _options);
//
if (resultData) {
//
this.tempMenuTree = resultData;
//
}
}
},
mergeMenuOptions
(
options
)
{
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
View file @
0d5acdc9
...
...
@@ -15,7 +15,7 @@
<direct-cost
v-if=
"current == 'directCost'"
></direct-cost>
<!-- 工料汇总 -->
<feed-summary
v-if=
"current == 'feedSummary'"
></feed-summary>
<feed-summary
v-if=
"current == 'feedSummary'"
:project-id=
"projectID"
:project-detail-info=
"detailInfo"
></feed-summary>
<!-- 其他项目 -->
<other-projects
v-if=
"current == 'otherItems'"
></other-projects>
...
...
@@ -37,6 +37,7 @@ import FeedSummary from "@/views/projectCostLedger/detail/components/FeedSummary
import
OtherProjects
from
"@/views/projectCostLedger/detail/components/OtherProjects"
;
import
{
v4
}
from
"uuid"
;
import
{
cloneDeep
}
from
"lodash-es"
;
import
{
getProjectDetailApi
}
from
"@/api/projectCostLedger"
;
export
default
{
name
:
"projectCostLedgerDetail"
,
components
:
{
...
...
@@ -52,7 +53,10 @@ export default {
projectID
:
""
,
current
:
""
,
// 详情信息变量
detailInfo
:
{},
detailInfo
:
{
projectId
:
"1754425038355890177"
,
cbStage
:
0
},
toggleTabs
:
[
{
value
:
"basicEngineeringInformation"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment