From f58f07875461b7cc8205978cf4f0fac86564df72 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 20 十二月 2023 17:49:01 +0800
Subject: [PATCH] 新增调试下载环信码功能

---
 src/api/fytz/creditApi.js                         |   25 ++++
 package-lock.json                                 |   91 ++++++++++++++
 src/api/index.js                                  |    4 
 package.json                                      |    1 
 src/components.d.ts                               |    3 
 src/views/fytz/user/components/CompUserInfo.vue   |   36 ++---
 src/views/fytz/user/UserInfo.vue                  |   97 ++++++++++-----
 src/components/form/FYForm.vue                    |    2 
 src/components/search-option/FYOptionLocation.vue |   24 +++
 src/enum/location.js                              |   56 ++++++++-
 10 files changed, 267 insertions(+), 72 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 9407446..89fa2d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@
         "element-plus": "^2.4.3",
         "pinia": "^2.0.26",
         "vue": "^3.2.45",
+        "vue-i18n": "^9.8.0",
         "vue-router": "^4.1.6"
       },
       "devDependencies": {
@@ -1944,6 +1945,38 @@
       "dev": true,
       "license": "BSD-3-Clause"
     },
+    "node_modules/@intlify/core-base": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.8.0.tgz",
+      "integrity": "sha512-UxaSZVZ1DwqC/CltUZrWZNaWNhfmKtfyV4BJSt/Zt4Or/fZs1iFj0B+OekYk1+MRHfIOe3+x00uXGQI4PbO/9g==",
+      "dependencies": {
+        "@intlify/message-compiler": "9.8.0",
+        "@intlify/shared": "9.8.0"
+      },
+      "engines": {
+        "node": ">= 16"
+      }
+    },
+    "node_modules/@intlify/message-compiler": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.8.0.tgz",
+      "integrity": "sha512-McnYWhcoYmDJvssVu6QGR0shqlkJuL1HHdi5lK7fNqvQqRYaQ4lSLjYmZxwc8tRNMdIe9/KUKfyPxU9M6yCtNQ==",
+      "dependencies": {
+        "@intlify/shared": "9.8.0",
+        "source-map-js": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 16"
+      }
+    },
+    "node_modules/@intlify/shared": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.8.0.tgz",
+      "integrity": "sha512-TmgR0RCLjzrSo+W3wT0ALf9851iFMlVI9EYNGeWvZFUQTAJx0bvfsMlPdgVtV1tDNRiAfhkFsMKu6jtUY1ZLKQ==",
+      "engines": {
+        "node": ">= 16"
+      }
+    },
     "node_modules/@jridgewell/gen-mapping": {
       "version": "0.3.2",
       "dev": true,
@@ -2411,8 +2444,9 @@
       }
     },
     "node_modules/@vue/devtools-api": {
-      "version": "6.4.5",
-      "license": "MIT"
+      "version": "6.5.1",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz",
+      "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA=="
     },
     "node_modules/@vue/reactivity": {
       "version": "3.2.45",
@@ -7304,6 +7338,22 @@
         "eslint": ">=6.0.0"
       }
     },
+    "node_modules/vue-i18n": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.8.0.tgz",
+      "integrity": "sha512-Izho+6PYjejsTq2mzjcRdBZ5VLRQoSuuexvR8029h5CpN03FYqiqBrShMyf2I1DKkN6kw/xmujcbvC+4QybpsQ==",
+      "dependencies": {
+        "@intlify/core-base": "9.8.0",
+        "@intlify/shared": "9.8.0",
+        "@vue/devtools-api": "^6.5.0"
+      },
+      "engines": {
+        "node": ">= 16"
+      },
+      "peerDependencies": {
+        "vue": "^3.0.0"
+      }
+    },
     "node_modules/vue-router": {
       "version": "4.1.6",
       "license": "MIT",
@@ -8765,6 +8815,29 @@
       "version": "1.2.1",
       "dev": true
     },
+    "@intlify/core-base": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.8.0.tgz",
+      "integrity": "sha512-UxaSZVZ1DwqC/CltUZrWZNaWNhfmKtfyV4BJSt/Zt4Or/fZs1iFj0B+OekYk1+MRHfIOe3+x00uXGQI4PbO/9g==",
+      "requires": {
+        "@intlify/message-compiler": "9.8.0",
+        "@intlify/shared": "9.8.0"
+      }
+    },
+    "@intlify/message-compiler": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.8.0.tgz",
+      "integrity": "sha512-McnYWhcoYmDJvssVu6QGR0shqlkJuL1HHdi5lK7fNqvQqRYaQ4lSLjYmZxwc8tRNMdIe9/KUKfyPxU9M6yCtNQ==",
+      "requires": {
+        "@intlify/shared": "9.8.0",
+        "source-map-js": "^1.0.2"
+      }
+    },
+    "@intlify/shared": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.8.0.tgz",
+      "integrity": "sha512-TmgR0RCLjzrSo+W3wT0ALf9851iFMlVI9EYNGeWvZFUQTAJx0bvfsMlPdgVtV1tDNRiAfhkFsMKu6jtUY1ZLKQ=="
+    },
     "@jridgewell/gen-mapping": {
       "version": "0.3.2",
       "dev": true,
@@ -9099,7 +9172,9 @@
       }
     },
     "@vue/devtools-api": {
-      "version": "6.4.5"
+      "version": "6.5.1",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz",
+      "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA=="
     },
     "@vue/reactivity": {
       "version": "3.2.45",
@@ -12094,6 +12169,16 @@
         "semver": "^7.3.6"
       }
     },
+    "vue-i18n": {
+      "version": "9.8.0",
+      "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.8.0.tgz",
+      "integrity": "sha512-Izho+6PYjejsTq2mzjcRdBZ5VLRQoSuuexvR8029h5CpN03FYqiqBrShMyf2I1DKkN6kw/xmujcbvC+4QybpsQ==",
+      "requires": {
+        "@intlify/core-base": "9.8.0",
+        "@intlify/shared": "9.8.0",
+        "@vue/devtools-api": "^6.5.0"
+      }
+    },
     "vue-router": {
       "version": "4.1.6",
       "requires": {
diff --git a/package.json b/package.json
index 50001b6..0129d3b 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
     "element-plus": "^2.4.3",
     "pinia": "^2.0.26",
     "vue": "^3.2.45",
+    "vue-i18n": "^9.8.0",
     "vue-router": "^4.1.6"
   },
   "devDependencies": {
diff --git a/src/api/fytz/creditApi.js b/src/api/fytz/creditApi.js
new file mode 100644
index 0000000..589bbe8
--- /dev/null
+++ b/src/api/fytz/creditApi.js
@@ -0,0 +1,25 @@
+import { $fytz } from '../index';
+
+/**
+ * 淇$敤璇勪及API鎺ュ彛
+ */
+export default {
+  /**
+   * 涓嬭浇鐢ㄦ埛鐜俊鐮�
+   * @param {*} userId
+   */
+  downloadCode(userId) {
+    return $fytz
+      .get(`credit/ecCode/download?userId=${userId}`, { responseType: 'blob' })
+      .then((res) => {
+        const url = window.URL.createObjectURL(new Blob([res.data]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', 'creditCode.png');
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+        window.URL.revokeObjectURL(url);
+      });
+  }
+};
diff --git a/src/api/index.js b/src/api/index.js
index cbff2ca..7b15cd6 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -20,7 +20,7 @@
 //椋炵窘鐩戠
 const $fysp = axios.create({
   baseURL: ip1,
-  timeout: 10000
+  timeout: 20000
 });
 $fysp.imgUrl = `${ip1_file}images/`;
 $fysp.downloadUrl = `${ip1_file}files/`;
@@ -28,7 +28,7 @@
 //椋炵窘鐜
 const $fytz = axios.create({
   baseURL: ip2,
-  timeout: 10000
+  timeout: 20000
 });
 $fytz.imgUrl = `${ip2_file}images/`;
 
diff --git a/src/components.d.ts b/src/components.d.ts
index c7d77e1..99f1394 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -27,6 +27,9 @@
     ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
+    ElDropdown: typeof import('element-plus/es')['ElDropdown']
+    ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
+    ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
     ElEmpty: typeof import('element-plus/es')['ElEmpty']
     ElForm: typeof import('element-plus/es')['ElForm']
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
diff --git a/src/components/form/FYForm.vue b/src/components/form/FYForm.vue
index 5bfa1b8..ade1ff9 100644
--- a/src/components/form/FYForm.vue
+++ b/src/components/form/FYForm.vue
@@ -108,7 +108,7 @@
 }
 
 const allRules = computed(()=>{
-  return {...baseRules.value, ...props.rules}
+  return {...baseRules, ...props.rules}
 })
 
 //鐩戝惉琛ㄥ崟鍒濆鏁版嵁浼犲叆
diff --git a/src/components/search-option/FYOptionLocation.vue b/src/components/search-option/FYOptionLocation.vue
index f4dc270..78ccb2b 100644
--- a/src/components/search-option/FYOptionLocation.vue
+++ b/src/components/search-option/FYOptionLocation.vue
@@ -6,7 +6,7 @@
       :options="locations"
       :placeholder="placeholder"
       :props="optionProps"
-      style="width: 280px"
+      style="width: 320px"
     />
   </el-form-item>
 </template>
@@ -51,7 +51,7 @@
   },
   computed: {
     placeholder() {
-      const list = '鐪�/甯�/鍖�/闀�'.split('/');
+      const list = '鐪�/甯�/鍖�/闀�/闆�/鐗�'.split('/');
       const p = [];
       for (let i = 0; i < this.level; i++) {
         p.push(list[i]);
@@ -78,7 +78,11 @@
         dCode: null,
         dName: null,
         tCode: null,
-        tName: null
+        tName: null,
+        aCode: null,
+        aName: null,
+        mCode: null,
+        mName: null,
       };
       if (val.length > 0) {
         res.pCode = val[0][0];
@@ -96,6 +100,14 @@
         res.tCode = val[3][0];
         res.tName = val[3][1];
       }
+      if (val.length > 4) {
+        res.aCode = val[4][0];
+        res.aName = val[4][1];
+      }
+      if (val.length > 5) {
+        res.mCode = val[5][0];
+        res.mName = val[5][1];
+      }
       return res;
     },
     optionFormatReverse(val) {
@@ -113,6 +125,12 @@
         if (val.tName) {
           res.push([val.tCode, val.tName]);
         }
+        if (val.aName) {
+          res.push([val.aCode, val.aName]);
+        }
+        if (val.mName) {
+          res.push([val.mCode, val.mName]);
+        }
       }
       return res;
     }
diff --git a/src/enum/location.js b/src/enum/location.js
index 6a7cdc6..6463c40 100644
--- a/src/enum/location.js
+++ b/src/enum/location.js
@@ -39,7 +39,12 @@
                 { label: '楂樻柊鍖�', value: ['310116503', '楂樻柊鍖�'] },
                 { label: '閲戝北鍗晣', value: ['310116109', '閲戝北鍗晣'] },
                 { label: '婕曟尘闀�', value: ['310116112', '婕曟尘闀�'] },
-                { label: '灞遍槼闀�', value: ['310116113', '灞遍槼闀�'] },
+                { label: '灞遍槼闀�', value: ['310116113', '灞遍槼闀�'] , children:[
+                  {
+                    label: '涓囪揪骞垮満',
+                    value: ['31011611301', '涓囪揪骞垮満'],
+                  },
+                ]},
                 { label: '鐭冲寲琛楅亾', value: ['310116001', '鐭冲寲琛楅亾'] },
                 { label: '鏈辨尘闀�', value: ['310116101', '鏈辨尘闀�'] },
                 { label: '鏋尘闀�', value: ['310116102', '鏋尘闀�'] },
@@ -60,9 +65,19 @@
                 { label: '鏋灄璺閬�', value: ['310104008', '鏋灄璺閬�'] },
                 { label: '鏂滃湡璺閬�', value: ['310104007', '鏂滃湡璺閬�'] },
                 { label: '闀挎ˉ琛楅亾', value: ['310104010', '闀挎ˉ琛楅亾'] },
-                { label: '鐢版灄琛楅亾', value: ['310104011', '鐢版灄琛楅亾'] },
+                { label: '鐢版灄琛楅亾', value: ['310104011', '鐢版灄琛楅亾'] , children:[
+                  {
+                    label: '鐢板皻鍧�',
+                    value: ['31010401101', '鐢板皻鍧�'],
+                  },
+                ]},
                 { label: '搴峰仴鏂版潙琛楅亾', value: ['310104013', '搴峰仴鏂版潙琛楅亾'] },
-                { label: '寰愬姹囪閬�', value: ['310104014', '寰愬姹囪閬�'] },
+                { label: '寰愬姹囪閬�', value: ['310104014', '寰愬姹囪閬�'] , children:[
+                  {
+                    label: '澶╅挜妗�',
+                    value: ['31010401401', '澶╅挜妗�'],
+                  },
+                ]},
                 { label: '鍑屼簯璺閬�', value: ['310104015', '鍑屼簯璺閬�'] },
                 { label: '榫欏崕琛楅亾', value: ['310104016', '榫欏崕琛楅亾'] },
                 { label: '婕曟渤娉捐閬�', value: ['310104017', '婕曟渤娉捐閬�'] },
@@ -73,18 +88,43 @@
               label: '闈欏畨鍖�',
               value: ['310106', '闈欏畨鍖�'],
               children: [
-                { label: '澶у畞璺閬�', value: ['310106019', '澶у畞璺閬�'] },
+                { label: '澶у畞璺閬�', value: ['310106019', '澶у畞璺閬�'] , children:[
+                  {
+                    label: '涔呭厜涓績',
+                    value: ['31010601901', '涔呭厜涓績'],
+                  },
+                ]},
                 { label: '褰郸鏂版潙琛楅亾', value: ['310106020', '褰郸鏂版潙琛楅亾'] },
                 { label: '涓存本璺閬�', value: ['310106021', '涓存本璺閬�'] },
                 { label: '鑺锋睙瑗胯矾琛楅亾', value: ['310106022', '鑺锋睙瑗胯矾琛楅亾'] },
-                { label: '褰郸闀�', value: ['310106101', '褰郸闀�'] },
+                { label: '褰郸闀�', value: ['310106101', '褰郸闀�'] , children:[
+                  {
+                    label: '澶ц瀺鍩�',
+                    value: ['31010610101', '澶ц瀺鍩�'],
+                  },
+                ]},
                 { label: '姹熷畞璺閬�', value: ['310106006', '姹熷畞璺閬�'] },
                 { label: '鐭抽棬浜岃矾琛楅亾', value: ['310106011', '鐭抽棬浜岃矾琛楅亾'] },
-                { label: '鍗椾含瑗胯矾琛楅亾', value: ['310106012', '鍗椾含瑗胯矾琛楅亾'] },
+                { label: '鍗椾含瑗胯矾琛楅亾', value: ['310106012', '鍗椾含瑗胯矾琛楅亾'] , children:[
+                  {
+                    label: 'X88',
+                    value: ['31010601201', 'X88'],
+                  },
+                ]},
                 { label: '闈欏畨瀵鸿閬�', value: ['310106013', '闈欏畨瀵鸿閬�'] },
-                { label: '鏇瑰娓¤閬�', value: ['310106014', '鏇瑰娓¤閬�'] },
+                { label: '鏇瑰娓¤閬�', value: ['310106014', '鏇瑰娓¤閬�'] , children:[
+                  {
+                    label: '889',
+                    value: ['31010601401', '889'],
+                  },
+                ]},
                 { label: '澶╃洰瑗胯矾琛楅亾', value: ['310106015', '澶╃洰瑗胯矾琛楅亾'] },
-                { label: '鍖楃珯琛楅亾', value: ['310106016', '鍖楃珯琛楅亾'] },
+                { label: '鍖楃珯琛楅亾', value: ['310106016', '鍖楃珯琛楅亾'] , children:[
+                  {
+                    label: '澶ф偊鍩�',
+                    value: ['31010601601', '澶ф偊鍩�'],
+                  },
+                ]},
                 { label: '瀹濆北璺閬�', value: ['310106017', '瀹濆北璺閬�'] },
                 { label: '鍏卞拰鏂拌矾琛楅亾', value: ['310106018', '鍏卞拰鏂拌矾琛楅亾'] },
               ],
diff --git a/src/views/fytz/user/UserInfo.vue b/src/views/fytz/user/UserInfo.vue
index ac17524..3269798 100644
--- a/src/views/fytz/user/UserInfo.vue
+++ b/src/views/fytz/user/UserInfo.vue
@@ -3,7 +3,7 @@
     <template #options>
       <FYOptionLocation
         :allOption="true"
-        :level="4"
+        :level="5"
         v-model:value="formSearch._locations"
       ></FYOptionLocation>
       <FYOptionText
@@ -36,41 +36,57 @@
         </template>
       </el-table-column>
       <el-table-column prop="userInfo.acountname" label="璐﹀彿" width="110" />
-      <el-table-column prop="sceneTypeName" label="绫诲瀷" width="130" />
-      <el-table-column prop="biProvinceName" label="鐪�" width="90" />
-      <el-table-column prop="biCityName" label="甯�" width="90" />
+      <el-table-column prop="sceneTypeName" label="绫诲瀷" width="100" />
+      <el-table-column prop="biProvinceName" label="鐪�" width="80" />
+      <el-table-column prop="biCityName" label="甯�" width="80" />
       <!-- <el-table-column prop="districtname" label="鍖哄幙" width="90" /> -->
-      <el-table-column prop="userInfo.extension1" label="鍖哄幙" width="90" />
+      <el-table-column prop="userInfo.extension1" label="鍖哄幙" width="80" />
       <el-table-column prop="biTownName" label="琛楅亾" width="110" />
       <el-table-column prop="biArea" label="闆嗕腑鍖�" width="110" />
       <el-table-column prop="biManagementCompany" label="鐗╀笟" min-width="110" />
       <el-table-column prop="userInfo.isenable" label="鐘舵��" width="90">
-        <template #default="scope">
-          {{ scope.row.userInfo.isenable ? '涓婄嚎涓�' : '宸蹭笅绾�' }}
+        <template #default="{ row }">
+          {{ row.userInfo.isenable ? '涓婄嚎涓�' : '宸蹭笅绾�' }}
         </template>
       </el-table-column>
       <el-table-column prop="userInfo.usertype" label="鐢ㄦ埛绫诲瀷" width="90" />
-      <el-table-column fixed="right" align="right" label="鎿嶄綔" width="160">
+      <el-table-column fixed="right" align="right" label="鎿嶄綔" width="190">
         <template #header>
           <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true"
             >鏂板鐢ㄦ埛</el-button
           >
         </template>
-        <template #default="scope">
-          <el-button
-            :loading="scope.row.loading1"
-            type="primary"
-            size="small"
-            @click="editRow(scope)"
-            >鏌ョ湅</el-button
-          >
-          <el-button
-            :loading="scope.row.loading2"
-            :type="scope.row.userInfo.isenable != '0' ? 'danger' : 'primary'"
-            size="small"
-            @click="itemActive(scope)"
-            >{{ scope.row.userInfo.isenable != '0' ? '涓嬬嚎' : '涓婄嚎' }}</el-button
-          >
+        <template #default="{ row }">
+          <el-space>
+            <!-- <el-button :loading="row.loading1" type="primary" size="small" @click="editRow(row)"
+              >鏌ョ湅</el-button
+            > -->
+            <el-button
+              :loading="row.loading2"
+              :type="row.userInfo.isenable != '0' ? 'danger' : 'primary'"
+              size="small"
+              @click="itemActive(row)"
+              >{{ row.userInfo.isenable != '0' ? '涓嬬嚎' : '涓婄嚎' }}</el-button
+            >
+            <el-dropdown
+              split-button
+              :loading="row.loading1"
+              size="small"
+              type="primary"
+              @click="editRow(row)"
+              @command="handleCommand"
+              trigger="click"
+            >
+              鏌ョ湅
+              <template #dropdown>
+                <el-dropdown-menu>
+                  <el-dropdown-item icon="Download" :command="{ c: 1, p: row }"
+                    >涓嬭浇鐜俊鐮�</el-dropdown-item
+                  >
+                </el-dropdown-menu>
+              </template>
+            </el-dropdown>
+          </el-space>
         </template>
       </el-table-column>
     </template>
@@ -80,6 +96,7 @@
 
 <script>
 import userApi from '@/api/fytz/userApi';
+import creditApi from '@/api/fytz/creditApi';
 import { useLoadingStore } from '@/stores/loadingStore';
 import { mapStores } from 'pinia';
 import { useMessageBoxTip } from '@/composables/messageBox';
@@ -139,37 +156,49 @@
         }
       });
     },
-    editRow(scope) {
-      scope.row.loading1 = true;
-      this.loadingStore.pushLoading(() => (scope.row.loading1 = false));
-      this.$router.push(`userEdit/${scope.row.userInfo.guid}`);
+    editRow(row) {
+      row.loading1 = true;
+      this.loadingStore.pushLoading(() => (row.loading1 = false));
+      this.$router.push(`userEdit/${row.userInfo.guid}`);
     },
-    itemActive(scope) {
+    itemActive(row) {
       const param = {
-        guid: scope.row.userInfo.guid,
-        isenable: !scope.row.userInfo.isenable
+        guid: row.userInfo.guid,
+        isenable: !row.userInfo.isenable
       };
-      const msg = scope.row.userInfo.isenable ? '涓嬬嚎' : '涓婄嚎';
+      const msg = row.userInfo.isenable ? '涓嬬嚎' : '涓婄嚎';
       useMessageBoxTip({
         confirmMsg: `纭${msg}璇ュ満鏅紵`,
         confirmTitle: msg,
         onConfirm: async () => {
-          scope.row.loading2 = true;
+          row.loading2 = true;
           return userApi
             .updateUserInfo(param)
             .then((res) => {
               if (res.success) {
-                scope.row.userInfo.isenable = param.isenable;
+                row.userInfo.isenable = param.isenable;
               }
             })
             .finally(() => {
-              scope.row.loading2 = false;
+              row.loading2 = false;
             });
         }
       });
     },
     tableRowClassName({ row }) {
       return row.userInfo.isenable ? 'online-row' : 'offline-row';
+    },
+    handleCommand(e){
+      const userId = e.p.userInfo.guid
+      switch (e.c) {
+        // 涓嬭浇鐜俊鐮�
+        case 1:
+          creditApi.downloadCode(userId)
+          break;
+      
+        default:
+          break;
+      }
     }
   }
 };
