修改接口

master
夜笙歌 10 months ago
parent bf41fa3fcb
commit f55f07d57a

@ -110,7 +110,7 @@ import Chart from "../../../components/board/Chart";
import * as echarts from 'echarts'
import {getData} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
let intervalFun = null
export default {
components: {
vueSeamlessScroll,
@ -352,8 +352,20 @@ export default {
this.RequestDataSet.forEach(val => {
mixData(val)
})
intervalFun = setInterval(() => {
this.RequestDataSet.forEach(val => {
mixData(val)
})
}, 1000 * 10)
},
methods: {}
methods: {},
beforeDestroy() {
console.log(1)
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
};
</script>
<style scoped>

@ -108,6 +108,7 @@ import {getData} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
let intervalFun = null
export default {
components: {
vueSeamlessScroll,
@ -1061,8 +1062,38 @@ export default {
})
this.line = '一'
}
intervalFun = setInterval(() => {
if (this.$route.query.id === '1' || this.id === '1') {
this.RequestDataSet.forEach(val => {
mixData(val)
})
this.line = '一'
} else if (this.$route.query.id === '2' || this.id === '2') {
this.RequestDataSet1.forEach(val => {
mixData(val)
})
this.line = '二'
} else if (this.$route.query.id === '3' || this.id === '3') {
this.RequestDataSet1.forEach(val => {
mixData(val)
})
this.line = ''
} else {
this.RequestDataSet.forEach(val => {
mixData(val)
})
this.line = '一'
}
}, 1000 * 10)
},
methods: {}
methods: {},
beforeDestroy() {
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
};
</script>
<style scoped>

@ -130,6 +130,7 @@ import * as echarts from 'echarts'
import {getData} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
let intervalFun = null
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
components: {
@ -2853,6 +2854,25 @@ export default {
mixData(val)
})
}
intervalFun = setInterval(() => {
if(this.nowLine === 1 ){
this.RequestDataSet.forEach(val => {
mixData(val)
})
}
if(this.nowLine === 2 ){
this.RequestDataSet1.forEach(val => {
mixData(val)
})
}
if(this.nowLine === 3 ){
this.RequestDataSet2.forEach(val => {
mixData(val)
})
}
}, 1000 * 10)
let min = Math.ceil(Math.min(...[61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],))
let max = Math.ceil(Math.max(...[61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],))
@ -2907,6 +2927,12 @@ export default {
})
}
}
},
beforeDestroy() {
if(intervalFun){
clearInterval(intervalFun)
intervalFun = null
}
}
}
</script>

Loading…
Cancel
Save