|
6 | 6 | <el-col :span="6">
|
7 | 7 | <el-card class="stat-card" shadow="never">
|
8 | 8 | <div class="flex flex-col">
|
9 |
| - <span class="text-gray-500 text-base mb-1">品类数量</span> |
| 9 | + <div class="flex justify-between items-center mb-1"> |
| 10 | + <span class="text-gray-500 text-base font-medium">品类数量</span> |
| 11 | + <Icon icon="ep:menu" class="text-2xl text-blue-400" /> |
| 12 | + </div> |
10 | 13 | <span class="text-3xl font-bold text-gray-700">{{ statsData.categoryTotal }}</span>
|
11 | 14 | <el-divider class="my-2" />
|
12 |
| - <div class="flex items-center text-gray-400 text-sm"> |
| 15 | + <div class="flex justify-between items-center text-gray-400 text-sm"> |
13 | 16 | <span>今日新增</span>
|
14 |
| - <span class="ml-1 text-green-500">↑ 0</span> |
| 17 | + <span class="text-green-500">↑ 0</span> |
15 | 18 | </div>
|
16 | 19 | </div>
|
17 | 20 | </el-card>
|
18 | 21 | </el-col>
|
19 | 22 | <el-col :span="6">
|
20 | 23 | <el-card class="stat-card" shadow="never">
|
21 | 24 | <div class="flex flex-col">
|
22 |
| - <span class="text-gray-500 text-base mb-1">产品数量</span> |
| 25 | + <div class="flex justify-between items-center mb-1"> |
| 26 | + <span class="text-gray-500 text-base font-medium">产品数量</span> |
| 27 | + <Icon icon="ep:box" class="text-2xl text-orange-400" /> |
| 28 | + </div> |
23 | 29 | <span class="text-3xl font-bold text-gray-700">{{ statsData.productTotal }}</span>
|
24 | 30 | <el-divider class="my-2" />
|
25 |
| - <div class="flex items-center text-gray-400 text-sm"> |
| 31 | + <div class="flex justify-between items-center text-gray-400 text-sm"> |
26 | 32 | <span>今日新增</span>
|
27 |
| - <span class="ml-1 text-green-500">↑ 0</span> |
| 33 | + <span class="text-green-500">↑ 0</span> |
28 | 34 | </div>
|
29 | 35 | </div>
|
30 | 36 | </el-card>
|
31 | 37 | </el-col>
|
32 | 38 | <el-col :span="6">
|
33 | 39 | <el-card class="stat-card" shadow="never">
|
34 | 40 | <div class="flex flex-col">
|
35 |
| - <span class="text-gray-500 text-base mb-1">设备数量</span> |
| 41 | + <div class="flex justify-between items-center mb-1"> |
| 42 | + <span class="text-gray-500 text-base font-medium">设备数量</span> |
| 43 | + <Icon icon="ep:cpu" class="text-2xl text-purple-400" /> |
| 44 | + </div> |
36 | 45 | <span class="text-3xl font-bold text-gray-700">{{ statsData.deviceTotal }}</span>
|
37 | 46 | <el-divider class="my-2" />
|
38 |
| - <div class="flex items-center text-gray-400 text-sm"> |
| 47 | + <div class="flex justify-between items-center text-gray-400 text-sm"> |
39 | 48 | <span>今日新增</span>
|
40 |
| - <span class="ml-1 text-green-500">↑ 0</span> |
| 49 | + <span class="text-green-500">↑ 0</span> |
41 | 50 | </div>
|
42 | 51 | </div>
|
43 | 52 | </el-card>
|
44 | 53 | </el-col>
|
45 | 54 | <el-col :span="6">
|
46 | 55 | <el-card class="stat-card" shadow="never">
|
47 | 56 | <div class="flex flex-col">
|
48 |
| - <span class="text-gray-500 text-base mb-1">物模型消息</span> |
| 57 | + <div class="flex justify-between items-center mb-1"> |
| 58 | + <span class="text-gray-500 text-base font-medium">物模型消息</span> |
| 59 | + <Icon icon="ep:message" class="text-2xl text-teal-400" /> |
| 60 | + </div> |
49 | 61 | <span class="text-3xl font-bold text-gray-700">{{ statsData.reportTotal }}</span>
|
50 | 62 | <el-divider class="my-2" />
|
51 |
| - <div class="flex items-center text-gray-400 text-sm"> |
| 63 | + <div class="flex justify-between items-center text-gray-400 text-sm"> |
52 | 64 | <span>今日新增</span>
|
53 |
| - <span class="ml-1 text-green-500">↑ 0</span> |
| 65 | + <span class="text-green-500">↑ 0</span> |
54 | 66 | </div>
|
55 | 67 | </div>
|
56 | 68 | </el-card>
|
@@ -125,6 +137,7 @@ import { LabelLayout, UniversalTransition } from 'echarts/features'
|
125 | 137 | import { CanvasRenderer } from 'echarts/renderers'
|
126 | 138 | import { ProductCategoryApi } from '@/api/iot/statistics'
|
127 | 139 | import { formatDate } from '@/utils/formatTime'
|
| 140 | +import { Icon } from '@/components/Icon' |
128 | 141 |
|
129 | 142 | /** IoT 首页 */
|
130 | 143 | defineOptions({ name: 'IotHome' })
|
@@ -165,8 +178,6 @@ const statsData = ref({
|
165 | 178 | const getStats = async () => {
|
166 | 179 | const res = await ProductCategoryApi.getIotMainStats()
|
167 | 180 | statsData.value = res
|
168 |
| - console.log(res) |
169 |
| - console.log(statsData.value) |
170 | 181 | initCharts()
|
171 | 182 | }
|
172 | 183 |
|
|
0 commit comments