update 项目合规流程

This commit is contained in:
赵霄
2023-12-18 16:10:09 +08:00
parent e357d749b6
commit cb9fac6f21
2 changed files with 21 additions and 6 deletions
@@ -967,6 +967,7 @@ export default {
this.$refs.userSelectModal.open() this.$refs.userSelectModal.open()
}, },
handleBatchSelectorOk (list) { handleBatchSelectorOk (list) {
// 转办不走这个方法
if (this.isTransfer) { if (this.isTransfer) {
return return
} }
@@ -991,7 +992,8 @@ export default {
return return
} }
this.dataSource.forEach((item, index) => { this.dataSource.forEach((item, index) => {
if (this.selectedRowKeys.includes(index)) { // 给可选人的数据赋值
if (this.selectedRowKeys.includes(index) && item.canAssignFlag + '' === '1') {
item[fieldName] = list.map(tt => tt.id).join(',') item[fieldName] = list.map(tt => tt.id).join(',')
item[fieldName + '_dictText'] = list.map(tt => tt.realname + '(' + tt.username + ')').join(',') item[fieldName + '_dictText'] = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
this.$set(this.dataSource, index, item) this.$set(this.dataSource, index, item)
@@ -12,7 +12,7 @@
:can-drag="true" :can-drag="true"
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="id" rowKey="tableRowKey"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
@@ -128,9 +128,13 @@ export default {
}, },
watch: { watch: {
echoDataSource: { echoDataSource: {
handler() { handler () {
if (this.echoDataSource && this.echoDataSource.length > 0) { if (this.echoDataSource && this.echoDataSource.length > 0) {
this.dataSource = JSON.parse(JSON.stringify(this.echoDataSource)) const data = JSON.parse(JSON.stringify(this.echoDataSource))
this.dataSource = data.map((item, index) => {
item.tableRowKey = index
return item
})
} }
}, },
immediate: true, immediate: true,
@@ -139,6 +143,7 @@ export default {
}, },
methods: { methods: {
handleAdd () { handleAdd () {
this.$refs.selectStandardDrawer.selectedRowKeys = this.dataSource.map(tt => tt.standardNumber)
this.$refs.selectStandardDrawer.open(this.projectId) this.$refs.selectStandardDrawer.open(this.projectId)
}, },
batchDel () { batchDel () {
@@ -150,7 +155,14 @@ export default {
title: this.$t('confirmBatchDeletion'), title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'), content: this.$t('deleteAData'),
onOk: () => { onOk: () => {
this.dataSource = [] let data = JSON.parse(JSON.stringify(this.dataSource))
this.dataSource = data.map(item => {
if (this.selectedRowKeys.includes(item.tableRowKey)) {
return null
}
return item
}).filter(tt => !!tt)
console.log(this.dataSource)
this.selectedRowKeys = [] this.selectedRowKeys = []
this.rowIds = [] this.rowIds = []
} }
@@ -160,7 +172,7 @@ export default {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
}, },
handleOk (rows) { handleOk (rows) {
this.dataSource = rows.map(item => { this.dataSource = rows.map((item, index) => {
// 默认选中不带入 // 默认选中不带入
if (!item.decompositionOrderSource) { if (!item.decompositionOrderSource) {
item.decompositionOrderSource = '0' item.decompositionOrderSource = '0'
@@ -174,6 +186,7 @@ export default {
return dictItem return dictItem
}) })
} }
item.tableRowKey = index
return item return item
}) })
}, },