diff --git a/src/api/hardware/device.js b/src/api/hardware/device.js index 04ba8e4..8929c6f 100644 --- a/src/api/hardware/device.js +++ b/src/api/hardware/device.js @@ -1,56 +1,55 @@ -import request from '@/utils/request' +import request from '@/utils/request'; // 查询设备列表 export function list(params) { - return request({ - url: '/system/device/list', - method: 'get', - params - }) + return request({ + url: '/system/device/list', + method: 'get', + params + }); } - // 查询设备详细 export function info(deviceId) { - return request({ - url: '/system/device/' + deviceId, - method: 'get' - }) - } + return request({ + url: '/system/device/' + deviceId, + method: 'get' + }); +} // 新增设备 export function add(data) { - return request({ - url: '/system/device', - method: 'post', - data - }) + return request({ + url: '/system/device', + method: 'post', + data + }); } // 修改设备 export function update(data) { - return request({ - url: '/system/device', - method: 'post', - data - }) + return request({ + url: '/system/device', + method: 'post', + data + }); } // 删除设备 export function del(ids) { - return request({ - url: '/system/device/' + ids, - method: 'delete' - }) + return request({ + url: '/system/device/' + ids, + method: 'delete' + }); } // 新增更新设备记录 export function saveDeviceFirmware(data) { - return request({ - url: '/system/device/saveDeviceFirmware', - method: 'post', - data - }) + return request({ + url: '/system/device/saveDeviceFirmware', + method: 'post', + data + }); } // 导出设备列表 @@ -63,39 +62,46 @@ export function exportEquipment(params) { // 下载用户导入模板 export function importTemplate() { return request({ - url: '/system/device/importTemplate', - }) + url: '/system/device/importTemplate' + }); } - // 获取白名单列表 export function whiteList(params) { return request({ - url: '/system/device/whiteList', - method: 'get', - params - }) + url: '/system/device/whiteList', + method: 'get', + params + }); } /** * 批量添加白名单 - * @param {Array} ids + * @param {Array} ids */ export function addWhiteDevice(ids) { return request({ - url: '/system/device/addWhiteDevice/', - method: 'post', - data: {ids} - }) + url: '/system/device/addWhiteDevice/', + method: 'post', + data: { ids } + }); } /** * 批量移除白名单 - * @param {Array} ids + * @param {Array} ids */ export function delWhiteDevice(ids) { return request({ - url: '/system/device/delWhiteDevice', - method: 'post', - data: {ids} - }) -} \ No newline at end of file + url: '/system/device/delWhiteDevice', + method: 'post', + data: { ids } + }); +} +// echarts 展示历史数据 +export function getKeyHistory(data) { + return request({ + url: '/system/signal/getKeyHistory', + method: 'post', + data + }); +} diff --git a/src/views/hardware/device/detail.vue b/src/views/hardware/device/detail.vue index a2a8e66..9f5f440 100644 --- a/src/views/hardware/device/detail.vue +++ b/src/views/hardware/device/detail.vue @@ -2,13 +2,20 @@
- 设备名称:{{info.deviceName }} + 设备名称:{{ info.deviceName }} - 设备型号:{{info.deviceModel }} + + 设备SN:{{ info.deviceId }} - 设备类型:{{ info.deviceType ? this.deviceTypeList.find(v=> v.value == info.deviceType).label : '' }} + 设备类型:{{ + info.deviceType + ? this.deviceTypeList.find(v => v.value == info.deviceType).label + : '' + }} 省:{{ info.proName }} @@ -22,43 +29,152 @@ 创建时间:{{ info.createTime | formatDate }} - + -
- +
+ -
{{v.keyCN}}:{{v.valueCN}}
+
+ + + + {{ v.keyCN }}:{{ v.valueCN }} + + + +
+
+ +
+ {{ + signalUpdateTime | formatDate + }} + 历史性能 +
- {{signalUpdateTime | formatDate }}
-
+ + + + + 查询 +
+
- \ No newline at end of file +