diff --git a/back/src/views/modules/ability/knowledgeBase.vue b/back/src/views/modules/ability/knowledgeBase.vue index 8e52de71..88999a99 100644 --- a/back/src/views/modules/ability/knowledgeBase.vue +++ b/back/src/views/modules/ability/knowledgeBase.vue @@ -533,7 +533,43 @@ export default { this.submitFrom.id = item.id this.showPutOnTheShelfFlag2 = true }) - } + }, + + // 新删除 + deleteHandle2 (id) { + if (id == undefined && this.dataListSelections.length < 1) { + this.$message({ + type: 'info', + message: '请选择要删除的数据' + }) + } else { + this.$confirm('确认是否删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const ids = [] + if (id) { + ids.push(id) + } else { + if (this.dataListSelections.length > 0) { + this.dataListSelections.forEach(item => { + ids.push(item.id) + }) + } + } + this.$http.post('/resource/delete', { ids: ids }).then(res => { + console.log('删除成功', res) + this.$message({ + type: 'success', + message: '删除成功!' + }) + this.reset() + }) + }).catch(() => { + }) + } + }, } }