展会大屏优化
This commit is contained in:
parent
aebd6764ba
commit
c76b993d93
@ -28,7 +28,11 @@ const setCharts = () => {
|
|||||||
// },
|
// },
|
||||||
backgroundColor: '#0E0E0E',
|
backgroundColor: '#0E0E0E',
|
||||||
legend: {
|
legend: {
|
||||||
data: ['计划完成','实际完成']
|
data: ['计划完成','实际完成'],
|
||||||
|
},
|
||||||
|
grid:{
|
||||||
|
left:'40',
|
||||||
|
right:'0',
|
||||||
},
|
},
|
||||||
color:['#2FC5D4','#FEDA81'],
|
color:['#2FC5D4','#FEDA81'],
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
@ -51,18 +51,15 @@ const status_color = {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-left,
|
.dev-left {
|
||||||
.dev-right {
|
width: 45%;
|
||||||
width: 50%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-right {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dev-right {
|
.dev-right {
|
||||||
|
width: 55%;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
@ -169,33 +169,11 @@ function getWebsocket(val) {
|
|||||||
|
|
||||||
|
|
||||||
if (data.type == 'StateChart') {
|
if (data.type == 'StateChart') {
|
||||||
throttle(getTopDeviceData, 1000)
|
|
||||||
store.setDevnum(data.msg)
|
store.setDevnum(data.msg)
|
||||||
}
|
}
|
||||||
if (data.type == 'WorkingState') {
|
if (data.type == 'WorkingState') {
|
||||||
store.changestatus(data.msg)
|
store.changestatus(data.msg)
|
||||||
}
|
}
|
||||||
// if(data.type=='CISMA_chart'){
|
|
||||||
// let obj = JSON.parse(data.msg.replace(/'/g,'"'))
|
|
||||||
// console.log(obj);
|
|
||||||
|
|
||||||
// for(let key in obj){
|
|
||||||
// console.log(key,obj[key]);
|
|
||||||
|
|
||||||
// if (key == "版房设备") {
|
|
||||||
// store.setbanfang(obj[key])
|
|
||||||
// } else if(key == "裁剪设备") {
|
|
||||||
// store.setcaijian(obj[key])
|
|
||||||
// } else if(key == "缝中设备") {
|
|
||||||
// store.setfengzhong(obj[key])
|
|
||||||
// } else if(key == "拖鞋自动生产线") {
|
|
||||||
// store.settuoxie(obj[key])
|
|
||||||
// } else if(key == "座椅面套生产线") {
|
|
||||||
// store.setzuoyi(obj[key])
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@ -209,6 +187,9 @@ function errWebsocket(val) {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTopDeviceData()
|
getTopDeviceData()
|
||||||
getCismaListData()
|
getCismaListData()
|
||||||
|
timer = setInterval(()=>{
|
||||||
|
getTopDeviceData()
|
||||||
|
},5000)
|
||||||
connectWebsocket(null, null, getWebsocket, errWebsocket)
|
connectWebsocket(null, null, getWebsocket, errWebsocket)
|
||||||
document.getElementById('app').style.backgroundColor = '#0E0E0E'
|
document.getElementById('app').style.backgroundColor = '#0E0E0E'
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user