diff --git a/apps/web-antd/src/api/iot/statistics/index.ts b/apps/web-antd/src/api/iot/statistics/index.ts index 588eefcc4..9f3a04266 100644 --- a/apps/web-antd/src/api/iot/statistics/index.ts +++ b/apps/web-antd/src/api/iot/statistics/index.ts @@ -1,7 +1,8 @@ import { requestClient } from '#/api/request'; export namespace IotStatisticsApi { - /** IoT 统计摘要数据 */ + // TODO @haohao:需要跟后端对齐,必要的 ReqVO、RespVO + /** 统计摘要数据 */ export interface StatisticsSummary { productCategoryCount: number; productCount: number; @@ -22,7 +23,7 @@ export namespace IotStatisticsApi { [key: string]: number; } - /** IoT 消息统计数据类型 */ + /** 消息统计数据类型 */ export interface DeviceMessageSummary { statType: number; upstreamCounts: TimeValueItem[]; @@ -60,6 +61,7 @@ export function getDeviceMessageSummaryByDate( ); } +// TODO @haohao:貌似这里,没用到?是不是后面哪里用,或者可以删除哈? /** 获取设备消息统计摘要 */ export function getDeviceMessageSummary(statType: number) { return requestClient.get( 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 e989538e0..2d481a69e 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,5 @@ -/** - * 设备数量饼图配置 - */ +/** 设备数量饼图配置 */ +// TODO @haohao:貌似没用到?? export function getDeviceCountChartOptions( productCategoryDeviceCounts: Record, ): any { diff --git a/apps/web-antd/src/views/iot/home/data.ts b/apps/web-antd/src/views/iot/home/data.ts index a91d606a0..164557968 100644 --- a/apps/web-antd/src/views/iot/home/data.ts +++ b/apps/web-antd/src/views/iot/home/data.ts @@ -101,6 +101,7 @@ export function useIotHome() { }; } +// TODO @haohao:是不是删除下哈; /** 格式化数字 - 大数字显示为 K/M */ export function formatNumber(num: number): string { if (num >= 1_000_000) { diff --git a/apps/web-antd/src/views/iot/home/index.vue b/apps/web-antd/src/views/iot/home/index.vue index 2d957c078..20bac8fa5 100644 --- a/apps/web-antd/src/views/iot/home/index.vue +++ b/apps/web-antd/src/views/iot/home/index.vue @@ -3,9 +3,7 @@ import { Page } from '@vben/common-ui'; import { Col, Row } from 'ant-design-vue'; -// 导入业务逻辑 import { useIotHome } from './data'; -// 导入组件 import ComparisonCard from './modules/comparison-card.vue'; import DeviceCountCard from './modules/device-count-card.vue'; import DeviceStateCountCard from './modules/device-state-count-card.vue'; @@ -13,7 +11,7 @@ import MessageTrendCard from './modules/message-trend-card.vue'; defineOptions({ name: 'IoTHome' }); -// 使用业务逻辑 Hook +// TODO @haohao:相关的方法,拿到 index.vue 里,data.ts 只放 schema; const { loading, statsData } = useIotHome(); diff --git a/apps/web-antd/src/views/iot/home/modules/comparison-card.vue b/apps/web-antd/src/views/iot/home/modules/comparison-card.vue index 7f1ad732b..1cfc6b8a9 100644 --- a/apps/web-antd/src/views/iot/home/modules/comparison-card.vue +++ b/apps/web-antd/src/views/iot/home/modules/comparison-card.vue @@ -6,6 +6,8 @@ import { createIconifyIcon } from '@vben/icons'; import { Card } from 'ant-design-vue'; +// TODO @haohao:这个可以迁移到 packages/effects/common-ui/src/components/card/comparison-card + defineOptions({ name: 'ComparisonCard' }); const props = defineProps<{ @@ -59,6 +61,7 @@ const IconComponent = computed(() => iconMap[props.icon] || iconMap.menu);