update
This commit is contained in:
parent
870d96fb3c
commit
309cdacdc9
@ -38,7 +38,7 @@
|
||||
<ChartLoading v-if="isLoading" text="数据加载中..." />
|
||||
<!-- 品牌列表内容 -->
|
||||
<view v-else>
|
||||
<view class="brand-item" v-for="(item, index) in brandListData" :key="index"
|
||||
<view class="brand-item" v-for="(item, index) in brandListData.slice(0, 3)" :key="index"
|
||||
:style="{ marginBottom: index + 1 === brandListData.length ? '0' : '20rpx' }">
|
||||
<view class=" brand-left">
|
||||
<image class="brand-icon" :src="item.BRAND_INTRO || defaultImg" mode="aspectFill" />
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
<!-- 营收特征分析图表 -->
|
||||
<view class="chart-container">
|
||||
<view style="width:100%;height: 80rpx;">
|
||||
<!-- 选择器 -->
|
||||
<!-- <view style="width:100%;height: 80rpx;">
|
||||
<picker mode="selector" :range="tabList" range-key="label" :value="getCurrentPickerIndex()"
|
||||
@change="handlePickerChange" class="picker-container">
|
||||
<view class="picker-display">
|
||||
@ -16,8 +15,7 @@
|
||||
<text class="picker-arrow">▼</text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
|
||||
<view style="width:100%;height: 400rpx;">
|
||||
<!-- 图表加载效果 -->
|
||||
@ -53,7 +51,7 @@ export default {
|
||||
{ label: "客单量", value: 2 },
|
||||
{ label: "客单均价", value: 3 }
|
||||
],
|
||||
selectTab: 1, // 当前选中的Tab
|
||||
selectTab: 3, // 当前选中的Tab
|
||||
|
||||
// 当前请求来的实际数据
|
||||
realData: {},
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<view class="customer-consumption-preferences">
|
||||
<!-- 客群消费偏好标题 -->
|
||||
<view class="section-header">
|
||||
<text class="section-title">客群消费偏好</text>
|
||||
<!-- <text class="section-title">客群消费偏好</text> -->
|
||||
<text class="section-title">近10日单品营收Top5</text>
|
||||
</view>
|
||||
|
||||
<!-- 客群消费偏好图表 -->
|
||||
@ -62,7 +63,8 @@ export default {
|
||||
name: '客单占比',
|
||||
data: this.rawData.seriesData
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@ -106,7 +108,8 @@ export default {
|
||||
activeBgOpacity: 0.08,
|
||||
barBorderRadius: [4, 4, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
realData: this.rawData.realData
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -129,14 +132,23 @@ export default {
|
||||
methods: {
|
||||
// 获取客群消费偏好数据
|
||||
async handleGetCustomerConsumptionPreferencesData() {
|
||||
// const req = {
|
||||
// ProvinceCode: '530000',
|
||||
// StatisticsDate: this.selectTime ? moment(this.selectTime).subtract(1, 'd').format('YYYY-MM-DD') : moment().subtract(1, 'd').format('YYYY-MM-DD'),
|
||||
// ServerpartId: "" // 暂时为空,如果需要传入服务区ID可以在这里添加
|
||||
// }
|
||||
const req = {
|
||||
ProvinceCode: '530000',
|
||||
StatisticsDate: this.selectTime ? moment(this.selectTime).subtract(1, 'd').format('YYYY-MM-DD') : moment().subtract(1, 'd').format('YYYY-MM-DD'),
|
||||
ServerpartId: "" // 暂时为空,如果需要传入服务区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"
|
||||
}
|
||||
|
||||
|
||||
this.isLoading = true
|
||||
const data = await this.getBusinessTradeRevenue(req);
|
||||
|
||||
|
||||
|
||||
this.isLoading = false
|
||||
|
||||
// 处理数据
|
||||
@ -146,7 +158,7 @@ export default {
|
||||
// 发起API请求获取业态客单偏好数据
|
||||
async getBusinessTradeRevenue(params) {
|
||||
const data = await request.$webGet(
|
||||
"CommercialApi/Revenue/GetBusinessTradeRevenue",
|
||||
"EShangApiMain/Sales/GetCommodityTypeSummary",
|
||||
params
|
||||
);
|
||||
return data || {}
|
||||
@ -158,13 +170,23 @@ export default {
|
||||
let seriesData = []
|
||||
let realData = []
|
||||
|
||||
console.log('datadatadadasda321312312', data);
|
||||
|
||||
|
||||
// 处理数据:获取业态客单偏好数据
|
||||
if (data.BusinessTradeRank && data.BusinessTradeRank.length > 0) {
|
||||
let list = data.BusinessTradeRank.slice(0, 5) // 只取前10条
|
||||
// if (data.BusinessTradeRank && data.BusinessTradeRank.length > 0) {
|
||||
if (data.List && data.List.length > 0) {
|
||||
let list = data.List.slice(0, 5) // 只取前10条
|
||||
list = this.sortByKey(list, 'Total_SellAmountRate', 'desc')
|
||||
console.log('djaksdjaksdjal', list);
|
||||
|
||||
list.forEach((item) => {
|
||||
category.push(item.name)
|
||||
seriesData.push(Number(item.value))
|
||||
realData.push(item.value)
|
||||
// category.push(item.name)
|
||||
// seriesData.push(Number(item.value))
|
||||
// realData.push(item.value)
|
||||
category.push(item.CommodityType_Name.split(']')[1])
|
||||
seriesData.push(Number(item.Total_SellAmountRate))
|
||||
realData.push(item.Total_SellAmount)
|
||||
})
|
||||
}
|
||||
|
||||
@ -175,7 +197,24 @@ export default {
|
||||
realData: realData
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 对象数组排序方法
|
||||
* @param {Array} arr - 要排序的对象数组
|
||||
* @param {String} key - 按哪个字段排序
|
||||
* @param {String} order - 排序方式:'asc' 正序,'desc' 倒序
|
||||
*/
|
||||
sortByKey(arr, key, order = 'asc') {
|
||||
return arr.sort((a, b) => {
|
||||
const valA = a[key];
|
||||
const valB = b[key];
|
||||
|
||||
if (valA === valB) return 0;
|
||||
if (order === 'asc') {
|
||||
return valA > valB ? 1 : -1;
|
||||
}
|
||||
return valA < valB ? 1 : -1; // desc
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
<view class="member-consumption-item">
|
||||
<view class="member-consumption-label">会员总销售额/元</view>
|
||||
<view class="member-consumption-progress2"></view>
|
||||
<view class="member-consumption-value">{{ formatMoney(memberData.totalSalesAmount || 0) }}</view>
|
||||
<view class="member-consumption-value">{{ memberData.totalSalesAmount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -104,19 +104,19 @@
|
||||
</view>
|
||||
|
||||
<view class="member-overview-item">
|
||||
<view class="member-overview-item-top">{{ formatMoney(memberData.avgAmount || 0) }}</view>
|
||||
<view class="member-overview-item-top">{{ memberData.avgAmount || 0 }}</view>
|
||||
<view class="member-overview-item-bottom">人均消费</view>
|
||||
</view>
|
||||
|
||||
<view class="member-overview-item">
|
||||
<view class="member-overview-item-top">{{ (memberData.repurchaseRate || 0) }}</view>
|
||||
<view class="member-overview-item-bottom">客单价</view>
|
||||
</view>
|
||||
|
||||
<view class="member-overview-item">
|
||||
<view class="member-overview-item-top">{{ (memberData.repurchaseRate || 0) + '%' }}</view>
|
||||
<view class="member-overview-item-top">{{ (memberData.totalAmount || 0) + '%' }}</view>
|
||||
<view class="member-overview-item-bottom">会员复购率</view>
|
||||
</view>
|
||||
|
||||
<view class="member-overview-item">
|
||||
<view class="member-overview-item-top">{{ formatMoney(memberData.totalAmount || 0) }}</view>
|
||||
<view class="member-overview-item-bottom">总销售额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -186,22 +186,22 @@ export default {
|
||||
async getMemberMallData(params) {
|
||||
// 写死数据返回
|
||||
const mockData = {
|
||||
totalMembers: 12733,
|
||||
monthNewMembers: 56,
|
||||
newMembersCount: 94,
|
||||
openCount: 2716,
|
||||
newPeopleCount: 624,
|
||||
visitCount: 884,
|
||||
consumptionCount: 133,
|
||||
totalSalesAmount: 27734.10,
|
||||
unionMembers: 512,
|
||||
memberRatio: 4.02,
|
||||
conversionRate: 15.06,
|
||||
growthRate: 0.74,
|
||||
buyPeopleCount: 23,
|
||||
avgAmount: 208.53,
|
||||
repurchaseRate: 29.17,
|
||||
totalAmount: 1205.83
|
||||
totalMembers: 15071,
|
||||
monthNewMembers: 146,
|
||||
newMembersCount: 270,
|
||||
openCount: 3203,
|
||||
newPeopleCount: 757,
|
||||
visitCount: 1914,
|
||||
consumptionCount: 104,
|
||||
totalSalesAmount: '47, 550.60',
|
||||
unionMembers: 1782,
|
||||
memberRatio: 11.82,
|
||||
conversionRate: 32.17,
|
||||
growthRate: 0.97,
|
||||
buyPeopleCount: 99,
|
||||
avgAmount: 480.31,
|
||||
repurchaseRate: 461.66,
|
||||
totalAmount: 2.02
|
||||
}
|
||||
|
||||
return mockData || {}
|
||||
|
||||
@ -25,6 +25,10 @@
|
||||
<text class="metric-value" style="color: #1aba80;">{{ serviceData.WaterStationCount || 0 }}</text>
|
||||
<text class="metric-label">加水站/座</text>
|
||||
</view>
|
||||
<view class="metric-card">
|
||||
<text class="metric-value" style="color: #1aba80;">24</text>
|
||||
<text class="metric-label">加油站/座</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务区类型统计 - 第三行 -->
|
||||
@ -41,6 +45,8 @@
|
||||
<text class="metric-value" style="color: #757575;">{{ serviceData.ClosedCount || 0 }}</text>
|
||||
<text class="metric-label">关停/座</text>
|
||||
</view>
|
||||
<view class="metric-card" style="background-color: transparent;box-shadow: none;">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 设备设施分布图 -->
|
||||
|
||||
@ -58,12 +58,12 @@ export default {
|
||||
return {
|
||||
categories: this.rawData.category.map(item => item.name),
|
||||
series: [
|
||||
// {
|
||||
// name: '男性',
|
||||
// data: this.rawData.seriesDataMan
|
||||
// },
|
||||
{
|
||||
name: '男性',
|
||||
data: this.rawData.seriesDataMan
|
||||
},
|
||||
{
|
||||
name: '女性',
|
||||
name: '偏好类型',
|
||||
data: this.rawData.seriesData
|
||||
}
|
||||
]
|
||||
@ -128,15 +128,22 @@ export default {
|
||||
methods: {
|
||||
// 获取偏好类型数据
|
||||
async handleGetPreferenceTypeData() {
|
||||
// const req = {
|
||||
// statisticsType: 1,
|
||||
// startMonth: this.selectTime ? moment(this.selectTime).startOf('y').format('YYYYMM') : moment().startOf('y').format('YYYYMM'),
|
||||
// endMonth: this.selectTime ? moment(this.selectTime).format('YYYYMM') : moment().format('YYYYMM'),
|
||||
// provinceCode: '530000',
|
||||
// showTradeLevel: 1,
|
||||
// fromRedis: true
|
||||
// }
|
||||
|
||||
const req = {
|
||||
statisticsType: 1,
|
||||
startMonth: this.selectTime ? moment(this.selectTime).startOf('y').format('YYYYMM') : moment().startOf('y').format('YYYYMM'),
|
||||
endMonth: this.selectTime ? moment(this.selectTime).format('YYYYMM') : moment().format('YYYYMM'),
|
||||
provinceCode: '530000',
|
||||
showTradeLevel: 1,
|
||||
fromRedis: true
|
||||
ProvinceCode: '530000',
|
||||
StatisticsDate: moment().subtract(1, 'd').format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.isLoading = true
|
||||
const data = await this.getCustomerSaleRatio(req);
|
||||
this.isLoading = false
|
||||
@ -148,7 +155,8 @@ export default {
|
||||
// 发起API请求获取客群消费偏好数据
|
||||
async getCustomerSaleRatio(params) {
|
||||
const data = await request.$webGet(
|
||||
"CommercialApi/Customer/GetCustomerSaleRatio",
|
||||
// "CommercialApi/Customer/GetCustomerSaleRatio",
|
||||
"CommercialApi/Revenue/GetBusinessTradeRevenue",
|
||||
params
|
||||
);
|
||||
return data || {}
|
||||
@ -161,21 +169,36 @@ export default {
|
||||
let seriesDataMan = []
|
||||
let max = 0
|
||||
|
||||
console.log('datadatadatadata', data);
|
||||
|
||||
|
||||
// 处理数据:获取客群消费偏好数据
|
||||
let list = data.CustomerSaleList || []
|
||||
// let list = data.CustomerSaleList || []
|
||||
let list = data.BusinessTradeRank || []
|
||||
if (list && list.length > 0) {
|
||||
list.forEach((item) => {
|
||||
// 计算最大值
|
||||
if (item.FemaleRatio > max) {
|
||||
max = item.FemaleRatio
|
||||
}
|
||||
if (item.MaleRatio > max) {
|
||||
max = item.MaleRatio
|
||||
|
||||
|
||||
if (Number(item.value) > max) {
|
||||
max = Number(item.value)
|
||||
}
|
||||
|
||||
category.push({ name: item.BusinessTradeName, max: 100 })
|
||||
seriesData.push(Number(item.FemaleRatio))
|
||||
seriesDataMan.push(Number(item.MaleRatio))
|
||||
|
||||
// category.push({ name: item.BusinessTradeName, max: 100 })
|
||||
category.push({ name: item.name, max: 100 })
|
||||
seriesData.push(Number(item.value))
|
||||
|
||||
// // 计算最大值
|
||||
// if (item.FemaleRatio > max) {
|
||||
// max = item.FemaleRatio
|
||||
// }
|
||||
// if (item.MaleRatio > max) {
|
||||
// max = item.MaleRatio
|
||||
// }
|
||||
|
||||
// category.push({ name: item.BusinessTradeName, max: 100 })
|
||||
// seriesData.push(Number(item.FemaleRatio))
|
||||
// seriesDataMan.push(Number(item.MaleRatio))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -163,6 +163,7 @@ export default {
|
||||
let seriesData = []
|
||||
let legendData = []
|
||||
|
||||
console.log('dadasdjifhdlsk', data);
|
||||
|
||||
// 处理数据:获取区域营收占比数据
|
||||
if (data && data.length > 0) {
|
||||
@ -180,12 +181,12 @@ export default {
|
||||
let percentage = Number(((subItem.TotalRevenue.Revenue_Amount / sum) * 100).toFixed(2))
|
||||
|
||||
seriesData.push({
|
||||
name: subItem.Serverpart_Name,
|
||||
name: subItem.Serverpart_Name.split('管理单元')[0],
|
||||
value: revenueAmount
|
||||
})
|
||||
|
||||
legendData.push({
|
||||
name: subItem.Serverpart_Name,
|
||||
name: subItem.Serverpart_Name.split('管理单元')[0],
|
||||
value: percentage + '%'
|
||||
})
|
||||
})
|
||||
|
||||
@ -10,28 +10,32 @@
|
||||
<!-- 第一行:经销商、品牌方 -->
|
||||
<view class="supplier-message-box-top">
|
||||
<view class="supplier-message-box-top-item">
|
||||
<view class="supplier-message-box-top-item-label">经销商/家</view>
|
||||
<view class="supplier-message-box-top-item-value" style="color: #56BCE6;">{{ supplierObj.dealer ||
|
||||
0 }}</view>
|
||||
<view class="supplier-message-box-top-item-label">电商及工会福利/家</view>
|
||||
<!-- <view class="supplier-message-box-top-item-value" style="color: #56BCE6;">{{ supplierObj.dealer ||
|
||||
0 }}</view> -->
|
||||
<view class="supplier-message-box-top-item-value" style="color: #56BCE6;">14</view>
|
||||
</view>
|
||||
<view class="supplier-message-box-top-item">
|
||||
<view class="supplier-message-box-top-item-label">品牌方/家</view>
|
||||
<view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">{{ supplierObj.brandSide
|
||||
|| 0 }}</view>
|
||||
<view class="supplier-message-box-top-item-label">绿色云品品牌厂家/家</view>
|
||||
<!-- <view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">{{ supplierObj.brandSide
|
||||
|| 0 }}</view> -->
|
||||
<view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">14</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 第二行:自有品牌水、零售批发类 -->
|
||||
<view class="supplier-message-box-top" style="margin-top: 20rpx;">
|
||||
<view class="supplier-message-box-top-item">
|
||||
<view class="supplier-message-box-top-item-label">自有品牌水/家</view>
|
||||
<view class="supplier-message-box-top-item-value" style="color: #56BCE6;">{{
|
||||
supplierObj.privateLabelWater || 0 }}</view>
|
||||
<view class="supplier-message-box-top-item-label">自有水品牌厂家/家</view>
|
||||
<!-- <view class="supplier-message-box-top-item-value" style="color: #56BCE6;">{{
|
||||
supplierObj.privateLabelWater || 0 }}</view> -->
|
||||
<view class="supplier-message-box-top-item-value" style="color: #56BCE6;">2</view>
|
||||
</view>
|
||||
<view class="supplier-message-box-top-item">
|
||||
<view class="supplier-message-box-top-item-label">零售批发类/家</view>
|
||||
<view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">{{
|
||||
supplierObj.retailAndWholesale || 0 }}</view>
|
||||
<view class="supplier-message-box-top-item-label">快消品零售批发/家</view>
|
||||
<!-- <view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">{{
|
||||
supplierObj.retailAndWholesale || 0 }}</view> -->
|
||||
<view class="supplier-message-box-top-item-value" style="color: #ef5a0d;">28</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -122,7 +126,7 @@ export default {
|
||||
const req = {
|
||||
ProvinceCode: "530000",
|
||||
type: 'encryption',
|
||||
StatisticsMonth: this.selectTime ? moment(this.selectTime).format('YYYYMM') : "202505",
|
||||
StatisticsMonth: "202505",
|
||||
}
|
||||
|
||||
// 这里使用模拟数据,实际应该调用真实的API
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<view class="core-category-box">
|
||||
|
||||
<!-- 本月福利金发放额度 -->
|
||||
<view class="benefits-header">
|
||||
<!-- <view class="benefits-header">
|
||||
<view class="benefits-left">
|
||||
<text class="benefits-title">本月福利金发放额度</text>
|
||||
</view>
|
||||
@ -21,7 +21,7 @@
|
||||
}}</text>
|
||||
<text class="benefits-unit">元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="chart-container">
|
||||
<!-- 图表加载效果 -->
|
||||
|
||||
@ -222,6 +222,9 @@ export default {
|
||||
width: 30%;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.item-type {
|
||||
|
||||
@ -232,8 +232,9 @@ export default {
|
||||
}
|
||||
|
||||
// 生成12个月的对比数据
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
const month = `${i}月`;
|
||||
if (currentData && currentData.length > 0) {
|
||||
currentData.forEach(item => {
|
||||
const month = `${item.Statistics_Month}月`;
|
||||
const currentMonthData = currentDataMap[month] || { value: 0, realValue: 0 };
|
||||
const previousMonthData = previousDataMap[month] || { value: 0, realValue: 0 };
|
||||
|
||||
@ -250,8 +251,30 @@ export default {
|
||||
previousYearValue: previousMonthData.value,
|
||||
growthRate: growthRate
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// for (let i = 1; i <= 12; i++) {
|
||||
// const month = `${i}月`;
|
||||
// const currentMonthData = currentDataMap[month] || { value: 0, realValue: 0 };
|
||||
// const previousMonthData = previousDataMap[month] || { value: 0, realValue: 0 };
|
||||
|
||||
// let growthRate = '0.00';
|
||||
// if (previousMonthData.realValue > 0 && currentMonthData.realValue > 0) {
|
||||
// growthRate = (((currentMonthData.realValue - previousMonthData.realValue) / previousMonthData.realValue) * 100).toFixed(2);
|
||||
// totalGrowthRate += parseFloat(growthRate);
|
||||
// validMonthCount++;
|
||||
// }
|
||||
|
||||
// monthlyData.push({
|
||||
// month: month,
|
||||
// currentYearValue: currentMonthData.value,
|
||||
// previousYearValue: previousMonthData.value,
|
||||
// growthRate: growthRate
|
||||
// });
|
||||
// }
|
||||
|
||||
// 计算平均增长率
|
||||
const averageGrowth = validMonthCount > 0 ? (totalGrowthRate / validMonthCount).toFixed(2) : '0.00';
|
||||
|
||||
|
||||
@ -218,17 +218,22 @@ export default {
|
||||
// 当前年份数据请求
|
||||
const currentReq = {
|
||||
StartDate: this.selectTime ? moment(this.selectTime).startOf('y').format('YYYY-MM-DD') : moment().startOf('y').format('YYYY-MM-DD'),
|
||||
EndDate: this.selectTime ? moment(this.selectTime).endOf('m').format('YYYY-MM-DD') : moment().endOf('m').format('YYYY-MM-DD'),
|
||||
EndDate: this.selectTime ? moment(this.selectTime).endOf('M').format('YYYY-MM-DD') : moment().endOf('M').format('YYYY-MM-DD'),
|
||||
ProvinceCode: 530000
|
||||
}
|
||||
|
||||
// 去年数据请求
|
||||
const lastYearReq = {
|
||||
StartDate: this.selectTime ? moment(this.selectTime).subtract(1, 'y').startOf('y').format('YYYY-MM-DD') : moment().subtract(1, 'y').startOf('y').format('YYYY-MM-DD'),
|
||||
EndDate: this.selectTime ? moment(this.selectTime).subtract(1, 'y').endOf('y').format('YYYY-MM-DD') : moment().subtract(1, 'y').endOf('y').format('YYYY-MM-DD'),
|
||||
EndDate: this.selectTime ? moment(this.selectTime).subtract(1, 'y').endOf('M').format('YYYY-MM-DD') : moment().subtract(1, 'y').endOf('M').format('YYYY-MM-DD'),
|
||||
ProvinceCode: 530000
|
||||
}
|
||||
|
||||
console.log('currentReqcurrentReqcurrentReq1111', currentReq);
|
||||
console.log('lastYearReqlastYearReqlastYearReq222', lastYearReq);
|
||||
|
||||
|
||||
|
||||
// 并行调用两个API
|
||||
const [currentData, lastYearData] = await Promise.all([
|
||||
this.getMonthAnalysis(currentReq),
|
||||
|
||||
@ -138,7 +138,7 @@ const cfu = {
|
||||
return `${category}\n${item.name}:${item.data}${item.name === '客单量' ? '单' : '辆'}`
|
||||
},
|
||||
"customerConsumptionPreferencesChart": function (item, category, index, opts) {
|
||||
return `${category}\n${item.name}:${item.data}%`
|
||||
return `${category}\n${item.name}:${item.data}%,${opts.realData[index].toLocaleString()}元`
|
||||
},
|
||||
"PreferenceType": function (item, category, index, opts) {
|
||||
return `${item.name}\n${category}占比:${item.data}%`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user