展会大屏优化

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', backgroundColor: '#0E0E0E',
legend: { legend: {
data: ['计划完成','实际完成'] data: ['计划完成','实际完成'],
},
grid:{
left:'40',
right:'0',
}, },
color:['#2FC5D4','#FEDA81'], color:['#2FC5D4','#FEDA81'],
xAxis: { xAxis: {

View File

@ -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;

View File

@ -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'
}) })