Commit a774950d by Lin

refactor(reception): 更新接待中心组件以优化性能数据和列表展示

- 修改 performanceTypeList 函数,更新性能类型列表
- 注释掉硬编码的模拟数据,改为调用 getPerformanceData 函数
- 引入 CustomEmpty 组件以改善空状态展示
1 parent c6dcd07e
...@@ -82,6 +82,7 @@ import { ref, computed, onMounted, nextTick, watch } from 'vue' ...@@ -82,6 +82,7 @@ import { ref, computed, onMounted, nextTick, watch } from 'vue'
import { findVisitsInfo } from '@/api/receiption.uts' import { findVisitsInfo } from '@/api/receiption.uts'
import { getMaterialResponsePage } from '@/api/customer-api.uts' import { getMaterialResponsePage } from '@/api/customer-api.uts'
import { storage } from '@/utils/storage.uts' import { storage } from '@/utils/storage.uts'
import CustomEmpty from '@/components/CustomEmpty/index.uvue'
const GOODS_PLACEHOLDER_IMAGE = 'https://dummyimage.com/320x200/f3f6ff/94a3b8.png&text=%E6%9A%82%E6%97%A0%E5%9B%BE' const GOODS_PLACEHOLDER_IMAGE = 'https://dummyimage.com/320x200/f3f6ff/94a3b8.png&text=%E6%9A%82%E6%97%A0%E5%9B%BE'
......
...@@ -359,9 +359,13 @@ function performanceTypeList(): UnPickerColumn { ...@@ -359,9 +359,13 @@ function performanceTypeList(): UnPickerColumn {
{ label: '鸿蒙', value: 2 }, { label: '鸿蒙', value: 2 },
] ]
} else { } else {
// list = [
// { label: '延保', value: 1 },
// { label: '权益', value: 3 },
// ]
list = [ list = [
{ label: '延保', value: 1 }, { label: '问界', value: 1 },
{ label: '权益', value: 3 }, { label: '鸿蒙', value: 2 },
] ]
} }
// 对象字面量需显式断言为 UnPickerColumnItem,否则 UTS 会推断为 UTSJSONObject // 对象字面量需显式断言为 UnPickerColumnItem,否则 UTS 会推断为 UTSJSONObject
...@@ -1175,25 +1179,25 @@ onMounted(() => { ...@@ -1175,25 +1179,25 @@ onMounted(() => {
void getCustomerList(false) void getCustomerList(false)
void getReceptionRecordList(false) void getReceptionRecordList(false)
// 硬编码模拟数据展示 // 硬编码模拟数据展示
performanceData.value = { // performanceData.value = {
cumulativeDeliveryCount: 128, // cumulativeDeliveryCount: 128,
actualContactCount: 96, // actualContactCount: 96,
contactRate: 75, // contactRate: 75,
achievementRatio: 85.5, // achievementRatio: 85.5,
excellentStoreAvgDealRate: 42, // excellentStoreAvgDealRate: 42,
thisStoreDealRate: 38, // thisStoreDealRate: 38,
personalDealRate: 35, // personalDealRate: 35,
actualProduction: 12.8, // actualProduction: 12.8,
personalProduction: 4.2, // personalProduction: 4.2,
excellentStoreAvgDeal: 12500, // excellentStoreAvgDeal: 12500,
thisStoreKdj: 10800, // thisStoreKdj: 10800,
personalKdj: 9500, // personalKdj: 9500,
targetProduction: 199, // targetProduction: 199,
productionContribution: 100, // productionContribution: 100,
} as UTSJSONObject // } as UTSJSONObject
// 接口请求:成功后覆盖模拟数据;失败则保留模拟兜底 // 接口请求:成功后覆盖模拟数据;失败则保留模拟兜底
// getPerformanceData() getPerformanceData()
// syncReceptionDashboardLayout() // syncReceptionDashboardLayout()
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!