yinq 11 months ago
commit ac2b303c08

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

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

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

Loading…
Cancel
Save