From c4e67a8942e514b65ab41bb19781d50576c15725 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 24 Sep 2021 19:56:52 +0800
Subject: [PATCH] 用户

---
 src/views/securityGuard/securityGuardRegistration.vue |  153 ++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 115 insertions(+), 38 deletions(-)

diff --git a/src/views/securityGuard/securityGuardRegistration.vue b/src/views/securityGuard/securityGuardRegistration.vue
index 4e6e4e3..624bf0e 100644
--- a/src/views/securityGuard/securityGuardRegistration.vue
+++ b/src/views/securityGuard/securityGuardRegistration.vue
@@ -1,18 +1,18 @@
 <template>
-    <el-dialog
-      :title="!form.id?'新增':'修改'"
-      width="60%"
-      modal-append-to-body='false'
-      append-to-body='true'
-      :close-on-click-model="true"
-      :visible.sync="visible"
-    >
-        <avue-form :option="option" v-model="form" @submit="update">
-          <template slot-scope="{ row }" slot="input">
-            <el-tag>{{ row }}</el-tag>
-          </template>
-        </avue-form>
-    </el-dialog>
+  <el-dialog
+    :title="!form1.id ? '新增' : '修改'"
+    width="60%"
+    modal-append-to-body="false"
+    append-to-body="true"
+    :close-on-click-model="true"
+    :visible.sync="visible"
+  >
+    <avue-form :option="option" v-model="form1" @submit="update">
+      <template slot-scope="{ row }" slot="input">
+        <el-tag>{{ row }}</el-tag>
+      </template>
+    </avue-form>
+  </el-dialog>
 </template>
 
 <script>
@@ -42,7 +42,7 @@
       roleTreeObj: [],
       treeDeptId: "",
       treeData: [],
-      form: {
+      form1: {
         UserPractitionersInfo: [],
         title: "标题",
       },
@@ -78,7 +78,7 @@
         tip: false,
         searchShow: true,
         searchMenuSpan: 6,
-        border: false,
+        border: true, //liu
         stripe: true,
         index: true,
         selection: true,
@@ -104,18 +104,33 @@
                 label: "所属组织机构",
                 prop: "deptId",
                 type: "tree",
-                dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
+                dicUrl:
+                  "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
                 props: {
                   label: "title",
                   value: "id",
                 },
-                disabled: true,
+                // disabled: true,
                 span: 24,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择组织机构",
+                    trigger: "blur",
+                  },
+                ],
               },
               {
                 label: "登录账号",
                 prop: "account",
-                disabled: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入登录账号",
+                    trigger: "blur",
+                  },
+                ],
+                // disabled: true,
               },
               {
                 label: "用户姓名",
@@ -134,8 +149,69 @@
                 ],
               },
               {
+                label: "用户编号",
+                prop: "code",
+              },
+              {
                 label: "用户昵称",
                 prop: "name",
+              },
+              {
+                label: "所属行政区",
+                prop: "jurisdiction",
+                // multiple: true,
+                type: "tree",
+                dicUrl: "/api/jurisdiction/lazy-tree",
+                props: {
+                  label: "title",
+                  value: "id",
+                },
+                checkStrictly: true,
+                slot: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属行政区",
+                    trigger: "click",
+                  },
+                ],
+              },
+              {
+                label: "所属角色",
+                prop: "roleId",
+                multiple: true,
+                type: "tree",
+                dicData: [],
+                props: {
+                  label: "title",
+                },
+                checkStrictly: true,
+                slot: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属角色",
+                    trigger: "click",
+                  },
+                ],
+              },
+              {
+                label: "所属岗位",
+                prop: "postId",
+                type: "tree",
+                multiple: true,
+                dicData: [],
+                props: {
+                  label: "postName",
+                  value: "id",
+                },
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属岗位",
+                    trigger: "click",
+                  },
+                ],
               },
               {
                 label: "手机号码",
@@ -185,7 +261,7 @@
                   value: "dictKey",
                 },
                 dataType: "number",
-                slot: true
+                slot: true,
               },
               {
                 label: "政治面貌",
@@ -233,6 +309,8 @@
                 label: "用户生日",
                 type: "date",
                 prop: "birthday",
+                format: "yyyy-MM-dd",
+                valueFormat: "yyyy-MM-dd",
               },
             ],
           },
@@ -244,7 +322,7 @@
               {
                 prop: "UserPractitionersInfo",
                 type: "dynamic",
-                border: false,
+                border: true, //liu
                 span: 24,
                 children: {
                   align: "left",
@@ -316,7 +394,7 @@
           },
         ],
       },
-      data: [],
+      datachild: [],
     };
   },
   watch: {
@@ -343,7 +421,7 @@
   },
   methods: {
     inits(id) {
-      this.form.id = id || 0;
+      this.form1.id = id || 0;
       this.visible = true;
     },
     //获取用户信息
@@ -351,17 +429,17 @@
       var that = this;
       //获取用户基本信息
       getUser(this.userId).then((res) => {
-        this.form = res.data.data;
+        this.form1 = res.data.data;
         var userInfo = res.data.data;
         //获取用户从业信息
         getUserPractitionersInfo(userInfo.cardid).then((res1) => {
-          that.form.UserPractitionersInfo = res1.data.data;
+          that.form1.UserPractitionersInfo = res1.data.data;
         });
         if (this.form.hasOwnProperty("deptId")) {
-          this.form.deptId = this.form.deptId.split(",");
+          this.form1.deptId = this.form.deptId.split(",");
         }
         if (this.form.hasOwnProperty("postId")) {
-          this.form.postId = this.form.postId.split(",");
+          this.form1.postId = this.form.postId.split(",");
         }
       });
     },
@@ -402,6 +480,7 @@
             });
           });
           this.loading = false;
+          //debugger;
           done();
         },
         (error) => {
@@ -416,27 +495,26 @@
 
 <style scope>
 .box {
-  height: 850px;
+  height: 800px;
 }
 
-.el-card__body {
-  margin-bottom: 30px !important;
-}
+/* .el-card__body {
+  margin-bottom: 0px !important;
+} */
 
-.el-scrollbar {
+/* .el-scrollbar {
   height: 100%;
-}
+} */
 
-.box .el-scrollbar__wrap {
+/* .box .el-scrollbar__wrap {
   overflow: scroll;
-}
+} */
 
 /* .el-form-item__content{
       margin-left: 0px !important;
   } */
 
-
-.addorupdatetitle{
+.addorupdatetitle {
   position: absolute;
   left: 10px;
   top: 70px;
@@ -444,7 +522,6 @@
   height: 10px;
   font-size: 10px;
   cursor: pointer;
-
 }
 .xx {
   position: absolute;

--
Gitblit v1.9.3