diff --git a/src/api/dashboard.ts b/src/api/dashboard.ts new file mode 100644 index 0000000..c26bbf5 --- /dev/null +++ b/src/api/dashboard.ts @@ -0,0 +1,22 @@ +import axios from 'axios'; + + +// 获取设备信息 +export function getDeviceInfo() { + return axios.get('/api/rest/device/status'); +} + +// 获取消息信息 +export function getMessageInfo() { + return axios.get('/api/rest/device/record/status'); +} + +// 获取告警信息 +export function getAlarmInfo() { + return axios.get('/api/rest/device/data/status'); +} + +// 获取产品信息 +export function getProductInfo() { + return axios.get('/api/rest/product/status'); +} \ No newline at end of file diff --git a/src/api/device.ts b/src/api/device.ts index ec478bf..6d3e98d 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -32,11 +32,12 @@ export interface DeviceUpdateRecord extends DeviceCreateRecord { export interface DeviceEventRecord { id: number; - clientId: string; + clientId: number; serveName: string; params: string; } + // 分页查询 export function queryDeviceList(data: DeviceRecord) { return axios({ @@ -74,11 +75,11 @@ export function deleteDevice(id: number) { } // 查询上报 -export function queryDeviceReport(clientId: number) { +export function queryDeviceRecord(data: DeviceRecord) { return axios({ - url: `/api/rest/device/record/photo`, + url: `/api/rest/device/record/data`, method: 'get', - params: clientId, + params: data, }); } @@ -95,3 +96,5 @@ export function triggerEvent(data: DeviceEventRecord) { data, }); } + + diff --git a/src/views/dashboard/workplace/components/banner.vue b/src/views/dashboard/workplace/components/banner.vue index 00b5534..beee271 100644 --- a/src/views/dashboard/workplace/components/banner.vue +++ b/src/views/dashboard/workplace/components/banner.vue @@ -1,11 +1,11 @@ @@ -25,7 +25,7 @@ .banner { width: 100%; padding: 20px 20px 0 20px; - background-color: var(--color-bg-2); + //background-color: var(--color-bg-2); border-radius: 4px 4px 0 0; } diff --git a/src/views/dashboard/workplace/components/chain-item.vue b/src/views/dashboard/workplace/components/chain-item.vue new file mode 100644 index 0000000..65932af --- /dev/null +++ b/src/views/dashboard/workplace/components/chain-item.vue @@ -0,0 +1,264 @@ + + + + + diff --git a/src/views/dashboard/workplace/components/data-panel.vue b/src/views/dashboard/workplace/components/data-panel.vue index 3489a99..53a677b 100644 --- a/src/views/dashboard/workplace/components/data-panel.vue +++ b/src/views/dashboard/workplace/components/data-panel.vue @@ -1,158 +1,203 @@ diff --git a/src/views/dashboard/workplace/index.vue b/src/views/dashboard/workplace/index.vue index 8774275..d916b37 100644 --- a/src/views/dashboard/workplace/index.vue +++ b/src/views/dashboard/workplace/index.vue @@ -16,21 +16,23 @@ -
- - -
- - -
-
- - - - - -
-
+ + + + + + + + + + + + + + + + + @@ -50,7 +52,7 @@