[update] 修改bug87539
This commit is contained in:
@@ -561,7 +561,7 @@ export default {
|
||||
const ids = this.selectedRowKeys.join(',')
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: this.$t('deleteAData'),
|
||||
content: this.$t('enterpriseStandardLibrary.standard.cannotJumpAfterDeletion'),
|
||||
onOk: () => {
|
||||
this.loading = true
|
||||
postAction(this.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
@@ -637,6 +637,31 @@ export default {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
handleDelete (id) {
|
||||
if (!this.url.delete) {
|
||||
this.$message.warning('请设置url.delete属性!')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('enterpriseStandardLibrary.standard.cannotJumpAfterDeletion'),
|
||||
onOk: () => {
|
||||
postAction(that.url.delete, { ids: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 收藏
|
||||
handleCollection (record) {
|
||||
if (this.collectionFlag || this.loading) {
|
||||
|
||||
Reference in New Issue
Block a user