diff --git a/dist.zip b/dist.zip index e9adab6..03f8c2f 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/page/index/components/BrandDetail/BrandDetail.vue b/src/page/index/components/BrandDetail/BrandDetail.vue index 4b21cb3..bcddeab 100644 --- a/src/page/index/components/BrandDetail/BrandDetail.vue +++ b/src/page/index/components/BrandDetail/BrandDetail.vue @@ -14,6 +14,7 @@ import { onBeforeUnmount, onMounted, ref, watch } from 'vue'; import { handleGetBrandStructureAnalysis, handleGetBusinessTradeTree, handleGetCombineBrandList, handleGetFieldEnumTree } from '../../service'; import defaultImg from '../../../../assets/image/defaultImg.png' import brandTotalIcon from '../../../../assets/image/brandTotalIcon.png' +import { el } from 'element-plus/es/locale'; // 注册组件 echarts.use([ @@ -163,7 +164,12 @@ const handleBrandTabList = async () => { if (listData && listData.length > 0) { listData.forEach((item: any) => { - tableList.push({ label: item.AUTOSTATISTICS_NAME, value: item.AUTOSTATISTICS_ID }) + if (item.AUTOSTATISTICS_NAME === '其他') { + + } + else { + tableList.push({ label: item.AUTOSTATISTICS_NAME, value: item.AUTOSTATISTICS_ID }) + } }) } console.log('tableListtableListtableListtableListtableList', tableList); @@ -202,7 +208,7 @@ const handleGetTableData = async (BRAND_INDUSTRY: number) => { const data = await handleGetCombineBrandList(req) // brandListData.value = data.slice(0, 6) - return data.slice(0, 6) + return data.slice(0, 3) } // 切换tab @@ -251,7 +257,7 @@ const handleSetConfig = (res: any) => { // 找到对应的数据项 const dataItem = res.pieData.find((item: any) => item.name === name); // 返回自定义格式 - return `${name} ${dataItem?.value}%`; + return `${name}`; } }, tooltip: { // 新增 tooltip 配置 @@ -261,7 +267,7 @@ const handleSetConfig = (res: any) => { }, formatter: function (params: any) { // 自定义提示框内容 return ` -
${params.name} ${params?.percent}%
+
${params.name} ${params.value}家 ${params?.percent}%
`; } }, diff --git a/src/page/index/components/CoreBusinessData/CoreBusinessData.vue b/src/page/index/components/CoreBusinessData/CoreBusinessData.vue index fe3b218..c72fd1c 100644 --- a/src/page/index/components/CoreBusinessData/CoreBusinessData.vue +++ b/src/page/index/components/CoreBusinessData/CoreBusinessData.vue @@ -41,12 +41,6 @@ let chargingCycles = ref({ // 防止重复调用的标志 let isFetching = ref(false) -// 定时器变量 - 为不同业务类型设置单独的定时器 -let revenueTimer: any = null // 门店营收定时器 -let chargingTimer: any = null // 充电定时器 -let waterTimer: any = null // 加水定时器 -let ureaTimer: any = null // 尿素定时器 -let oilTimer: any = null // 油品定时器 // 切换显示状态:true显示金额,false显示数量 let isShowingAmount = ref(true) @@ -56,9 +50,7 @@ let displaySwitchTimer: any = null onMounted(async () => { await handleGetMapRealData() - // 启动定时更新,每5秒增加1000 - startPeriodicUpdate() - // 启动显示切换定时器 + // 启动显示切换定时器(切换时会更新数据) startDisplaySwitch() }) @@ -75,8 +67,6 @@ watch( // 只有当服务区真正发生变化时才重新获取数据 if (newVal?.SERVERPART_ID !== oldVal?.SERVERPART_ID) { handleGetMapRealData() - // 重启定时器,确保在新服务区下也能正常更新 - restartPeriodicUpdate() } }, { deep: true } @@ -118,10 +108,10 @@ const handleGetMapRealData = async () => { // 门店营收 if (item.dataType === 1000) { let obj: any = { - value: parseFloat(handleGetPonitFixed(item.totalAmount)) || 0, + value: handleGetPonitFixed(item.totalAmount) || 0, unit: item.totalAmountUnit || '', - totalCount: parseFloat(handleGetPonitFixed(item.totalCount)) || 0, - totalCountUnit: item.totalCountUnit || '' + totalCount: handleGetPonitFixed(item.totalTicket) || 0, + totalCountUnit: item.totalTicketUnit || '' } // let obj: any = { // value: item.totalAmount.toString().length > 8 ? Number((item.totalAmount / 10000).toFixed(2)).toLocaleString() : Number(item.totalAmount).toLocaleString(), @@ -136,9 +126,9 @@ const handleGetMapRealData = async () => { } else if (item.dataType === 2000) { // 油品消耗 let obj: any = { - value: parseFloat(handleGetPonitFixed(item.totalAmount)) || 0, + value: handleGetPonitFixed(item.totalAmount) || 0, unit: item.totalAmountUnit || '', - totalCount: parseFloat(handleGetPonitFixed(item.totalCount)) || 0, + totalCount: handleGetPonitFixed(item.totalCount) || 0, totalCountUnit: item.totalCountUnit || '', } // let obj: any = { @@ -152,9 +142,9 @@ const handleGetMapRealData = async () => { } else if (item.dataType === 3000) { // 加水量 let obj: any = { - value: parseFloat(handleGetPonitFixed(item.totalAmount)) || 0, + value: handleGetPonitFixed(item.totalAmount) || 0, unit: item.totalAmountUnit || '', - totalCount: parseFloat(handleGetPonitFixed(item.totalCount)) || 0, + totalCount: handleGetPonitFixed(item.totalCount) || 0, totalCountUnit: item.totalCountUnit || '', } // let obj: any = { @@ -168,9 +158,9 @@ const handleGetMapRealData = async () => { } else if (item.dataType === 4000) { // 尿素 let obj: any = { - value: parseFloat(handleGetPonitFixed(item.totalAmount)) || 0, + value: handleGetPonitFixed(item.totalAmount) || 0, unit: item.totalAmountUnit || '', - totalCount: parseFloat(handleGetPonitFixed(item.totalCount)) || 0, + totalCount: handleGetPonitFixed(item.totalCount) || 0, totalCountUnit: item.totalCountUnit || '', } // let obj: any = { @@ -184,10 +174,10 @@ const handleGetMapRealData = async () => { } else if (item.dataType === 5000) { // 充电次数 let obj: any = { - value: parseFloat(handleGetPonitFixed(item.totalAmount)) || 0, + value: handleGetPonitFixed(item.totalAmount) || 0, unit: item.totalAmountUnit || '', - totalCount: parseFloat(handleGetPonitFixed(item.totalCount)) || 0, - totalCountUnit: item.totalCountUnit || '', + totalCount: handleGetPonitFixed(item.totalTicket) || 0, + totalCountUnit: item.totalTicketUnit || '', } // let obj: any = { // value: item.totalTicket.toString().length > 8 ? Number((item.totalTicket / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(), @@ -307,177 +297,158 @@ const getRandomInterval = (minSeconds: number, maxSeconds: number): number => { return Math.floor(Math.random() * (maxSeconds - minSeconds + 1) + minSeconds) * 1000 } -// 门店营收更新:1-5秒内金额随机1-100元(主区间15-25元,留1位小数) +// 门店营收更新函数 const updateRevenue = () => { - const randomAmount = generateRandomValue(1, 100, 15, 25, 0.7) - console.log('🔍 DEBUG randomAmount:', randomAmount) - // 根据当前显示模式更新不同的字段 if (isShowingAmount.value) { // 显示金额模式 - 更新金额字段 + const randomAmount = generateRandomValue(1, 100, 15, 25, 0.7) const currentValue = parseFloat(revenueAmonut.value.value) || 0 const unit = revenueAmonut.value.unit || '' - const actualAmount = unit.includes('万元') ? randomAmount / 10000 : randomAmount + const actualAmount = unit === '万元' ? randomAmount / 10000 : randomAmount revenueAmonut.value.value = (currentValue + actualAmount) console.log('💰 门店营收金额增加:', actualAmount + unit, '当前总值:', revenueAmonut.value.value) } else { - // 显示数量模式 - 更新数量字段 + // 显示数量模式 - 更新数量字段(假设为订单数) + const orders = Math.random() < 0.7 ? 1 : Math.floor(Math.random() * 4) // 主区间1笔 const currentValue = parseFloat(revenueAmonut.value.totalCount) || 0 const unit = revenueAmonut.value.totalCountUnit || '' - const actualAmount = unit.includes('万单') ? randomAmount / 100 : randomAmount // 假设数量单位是万单 + const actualAmount = unit === '万笔' ? orders / 10000 : orders revenueAmonut.value.totalCount = (currentValue + actualAmount) - console.log('💰 门店营收数量增加:', actualAmount + unit, '当前总值:', revenueAmonut.value.totalCount) + console.log('💰 门店营收数量增加:', actualAmount + unit, `(${orders}笔)`, '当前总值:', revenueAmonut.value.totalCount) } - - // 1-5秒随机间隔 - revenueTimer = setTimeout(updateRevenue, getRandomInterval(1, 5)) } -// 充电更新:1-5秒内,数量随机增加(0-3笔订单,主区间1笔),金额1-100元(主区间15-35元,留两位小数) +// 充电更新函数 const updateCharging = () => { - const orders = Math.random() < 0.7 ? 1 : Math.floor(Math.random() * 4) // 主区间1笔 + const orders = Math.random() < 0.7 ? 1 : Math.floor(Math.random() * 4) // 主区间1笔,范围0-3笔 // 根据当前显示模式更新不同的字段 if (isShowingAmount.value) { // 显示金额模式 - 更新金额字段 - const randomAmount = generateRandomValue(1, 100, 15, 35, 0.7) + const randomAmount = generateRandomValue(1, 100, 15, 35, 0.7) // 金额1-100元,主区间15-35元 const currentValue = parseFloat(chargingCycles.value.value) || 0 const unit = chargingCycles.value.unit || '' - const actualAmount = unit.includes('万元') ? randomAmount / 10000 : randomAmount - chargingCycles.value.value = (currentValue + actualAmount) + const actualAmount = unit === '万元' ? randomAmount / 10000 : randomAmount + chargingCycles.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('⚡ 充电金额增加:', actualAmount + unit, '当前总值:', chargingCycles.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(chargingCycles.value.totalCount) || 0 const unit = chargingCycles.value.totalCountUnit || '' - const actualAmount = unit.includes('万单') ? orders / 10000 : orders - chargingCycles.value.totalCount = (currentValue + actualAmount) + const actualAmount = unit.includes('万笔') ? orders / 10000 : orders + chargingCycles.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('⚡ 充电数量增加:', actualAmount + unit, `(${orders}笔)`, '当前总值:', chargingCycles.value.totalCount) } - - // 1-5秒随机间隔 - chargingTimer = setTimeout(updateCharging, getRandomInterval(1, 5)) } -// 加水更新:1分钟内,加注吨数随机增加(0-1.2吨,主区间0.3-0.7吨,留两位小数) +// 加水更新函数 const updateWater = () => { - const randomAmount = generateRandomValue(0, 1.2, 0.3, 0.7, 0.7) // 按吨数累加 + const randomAmount = generateRandomValue(0, 1.2, 0.3, 0.7, 0.7) // 加注吨数0-1.2吨,主区间0.3-0.7吨 // 根据当前显示模式更新不同的字段 if (isShowingAmount.value) { // 显示金额模式 - 更新金额字段 - const revenueAmount = generateRandomValue(10, 500, 50, 150, 0.7) // 金额范围 + const revenueAmount = generateRandomValue(0, 50, 10, 30, 0.7) // 金额0-50元,主区间10-30元 const currentValue = parseFloat(waterAddition.value.value) || 0 const unit = waterAddition.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount - waterAddition.value.value = (currentValue + actualAmount) + waterAddition.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('💧 加水金额增加:', actualAmount + unit, '当前总值:', waterAddition.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(waterAddition.value.totalCount) || 0 const unit = waterAddition.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount - waterAddition.value.totalCount = (currentValue + actualAmount) + waterAddition.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('💧 加水数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(2) + '吨)', '当前总值:', waterAddition.value.totalCount) } - - // 1分钟间隔 - waterTimer = setTimeout(updateWater, 60000) } -// 尿素更新:1分钟内,加注吨数随机增加(0-0.2吨,主区间0.06-0.10吨,留两位小数) +// 尿素更新函数 const updateUrea = () => { - const randomAmount = generateRandomValue(0, 0.2, 0.06, 0.10, 0.7) // 按吨数累加 + const randomAmount = generateRandomValue(0, 0.2, 0.06, 0.10, 0.7) // 加注吨数0-0.2吨,主区间0.06-0.10吨 // 根据当前显示模式更新不同的字段 if (isShowingAmount.value) { // 显示金额模式 - 更新金额字段 - const revenueAmount = generateRandomValue(20, 800, 80, 200, 0.7) // 金额范围 + const revenueAmount = generateRandomValue(0, 300, 120, 200, 0.7) // 金额0-300元,主区间120-200元 const currentValue = parseFloat(urea.value.value) || 0 const unit = urea.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount - urea.value.value = (currentValue + actualAmount) + urea.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('🧪 尿素金额增加:', actualAmount + unit, '当前总值:', urea.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(urea.value.totalCount) || 0 const unit = urea.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount - urea.value.totalCount = (currentValue + actualAmount) + urea.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 console.log('🧪 尿素数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(3) + '吨)', '当前总值:', urea.value.totalCount) } - - // 1分钟间隔 - ureaTimer = setTimeout(updateUrea, 60000) } -// 油品更新:1-5秒内,加注吨数随机增加(0-0.1吨,主区间0.020-0.050吨,留三位小数) +// 油品更新函数 const updateOil = () => { - const randomAmount = generateRandomValue(0, 0.1, 0.020, 0.050, 0.7) // 按吨数累加 + const randomAmount = generateRandomValue(0, 0.1, 0.020, 0.050, 0.7) // 加注吨数0-0.1吨,主区间0.020-0.050吨 // 根据当前显示模式更新不同的字段 if (isShowingAmount.value) { // 显示金额模式 - 更新金额字段 - const revenueAmount = generateRandomValue(50, 1000, 100, 300, 0.7) // 金额范围 + const revenueAmount = generateRandomValue(200, 1000, 200, 500, 0.7) // 金额200-1000元,主区间200-500元 const currentValue = parseFloat(oilConsumption.value.value) || 0 const unit = oilConsumption.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount - oilConsumption.value.value = (currentValue + actualAmount) + oilConsumption.value.value = (currentValue + actualAmount) // 油品金额不限制小数位数 console.log('⛽ 油品金额增加:', actualAmount + unit, '当前总值:', oilConsumption.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(oilConsumption.value.totalCount) || 0 const unit = oilConsumption.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount - oilConsumption.value.totalCount = (currentValue + actualAmount) + oilConsumption.value.totalCount = Number((currentValue + actualAmount).toFixed(3)) // 留三位小数 console.log('⛽ 油品数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(3) + '吨)', '当前总值:', oilConsumption.value.totalCount) } - - // 1-5秒随机间隔 - oilTimer = setTimeout(updateOil, getRandomInterval(1, 5)) } -// 启动所有定时器 -const startPeriodicUpdate = () => { - // 清除所有现有定时器 - clearAllTimers() +// 统一更新所有业务数据的函数 +const updateAllBusinessData = () => { + console.log('🔄 更新所有业务数据') - console.log('🚀 启动业务数据实时更新') + // 随机决定哪些数据需要更新(模拟真实业务中不是所有数据都会同时变化) + const updateProbability = 0.6 // 60%概率更新某个业务数据 - // 延迟启动,避免同时更新 - setTimeout(updateRevenue, 1000) // 1秒后启动营收更新 - setTimeout(updateCharging, 2000) // 2秒后启动充电更新 - setTimeout(updateWater, 10000) // 10秒后启动加水更新 - setTimeout(updateUrea, 15000) // 15秒后启动尿素更新 - setTimeout(updateOil, 3000) // 3秒后启动油品更新 + if (Math.random() < updateProbability) { + updateRevenue() + } + if (Math.random() < updateProbability) { + updateCharging() + } + if (Math.random() < updateProbability) { + updateWater() + } + if (Math.random() < updateProbability) { + updateUrea() + } + if (Math.random() < updateProbability) { + updateOil() + } } -// 清除所有定时器 -const clearAllTimers = () => { - if (revenueTimer) { clearTimeout(revenueTimer); revenueTimer = null } - if (chargingTimer) { clearTimeout(chargingTimer); chargingTimer = null } - if (waterTimer) { clearTimeout(waterTimer); waterTimer = null } - if (ureaTimer) { clearTimeout(ureaTimer); ureaTimer = null } - if (oilTimer) { clearTimeout(oilTimer); oilTimer = null } -} - -// 重启定时器函数 -const restartPeriodicUpdate = () => { - console.log('🔄 重启所有业务定时器') - startPeriodicUpdate() -} // 启动显示切换定时器 const startDisplaySwitch = () => { displaySwitchTimer = setInterval(() => { isShowingAmount.value = !isShowingAmount.value console.log(`🔄 切换显示模式: ${isShowingAmount.value ? '金额' : '数量'}`) + + // 在切换显示模式时更新所有数据 + updateAllBusinessData() }, 5000) // 每5秒切换一次 } // 组件卸载时清除定时器 onBeforeUnmount(() => { - clearAllTimers() if (displaySwitchTimer) { clearInterval(displaySwitchTimer) displaySwitchTimer = null @@ -567,11 +538,10 @@ defineExpose({
-
{{ getDisplayLabel('') }}
+
{{ getDisplayLabel('门店') }}
- +
{{ revenueDisplay.unit }}
@@ -587,7 +557,7 @@ defineExpose({
{{ getDisplayLabel('油品') }}
- +
{{ oilDisplay.unit }}
@@ -602,7 +572,7 @@ defineExpose({
{{ getDisplayLabel('加水') }}
- +
{{ waterDisplay.unit }}
@@ -617,7 +587,7 @@ defineExpose({
{{ getDisplayLabel('尿素') }}
- +
{{ ureaDisplay.unit }}
@@ -632,8 +602,7 @@ defineExpose({
{{ getDisplayLabel('充电') }}
- +
{{ chargingDisplay.unit }}
diff --git a/src/page/index/components/CoreCategory/CoreCategory.less b/src/page/index/components/CoreCategory/CoreCategory.less index 284b98c..37f3bc5 100644 --- a/src/page/index/components/CoreCategory/CoreCategory.less +++ b/src/page/index/components/CoreCategory/CoreCategory.less @@ -19,8 +19,10 @@ } .CoreCategory { - width: 112px; - height: 132px; + width: 122px; + height: 142px; + padding-left: 10px; + box-sizing: border-box; } .CoreCategoryDataList { diff --git a/src/page/index/components/CoreCategory/CoreCategory.vue b/src/page/index/components/CoreCategory/CoreCategory.vue index e9e60c6..5c9a575 100644 --- a/src/page/index/components/CoreCategory/CoreCategory.vue +++ b/src/page/index/components/CoreCategory/CoreCategory.vue @@ -81,8 +81,8 @@ onMounted(async () => { { name: 'Access From', type: 'pie', - radius: ['55%', '70%'], - center: ['20%', '50%'], // 图形向左偏移 + radius: ['50%', '75%'], + center: ['50%', '85%'], // 图形向左偏移 avoidLabelOverlap: false, itemStyle: { diff --git a/src/page/index/components/CustomerConsumptionPreferences/CustomerConsumptionPreferences.vue b/src/page/index/components/CustomerConsumptionPreferences/CustomerConsumptionPreferences.vue index 32a306b..3a0fe18 100644 --- a/src/page/index/components/CustomerConsumptionPreferences/CustomerConsumptionPreferences.vue +++ b/src/page/index/components/CustomerConsumptionPreferences/CustomerConsumptionPreferences.vue @@ -11,7 +11,7 @@ import { } from 'echarts/components'; import { CanvasRenderer } from 'echarts/renderers'; import { onBeforeUnmount, onMounted, watch } from 'vue'; -import { handleGetBusinessTradeRevenue, handleGetCustomerSaleRatio } from '../../service'; +import { handleGetBusinessTradeRevenue, handleGetCommodityTypeSummary, handleGetCustomerSaleRatio } from '../../service'; import moment from 'moment'; // 注册组件 @@ -48,6 +48,7 @@ watch( // 初始运行的方法 const handleGoMounted = async () => { const res = await handleGetData() + console.log('res333333', res); const chartDom = document.getElementById('CustomerConsumptionPreferencesCharts'); if (!chartDom) return; @@ -70,12 +71,18 @@ const handleGetData = async () => { // sortStr: 'TOTAL_COUNT desc' // } + // const req: any = { + // ProvinceCode: '530000', + // StatisticsDate: moment().subtract(1, 'd').format('YYYY-MM-DD'), + // // StatisticsDate: '2025-04-30', + // // BusinessTradeIds: -1, + // ServerpartId: props.currentService?.SERVERPART_ID || "" + // } + const req: any = { - ProvinceCode: '530000', - StatisticsDate: moment().subtract(1, 'd').format('YYYY-MM-DD'), - // StatisticsDate: '2025-04-30', - // BusinessTradeIds: -1, - ServerpartId: props.currentService?.SERVERPART_ID || "" + startDate: moment().subtract(10, 'd').format('YYYY-MM-DD'), + endDate: moment().format('YYYY-MM-DD'), + ServerpartShopIds: "5670,5527,5548,5519,5520,5547,5531,5546,7078,7248,5522,6974,5549,5529,5528,7069,5521,6033,5530,5502,6972,7092,7091,6971,5759,5760,6968,6969,7089,7088,6970,7090,5747,6044,6045,6046,6047,7156,5746,7160,6950,6952,6031,6026,5715,5716,6056,6052,6050,6053,6057,6051,6058,6054,6939,6940,7064,7065,6936,6937,6948,6949,5736,6954,7129,7134,7132,7133,5733,5735,7208,7212,5732,5740,5741,5742,7357,7356,5738,5739" } @@ -84,11 +91,13 @@ const handleGetData = async () => { if (CustomerConsumptionPreferences) { data = JSON.parse(CustomerConsumptionPreferences) } else { - // data = await handleGetCustomerSaleRatio(req) - data = await handleGetBusinessTradeRevenue(req) + // data = await handleGetBusinessTradeRevenue(req) + data = await handleGetCommodityTypeSummary(req) sessionStorage.setItem("CustomerConsumptionPreferences", JSON.stringify(data)) } + console.log('dasdasdas', data); + // const data = await handleGetCustomerSaleRatio(req) @@ -99,15 +108,17 @@ const handleGetData = async () => { let aiObj: any = {} // CustomerSaleList - if (data.BusinessTradeRank && data.BusinessTradeRank.length > 0) { - let list = data.BusinessTradeRank.slice(0, 10) + // if (data.BusinessTradeRank && data.BusinessTradeRank.length > 0) { + let list = data.slice(0, 10) + if (list && list.length > 0) { list.forEach((item: any) => { - category.push(item.name) - seriesData.push(item.value) - realData.push(item.value) - aiObj[item.name] = `占比${item.value}%` + category.push(item.CommodityType_Name) + seriesData.push(item.Total_SellAmountRate) + realData.push(item.Total_SellAmount) + aiObj[item.name] = `占比${item.Total_SellAmountRate}%` }) } + // } let CustomerConsumptionPreferencesAI = sessionStorage.getItem('CustomerConsumptionPreferencesAI') if (CustomerConsumptionPreferencesAI) { } else { @@ -222,7 +233,7 @@ const handleSetConfig = (res: any) => { return `
${data.name}
-
客单占比:${realData ? realData + '%' : data.value + '%'}
+
营收占比:${data.value + '%'}${realData ? `,` + realData + '元' : ''}
`; } }, @@ -252,7 +263,8 @@ defineExpose({