From 08e52db54ce1e7563f1efe402a3f6c3931188013 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 14 二月 2025 10:47:53 +0800 Subject: [PATCH] 产品结构树: 1、实现文档批量删除功能 2、实现文档列表的排序以及筛选功能 设备结构树: 1、新增权限配置弹窗,提交后由后端测试 --- src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue | 53 +++++------------------------------------------------ 1 files changed, 5 insertions(+), 48 deletions(-) diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue index f2bb570..1b86a5b 100644 --- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue +++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue @@ -34,6 +34,9 @@ </div> </div> </a-spin> + + <!--鏉冮檺閰嶇疆寮圭獥--> + <AssignPermissionModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="getTreeDataByApi"/> </a-card> </template> @@ -41,10 +44,12 @@ import { mapActions } from 'vuex' import { deleteAction } from '@/api/manage' import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' + import AssignPermissionModal from './Permission/AssignPermissionModal' export default { name: 'DeviceStructureTree', components: { + AssignPermissionModal, DeviceStructureTreeContextMenu }, data() { @@ -124,54 +129,6 @@ // 鑻ュ彸閿椂褰撳墠鍙充晶灞曠ず灞傜骇涓鸿澶囧眰绾т笖褰撳墠鍙抽敭鏍戝眰绾у悓涓鸿澶囧眰绾ф椂鍒欏湪瑙﹀彂鍙抽敭鑿滃崟鍔熻兘鏃跺悓鏃惰Е鍙戝乏閿�変腑鍔熻兘 if (this.currentSelected.type === 2 && record.type === 2) this.handleTreeSelect([record.key], { node }) this.rightClickSelected = Object.assign({}, record) - }, - - // 鏍戣妭鐐瑰彸閿崟鍑昏彍鍗曚腑鍒犻櫎鎸夐挳鏃惰Е鍙� - handleDelete() { - const that = this - that.$confirm({ - title: '鎻愮ず', - content: '纭鍒犻櫎姝ゆ潯璁板綍鍚楋紵', - okText: '纭', - okType: 'danger', - cancelText: '鍙栨秷', - onOk: () => { - if (!this.url.delete) { - this.$message.error('璇疯缃畊rl.delete灞炴��!') - return - } - deleteAction(that.url.delete, { id: this.rightClickSelected.id }) - .then((res) => { - if (res.success) { - that.getTreeDataByApi() - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, - - /** - * 鑷姩灞曞紑娣诲姞涓嬬骇鑺傜偣鐨勭埗鑺傜偣 - */ - modalFormSubmitSuccess(isAddNextLevel) { - // 鍒ゆ柇鏄惁涓烘坊鍔犱笅绾у苟涓斿垽鏂埗鑺傜偣鏄惁灞曞紑 - if (isAddNextLevel && !this.expandedKeys.includes(this.rightClickSelected.id)) this.expandedKeys.push(this.rightClickSelected.id) - this.getTreeDataByApi() }, /** -- Gitblit v1.9.3