fix 81819

This commit is contained in:
赵霄
2024-02-05 17:45:27 +08:00
parent 1428ab63b8
commit 8ebe8503e8
2 changed files with 10 additions and 1 deletions
@@ -1153,11 +1153,16 @@ export default {
this.$message.warning(this.$t('selectAtLeastOne'))
return
}
if (this.selectedRowKeys.length === this.dataSource.length) {
this.$message.warning(this.$t('workCenter.standardCompliance.atLeastOneData'))
return
}
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
this.dataSource = this.dataSource.filter(tt => !this.selectedRowKeys.includes(tt.tableRowKey))
this.selectedRowKeys = []
this.$message.success(this.$t('deleteSucceeded'))
}
})
@@ -1188,6 +1193,10 @@ export default {
* @param rowKey
*/
handleDelete (rowKey) {
if (this.dataSource.length === 1) {
this.$message.warning(this.$t('workCenter.standardCompliance.atLeastOneData'))
return
}
const index = this.dataSource.findIndex(tt => tt.tableRowKey === rowKey)
if (index !== -1) {
this.$confirm({
@@ -139,7 +139,7 @@ export default {
this.initDict()
this.$nextTick(() => {
this.source ? this.queryParam.source = this.source : this.queryParam = {}
this.replacePage()
this.replacePage(1)
})
},
initDict () {