From 635e1b3c0d48c2db884794cb8bc26d6ff1591ffa Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 21 十二月 2023 16:24:46 +0800
Subject: [PATCH] 1.增加行政处罚的数据展示 2.增加信访的数据展示

---
 src/views/fytz/user/components/CompBaseInfo.vue |   67 ++++++++++-----------------------
 1 files changed, 21 insertions(+), 46 deletions(-)

diff --git a/src/views/fytz/user/components/CompBaseInfo.vue b/src/views/fytz/user/components/CompBaseInfo.vue
index 50b1e6b..15b9472 100644
--- a/src/views/fytz/user/components/CompBaseInfo.vue
+++ b/src/views/fytz/user/components/CompBaseInfo.vue
@@ -3,6 +3,7 @@
     :form-info="_formInfo"
     :rules="rules"
     :reset="active"
+    :useReset="true"
     v-model:is-edit="_edit"
     @submit="submit"
     @cancel="cancel"
@@ -44,7 +45,6 @@
 </template>
 
 <script>
-import userApi from '@/api/fytz/userApi.js'
 export default {
   props: {
     //鍩烘湰淇℃伅
@@ -64,10 +64,6 @@
     return {
       _formInfo: null,
       _edit: false,
-      locations: false,
-      locationsProps: {
-        checkStrictly: true
-      },
       rules: {
         biNickName: [
           {
@@ -99,23 +95,20 @@
           }
         ]
       }
-    }
+    };
   },
   watch: {
     formInfo(nValue) {
-      console.log('value', nValue)
-      this._formInfo = this.parseUserInfo(nValue)
-      console.log('鎵ц浜�')
+      this._formInfo = this.parseBaseInfo(nValue);
     },
     _edit(nValue) {
-      this.$emit('update:isEdit', nValue)
+      this.$emit('update:isEdit', nValue);
     }
   },
   mounted() {},
   methods: {
     // 鐢ㄦ埛鍩烘湰淇℃伅鏍煎紡鍖�
-    parseUserInfo(s) {
-      const r = {}
+    parseBaseInfo(s) {
       s._locations = {
         pCode: s.biProvinceCode,
         pName: s.biProvinceName,
@@ -125,64 +118,46 @@
         dName: s.biDistrictName,
         tCode: s.biTownCode,
         tName: s.biTownName
-      }
-      return s
+      };
+      return s;
     },
     // 鍒涘缓鏂板満鏅�
-    createBaseInfo(formObj, func) {
-      return userApi
-        .createUser(formObj)
-        .then(() => {
-          this.$emit('onSubmit', formObj)
-        })
-        .finally(() => {
-          func()
-        })
-    },
+    createBaseInfo(formObj, func) {},
     // 鏇存柊鍦烘櫙
-    updateBaseInfo(formObj, func) {
-      return userApi
-        .updateUserInfo(formObj)
-        .then(() => {
-          this.$emit('onSubmit', formObj)
-        })
-        .finally(() => {
-          func()
-        })
-    },
+    updateBaseInfo(formObj, func) {},
     submit(formObj, func) {
       // 琛屾斂鍖哄垝淇℃伅濉厖
-      const a = formObj.value._locations
+      const a = formObj.value._locations;
       if ('pCode' in a) {
-        formObj.value.biProvinceCode = a.pCode
+        formObj.value.biProvinceCode = a.pCode;
       }
       if ('pName' in a) {
-        formObj.value.biProvinceName = a.pName
+        formObj.value.biProvinceName = a.pName;
       }
       if ('cCode' in a) {
-        formObj.value.biCityCode = a.cCode
+        formObj.value.biCityCode = a.cCode;
       }
       if ('cName' in a) {
-        formObj.value.biCityName = a.cName
+        formObj.value.biCityName = a.cName;
       }
       if ('dCode' in a) {
-        formObj.value.biDistrictCode = a.dCode
+        formObj.value.biDistrictCode = a.dCode;
       }
       if ('dName' in a) {
-        formObj.value.biDistrictName = a.dName
+        formObj.value.biDistrictName = a.dName;
       }
       if ('tCode' in a) {
-        formObj.value.biTownCode = a.tCode
+        formObj.value.biTownCode = a.tCode;
       }
       if ('tName' in a) {
-        formObj.value.biTownName = a.tName
+        formObj.value.biTownName = a.tName;
       }
 
-      return this.create ? this.createBaseInfo(formObj, func) : this.updateBaseInfo(formObj, func)
+      return this.create ? this.createBaseInfo(formObj, func) : this.updateBaseInfo(formObj, func);
     },
     cancel() {
-      this.$emit('onCancel')
+      this.$emit('onCancel');
     }
   }
-}
+};
 </script>

--
Gitblit v1.9.3