-
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: {