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