Commit c40f924e authored by 张伯涛's avatar 张伯涛

首页定时任务修改

parent ba49601e
...@@ -714,9 +714,7 @@ export default { ...@@ -714,9 +714,7 @@ export default {
} }
}, },
created() { created() {
this.intercal = setInterval(_ => { this.getStaTable()
this.getStaTable()
}, 2000)
}, },
mounted() { mounted() {
}, },
...@@ -855,6 +853,11 @@ export default { ...@@ -855,6 +853,11 @@ export default {
}, },
// 获取表数据 // 获取表数据
getStaTable() { getStaTable() {
this.intercal = setInterval(_ => {
this.getStaTableChild()
}, 2000)
},
getStaTableChild() {
clearInterval(this.intercal) clearInterval(this.intercal)
const params = {} const params = {}
getTableData(params).then(res => { getTableData(params).then(res => {
...@@ -885,14 +888,10 @@ export default { ...@@ -885,14 +888,10 @@ export default {
// this.monitoringData[i].tableData.push(row) // this.monitoringData[i].tableData.push(row)
} }
this.intercal = setInterval(_ => {
this.getStaTable()
}, 2000)
console.log('this.monitoringData', this.monitoringData) console.log('this.monitoringData', this.monitoringData)
this.getStaTable()
}).catch(_ => { }).catch(_ => {
this.intercal = setInterval(_ => { this.getStaTable()
this.getStaTable()
}, 2000)
}) })
}, },
openModel(row, item, data) { openModel(row, item, data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment