From 017886be8a6c07ccaaf6300b8c7652ddbd41d734 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期一, 15 一月 2024 16:50:08 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/mdc/common/BaseTree.vue |  108 +++++++++++++++++++++++++++++------------------------
 1 files changed, 59 insertions(+), 49 deletions(-)

diff --git a/src/views/mdc/common/BaseTree.vue b/src/views/mdc/common/BaseTree.vue
index 1eebf9d..c94bd5f 100644
--- a/src/views/mdc/common/BaseTree.vue
+++ b/src/views/mdc/common/BaseTree.vue
@@ -1,56 +1,62 @@
 <template>
   <a-card class="tree_con" :loading="cardLoading" :bordered="false" >
     <a-spin :spinning="loading">
-      <a-alert type="info" :showIcon="false" style="margin-right: 54px;padding-left: 5px">
-        <div slot="message">
-          <span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
-          <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">鍙栨秷</a>
-          <span v-else>鏃�</span>
-        </div>
-      </a-alert>
-      <div class="drawer-bootom-button">
-        <a-dropdown :trigger="['click']" placement="bottomCenter">
-          <a-menu slot="overlay">
-            <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
-            <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
-            <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
-          </a-menu>
-          <a-button>
-            <a-icon type="bars"/>
-          </a-button>
-        </a-dropdown>
-      </div>
-      <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
-                      v-model="searchInput" @change="handleChange"/>
-      <!-- showLine -->
-      <a-tree showLine ref="tree" :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys"
-              :selectedKeys="selectedKeys" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
-              :treeData="treeDataSource"
-              :autoExpandParent="autoExpandParent" @select="onSelect" @expand="onExpand" slots="{}">
-        <template slot="title" slot-scope="{ title, parentId, entity, key}">
+      <div style="display: flex;flex-direction: column;height: 100%">
+          <div>
+            <a-alert type="info" :showIcon="false" style="margin-right: 54px;padding-left: 5px">
+              <div slot="message">
+                <span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
+                <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">鍙栨秷</a>
+                <span v-else>鏃�</span>
+              </div>
+            </a-alert>
+            <div class="drawer-bottom-button">
+              <a-dropdown :trigger="['click']" placement="bottomCenter">
+                <a-menu slot="overlay">
+                  <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
+                  <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
+                  <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
+                </a-menu>
+                <a-button>
+                  <a-icon type="bars"/>
+                </a-button>
+              </a-dropdown>
+            </div>
+          </div>
+        <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
+                        v-model="searchInput" @change="handleChange"/>
+        <!-- showLine -->
+        <div style="flex: 1;overflow:auto;margin-top: 10px">
+          <a-tree showLine ref="tree" :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys"
+                  :selectedKeys="selectedKeys" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+                  :treeData="treeDataSource"
+                  :autoExpandParent="autoExpandParent" @select="onSelect" @expand="onExpand" slots="{}">
+            <template slot="title" slot-scope="{ title, parentId, entity, key}">
           <span v-if="title.indexOf(searchValue) > -1">
             {{ title.substr(0, title.indexOf(searchValue)) }}
             <span class="replaceSearch">{{ searchValue }}</span>
             {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
           </span>
-          <span v-else>{{ title }}</span>
-          <a-dropdown v-if="!editDisable && entity.parentId == -1" :trigger="['click']" placement="bottomCenter">
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a href="javascript:;" @click="handleEdit(entity)">缂栬緫</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a href="javascript:;" @click="batchDel(entity)">
-                  鍒犻櫎
-                </a>
-              </a-menu-item>
-            </a-menu>
-            <span :style="{position: 'absolute',right: 0}">
+              <span v-else>{{ title }}</span>
+              <a-dropdown v-if="!editDisable && entity.parentId == -1" :trigger="['click']" placement="bottomCenter">
+                <a-menu slot="overlay">
+                  <a-menu-item>
+                    <a href="javascript:;" @click="handleEdit(entity)">缂栬緫</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a href="javascript:;" @click="batchDel(entity)">
+                      鍒犻櫎
+                    </a>
+                  </a-menu-item>
+                </a-menu>
+                <span :style="{position: 'absolute',right: 0}">
               <a-icon type="down"/>
             </span>
-          </a-dropdown>
-        </template>
-      </a-tree>
+              </a-dropdown>
+            </template>
+          </a-tree>
+        </div>
+      </div>
     </a-spin>
     <tier-model ref="tierModalForm"  @ok="modalFormOk"></tier-model>
   </a-card>
@@ -356,7 +362,7 @@
     padding: 5px 15px 5px 37px;
   }
 
-  .drawer-bootom-button {
+  .drawer-bottom-button {
     position: absolute;
     top: 1px;
     /* padding: 10px 16px; */
@@ -365,34 +371,38 @@
     background: #fff;
     border-radius: 0 0 2px 2px;
   }
+
+  .tree_con{
+    overflow: hidden;
+  }
+
   @media screen and (min-width: 1920px){
     .tree_con{
       height: 748px!important;
-      overflow: scroll;
     }
   }
   @media screen and (min-width: 1680px) and (max-width: 1920px){
     .tree_con{
       height: 748px!important;
-      overflow: scroll;
     }
   }
   @media screen and (min-width: 1400px) and (max-width: 1680px){
     .tree_con{
       height: 600px!important;
-      overflow: scroll;
     }
   }
   @media screen and (min-width: 1280px) and (max-width: 1400px){
     .tree_con{
       height: 501px!important;
-      overflow: scroll;
     }
   }
   @media screen and (max-width: 1280px){
     .tree_con{
       height: 501px!important;
-      overflow: scroll;
     }
   }
+
+  /deep/ .ant-card-body,/deep/ .ant-spin-nested-loading,/deep/ .ant-spin-container{
+    height: 100%;
+  }
 </style>

--
Gitblit v1.9.3