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