Skip to content

Commit b7d6c94

Browse files
committed
feat: home 1
1 parent 4dfc8c1 commit b7d6c94

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

src/views/iot/home/index.vue

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,63 @@
66
<el-col :span="6">
77
<el-card class="stat-card" shadow="never">
88
<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>
1013
<span class="text-3xl font-bold text-gray-700">{{ statsData.categoryTotal }}</span>
1114
<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">
1316
<span>今日新增</span>
14-
<span class="ml-1 text-green-500">↑ 0</span>
17+
<span class="text-green-500">↑ 0</span>
1518
</div>
1619
</div>
1720
</el-card>
1821
</el-col>
1922
<el-col :span="6">
2023
<el-card class="stat-card" shadow="never">
2124
<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>
2329
<span class="text-3xl font-bold text-gray-700">{{ statsData.productTotal }}</span>
2430
<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">
2632
<span>今日新增</span>
27-
<span class="ml-1 text-green-500">↑ 0</span>
33+
<span class="text-green-500">↑ 0</span>
2834
</div>
2935
</div>
3036
</el-card>
3137
</el-col>
3238
<el-col :span="6">
3339
<el-card class="stat-card" shadow="never">
3440
<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>
3645
<span class="text-3xl font-bold text-gray-700">{{ statsData.deviceTotal }}</span>
3746
<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">
3948
<span>今日新增</span>
40-
<span class="ml-1 text-green-500">↑ 0</span>
49+
<span class="text-green-500">↑ 0</span>
4150
</div>
4251
</div>
4352
</el-card>
4453
</el-col>
4554
<el-col :span="6">
4655
<el-card class="stat-card" shadow="never">
4756
<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>
4961
<span class="text-3xl font-bold text-gray-700">{{ statsData.reportTotal }}</span>
5062
<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">
5264
<span>今日新增</span>
53-
<span class="ml-1 text-green-500">↑ 0</span>
65+
<span class="text-green-500">↑ 0</span>
5466
</div>
5567
</div>
5668
</el-card>
@@ -125,6 +137,7 @@ import { LabelLayout, UniversalTransition } from 'echarts/features'
125137
import { CanvasRenderer } from 'echarts/renderers'
126138
import { ProductCategoryApi } from '@/api/iot/statistics'
127139
import { formatDate } from '@/utils/formatTime'
140+
import { Icon } from '@/components/Icon'
128141
129142
/** IoT 首页 */
130143
defineOptions({ name: 'IotHome' })
@@ -165,8 +178,6 @@ const statsData = ref({
165178
const getStats = async () => {
166179
const res = await ProductCategoryApi.getIotMainStats()
167180
statsData.value = res
168-
console.log(res)
169-
console.log(statsData.value)
170181
initCharts()
171182
}
172183

0 commit comments

Comments
 (0)