fix(自动线收卷):每30秒刷新数据

This commit is contained in:
liaohechuan 2025-05-09 15:40:31 +08:00
parent cf0ce34fdf
commit 37d5ecb979

View File

@ -403,6 +403,15 @@ export default {
},
mounted: function () {
// 每30秒请求一次接口
this.timer = setInterval(() => {
this.initPod(this.formObj.operation, this.formObj.resrce)
}, 30000);
},
beforeDestroy() {
// 清除定时器,避免页面销毁时定时器还在运行
clearInterval(this.timer);
},
beforeRouteEnter(to, from, next) {