From fa6eb4e94b2496773a281b0fac5582871e7d7b7a Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 22 Feb 2022 11:00:43 +0800
Subject: [PATCH] 反馈问题修复

---
 src/views/system/user.vue |  121 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 117 insertions(+), 4 deletions(-)

diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 7f43053..6540756 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -203,6 +203,7 @@
   update,
   updatePlatform,
   add,
+  securitySave,
   grant,
   resetPassword,
 } from "@/api/system/user";
@@ -295,7 +296,7 @@
         calcHeight: 54,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 6,
+        searchMenuSpan: 4,
         border: true,
         index: true,
         selection: true,
@@ -307,12 +308,14 @@
             label: "登录账号",
             prop: "account",
             search: true,
+            searchSpan: 5,
             display: false,
           },
           {
             label: "所属客户",
             prop: "tenantName",
             slot: true,
+            hide: true,
             display: false,
             width: 200,
           },
@@ -320,6 +323,24 @@
             label: "用户姓名",
             prop: "realName",
             search: true,
+            searchSpan: 5,
+            display: false,
+          },
+          {
+            label: "所属辖区",
+            prop: "jurisdiction",
+            search: true,
+            overHidden: true,
+            parent: false,
+            type: "tree",
+            searchLabelWidth: 80,
+            searchSpan: 4,
+            dicUrl: "/api/jurisdiction/lazy-tree",
+            props: {
+              label: "title",
+              value: "id"
+            },
+            checkStrictly: true,
             display: false,
           },
           {
@@ -335,7 +356,20 @@
             display: false,
             width: 260,
           },
-
+          {
+            label: "行政区",
+            prop: "district",
+            type: "select",
+            props: {
+              label: "name",
+              value: "code",
+            },
+            dicUrl: "/api/blade-system/region/select?code=3601",
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: false,
+            hide: true,
+          },
           {
             label: "用户平台",
             prop: "userTypeName",
@@ -359,6 +393,7 @@
           {
             label: "用户平台",
             type: "select",
+            searchSpan: 5,
             dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
             props: {
               label: "dictValue",
@@ -410,7 +445,7 @@
               },
               {
                 label: "行政区",
-                prop: "regionId",
+                prop: "district",
                 type: "select",
                 props: {
                   label: "name",
@@ -428,6 +463,26 @@
                     trigger: "blur",
                   },
                 ],
+              },
+              {
+                label: "所属辖区",
+                prop: "jurisdiction",
+                overHidden: true,
+                parent: false,
+                type: "tree",
+                dicUrl: "/api/jurisdiction/lazy-tree",
+                props: {
+                  label: "title",
+                  value: "id"
+                },
+                checkStrictly: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属辖区",
+                    trigger: "click"
+                  }
+                ]
               },
               {
                 label: "登录账号",
@@ -513,6 +568,11 @@
                     message: "姓名长度在2到5个字符",
                   },
                 ],
+              },
+              {
+                label: "身份证号",
+                prop: "cardid",
+                overHidden: true,
               },
               {
                 label: "手机号码",
@@ -828,11 +888,64 @@
         this.onLoad(this.page);
       });
     },
+    // rowSave(row, done, loading) {
+    //   row.deptId = row.deptId.join(",");
+    //   row.roleId = row.roleId.join(",");
+    //   row.postId = row.postId.join(",");
+    //   add(row).then(
+    //     () => {
+    //       this.initFlag = false;
+    //       this.onLoad(this.page);
+    //       this.$message({
+    //         type: "success",
+    //         message: "操作成功!",
+    //       });
+    //       done();
+    //     },
+    //     (error) => {
+    //       window.console.log(error);
+    //       loading();
+    //     }
+    //   );
+    // },
     rowSave(row, done, loading) {
       row.deptId = row.deptId.join(",");
       row.roleId = row.roleId.join(",");
       row.postId = row.postId.join(",");
-      add(row).then(
+      const userMap = {
+        user: {
+          account: row.account,
+          avatar: row.avatar,
+          fingerprint: row.fingerprint,
+          healstats: row.healstats,
+          address: row.address,
+          birthday: row.birthday,
+          cardid: row.cardid,
+          deptId: row.deptId,
+          roleId: row.roleId,
+          education: row.education1,
+          email: row.email,
+          height: row.height,
+          hold: row.hold,
+          jurisdiction: row.jurisdiction,
+          myPicture: row.myPicture,
+          name: row.name,
+          nation: row.nation,
+          nativeplace: row.nativeplace,
+          password: row.password,
+          password2: row.password2,
+          phone: row.phone,
+          politicaloutlook: row.politicaloutlook,
+          realName: row.realName,
+          registered: row.registered,
+          rtime: row.rtime,
+          securitynumber: row.securitynumber,
+          sex: row.sex,
+          district: row.district,
+          stype: 1,
+        },
+      };
+      securitySave(userMap).then(
         () => {
           this.initFlag = false;
           this.onLoad(this.page);

--
Gitblit v1.9.3