| | |
| | | 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'}) |
| | | |
| | |
| | | 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> |
| | |
| | | import {ref,reactive} from "vue"; |
| | | import TagImportForm from '../../common/tag/TagImportForm.vue' |
| | | import {onBeforeUnmount, onMounted} from "vue"; |
| | | import * as OpcdaTagApi from "@/api/data/channel/opcda/tag"; |
| | | |
| | | defineOptions({name: 'ModBusTag'}) |
| | | |
| | |
| | | // 创建定时器 |
| | | intervalId = setInterval(async () => { |
| | | if(queryParams.currentValue){ |
| | | const page = await OpcdaTagApi.getOpcdaTagPage(queryParams) |
| | | const page = await OpcDaTagApi.getOpcdaTagPage(queryParams) |
| | | list.value = page.list |
| | | total.value = page.total |
| | | } |
| | |
| | | import * as OpcUaTagApi from "@/api/data/channel/opcua/tag"; |
| | | import TagForm from './TagForm.vue' |
| | | import download from "@/utils/download"; |
| | | import {ref,reactive} from "vue"; |
| | | import {ref, reactive, onMounted, onBeforeUnmount} from "vue"; |
| | | import TagImportForm from '../../common/tag/TagImportForm.vue' |
| | | import * as OpcdaTagApi from "@/api/data/channel/opcda/tag"; |
| | | |
| | | defineOptions({name: 'OpcuaTag'}) |
| | | |
| | |
| | | device: undefined, |
| | | deviceId: undefined, |
| | | tagName: undefined, |
| | | currentValue:false, |
| | | address: undefined |
| | | }) |
| | | const queryFormRef = ref() // 搜索的表单 |
| | |
| | | exportLoading.value = false |
| | | } |
| | | } |
| | | |
| | | let intervalId; |
| | | |
| | | onMounted(async () => { |
| | | // 创建定时器 |
| | | intervalId = setInterval(async () => { |
| | | if(queryParams.currentValue){ |
| | | const page = await OpcUaTagApi.getOpcuaTagPage(queryParams) |
| | | list.value = page.list |
| | | total.value = page.total |
| | | } |
| | | }, 10000); |
| | | }); |
| | | |
| | | // 在组件卸载时清除定时器 |
| | | onBeforeUnmount(() => { |
| | | if (intervalId) { |
| | | clearInterval(intervalId); |
| | | } |
| | | }); |
| | | </script> |