no commit message

This commit is contained in:
annnj-company
2026-04-27 10:10:35 +08:00
parent 68a0b1ab22
commit 6fc3e6b64f
19 changed files with 1058 additions and 64 deletions

View File

@@ -26,7 +26,7 @@
import homePage from './components/message'
import { connectSocket } from '@/libs/socket'
import { EventBus } from '@/libs/eventBus'
import { getUnreturnedPriceCount } from '@/api/businessManage/inquiry'
import { getUnreturnedPriceCount, getEstimatePendingCount, getSurveyFollowCount } from '@/api/businessManage/inquiry'
export default {
components: { homePage },
mounted() {
@@ -35,6 +35,10 @@ export default {
// 获取未回价数量
this.getUnreturnedPriceCountData()
// 获取预估制作数量
this.getEstimatePendingCountData()
// 获取查勘跟进中数量
this.getSurveyFollowCountData()
},
methods: {
// 获取未回价数量
@@ -50,6 +54,41 @@ export default {
} catch (error) {
console.error('获取未回价数量失败:', error)
}
},
// 获取预估制作数量
async getEstimatePendingCountData() {
try {
const response = await getEstimatePendingCount()
if (response && response.code === 1) {
const data = response.data || {}
const counts = {
pending: data.pending || 0,
secondReview: data.secondReview || 0,
thirdReview: data.thirdReview || 0,
sign: data.sign || 0,
total: data.total || 0
}
console.log('预估制作数量:', counts)
// 通过事件总线传递数量给菜单组件
EventBus.$emit('updateEstimatePendingCount', counts)
}
} catch (error) {
console.error('获取预估制作数量失败:', error)
}
},
// 获取查勘跟进中数量
async getSurveyFollowCountData() {
try {
const response = await getSurveyFollowCount()
if (response && response.code === 1) {
const count = response.data.count || 0
console.log('查勘跟进中数量:', count)
// 通过事件总线传递数量给菜单组件
EventBus.$emit('updateSurveyFollowCount', count)
}
} catch (error) {
console.error('获取查勘跟进中数量失败:', error)
}
}
}
}