fix 81819
This commit is contained in:
+9
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user