diff --git a/src/api/iot/device/device/index.ts b/src/api/iot/device/device/index.ts
index 74c184c0..57d66e99 100644
--- a/src/api/iot/device/device/index.ts
+++ b/src/api/iot/device/device/index.ts
@@ -128,16 +128,6 @@ export const DeviceApi = {
return await request.get({ url: `/iot/device/simple-list?`, params: { deviceType } })
},
- // 获取设备属性最���数据
- getDevicePropertiesLatestData: async (params: any) => {
- return await request.get({ url: `/iot/device/data/latest`, params })
- },
-
- // 获取设备属性历史数据
- getDevicePropertiesHistoryData: async (params: any) => {
- return await request.get({ url: `/iot/device/data/history`, params })
- },
-
// 获取导入模板
importDeviceTemplate: async () => {
return await request.download({ url: `/iot/device/get-import-template` })
@@ -145,10 +135,19 @@ export const DeviceApi = {
// 模拟设备上报
simulationReportDevice: async (data: IotDeviceSimulationReportReqVO) => {
- // TODO @super:/iot/device/simulator
return await request.post({ url: `/iot/device/simulation-report`, data })
},
+ // 获取设备属性最新数据
+ getLatestDeviceProperties: async (params: any) => {
+ return await request.get({ url: `/iot/device/property/latest`, params })
+ },
+
+ // 获取设备属性历史数据
+ getHistoryDevicePropertyPage: async (params: any) => {
+ return await request.get({ url: `/iot/device/property/history-page`, params })
+ },
+
// 查询设备日志分页
getDeviceLogPage: async (params: any) => {
return await request.get({ url: `/iot/device/log/page`, params })
diff --git a/src/views/iot/device/device/detail/DeviceDataDetail.vue b/src/views/iot/device/device/detail/DeviceDataDetail.vue
index 3726f39a..c2723ec7 100644
--- a/src/views/iot/device/device/detail/DeviceDataDetail.vue
+++ b/src/views/iot/device/device/detail/DeviceDataDetail.vue
@@ -37,11 +37,11 @@
-
+
{
detailLoading.value = true
try {
- const data = await DeviceApi.getDevicePropertiesHistoryData(queryParams)
+ const data = await DeviceApi.getHistoryDevicePropertyPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
@@ -94,7 +94,7 @@ const getList = async () => {
}
/** 打开弹窗 */
-const open = async (deviceId: number, identifier: String) => {
+const open = (deviceId: number, identifier: string) => {
dialogVisible.value = true
queryParams.deviceId = deviceId
queryParams.identifier = identifier
diff --git a/src/views/iot/device/device/detail/DeviceDetailsModel.vue b/src/views/iot/device/device/detail/DeviceDetailsModel.vue
index cbd4d5ce..e83c61d0 100644
--- a/src/views/iot/device/device/detail/DeviceDetailsModel.vue
+++ b/src/views/iot/device/device/detail/DeviceDetailsModel.vue
@@ -57,7 +57,7 @@
查看数据
@@ -102,7 +102,7 @@ const getList = async () => {
loading.value = true
try {
queryParams.deviceId = props.device.id
- list.value = await DeviceApi.getDevicePropertiesLatestData(queryParams)
+ list.value = await DeviceApi.getLatestDeviceProperties(queryParams)
} finally {
loading.value = false
}
@@ -123,7 +123,7 @@ const resetQuery = () => {
/** 添加/修改操作 */
const detailRef = ref()
-const openDetail = (deviceId: number, identifier: String) => {
+const openDetail = (deviceId: number, identifier: string) => {
detailRef.value.open(deviceId, identifier)
}