Administrator
2021-11-26 66d85a91a9fbf30d9dc778658fa7d0a0709e5693
用户保安员列表组织机构tree 修改
4 files modified
50 ■■■■ changed files
src/api/system/dept.js 12 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 8 ●●●●● patch | view | raw | blame | history
src/views/system/user.vue 28 ●●●●● patch | view | raw | blame | history
src/api/system/dept.js
@@ -80,6 +80,18 @@
    })
}
export const getSecurityDeptTree = (jurisdiction, parentId, deptId) => {
    return request({
        url: '/api/blade-system/dept/security_lazy-tree',
        method: 'get',
        params: {
            jurisdiction,
            parentId,
            deptId
        }
    })
}
export const getDeptLazyTreeUser = (parentId) => {
    return request({
src/views/securityGuard/data.js
@@ -479,7 +479,7 @@
        // prop: "deptName",
        prop: "deptId",
        type: "tree",
        dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
        // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
        props: {
            label: "title",
            value: "id",
src/views/securityGuard/securityGuard.vue
@@ -2269,12 +2269,14 @@
          ) {
            //去除保安公司查询
            const column = that.findObject(that.option.column, "deptId");
            column.search = false;
            // column.search = false;
            column.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?deptId="+that.userInfo.dept_id;
            const deptColumn = that.findObject(that.option.group, "deptId");
            deptColumn.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
              "/api/blade-system/dept/security_lazy-tree?deptId="+that.userInfo.dept_id;
            //禁止编辑
            deptColumn.disabled = true;
            // deptColumn.disabled = true;
            deptColumn.value = that.userInfo.dept_id;
            that.isSecurity = false;
            //如果是保安公司管理员
src/views/system/user.vue
@@ -200,7 +200,7 @@
  resetPassword,
  getJurisdiction,
} from "@/api/system/user";
import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { getSecurityDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree } from "@/api/system/role";
import { getPostList } from "@/api/system/post";
import { mapGetters } from "vuex";
@@ -697,7 +697,7 @@
    },
  },
  created() {
    console.log(this.userInfo.role_name);
    // console.log(this.userInfo.role_name);
    if (
      this.userInfo.role_name == "保安公司管理员" ||
      this.userInfo.role_name == "分公司管理员"
@@ -706,7 +706,7 @@
      this.sizes = [0, 24];
      this.isguanli = false;
      this.option.group[0].column[0]["value"] = this.userInfo.dept_id;
      this.option.group[0].column[0]["disabled"] = true;
      // this.option.group[0].column[0]["disabled"] = true;
      // this.option.group[2].column[1]["disabled"] = true;
    } else {
      this.deptids = null;
@@ -739,7 +739,11 @@
      //     );
      //   });
      // };
      getDeptLazyTree(0).then((res) => {
      // getDeptLazyTree(0).then((res) => {
      //   that.treeData = res.data.data;
      // });
      // var parentId1 = this.userInfo.dept_id;
      getSecurityDeptTree(null,null,this.userInfo.dept_id).then((res) => {
        that.treeData = res.data.data;
      });
    }
@@ -784,11 +788,11 @@
          column.dicData = k;
        }
      });
// this.userInfo.role_name == "保安公司管理员"
      //公安局进入
      if (
        this.userInfo.role_name == "公安管理员" ||
        this.userInfo.role_name == "保安公司管理员"
        this.userInfo.role_name == "公安管理员"
      ) {
        var parentId = this.userInfo.dept_id;
        var userId = this.userInfo.Id;
@@ -797,9 +801,13 @@
          column.dicData = res.data.data;
        });
      } else {
        getDeptLazyTree(0).then((res) => {
          const column = this.findObject(this.option.group, "deptId");
          column.dicData = res.data.data;
        // getDeptLazyTree(0).then((res) => {
        //   const column = this.findObject(this.option.group, "deptId");
        //   column.dicData = res.data.data;
        // });
        getSecurityDeptTree(null,null,this.userInfo.dept_id).then((res) => {
            const column = this.findObject(this.option.group, "deptId");
            column.dicData = res.data.data;
        });
      }
      // getDeptTree(tenantId).then((res) => {