From 562ae0d927e8731420498c1e49cf62ebeb95f76a Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 20 Aug 2021 10:26:14 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

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

diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
index c4906c2..4a9c1dd 100644
--- a/src/views/workreport/workreport.vue
+++ b/src/views/workreport/workreport.vue
@@ -42,6 +42,7 @@
 
 <script>
 import { workreportColumn } from "./data";
+import { mapState } from "vuex";
 import {
   getListPage,
   remove,
@@ -98,10 +99,10 @@
     ...mapGetters(["permission"]),
     permissionList() {
       return {
-        addBtn: this.vaildData(this.permission.notice_add, false),
-        viewBtn: this.vaildData(this.permission.notice_view, false),
-        delBtn: this.vaildData(this.permission.notice_delete, false),
-        editBtn: this.vaildData(this.permission.notice_edit, false),
+        addBtn: this.vaildData(this.permission.workreport_add, false),
+        viewBtn: this.vaildData(this.permission.workreport_view, false),
+        delBtn: this.vaildData(this.permission.workreport_delete, false),
+        editBtn: this.vaildData(this.permission.workreport_edit, false),
       };
     },
     ids() {
@@ -111,6 +112,9 @@
       });
       return ids.join(",");
     },
+    ...mapState({
+      userInfo: (state) => state.user.userInfo,
+    }),
   },
   mounted() {},
   methods: {
@@ -241,23 +245,25 @@
           ? (that.deptCategory = true)
           : (that.deptCategory = false);
 
-        // const { releaseTimeRange } = this.query;
-        // if (that.deptCategory) {
+        //1:保安公司  2:公安  3:培训公司
+        if(deptCategory == 1 || deptCategory == 3){
+             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){
+             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");
+             columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
+        }
         params["deptId"] = this.deptId;
         params["userId"] = this.userId;
         // }
         let values = {
           ...params,
         };
-        // if (releaseTimeRange) {
-        //   values = {
-        //     ...params,
-        //     startTime: releaseTimeRange[0],
-        //     endTime: releaseTimeRange[1],
-        //     ...this.query,
-        //   };
-        //   values.releaseTimeRange = null;
-        // }
         this.loading = true;
         getListPage(page.currentPage, page.pageSize, values).then((res) => {
           const data = res.data.data;

--
Gitblit v1.9.3