修改接口

master
夜笙歌 8 months ago
parent c420a3ce14
commit ddc83ecaa5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

@ -146,7 +146,6 @@ export default {
e: 'xkqhb-01', e: 'xkqhb-01',
i: "scada_xk_bz_pro_01('')", i: "scada_xk_bz_pro_01('')",
f: (e) => { f: (e) => {
console.log(e[0].COLUMN_A)
this.team = e[0].COLUMN_A this.team = e[0].COLUMN_A
this.planNum = e[0].COLUMN_B this.planNum = e[0].COLUMN_B
this.practicalNum = e[0].COLUMN_C this.practicalNum = e[0].COLUMN_C
@ -229,6 +228,12 @@ export default {
normal: { normal: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
fontStyle: "normal", fontStyle: "normal",
@ -262,6 +267,12 @@ export default {
normal: { normal: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
fontStyle: "normal", fontStyle: "normal",
@ -366,6 +377,12 @@ export default {
label: { label: {
normal: { normal: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
@ -399,6 +416,12 @@ export default {
label: { label: {
normal: { normal: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
@ -507,6 +530,12 @@ export default {
label: { label: {
normal: { normal: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
@ -540,6 +569,12 @@ export default {
label: { label: {
normal: { normal: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
@ -639,6 +674,12 @@ export default {
normal: { normal: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#a8aab0", color: "#a8aab0",
fontStyle: "normal", fontStyle: "normal",
@ -683,7 +724,6 @@ export default {
}, },
methods: {}, methods: {},
beforeDestroy() { beforeDestroy() {
console.log(1)
if(intervalFun){ if(intervalFun){
clearInterval(intervalFun) clearInterval(intervalFun)
intervalFun = null intervalFun = null

@ -23,33 +23,33 @@
<div>发泡线 - 运行状态</div> <div>发泡线 - 运行状态</div>
</div> </div>
<div class="info1"> <div class="info1">
A1 A
</div> </div>
<div class="status1" <div class="status1"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A1')&&statusArr.find(e=>e.X_VALUE === 'A1').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 B
</div> </div>
<div class="status2" <div class="status2"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B1')&&statusArr.find(e=>e.X_VALUE === 'B1').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" v-if="$route.query.id === '1' || id === '1'"> <div class="info3" v-if="$route.query.id === '1' || id === '1'">
A2 C
</div> </div>
<div class="status3" v-if="$route.query.id === '1' || id === '1'" <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> :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'"> <div class="info4" v-if="$route.query.id === '1' || id === '1'">
B2 D
</div> </div>
<div class="status4" v-if="$route.query.id === '1' || id === '1'" <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> :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 1#系统
</div> </div>
<div class="status5" <div class="status5"
: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 === 'A')&&statusArr.find(e=>e.X_VALUE === 'A').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
<div class="info6"> <div class="info6">
B 2#系统
</div> </div>
<div class="status6" <div class="status6"
: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 === 'B')&&statusArr.find(e=>e.X_VALUE === 'B').Y_VALUE >0 ? '#00ff00':'#ff0000')"></div>
@ -493,6 +493,12 @@ export default {
barWidth: "40%", barWidth: "40%",
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -551,7 +557,7 @@ export default {
} }
}) })
this.scrollTableData1 = table this.scrollTableData1 = table
let totalArr = table.slice(0, 6) let totalArr = table
this.total = { this.total = {
value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2), value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2),
value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0), value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0),
@ -644,6 +650,12 @@ export default {
barWidth: "30%", barWidth: "30%",
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -664,7 +676,13 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_ONE), data: e.map(val => {
if (val.Y_VALUE_ONE === 0) {
return null
} else {
return val.Y_VALUE_ONE
}
}),
}, },
{ {
name: 'ISO压力', name: 'ISO压力',
@ -673,6 +691,12 @@ export default {
barGap: '40%', barGap: '40%',
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -693,7 +717,13 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_TWO), data: e.map(val => {
if (val.Y_VALUE_TWO === 0) {
return null
} else {
return val.Y_VALUE_TWO
}
}),
}, },
], ],
}) })
@ -818,6 +848,12 @@ export default {
label: { label: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
}, },
@ -866,6 +902,12 @@ export default {
label: { label: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#668e84", color: "#668e84",
}, },
@ -959,6 +1001,12 @@ export default {
type: "bar", type: "bar",
barWidth: "33%", barWidth: "33%",
label: { label: {
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
show: true, show: true,
position: "top", position: "top",
textStyle: { textStyle: {
@ -1067,6 +1115,12 @@ export default {
barMaxWidth: 40, barMaxWidth: 40,
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -1126,7 +1180,7 @@ export default {
}) })
this.scrollTableData1 = table this.scrollTableData1 = table
let totalArr = table.slice(0, 6) let totalArr = table
this.total = { this.total = {
value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2), value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2),
value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0), value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0),
@ -1218,6 +1272,12 @@ export default {
label: { label: {
show: true, show: true,
position: "top", position: "top",
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
}, },
@ -1237,7 +1297,14 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_ONE),
data: e.map(val => {
if (val.Y_VALUE_ONE === 0) {
return null
} else {
return val.Y_VALUE_ONE
}
}),
}, },
{ {
name: 'ISO压力', name: 'ISO压力',
@ -1246,6 +1313,12 @@ export default {
barGap: '40%', barGap: '40%',
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -1266,7 +1339,13 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_TWO), data: e.map(val => {
if (val.Y_VALUE_TWO === 0) {
return null
} else {
return val.Y_VALUE_TWO
}
}),
}, },
], ],
}) })
@ -1390,6 +1469,12 @@ export default {
}, },
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -1438,6 +1523,12 @@ export default {
}, },
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#668e84", color: "#668e84",
@ -1533,6 +1624,12 @@ export default {
barWidth: "33%", barWidth: "33%",
label: { label: {
show: true, show: true,
formatter:(e)=>{
if(e.data === 0){
return ''
}else{}
return e.data
},
position: "top", position: "top",
textStyle: { textStyle: {
color: "#49d9ff", color: "#49d9ff",
@ -1580,25 +1677,6 @@ export default {
num = num % num1 num = num % num1
this.show = num this.show = num
let totalArr = this.scrollTableData1.slice(num * 6, (num + 1) * 6)
this.total = {
value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2),
value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0),
value3: totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0),
value4: ((totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0) / totalArr.map(val => val.value4).reduce((acc, curr) => acc + curr, 0)) * 100).toFixed(2),
value5: totalArr.map(val => val.value8).reduce((acc, curr) => acc + curr, 0),
value6: totalArr.map(val => val.value9).reduce((acc, curr) => acc + curr, 0),
value7: totalArr.map(val => val.value10).reduce((acc, curr) => acc + curr, 0),
value8: totalArr.map(val => val.value11).reduce((acc, curr) => acc + curr, 0),
value9: totalArr.map(val => val.value12).reduce((acc, curr) => acc + curr, 0),
value10: totalArr.map(val => val.value13).reduce((acc, curr) => acc + curr, 0),
value11: totalArr.map(val => val.value14).reduce((acc, curr) => acc + curr, 0),
value12: totalArr.map(val => val.value15).reduce((acc, curr) => acc + curr, 0),
value13: totalArr.map(val => val.value16).reduce((acc, curr) => acc + curr, 0),
value14: totalArr.map(val => val.value17).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),
}
}, 30 * 1000) }, 30 * 1000)
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 => {
@ -1634,7 +1712,7 @@ export default {
methods: {}, methods: {},
beforeDestroy() { beforeDestroy() {
console.log(1) console.log(1)
if(intervalFun){ if (intervalFun) {
clearInterval(intervalFun) clearInterval(intervalFun)
intervalFun = null intervalFun = null
} }
@ -1895,18 +1973,18 @@ export default {
.info5 { .info5 {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translateY(-50%);
top: 28%; top: 28%;
left: 56%; left: 55%;
font-size: 1vw; font-size: 1vw;
color: #fff; color: #fff;
} }
.status5 { .status5 {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translateY(-50%);
top: 28%; top: 28%;
left: 59%; left: 59.5%;
width: 1.5vw; width: 1.5vw;
height: 1.5vw; height: 1.5vw;
background: #00ff00; background: #00ff00;
@ -1915,7 +1993,7 @@ export default {
.info6 { .info6 {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translateY(-50%);
top: 28%; top: 28%;
left: 62%; left: 62%;
font-size: 1vw; font-size: 1vw;
@ -1924,9 +2002,9 @@ export default {
.status6 { .status6 {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translateY(-50%);
top: 28%; top: 28%;
left: 65%; left: 66.5%;
width: 1.5vw; width: 1.5vw;
height: 1.5vw; height: 1.5vw;
background: #00ff00; background: #00ff00;

@ -25,8 +25,8 @@
</div> </div>
<div style="position: absolute; top: 23%;left: 60%;width:10vw;color: #fff;font-size: 0.8vw;line-height: 1.5vw"> <div style="position: absolute; top: 23%;left: 60%;width:10vw;color: #fff;font-size: 0.8vw;line-height: 1.5vw">
<div>生产节拍</div> <div>生产节拍</div>
<div>线体1圈 {{ meter1 }}s</div> <div>线体1圈 <span style="margin-left: 10px">{{ ' ' + meter1 }}</span>s</div>
<div>台车1位 {{ meter2 }}s</div> <div>台车1位 <span style="margin-left: 10px">{{ ' ' + meter2 }}</span>s</div>
</div> </div>
<div class="foamingMachine"></div> <div class="foamingMachine"></div>
@ -162,7 +162,7 @@ export default {
'发泡料温度监控', '发泡料温度监控',
'门体发泡生产统计', '门体发泡生产统计',
], ],
status1:0, status1: 0,
meter1: 0, meter1: 0,
meter2: 0, meter2: 0,
titlePosition: [ titlePosition: [
@ -268,7 +268,7 @@ export default {
{ {
name: '数量', name: '数量',
type: "bar", type: "bar",
barMaxWidth:60, barMaxWidth: 60,
barWidth: "40%", barWidth: "40%",
label: { label: {
show: true, show: true,
@ -387,7 +387,13 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_ONE), data: e.map(val => {
if (val.Y_VALUE_ONE === 0) {
return null
} else {
return val.Y_VALUE_ONE
}
}),
}, },
{ {
name: 'ISO压力', name: 'ISO压力',
@ -416,7 +422,13 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val => val.Y_VALUE_TWO), data: e.map(val => {
if (val.Y_VALUE_TWO === 0) {
return null
} else {
return val.Y_VALUE_TWO
}
}),
}, },
], ],
}) })
@ -571,7 +583,13 @@ export default {
shadowBlur: 20, shadowBlur: 20,
}, },
}, },
data: e.map(val => val.Y_VALUE_ONE), data: e.map(val => {
if (val.Y_VALUE_ONE === 0) {
return null
} else {
return val.Y_VALUE_ONE
}
}),
}, },
{ {
name: 'ISO温度', name: 'ISO温度',
@ -620,7 +638,13 @@ export default {
shadowBlur: 20, shadowBlur: 20,
}, },
}, },
data: e.map(val => val.Y_VALUE_TWO), data: e.map(val => {
if (val.Y_VALUE_TWO === 0) {
return null
} else {
return val.Y_VALUE_TWO
}
}),
}, },
], ],
}) })
@ -647,7 +671,7 @@ export default {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: e.map(val=>val.X_VALUE), data: e.map(val => val.X_VALUE),
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: "white", color: "white",
@ -679,7 +703,7 @@ export default {
name: '产量', name: '产量',
type: "bar", type: "bar",
barWidth: "33%", barWidth: "33%",
barMaxWidth:60, barMaxWidth: 60,
label: { label: {
show: true, show: true,
position: "top", position: "top",
@ -702,7 +726,7 @@ export default {
borderRadius: 2, borderRadius: 2,
}, },
}, },
data: e.map(val=>val.Y_VALUE), data: e.map(val => val.Y_VALUE),
}, },
], ],
}) })
@ -773,7 +797,7 @@ export default {
top: 35%; top: 35%;
left: 50%; left: 50%;
width: 36vw; width: 36vw;
height: 10.755vw; height: 8.7vw;
} }
.app-container { .app-container {

Loading…
Cancel
Save