fix 80047

This commit is contained in:
赵霄
2024-01-09 15:51:36 +08:00
parent 8bc0c9bf3e
commit e96db757d7
2 changed files with 8 additions and 5 deletions
@@ -970,7 +970,6 @@ export default {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
flag = false
} else {
console.log(this.projectId, this.projectDataSource[0].id)
if (this.projectId !== this.projectDataSource[0].id) {
this.standardDataSource = []
}
@@ -174,7 +174,10 @@ export default {
this.selectedRowKeys = selectedRowKeys
},
handleOk (rows) {
this.dataSource = rows.map((item, index) => {
rows.forEach((item) => {
if (this.dataSource.findIndex(tt => tt.id === item.id) !== -1) {
return
}
// 默认选中不带入
if (!item.decompositionOrderSource) {
item.decompositionOrderSource = '0'
@@ -188,9 +191,10 @@ export default {
return dictItem
})
}
item.tableRowKey = index
return item
item.tableRowKey = this.dataSource.length
this.dataSource.push(item)
})
console.log(this.dataSource)
},
getData () {
return this.dataSource
@@ -219,4 +223,4 @@ export default {
.process-part-title:first-child {
margin-top: 32px;
}
</style>
</style>