From 8556a31b17bc2bdb12699284001b7d1de11049fb Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 09 Nov 2021 14:50:16 +0800
Subject: [PATCH] 派遣保安员修改

---
 src/views/dispatch/dispatchChildoperable.vue |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index 5b12252..f0bad49 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",
+            //   },
+            // ],
           },
 
           {
@@ -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();
     },

--
Gitblit v1.9.3