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
1640fc82
Commit
1640fc82
authored
Feb 27, 2024
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*
parent
b4b0bfac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
214 additions
and
187 deletions
+214
-187
index.js
dsk-operate-ui/src/api/projectCostLedger/index.js
+8
-0
index.vue
.../projectCostLedger/detail/components/ProfitLoss/index.vue
+203
-185
index.vue
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
+3
-2
No files found.
dsk-operate-ui/src/api/projectCostLedger/index.js
View file @
1640fc82
...
@@ -112,6 +112,14 @@ export const getProfitLossMenuTreeApi = (params = {}) => request({
...
@@ -112,6 +112,14 @@ export const getProfitLossMenuTreeApi = (params = {}) => request({
method
:
"get"
,
method
:
"get"
,
params
params
})
})
//盈亏分析对比 数据列表
export
function
getAnalysislist
(
data
)
{
return
request
({
url
:
'/cb/gain/loss/analysis/list'
,
method
:
'get'
,
params
:
data
});
}
// 工料汇总
// 工料汇总
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/components/ProfitLoss/index.vue
View file @
1640fc82
<
template
>
<
template
>
<div
class=
"otherProjects-container"
>
<div
class=
"feed-summary-container"
>
<div
class=
"otherProjects-cont"
>
<div
class=
"feed-summary-inner"
>
<div
class=
"left"
>
<div
class=
"left-side-menu"
>
<div
class=
"left-menu"
>
<project-side-menu
ref=
"profitloss"
:menuTree=
"menuTreeList"
:menuOptions=
"menuOptions"
:unique-opened=
"false"
:default-active=
"defaultActive"
>
<template
slot=
"盈亏分析对比-1"
>
<img
src=
"@/assets/images/projectCostLedger/icon_cost_detail_7.svg"
alt=
""
>
<div
class=
"project-sub-menu-title-text"
>
盈亏分析对比
</div>
</
template
>
</project-side-menu>
</div>
<div
class=
"profitloss"
>
<div
class=
"search"
>
<el-date-picker
v-model=
"expenseDate"
type=
"month"
placeholder=
"选择月"
:picker-options=
"pickerOptions"
>
</el-date-picker>
</div>
</div>
</div>
</div>
<!--
<div
class=
"right-table"
>
-->
<!--
<div
class=
"table-item"
>
-->
<!--
<tables-->
<!--v-if="!isSkeleton"-->
<!--:tableLoading="tableLoading"-->
<!--:tableData="tableData"-->
<!--:forData="forData1"-->
<!--:MaxPage=500-->
<!--:tableDataTotal="tableDataTotal"-->
<!--:queryParams="queryParams"-->
<!--@handle-current-change="handleCurrentChange"-->
<!--@sort-change="sortChange"-->
<!-->-->
<!--
<template
slot=
"number"
slot-scope=
"scope"
>
-->
<!--
<div>
{{
scope
.
row
.
number
||
'--'
}}
</div>
-->
<!--
</
template
>
-->
<!--<template slot="proportion" slot-scope="scope">-->
<!--<div>{{scope.row.proportion || '--'}}{{scope.row.proportion ? '%':''}}</div>-->
<!--</template>-->
<!--</tables>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Tables
from
"../../../../component/Tables"
import
ProjectSideMenu
from
"@/views/projectCostLedger/detail/components/ProjectSideMenu"
;
import
{
getProfitLossMenuTreeApi
}
from
'@/api/projectCostLedger/index'
import
{
getProfitLossMenuTreeApi
,
getAnalysislist
}
from
"@/api/projectCostLedger"
;
export
default
{
export
default
{
name
:
"ProfitLoss"
,
name
:
"orifitloss"
,
props
:{
props
:
{
// 项目ID
// 项目ID
projectId
:
{
projectId
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
default
:
""
default
:
""
},
// 详情信息
projectDetailInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
},
// // 详情信息
watch
:
{
// projectDetailInfo: {
projectDetailInfo
:
{
// type: Object,
handler
(
newValue
)
{
// default: () => ({})
this
.
comProjectDetailInfo
=
newValue
?
newValue
:
{};
// }
this
.
init
(
this
.
comProjectDetailInfo
);
},
},
watch
:
{
deep
:
true
,
// projectDetailInfo: {
immediate
:
true
// handler(newValue) {
// this.comProjectDetailInfo = newValue ? newValue : {};
// this.init(this.comProjectDetailInfo);
// },
// deep: true,
// immediate: true
// },
// projectId: {
// handler(newValue) {
// this.comProjectId = newValue;
// },
// immediate: true
// }
},
components
:
{
Tables
,
},
data
()
{
return
{
menuOptions
:
{
nodeName
:
"name"
,
nodeValue
:
"name"
,
},
},
comProjectDetailInfo
:
{},
projectId
:
{
comProjectId
:
""
,
handler
(
newValue
)
{
defaultActive
:
""
,
this
.
comProjectId
=
newValue
;
menuTreeList
:
[
},
// {
immediate
:
true
// nodeName: "房建类成本科目",
}
// id: "1",
},
// children: [
components
:
{
// {
ProjectSideMenu
// nodeName: "劳务分包工程",
},
// id: "1-1",
data
()
{
// children: [
return
{
// {
pickerOptions
:
{
// nodeName: "主体工程-结构劳务",
disabledDate
(
time
)
{
// id: "1-1-1",
let
istrue
=
true
// children: [
let
month
=
new
Date
().
getMonth
()
+
1
// {
let
year
=
new
Date
().
getFullYear
()
// nodeName: "结构劳务分包",
let
times
=
(
year
+
5
)
+
'-'
+
month
+
'-01 '
+
'00:00:00'
// id: "1-1-1-1",
istrue
=
new
Date
().
getTime
()
<
time
.
getTime
()
&&
time
.
getTime
()
<
new
Date
(
times
).
getTime
()
// }
return
!
istrue
// ]
},
// },
},
// {
menuOptions
:
{
// nodeName: "二次结构及粗装修劳务",
nodeName
:
"cbName"
,
// id: "1-2-1",
nodeValue
:
"id"
,
// children: [
},
// {
comProjectDetailInfo
:
{},
// nodeName: "二次机构及粗装修劳务",
comProjectId
:
""
,
// id: "1-2-1",
defaultActive
:
""
,
// }
menuTreeList
:
[
// ]
// {
// },
// nodeName: "房建类成本科目",
// {
// id: "1",
// nodeName: "拆除、修缮、清理、改造劳...",
// children: [
// id: "1-3-1",
// {
// children: [
// nodeName: "劳务分包工程",
// {
// id: "1-1",
// nodeName: "拆除、修缮、清理、改造劳...",
// children: [
// id: "1-3-1",
// {
// }
// nodeName: "主体工程-结构劳务",
// ]
// id: "1-1-1",
// }
// children: [
// ]
// {
// },
// nodeName: "结构劳务分包",
// {
// id: "1-1-1-1",
// nodeName: "专业分包工程",
// }
// id: "2-1",
// ]
// },
// },
// {
// {
// nodeName: "实体工程材料(土建)",
// nodeName: "二次结构及粗装修劳务",
// id: "3-1",
// id: "1-2-1",
// },
// children: [
// {
// {
// nodeName: "其他直接费成本",
// nodeName: "二次机构及粗装修劳务",
// id: "4-1",
// id: "1-2-1",
// },
// }
// ]
// ]
// },
// },
// {
// {
// nodeName: "未归类项目",
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "2",
// id: "1-3-1",
// children: []
// children: [
// }
// {
]
// nodeName: "拆除、修缮、清理、改造劳...",
}
// id: "1-3-1",
},
// }
//可访问data属性
// ]
created
()
{
// }
console
.
log
(
this
.
projectId
)
// ]
this
.
init
()
// },
},
// {
//计算集
// nodeName: "专业分包工程",
computed
:
{
// id: "2-1",
// },
// {
// nodeName: "实体工程材料(土建)",
// id: "3-1",
// },
// {
// nodeName: "其他直接费成本",
// id: "4-1",
// },
// ]
// },
// {
// nodeName: "未归类项目",
// id: "2",
// children: []
// }
],
id
:
0
,
expenseDate
:
''
,
};
},
//可访问data属性
created
()
{
let
month
=
new
Date
().
getMonth
()
+
1
let
year
=
new
Date
().
getFullYear
()
this
.
expenseDate
=
year
+
'-'
+
(
month
>=
9
?
month
:
'0'
+
month
)
},
},
async
init
(
detail
=
{})
{
//计算集
let
cbStage
=
1
computed
:
{
try
{
const
{
projectId
,
cbStage
}
=
detail
;
if
(
!
projectId
)
return
;
await
this
.
getProfitLossMenuTree
({
projectId
,
cbStage
});
}
catch
(
error
)
{
}
}
,
},
//方法集
async
getProfitLossMenuTree
(
params
)
{
methods
:
{
try
{
select
(
menuPath
)
{
const
result
=
await
getProfitLossMenuTreeApi
(
params
);
this
.
id
=
menuPath
if
(
result
.
code
==
200
)
{
let
param
=
{
const
_tempArray
=
result
.
data
;
id
:
this
.
id
,
this
.
menuTreeList
=
_tempArray
;
expenseDate
:
this
.
expenseDate
}
}
}
catch
(
error
)
{
getAnalysislist
(
param
).
then
(
res
=>
{
}
})
},
},
}
async
init
(
detail
=
{})
{
try
{
const
{
projectId
,
cbStage
,
cbType
}
=
detail
;
if
(
!
projectId
)
return
;
await
this
.
getFeedSummaryMenuTree
({
projectId
,
cbStage
,
cbType
});
}
catch
(
error
)
{
}
},
async
getFeedSummaryMenuTree
(
params
)
{
try
{
const
result
=
await
getProfitLossMenuTreeApi
(
params
);
if
(
result
.
code
==
200
)
{
let
arr
=
{}
arr
.
cbName
=
'盈亏分析对比'
arr
.
id
=
0
arr
.
children
=
result
.
data
const
_tempArray
=
[
arr
];
this
.
menuTreeList
=
_tempArray
;
await
this
.
$nextTick
()
console
.
log
(
this
.
$refs
[
'profitloss'
])
}
}
catch
(
error
)
{
}
}
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.
otherProjects
-container
{
.
feed-summary
-container
{
width
:
100%
;
width
:
100%
;
box-sizing
:
border-box
;
background
:
#ffffff
;
height
:
100%
;
height
:
100%
;
align-items
:
center
;
.otherProjects-cont
{
.feed-summary-inner
{
display
:
flex
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
display
:
flex
;
.left
{
align-items
:
center
;
width
:
220px
;
height
:
100%
;
.left-side-menu
{
.left-menu
{
width
:
220px
;
width
:
100%
;
min-width
:
220px
;
height
:
100%
;
height
:
100%
;
border-right
:
1px
solid
#eeeeee
;
overflow
:
auto
;
}
}
white-space
:
nowrap
;
/* 不换行 */
.profitloss
{
overflow
:
hidden
;
/* 超出部分隐藏 */
width
:
calc
(
100%
-
220px
);
text-overflow
:
ellipsis
;
/* 显示省略号 */
height
:
100%
;
}
background
:
#fff
;
.right-table
{
}
width
:
calc
(
100%
-
220px
);
padding
:
16px
;
}
}
}
}
</
style
>
</
style
>
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
View file @
1640fc82
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<other-projects
v-if=
"current == 'otherItems'"
></other-projects>
<other-projects
v-if=
"current == 'otherItems'"
></other-projects>
<!-- 盈亏分析对比 -->
<!-- 盈亏分析对比 -->
<profit-Loss
v-if=
"current == 'profitAndLoss'"
:project-id=
"projectID"
></profit-Loss>
<profit-Loss
v-if=
"current == 'profitAndLoss'"
:project-id=
"projectID"
:project-detail-info=
"detailInfo"
></profit-Loss>
</div>
</div>
</div>
</div>
...
@@ -61,7 +61,8 @@ export default {
...
@@ -61,7 +61,8 @@ export default {
// 详情信息变量
// 详情信息变量
detailInfo
:
{
detailInfo
:
{
projectId
:
"1754425038355890177"
,
projectId
:
"1754425038355890177"
,
cbStage
:
0
cbStage
:
0
,
cbType
:
1
},
},
toggleTabs
:
[
toggleTabs
:
[
{
{
...
...
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