From 42697ec614754fad29e3065ccf47f073c67a7a4e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 23 Nov 2025 18:51:16 +0800 Subject: [PATCH] =?UTF-8?q?review=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90i?= =?UTF-8?q?ot=E3=80=91=E9=A6=96=E9=A1=B5=E7=9A=84=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/iot/home/chart-options.ts | 4 +- apps/web-antd/src/views/iot/home/data.ts | 11 +---- apps/web-antd/src/views/iot/home/index.vue | 26 +++++------- .../iot/home/modules/device-count-card.vue | 9 ++-- .../home/modules/device-state-count-card.vue | 6 +-- .../iot/home/modules/message-trend-card.vue | 42 +++++++++---------- .../card/comparison-card/comparison-card.vue | 8 +--- .../components/card/comparison-card/index.ts | 1 - .../components/card/comparison-card/types.ts | 19 +++------ 9 files changed, 49 insertions(+), 77 deletions(-) diff --git a/apps/web-antd/src/views/iot/home/chart-options.ts b/apps/web-antd/src/views/iot/home/chart-options.ts index b581afcdb..902181505 100644 --- a/apps/web-antd/src/views/iot/home/chart-options.ts +++ b/apps/web-antd/src/views/iot/home/chart-options.ts @@ -1,6 +1,4 @@ -/** - * 消息趋势图表配置 - */ +/** 消息趋势图表配置 */ export function getMessageTrendChartOptions( times: string[], upstreamData: number[], diff --git a/apps/web-antd/src/views/iot/home/data.ts b/apps/web-antd/src/views/iot/home/data.ts index 7b00cb196..562490f34 100644 --- a/apps/web-antd/src/views/iot/home/data.ts +++ b/apps/web-antd/src/views/iot/home/data.ts @@ -1,16 +1,7 @@ -/** - * IoT 首页数据配置文件 - * - * 该文件只包含统计数据接口定义 - */ - import type { IotStatisticsApi } from '#/api/iot/statistics'; -/** 统计数据接口 - 使用 API 定义的类型 */ -export type StatsData = IotStatisticsApi.StatisticsSummary; - /** 默认统计数据 */ -export const defaultStatsData: StatsData = { +export const defaultStatsData: IotStatisticsApi.StatisticsSummary = { productCategoryCount: 0, productCount: 0, deviceCount: 0, diff --git a/apps/web-antd/src/views/iot/home/index.vue b/apps/web-antd/src/views/iot/home/index.vue index 5ceacbde6..e2d7723f6 100644 --- a/apps/web-antd/src/views/iot/home/index.vue +++ b/apps/web-antd/src/views/iot/home/index.vue @@ -1,12 +1,12 @@