展会大屏修改
This commit is contained in:
parent
f32ea2d725
commit
aebd6764ba
@ -75,6 +75,9 @@ export const useMicroExhibitionStore = defineStore(Names.MicroExhibition, {
|
|||||||
data.chart.series = data.chart.series.map((item) => {
|
data.chart.series = data.chart.series.map((item) => {
|
||||||
item.type = 'bar'
|
item.type = 'bar'
|
||||||
item.barMaxWidth = 30
|
item.barMaxWidth = 30
|
||||||
|
item.label = {
|
||||||
|
show: true,
|
||||||
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.caijian = data;
|
this.caijian = data;
|
||||||
@ -84,6 +87,9 @@ export const useMicroExhibitionStore = defineStore(Names.MicroExhibition, {
|
|||||||
data.chart.series = data.chart.series.map((item) => {
|
data.chart.series = data.chart.series.map((item) => {
|
||||||
item.type = 'bar'
|
item.type = 'bar'
|
||||||
item.barMaxWidth = 45
|
item.barMaxWidth = 45
|
||||||
|
item.label = {
|
||||||
|
show: true,
|
||||||
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.tuoxie = data;
|
this.tuoxie = data;
|
||||||
@ -96,6 +102,9 @@ export const useMicroExhibitionStore = defineStore(Names.MicroExhibition, {
|
|||||||
data.chart.series = data.chart.series.map((item) => {
|
data.chart.series = data.chart.series.map((item) => {
|
||||||
item.type = 'bar'
|
item.type = 'bar'
|
||||||
item.barMaxWidth = 30
|
item.barMaxWidth = 30
|
||||||
|
item.label = {
|
||||||
|
show: true,
|
||||||
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.fengzhong = data;
|
this.fengzhong = data;
|
||||||
@ -108,6 +117,9 @@ export const useMicroExhibitionStore = defineStore(Names.MicroExhibition, {
|
|||||||
data.chart.series = data.chart.series.map((item) => {
|
data.chart.series = data.chart.series.map((item) => {
|
||||||
item.type = 'bar'
|
item.type = 'bar'
|
||||||
item.barMaxWidth = 30
|
item.barMaxWidth = 30
|
||||||
|
item.label = {
|
||||||
|
show: true,
|
||||||
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.banfang = data;
|
this.banfang = data;
|
||||||
@ -121,6 +133,9 @@ export const useMicroExhibitionStore = defineStore(Names.MicroExhibition, {
|
|||||||
data.chart.series = data.chart.series.map((item) => {
|
data.chart.series = data.chart.series.map((item) => {
|
||||||
item.type = 'bar'
|
item.type = 'bar'
|
||||||
item.barMaxWidth = 30
|
item.barMaxWidth = 30
|
||||||
|
item.label = {
|
||||||
|
show: true,
|
||||||
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.zuoyi = data;
|
this.zuoyi = data;
|
||||||
|
@ -37,7 +37,7 @@ const prop = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
let header = ['序号', '设备名称', '设备编码', '稼动率', '状态']
|
let header = ['序号', '设备名称', '设备编码', '稼动率', '状态']
|
||||||
let columnWidth = [90, 290, 140, 120, 120, 120];
|
let columnWidth = [90, 290, 140, 120, 120];
|
||||||
let sum = 850;
|
let sum = 850;
|
||||||
|
|
||||||
let computedWidth = (width: number) => {
|
let computedWidth = (width: number) => {
|
||||||
@ -49,7 +49,7 @@ let config = reactive({
|
|||||||
oddRowBGC: '#000F1D',
|
oddRowBGC: '#000F1D',
|
||||||
evenRowBGC: '#000F1D',
|
evenRowBGC: '#000F1D',
|
||||||
wrap: [false, false, false, false, false],
|
wrap: [false, false, false, false, false],
|
||||||
columnWidth: [80, 290, 120, 120, 120, 120],
|
columnWidth: [80, 290, 140, 120, 120],
|
||||||
align: ['center', 'center', 'center', 'center', 'center', 'center'],
|
align: ['center', 'center', 'center', 'center', 'center', 'center'],
|
||||||
rowNum: 2,
|
rowNum: 2,
|
||||||
waitTime: 3000,
|
waitTime: 3000,
|
||||||
|
@ -131,6 +131,19 @@ let dev_value = [
|
|||||||
['全自动9公分电脑裁床', '待机', '40层', '0'],
|
['全自动9公分电脑裁床', '待机', '40层', '0'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let throttle_timer = null
|
||||||
|
function throttle (fn, delay = 300) {
|
||||||
|
if(throttle_timer == null){
|
||||||
|
throttle_timer = setTimeout(() => {
|
||||||
|
fn()
|
||||||
|
|
||||||
|
clearTimeout(throttle_timer)
|
||||||
|
throttle_timer = null
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function getTopDeviceData() {
|
async function getTopDeviceData() {
|
||||||
let res = await getTopDevice() as any
|
let res = await getTopDevice() as any
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@ -156,6 +169,7 @@ 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') {
|
||||||
@ -195,15 +209,14 @@ function errWebsocket(val) {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTopDeviceData()
|
getTopDeviceData()
|
||||||
getCismaListData()
|
getCismaListData()
|
||||||
timer = setInterval(() => {
|
|
||||||
getTopDeviceData()
|
|
||||||
}, 10000)
|
|
||||||
connectWebsocket(null, null, getWebsocket, errWebsocket)
|
connectWebsocket(null, null, getWebsocket, errWebsocket)
|
||||||
document.getElementById('app').style.backgroundColor = '#0E0E0E'
|
document.getElementById('app').style.backgroundColor = '#0E0E0E'
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
|
|
||||||
|
closeWebsocket()
|
||||||
document.getElementById('app').style.backgroundColor = '#100c2a'
|
document.getElementById('app').style.backgroundColor = '#100c2a'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -413,10 +426,12 @@ h2 {
|
|||||||
background-color: #5067BC;
|
background-color: #5067BC;
|
||||||
transform: rotate(40deg) translate(7px, -6px);
|
transform: rotate(40deg) translate(7px, -6px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-top {
|
.dev-top {
|
||||||
transform: translate(-6px, -10px);
|
transform: translate(-6px, -10px);
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-bottom {
|
.dev-bottom {
|
||||||
transform: translate(15px, 15px);
|
transform: translate(15px, 15px);
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
Loading…
Reference in New Issue
Block a user