diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue
index a95575c..93d9fba 100644
--- a/src/views/basic/device/detail.vue
+++ b/src/views/basic/device/detail.vue
@@ -223,7 +223,7 @@
-
+
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue
index a95575c..93d9fba 100644
--- a/src/views/basic/device/detail.vue
+++ b/src/views/basic/device/detail.vue
@@ -223,7 +223,7 @@
-
+
diff --git a/src/views/basic/device/device-info.ts b/src/views/basic/device/device-info.ts
index e0ff66e..4de8091 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -36,6 +36,7 @@
createUserId: string
createUserName?: string
dataValue?: string
+ logtime?: string
}
export interface IConfigListQuery {
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue
index a95575c..93d9fba 100644
--- a/src/views/basic/device/detail.vue
+++ b/src/views/basic/device/detail.vue
@@ -223,7 +223,7 @@
-
+
diff --git a/src/views/basic/device/device-info.ts b/src/views/basic/device/device-info.ts
index e0ff66e..4de8091 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -36,6 +36,7 @@
createUserId: string
createUserName?: string
dataValue?: string
+ logtime?: string
}
export interface IConfigListQuery {
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index cec6912..f9eab27 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getGroupList } from '@/api/basic/group'
import { delDevice, exportDevice, getDeviceListPage } from '@/api/basic/device'
+import { getDeviceLatestBizData } from '@/api/data/query'
const router = useRouter()
@@ -113,6 +114,16 @@
total.value = parseInt(response.data.total)
}
loadingTable.value = false
+
+ dataList.value.forEach((item) => {
+ getDeviceLatestBizData({ devCode: item.devcode }).then((res) => {
+ if (res.code === 200) {
+ item.dataValue = res.data.value
+ item.logtime = res.data.logtime
+ item.cell = res.data.cell
+ }
+ })
+ })
}).catch(() => {
loadingTable.value = false
})
@@ -275,6 +286,9 @@
导出列表
+
+ 新增设备
+
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue
index a95575c..93d9fba 100644
--- a/src/views/basic/device/detail.vue
+++ b/src/views/basic/device/detail.vue
@@ -223,7 +223,7 @@
-
+
diff --git a/src/views/basic/device/device-info.ts b/src/views/basic/device/device-info.ts
index e0ff66e..4de8091 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -36,6 +36,7 @@
createUserId: string
createUserName?: string
dataValue?: string
+ logtime?: string
}
export interface IConfigListQuery {
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index cec6912..f9eab27 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getGroupList } from '@/api/basic/group'
import { delDevice, exportDevice, getDeviceListPage } from '@/api/basic/device'
+import { getDeviceLatestBizData } from '@/api/data/query'
const router = useRouter()
@@ -113,6 +114,16 @@
total.value = parseInt(response.data.total)
}
loadingTable.value = false
+
+ dataList.value.forEach((item) => {
+ getDeviceLatestBizData({ devCode: item.devcode }).then((res) => {
+ if (res.code === 200) {
+ item.dataValue = res.data.value
+ item.logtime = res.data.logtime
+ item.cell = res.data.cell
+ }
+ })
+ })
}).catch(() => {
loadingTable.value = false
})
@@ -275,6 +286,9 @@
导出列表
+
+ 新增设备
+
diff --git a/src/views/data/query/data-query.ts b/src/views/data/query/data-query.ts
index 4ec375f..fb07791 100644
--- a/src/views/data/query/data-query.ts
+++ b/src/views/data/query/data-query.ts
@@ -2,7 +2,7 @@
export interface IListQuery {
groupId: string // 分组
productId?: string // 产品
- devcode: string
+ devCode: string
deviceType: string
beginTime?: string // 电量
endTime?: string //
diff --git a/.env.production b/.env.production
index b5508a5..f3861ab 100644
--- a/.env.production
+++ b/.env.production
@@ -3,7 +3,7 @@
# 页面标题
VITE_APP_TITLE = 物联网设备管理平台
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:12206
+VITE_APP_API_BASEURL = http://111.198.10.15:11608
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/src/api/basic/group.ts b/src/api/basic/group.ts
index 8b6a2ff..1cffe80 100644
--- a/src/api/basic/group.ts
+++ b/src/api/basic/group.ts
@@ -2,9 +2,9 @@
const prefix = 'device/group'
// 查询分组列表 分页
-export function getGroupListPage(data: object) {
+export function getGroupListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
method: 'post',
data,
})
diff --git a/src/api/data/query.ts b/src/api/data/query.ts
index 9b5de39..8923b4d 100644
--- a/src/api/data/query.ts
+++ b/src/api/data/query.ts
@@ -2,9 +2,26 @@
const prefix = 'device/data'
// 查询数据 分页
-export function getDeviceDataListPage(data: object) {
+export function getDeviceDataListPage(data: any) {
return request({
- url: `${prefix}/list-page`,
+ url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+// 查询数据 分页
+export function getDeviceBizDataListPage(data: any) {
+ return request({
+ url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
+export function getDeviceLatestBizData(data: object) {
+ return request({
+ url: `${prefix}/latestBizData`,
method: 'post',
data,
})
diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue
index a95575c..93d9fba 100644
--- a/src/views/basic/device/detail.vue
+++ b/src/views/basic/device/detail.vue
@@ -223,7 +223,7 @@
-
+
diff --git a/src/views/basic/device/device-info.ts b/src/views/basic/device/device-info.ts
index e0ff66e..4de8091 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -36,6 +36,7 @@
createUserId: string
createUserName?: string
dataValue?: string
+ logtime?: string
}
export interface IConfigListQuery {
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index cec6912..f9eab27 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getGroupList } from '@/api/basic/group'
import { delDevice, exportDevice, getDeviceListPage } from '@/api/basic/device'
+import { getDeviceLatestBizData } from '@/api/data/query'
const router = useRouter()
@@ -113,6 +114,16 @@
total.value = parseInt(response.data.total)
}
loadingTable.value = false
+
+ dataList.value.forEach((item) => {
+ getDeviceLatestBizData({ devCode: item.devcode }).then((res) => {
+ if (res.code === 200) {
+ item.dataValue = res.data.value
+ item.logtime = res.data.logtime
+ item.cell = res.data.cell
+ }
+ })
+ })
}).catch(() => {
loadingTable.value = false
})
@@ -275,6 +286,9 @@
导出列表
+
+ 新增设备
+
diff --git a/src/views/data/query/data-query.ts b/src/views/data/query/data-query.ts
index 4ec375f..fb07791 100644
--- a/src/views/data/query/data-query.ts
+++ b/src/views/data/query/data-query.ts
@@ -2,7 +2,7 @@
export interface IListQuery {
groupId: string // 分组
productId?: string // 产品
- devcode: string
+ devCode: string
deviceType: string
beginTime?: string // 电量
endTime?: string //
diff --git a/src/views/data/query/list.vue b/src/views/data/query/list.vue
index 9976ba3..4fd73bd 100644
--- a/src/views/data/query/list.vue
+++ b/src/views/data/query/list.vue
@@ -10,14 +10,14 @@
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
import { getGroupList } from '@/api/basic/group'
-import { exportDeviceData, getDeviceDataListPage } from '@/api/data/query'
+import { exportDeviceData, getDeviceBizDataListPage, getDeviceDataListPage } from '@/api/data/query'
const props = defineProps({
embedded: {
type: Boolean,
default: false,
},
- devcode: {
+ devCode: {
type: String,
default: '',
},
@@ -31,7 +31,7 @@
// 查询条件
const searchQuery = ref({
groupId: '', // 分组
- devcode: props.devcode === undefined ? '' : props.devcode,
+ devCode: props.devCode === undefined ? '' : props.devCode,
deviceType: '',
beginTime: '',
endTime: '',
@@ -49,7 +49,8 @@
{ text: '设备编号', value: 'devcode', align: 'center', width: '140' },
{ text: '设备类型', value: 'deviceTypeName', align: 'center', width: '200' },
{ text: '电量(%)', value: 'cell', align: 'center', width: '80' },
- { text: '内容', value: 'dataJson', align: 'center' },
+ { text: '业务类型', value: 'bizTypeName', align: 'center', width: '180' },
+ { text: '值', value: 'value', align: 'center' },
{ text: '采集时间', value: 'uptime', align: 'center', width: '180' },
{ text: '上报时间', value: 'logtime', align: 'center', width: '180' },
{ text: '设备状态', value: 'status', align: 'center', width: '90' },
@@ -102,7 +103,7 @@
// 是否显示当前页,否则跳转第一页
searchQuery.value.offset = 1
}
- getDeviceDataListPage(searchQuery.value).then((response) => {
+ getDeviceBizDataListPage(searchQuery.value).then((response) => {
if (response.code === 200) {
dataList.value = response.data.rows.map((item: IDataDetailInfo) => {
return {
@@ -136,7 +137,7 @@
const reset = () => {
searchQuery.value = {
groupId: '', // 分组
- devcode: props.devcode,
+ devCode: props.devCode,
deviceType: '',
beginTime: '',
endTime: '',
@@ -209,7 +210,7 @@
watch(props, (val) => {
// 如果是嵌入的页面 当devcode改变时则将查询条件进行修改
if (val.embedded === true) {
- searchQuery.value.devcode = props.devcode
+ searchQuery.value.devCode = props.devCode
}
})
@@ -230,7 +231,7 @@
-
+
@@ -246,7 +247,7 @@
-
+