From f67034c447473ffd464ff85b221c156df7d89194 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期一, 18 十一月 2024 11:07:03 +0800 Subject: [PATCH] 增加测试环境配置VITE_VIDEO_CAMERA_DOMAIN='172.16.59.105' --- src/views/data/channel/http/api/tag/index.vue | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/views/data/channel/http/api/tag/index.vue b/src/views/data/channel/http/api/tag/index.vue index 82cf55a..5f16d44 100644 --- a/src/views/data/channel/http/api/tag/index.vue +++ b/src/views/data/channel/http/api/tag/index.vue @@ -163,6 +163,7 @@ import {ref} from "vue"; import {onBeforeUnmount, onMounted} from "vue"; import TagImportForm from '../../../common/tag/TagImportForm.vue' + import * as OpcUaTagApi from "@/api/data/channel/opcua/tag"; defineOptions({name: 'HttpTag'}) @@ -275,4 +276,24 @@ exportLoading.value = false } } + + let intervalId; + + onMounted(async () => { + // 创建定时器 + intervalId = setInterval(async () => { + if(queryParams.currentValue){ + const page = await HttpTagApi.getHttpTagPage(queryParams) + list.value = page.list + total.value = page.total + } + }, 10000); + }); + + // 在组件卸载时清除定时器 + onBeforeUnmount(() => { + if (intervalId) { + clearInterval(intervalId); + } + }); </script> -- Gitblit v1.9.3