取消定时
This commit is contained in:
@@ -66,7 +66,7 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) {
|
||||
|
||||
//渲染速率图
|
||||
function initPicture() {
|
||||
clearTimeout(timeoutId.value);
|
||||
// clearTimeout(timeoutId.value);
|
||||
|
||||
let queryArr: any = [];
|
||||
const initTime: Date = new Date();
|
||||
@@ -77,9 +77,9 @@ function initPicture() {
|
||||
queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)];
|
||||
|
||||
listUPFData(queryArr).then(res => {
|
||||
timeoutId.value = setTimeout(() => {
|
||||
initPicture(); // 5秒后再次获取数据
|
||||
}, 5000);
|
||||
// timeoutId.value = setTimeout(() => {
|
||||
// initPicture(); // 5秒后再次获取数据
|
||||
// }, 5000);
|
||||
let timeArr: any = [];
|
||||
let upValue: any = [];
|
||||
let downValue: any = [];
|
||||
@@ -225,7 +225,7 @@ onMounted(() => {
|
||||
|
||||
/**组件实例被卸载之后调用 */
|
||||
onUnmounted(() => {
|
||||
clearTimeout(timeoutId.value);
|
||||
// clearTimeout(timeoutId.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user