WINDOWS-7IFQK7E\EDY 2 年之前
父节点
当前提交
a0e55e6392
共有 2 个文件被更改,包括 11 次插入9 次删除
  1. 10 6
      src/components/TreeNav/index.vue
  2. 1 3
      src/views/xtgl/zjk/index.vue

+ 10 - 6
src/components/TreeNav/index.vue

@@ -2,7 +2,7 @@
   <div class="left-tree">
     <el-button
       class="add-btn"
-      :style="{ display: status ? 'none' : '' }"
+      :style="{ display: status ? 'none' : '', width: '90px' }"
       type="primary"
       icon="el-icon-plus"
       @click="updateTreeNode('add')"
@@ -212,11 +212,15 @@ export default {
   methods: {
     // 获取树的数据
     getTreeData() {
-      this.nowTree.getTree().then((res) => {
-        if (res.code === "1") {
-          this.tree.data = res.data.one_info;
-        }
-      });
+      this.nowTree
+        .getTree({
+          dept_id: this.treeType === "zzjg" ? "1" : "2",
+        })
+        .then((res) => {
+          if (res.code === "1") {
+            this.tree.data = res.data.one_info;
+          }
+        });
     },
     // 更新节点
     updateTreeNode(action, data) {

+ 1 - 3
src/views/xtgl/zjk/index.vue

@@ -362,6 +362,7 @@ export default {
         limit: 10,
         dept_id: "2",
         keyword: "",
+        type: "waipin",
       },
       dialogType: "",
       hdlxxzDialogVisible: false,
@@ -375,9 +376,6 @@ export default {
       fullscreenLoading: false,
       activeName: "waipin",
       type: "",
-      tableParams: {
-        type: "waipin",
-      },
     };
   },
   created() {