Administrator
2021-11-27 98ea8631ff25dc52dde07a376ffadb3466a533cb
保安员,用户权限修改
2 files modified
45 ■■■■ changed files
src/views/securityGuard/securityGuard.vue 35 ●●●● patch | view | raw | blame | history
src/views/system/user.vue 10 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue
@@ -1261,6 +1261,22 @@
      this.search["userType"] = 7;
      this.search["hold"] = "1";
    }
    this.userInfo.rname.forEach(roleName=>{
      if (
        roleName == "保安公司管理员" ||
        roleName == "保安" ||
        roleName == "分公司管理员"
      ) {
        //查询保安单位信息(包含子级)
        const column = this.findObject(this.option.column, "deptId");
        // column.search = false;
        //默认全部展开
        column.defaultExpandAll = true;
        column.dicUrl =
          "/api/blade-system/dept/security_lazy-tree?deptId="+this.userInfo.dept_id;
      }
    })
    if (
      this.userInfo.account == "南昌市保安服务总公司" ||
@@ -1724,7 +1740,11 @@
        //导出
        if (this.userInfo.role_name == "保安公司管理员") {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
          if(this.search.deptId){
              data["deptId"] = this.search.deptId;
            }else{
              data["deptId"] = this.userInfo.dept_id;
            }
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
@@ -2268,10 +2288,10 @@
            roleAlias == "分公司管理员"
          ) {
            //去除保安公司查询
            const column = that.findObject(that.option.column, "deptId");
            // const column = that.findObject(that.option.column, "deptId");
            // column.search = false;
            column.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?deptId="+that.userInfo.dept_id;
            // 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?deptId="+that.userInfo.dept_id;
@@ -2280,8 +2300,11 @@
            deptColumn.value = that.userInfo.dept_id;
            that.isSecurity = false;
            //如果是保安公司管理员
            params["deptId"] = that.userInfo.dept_id;
            if(this.search.deptId){
              params["deptId"] = this.search.deptId;
            }else{
              params["deptId"] = that.userInfo.dept_id;
            }
            //导入action 修改
            const importColumn = that.findObject(
              that.excelOption1.column,
src/views/system/user.vue
@@ -739,13 +739,13 @@
      //     );
      //   });
      // };
      // getDeptLazyTree(0).then((res) => {
      //   that.treeData = res.data.data;
      // });
      // var parentId1 = this.userInfo.dept_id;
      getSecurityDeptTree(null,null,this.userInfo.dept_id).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;
      // });
    }
  },
  mounted() {