Commit cc1a025a by 芋道源码 Committed by Gitee

!721 【功能新增】:IOT首页(后端code review修改配套版)

Merge pull request !721 from alwayssuper/feature/iot
parents dd1eb5de 9640531c
import request from '@/config/axios'
/** 统计数据类型 */
export interface IotStatisticsSummaryRespVO {
productCategoryCount: number
productCount: number
deviceCount: number
deviceMessageCount: number
productCategoryTodayCount: number
productTodayCount: number
deviceTodayCount: number
deviceMessageTodayCount: number
deviceOnlineCount: number
deviceOfflineCount: number
deviceInactiveCount: number
productCategoryDeviceCounts: Record<string, number>
}
/** 消息统计数据类型 */
export interface IotStatisticsDeviceMessageSummaryRespVO {
upstreamCounts: Record<number, number>
downstreamCounts: Record<number, number>
}
// IoT 数据统计 API
export const ProductCategoryApi = {
// 查询IoT基础数据统计
getIotStatisticsSummary: async () => {
return await request.get<IotStatisticsSummaryRespVO>({
url: `/iot/statistics/get-summary`
})
},
// 查询IoT上下行消息数据统计
getIotStatisticsDeviceMessageSummary: async (params: {
startTime: number
endTime: number
}) => {
return await request.get<IotStatisticsDeviceMessageSummaryRespVO>({
url: `/iot/statistics/get-log-summary`,
params
})
}
}
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import Vue3Jsoneditor from 'v3-jsoneditor/src/Vue3Jsoneditor.vue' // import Vue3Jsoneditor from 'v3-jsoneditor/src/Vue3Jsoneditor.vue'
const deviceConfig = ref({ const deviceConfig = ref({
name: 'dyla1n' name: 'dyla1n'
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
:device="device" :device="device"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设备配置" name="config"> <!-- <el-tab-pane label="设备配置" name="config">
<DeviceDetailConfig /> <DeviceDetailConfig />
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment