yuansh před 2 roky
rodič
revize
64d4638134
1 změnil soubory, kde provedl 11 přidání a 11 odebrání
  1. 11 11
      src/views/system/modules/AddressListLeft.vue

+ 11 - 11
src/views/system/modules/AddressListLeft.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :loading="cardLoading" :bordered="false" style="height: 100%;">
     <a-spin :spinning="loading">
-      <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="输入机构名称查询..." allowClear enterButton />
+      <a-input-search @search="handleSearch" style="width:100%;margin-bottom:5px" placeholder="输入机构名称查询..." allowClear enterButton />
 
       <a-tree
         showLine
@@ -69,16 +69,16 @@
             this.treeDataSource = res.result
             // update-begin- --- author:wangshuai ------ date:20200102 ---- for:去除默认选中第一条数据、默认展开所有第一级
             // 默认选中第一条数据、默认展开所有第一级
-            // if (res.result.length > 0) {
-            //   this.expandedKeys = []
-            //   res.result.forEach((item, index) => {
-            //     if (index === 0) {
-            //       this.selectedKeys = [item.id]
-            //       this.emitInput(item.orgCode)
-            //     }
-            //     this.expandedKeys.push(item.id)
-            //   })
-            // }
+            if (res.result.length > 0) {
+              this.expandedKeys = []
+              res.result.forEach((item, index) => {
+                if (index === 0) {
+                  this.selectedKeys = [item.id]
+                  this.emitInput(item.orgCode)
+                }
+                this.expandedKeys.push(item.id)
+              })
+            }
            // update-end- --- author:wangshuai ------ date:20200102 ---- for:去除默认选中第一条数据、默认展开所有第一级
           } else {
             this.$message.warn(res.message)