修改收集清单的更新参数列数据

This commit is contained in:
范强强
2023-02-03 10:21:34 +08:00
parent 941ada66ef
commit c6fcaaf773
3 changed files with 918 additions and 584 deletions
File diff suppressed because it is too large Load Diff
@@ -58,7 +58,7 @@
<!-- </span>-->
<!-- </span>-->
<span slot="detailClick" slot-scope="text,record">
<collection-type :detailDate='text'/>
<collection-type @consolidateData="consolidateData" :detailDate='text'/>
</span>
</a-table>
</div>
@@ -293,6 +293,7 @@
detailDateList: [],
selectedRowKeys: [],
selectedRowrowValue: [],
description:'',
dataSource: [],
pageNo: 1,
pageSize: 100,
@@ -653,13 +654,24 @@
if (this.currentPersonRole !== 'dre') {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) =>
{
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// itemLi.isLock = 1
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
}
})
tt.push(Obj)
@@ -668,11 +680,18 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
}
})
tt.push(Obj)
@@ -693,6 +712,9 @@
cancleoperationFailed() {
this.selectedRowKeys = []
},
consolidateData(){
this.dataSource = [...this.dataSource]
},
getTableList(currentPersonRole) {
console.log(this.url.tableList)
let paramsManifestid
@@ -734,28 +756,56 @@
// })
let tt = []
if (this.currentPersonRole !== 'dre') {
console.log(res.result.records, 'res.result.records')
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
console.log(item)
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
itemLi.isLock = 0
}else{
itemLi.isLock = 1
}
if (itemLi.type === 'pull_more') {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// console.log(item)
// if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
// itemLi.isLock = 0
// }else{
// itemLi.isLock = 1
// }
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
}
})
tt.push(Obj)
})
} else {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
}
})
tt.push(Obj)