Commit 2cddc99b by lianyang

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

parent 228ee2ae
......@@ -142,22 +142,21 @@ export default {
},
methods: {
...Event,
handleChange(tab){
handleChange(names){
// console.log(names);//激活的(展开的)面板的name数组集合
if (this.isInDisplay) {
return
}
// let name = tab.name
const nms = tab.split(",")
const arr = []
for (let i = 0; i < nms.length; i++) {
const n = nms[i];
const path = tabNameToRulePathMapping[n]
for (let i = 0; i < names.length; i++) {
const n = names[i];
const path = tabNameToRulePathMapping[n]//取出激活/展开面板name对应的rulePath
if (path) {
arr.push(path)
}
}
let rulePath = arr.join(",");
// let rulePath = arr[arr.length-1]//取最后一个展开的面板的rulePath
let rulePath = arr.join(",");//把arr数组加入逗号分割,变成字符串
// if (name === "conp") {
// rulePath = "cfagit.recp.conp";
// }
......@@ -179,15 +178,14 @@ export default {
// if(name === "detp"){
// rulePath = "gitp.detp"
// }
if (!!rulePath) {
if (rulePath) {//rulePath不为空串
this.executeRule(rulePath).then((res) => {
if (res.respCode == SUCCESS) {
this.updateModel(res.data);
}
});
}
}
},
},
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