代码调整
This commit is contained in:
parent
bae7270755
commit
0f8643591c
@ -121,6 +121,7 @@ export default {
|
|||||||
return section.cutOff === 1;
|
return section.cutOff === 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
roleDisabled: this.work === 'dispatchWork',
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -134,6 +135,7 @@ export default {
|
|||||||
return section.cutOff !== 1;
|
return section.cutOff !== 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
roleDisabled: this.work === 'dispatchWork',
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -196,7 +198,10 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
const status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
|
let status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
|
||||||
|
if (menuItem.roleDisabled) {
|
||||||
|
status = true;
|
||||||
|
}
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
|
||||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user