fix 81819
This commit is contained in:
+9
@@ -1153,11 +1153,16 @@ export default {
|
|||||||
this.$message.warning(this.$t('selectAtLeastOne'))
|
this.$message.warning(this.$t('selectAtLeastOne'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.selectedRowKeys.length === this.dataSource.length) {
|
||||||
|
this.$message.warning(this.$t('workCenter.standardCompliance.atLeastOneData'))
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('confirmBatchDeletion'),
|
title: this.$t('confirmBatchDeletion'),
|
||||||
content: this.$t('deleteAData'),
|
content: this.$t('deleteAData'),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
this.dataSource = this.dataSource.filter(tt => !this.selectedRowKeys.includes(tt.tableRowKey))
|
this.dataSource = this.dataSource.filter(tt => !this.selectedRowKeys.includes(tt.tableRowKey))
|
||||||
|
this.selectedRowKeys = []
|
||||||
this.$message.success(this.$t('deleteSucceeded'))
|
this.$message.success(this.$t('deleteSucceeded'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1188,6 +1193,10 @@ export default {
|
|||||||
* @param rowKey
|
* @param rowKey
|
||||||
*/
|
*/
|
||||||
handleDelete (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)
|
const index = this.dataSource.findIndex(tt => tt.tableRowKey === rowKey)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
|
|||||||
+1
-1
@@ -139,7 +139,7 @@ export default {
|
|||||||
this.initDict()
|
this.initDict()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.source ? this.queryParam.source = this.source : this.queryParam = {}
|
this.source ? this.queryParam.source = this.source : this.queryParam = {}
|
||||||
this.replacePage()
|
this.replacePage(1)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initDict () {
|
initDict () {
|
||||||
|
|||||||
Reference in New Issue
Block a user