yinq 10 months ago
commit ac2b303c08

@ -84,7 +84,7 @@ import {getData} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
let intervalFun = null
export default {
components: {
vueSeamlessScroll,
@ -675,8 +675,20 @@ export default {
this.RequestDataSet.forEach(val => {
mixData(val)
})
intervalFun = setInterval(() => {
this.RequestDataSet.forEach(val => {
mixData(val)
})
}, 1000 * 10)
},
methods: {}
methods: {},
beforeDestroy() {
console.log(1)
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
};
</script>
<style scoped>

@ -20,44 +20,42 @@
{{ i }}
</div>
<div style="position: absolute; top: 23%;left: 30%;width:10vw;color: #fff;font-size: 0.8vw;line-height: 1.5vw">
<div>发泡 - 运行状态</div>
<div>发泡线 - 运行状态</div>
</div>
<div class="info1">
A1
</div>
<div class="status1"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A1')&&statusArr.find(e=>e.X_VALUE === 'A1').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info2">
B1
</div>
<div class="status2"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info3">
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B1')&&statusArr.find(e=>e.X_VALUE === 'B1').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info3" v-if="$route.query.id === '1' || id === '1'">
A2
</div>
<div class="status3"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info4">
<div class="status3" v-if="$route.query.id === '1' || id === '1'"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A2')&&statusArr.find(e=>e.X_VALUE === 'A2').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info4" v-if="$route.query.id === '1' || id === '1'">
B2
</div>
<div class="status4"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="status4" v-if="$route.query.id === '1' || id === '1'"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B2')&&statusArr.find(e=>e.X_VALUE === 'B2').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info5">
A
</div>
<div class="status5"
:style="'background-color:#ff0000'"></div>
<!-- :style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>-->
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A')&&statusArr.find(e=>e.X_VALUE === 'A').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info6">
B
</div>
<div class="status6"
:style="'background-color:#ff0000'"></div>
<!-- :style="'background-color:'+(statusArr.find(e=>e.X_VALUE === '状态')&&statusArr.find(e=>e.X_VALUE === '状态').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>-->
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B')&&statusArr.find(e=>e.X_VALUE === 'B').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div style="position: absolute; top: 23%;left: 55%;width:10vw;color: #fff;font-size: 0.8vw;line-height: 1.5vw">
<div>发泡线 - 运行状态</div>
<div>发泡 - 运行状态</div>
</div>
<div class="foamingMachine"></div>
@ -354,6 +352,7 @@ import * as echarts from 'echarts'
import {getData, getFoamingData, getCurrentTeamTimeList} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
let intervalFun = null
export default {
components: {
vueSeamlessScroll,
@ -1600,7 +1599,7 @@ export default {
value15: totalArr.map(val => val.value18).reduce((acc, curr) => acc + curr, 0),
value16: totalArr.map(val => val.value19).reduce((acc, curr) => acc + curr, 0),
}
}, 3 * 1000)
}, 30 * 1000)
if (this.$route.query.id === '1' || this.id === '1') {
this.RequestDataSet.forEach(val => {
mixData(val)
@ -1615,8 +1614,31 @@ export default {
})
}
intervalFun = setInterval(() => {
if (this.$route.query.id === '1' || this.id === '1') {
this.RequestDataSet.forEach(val => {
mixData(val)
})
} else if (this.$route.query.id === '2' || this.id === '2') {
this.RequestDataSet1.forEach(val => {
mixData(val)
})
} else {
this.RequestDataSet.forEach(val => {
mixData(val)
})
}
}, 1000 * 10)
},
methods: {}
methods: {},
beforeDestroy() {
console.log(1)
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
};
</script>
<style scoped>

