UPF定时器修正
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user