This commit is contained in:
yanran200730
2022-02-10 14:10:47 +08:00
parent a90dfd3037
commit fb6fee0ae2
2 changed files with 7 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (data.isRefresh) { if (data.isRefresh) {
this.$refs.component.getTreeList();
this.$refs.component.getList(); this.$refs.component.getList();
} }
}); });

View File

@@ -316,10 +316,14 @@ export default {
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.treeObj.treeList = [...res.data]; this.treeObj.treeList = [...res.data];
this.info = { ...this.treeObj.treeList[0] };
this.$nextTick(() => { this.$nextTick(() => {
this.treeObj.treeList.length && this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id) if (this.treeObj.treeList.length && !this.info.girdLevel) {
this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id)
this.info = { ...this.treeObj.treeList[0] };
} else {
this.$refs.tree.setCurrentKey(this.info.id)
}
}) })
} }
}); });