Administrator
2021-08-28 e86a968d1f00ed28d5e07d3b9ced55a77406bb37
src/views/workreport/workreport.vue
@@ -239,20 +239,25 @@
      ).content.user_id;
      var that = this;
      getDept(this.deptId).then((res) => {
        var deptCategory = res.data.data.deptCategory;
        deptCategory == 1
          ? (that.deptCategory = true)
          : (that.deptCategory = false);
      // getDept(this.deptId).then((res) => {
      //   var deptCategory = res.data.data.deptCategory;
      //   deptCategory == 1
      //     ? (that.deptCategory = true)
      //     : (that.deptCategory = false);
        //1:保安公司  2:公安  3:培训公司
        if(deptCategory == 1 || deptCategory == 3){
        if(this.userInfo.role_name=="保安公司管理员"
        || this.userInfo.role_name=="保安"
        || this.userInfo.role_name=="未持证保安"
        ){
             const column = that.findObject(that.option.column, "category");
             column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=securityWorkReportCategory";
             const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
             columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
        }
        if(deptCategory == 2){
        if(this.userInfo.role_name=="公安管理员"){
             const column = that.findObject(that.option.column, "category");
             column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=workReportCategory";
             const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
@@ -272,7 +277,7 @@
          this.loading = false;
          this.selectionClear();
        });
      });
      // });
    },
  },
};