修改大屏
parent
9f974c8976
commit
88971f7c42
|
|
@ -141,33 +141,61 @@
|
|||
let timer: any = null
|
||||
function chartAmi() {
|
||||
let index = 0
|
||||
const timerNumber = 3000
|
||||
let sleep = 1
|
||||
timer && clearInterval(timer)
|
||||
timer = setInterval(() => {
|
||||
const currentIndex = index % legendData.length
|
||||
// getInstance()?.dispatchAction({
|
||||
// type: 'legendUnSelect',
|
||||
// name: legendData[currentIndex],
|
||||
// })
|
||||
|
||||
// getInstance()?.dispatchAction({
|
||||
// type: 'legendSelect',
|
||||
// name: legendData[currentIndex],
|
||||
// })
|
||||
const currentIndex = index % 4
|
||||
sleep = index % (4 * 2)
|
||||
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'showTip',
|
||||
seriesIndex: 0,
|
||||
dataIndex: currentIndex,
|
||||
})
|
||||
if (sleep == 7) {
|
||||
chartLineAmi()
|
||||
}
|
||||
|
||||
index++
|
||||
}, 3000)
|
||||
}, timerNumber)
|
||||
}
|
||||
|
||||
function chartLineAmi() {
|
||||
const timerNumber = 3000
|
||||
timer && clearInterval(timer)
|
||||
let legendIndex = legendData.length
|
||||
let sleep = 6000 / 3000
|
||||
timer = setInterval(() => {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'hideTip',
|
||||
})
|
||||
if (legendIndex == legendData.length) {
|
||||
legendData.forEach((_, index) => {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'legendUnSelect',
|
||||
name: legendData[index],
|
||||
})
|
||||
})
|
||||
}
|
||||
if (legendIndex >= 0) {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'legendSelect',
|
||||
name: legendData[legendIndex - 1],
|
||||
})
|
||||
}
|
||||
if (legendIndex <= 0) {
|
||||
if (sleep <= 0) getData()
|
||||
sleep--
|
||||
}
|
||||
legendIndex--
|
||||
}, timerNumber)
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
getData()
|
||||
rootEmitter.on('interval:auto', () => {
|
||||
getData()
|
||||
// getData()
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -191,18 +191,12 @@
|
|||
let timer: any = null
|
||||
function chartAmi() {
|
||||
let index = 0
|
||||
const timerNumber = 3000
|
||||
let sleep = 1
|
||||
timer && clearInterval(timer)
|
||||
timer = setInterval(() => {
|
||||
const currentIndex = index % legendData.length
|
||||
// getInstance()?.dispatchAction({
|
||||
// type: 'legendUnSelect',
|
||||
// name: legendData[currentIndex],
|
||||
// })
|
||||
|
||||
// getInstance()?.dispatchAction({
|
||||
// type: 'legendSelect',
|
||||
// name: legendData[currentIndex],
|
||||
// })
|
||||
const currentIndex = index % 4
|
||||
sleep = index % (4 * 2)
|
||||
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'showTip',
|
||||
|
|
@ -210,8 +204,43 @@
|
|||
dataIndex: currentIndex,
|
||||
})
|
||||
|
||||
if (sleep == 7) {
|
||||
chartLineAmi()
|
||||
}
|
||||
|
||||
index++
|
||||
}, 3000)
|
||||
}, timerNumber)
|
||||
}
|
||||
|
||||
function chartLineAmi() {
|
||||
const timerNumber = 3000
|
||||
timer && clearInterval(timer)
|
||||
let legendIndex = legendData.length
|
||||
let sleep = 6000 / 3000
|
||||
timer = setInterval(() => {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'hideTip',
|
||||
})
|
||||
if (legendIndex == legendData.length) {
|
||||
legendData.forEach((_, index) => {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'legendUnSelect',
|
||||
name: legendData[index],
|
||||
})
|
||||
})
|
||||
}
|
||||
if (legendIndex >= 0) {
|
||||
getInstance()?.dispatchAction({
|
||||
type: 'legendSelect',
|
||||
name: legendData[legendIndex - 1],
|
||||
})
|
||||
}
|
||||
if (legendIndex <= 0) {
|
||||
if (sleep <= 0) getData()
|
||||
sleep--
|
||||
}
|
||||
legendIndex--
|
||||
}, timerNumber)
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
@ -224,7 +253,7 @@
|
|||
onBeforeMount(() => {
|
||||
getData()
|
||||
rootEmitter.on('interval:auto', () => {
|
||||
getData()
|
||||
// getData()
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<ScaleScreen :boxStyle="{ background: '#020603' }" :width="3120" :height="760" :autoScale="true">
|
||||
<!-- <div class="overflow-y-scroll"> -->
|
||||
<div class="flex flex-col h-full bg-img relative w-3120px h-760px">
|
||||
<!-- w-3120px h-760px -->
|
||||
<div class="flex flex-col h-full bg-img relative">
|
||||
<canvas
|
||||
class="absolute left-0 top-0 w-full h-full overflow-hidden"
|
||||
ref="cavsRef"
|
||||
|
|
|
|||
Loading…
Reference in New Issue