物流工艺

This commit is contained in:
2023-08-31 10:56:54 +08:00
parent 01b2fd9159
commit 6efe29c6f3

View File

@@ -267,6 +267,8 @@ export default {
computed: { computed: {
defaultOption1 () { defaultOption1 () {
return { return {
timer1: null,
timer2: null,
step: 0.4, // 数值越大速度滚动越快 step: 0.4, // 数值越大速度滚动越快
limitMoveNum: 9, // 开始无缝滚动的数据量 this.dataList.length limitMoveNum: 9, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop hoverStop: true, // 是否开启鼠标悬停stop
@@ -279,14 +281,14 @@ export default {
} }
}, },
mounted () { mounted () {
clearInterval(this.timer1)
clearInterval(this.timer2)
this.refresh() this.refresh()
}, },
beforeDestroy () { beforeDestroy () {
this.$once('hook:beforeDestroy', () => { this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer1) clearInterval(this.timer1)
clearInterval(this.timer2) clearInterval(this.timer2)
clearInterval(this.interTime)
clearInterval(this.timeOut1)
}) })
}, },
methods: { methods: {
@@ -635,11 +637,8 @@ export default {
} }
var count = 0 var count = 0
var timer = null clearInterval(this.timer1)
this.timer1 = setInterval(() => {
var dataLength = option.series[1].data.length
timer && clearInterval(timer)
timer = setInterval(() => {
this.myCharts2.dispatchAction({ this.myCharts2.dispatchAction({
type: 'downplay', type: 'downplay',
seriesIndex: 1 seriesIndex: 1
@@ -647,14 +646,20 @@ export default {
this.myCharts2.dispatchAction({ this.myCharts2.dispatchAction({
type: 'highlight', type: 'highlight',
seriesIndex: 1, seriesIndex: 1,
dataIndex: count % dataLength dataIndex: count
}) })
this.myCharts2.dispatchAction({ this.myCharts2.dispatchAction({
type: 'showTip', type: 'showTip',
seriesIndex: 1, seriesIndex: 1,
dataIndex: count % dataLength dataIndex: count
}) })
count++ count++
if (count >= option.series[0].data.length) {
count = 0
}
if (count >= option.series[1].data.length) {
count = 0
}
}, 3000) }, 3000)
}, },
async _homepageData () { async _homepageData () {