From c8e279927a36c755fd78769cfa8e489568192aa4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 28 Aug 2021 16:31:05 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/views/workreport/workreport.vue |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
index 4a9c1dd..a955138 100644
--- a/src/views/workreport/workreport.vue
+++ b/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();
         });
-      });
+      // });
     },
   },
 };

--
Gitblit v1.9.3