UPF定时器修正

This commit is contained in:
lai
2024-01-31 10:35:35 +08:00
parent aa8d1af6ab
commit 59bdc79158

View File

@@ -42,7 +42,7 @@ type EChartsOption = echarts.ComposeOption<
let timeoutDuration = 5 * 1000; // 设置5s进行刷新请求
let loadId: any = null;
// 超时锁屏
// 定时制图
function resetTimeout() {
if (loadId) {
clearInterval(loadId);
@@ -75,6 +75,9 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) {
//渲染速率图
function initPicture() {
if (loadId) {
clearInterval(loadId);
}
let queryArr: any = [];
const initTime: Date = new Date();
const startTime: Date = new Date(initTime);
@@ -84,6 +87,8 @@ function initPicture() {
queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)];
listUPFData(queryArr).then(res => {
resetTimeout();
let timeArr: any = [];
let upValue: any = [];
let downValue: any = [];