[update 标准解读流程] 增加删除逻辑
This commit is contained in:
+4
-1
@@ -369,7 +369,10 @@ export default {
|
|||||||
projectId: this.projectId
|
projectId: this.projectId
|
||||||
})
|
})
|
||||||
|
|
||||||
params.data = {}
|
params.data = {
|
||||||
|
// 所有删除的id
|
||||||
|
processAllDelIds: compData.processAllDelIds
|
||||||
|
}
|
||||||
// 发起节点
|
// 发起节点
|
||||||
if (this.isInitiate) {
|
if (this.isInitiate) {
|
||||||
// 选择的标准数据
|
// 选择的标准数据
|
||||||
|
|||||||
+3
@@ -393,6 +393,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectionRows: [],
|
selectionRows: [],
|
||||||
|
processAllDelIds: [], // 记录所有删除过的id,后端需要
|
||||||
url: {
|
url: {
|
||||||
// 导入
|
// 导入
|
||||||
importExcelUrl: '/process/standardInterpretFlow/importExcelByUnDistribute',
|
importExcelUrl: '/process/standardInterpretFlow/importExcelByUnDistribute',
|
||||||
@@ -733,6 +734,7 @@ export default {
|
|||||||
title: this.$t('confirmDeletion'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: this.$t('areYouSure'),
|
content: this.$t('areYouSure'),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
|
this.processAllDelIds.push(id)
|
||||||
that.dataSource = that.dataSource.filter(item => item[this.rowKey] !== id)
|
that.dataSource = that.dataSource.filter(item => item[this.rowKey] !== id)
|
||||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||||
@@ -756,6 +758,7 @@ export default {
|
|||||||
title: this.$t('confirmBatchDeletion'),
|
title: this.$t('confirmBatchDeletion'),
|
||||||
content: this.$t('deleteAData'),
|
content: this.$t('deleteAData'),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
|
this.processAllDelIds.push(...this.selectedRowKeys)
|
||||||
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item[this.rowKey]))
|
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item[this.rowKey]))
|
||||||
// 重新计算分页问题
|
// 重新计算分页问题
|
||||||
that.reCalculatePage(that.selectedRowKeys.length)
|
that.reCalculatePage(that.selectedRowKeys.length)
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ export default {
|
|||||||
if (this.showClauseTable) {
|
if (this.showClauseTable) {
|
||||||
obj.clauseData = this.$refs.interpretationClauseTable.getData()
|
obj.clauseData = this.$refs.interpretationClauseTable.getData()
|
||||||
}
|
}
|
||||||
|
// 获取所有删除的id
|
||||||
|
obj.processAllDelIds = this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.processAllDelIds
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
// 更新组件内的数据
|
// 更新组件内的数据
|
||||||
|
|||||||
+2
@@ -137,6 +137,8 @@ export default {
|
|||||||
obj.formData = this.form.getFieldsValue()
|
obj.formData = this.form.getFieldsValue()
|
||||||
}
|
}
|
||||||
obj.clauseInterpretData = this.$refs.interpretationClauseTable.getData()
|
obj.clauseInterpretData = this.$refs.interpretationClauseTable.getData()
|
||||||
|
// 获取所有删除的id
|
||||||
|
obj.processAllDelIds = this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.processAllDelIds
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
// 更新组件内的数据
|
// 更新组件内的数据
|
||||||
|
|||||||
+2
@@ -85,6 +85,8 @@ export default {
|
|||||||
}
|
}
|
||||||
// 条款列表
|
// 条款列表
|
||||||
obj.clauseData = this.$refs.interpretationClauseTable.getData()
|
obj.clauseData = this.$refs.interpretationClauseTable.getData()
|
||||||
|
// 获取所有删除的id
|
||||||
|
obj.processAllDelIds = this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.processAllDelIds
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
// 更新组件内的数据
|
// 更新组件内的数据
|
||||||
|
|||||||
+2
@@ -262,6 +262,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 获取所有删除的id
|
||||||
|
obj.processAllDelIds = this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.processAllDelIds
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
setData (data) {
|
setData (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user