This commit is contained in:
2025-04-11 15:32:54 +08:00
parent d6dc7e8b32
commit 404efd6e08
3 changed files with 15 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@ import Vue from 'vue'
import App from './App'
import router from './router'
import store from './vuex/store'
// import './style/reset.css'
import './style/reset.css'
import './style/layout.styl'
import * as echarts from 'echarts'
import 'default-passive-events'

View File

@@ -27,6 +27,9 @@ export default {
name: 'PointStatus',
data () {
return {
timeOut: null,
interTime: this.$store.getters.setTime,
timer: null,
bgUrl: '',
retData: []
// retData: [
@@ -45,8 +48,18 @@ export default {
},
mounted () {
this.initData()
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
clearInterval(this.timeOut)
},
methods: {
refresh () {
this.timer = setInterval(() => {
this.initData()
}, this.interTime)
},
async initData () {
let res = await dwzt()
clearInterval(this.timeOut)