修改接口

master
夜笙歌 10 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",
@ -669,14 +682,33 @@ export default {
e: 'fp-1-05',
i: "SCADA_INV_STATS_01('')",
f: (e) => {
getData().then(val => {
// this.scrollTableData1 = e
getFoamingData({
"PRODUCT_LINE_CODE": "CX_01"
}).then(e => {
console.log(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)
})
}
},
@ -1090,20 +1122,28 @@ export default {
})
}
},
{
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)
}
},
{
@ -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,
}
})
})
}
},
{
@ -1613,6 +1679,13 @@ export default {
})
}
},
{
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