Commit 2cddc99b by lianyang

gitopn保函激活/展开面板触发切换标签页事件handleChange方法实现

parent 228ee2ae
...@@ -142,22 +142,21 @@ export default { ...@@ -142,22 +142,21 @@ export default {
}, },
methods: { methods: {
...Event, ...Event,
handleChange(tab){ handleChange(names){
// console.log(names);//激活的(展开的)面板的name数组集合
if (this.isInDisplay) { if (this.isInDisplay) {
return return
} }
// let name = tab.name
const nms = tab.split(",")
const arr = [] const arr = []
for (let i = 0; i < nms.length; i++) { for (let i = 0; i < names.length; i++) {
const n = nms[i]; const n = names[i];
const path = tabNameToRulePathMapping[n] const path = tabNameToRulePathMapping[n]//取出激活/展开面板name对应的rulePath
if (path) { if (path) {
arr.push(path) arr.push(path)
} }
} }
let rulePath = arr.join(","); // let rulePath = arr[arr.length-1]//取最后一个展开的面板的rulePath
let rulePath = arr.join(",");//把arr数组加入逗号分割,变成字符串
// if (name === "conp") { // if (name === "conp") {
// rulePath = "cfagit.recp.conp"; // rulePath = "cfagit.recp.conp";
// } // }
...@@ -179,15 +178,14 @@ export default { ...@@ -179,15 +178,14 @@ export default {
// if(name === "detp"){ // if(name === "detp"){
// rulePath = "gitp.detp" // rulePath = "gitp.detp"
// } // }
if (!!rulePath) { if (rulePath) {//rulePath不为空串
this.executeRule(rulePath).then((res) => { this.executeRule(rulePath).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.updateModel(res.data); this.updateModel(res.data);
} }
}); });
} }
} },
}, },
created: function () {}, created: function () {},
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment