|
@@ -790,13 +790,23 @@ export default {
|
|
|
let paramsId = this.fromcurNode.id
|
|
|
console.log(this.nodeid,'this.initTableId');
|
|
|
// 根据 id 获取节点信息
|
|
|
- let getNodeById = this.$refs.tree.getNode(paramsId);
|
|
|
- if(getNodeById){
|
|
|
- // 设置节点选中
|
|
|
- this.$refs.tree.setCurrentKey(paramsId);
|
|
|
- this.getNodeDetail(this.fromcurNode)
|
|
|
- this.getNodeDetailComp(this.fromcurNode)
|
|
|
- }
|
|
|
+ // let getNodeById = this.$refs.tree.getNode(paramsId);
|
|
|
+ // if(getNodeById){
|
|
|
+ // // 设置节点选中
|
|
|
+ // this.$refs.tree.setCurrentKey(paramsId);
|
|
|
+ // this.getNodeDetail(this.fromcurNode)
|
|
|
+ // this.getNodeDetailComp(this.fromcurNode)
|
|
|
+ // }
|
|
|
+ let isArray = Array.isArray(this.$refs.tree)
|
|
|
+ if (isArray) {
|
|
|
+ // 根据 id 获取节点信息
|
|
|
+ this.$refs.tree[0].setCurrentKey(paramsId);
|
|
|
+ } else {
|
|
|
+ this.$refs.tree.setCurrentKey(paramsId);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.getNodeDetail(this.fromcurNode)
|
|
|
+ this.getNodeDetailComp(this.fromcurNode)
|
|
|
})
|
|
|
})
|
|
|
}
|