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
029127da
Commit
029127da
authored
May 09, 2024
by
danfuman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9e95db5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
218 additions
and
37 deletions
+218
-37
qualification.vue
.../src/views/detail/party-a/qualification/qualification.vue
+138
-6
index.vue
...rojectCostLedger/detail/components/MeasureItems/index.vue
+80
-31
No files found.
dsk-operate-ui/src/views/detail/party-a/qualification/qualification.vue
View file @
029127da
<
template
>
<
template
>
<div>
<div
class=
"qualification-container"
>
资质资格
<div
class=
"title_wrap"
>
<div
class=
"enterprise_title"
>
资质资格
</div>
</div>
</div>
<div
class=
"label-item"
>
<span
class=
"color"
>
建筑业企业资质 31
</span>
<span>
工程设计资质 31
</span>
</div>
<div
class=
"table-item"
>
<el-table
v-if=
"!isSkeleton"
element-loading-text=
"Loading"
:data=
"tableData"
row-key=
"id"
:span-method=
"objectSpanMethod"
default-expand-all
border
highlight-current-row
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
type=
"index"
fixed=
"left"
></el-table-column>
<el-table-column
label=
"资质编号"
width=
"150"
prop=
"code"
></el-table-column>
<el-table-column
label=
"资质名称"
min-width=
"200"
prop=
"expenseName"
></el-table-column>
<el-table-column
label=
"发证日期"
width=
"150"
prop=
"date"
></el-table-column>
<el-table-column
label=
"有效期"
width=
"150"
prop=
"time"
></el-table-column>
<el-table-column
label=
"发证机关"
min-width=
"200"
prop=
"fzjg"
></el-table-column>
</el-table>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
skeleton
from
'../component/skeleton'
;
name
:
"qualification"
export
default
{
name
:
"qualification"
,
components
:
{
skeleton
,
},
data
()
{
return
{
tableData
:[
{
code
:
'D123456489'
,
expenseName
:
'冶金工程施工总承包一级'
,
date
:
'2020-08-01'
,
time
:
'2020-08-01'
,
fzjg
:
'住房和城乡建设部'
,
},
{
code
:
'D123456489'
,
expenseName
:
'冶金工程施工总承包二级'
,
date
:
'2020-08-01'
,
time
:
'2020-08-01'
,
fzjg
:
'住房和城乡建设部'
,
},
{
code
:
'D123456489'
,
expenseName
:
'冶金工程施工总承包san级'
,
date
:
'2020-08-01'
,
time
:
'2020-08-01'
,
fzjg
:
'住房和城乡建设部'
,
},
{
code
:
'D323156489'
,
expenseName
:
'冶金工程施工总承包san级'
,
date
:
'2020-08-01'
,
time
:
'2020-08-01'
,
fzjg
:
'住房和城乡建设部'
,
},
],
isSkeleton
:
false
,
}
},
created
()
{
},
//计算集
computed
:
{
},
//方法集
methods
:
{
handleSearch
(){
},
flitterData
(
arr
)
{
let
spanOneArr
=
[]
let
concatOne
=
0
arr
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
0
)
{
spanOneArr
.
push
(
1
)
}
else
{
if
(
item
.
code
===
arr
[
index
-
1
].
code
)
{
spanOneArr
[
concatOne
]
+=
1
spanOneArr
.
push
(
0
)
}
else
{
spanOneArr
.
push
(
1
)
concatOne
=
index
}
}
})
return
{
one
:
spanOneArr
}
},
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
columnIndex
===
0
)
{
const
_row
=
this
.
flitterData
(
this
.
tableData
).
one
[
rowIndex
]
console
.
log
(
_row
,
"||||||||"
)
const
_col
=
_row
>
0
?
1
:
0
return
{
rowspan
:
_row
,
colspan
:
_col
}
}
},
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.qualification-container
{
.title_wrap
{
border-bottom
:
0
;
}
.label-item
{
padding
:
0
16px
;
span
{
display
:
inline-block
;
height
:
38px
;
border-radius
:
4px
;
line-height
:
38px
;
border
:
1px
solid
#DCDFE6
;
color
:
#232323
;
font-size
:
14px
;
margin-right
:
8px
;
padding
:
0
12px
;
}
.color
{
background
:
rgba
(
0
,
129
,
255
,
0
.1
);
color
:
#0081FF
;
}
}
}
</
style
>
</
style
>
dsk-operate-ui/src/views/projectCostLedger/detail/components/MeasureItems/index.vue
View file @
029127da
...
@@ -217,6 +217,14 @@
...
@@ -217,6 +217,14 @@
}
from
'@/api/projectCostLedger'
}
from
'@/api/projectCostLedger'
import
{
cloneDeep
}
from
'lodash-es'
import
{
cloneDeep
}
from
'lodash-es'
import
DskSkeleton
from
"@/components/DskSkeleton"
;
import
DskSkeleton
from
"@/components/DskSkeleton"
;
// 可编辑字段
const
editPropNames
=
[
"projectVolume"
,
"monthCostRate"
,
"costEffective"
,
];
export
default
{
export
default
{
name
:
"MeasureItems"
,
name
:
"MeasureItems"
,
props
:
{
props
:
{
...
@@ -276,6 +284,7 @@
...
@@ -276,6 +284,7 @@
id
:
0
,
id
:
0
,
expenseDate
:
''
,
expenseDate
:
''
,
tableData
:
[],
tableData
:
[],
originTableDataList
:
[],
//源数据列表
isall
:
true
,
//是否汇总
isall
:
true
,
//是否汇总
dialogVisible
:
false
,
dialogVisible
:
false
,
queryParam
:
{},
//推送工程量数据
queryParam
:
{},
//推送工程量数据
...
@@ -389,8 +398,10 @@
...
@@ -389,8 +398,10 @@
if
(
item
==
thismonth
){
if
(
item
==
thismonth
){
hasmonth
=
true
hasmonth
=
true
}
}
let
li
=
{
value
:
item
,
label
:
item
.
substring
(
0
,
4
)
+
'-'
+
item
.
substring
(
4
,
6
)}
if
(
item
){
arr
.
push
(
li
)
let
li
=
{
value
:
item
,
label
:
item
.
substring
(
0
,
4
)
+
'-'
+
item
.
substring
(
4
,
6
)}
arr
.
push
(
li
)
}
});
});
if
(
!
hasmonth
){
if
(
!
hasmonth
){
let
li
=
{
value
:
thismonth
,
label
:
thismonth
.
substring
(
0
,
4
)
+
'-'
+
thismonth
.
substring
(
4
,
6
)}
let
li
=
{
value
:
thismonth
,
label
:
thismonth
.
substring
(
0
,
4
)
+
'-'
+
thismonth
.
substring
(
4
,
6
)}
...
@@ -431,7 +442,8 @@
...
@@ -431,7 +442,8 @@
// this.tableData = res.data;
// this.tableData = res.data;
}
}
const
res
=
await
getCostMeasureslist
(
param
);
const
res
=
await
getCostMeasureslist
(
param
);
this
.
tableData
=
res
.
data
;
this
.
tableData
=
cloneDeep
(
res
.
data
);
this
.
originTableDataList
=
cloneDeep
(
res
.
data
);
this
.
isinput
=
false
this
.
isinput
=
false
// await this.$nextTick()
// await this.$nextTick()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -445,6 +457,16 @@
...
@@ -445,6 +457,16 @@
this
.
tableLoading
=
false
;
this
.
tableLoading
=
false
;
}
}
},
},
async
getListData
(
menuPath
){
let
param
=
{
projectId
:
this
.
projectId
,
id
:
this
.
id
,
month
:
this
.
expenseDate
};
const
res
=
await
getCostMeasureslist
(
param
);
this
.
tableData
=
cloneDeep
(
res
.
data
);
this
.
originTableDataList
=
cloneDeep
(
res
.
data
);
},
async
init
(
detail
=
''
)
{
async
init
(
detail
=
''
)
{
try
{
try
{
const
projectId
=
detail
;
const
projectId
=
detail
;
...
@@ -525,36 +547,62 @@
...
@@ -525,36 +547,62 @@
addcost
()
{
addcost
()
{
this
.
cbVisible
=
true
this
.
cbVisible
=
true
},
},
getTreeData
(
data
){
// 差异化比对
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
differentCompare
()
{
//projectVolume/monthCostRate/costEffective
const
originData
=
this
.
originTableDataList
;
if
(
data
[
i
].
projectVolume
||
data
[
i
].
monthCostRate
||
data
[
i
].
costEffective
){
/**
data
[
i
].
planMeasureId
=
data
[
i
].
id
* @type {Array<object>}
data
[
i
].
actualId
=
data
[
i
].
id
*/
data
[
i
].
month
=
this
.
expenseDate
let
data
=
cloneDeep
(
this
.
tableData
);
data
[
i
].
monthCostRate
=
data
[
i
].
monthCostRate
?
parseInt
(
data
[
i
].
monthCostRate
.
replace
(
'%'
,
''
)):
null
// 差异数据
}
const
different
=
this
.
getDeepDifferentData
(
data
,
originData
);
if
(
data
[
i
].
children
){
return
cloneDeep
(
different
);
this
.
getTreeData
(
data
[
i
].
children
);
}
else
{
data
[
i
].
children
=
undefined
;
}
}
return
data
;
},
},
addinputs
(){
// 深度差异化对比
let
tables
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableData
))
getDeepDifferentData
(
data
=
[],
originData
=
[],
tempArray
=
[])
{
let
params
=
this
.
getTreeData
(
tables
)
const
len
=
data
.
length
;
saveBatch
(
JSON
.
stringify
(
params
)).
then
(
res
=>
{
for
(
let
index
=
0
;
index
<
len
;
index
++
)
{
if
(
res
.
code
==
200
){
const
item
=
data
[
index
];
this
.
$message
.
success
(
res
.
msg
)
// 源数据
this
.
isinput
=
false
const
originItem
=
originData
[
index
];
this
.
getDatas
(
this
.
id
)
// 查看可编辑字段是否存在任意一处 数据不同
}
else
{
const
hasDifferent
=
editPropNames
.
some
(
prop
=>
{
this
.
$message
.
error
(
res
.
msg
)
// 两个皆为无效值 返回false
if
(
!
parseFloat
(
item
[
prop
])
&&
!
parseFloat
(
originItem
[
prop
]))
return
false
;
return
item
[
prop
]
!=
originItem
[
prop
];
});
console
.
log
(
hasDifferent
,
"hasDifferenthasDifferenthasDifferent"
)
// 浅层级
if
(
hasDifferent
)
{
tempArray
.
push
({
...
item
,
id
:
item
.
actualId
,
planMeasureId
:
item
.
id
,
monthCostRate
:
item
.
monthCostRate
?
parseInt
(
item
.
monthCostRate
.
replace
(
'%'
,
''
)):
null
,
month
:
this
.
expenseDate
});
}
// 递归深层级
if
(
item
?.
children
?.
length
)
{
this
.
getDeepDifferentData
(
item
.
children
,
originItem
.
children
,
tempArray
);
}
}
}
})
return
tempArray
;
},
addinputs
(){
let
resultData
=
this
.
differentCompare
();
// 有差异
if
(
resultData
.
length
)
{
saveBatch
(
resultData
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
$message
.
success
(
res
.
msg
)
this
.
isinput
=
false
this
.
getDatas
(
this
.
id
);
}
else
{
this
.
$message
.
error
(
res
.
msg
)
}
})
}
},
},
changeDate
(){
changeDate
(){
let
choseDate
=
this
.
chooseDate
.
replace
(
'-'
,
''
)
let
choseDate
=
this
.
chooseDate
.
replace
(
'-'
,
''
)
...
@@ -570,6 +618,7 @@
...
@@ -570,6 +618,7 @@
this
.
expenseDate
=
choseDate
this
.
expenseDate
=
choseDate
// arr.unshift(li)
// arr.unshift(li)
}
}
this
.
getListData
(
this
.
id
);
},
},
inputnum
(){
inputnum
(){
this
.
cbVisible
=
false
this
.
cbVisible
=
false
...
...
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