Skip to content

Commit

Permalink
fix: 停用目录可直接删除 (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri0528 authored Jul 9, 2023
1 parent 0a7e91a commit 99ccf08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/pages/src/components/organization/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/src/views/organization/tree/OrganizationTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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('非空组织不能删除');
Expand Down

0 comments on commit 99ccf08

Please sign in to comment.