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
67e9202b
Commit
67e9202b
authored
Mar 27, 2024
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*
parent
f36d8a60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
168 additions
and
27 deletions
+168
-27
index.scss
dsk-operate-ui/src/assets/styles/index.scss
+106
-0
index.vue
...rojectCostLedger/detail/components/MeasureItems/index.vue
+62
-27
No files found.
dsk-operate-ui/src/assets/styles/index.scss
View file @
67e9202b
...
@@ -977,3 +977,109 @@ li {
...
@@ -977,3 +977,109 @@ li {
.el-tooltip__popper
{
.el-tooltip__popper
{
max-width
:
70%
;
max-width
:
70%
;
}
}
//表格样式
.meafixed-table
{
width
:
100%
;
padding
:
16px
0
;
.el-table
{
width
:
100%
;
height
:
100%
;
font-size
:
14px
;
color
:
#232323
;
.el-table-horizontal-scrollbar
{
display
:
none
!
important
;
}
.el-table__fixed-right-patch
{
background
:
rgb
(
240
,
243
,
250
);
}
th
{
height
:
40px
;
padding
:
9px
0px
;
}
td
{
padding
:
9px
0px
;
.cell
{
color
:
#232323
;
}
}
.cell
{
padding-right
:
12px
;
padding-left
:
12px
;
line-height
:
21px
;
font-size
:
14px
;
font-weight
:
400
;
}
thead
{
color
:
rgba
(
35
,
35
,
35
,
0
.7
);
}
.is-scrolling-left
+
.el-table__fixed
,
.is-scrolling-middle
+
.el-table__fixed
,
.is-scrolling-right
+
.el-table__fixed
{
box-shadow
:
2px
0
8px
-7px
#202020
;
height
:
auto
!
important
;
bottom
:
16px
!
important
;
}
.el-table__body
tr
.current-row
>
td
.el-table__cell
{
background
:
none
;
}
.el-table__body-wrapper
{
&
:
:-
webkit-scrollbar
{
width
:
16px
;
//竖轴宽度
height
:
16px
;
//横轴宽度
}
&
:
:-
webkit-scrollbar-track
{
background-color
:
#f3f4f5
;
border-radius
:
0
;
}
&
:
:-
webkit-scrollbar-thumb
{
background-color
:
rgba
(
0
,
0
,
0
,.
2
);
border
:
4px
solid
#f3f4f5
;
border-radius
:
10px
;
&
:hover
{
background
:
rgb
(
125
,
125
,
125
);
}
}
&
:
:-
webkit-scrollbar-corner
{
background
:
#f3f4f5
;
/*border-left: 1px solid #E0EAF2;*/
}
tr
{
&
.current-row
>
td
{
background-color
:
initial
;
}
&
:nth-child
(
2n
)
{
background
:
#f8fbff
;
}
}
tr
:hover
>
td
.el-table__cell
{
background
:
#dcebff
;
}
}
.el-table__body
tr
.hover-row
>
td
.el-table__cell
{
background
:
#dcebff
;
}
.el-table__fixed
,
.el-table__fixed-right
{
bottom
:
16px
!
important
;
.el-table__body
{
padding-bottom
:
16px
;
}
tr
:nth-child
(
2n
)
{
background-color
:
#f8fbff
;
}
}
.el-scrollbar
{
height
:
16px
;
.el-scrollbar__bar.is-horizontal
{
height
:
8px
;
}
.el-scrollbar__thumb
{
background
:
rgba
(
0
,
0
,
0
,.
2
);
&
:hover
{
background
:
#7d7d7d
;
}
}
}
}
}
dsk-operate-ui/src/views/projectCostLedger/detail/components/MeasureItems/index.vue
View file @
67e9202b
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
<el-button
v-if=
"!isall && isinput"
type=
"primary"
size=
"small"
@
click=
"addinputs"
>
保存
</el-button>
<el-button
v-if=
"!isall && isinput"
type=
"primary"
size=
"small"
@
click=
"addinputs"
>
保存
</el-button>
</div>
</div>
<!--汇总-->
<!--汇总-->
<div
class=
"
table-item
"
v-if=
"isall"
>
<div
class=
"
meafixed-table
"
v-if=
"isall"
>
<el-table
element-loading-text=
"Loading"
:data=
"tableData"
row-key=
"id"
v-horizontal-scroll=
"'hover'"
default-expand-all
:max-height=
"tableHeight"
<el-table
element-loading-text=
"Loading"
:data=
"tableData"
row-key=
"id"
v-horizontal-scroll=
"'hover'"
default-expand-all
:max-height=
"tableHeight"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
border
highlight-current-row
:cell-class-name=
"tored"
:header-cell-class-name=
"tored"
>
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
border
highlight-current-row
:cell-class-name=
"tored"
:header-cell-class-name=
"tored"
:header-cell-style=
"{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
type=
"index"
></el-table-column>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
type=
"index"
></el-table-column>
<el-table-column
label=
"名称"
width=
"220"
prop=
"expenseName"
>
<el-table-column
label=
"名称"
width=
"220"
prop=
"expenseName"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
expenseName
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
expenseName
||
'--'
}}
</
template
>
...
@@ -39,9 +40,12 @@
...
@@ -39,9 +40,12 @@
</el-table>
</el-table>
</div>
</div>
<!--单条-->
<!--单条-->
<div
class=
"table-item"
v-else
>
<div
class=
"meafixed-table"
v-else
>
<el-table
element-loading-text=
"Loading"
ref=
"edittable"
:data=
"tableData"
row-key=
"id"
v-horizontal-scroll=
"'hover'"
default-expand-all
:max-height=
"tableHeight"
<el-table
element-loading-text=
"Loading"
ref=
"edittable"
:data=
"tableData"
row-key=
"id"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
border
highlight-current-row
:cell-class-name=
"tored1"
:header-cell-class-name=
"tored1"
>
:header-cell-style=
"{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
v-horizontal-scroll=
"'hover'"
:max-height=
"tableHeight"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
border
highlight-current-row
:cell-class-name=
"tored1"
:header-cell-class-name=
"tored1"
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
type=
"index"
fixed=
"left"
></el-table-column>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
type=
"index"
fixed=
"left"
></el-table-column>
<el-table-column
label=
"清单内容"
width=
"130"
prop=
"itemContent"
fixed=
"left"
>
<el-table-column
label=
"清单内容"
width=
"130"
prop=
"itemContent"
fixed=
"left"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
itemContent
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
itemContent
||
'--'
}}
</
template
>
...
@@ -91,8 +95,10 @@
...
@@ -91,8 +95,10 @@
<el-table-column
label=
"本月成本发生比例"
width=
"150"
prop=
"monthCostRate"
>
<el-table-column
label=
"本月成本发生比例"
width=
"150"
prop=
"monthCostRate"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"isinput"
><el-input
v-model=
"scope.row.monthCostRate "
></el-input></
template
>
<template
v-if=
"isinput"
>
<
template
v-else
>
{{
scope
.
row
.
monthCostRate
||
'--'
}}
</
template
>
<el-input
v-model=
"scope.row.monthCostRate "
></el-input>
</
template
>
<
template
v-else
>
{{
scope
.
row
.
monthCostRate
?
scope
.
row
.
monthCostRate
+
'%'
:
'--'
}}
</
template
>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"成本合价"
width=
"130"
prop=
"costEffective"
>
<el-table-column
label=
"成本合价"
width=
"130"
prop=
"costEffective"
>
...
@@ -100,7 +106,9 @@
...
@@ -100,7 +106,9 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"本月工程量"
width=
"130"
prop=
"projectVolume"
>
<el-table-column
label=
"本月工程量"
width=
"130"
prop=
"projectVolume"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"isinput"
><el-input
v-model=
"scope.row.projectVolume "
></el-input></
template
>
<template
v-if=
"isinput"
>
<el-input
v-model=
"scope.row.projectVolume "
></el-input>
</
template
>
<
template
v-else
>
{{
scope
.
row
.
projectVolume
||
'--'
}}
</
template
>
<
template
v-else
>
{{
scope
.
row
.
projectVolume
||
'--'
}}
</
template
>
</template>
</template>
</el-table-column>
</el-table-column>
...
@@ -115,7 +123,7 @@
...
@@ -115,7 +123,7 @@
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
||
'--'
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否推送"
width=
"130"
>
<el-table-column
label=
"是否推送"
width=
"130"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pushTime
?
"是"
:
"否"
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pushTime
?
'是'
:
'否'
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"130"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"130"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -185,18 +193,19 @@
...
@@ -185,18 +193,19 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ProjectSideMenu
from
'@/views/projectCostLedger/detail/components/ProjectSideMenu'
;
import
ProjectSideMenu
from
'@/views/projectCostLedger/detail/components/ProjectSideMenu'
import
{
import
{
getCostMeasureslist
,
getActualMonthsApi
,
getMeasureslist
,
getCostMeasureslist
,
getSummarydata
,
getMeasureslist
,
projectVolume
,
getSummarydata
,
pushProjectvolume
,
projectVolume
,
getActualMonthsApi
,
saveBatch
pushProjectvolume
,
}
from
'@/api/projectCostLedger'
;
saveBatch
import
{
cloneDeep
}
from
"lodash-es"
;
}
from
'@/api/projectCostLedger'
import
{
cloneDeep
}
from
'lodash-es'
export
default
{
export
default
{
name
:
"MeasureItems"
,
name
:
"MeasureItems"
,
props
:
{
props
:
{
// 项目ID
// 项目ID
...
@@ -264,6 +273,7 @@ export default {
...
@@ -264,6 +273,7 @@ export default {
//可访问data属性
//可访问data属性
created
()
{
created
()
{
this
.
init
(
this
.
comProjectId
);
this
.
init
(
this
.
comProjectId
);
// this.createResizeObserver();
},
},
//计算集
//计算集
computed
:
{
computed
:
{
...
@@ -271,6 +281,30 @@ export default {
...
@@ -271,6 +281,30 @@ export default {
},
},
//方法集
//方法集
methods
:
{
methods
:
{
getGDT
(){
let
gdt
=
document
.
querySelector
(
'.el-table__body-wrapper'
)
let
w1
=
document
.
querySelector
(
'.el-table__fixed-right-patch'
)
let
w2
=
document
.
querySelector
(
'.el-table__fixed-right'
)
if
(
gdt
){
let
outheight
=
gdt
.
scrollHeight
let
inheight
=
gdt
.
clientHeight
if
(
outheight
>
inheight
){
if
(
w1
)
{
w1
.
setAttribute
(
'style'
,
`width: 16px;height:40px`
)
}
if
(
w2
)
{
w2
.
setAttribute
(
'style'
,
`right: 16px;width:130px`
)
}
}
else
{
if
(
w1
)
{
w1
.
setAttribute
(
'style'
,
`width: 0;height:40px`
)
}
if
(
w2
)
{
w2
.
setAttribute
(
'style'
,
`right: 0;width:130px`
)
}
}
}
},
tored
({
column
}){
tored
({
column
}){
if
(
column
.
property
==
'quantity'
){
if
(
column
.
property
==
'quantity'
){
return
'tored'
return
'tored'
...
@@ -342,6 +376,12 @@ export default {
...
@@ -342,6 +376,12 @@ export default {
const
res
=
await
getCostMeasureslist
(
param
);
const
res
=
await
getCostMeasureslist
(
param
);
this
.
tableData
=
res
.
data
;
this
.
tableData
=
res
.
data
;
this
.
isinput
=
false
this
.
isinput
=
false
// await this.$nextTick()
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
getGDT
()
},
500
)
})
},
},
async
init
(
detail
=
''
)
{
async
init
(
detail
=
''
)
{
try
{
try
{
...
@@ -421,9 +461,10 @@ export default {
...
@@ -421,9 +461,10 @@ export default {
addinputs
(){
addinputs
(){
let
tables
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableData
))
let
tables
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableData
))
tables
.
forEach
(
item
=>
{
tables
.
forEach
(
item
=>
{
item
.
planMeasureId
=
item
.
id
item
.
id
=
item
.
actualId
item
.
id
=
item
.
actualId
item
.
month
=
this
.
expenseDate
item
.
month
=
this
.
expenseDate
item
.
monthCostRate
=
item
.
monthCostRate
==
''
?
''
:
parseInt
(
item
.
monthCostRate
.
replace
(
'%'
,
''
))
item
.
monthCostRate
=
item
.
monthCostRate
?
parseInt
(
item
.
monthCostRate
.
replace
(
'%'
,
''
)):
null
})
})
saveBatch
(
JSON
.
stringify
(
tables
)).
then
(
res
=>
{
saveBatch
(
JSON
.
stringify
(
tables
)).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
...
@@ -482,12 +523,6 @@ export default {
...
@@ -482,12 +523,6 @@ export default {
height
:
100%
;
height
:
100%
;
background
:
#fff
;
background
:
#fff
;
padding
:
16px
;
padding
:
16px
;
.table-item
{
margin-top
:
16px
;
}
::v-deep
.el-scrollbar.el-table-horizontal-scrollbar
{
display
:
none
!
important
;
}
}
}
}
}
.search
{
.search
{
...
...
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