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