展会大屏优化

This commit is contained in:
hzz 2023-09-13 08:48:38 +08:00
parent aebd6764ba
commit c76b993d93
3 changed files with 13 additions and 31 deletions

View File

@ -28,7 +28,11 @@ const setCharts = () => {
// },
backgroundColor: '#0E0E0E',
legend: {
data: ['计划完成','实际完成']
data: ['计划完成','实际完成'],
},
grid:{
left:'40',
right:'0',
},
color:['#2FC5D4','#FEDA81'],
xAxis: {

View File

@ -51,18 +51,15 @@ const status_color = {
flex-direction: row;
}
.dev-left,
.dev-right {
width: 50%;
.dev-left {
width: 45%;
height: 100%;
box-sizing: border-box;
}
.dev-right {
width: 60%;
}
.dev-right {
width: 55%;
height: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;

View File

@ -169,33 +169,11 @@ function getWebsocket(val) {
if (data.type == 'StateChart') {
throttle(getTopDeviceData, 1000)
store.setDevnum(data.msg)
}
if (data.type == 'WorkingState') {
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) {
console.log(err);
@ -209,6 +187,9 @@ function errWebsocket(val) {
onMounted(() => {
getTopDeviceData()
getCismaListData()
timer = setInterval(()=>{
getTopDeviceData()
},5000)
connectWebsocket(null, null, getWebsocket, errWebsocket)
document.getElementById('app').style.backgroundColor = '#0E0E0E'
})