no commit message

This commit is contained in:
annnj-home
2026-04-27 22:53:52 +08:00
parent 66ffcb0a50
commit 1cf2a990cc
2 changed files with 27 additions and 54 deletions

View File

@@ -17,9 +17,9 @@
{{ replacePhrases(menuItem.title, replaceRule1) }} {{ replacePhrases(menuItem.title, replaceRule1) }}
</div> </div>
<div v-if="isHuiJiaMenu(menuItem) && unreturnedCount >= 1" class="push-value-badge">{{ unreturnedCount }}</div> <div v-if="isHuiJiaMenu(menuItem) && unreturnedCount >= 1" class="push-value-badge">{{ unreturnedCount }}</div>
<div v-if="isEstimateMenu(menuItem) && estimateCounts.total > 0" class="push-value-badge">{{ estimateCounts.total }}</div> <!-- <div v-if="isEstimateMenu(menuItem) && estimateCounts.total > 0" class="push-value-badge">{{ estimateCounts.total }}</div>-->
<div v-if="isSurveyMenu(menuItem) && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</div> <!-- <div v-if="isSurveyMenu(menuItem) && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</div>-->
<div v-if="isReportMenu(menuItem) && reportProduceCounts.total > 0" class="push-value-badge">{{ reportProduceCounts.total }}</div> <!-- <div v-if="isReportMenu(menuItem) && reportProduceCounts.total > 0" class="push-value-badge">{{ reportProduceCounts.total }}</div>-->
</div> </div>
</template> </template>
</el-menu-item> </el-menu-item>
@@ -94,13 +94,13 @@
console.log('=== 左侧图标菜单调试 ===') console.log('=== 左侧图标菜单调试 ===')
console.log('menuData:', this.menuData) console.log('menuData:', this.menuData)
console.log('estimateCounts初始值:', this.estimateCounts) console.log('estimateCounts初始值:', this.estimateCounts)
// 主动获取所有数量,避免时序问题导致的红点不显示 // 主动获取所有数量,避免时序问题导致的红点不显示
this.fetchUnreturnedCount() this.fetchUnreturnedCount()
this.fetchEstimateCount() this.fetchEstimateCount()
this.fetchSurveyFollowCount() this.fetchSurveyFollowCount()
this.fetchReportCount() this.fetchReportCount()
// 监听EventBus事件 - 未回价数量 // 监听EventBus事件 - 未回价数量
this.eventBusCallback = (count) => { this.eventBusCallback = (count) => {
console.log('=== 未回价EventBus事件 ===', count) console.log('=== 未回价EventBus事件 ===', count)
@@ -153,7 +153,7 @@
} }
EventBus.$on('updateSurveyFollowCount', this.surveyEventBusCallback) EventBus.$on('updateSurveyFollowCount', this.surveyEventBusCallback)
socket.on('updateSurveyFollowCount', this.surveySocketCallback) socket.on('updateSurveyFollowCount', this.surveySocketCallback)
// 监听EventBus事件 - 报告制作数量 // 监听EventBus事件 - 报告制作数量
this.reportEventBusCallback = (counts) => { this.reportEventBusCallback = (counts) => {
console.log('=== 报告EventBus事件 ===', counts) console.log('=== 报告EventBus事件 ===', counts)

View File

@@ -5,22 +5,14 @@
<el-submenu style="height: 100%;" v-if="item.children && item.children.length > 0" :index="item.routerName" > <el-submenu style="height: 100%;" v-if="item.children && item.children.length > 0" :index="item.routerName" >
<template slot="title"> <template slot="title">
{{ item.title }} {{ item.title }}
<!-- 一级菜单回价项目显示未回价数量 -->
<!-- <span v-if="isHuiJiaMenu && unreturnedCount > 0" class="push-value-badge">{{ unreturnedCount }}</span> -->
<!-- 二级菜单未回价显示未回价数量 --> <!-- 二级菜单未回价显示未回价数量 -->
<span v-if="isUnreturnedPriceMenu && unreturnedCount > 0" class="push-value-badge">{{ unreturnedCount }}</span> <span v-if="isUnreturnedPriceMenu && unreturnedCount > 0" class="push-value-badge">{{ unreturnedCount }}</span>
<!-- 一级菜单预估显示预估总数 -->
<!-- <span v-if="isEstimateMenu && estimateCounts.total > 0" class="push-value-badge">{{ estimateCounts.total }}</span> -->
<!-- 二级菜单预估单显示预估总数 --> <!-- 二级菜单预估单显示预估总数 -->
<span v-if="isEstimatePendingMenu && estimateCounts.total > 0" class="push-value-badge">{{ estimateCounts.total }}</span> <!-- <span v-if="isEstimatePendingMenu && estimateCounts.total > 0" class="push-value-badge">{{ estimateCounts.total }}</span>-->
<!-- 一级菜单查勘项目显示查勘跟进中数量 -->
<!-- <span v-if="isSurveyMenu && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</span> -->
<!-- 二级菜单查勘列表显示查勘跟进中数量 --> <!-- 二级菜单查勘列表显示查勘跟进中数量 -->
<span v-if="isSurveyListMenu && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</span> <!-- <span v-if="isSurveyListMenu && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</span>-->
<!-- 一级菜单报告项目显示报告总数 -->
<!-- <span v-if="isReportMenu && reportProduceCounts.total > 0" class="push-value-badge">{{ reportProduceCounts.total }}</span> -->
<!-- 二级菜单报告制作显示报告总数 --> <!-- 二级菜单报告制作显示报告总数 -->
<span v-if="isReportProduceMenu && reportProduceCounts.total > 0" class="push-value-badge">{{ reportProduceCounts.total }}</span> <!-- <span v-if="isReportProduceMenu && reportProduceCounts.total > 0" class="push-value-badge">{{ reportProduceCounts.total }}</span>-->
</template> </template>
<!-- 递归调用MenuItem组件 --> <!-- 递归调用MenuItem组件 -->
<menu-item v-for="(child, index) in item.children" :key="index" :item="child" class="menu-custom"></menu-item> <menu-item v-for="(child, index) in item.children" :key="index" :item="child" class="menu-custom"></menu-item>
@@ -32,21 +24,21 @@
<!-- 三级菜单未回价列表显示未回价数量 --> <!-- 三级菜单未回价列表显示未回价数量 -->
<span v-if="isUnreturnedPriceListMenu && unreturnedCount > 0" class="push-value-badge">{{ unreturnedCount }}</span> <span v-if="isUnreturnedPriceListMenu && unreturnedCount > 0" class="push-value-badge">{{ unreturnedCount }}</span>
<!-- 三级菜单待制作(预估)显示预估待制作数量 --> <!-- 三级菜单待制作(预估)显示预估待制作数量 -->
<span v-if="isEstimatePendingListMenu && estimateCounts.pending > 0" class="push-value-badge">{{ estimateCounts.pending }}</span> <!-- <span v-if="isEstimatePendingListMenu && estimateCounts.pending > 0" class="push-value-badge">{{ estimateCounts.pending }}</span>-->
<!-- 三级菜单二审待制作(预估)显示预估二审数量 --> <!-- 三级菜单二审待制作(预估)显示预估二审数量 -->
<span v-if="isSecondReviewListMenu && estimateCounts.secondReview > 0" class="push-value-badge">{{ estimateCounts.secondReview }}</span> <!-- <span v-if="isSecondReviewListMenu && estimateCounts.secondReview > 0" class="push-value-badge">{{ estimateCounts.secondReview }}</span>-->
<!-- 三级菜单三审待制作(预估)显示预估三审数量 --> <!-- 三级菜单三审待制作(预估)显示预估三审数量 -->
<span v-if="isThirdReviewListMenu && estimateCounts.thirdReview > 0" class="push-value-badge">{{ estimateCounts.thirdReview }}</span> <!-- <span v-if="isThirdReviewListMenu && estimateCounts.thirdReview > 0" class="push-value-badge">{{ estimateCounts.thirdReview }}</span>-->
<!-- 三级菜单待签章(预估)显示预估待签章数量 --> <!-- 三级菜单待签章(预估)显示预估待签章数量 -->
<span v-if="isSignListMenu && estimateCounts.sign > 0" class="push-value-badge">{{ estimateCounts.sign }}</span> <!-- <span v-if="isSignListMenu && estimateCounts.sign > 0" class="push-value-badge">{{ estimateCounts.sign }}</span>-->
<!-- 三级菜单跟进中(查勘)显示查勘跟进中数量 --> <!-- 三级菜单跟进中(查勘)显示查勘跟进中数量 -->
<span v-if="isSurveyFollowMenu && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</span> <!-- <span v-if="isSurveyFollowMenu && surveyFollowCount > 0" class="push-value-badge">{{ surveyFollowCount }}</span>-->
<!-- 三级菜单待制作(报告)显示报告待制作数量 --> <!-- 三级菜单待制作(报告)显示报告待制作数量 -->
<span v-if="isReportPendingMenu && reportProduceCounts.pending > 0" class="push-value-badge">{{ reportProduceCounts.pending }}</span> <!-- <span v-if="isReportPendingMenu && reportProduceCounts.pending > 0" class="push-value-badge">{{ reportProduceCounts.pending }}</span>-->
<!-- 三级菜单二审待制作(报告)显示报告二审待制作数量 --> <!-- 三级菜单二审待制作(报告)显示报告二审待制作数量 -->
<span v-if="isReportSecondReviewMenu && reportProduceCounts.secondReview > 0" class="push-value-badge">{{ reportProduceCounts.secondReview }}</span> <!-- <span v-if="isReportSecondReviewMenu && reportProduceCounts.secondReview > 0" class="push-value-badge">{{ reportProduceCounts.secondReview }}</span>-->
<!-- 三级菜单三审待制作(报告)显示报告三审待制作数量 --> <!-- 三级菜单三审待制作(报告)显示报告三审待制作数量 -->
<span v-if="isReportThirdReviewMenu && reportProduceCounts.thirdReview > 0" class="push-value-badge">{{ reportProduceCounts.thirdReview }}</span> <!-- <span v-if="isReportThirdReviewMenu && reportProduceCounts.thirdReview > 0" class="push-value-badge">{{ reportProduceCounts.thirdReview }}</span>-->
</el-menu-item> </el-menu-item>
</div> </div>
</template> </template>
@@ -100,7 +92,7 @@
// ==================== 预估项目 ==================== // ==================== 预估项目 ====================
// 判断是否是一级菜单【预估】- 只有当不是预估单时才匹配 // 判断是否是一级菜单【预估】- 只有当不是预估单时才匹配
isEstimateMenu() { isEstimateMenu() {
return (this.item.routerName === 'estimate' || this.item.title === '预估') && return (this.item.routerName === 'estimate' || this.item.title === '预估') &&
!this.isEstimatePendingMenu !this.isEstimatePendingMenu
}, },
// 判断是否是二级菜单【预估单】 // 判断是否是二级菜单【预估单】
@@ -124,7 +116,7 @@
}, },
// 判断是否是三级菜单【待签章】(预估) // 判断是否是三级菜单【待签章】(预估)
isSignListMenu() { isSignListMenu() {
return this.item.routerName === 'estimateMake-estimateWaitSignSignList' || return this.item.routerName === 'estimateMake-estimateWaitSignSignList' ||
this.item.routerName && this.item.routerName.includes('estimateWaitSignSignList') || this.item.routerName && this.item.routerName.includes('estimateWaitSignSignList') ||
this.item.title === '待签章' this.item.title === '待签章'
}, },
@@ -132,9 +124,9 @@
// ==================== 查勘项目 ==================== // ==================== 查勘项目 ====================
// 判断是否是一级菜单【查勘项目】 // 判断是否是一级菜单【查勘项目】
isSurveyMenu() { isSurveyMenu() {
return this.item.routerName === 'surveyManage-surveyManage' || return this.item.routerName === 'surveyManage-surveyManage' ||
this.item.routerName === 'survey' || this.item.routerName === 'survey' ||
this.item.title === '查勘项目' || this.item.title === '查勘项目' ||
this.item.title === '查勘' this.item.title === '查勘'
}, },
// 判断是否是二级菜单【查勘列表】 // 判断是否是二级菜单【查勘列表】
@@ -151,7 +143,7 @@
// ==================== 报告项目 ==================== // ==================== 报告项目 ====================
// 判断是否是一级菜单【报告项目】 // 判断是否是一级菜单【报告项目】
// isReportMenu() { // isReportMenu() {
// return this.item.routerName === 'report' || // return this.item.routerName === 'report' ||
// this.item.title === '报告项目' || // this.item.title === '报告项目' ||
// this.item.title === '报告制作' // this.item.title === '报告制作'
// }, // },
@@ -176,32 +168,13 @@
mounted() { 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.fetchEstimateCount()
// 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()
// }
// 查勘相关菜单 - 包含查勘模块下的所有菜单 // 查勘相关菜单 - 包含查勘模块下的所有菜单
// if (this.isSurveyMenu || this.isSurveyListMenu || this.isSurveyFollowMenu || this.fetchSurveyFollowCount()
// this.item.title === '查勘项目' || this.item.title === '查勘' ||
// this.item.title === '查勘列表' || this.item.title === '跟进中') {
this.fetchSurveyFollowCount()
// }
// 报告相关菜单 - 包含报告模块下的所有菜单 // 报告相关菜单 - 包含报告模块下的所有菜单
// if (this.isReportMenu || this.isReportProduceMenu || this.isReportPendingMenu || this.isReportSecondReviewMenu || this.isReportThirdReviewMenu || this.fetchReportCount()
// 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.eventBusCallback = (count) => { this.eventBusCallback = (count) => {
@@ -374,4 +347,4 @@
margin-left: 8px; margin-left: 8px;
margin-top: 4px; margin-top: 4px;
} }
</style> </style>