From 1cf2a990cc89971e3dcc4c8c06ddbfc561d714ae Mon Sep 17 00:00:00 2001 From: annnj-home <380904787@qq.com> Date: Mon, 27 Apr 2026 22:53:52 +0800 Subject: [PATCH] no commit message --- pgweb/src/components/menu/nxIconMenu.vue | 12 ++--- pgweb/src/components/menu/nxMenu.vue | 69 ++++++++---------------- 2 files changed, 27 insertions(+), 54 deletions(-) diff --git a/pgweb/src/components/menu/nxIconMenu.vue b/pgweb/src/components/menu/nxIconMenu.vue index cfe24fd..0273f02 100644 --- a/pgweb/src/components/menu/nxIconMenu.vue +++ b/pgweb/src/components/menu/nxIconMenu.vue @@ -17,9 +17,9 @@ {{ replacePhrases(menuItem.title, replaceRule1) }}
{{ unreturnedCount }}
-
{{ estimateCounts.total }}
-
{{ surveyFollowCount }}
-
{{ reportProduceCounts.total }}
+ + + @@ -94,13 +94,13 @@ console.log('=== 左侧图标菜单调试 ===') console.log('menuData:', this.menuData) console.log('estimateCounts初始值:', this.estimateCounts) - + // 主动获取所有数量,避免时序问题导致的红点不显示 this.fetchUnreturnedCount() this.fetchEstimateCount() this.fetchSurveyFollowCount() this.fetchReportCount() - + // 监听EventBus事件 - 未回价数量 this.eventBusCallback = (count) => { console.log('=== 未回价EventBus事件 ===', count) @@ -153,7 +153,7 @@ } EventBus.$on('updateSurveyFollowCount', this.surveyEventBusCallback) socket.on('updateSurveyFollowCount', this.surveySocketCallback) - + // 监听EventBus事件 - 报告制作数量 this.reportEventBusCallback = (counts) => { console.log('=== 报告EventBus事件 ===', counts) diff --git a/pgweb/src/components/menu/nxMenu.vue b/pgweb/src/components/menu/nxMenu.vue index 87484ff..be5f7c2 100644 --- a/pgweb/src/components/menu/nxMenu.vue +++ b/pgweb/src/components/menu/nxMenu.vue @@ -5,22 +5,14 @@ @@ -32,21 +24,21 @@ {{ unreturnedCount }} - {{ estimateCounts.pending }} + - {{ estimateCounts.secondReview }} + - {{ estimateCounts.thirdReview }} + - {{ estimateCounts.sign }} + - {{ surveyFollowCount }} + - {{ reportProduceCounts.pending }} + - {{ reportProduceCounts.secondReview }} + - {{ reportProduceCounts.thirdReview }} + @@ -100,7 +92,7 @@ // ==================== 预估项目 ==================== // 判断是否是一级菜单【预估】- 只有当不是预估单时才匹配 isEstimateMenu() { - return (this.item.routerName === 'estimate' || this.item.title === '预估') && + return (this.item.routerName === 'estimate' || this.item.title === '预估') && !this.isEstimatePendingMenu }, // 判断是否是二级菜单【预估单】 @@ -124,7 +116,7 @@ }, // 判断是否是三级菜单【待签章】(预估) isSignListMenu() { - return this.item.routerName === 'estimateMake-estimateWaitSignSignList' || + return this.item.routerName === 'estimateMake-estimateWaitSignSignList' || this.item.routerName && this.item.routerName.includes('estimateWaitSignSignList') || this.item.title === '待签章' }, @@ -132,9 +124,9 @@ // ==================== 查勘项目 ==================== // 判断是否是一级菜单【查勘项目】 isSurveyMenu() { - return this.item.routerName === 'surveyManage-surveyManage' || + return this.item.routerName === 'surveyManage-surveyManage' || this.item.routerName === 'survey' || - this.item.title === '查勘项目' || + this.item.title === '查勘项目' || this.item.title === '查勘' }, // 判断是否是二级菜单【查勘列表】 @@ -151,7 +143,7 @@ // ==================== 报告项目 ==================== // 判断是否是一级菜单【报告项目】 // isReportMenu() { - // return this.item.routerName === 'report' || + // return this.item.routerName === 'report' || // this.item.title === '报告项目' || // this.item.title === '报告制作' // }, @@ -176,32 +168,13 @@ mounted() { // 获取所有数据,确保每个菜单项都能显示正确的数值 // 回价相关菜单 - // if (this.isHuiJiaMenu || this.isUnreturnedPriceMenu || this.isUnreturnedPriceListMenu) { - this.fetchUnreturnedCount() - // } + this.fetchUnreturnedCount() // 预估相关菜单 - 包含预估模块下的所有菜单 - // if (this.isEstimateMenu || this.isEstimatePendingMenu || this.isEstimatePendingListMenu || this.isSecondReviewListMenu || this.isThirdReviewListMenu || this.isSignListMenu || - // this.item.title === '预估' || this.item.title === '预估单' || - // (this.item.title === '待制作' && this.item.parentName === '预估单') || - // (this.item.title && this.item.title.includes('二审') && this.item.parentName === '预估单') || - // (this.item.title && this.item.title.includes('三审') && this.item.parentName === '预估单') || - // this.item.title === '待签章') { - this.fetchEstimateCount() - // } + this.fetchEstimateCount() // 查勘相关菜单 - 包含查勘模块下的所有菜单 - // if (this.isSurveyMenu || this.isSurveyListMenu || this.isSurveyFollowMenu || - // this.item.title === '查勘项目' || this.item.title === '查勘' || - // this.item.title === '查勘列表' || this.item.title === '跟进中') { - this.fetchSurveyFollowCount() - // } + this.fetchSurveyFollowCount() // 报告相关菜单 - 包含报告模块下的所有菜单 - // if (this.isReportMenu || this.isReportProduceMenu || this.isReportPendingMenu || this.isReportSecondReviewMenu || this.isReportThirdReviewMenu || - // this.item.title === '报告项目' || this.item.title === '报告制作' || - // (this.item.title === '待制作' && this.item.parentName === '报告制作') || - // (this.item.title && this.item.title.includes('二审') && this.item.parentName === '报告制作') || - // (this.item.title && this.item.title.includes('三审') && this.item.parentName === '报告制作')) { - this.fetchReportCount() - // } + this.fetchReportCount() // 保存回调引用用于销毁时移除 this.eventBusCallback = (count) => { @@ -374,4 +347,4 @@ margin-left: 8px; margin-top: 4px; } - \ No newline at end of file +