Commit 83bc6e48 by liuyong

修改代码

1 parent 29962413
Showing with 16 additions and 1 deletions
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
node-key="viewId" node-key="viewId"
@node-click="treeClick" @node-click="treeClick"
:props="{ children: 'subList', label: 'viewName', id: 'viewId' }" :props="{ children: 'subList', label: 'viewName', id: 'viewId' }"
:default-expanded-keys="[0]" :default-expanded-keys="treeDefaultExpand"
:current-node-key="currentNodekey"
ref="tree"> ref="tree">
</el-tree> </el-tree>
<div class="right_container"> <div class="right_container">
...@@ -154,6 +155,8 @@ export default { ...@@ -154,6 +155,8 @@ export default {
subList: [] subList: []
} }
], ],
treeDefaultExpand: [],
currentNodekey: null,
activeName: '暂存', activeName: '暂存',
pager1: { pager1: {
current: 1, current: 1,
...@@ -401,6 +404,18 @@ export default { ...@@ -401,6 +404,18 @@ export default {
getArchiViewManage(params).then(res => { getArchiViewManage(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.treeData[0].subList = res.data; this.treeData[0].subList = res.data;
this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey);
});
this.viewId = res.data[0].subList[0].viewId;
this.pager1.current = 1;
this.pager2.current = 1;
this.pager3.current = 1;
this.get_list1();
this.get_list2();
this.get_list3();
} }
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!