From 2e4d719de61e20f43b1b342ef8b06a8de0b44bc3 Mon Sep 17 00:00:00 2001 From: Rain_ <904416525@qq.com> Date: Fri, 28 Nov 2025 16:16:30 +0800 Subject: [PATCH] =?UTF-8?q?flx:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safeSame/hiddenDangerManage.vue | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/views/projectFront/safeSame/hiddenDangerManage.vue b/src/views/projectFront/safeSame/hiddenDangerManage.vue index 521ade1e..1e492a4c 100644 --- a/src/views/projectFront/safeSame/hiddenDangerManage.vue +++ b/src/views/projectFront/safeSame/hiddenDangerManage.vue @@ -116,12 +116,23 @@ export default { }; }, created() { - 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 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) + ); this.activeIndex = `${findIndex + 1}`; - console.log(447788, find.actionList, findIndex) + console.log(447788, find.actionList, findIndex); } }, methods: {