|
3 | 3 |
|
4 | 4 | <div class="flex flex-col">
|
5 | 5 | <el-row :gutter="16" class="summary">
|
6 |
| - <el-col :sm="6" :xs="12" v-loading="loading"> |
| 6 | + <el-col v-loading="loading" :sm="6" :xs="12"> |
7 | 7 | <SummaryCard
|
8 |
| - title="累计会员数" |
| 8 | + :value="summary?.userCount || 0" |
9 | 9 | icon="fa-solid:users"
|
10 |
| - icon-color="bg-blue-100" |
11 | 10 | icon-bg-color="text-blue-500"
|
12 |
| - :value="summary?.userCount || 0" |
| 11 | + icon-color="bg-blue-100" |
| 12 | + title="累计会员数" |
13 | 13 | />
|
14 | 14 | </el-col>
|
15 |
| - <el-col :sm="6" :xs="12" v-loading="loading"> |
| 15 | + <el-col v-loading="loading" :sm="6" :xs="12"> |
16 | 16 | <SummaryCard
|
17 |
| - title="累计充值人数" |
| 17 | + :value="summary?.rechargeUserCount || 0" |
18 | 18 | icon="fa-solid:user"
|
19 |
| - icon-color="bg-purple-100" |
20 | 19 | icon-bg-color="text-purple-500"
|
21 |
| - :value="summary?.rechargeUserCount || 0" |
| 20 | + icon-color="bg-purple-100" |
| 21 | + title="累计充值人数" |
22 | 22 | />
|
23 | 23 | </el-col>
|
24 |
| - <el-col :sm="6" :xs="12" v-loading="loading"> |
| 24 | + <el-col v-loading="loading" :sm="6" :xs="12"> |
25 | 25 | <SummaryCard
|
26 |
| - title="累计充值金额" |
| 26 | + :decimals="2" |
| 27 | + :value="fenToYuan(summary?.rechargePrice || 0)" |
27 | 28 | icon="fa-solid:money-check-alt"
|
28 |
| - icon-color="bg-yellow-100" |
29 | 29 | icon-bg-color="text-yellow-500"
|
| 30 | + icon-color="bg-yellow-100" |
30 | 31 | prefix="¥"
|
31 |
| - :decimals="2" |
32 |
| - :value="fenToYuan(summary?.rechargePrice || 0)" |
| 32 | + title="累计充值金额" |
33 | 33 | />
|
34 | 34 | </el-col>
|
35 |
| - <el-col :sm="6" :xs="12" v-loading="loading"> |
| 35 | + <el-col v-loading="loading" :sm="6" :xs="12"> |
36 | 36 | <SummaryCard
|
37 |
| - title="累计消费金额" |
| 37 | + :decimals="2" |
| 38 | + :value="fenToYuan(summary?.expensePrice || 0)" |
38 | 39 | icon="fa-solid:yen-sign"
|
39 |
| - icon-color="bg-green-100" |
40 | 40 | icon-bg-color="text-green-500"
|
| 41 | + icon-color="bg-green-100" |
41 | 42 | prefix="¥"
|
42 |
| - :decimals="2" |
43 |
| - :value="fenToYuan(summary?.expensePrice || 0)" |
| 43 | + title="累计消费金额" |
44 | 44 | />
|
45 | 45 | </el-col>
|
46 | 46 | </el-row>
|
|
67 | 67 | <el-col :span="14">
|
68 | 68 | <el-table :data="areaStatisticsList" :height="300">
|
69 | 69 | <el-table-column
|
70 |
| - label="省份" |
71 |
| - prop="areaName" |
| 70 | + :sort-method="(obj1, obj2) => obj1.areaName.localeCompare(obj2.areaName, 'zh-CN')" |
72 | 71 | align="center"
|
| 72 | + label="省份" |
73 | 73 | min-width="80"
|
| 74 | + prop="areaName" |
74 | 75 | show-overflow-tooltip
|
75 | 76 | sortable
|
76 |
| - :sort-method="(obj1, obj2) => obj1.areaName.localeCompare(obj2.areaName, 'zh-CN')" |
77 | 77 | />
|
78 | 78 | <el-table-column
|
79 |
| - label="会员数量" |
80 |
| - prop="userCount" |
81 | 79 | align="center"
|
| 80 | + label="会员数量" |
82 | 81 | min-width="105"
|
| 82 | + prop="userCount" |
83 | 83 | sortable
|
84 | 84 | />
|
85 | 85 | <el-table-column
|
86 |
| - label="订单创建数量" |
87 |
| - prop="orderCreateUserCount" |
88 | 86 | align="center"
|
| 87 | + label="订单创建数量" |
89 | 88 | min-width="135"
|
| 89 | + prop="orderCreateUserCount" |
90 | 90 | sortable
|
91 | 91 | />
|
92 | 92 | <el-table-column
|
93 |
| - label="订单支付数量" |
94 |
| - prop="orderPayUserCount" |
95 | 93 | align="center"
|
| 94 | + label="订单支付数量" |
96 | 95 | min-width="135"
|
| 96 | + prop="orderPayUserCount" |
97 | 97 | sortable
|
98 | 98 | />
|
99 | 99 | <el-table-column
|
100 |
| - label="订单支付金额" |
101 |
| - prop="orderPayPrice" |
| 100 | + :formatter="fenToYuanFormat" |
102 | 101 | align="center"
|
| 102 | + label="订单支付金额" |
103 | 103 | min-width="135"
|
| 104 | + prop="orderPayPrice" |
104 | 105 | sortable
|
105 |
| - :formatter="fenToYuanFormat" |
106 | 106 | />
|
107 | 107 | </el-table>
|
108 | 108 | </el-col>
|
109 | 109 | </el-row>
|
110 | 110 | </el-card>
|
111 | 111 | </el-col>
|
112 | 112 | <el-col :md="6" :sm="24">
|
113 |
| - <el-card shadow="never" v-loading="loading"> |
| 113 | + <el-card v-loading="loading" shadow="never"> |
114 | 114 | <template #header>
|
115 | 115 | <CardTitle title="会员性别比例" />
|
116 | 116 | </template>
|
|
122 | 122 | </template>
|
123 | 123 | <script lang="ts" setup>
|
124 | 124 | import * as MemberStatisticsApi from '@/api/mall/statistics/member'
|
125 |
| -import SummaryCard from '@/components/SummaryCard/index.vue' |
126 |
| -import { EChartsOption } from 'echarts' |
127 |
| -import china from '@/assets/map/json/china.json' |
128 |
| -import { fenToYuan } from '@/utils' |
129 | 125 | import {
|
130 | 126 | MemberAreaStatisticsRespVO,
|
131 | 127 | MemberSexStatisticsRespVO,
|
132 | 128 | MemberSummaryRespVO,
|
133 | 129 | MemberTerminalStatisticsRespVO
|
134 | 130 | } from '@/api/mall/statistics/member'
|
| 131 | +import SummaryCard from '@/components/SummaryCard/index.vue' |
| 132 | +import { EChartsOption } from 'echarts' |
| 133 | +import china from '@/assets/map/json/china.json' |
| 134 | +import { areaReplace, fenToYuan } from '@/utils' |
135 | 135 | import { DICT_TYPE, DictDataType, getIntDictOptions } from '@/utils/dict'
|
136 | 136 | import echarts from '@/plugins/echarts'
|
137 | 137 | import { fenToYuanFormat } from '@/utils/formatter'
|
@@ -246,12 +246,7 @@ const getMemberAreaStatisticsList = async () => {
|
246 | 246 | areaStatisticsList.value = list.map((item: MemberAreaStatisticsRespVO) => {
|
247 | 247 | return {
|
248 | 248 | ...item,
|
249 |
| - areaName: item.areaName |
250 |
| - .replace('维吾尔自治区', '') |
251 |
| - .replace('壮族自治区', '') |
252 |
| - .replace('回族自治区', '') |
253 |
| - .replace('自治区', '') |
254 |
| - .replace('省', '') |
| 249 | + areaName: areaReplace(item.areaName) |
255 | 250 | }
|
256 | 251 | })
|
257 | 252 | let min = 0
|
|
0 commit comments