@ -13,7 +13,7 @@
条码:
</span>
<span>
{{ gz.value1 }}
{{ gz.COLUMN_A }}
</span>
</p>
<p>
@ -21,7 +21,7 @@
型号:
</span>
<span>
{{ gz.value2 }}
{{ gz.COLUMN_B }}
</span>
</p>
<p>
@ -29,7 +29,7 @@
灌注类型:
</span>
<span>
{{ gz.value3 }}
{{ gz.COLUMN_C }}
</span>
</p>
<p>
@ -37,7 +37,7 @@
灌注量:
</span>
<span>
{{ gz.value4 }}
{{ gz.COLUMN_D }}
</span>
</p>
<p>
@ -45,7 +45,7 @@
灌注结果:
</span>
<span>
{{ gz.value5 }}
{{ gz.COLUMN_E }}
</span>
</p>
</div>
@ -55,7 +55,7 @@
条码:
</span>
<span>
{{ dj.value1 }}
{{ dj.COLUMN_A }}
</span>
</p>
<p>
@ -63,16 +63,15 @@
型号:
</span>
<span>
{{ dj.value2 }}
{{ dj.COLUMN_B }}
</span>
</p>
<p>
<div style="display: inline-block;width: 50%">
<span>
接地电阻:
</span>
<span>
{{ dj.value3 }}
{{ dj.COLUMN_C }}
</span>
</div>
<div style="display: inline-block;width: 50%">
@ -80,17 +79,15 @@
交耐电流:
</span>
<span>
{{ dj.value4 }}
{{ dj.COLUMN_D }}
</span>
</div>
</p>
<p>
<div style="display: inline-block;width: 50%">
<span>
低压启动:
</span>
<span>
{{ dj.value5 }}
{{ dj.COLUMN_E }}
</span>
</div>
<div style="display: inline-block;width: 50%">
@ -98,16 +95,15 @@
动态泄露:
</span>
<span>
{{ dj.value6 }}
{{ dj.COLUMN_F }}
</span>
</div>
</p>
<p>
<span>
检测结果:
</span>
<span>
{{ dj.value7 }}
{{ dj.COLUMN_G }}
</span>
</p>
</div>
@ -117,7 +113,7 @@
条码:
</span>
<span>
{{ zl.value1 }}
{{ zl.COLUMN_A }}
</span>
</p>
<p>
@ -125,7 +121,7 @@
型号:
</span>
<span>
{{ zl.value2 }}
{{ zl.COLUMN_B }}
</span>
</p>
<p>
@ -133,7 +129,7 @@
环境温度:
</span>
<span>
{{ zl.value3 }}
{{ zl.COLUMN_C }}
</span>
</p>
<p>
@ -141,7 +137,7 @@
检测结果:
</span>
<span>
{{ zl.value4 }}
{{ zl.COLUMN_D }}
</span>
</p>
</div>
@ -151,7 +147,7 @@
条码:
</span>
<span>
{{ gdy.value1 }}
{{ gdy.COLUMN_A }}
</span>
</p>
<p>
@ -159,7 +155,7 @@
型号:
</span>
<span>
{{ gdy.value2 }}
{{ gdy.COLUMN_B }}
</span>
</p>
<p>
@ -167,7 +163,7 @@
检测结果:
</span>
<span>
{{ gdy.value3 }}
{{ gdy.COLUMN_C }}
</span>
</p>
</div>
@ -382,19 +378,19 @@
<div :style='"background-color:" + ((index % 2 === 0)? "#053460":"#032d57") '>
<div
class="scrollTableItem1" style="width: 25%">
{{ item.value1 }}
{{ item.COLUMN_A }}
</div>
<div
class="scrollTableItem1" style="width: 25%">
{{ item.value2 }}
{{ item.COLUMN_B }}
</div>
<div
class="scrollTableItem1" style="width: 25%">
{{ item.value3 }}
{{ item.COLUMN_C }}
</div>
<div
class="scrollTableItem1" style="width: 25%">
{{ item.value4 }}
{{ item.COLUMN_D }}
</div>
</div>
</div>
@ -414,6 +410,7 @@ import {getData} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
let intervalFun = null
export default {
components: {
vueSeamlessScroll,
@ -499,42 +496,42 @@ export default {
RequestDataSet: [
{
e: 'zzgx-01',
i: "",
i: "scada_zz_up_gz_01('CX_02')",
f: (e) => {
this.gz = e
this.gz = e[0]
}
},
{
e: 'zzgx-02',
i: "",
i: "scada_zz_up_dj_01('CX_02')",
f: (e) => {
this.dj = e
this.dj = e[0]
}
},
{
e: 'zzgx-03',
i: "",
i: "scada_zz_up_xn_01('CX_02')",
f: (e) => {
this.zl = e
this.zl = e[0]
}
},
{
e: 'zzgx-04',
i: "",
i: "scada_zz_up_jl_01('CX_02')",
f: (e) => {
this.gdy = e
this.gdy = e[0]
}
},
{
e: 'zzgx-05',
i: "SCADA_INV_STATS_01('')",
i: "scada_zz_up_tj_01('CX_02')",
f: (e) => {
this.scrollTableData = e
}
},
{
e: 'zzgx-06',
i: "",
i: "scada_zz_up_fb_01('CX_02')",
f: (e) => {
this.$refs.chart1.setData({
tooltip: {
@ -547,7 +544,12 @@ export default {
type: "pie",
radius: "70%",
center: ["50%", "50%"],
data: e,
data: e.map(val=>{
return {
name:val.X_VALUE,
value:val.Y_VALUE
}
}),
itemStyle: {
emphasis: {
shadowBlur: 10,
@ -1577,6 +1579,11 @@ export default {
this.RequestDataSet.forEach(val => {
mixData(val)
})
intervalFun = setInterval(() => {
this.RequestDataSet.forEach(val => {
mixData(val)
})
}, 1000 * 10)
},
methods: {
option(name, val) {
@ -1701,6 +1708,13 @@ export default {
],
}
}
},
beforeDestroy() {
console.log(1)
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
};
</script>
@ -2008,4 +2022,13 @@ export default {
width: 21.5%;
height: 15%;
}
.top1, .top2, .top3, .top4 {
p, div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align:top
}
}
</style>

Loading…
Cancel
Save