|
@@ -1,5 +1,21 @@
|
|
|
<template>
|
|
|
<div class="">
|
|
|
+ <div
|
|
|
+ class="m-10 bg-w p-20 br-10 f-sa-s">
|
|
|
+ <div class="f-fs-c f-col">
|
|
|
+ <div style="font-size: 16px;">总下载量</div>
|
|
|
+ <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.countDownload}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="f-fs-c f-col">
|
|
|
+ <div style="font-size: 16px;">总下载金额</div>
|
|
|
+ <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.sumPaidPrice}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="f-fs-c f-col">
|
|
|
+ <div style="font-size: 16px;">总下载积分</div>
|
|
|
+ <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.sumPoints}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<toolbar @on-filter="filterData" @on-reset="filterData" />
|
|
|
|
|
|
<base-table
|
|
@@ -15,6 +31,7 @@
|
|
|
<script>
|
|
|
import toolbar from './toolbar';
|
|
|
import mxFilterList from '@/mixins/filterList';
|
|
|
+import { getDownloadPage,getDownloadCount } from '@/api/statistics';
|
|
|
|
|
|
export default {
|
|
|
name: 'DownloadImage',
|
|
@@ -23,7 +40,7 @@ export default {
|
|
|
|
|
|
mixins: [
|
|
|
mxFilterList({
|
|
|
- // fetchList: iGetList // 在下方data再声明一个 fetchList: iGetList 同等效果
|
|
|
+ fetchList: getDownloadPage // 在下方data再声明一个 fetchList: iGetList 同等效果
|
|
|
})
|
|
|
],
|
|
|
|
|
@@ -31,27 +48,95 @@ export default {
|
|
|
return {
|
|
|
columns: [
|
|
|
{
|
|
|
- key: 'photo',
|
|
|
- name: '用户名称',
|
|
|
+ key: 'orderId',
|
|
|
+ name: '订单编号',
|
|
|
width: '160'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
- name: '手机号',
|
|
|
- width: '180'
|
|
|
+ key: 'listPreview',
|
|
|
+ name: '图片',
|
|
|
+ width: '180',
|
|
|
+ render: (h, { row }) =>
|
|
|
+ h('img', {
|
|
|
+ style: {
|
|
|
+ width: '160px',
|
|
|
+ height: '90px'
|
|
|
+ },
|
|
|
+ class: 'pre-img',
|
|
|
+ attrs: {
|
|
|
+ src: row.listPreview
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () =>
|
|
|
+ this.$AdvanceViewImageModal({
|
|
|
+ items: [{ src: row.listPreview }]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'kindergartenName',
|
|
|
+ name: '幼儿园',
|
|
|
+ minWidth: '120'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
- name: '反馈内容',
|
|
|
+ key: 'activityName',
|
|
|
+ name: '活动',
|
|
|
minWidth: '120'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
- name: '反馈时间',
|
|
|
+ key: 'nickname',
|
|
|
+ name: '下载用户',
|
|
|
+ width: '140'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'payablePrice',
|
|
|
+ name: '花费金额',
|
|
|
+ width: '140',
|
|
|
+ render: (h,{row}) => h('span',`¥${row.payablePrice}`)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'photoTime',
|
|
|
+ name: '拍摄时间',
|
|
|
+ width: '140'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'createAt',
|
|
|
+ name: '下载时间',
|
|
|
width: '140'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ statistics: {}
|
|
|
};
|
|
|
+ },
|
|
|
+
|
|
|
+ methods:{
|
|
|
+ async pageChange(page) {
|
|
|
+ this.pagination.page = page;
|
|
|
+ const inParams = {
|
|
|
+ ...this.filter,
|
|
|
+ ...this.internalFilterObj,
|
|
|
+ page: this.pagination.page,
|
|
|
+ size: this.pagination.pageSize
|
|
|
+ };
|
|
|
+
|
|
|
+ const { data, msg } = await this.apiList(inParams, {
|
|
|
+ limit: this.pagination.pageSize,
|
|
|
+ start: this.pagination.page
|
|
|
+ });
|
|
|
+ const res2 = await getDownloadCount(inParams)
|
|
|
+ this.statistics = res2.data
|
|
|
+ if ('data' in data) {
|
|
|
+ const items = data.data;
|
|
|
+ if (items.length === 0 && this.pagination.page > 1) {
|
|
|
+ this.pageChange(1);
|
|
|
+ } else {
|
|
|
+ this.items = items;
|
|
|
+ this.pagination.total = data.total;
|
|
|
+ }
|
|
|
+ this.loadCallBack(data);
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|