|
@@ -194,6 +194,8 @@
|
|
|
class="filter-tree"
|
|
|
show-checkbox :check-strictly="true"
|
|
|
@check="handleCheckChange"
|
|
|
+ :default-expanded-keys="defaultExpandedKeys1"
|
|
|
+ :current-node-key="curreenttid1"
|
|
|
>
|
|
|
<div class="custom-tree-node" slot-scope="{ node, data }" @mouseover="mouseOver(data)" style="flex: 1;width: 100%;justify-content: flex-start;"
|
|
|
@mouseleave="mouseLeave(data)">
|
|
@@ -212,7 +214,7 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
- @click.stop="() => viewConfig(data)">
|
|
|
+ @click.stop="() => viewConfig(data,node)">
|
|
|
查看配置
|
|
|
</el-button>
|
|
|
<el-link @click.stop="removeArchive(data)" type="danger" :underline="false" class="marleft10"><i class="el-icon-delete"></i></el-link>
|
|
@@ -956,8 +958,10 @@ export default {
|
|
|
menuleft:20,
|
|
|
menutop:0,
|
|
|
defaultExpandedKeys:[],
|
|
|
+ defaultExpandedKeys1:[],
|
|
|
expandName: this.$route.fullPath,
|
|
|
- curreenttid:''
|
|
|
+ curreenttid:'',
|
|
|
+ curreenttid1:''
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -1043,8 +1047,10 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
|
|
|
- async viewConfig(data){
|
|
|
+ async viewConfig(data,node){
|
|
|
console.log(data,'查看配置');
|
|
|
+ //获取节点展开路径
|
|
|
+ this.getExpandedKeys1(node);
|
|
|
this.configInfo = null;
|
|
|
const { data: res } = await getArchiveAutoRule({
|
|
|
nodeId:data.id,//归档树节点的id 或者 挂载wbs节点的ID(具体哪个ID待定)
|
|
@@ -1204,6 +1210,20 @@ export default {
|
|
|
});
|
|
|
//console.log(expandedKeys)
|
|
|
},
|
|
|
+ getExpandedKeys1(node) {
|
|
|
+ //console.log(node)
|
|
|
+ let expandedKeys = [];
|
|
|
+ while (node.parent) {
|
|
|
+ expandedKeys.push(node.data.id);
|
|
|
+ node = node.parent;
|
|
|
+ }
|
|
|
+ setStore({
|
|
|
+ name: 'configkey',
|
|
|
+ content: expandedKeys,
|
|
|
+ type: true, //sessionStorage
|
|
|
+ });
|
|
|
+ //console.log(expandedKeys)
|
|
|
+ },
|
|
|
nodeClick(data,node){
|
|
|
//获取节点展开路径
|
|
|
this.getExpandedKeys(node);
|
|
@@ -1676,6 +1696,7 @@ export default {
|
|
|
type: 'success',
|
|
|
message: '设置成功'
|
|
|
})
|
|
|
+ this.treeIdChange(this.treeSelectId)
|
|
|
this.highVisible = false;
|
|
|
}
|
|
|
},
|
|
@@ -1803,6 +1824,8 @@ export default {
|
|
|
projectId:0
|
|
|
})
|
|
|
this.defaultExpandedKeys = getStore({ name: this.expandName });
|
|
|
+ this.defaultExpandedKeys1 = getStore({ name: 'configkey' });
|
|
|
+ this.curreenttid1= getStore({ name:'curreenttid1' });
|
|
|
this.curreenttid= getStore({ name:'curreenttid' });
|
|
|
console.log( this.curreenttid,' this.curreenttid');
|
|
|
this.archiveTreetree4()//全加载左侧树
|