From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 20 七月 2022 15:05:58 +0800
Subject: [PATCH] 修复国标配置的bug

---
 src/pages/library/index/App.vue |   42 +++++++++++++++++++++++++++---------------
 1 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/src/pages/library/index/App.vue b/src/pages/library/index/App.vue
index 2622da2..e6a0954 100644
--- a/src/pages/library/index/App.vue
+++ b/src/pages/library/index/App.vue
@@ -5,14 +5,14 @@
         <div class="resize-bar"></div>
         <!-- <div class="resize-line"></div> -->
         <div class="resize-save">
-          <base-list
+          <baseList
             ref="baseSync"
             :title="`鍚屾搴揱"
             type="sync"
             :isSelected="isSelected"
             @getList="getPersonList"
             @changeShow="changeToAdd"
-          ></base-list>
+          ></baseList>
         </div>
       </div>
       <div class="bg-white ml20 data-right-box">
@@ -34,14 +34,14 @@
             v-show="showType == 'car'"
           ></car-list>
         </div>
-        <add-base
+        <addBase
           ref="addBase"
           :baseObject="baseForEdit"
           :type="syncType"
           v-if="!showList"
           @refresh="findBaseSync"
           @closeAdd="closeAdd"
-        ></add-base>
+        ></addBase>
       </div>
     </div>
   </div>
@@ -98,18 +98,27 @@
   },
   methods: {
     getPersonList(item, type) {
-      this.baseObject = item;
-      this.baseForEdit = item;
-      this.syncType = type;
+      console.log(123);
+      console.log(item);
+      console.log(type);
+
+      if (item) {
+        this.baseObject = item;
+        this.baseForEdit = item;
+        this.syncType = type;
+      }
+
       // 鐩存帴璋冪敤瀛愮粍浠跺埛鏂板垪琛ㄧ殑鏂规硶
       // 鍒ゆ柇杩欐槸浜哄憳搴撹繕鏄溅杈嗗簱锛屽喅瀹歴howList鐨勫��
-      if (item.tableType == "person") {
-        this.showType = "person";
-        this.$refs.personList.getPersonList();
-      } else if (item.tableType == "car") {
-        this.showType = "car";
-        this.$refs.carList.getCarList();
-      }
+      this.$nextTick(() => {
+        if (this.baseObject.tableType == "person") {
+          this.showType = "person";
+          this.$refs.personList.getPersonList();
+        } else if (this.baseObject.tableType == "car") {
+          this.showType = "car";
+          this.$refs.carList.getCarList();
+        }
+      });
       this.breeadCrumb[1].name = "搴曞簱璇︽儏";
     },
     changeToAdd(item, type) {
@@ -125,14 +134,17 @@
     },
     initBaseList() {
       this.$refs.baseSync.init();
+      this.BaseManageData.queryTagList();
     },
     // 鏌ヨ鍚屾搴撳垪琛ㄦ暟鎹甛鏌ヨ鏈湴搴撳垪琛ㄦ暟鎹�
     findBaseSync() {
       this.BaseManageData.querySyncTables();
       this.BaseManageData.queryLocalTables();
+      this.BaseManageData.queryTagList();
     },
     closeAdd() {
       this.showList = true;
+      this.$refs.baseSync.init(this.syncType);
     },
   },
   props: {
@@ -172,7 +184,7 @@
   },
 };
 </script>
-<style lang="scss" >
+<style lang="scss">
 .s-base-manage {
   box-sizing: border-box;
   background-color: #eff1f5;

--
Gitblit v1.8.0