flx:优化
This commit is contained in:
parent
a0e0c495c6
commit
2e4d719de6
@ -116,12 +116,23 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const find = this.$store.state.menuList.find(item => item.path == "/project/safeSame/inspectionLedger");
|
||||
const find = this.$store.state.menuList.find(
|
||||
(item) => item.path == "/project/safeSame/inspectionLedger"
|
||||
);
|
||||
if (find) {
|
||||
const findAction = ['inspectionLedger_rectificationRecord', 'inspectionLedger_myToDoList', 'inspectionLedger_pendingReview', 'inspectionLedger_myHiddenTrouble', 'inspectionLedger_hazardousWorkDistribution', 'inspectionLedger_hiddenDangerAnalysis'];
|
||||
const findIndex = findAction.findIndex(item => find.actionList.some(i => i.actionCode == item));
|
||||
const findAction = [
|
||||
"inspectionLedger_rectificationRecord",
|
||||
"inspectionLedger_myToDoList",
|
||||
"inspectionLedger_pendingReview",
|
||||
"inspectionLedger_myHiddenTrouble",
|
||||
"inspectionLedger_hazardousWorkDistribution",
|
||||
"inspectionLedger_hiddenDangerAnalysis",
|
||||
];
|
||||
const findIndex = findAction.findIndex((item) =>
|
||||
find.actionList.some((i) => i.actionCode == item)
|
||||
);
|
||||
this.activeIndex = `${findIndex + 1}`;
|
||||
console.log(447788, find.actionList, findIndex)
|
||||
console.log(447788, find.actionList, findIndex);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user