Browse Source

bug修复

林倩 4 years ago
parent
commit
993f436e5d

+ 3 - 2
src/components/data-auth/set-auth-tree.vue

@@ -14,17 +14,18 @@
                 >
             </p>
             <div class="tree__content">
+                    <!-- @node-click="handleNodeClick" -->
+
                 <dg-tree
                     ref="authTree"
                     node-key="id"
                     :props="props"
-                    :expand-on-click-node="false"
+                    :expand-on-click-node="true"
                     :show-checkbox="showCheckbox"
                     v-model="selectkeys"
                     :data="treeData.nodes"
                     :highlight-current="false"
                     :default-expanded-keys="defaultExpandKeys"
-                    @node-click="handleNodeClick"
                     @check="handleCheckTree"
                 >
                     <span slot-scope="{ data }" class="tree-node">

+ 2 - 2
src/pages/common/search-tree/index.vue

@@ -56,7 +56,7 @@ export default {
                 return {
                     name: "",
                     mtType: "app",
-                    pageNum: 1,
+                    pageNum: 0,
                     pageSize: 20
                 };
             }
@@ -117,7 +117,7 @@ export default {
         },
 
         handleSearch() {
-            this.$set(this.searchForm, "pageNum", 1);
+            this.$set(this.searchForm, "pageNum", 0);
             this.$set(this, "searchResultList", []);
 
             this.treeMatch();

+ 9 - 8
src/pages/common/tree/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="u-tree_pop">
+    <div :class="{ 'u-tree_pop': title }">
         <h4 v-if="title" class="dg-words-title-second">{{ title }}</h4>
         <slot></slot>
         <div v-if="search" class="u-tree__search">
@@ -14,8 +14,8 @@
             ></el-input>
             <dg-button type="primary" @click="handleSearch" icon="el-icon-search" class="u-tree__search-btn" size="mini">查询</dg-button>
         </div>
-        <div v-if="searchResultList.length == 0 && isclickSearch && !loading" class="no-search-data">无数据</div>
-        <div class="u-tree__bar" :style="{ height: treeHeight }">
+        <div v-if="searchResultList.length == 0 && isclickSearch && !loading" class="no-search-data">无数据</div>
+        <div class="u-tree__bar" :style="{ height: treeHeight}">
             <dg-scrollbar v-show="!isclickSearch" :key="key">
                 <dg-tree
                     ref="tree"
@@ -107,7 +107,7 @@ export default {
                 return {
                     name: "",
                     mtType: "app",
-                    pageNum: 1,
+                    pageNum: 0,
                     pageSize: 50
                 };
             }
@@ -198,7 +198,7 @@ export default {
             if (this.searchForm.name) {
                 this.loading = true;
                 this.isclickSearch = true;
-                this.$set(this.searchForm, "pageNum", 1);
+                this.$set(this.searchForm, "pageNum", 0);
                 this.$set(this, "searchResultList", []);
                 this.treeMatch();
             } else {
@@ -324,15 +324,16 @@ export default {
         margin-left: 7px;
     }
 
-    .u-tree__search {
-        margin: 8px;
+}
+
+  .u-tree__search {
+        margin-bottom: 8px;
         display: flex;
         align-items: center;
         &-btn {
             margin-left: 5px;
         }
     }
-}
 
 .no-search-data {
     text-align: center;