diff --git a/src/apis/index.js b/src/apis/index.js index 753797c..10515ba 100644 --- a/src/apis/index.js +++ b/src/apis/index.js @@ -13,21 +13,7 @@ export const getToken = userId => http.get(`${users}/userId`, { params: { userId export const getDevices = () => http.get(`${corrosion}/devices`); // 查设备概览 数据统计 -// export const getDevicesCount = () => http.get(`${corrosion}/devices/count`); -export const getDevicesCount = () => { - return new Promise(resolve => { - setTimeout(() => { - resolve({ - total: 100, - online: 90, - offline: 10, - fault: 10, - warning: 15, - normal: 65, - }); - }, 100); - }); -}; +export const getDevicesCount = () => http.get(`${corrosion}/devices/count`); // 添加设备 export const createDevice = data => http.post(`${corrosion}/devices`, data); @@ -35,11 +21,18 @@ export const createDevice = data => http.post(`${corrosion}/devices`, data); // 获取设备列表 完整信息 export const getDevicesAll = ( params = { + paging: true, deviceId: '', page: 1, size: 50, + sort: [ + { + col: 'createdAt', + order: 'ASC', + }, + ], }, -) => http.get(`${corrosion}/devices/all`, { params }); +) => http.post(`${corrosion}/devices/all`, params); // 更新设备 export const updateDevice = (deviceId, data) => http.put(`${corrosion}/devices/all/${deviceId}`, data); @@ -50,13 +43,13 @@ export const deleteDevice = deviceId => http.delete(`${corrosion}/devices/all/${ // 获取月累计数据分析 export const getMonthsDate = params => http.get(`${corrosion}/statistics/months`, { params }); -// 获取网络配置参数 +// 获取网络配置参数 列表 export const getConfigNetwork = params => http.get(`${corrosion}/config/network`, { params }); // 获取网络配置参数 设备实时参数 export const getConfigAppliedNetwork = params => http.get(`${corrosion}/config-applied/network`, { params }); -// 获取功能配置参数 +// 获取功能配置参数 列表 export const getConfigFunction = params => http.get(`${corrosion}/config/function`, { params }); // 获取功能配置参数 设备实时参数 diff --git a/src/components/config/config-log-function.vue b/src/components/config/config-log-function.vue new file mode 100644 index 0000000..c9d555d --- /dev/null +++ b/src/components/config/config-log-function.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/components/config/config-log-network.vue b/src/components/config/config-log-network.vue new file mode 100644 index 0000000..7c099e7 --- /dev/null +++ b/src/components/config/config-log-network.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/components/config/config-log.vue b/src/components/config/config-log.vue deleted file mode 100644 index acec61c..0000000 --- a/src/components/config/config-log.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - diff --git a/src/components/config/device-select-and-status.vue b/src/components/config/device-select-and-status.vue index 797b310..3e2c444 100644 --- a/src/components/config/device-select-and-status.vue +++ b/src/components/config/device-select-and-status.vue @@ -1,17 +1,12 @@ diff --git a/src/components/config/network-config-applied.vue b/src/components/config/network-config-applied.vue new file mode 100644 index 0000000..183c611 --- /dev/null +++ b/src/components/config/network-config-applied.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/components/config/status-and-last-time.vue b/src/components/config/status-and-last-time.vue index 9136cff..47bd200 100644 --- a/src/components/config/status-and-last-time.vue +++ b/src/components/config/status-and-last-time.vue @@ -3,7 +3,7 @@ 配置状态:{{ PEND_TYPE[settingStatus].text }} - 最后配置时间:{{ dayjs(data.settingTime).format('YYYY-MM-DD HH:mm:ss') }} + 最后配置时间:{{ dayjs(settingTime).format('YYYY-MM-DD HH:mm:ss') }} diff --git a/src/components/config/status-tag-pending.vue b/src/components/config/status-tag-pending.vue new file mode 100644 index 0000000..d01c55e --- /dev/null +++ b/src/components/config/status-tag-pending.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/components/device/device-create.vue b/src/components/device/device-create.vue index 874d8d0..a4a5436 100644 --- a/src/components/device/device-create.vue +++ b/src/components/device/device-create.vue @@ -13,6 +13,14 @@ + + + + 大气腐蚀 + 其他 + + + @@ -101,19 +109,13 @@ - - - - - - - + @@ -121,6 +123,14 @@ + + + + + + + + 提交 diff --git a/src/components/overview/device-table.vue b/src/components/overview/device-table.vue index 2c02c2c..7d0be79 100644 --- a/src/components/overview/device-table.vue +++ b/src/components/overview/device-table.vue @@ -3,16 +3,26 @@ - - + + + + + + @@ -40,8 +50,10 @@ diff --git a/src/views/config.vue b/src/views/config.vue index a415904..7be3d00 100644 --- a/src/views/config.vue +++ b/src/views/config.vue @@ -9,8 +9,11 @@ - - + + + + + @@ -20,7 +23,8 @@ import { ref } from 'vue'; import DeviceSelectAndStatus from 'components/config/device-select-and-status.vue'; import FunctionConfigPending from 'components/config/function-config-pending.vue'; import NetworkConfigPending from 'components/config/network-config-pending.vue'; -import ConfigLog from 'components/config/config-log.vue'; +import ConfigLogFunction from 'components/config/config-log-function.vue'; +import ConfigLogNetwork from 'components/config/config-log-network.vue'; const status = ref(''); diff --git a/src/views/device-edit.vue b/src/views/device-edit.vue index 55692b8..22097f8 100644 --- a/src/views/device-edit.vue +++ b/src/views/device-edit.vue @@ -13,6 +13,14 @@ + + + + 大气腐蚀 + 其他 + + + @@ -101,19 +109,13 @@ - - - - - - - + @@ -121,6 +123,14 @@ + + + + + + + + 提交 diff --git a/src/views/device-list.vue b/src/views/device-list.vue index 39c985f..1441fa7 100644 --- a/src/views/device-list.vue +++ b/src/views/device-list.vue @@ -19,9 +19,11 @@ 试样:{{ props.row.simple }} 安装位置:{{ props.row.installLocation }} sim1:{{ props.row.sim1 }} - 与主站后台联调情况:{{ props.row.joint }} - 维修记录:{{ props.row.operationRecord }} + 协议版本:{{ props.row.protocolVersion }} + 产品类型:{{ ASDU_TYPE[props.row.type].text }} + 与主站后台联调情况:{{ props.row.joint }} 备注:{{ props.row.remark }} + 维修记录:{{ props.row.operationRecord }} @@ -31,7 +33,9 @@ @@ -101,6 +105,7 @@ import DeviceEdit from 'components/device/device-edit.vue'; import DeviceCreate from 'components/device/device-create.vue'; import useDeviceCreate from '@/hooks/useDeviceCreate'; import { STATUS_COLOR } from '@/config/config'; +import { ASDU_TYPE } from '@/config/log'; let timer = null; const store = useStore();