diff --git a/src/views/board/board1/index.vue b/src/views/board/board1/index.vue index 40597cc..80985d8 100644 --- a/src/views/board/board1/index.vue +++ b/src/views/board/board1/index.vue @@ -6,30 +6,30 @@
设备数量 - {{ deviceData.TOTALCOUNT }} + {{ runningData.TOTALCOUNT }}
开机率 - {{ deviceData.runningRate }} + {{ runningData.runningRate }}
运行 - {{ deviceData.RUNNINGCOUNT }} + {{ runningData.RUNNINGCOUNT }}
停机 - {{ deviceData.STOPPEDCOUNT }} + {{ runningData.STOPPEDCOUNT }}
待机 - {{ deviceData.STANDBYCOUNT }} + {{ runningData.STANDBYCOUNT }}
@@ -41,31 +41,31 @@
未开机 - {{ deviceData.NOTSTARTEDCOUNT }} + {{ runningData.NOTSTARTEDCOUNT }}
-
-
AE-MD-S10
+
+
{{ i.DEVICENAME }}
-
停机
-
待机
-
正常运行
-
待料
-
- 6 +
停机
+
待机
+
正常运行
+
未开机
+
+ {{ timeData[i.DEVICECODE] || '0' }} min
-
- 6 +
+ {{ timeData[i.DEVICECODE] || '0' }} min
-
- 6 +
+ {{ timeData[i.DEVICECODE] || '0' }} min
-
- 6 +
+ {{ timeData[i.DEVICECODE] || '0' }} min
待机时长
@@ -84,7 +84,7 @@ import Chart from "@/components/board/Chart.vue"; import * as echarts from "echarts"; -import {getDeviceStatusStatistics} from "@/api/baseDeviceParamVal/val"; +import {getDeviceStartTimeList, getDeviceStatusList, getDeviceStatusStatistics} from "@/api/baseDeviceParamVal/val"; let timer = null @@ -96,7 +96,9 @@ export default { name: "Liner", data() { return { - deviceData: {} + runningData: {}, + deviceData: [], + timeData: {} } }, mounted() { @@ -242,8 +244,20 @@ export default { methods: { getData() { getDeviceStatusStatistics().then(e => { - this.deviceData = e.data + this.runningData = e.data }) + setTimeout(() => { + getDeviceStatusList().then(res => { + this.deviceData = res.data + }) + }, 1000) + setTimeout(() => { + getDeviceStartTimeList().then(res => { + res.data.forEach(e => { + this.timeData[e.DEVICECODE] = e.STARTTIME / 60 + }) + }) + }, 2000) } }, computed: {