feat:【mall 商城】交易统计【antd】30%:优化 trend-card.vue 的实现
This commit is contained in:
@@ -76,31 +76,23 @@ export function getTradeStatisticsSummary() {
|
||||
}
|
||||
|
||||
/** 获得交易状况统计 */
|
||||
export function getTradeStatisticsAnalyse(
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
export function getTradeStatisticsAnalyse(params: any) {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<MallTradeStatisticsApi.TradeTrendSummary>
|
||||
>('/statistics/trade/analyse', { params: formatDateParam(params) });
|
||||
>('/statistics/trade/analyse', { params });
|
||||
}
|
||||
|
||||
/** 获得交易状况明细 */
|
||||
export function getTradeStatisticsList(
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
export function getTradeStatisticsList(params: any) {
|
||||
return requestClient.get<MallTradeStatisticsApi.TradeTrendSummary[]>(
|
||||
'/statistics/trade/list',
|
||||
{ params: formatDateParam(params) },
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出交易状况明细 */
|
||||
export function exportTradeStatisticsExcel(
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
return requestClient.download('/statistics/trade/export-excel', {
|
||||
params: formatDateParam(params),
|
||||
});
|
||||
export function exportTradeStatisticsExcel(params: any) {
|
||||
return requestClient.download('/statistics/trade/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获得交易订单数量 */
|
||||
|
||||
@@ -109,8 +109,6 @@ async function handleExport() {
|
||||
});
|
||||
// 处理下载
|
||||
downloadFileFromBlobPart({ fileName: '商品状况.xlsx', source: data });
|
||||
} catch {
|
||||
// 用户取消导出
|
||||
} finally {
|
||||
exportLoading.value = false;
|
||||
}
|
||||
|
||||
@@ -92,6 +92,8 @@ async function getTradeStatisticsList() {
|
||||
});
|
||||
|
||||
// 处理数据
|
||||
// TODO @芋艿:搞到 getTradeTrendChartOptions 里;
|
||||
// TODO @芋艿:貌似和 vue3 + element-plus 数据不一致;
|
||||
const processedList = list.map((item) => ({
|
||||
...item,
|
||||
turnoverPrice: Number(fenToYuan(item.turnoverPrice)),
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import type { EChartsOption } from 'echarts';
|
||||
|
||||
import type { MallTradeStatisticsApi } from '#/api/mall/statistics/trade';
|
||||
|
||||
/** 交易趋势折线图配置 */
|
||||
export function getTradeTrendChartOptions(
|
||||
data: MallTradeStatisticsApi.TradeTrendSummary[],
|
||||
): EChartsOption {
|
||||
): any {
|
||||
return {
|
||||
dataset: {
|
||||
dimensions: [
|
||||
|
||||
Reference in New Issue
Block a user