fix: 修复重复请求

This commit is contained in:
@changcode
2021-11-05 15:22:36 +08:00
parent 6958aac93a
commit 2cbb1d64a9

View File

@@ -148,7 +148,6 @@ export default {
}
this.tableData = response.data.list
this.pageObj.total = response.data.total
bus.$emit('cabinet-tab')
if (!this.scrollbarWrap) {
this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
@@ -157,6 +156,34 @@ export default {
}
}
})
},
closeRightBox (refresh) {
this.rightBox.show = false
this.copyFlag = false
if (refresh) {
this.delFlag = true
this.getTableData()
bus.$emit('cabinet-tab')
}
},
del (row) {
const self = this
this.$confirm(this.$t('tip.confirmDelete'), {
confirmButtonText: this.$t('tip.yes'),
cancelButtonText: this.$t('tip.no'),
type: 'warning'
}).then(() => {
this.$delete(this.url + '?ids=' + row.id).then(response => {
if (response.code === 200) {
self.delFlag = true
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
self.getTableData()
bus.$emit('cabinet-tab')
} else {
this.$message.error(response.msg)
}
})
})
}
},
watch: {