diff --git a/src/views/fytz/user/components/CompUserInfo.vue b/src/views/fytz/user/components/CompUserInfo.vue
index 9ee0edf..cb70f52 100644
--- a/src/views/fytz/user/components/CompUserInfo.vue
+++ b/src/views/fytz/user/components/CompUserInfo.vue
@@ -68,8 +68,8 @@
         v-if="create"
         prop="_locations"
         :allOption="false"
-        :level="4"
-        :checkStrictly="false"
+        :level="5"
+        :checkStrictly="true"
         :initValue="false"
         v-model:value="formObj._locations"
       ></FYOptionLocation>
@@ -149,14 +149,7 @@
 function parseUserInfoReverse(formObj) {
   // 琛屾斂鍖哄垝淇℃伅濉厖
   const a = formObj.value._locations;
-  formObj.value.provincecode = a.pCode;
-  formObj.value.provincename = a.pName;
-  formObj.value.citycode = a.cCode;
-  formObj.value.cityname = a.cName;
-  formObj.value.districtcode = a.dCode;
   formObj.value.extension1 = a.dName;
-  formObj.value.towncode = a.tCode;
-  formObj.value.townname = a.tName;
   // 鐢ㄦ埛绫诲瀷淇℃伅濉厖
   const b = formObj.value._usertype;
   formObj.value.usertypeid = b.value;
@@ -170,21 +163,22 @@
 }
 
 function createUser(formObj, success, fail) {
+  const l = formObj.value._locations;
   const params = {
     userInfo: formObj.value,
     baseInfo: {
-      biProvinceCode: formObj.value.provincecode,
-      biProvinceName: formObj.value.provincename,
-      biCityCode: formObj.value.citycode,
-      biCityName: formObj.value.cityname,
-      biDistrictCode: formObj.value.districtcode,
-      biDistrictName: formObj.value.extension1,
-      biTownCode: formObj.value.towncode,
-      biTownName: formObj.value.townname
-      // biAreaCode
-      // biArea
-      // biManagementCompanyId
-      // biManagementCompany
+      biProvinceCode: l.pCode,
+      biProvinceName: l.pName,
+      biCityCode: l.cCode,
+      biCityName: l.cName,
+      biDistrictCode: l.dCode,
+      biDistrictName: l.dName,
+      biTownCode: l.tCode,
+      biTownName: l.tName,
+      biAreaCode: l.aCode,
+      biArea: l.aName,
+      // biManagementCompanyId:
+      // biManagementCompany:
       // biContact
       // biTelephone
       // biAddress

--
Gitblit v1.9.3