Merge branch 'dev' into build

This commit is contained in:
aixianling
2022-08-30 11:00:57 +08:00
5 changed files with 237 additions and 4 deletions

View File

@@ -12,6 +12,8 @@
@node-click="handleNodeClick"
node-key="id"
ref="tree"
:expand-on-click-node="false"
:defaultExpandedKeys="treeObj.defaultExpandedKeys"
:filter-node-method="filterNode"
highlight-current>
<template slot-scope="{node,data}">
@@ -217,16 +219,13 @@ export default {
getTreeList() {
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
if (res?.data) {
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(res.data.id)
})
this.treeObj.treeList = res.data.filter(e => !e.parentGirdId)
const parentGirdId = this.treeObj.treeList[0].id
this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => {
if (v.id === parentGirdId) {
// this.defaultExpandedKeys.push(v.id)
this.treeObj.defaultExpandedKeys.push(v.id)
}
return {
@@ -235,6 +234,10 @@ export default {
}), {
parent: 'parentGirdId'
}))
this.$nextTick(() => {
this.info = this.treeObj.treeList[0]
this.$refs.tree.setCurrentKey(parentGirdId)
})
}
});
},