This commit is contained in:
sliverber 2024-02-06 18:01:10 +08:00
commit 573432dfd7
3 changed files with 32 additions and 7 deletions

View File

@ -49,6 +49,17 @@ export function tradeDataApi() {
});
}
/**
* 渠道统计数据
* @param pram
*/
export function channelDataApi() {
return request({
url: `/admin/statistics/channel/data`,
method: 'GET',
});
}
/**
* 交易概览
* @param pram
@ -85,6 +96,20 @@ export function tradeTrendApi(params) {
});
}
/**
* 渠道趋势
* @param pram
*/
export function channelTrendApi(params) {
return request({
url: `/admin/statistics/channel/trend`,
method: 'GET',
params,
});
}
/**
* 用户总数据
* @param pram

View File

@ -78,7 +78,7 @@
</template>
<script>
import { channelOverviewApi, tradeTrendApi } from '@/api/statistic';
import { channelOverviewApi, channelTrendApi } from '@/api/statistic';
import echartsNew from '@/components/echartsNew/index';
import exportExcel from '@/utils/newToExcel.js'; //
import { checkPermi } from '@/utils/permission'; //
@ -256,14 +256,14 @@ export default {
info: item.info,
color: item.color,
class: item.class,
ratio: item.list.percent.replace('%', '') / 100,
// ratio: item.list.percent.replace('%', '') / 100,
};
});
});
},
//
getTrend() {
tradeTrendApi({ dateLimit: this.dateLimitPram,channelId:this.channelId }).then((res) => {
channelTrendApi({ dateLimit: this.dateLimitPram,channelId:this.channelId }).then((res) => {
let xAxis = new Array();
let series = [
{ name: '营业额', data: [], type: 'line', smooth: 'true', yAxisIndex: 0 },

View File

@ -1,6 +1,6 @@
<template>
<div class="divBox" style="padding-bottom: 0">
<el-row :gutter="20" class="baseInfo" v-if="checkPermi(['admin:statistics:trade:data'])">
<el-row :gutter="20" class="baseInfo" v-if="checkPermi(['admin:statistics:channel:data'])">
<el-col v-bind="grid" class="el-col-4 ivu-mb" v-for="(item, index) in cardLists" :key="index">
<el-card :bordered="false" dis-hover :padding="12">
<div class="acea-row row-between-wrapper">
@ -31,7 +31,7 @@
</template>
<script>
import { tradeDataApi } from '@/api/statistic';
import { channelDataApi } from '@/api/statistic'
import { checkPermi } from '@/utils/permission'; //
export default {
name: 'ToDay',
@ -48,7 +48,7 @@ export default {
methods: {
checkPermi,
getList() {
tradeDataApi().then((res) => {
channelDataApi().then((res) => {
// {"totalClickNum":0,
// "totalRegisterNum":0,
// "totalOrderNum":0,
@ -78,7 +78,7 @@ export default {
// percent: res.yesterdayOrderSalesRatio,
},
{
name: '总金额',
name: '总金额(元)',
icon: 'iconshangpinzhifujine',
count: res.totalAmount,
tag: '总',