Skip to content

Commit cc1a025

Browse files
YunaiVgitee-org
authored andcommitted
!721 【功能新增】:IOT首页(后端code review修改配套版)
Merge pull request !721 from alwayssuper/feature/iot
2 parents dd1eb5d + 9640531 commit cc1a025

File tree

4 files changed

+596
-3
lines changed

4 files changed

+596
-3
lines changed

src/api/iot/statistics/index.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import request from '@/config/axios'
2+
3+
/** 统计数据类型 */
4+
export interface IotStatisticsSummaryRespVO {
5+
productCategoryCount: number
6+
productCount: number
7+
deviceCount: number
8+
deviceMessageCount: number
9+
productCategoryTodayCount: number
10+
productTodayCount: number
11+
deviceTodayCount: number
12+
deviceMessageTodayCount: number
13+
deviceOnlineCount: number
14+
deviceOfflineCount: number
15+
deviceInactiveCount: number
16+
productCategoryDeviceCounts: Record<string, number>
17+
}
18+
19+
/** 消息统计数据类型 */
20+
export interface IotStatisticsDeviceMessageSummaryRespVO {
21+
upstreamCounts: Record<number, number>
22+
downstreamCounts: Record<number, number>
23+
}
24+
25+
// IoT 数据统计 API
26+
export const ProductCategoryApi = {
27+
// 查询IoT基础数据统计
28+
getIotStatisticsSummary: async () => {
29+
return await request.get<IotStatisticsSummaryRespVO>({
30+
url: `/iot/statistics/get-summary`
31+
})
32+
},
33+
34+
// 查询IoT上下行消息数据统计
35+
getIotStatisticsDeviceMessageSummary: async (params: {
36+
startTime: number
37+
endTime: number
38+
}) => {
39+
return await request.get<IotStatisticsDeviceMessageSummaryRespVO>({
40+
url: `/iot/statistics/get-log-summary`,
41+
params
42+
})
43+
}
44+
}

src/views/iot/device/device/detail/DeviceDetailConfig.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<script lang="ts" setup>
4141
import { ref, computed } from 'vue'
42-
import Vue3Jsoneditor from 'v3-jsoneditor/src/Vue3Jsoneditor.vue'
42+
// import Vue3Jsoneditor from 'v3-jsoneditor/src/Vue3Jsoneditor.vue'
4343
4444
const deviceConfig = ref({
4545
name: 'dyla1n'

src/views/iot/device/device/detail/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
:device="device"
2727
/>
2828
</el-tab-pane>
29-
<el-tab-pane label="设备配置" name="config">
29+
<!-- <el-tab-pane label="设备配置" name="config">
3030
<DeviceDetailConfig />
31-
</el-tab-pane>
31+
</el-tab-pane> -->
3232
</el-tabs>
3333
</el-col>
3434
</template>

0 commit comments

Comments
 (0)