diff --git a/src/apis/index.js b/src/apis/index.js index 64388fc..8212815 100644 --- a/src/apis/index.js +++ b/src/apis/index.js @@ -18,6 +18,12 @@ export const changePassword = params => http.post(`${users}/password/account`, p // 获取设备列表 export const getDevices = () => http.get(`${corrosion}/devices`); +// 获取报警设备列表 +export const getWarningDevices = params => http.post(`${corrosion}/devices/warning/list`, params); + +// 关闭设备的报警 +export const removeWarning = deviceId => http.post(`${corrosion}/devices/warning/close`, { warningIdList: [deviceId] }); + // 查设备概览 数据统计 export const getDevicesCount = () => http.get(`${corrosion}/devices/count`); diff --git a/src/components/history/local.vue b/src/components/history/local.vue index 9e22826..d44e66c 100644 --- a/src/components/history/local.vue +++ b/src/components/history/local.vue @@ -23,10 +23,19 @@ - - + + + + + + + + + + +
报警数量
{{ count.warning }}
-
-
+
+
@@ -39,8 +39,8 @@
故障数量
{{ count.fault }}
-
-
+
+
diff --git a/src/components/overview/device-table.vue b/src/components/overview/device-table.vue index 51fbd76..a243dbf 100644 --- a/src/components/overview/device-table.vue +++ b/src/components/overview/device-table.vue @@ -15,7 +15,13 @@ @@ -42,23 +48,34 @@ @current-change="onCurrentPageChange" > + + + + diff --git a/src/components/overview/warning-table.vue b/src/components/overview/warning-table.vue new file mode 100644 index 0000000..0ccb191 --- /dev/null +++ b/src/components/overview/warning-table.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/views/data-realtime.vue b/src/views/data-realtime.vue index 14bfdf9..c5fe74c 100644 --- a/src/views/data-realtime.vue +++ b/src/views/data-realtime.vue @@ -21,7 +21,6 @@ -