From 8e2a42e4a2da78f9cda9fa3e7732a0ef72f0c906 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 12 Nov 2021 09:29:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/views/dispatch/dispatchChildoperable.vue |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index 5b12252..8e368a6 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -39,7 +39,6 @@
     return {
       deptCategory: "",
       deptId: "",
-
       loading1: true, //派遣记录
       selectionList1: [],
       page1: {
@@ -130,9 +129,8 @@
             type: "tree",
             width: 70,
             labelWidth: 120,
-            searchSpan: 3,
-            search: true,
             hide: true,
+            defaultExpandAll:true,
             // props: {
             //   label: "realName",
             //   value: "id",
@@ -158,8 +156,10 @@
           {
             label: "保安员",
             prop: "securityName",
-            type: "tree",
+            // type: "tree",
             width: 70,
+            searchSpan: 4,
+            search: true,
             labelWidth: 120,
             addDisplay: false,
             editDisplay: false,
@@ -169,13 +169,13 @@
             //   value: "id",
             // },
             // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
-            rules: [
-              {
-                required: true,
-                message: "请选择保安",
-                trigger: "blur",
-              },
-            ],
+            // rules: [
+            //   {
+            //     required: true,
+            //     message: "请选择保安",
+            //     trigger: "blur",
+            //   },
+            // ],
           },
 
           {
@@ -386,7 +386,7 @@
       done();
     },
     searchReset1() {
-      this.query = {};
+      this.query1 = {};
       this.onLoad1(this.page1);
     },
     rowUpdate1(row, index, done, loading) {
@@ -458,12 +458,18 @@
       this.onLoad1(this.page1, this.query1);
     },
 
-    beforeOpen(done, type) {
+    beforeOpen(done, type,row) {
       this.initFlag = true;
       if(type=="edit"){
-        // alert(1);
+        console.log(row,123);
         const userColumn = this.findObject(this.option1.column, "userIds");
         userColumn.multiple = false;
+        userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id+"&id="+this.form.userIds+"&realName="+this.form.securityName;
+      }
+      if(type=="add"){
+        const userColumn = this.findObject(this.option1.column, "userIds");
+        userColumn.multiple = true;
+        userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id;
       }
       done();
     },
@@ -500,13 +506,13 @@
           ...params,
           beginTime: releaseTimeRange[0],
           overTime: releaseTimeRange[1],
-          ...this.query,
+          ...this.query1,
         };
         values.releaseTimeRange = null;
       } else {
         values = {
           ...params,
-          ...this.query,
+          ...this.query1,
         };
       }
 

--
Gitblit v1.9.3