Browse Source

修正模板 思维查看器和矩阵编辑器返回列表时丢失状态的问题

master
unknown 4 years ago
parent
commit
0f15c8ed6d
3 changed files with 29 additions and 6 deletions
  1. +11
    -6
      src/views/manage_system/template/index.vue
  2. +9
    -0
      src/views/manage_system/template/matrix.vue
  3. +9
    -0
      src/views/manage_system/template/mind.vue

+ 11
- 6
src/views/manage_system/template/index.vue View File

@@ -2116,14 +2116,19 @@ export default {
{ label: "总体概况", id: "default", data: {} }, { label: "总体概况", id: "default", data: {} },
].concat(tree); ].concat(tree);
this.listTemplateTree = listTemplateTree; this.listTemplateTree = listTemplateTree;
setTimeout(() => {
this.$refs.tree.setCurrentKey('default');
}, 0);
if (this.$route.params.data != undefined) { if (this.$route.params.data != undefined) {
const targetTemlate = this.$route.params.data;
// 从思维导图页面返回时加载原来选中模板 // 从思维导图页面返回时加载原来选中模板
this.getTempNameAndData(this.$route.params.data);
this.getTempNameAndData(targetTemlate);
setTimeout(() => {
this.$refs.tree.setCurrentKey(targetTemlate.id || 'default');
}, 0);
} else { } else {
this.getTempNameAndData(listTemplateTree[0]); this.getTempNameAndData(listTemplateTree[0]);
setTimeout(() => {
this.$refs.tree.setCurrentKey('default');
}, 0);
} }
// debugger; // debugger;
// var thisApp = this; // var thisApp = this;
@@ -3384,7 +3389,7 @@ export default {
params: { params: {
name: this.templateName, name: this.templateName,
id: this.templateID, id: this.templateID,
// data: this.treeMenuClickData,
data: this.treeMenuClickData,
}, },
}); });
}, },
@@ -3394,7 +3399,7 @@ export default {
params: { params: {
name: this.templateName, name: this.templateName,
id: this.templateID, id: this.templateID,
// data: this.treeMenuClickData,
data: this.treeMenuClickData,
} }
}); });
}, },


+ 9
- 0
src/views/manage_system/template/matrix.vue View File

@@ -13,6 +13,7 @@
theme="white" theme="white"
:title="topNodeName" :title="topNodeName"
backBtnTitle="退出矩阵编辑器" backBtnTitle="退出矩阵编辑器"
:onBackBtnClick="onBackBtnClick"
/> />
<section class="title_section mt-10"> <section class="title_section mt-10">
<div class="EC_col_8"> <div class="EC_col_8">
@@ -277,6 +278,14 @@ export default {
}, },
//方法 //方法
methods: { methods: {
onBackBtnClick() {
this.$router.push({
name: "system_template",
params: {
data: this.$route.params.data,
},
})
},
/** /**
* 查看矩阵 * 查看矩阵
*/ */


+ 9
- 0
src/views/manage_system/template/mind.vue View File

@@ -13,6 +13,7 @@
theme="white" theme="white"
:title="tempName" :title="tempName"
backBtnTitle="退出思维导图查看器" backBtnTitle="退出思维导图查看器"
:onBackBtnClick="onBackBtnClick"
/> />
<section class="yiyun_section"> <section class="yiyun_section">
<div> <div>
@@ -91,6 +92,14 @@
}, },
watch: {}, watch: {},
methods: { methods: {
onBackBtnClick() {
this.$router.push({
name: "system_template",
params: {
data: this.$route.params.data,
},
})
},
filterCurrentTemplate(templateList) { filterCurrentTemplate(templateList) {
const currentTemplateId = this.tempId; const currentTemplateId = this.tempId;
return templateList.filter(temp => temp.Id !== currentTemplateId); return templateList.filter(temp => temp.Id !== currentTemplateId);


Loading…
Cancel
Save