fix: 看板打开ufp速率定时器

This commit is contained in:
TsMask
2024-02-02 17:14:11 +08:00
parent b9c4cbdf25
commit 071958329c

View File

@@ -39,7 +39,6 @@ type EChartsOption = echarts.ComposeOption<
| LineSeriesOption | LineSeriesOption
>; >;
/**定时器ID */ /**定时器ID */
const timeoutId = ref<any>(null); const timeoutId = ref<any>(null);
@@ -66,7 +65,7 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) {
//渲染速率图 //渲染速率图
function initPicture() { function initPicture() {
// clearTimeout(timeoutId.value); clearTimeout(timeoutId.value);
let queryArr: any = []; let queryArr: any = [];
const initTime: Date = new Date(); const initTime: Date = new Date();
@@ -77,9 +76,9 @@ function initPicture() {
queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)]; queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)];
listUPFData(queryArr).then(res => { listUPFData(queryArr).then(res => {
// timeoutId.value = setTimeout(() => { timeoutId.value = setTimeout(() => {
// initPicture(); // 5秒后再次获取数据 initPicture(); // 5秒后再次获取数据
// }, 5000); }, 5000);
let timeArr: any = []; let timeArr: any = [];
let upValue: any = []; let upValue: any = [];
let downValue: any = []; let downValue: any = [];
@@ -225,7 +224,7 @@ onMounted(() => {
/**组件实例被卸载之后调用 */ /**组件实例被卸载之后调用 */
onUnmounted(() => { onUnmounted(() => {
// clearTimeout(timeoutId.value); clearTimeout(timeoutId.value);
}); });
</script> </script>