修改接口

master
夜笙歌 9 months ago
parent 5986b94c7b
commit 6cfe6f1970

@ -2,14 +2,18 @@
<div class="app-container">
<div class="headTitle">箱体发泡生产数据监控平台</div>
<div class="topNum planNum">{{
planNum.toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('')
(['0', '0', '0', '0']).concat(planNum.toString().split('')).slice(-4).join('')
}}
</div>
<div class="topNum practicalNum">
{{ practicalNum.toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('') }}
{{
(['0', '0', '0', '0']).concat(practicalNum.toString().split('')).slice(-4).join('')
}}
</div>
<div class="topNum differenceValue">
{{ (practicalNum - planNum).toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('') }}
{{
(['0', '0', '0', '0']).concat((Math.abs(practicalNum - planNum)).toString().split('')).slice(-4).join('')
}}
</div>
<div class="title" v-for="(i,k) in title"
:style="'top:'+(titlePosition[k]&&titlePosition[k].top||0)+'%;left:'+(titlePosition[k]&&titlePosition[k].left||0)+'%'">
@ -21,28 +25,34 @@
<div class="info1">
A1
</div>
<div class="status1"></div>
<div class="status1"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A1')&&statusArr.find(e=>e.X_VALUE === 'A1').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>
<div class="info2">
B1
</div>
<div class="status2"></div>
<div class="status2"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B1')&&statusArr.find(e=>e.X_VALUE === 'B1').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>
<div class="info3">
A2
</div>
<div class="status3"></div>
<div class="status3"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A2')&&statusArr.find(e=>e.X_VALUE === 'A2').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>
<div class="info4">
B2
</div>
<div class="status4"></div>
<div class="status4"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B2')&&statusArr.find(e=>e.X_VALUE === 'B2').Y_VALUE ? '#ff0000':'#00ff00')"></div>
<div class="info5">
A
</div>
<div class="status5"></div>
<div class="status5"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'A')&&statusArr.find(e=>e.X_VALUE === 'A').Y_VALUE === 1 ? '#ff0000':'#00ff00')"></div>
<div class="info6">
B
</div>
<div class="status6"></div>
<div class="status6"
:style="'background-color:'+(statusArr.find(e=>e.X_VALUE === 'B')&&statusArr.find(e=>e.X_VALUE === 'B').Y_VALUE ? '#ff0000':'#00ff00')"></div>
<div style="position: absolute; top: 23%;left: 55%;width:10vw;color: #fff;font-size: 0.8vw;line-height: 1.5vw">
<div>发泡线 - 运行状态</div>
@ -143,40 +153,40 @@
达成率
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
7:30
{{ hourArr[0] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
8:30
{{ hourArr[1] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
9:30
{{ hourArr[2] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
10:30
{{ hourArr[3] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
11:30
{{ hourArr[4] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
12:30
{{ hourArr[5] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
13:30
{{ hourArr[6] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
14:30
{{ hourArr[7] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
15:30
{{ hourArr[8] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
16:30
{{ hourArr[9] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
17:30
{{ hourArr[10] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
18:30
{{ hourArr[11] }}
</div>
</div>
<!-- <vue-seamless-scroll-->
@ -186,7 +196,7 @@
<!-- style="height: 84%;overflow: hidden;"-->
<!-- >-->
<div
v-for="(item, index) in scrollTableData1"
v-for="(item, index) in scrollTableData1.slice(0,6)"
:key="index"
style="height: calc(25vh/7)"
>
@ -297,40 +307,40 @@
达成率
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
7:30
{{ hourArr[0] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
8:30
{{ hourArr[1] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
9:30
{{ hourArr[2] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
10:30
{{ hourArr[3] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
11:30
{{ hourArr[4] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
12:30
{{ hourArr[5] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
13:30
{{ hourArr[6] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
14:30
{{ hourArr[7] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
15:30
{{ hourArr[8] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
16:30
{{ hourArr[9] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
17:30
{{ hourArr[10] }}
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 5%">
18:30
{{ hourArr[11] }}
</div>
</div>
<!-- <vue-seamless-scroll-->
@ -340,7 +350,7 @@
<!-- style="height: 84%;overflow: hidden;"-->
<!-- >-->
<div
v-for="(item, index) in scrollTableData2"
v-for="(item, index) in scrollTableData1.slice(6,12)"
:key="index"
style="height: calc(25vh/7)"
>
@ -521,6 +531,8 @@ export default {
'发泡料温度监控',
'泡前库库存',
],
statusArr: [],
hourArr: [],
titlePosition: [
{
top: 11.5,
@ -559,21 +571,21 @@ export default {
},
scrollTableData: [],
scrollTableData1: [],
scrollTableData2: [],
RequestDataSet: [
{
e: 'fp-1-01',
i: "",
i: "scada_fp_cy_01('CX_01')",
f: (e) => {
this.planNum = e
this.planNum = e[0].X_VALUE
this.practicalNum = e[0].Y_VALUE_ONE
}
},
{
e: 'fp-1-02',
i: "",
i: "1",
f: (e) => {
this.practicalNum = e
this.hourArr = e.map(val => val.HOUR_TIME)
}
},
{
@ -587,6 +599,7 @@ export default {
e: 'fp-1-04',
i: "scada_fp_pro_tj_01('CX_01')",
f: (e) => {
console.log(e)
this.$refs.chart2.setData({
tooltip: {
trigger: "axis",
@ -604,7 +617,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -659,7 +672,7 @@ export default {
borderRadius: 3,
},
},
data: e.map(val=>val.Y_VALUE),
data: e.map(val => val.Y_VALUE),
},
],
})
@ -669,14 +682,33 @@ export default {
e: 'fp-1-05',
i: "SCADA_INV_STATS_01('')",
f: (e) => {
getData().then(val => {
getFoamingData({
"PRODUCT_LINE_CODE": "CX_01"
}).then(e=>{
console.log(e)
// this.scrollTableData1 = e
getFoamingData({
"PRODUCT_LINE_CODE": "CX_01"
}).then(e => {
this.scrollTableData1 = e.data?.map(val => {
return {
value1: val.EQUIPMENT_CODE,
value2: val.FIXTUREBOXTYPE,
value3: val.FIXTURESTATUS,
value4: val.TARGET,
value5: 0,
value6: val.PRO_SUM,
value7: ((val.PRO_SUM / val.TARGET) * 100).toFixed(2) + '%',
value8: val.ANHOUR,
value9: val.TWOHOUR,
value10: val.THREEHOUR,
value11: val.FOURHOUR,
value12: val.FIVEHOUR,
value13: val.SIXHOUR,
value14: val.SEVENHOUR,
value15: val.EIGHTHOUR,
value16: val.NINEHOUR,
value17: val.TENHOUR,
value18: val.ELEVENHOUR,
value19: val.TWELVEHOUR,
}
})
this.scrollTableData1 = val.table3.slice(0, 6)
this.scrollTableData2 = val.table3.slice(6, 12)
})
}
},
@ -700,7 +732,7 @@ export default {
containLabel: true,
},
legend: {
data: ['POL压力','ISO压力'],
data: ['POL压力', 'ISO压力'],
right: 'center',
top: 0,
textStyle: {
@ -712,7 +744,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -729,8 +761,8 @@ export default {
yAxis: {
type: "value",
min:10,
max:14,
min: 10,
max: 14,
axisLine: {
show: false,
lineStyle: {
@ -769,7 +801,7 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE_ONE),
data: e.map(val => val.Y_VALUE_ONE),
},
{
name: 'ISO压力',
@ -798,7 +830,7 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE_TWO),
data: e.map(val => val.Y_VALUE_TWO),
},
],
})
@ -810,7 +842,7 @@ export default {
f: (e) => {
this.$refs.chart3.setData({
legend: {
data: ['POL温度','ISO温度'],
data: ['POL温度', 'ISO温度'],
right: 'center',
top: 0,
textStyle: {
@ -877,7 +909,7 @@ export default {
show: false,
},
boundaryGap: false,
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
},
],
@ -953,10 +985,10 @@ export default {
shadowBlur: 20,
},
},
data: e.map(val=>val.Y_VALUE_ONE),
data: e.map(val => val.Y_VALUE_ONE),
},
{
name: 'ISO温度',
name: 'ISO温度',
type: "line",
// smooth: true, //
showAllSymbol: true,
@ -1002,7 +1034,7 @@ export default {
shadowBlur: 20,
},
},
data: e.map(val=>val.Y_VALUE_TWO),
data: e.map(val => val.Y_VALUE_TWO),
},
],
})
@ -1029,7 +1061,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -1084,26 +1116,34 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE),
data: e.map(val => val.Y_VALUE),
},
],
})
}
},
{
e: 'fp-1-09',
i: "scada_fp_zt_01('CX_01')",
f: (e) => {
this.statusArr = e
}
},
],
RequestDataSet1: [
{
e: 'fp-2-01',
i: "",
i: "scada_fp_cy_01('CX_02')",
f: (e) => {
this.planNum = e
this.planNum = e[0].X_VALUE
this.practicalNum = e[0].Y_VALUE_ONE
}
},
{
e: 'fp-2-02',
i: "",
i: "1",
f: (e) => {
this.practicalNum = e
this.hourArr = e.map(val => val.HOUR_TIME)
}
},
{
@ -1134,7 +1174,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -1189,7 +1229,7 @@ export default {
borderRadius: 3,
},
},
data: e.map(val=>val.Y_VALUE),
data: e.map(val => val.Y_VALUE),
},
],
})
@ -1199,8 +1239,34 @@ export default {
e: 'fp-2-05',
i: "SCADA_INV_STATS_02('')",
f: (e) => {
this.scrollTableData1 = e.slice(0, 6)
this.scrollTableData2 = e.slice(6, 12)
// this.scrollTableData1 = e
getFoamingData({
"PRODUCT_LINE_CODE": "CX_01"
}).then(e => {
this.scrollTableData1 = e.data?.map(val => {
return {
value1: val.EQUIPMENT_CODE,
value2: val.FIXTUREBOXTYPE,
value3: val.FIXTURESTATUS,
value4: val.TARGET,
value5: 0,
value6: val.PRO_SUM,
value7: ((val.PRO_SUM / val.TARGET) * 100).toFixed(2) + '%',
value8: val.ANHOUR,
value9: val.TWOHOUR,
value10: val.THREEHOUR,
value11: val.FOURHOUR,
value12: val.FIVEHOUR,
value13: val.SIXHOUR,
value14: val.SEVENHOUR,
value15: val.EIGHTHOUR,
value16: val.NINEHOUR,
value17: val.TENHOUR,
value18: val.ELEVENHOUR,
value19: val.TWELVEHOUR,
}
})
})
}
},
{
@ -1223,7 +1289,7 @@ export default {
containLabel: true,
},
legend: {
data: ['POL压力','ISO压力'],
data: ['POL压力', 'ISO压力'],
right: 'center',
top: 0,
textStyle: {
@ -1235,7 +1301,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -1252,8 +1318,8 @@ export default {
yAxis: {
type: "value",
min:10,
max:14,
min: 10,
max: 14,
axisLine: {
show: false,
lineStyle: {
@ -1292,7 +1358,7 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE_ONE),
data: e.map(val => val.Y_VALUE_ONE),
},
{
name: 'ISO压力',
@ -1321,7 +1387,7 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE_TWO),
data: e.map(val => val.Y_VALUE_TWO),
},
],
})
@ -1333,7 +1399,7 @@ export default {
f: (e) => {
this.$refs.chart3.setData({
legend: {
data: ['POL温度','ISO温度'],
data: ['POL温度', 'ISO温度'],
right: 'center',
top: 0,
textStyle: {
@ -1400,7 +1466,7 @@ export default {
show: false,
},
boundaryGap: false,
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
},
],
@ -1476,10 +1542,10 @@ export default {
shadowBlur: 20,
},
},
data: e.map(val=>val.Y_VALUE_ONE),
data: e.map(val => val.Y_VALUE_ONE),
},
{
name: 'ISO温度',
name: 'ISO温度',
type: "line",
// smooth: true, //
showAllSymbol: true,
@ -1525,7 +1591,7 @@ export default {
shadowBlur: 20,
},
},
data: e.map(val=>val.Y_VALUE_TWO),
data: e.map(val => val.Y_VALUE_TWO),
},
],
})
@ -1552,7 +1618,7 @@ export default {
},
xAxis: {
type: "category",
data: e.map(val=>val.X_VALUE),
data: e.map(val => val.X_VALUE),
axisLine: {
lineStyle: {
color: "white",
@ -1607,12 +1673,19 @@ export default {
borderRadius: 2,
},
},
data: e.map(val=>val.Y_VALUE),
data: e.map(val => val.Y_VALUE),
},
],
})
}
},
{
e: 'fp-2-09',
i: "scada_fp_zt_01('CX_02')",
f: (e) => {
this.statusArr = e
}
},
],
}
},

@ -863,9 +863,9 @@ export default {
viewer.controls.enableRotate = false
viewer.controls.enableZoom = false
viewer.addEventListener(AMRT.Event.UPDATE, () => {
console.log('update')
})
// viewer.addEventListener(AMRT.Event.UPDATE, () => {
// console.log('update')
// })
// setInterval(() => {
// console.log(viewer.controls.getView())

Loading…
Cancel
Save