@@ -132,6 +132,12 @@ import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
import digital from './dashboard/digital'
+import { statistic, byEquType, listMonitor, alertMessageTimes } from "@/api/index/index"
+import { getToken } from "@/utils/auth"
+import Treeselect from "@riophae/vue-treeselect"
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
+import { Splitpanes, Pane } from "splitpanes"
+import "splitpanes/dist/splitpanes.css"
export default {
name: 'Index',
@@ -174,7 +180,47 @@ export default {
level: 0,
status: 'normal',
icon: 'fas fa-check-circle'
- }
+ },
+ {
+ id: 1,
+ deviceName: 'PLC远程监控系统',
+ time: '2021-10-16 14:54:11',
+ location: '污水处理监控系统',
+ message: '2#电机运行状态等于1',
+ level: 1,
+ status: 'warning',
+ icon: 'fas fa-exclamation-circle'
+ },
+ {
+ id: 2,
+ deviceName: 'PLC远程监控系统',
+ time: '2021-10-16 14:54:04',
+ location: '污水处理监控系统',
+ message: '2#电机运行状态报警恢复',
+ level: 0,
+ status: 'normal',
+ icon: 'fas fa-check-circle'
+ },
+ {
+ id: 1,
+ deviceName: 'PLC远程监控系统',
+ time: '2021-10-16 14:54:11',
+ location: '污水处理监控系统',
+ message: '2#电机运行状态等于1',
+ level: 1,
+ status: 'warning',
+ icon: 'fas fa-exclamation-circle'
+ },
+ {
+ id: 2,
+ deviceName: 'PLC远程监控系统',
+ time: '2021-10-16 14:54:04',
+ location: '污水处理监控系统',
+ message: '2#电机运行状态报警恢复',
+ level: 0,
+ status: 'normal',
+ icon: 'fas fa-check-circle'
+ },
],
tableHeaders: ['设备名称', '设备位置', 'CPU使用率', '内存使用率', '温度', '健康度', '设备运行时长', '采集时间'],
deviceStatus: [
@@ -240,8 +286,45 @@ export default {
if (health >= 80) return 'health-good';
if (health >= 60) return 'health-warning';
return 'health-critical';
- }
- }
+ },
+ getstatistic() {
+ this.loading = true
+ statistic().then(response => {
+ console.log("%c 🎹: getList -> response ", "font-size:16px;background-color:#624a64;color:white;", response)
+ this.loading = false
+ }
+ )
+ },
+ getbyEquType() {
+ this.loading = true
+ byEquType().then(response => {
+ this.loading = false
+ }
+ )
+ },
+ getlistMonitor() {
+ this.loading = true
+ listMonitor({id:11}).then(response => {
+ this.loading = false
+ }
+ )
+ },
+ getalertMessageTimes() {
+ this.loading = true
+ alertMessageTimes().then(response => {
+ this.loading = false
+ }
+ )
+ },
+ },
+ created() {
+ this.getstatistic()
+ this.getbyEquType()
+ this.getlistMonitor()
+ this.getalertMessageTimes()
+
+
+ },
}