Browse Source

机构管理总部不可删除

yaoyao 2 năm trước cách đây
mục cha
commit
ed234ebafa
1 tập tin đã thay đổi với 8 bổ sung và 0 xóa
  1. 8 0
      src/views/Sys/Deptall.vue

+ 8 - 0
src/views/Sys/Deptall.vue

@@ -1076,6 +1076,14 @@ export default {
     },
     },
     //删除机构或部门
     //删除机构或部门
     deleteMechanism(data) {
     deleteMechanism(data) {
+      if (data.name == "总部") {
+        this.$message({
+          message: "总部不可删除",
+          type: "warning",
+          duration: 1000,
+        });
+        return
+      }
       this.$prompt('请输入密码', '提示', {
       this.$prompt('请输入密码', '提示', {
           confirmButtonText: '确定',
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           cancelButtonText: '取消',