+
+
{{ i.DEVICENAME }}
+
+
停机
+
待机
+
正常运行
+
未开机
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }}
+ h
+
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }}
+ h
+
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }}
+ h
+
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }}
+ h
+
+
待机时长
+
{{ i.DEVICENAME }}
@@ -77,6 +109,70 @@
+
+ 配置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -85,6 +181,9 @@
import Chart from "@/components/board/Chart.vue";
import * as echarts from "echarts";
import {getDeviceStartTimeList, getDeviceStatusList, getDeviceStatusStatistics} from "@/api/baseDeviceParamVal/val";
+import {getSimulateData} from "@/api/board/getData";
+import {updateCustomData} from "@/api/base/customData";
+import {Message} from "element-ui";
let timer = null
@@ -96,12 +195,40 @@ export default {
name: "Liner",
data() {
return {
+ options: [
+ {
+ value: 0,
+ label: '未开机'
+ },
+ {
+ value: 1,
+ label: '正常运行'
+ },
+ {
+ value: 2,
+ label: '停机'
+ },
+ {
+ value: 3,
+ label: '待机'
+ },
+ ],
+ isData: false,
+ configDialogVisible: false,
+ form: {
+ },
runningData: {},
deviceData: [],
timeData: {}
}
},
- mounted() {
+ async mounted() {
+ await this.getData()
+ getSimulateData({customCode: 'board-3' || '', customType: 1}).then(val => {
+ this.row = val.rows[0]
+ this.form = JSON.parse(val.rows[0].customData);
+ this.isData = true
+ })
this.$refs.chart1.setData({
title: [
{
@@ -236,36 +363,32 @@ export default {
},
],
})
- this.getData()
timer = setInterval(() => {
this.getData()
}, 1000 * 60 * 10)
},
methods: {
- getData() {
- getDeviceStatusStatistics().then(e => {
+ async getData() {
+ await getDeviceStatusStatistics().then(e => {
this.runningData = e.data
})
- setTimeout(() => {
- getDeviceStatusList().then(res => {
- this.deviceData = res.data
+ await getDeviceStatusList().then(res => {
+ this.deviceData = res.data.filter(e=>!(e.DEVICENAME ==="5#"||e.DEVICENAME ==="10#"||e.DEVICENAME ==="12#"||e.DEVICENAME ==="17#"||e.DEVICENAME ==="18#"))
+ })
+ getDeviceStartTimeList().then(res => {
+ res.data.forEach(e => {
+ this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
})
- }, 1000 * 2)
- setTimeout(() => {
- getDeviceStartTimeList().then(res => {
- res.data.forEach(e => {
- this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
- })
- })
- }, 1000 * 2)
- }
- },
- computed: {
- list() {
- return Array(222).fill(0).map(i => {
- return {
- type: Math.floor(Math.random() * 4)
- }
+ })
+ },
+
+ save() {
+ updateCustomData({
+ ...this.row,
+ customData: JSON.stringify(this.form)
+ }).then(res => {
+ Message({message: '保存成功', type: 'success'})
+ this.configDialogVisible = false
})
}
},
@@ -288,6 +411,14 @@ export default {
top: 0;
left: 0;
}
+.top{
+ position: absolute;
+ width: 12vw;
+ height: 3.3vw;
+ background-image: url("../../../assets/board/board-top.png");
+ background-repeat: no-repeat;
+ background-size: 100% 100%;
+}
.subTitle {
position: absolute;
@@ -308,7 +439,7 @@ export default {
.topNum {
position: absolute;
- top: 11.7%;
+ top: calc(8% + 1.65vw);
transform: translateY(-50%);
font-size: 1.3vw;
vertical-align: middle;
@@ -335,7 +466,7 @@ export default {
}
.bootRate {
- left: 18%;
+ left: 20.5%;
color: #DCDFDF;
.text {
@@ -344,7 +475,7 @@ export default {
}
.runNum {
- left: 31.5%;
+ left: 37.5%;
color: #DCDFDF;
.text {
@@ -358,7 +489,21 @@ export default {
}
.shutdownNum {
- left: 45%;
+ left: 53.5%;
+ color: #DCDFDF;
+
+ .text {
+ width: 5vw;
+ letter-spacing: 2vw;
+ }
+
+ .num {
+ color: #FFEB3B;
+ }
+}
+
+.standbyNum {
+ left: 69.5%;
color: #DCDFDF;
.text {
@@ -368,25 +513,12 @@ export default {
.num {
color: #D8070D;
- }
-}
-
-.standbyNum {
- left: 58.5%;
- color: #DCDFDF;
-
- .text {
- width: 5vw;
- letter-spacing: 2vw;
- }
-
- .num {
- color: #E1B00D;
+ //color: #E1B00D;
}
}
.waitMaterials {
- left: 72%;
+ left: 71.5%;
color: #DCDFDF;
.text {
@@ -400,7 +532,7 @@ export default {
}
.unactivatedNum {
- left: 85.5%;
+ left: 85%;
color: #DCDFDF;
.text {
@@ -536,4 +668,30 @@ export default {
height: 30%;
}
+.config {
+ position: absolute;
+ top: 3%;
+ right: 3%;
+ width: 10%;
+ height: 5vw;
+
+ .btn {
+ display: none;
+
+ }
+
+ &:hover {
+ .btn {
+ display: inline-block;
+ }
+ }
+}
+
+.fullLine {
+ width: 100%;
+
+ /deep/ .el-form-item__content {
+ width: calc(100% - 120px);
+ }
+}
diff --git a/src/views/board/board4/index.vue b/src/views/board/board4/index.vue
index 8594738..6d503a9 100644
--- a/src/views/board/board4/index.vue
+++ b/src/views/board/board4/index.vue
@@ -6,7 +6,7 @@
style="color: #6ACBFD">{{ form.isSimulate ? form.text1 : orderStatisticsData.planCount }}
+ style="color: #6AFD81">{{
+ form.isSimulate ? form.text8 : Math.min((runningData.RUNNINGCOUNT || 0) + 5, (runningData.TOTALCOUNT || 0))
+ }}