From 99ccf086fbf9a99843fc677e86037cb3dde2d116 Mon Sep 17 00:00:00 2001 From: yuri0528 <72436066+yuri0528@users.noreply.github.com> Date: Mon, 10 Jul 2023 07:57:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=81=9C=E7=94=A8=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=8F=AF=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4=20(#1037)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/src/components/organization/mixin.js | 3 +++ src/pages/src/views/organization/tree/OrganizationTree.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/src/components/organization/mixin.js b/src/pages/src/components/organization/mixin.js index 83c9ab761..ee5dd6008 100644 --- a/src/pages/src/components/organization/mixin.js +++ b/src/pages/src/components/organization/mixin.js @@ -142,6 +142,9 @@ export default { // 删除 deleteDepartment(node) { this.stopBubbling(node); + if (!node.activated) { + this.$emit('deleteDepartment', node); + } if (node.has_children || node.default || (node.activated && node.configured)) { node.showDeleteTips = false; return; diff --git a/src/pages/src/views/organization/tree/OrganizationTree.vue b/src/pages/src/views/organization/tree/OrganizationTree.vue index 932a4e217..64b25cba8 100644 --- a/src/pages/src/views/organization/tree/OrganizationTree.vue +++ b/src/pages/src/views/organization/tree/OrganizationTree.vue @@ -249,7 +249,7 @@ export default { let text = ''; if (node.default) { text = this.$t('默认目录不能被删除'); - } else if (node.activated && node.configured) { + } else if (node.activated || node.configured) { text = this.$t('请先停用,方可删除目录'); } else if (node.has_children) { text = this.$t('非空组织不能删除');