diff --git a/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue index a9f97a4f..040fd7d2 100644 --- a/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue +++ b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue @@ -1,73 +1,59 @@ -watch( - () => selectedGroupKey.value, - () => { - pageNo.value = 1 - handlePagination() - } -) + diff --git a/src/views/iot/realTimeMonitoring/index.vue b/src/views/iot/realTimeMonitoring/index.vue index a85de6ae..f5accc16 100644 --- a/src/views/iot/realTimeMonitoring/index.vue +++ b/src/views/iot/realTimeMonitoring/index.vue @@ -59,6 +59,7 @@ v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @ v-model="monitorDialogVisible" :device-id="monitorDeviceId" :device-name="monitorDeviceName" + :collection-time="monitorCollectionTime" /> @@ -91,6 +92,7 @@ const queryFormRef = ref() // 搜索的表单 const monitorDialogVisible = ref(false) const monitorDeviceId = ref() const monitorDeviceName = ref() +const monitorCollectionTime = ref() const buildQueryParams = (): Parameters[0] => { const params: Parameters[0] = { @@ -137,25 +139,11 @@ const handleSingleMonitor = (row: LineDeviceVO) => { } monitorDeviceId.value = deviceId monitorDeviceName.value = row?.deviceName ?? '' + monitorCollectionTime.value = row?.collectionTime monitorDialogVisible.value = true } -let timer: any = null - onMounted(() => { getList() - timer = setInterval(async () => { - try { - const data = await DeviceApi.getLineDevicePage(buildQueryParams()) - list.value = data.list - total.value = data.total - } catch { } - }, 5000) -}) - -onUnmounted(() => { - if (timer) { - clearInterval(timer) - } })