From 5a3ace296c010b5c11501dedf252e1c144cda9e2 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 06 Dec 2021 13:55:01 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises_ys

---
 src/views/dispatch/dispatch.vue |  170 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 118 insertions(+), 52 deletions(-)

diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index 806c805..2c082a0 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -95,7 +95,7 @@
       <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> -->
     </div>
   </basic-container>
-</template> 
+</template>
 
 <script>
 import {
@@ -206,6 +206,9 @@
         height: 623,
         menuWidth: 160,
         align: "center",
+        addTitle: "信息采集",
+        addBtnText: "信息采集",
+        editBtnText: "修改",
         selection: true,
         column: [
           //派遣服务公司登记
@@ -213,6 +216,17 @@
             label: "派遣单位名称",
             prop: "name",
             search: true,
+            searchLabelWidth: 110,
+            overHidden: true,
+            searchSpan: 4,
+            width: 210,
+            // span: 12,
+            labelWidth: 118,
+          },
+          {
+            label: "派遣单位地址",
+            prop: "address",
+            search: false,
             searchLabelWidth: 110,
             overHidden: true,
             searchSpan: 4,
@@ -254,6 +268,51 @@
             // span: 11,
           },
           {
+            label: " 负责人",
+            prop: "linkman",
+            labelWidth: 118,
+          },
+          {
+            label: "负责人电话",
+            prop: "phone",
+            labelWidth: 118,
+            width: 110,
+          },
+          //备用  不删 ↑针对没有depid的公司名字转换
+          //   {
+          //     label: "保安公司",
+          //     prop: "deptId",
+          //     type: "tree",
+          //     overHidden: true,
+          //     dicUrl:
+          //       "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+          //     props: {
+          //       label: "title",
+          //       value: "id",
+          //     },
+          //     // hide: true,
+          //     // hide: !website.tenantMode,
+          //     // addDisplay: website.tenantMode,
+          //     // editDisplay: website.tenantMode,
+          //     // viewDisplay: website.tenantMode,
+          //     rules: [
+          //       {
+          //         required: true,
+          //         message: "请选择保安公司",
+          //         trigger: "click",
+          //       },
+          //     ],
+          //     labelWidth: 118,
+          //     width: 230,
+          //     searchLabelWidth: 80,
+          //     search: true,
+          //     searchSpan: 4,
+          //     // editDisplay: false,
+          //     // addDisplay: false,
+          //     // hide: true,
+          //     // span: 11,
+          //   },
+          {
             label: "保安服务类型",
             prop: "serveType",
             // search: true,
@@ -264,7 +323,7 @@
             labelWidth: 118,
           },
           {
-            label: "合同生效时间",
+            label: "签署合同生效时间",
             prop: "releaseTimeRange",
             type: "date",
             format: "yyyy-MM-dd",
@@ -286,6 +345,34 @@
               },
             ],
           },
+          // {
+          //   label: " 派遣人数",
+          //   prop: "num",
+          //   labelWidth: 118,
+          // },
+          {
+            label: "签署合同开始时间",
+            prop: "startTime",
+            labelWidth: 118,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            // search: true,
+            // searchSpan: 4,
+            // overHidden: true
+          },
+          {
+            label: "签署合同结束时间",
+            prop: "endTime",
+            labelWidth: 118,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            // search: true,
+            // searchSpan: 4,
+            // overHidden: true
+          },
+
           {
             label: "所属辖区",
             prop: "jurisdiction",
@@ -337,56 +424,30 @@
               },
             ],
           },
-          // {
-          //   label: " 派遣人数",
-          //   prop: "num",
-          //   labelWidth: 118,
-          // },
-          {
-            label: "合同开始时间",
-            prop: "startTime",
-            labelWidth: 118,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-            // search: true,
-            // searchSpan: 4,
-            // overHidden: true
-          },
-          {
-            label: "合同结束时间",
-            prop: "endTime",
-            labelWidth: 118,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-            // search: true,
-            // searchSpan: 4,
-            // overHidden: true
-          },
-          {
-            label: " 负责人",
-            prop: "linkman",
-            labelWidth: 118,
-          },
-          {
-            label: "负责人联系方式",
-            prop: "phone",
-            labelWidth: 118,
-            width: 110,
-          },
         ],
       },
     };
   },
   created() {
     if (this.userInfo.role_name == "保安公司管理员") {
-      const deptColumn = this.findObject(this.option.column, "deptId");
-      deptColumn.search = false;
-      deptColumn.addDisplay = false;
-      deptColumn.editDisplay = false;
-      deptColumn.viewDisplay = false;
-      deptColumn.hide = true;
+      // const deptColumn = this.findObject(this.option.column, "deptId");
+      // // deptColumn.search = false;
+      // deptColumn.addDisplay = false;
+      // deptColumn.editDisplay = false;
+      // deptColumn.viewDisplay = false;
+      // deptColumn.hide = true;
+      // this.option.column[2];
+      this.option.column[2].search = false;
+      this.option.column[2].addDisplay = false;
+      this.option.column[2].editDisplay = false;
+      this.option.column[2].viewDisplay = false;
+      this.option.column[2].hide = true;
+    } else {
+      this.option.column[2].search = true;
+      this.option.column[2].addDisplay = true;
+      this.option.column[2].editDisplay = true;
+      this.option.column[2].viewDisplay = true;
+      this.option.column[2].hide = false;
     }
   },
   computed: {
@@ -405,9 +466,9 @@
       });
       return ids1.join(",");
     },
-        ...mapState({
+    ...mapState({
       userInfo: (state) => state.user.userInfo,
-        })
+    }),
   },
   methods: {
     handleChangeTABS(column) {
@@ -436,7 +497,7 @@
       //   this.$message.success("页码" + val);
     },
     rowSave(form, done, loading) {
-      form["deptId"] = this.userInfo.dept_id;
+      // form["deptId"] = this.userInfo.dept_id;
       adddata(form).then(
         (res) => {
           this.onLoad(this.page);
@@ -454,6 +515,11 @@
       // }
     },
     searchChange(params, done) {
+      if (params.deptName) {
+        params.deptId = params.deptName;
+      }
+      delete params.deptName;
+      //   console.log(params);
       this.query = params;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
@@ -576,7 +642,7 @@
         };
       }
 
-      console.log(values);
+      // console.log(values);
 
       getdata(
         page.currentPage,
@@ -584,10 +650,10 @@
         // Object.assign(params, this.query)
         values
       ).then((res) => {
-        // console.log(res);
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
+        console.log(this.data);
         for (var k in this.data) {
           // this.data[k]["deptId"] = that.userInfo.dept_id;
           this.data[k]["tenantName"] = that.userInfo.user_name;
@@ -634,4 +700,4 @@
 .el-collapse-item {
   padding-top: 15px !important;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3