diff --git a/src/api/api.js b/src/api/api.js index 4806ed36..cbd5d1bd 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -140,6 +140,8 @@ const editAsmsInterface = (params) => postAction('/docking/asms/api/lawsAsmsOpen const getAsmsInterfaceById = (params) => getAction('/docking/asms/api/lawsAsmsOpenApi/getInfoById', params) // ASMS接口管理-同步 const syncAsmsInterface = (params) => getAction('/docking/asms/api/lawsAsmsOpenApi/syncBatch', params) +// ASMS接口管理-删除字典配置项 +const batchDelDictItemAsmsInterface = (params) => getAction('/docking/asms/api/lawsAsmsOpenApi/removeDictItemBatch', params) export { addRole, @@ -220,5 +222,6 @@ export { addAsmsInterface, editAsmsInterface, getAsmsInterfaceById, - syncAsmsInterface + syncAsmsInterface, + batchDelDictItemAsmsInterface } diff --git a/src/views/system/AsmsInterfaceList.vue b/src/views/system/AsmsInterfaceList.vue index 931b1034..32410fda 100644 --- a/src/views/system/AsmsInterfaceList.vue +++ b/src/views/system/AsmsInterfaceList.vue @@ -31,6 +31,7 @@
{{ $t('newlyAdded') }} + 批量删除原字典配置项 批量同步 @@ -68,7 +69,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin' import JTable from '@comp/jero/JTable' import AsmsInterfaceModal from '@views/system/modules/AsmsInterfaceModal' -import { getAsmsInterfaceById, syncAsmsInterface } from '@api/api' +import { batchDelDictItemAsmsInterface, getAsmsInterfaceById, syncAsmsInterface } from '@api/api' export default { name: 'AsmsInterfaceList', @@ -142,6 +143,34 @@ export default { } }, methods: { + handleBatchDelDictItem () { + if (this.selectedRowKeys.length <= 0) { + this.$message.warning(this.$t('selectARecord')) + } else { + const ids = this.selectedRowKeys.join(',') + const that = this + this.$confirm({ + title: '批量删除原字典配置项', + content: '确认批量删除原字典配置项', + onOk: function () { + that.loading = true + batchDelDictItemAsmsInterface({ ids }).then((res) => { + if (res.success) { + // 重新计算分页问题 + that.reCalculatePage(that.selectedRowKeys.length) + that.$message.success(res.message) + that.loadData() + that.onClearSelected() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, handleSync () { if (this.selectedRowKeys.length <= 0) { this.$message.warning(this.$t('selectARecord'))