From afefebdae80e253bb6a585d4d9e1a888a614a30e Mon Sep 17 00:00:00 2001 From: hwj Date: Sun, 4 Jan 2026 11:06:09 +0800 Subject: [PATCH 01/13] =?UTF-8?q?style=EF=BC=9A=E9=87=87=E9=9B=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E8=A1=A8=E5=A4=B4=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/device/index.vue | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index 0f7a901f..cf5179d5 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -3,11 +3,13 @@ - - @@ -48,7 +50,8 @@ 新增 - 导出 @@ -61,7 +64,8 @@ - @@ -71,7 +75,7 @@ --> - + @@ -81,7 +85,7 @@ - + - + @@ -120,7 +124,8 @@ 编辑 - {{ isRowConnected(scope.row) ? '断开连接' : '连接' }} @@ -131,7 +136,8 @@ - From fc327a9641e3f5bc4e16d57e25a3c99d584b4ce9 Mon Sep 17 00:00:00 2001 From: hwj Date: Sun, 4 Jan 2026 15:41:36 +0800 Subject: [PATCH 02/13] =?UTF-8?q?style=EF=BC=9A=E6=95=B0=E6=8D=AE=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E7=9B=91=E6=8E=A7-=E4=BF=AE=E5=A4=8Dts=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/realTimeMonitoring/index.vue | 83 ++++++---------------- 1 file changed, 22 insertions(+), 61 deletions(-) diff --git a/src/views/iot/realTimeMonitoring/index.vue b/src/views/iot/realTimeMonitoring/index.vue index b97ce46b..dec6cd40 100644 --- a/src/views/iot/realTimeMonitoring/index.vue +++ b/src/views/iot/realTimeMonitoring/index.vue @@ -3,39 +3,23 @@ +v-model="queryParams.lineNode" placeholder="请输入产线编码" clearable @keyup.enter="handleQuery" + class="!w-240px" /> +v-model="queryParams.lineName" placeholder="请输入产线名称" clearable @keyup.enter="handleQuery" + class="!w-240px" /> +v-model="queryParams.deviceCode" placeholder="请输入设备编码" clearable @keyup.enter="handleQuery" + class="!w-240px" /> +v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" + class="!w-240px" /> @@ -49,13 +33,7 @@ - + @@ -65,13 +43,7 @@ - + - + + label="最新采集时间" + align="center" + prop="latestCollectionTime" + :formatter="dateFormatter" + width="170px" + /> From 146951c0f9ffcbe4e800e59676b6964707c869ad Mon Sep 17 00:00:00 2001 From: hwj Date: Sun, 4 Jan 2026 18:17:04 +0800 Subject: [PATCH 07/13] =?UTF-8?q?feat=EF=BC=9A=E6=95=B0=E6=8D=AE=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E7=9B=91=E6=8E=A7-=E5=8D=95=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SingleDeviceMonitorDialog.vue | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue diff --git a/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue new file mode 100644 index 00000000..a9f97a4f --- /dev/null +++ b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue @@ -0,0 +1,218 @@ + + + From f79bf1a43f21bf6c8f353c8df0e54fba0f54b71d Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 10:27:46 +0800 Subject: [PATCH 08/13] =?UTF-8?q?style=EF=BC=9A=E9=87=87=E9=9B=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87-=E5=85=B3=E9=97=AD=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/device/index.vue | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index cf5179d5..76ce27b0 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -345,20 +345,9 @@ const handleToggleConnect = async (row: DeviceVO) => { } } -let timer: any = null; /** 初始化 **/ onMounted(() => { getList() - timer = setInterval(async () => { - const data = await DeviceApi.getDevicePage(queryParams) - list.value = data.list - total.value = data.total - }, 5000); -}) -// 组件卸载时销毁图表 -onUnmounted(() => { - if (timer) { - clearInterval(timer); - } }) + From 7102032c702da45e3d38388cfe6f51e87258a540 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 11:55:29 +0800 Subject: [PATCH 09/13] =?UTF-8?q?refactor=EF=BC=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E7=9B=91=E6=8E=A7-=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SingleDeviceMonitorDialog.vue | 283 +++++++++--------- src/views/iot/realTimeMonitoring/index.vue | 18 +- 2 files changed, 143 insertions(+), 158 deletions(-) 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) - } }) From bc719acbcf9914859db8355784d88dab7c5f6227 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 14:54:12 +0800 Subject: [PATCH 10/13] =?UTF-8?q?feat=EF=BC=9A=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=9F=A5=E8=AF=A2-=E5=BC=B9=E6=A1=86=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 10 + .../historyData/HistorySingleDeviceDialog.vue | 279 ++++++++++-------- src/views/iot/historyData/index.vue | 32 +- 3 files changed, 169 insertions(+), 152 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 234f3d4a..ca15f6fc 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -59,6 +59,12 @@ export interface SingleDeviceParams { deviceId: string | number } +export interface HistoryRecordParams { + deviceId: string | number + collectionStartTime?: string + collectionEndTime?: string +} + // 物联设备 API export const DeviceApi = { // 查询物联设备分页 @@ -111,6 +117,10 @@ export const DeviceApi = { return await request.get({ url: `/iot/device/singleDevice`, params }) }, + getHistoryRecord: async (params: HistoryRecordParams) => { + return await request.get({ url: `/iot/device/historyRecord`, params }) + }, + // ==================== 子表(设备属性) ==================== // 获得设备属性分页 diff --git a/src/views/iot/historyData/HistorySingleDeviceDialog.vue b/src/views/iot/historyData/HistorySingleDeviceDialog.vue index 29452385..123c5155 100644 --- a/src/views/iot/historyData/HistorySingleDeviceDialog.vue +++ b/src/views/iot/historyData/HistorySingleDeviceDialog.vue @@ -1,52 +1,52 @@ diff --git a/src/views/iot/historyData/index.vue b/src/views/iot/historyData/index.vue index 16138902..8d9e8a0d 100644 --- a/src/views/iot/historyData/index.vue +++ b/src/views/iot/historyData/index.vue @@ -43,17 +43,6 @@ class="!w-240px" /> - - - 搜索 @@ -87,7 +76,7 @@ @@ -102,8 +91,8 @@ @@ -125,15 +114,14 @@ const queryParams = reactive({ lineName: undefined as string | undefined, deviceCode: undefined as string | undefined, deviceName: undefined as string | undefined, - status: undefined as string | number | undefined, - collectionTimeRange: [] as string[] + status: undefined as string | number | undefined }) const queryFormRef = ref() const singleDialogVisible = ref(false) +const singleDeviceId = ref() const singleDeviceName = ref('') -const singleCollectionTime = ref() const buildQueryParams = (): LineDevicePageParams => { const params: LineDevicePageParams = { @@ -154,11 +142,6 @@ const buildQueryParams = (): LineDevicePageParams => { params.deviceName = queryParams.deviceName } - if (Array.isArray(queryParams.collectionTimeRange) && queryParams.collectionTimeRange.length === 2) { - params.collectionTimeStart = queryParams.collectionTimeRange[0] - params.collectionTimeEnd = queryParams.collectionTimeRange[1] - } - return params } @@ -180,13 +163,16 @@ const handleQuery = () => { const resetQuery = () => { queryFormRef.value?.resetFields() - queryParams.collectionTimeRange = [] handleQuery() } const handleSingleView = (row: LineDeviceVO) => { + const deviceId = (row as any)?.deviceId ?? row?.id + if (deviceId === undefined || deviceId === null || deviceId === '') { + return + } + singleDeviceId.value = deviceId singleDeviceName.value = row.deviceName || '' - singleCollectionTime.value = (row as any).collectionTime singleDialogVisible.value = true } From 629959318cd027321236684d5a0f0a7bdc0896e7 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 14:54:43 +0800 Subject: [PATCH 11/13] =?UTF-8?q?style=EF=BC=9A=E6=95=B0=E6=8D=AE=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E7=9B=91=E6=8E=A7-=E5=BC=B9=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue index 040fd7d2..20a6f8ed 100644 --- a/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue +++ b/src/views/iot/realTimeMonitoring/SingleDeviceMonitorDialog.vue @@ -199,7 +199,7 @@ watch( .single-device-dialog__table-grid { display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; } From 5dbf02a2f2b9894d9558384078ba7af8076fa5af Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 16:00:27 +0800 Subject: [PATCH 12/13] =?UTF-8?q?style=EF=BC=9A=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=9F=A5=E8=AF=A2-=E5=BC=B9=E6=A1=86table=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/historyData/HistorySingleDeviceDialog.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/iot/historyData/HistorySingleDeviceDialog.vue b/src/views/iot/historyData/HistorySingleDeviceDialog.vue index 123c5155..d2d668e3 100644 --- a/src/views/iot/historyData/HistorySingleDeviceDialog.vue +++ b/src/views/iot/historyData/HistorySingleDeviceDialog.vue @@ -124,7 +124,9 @@ const formatCell = (value: string | number | null | undefined) => { const headerCellStyle = () => { return { fontWeight: 500, - padding: '6px 4px' + padding: '6px 4px', + backgroundColor: 'var(--el-fill-color-light)', + color: 'var(--el-text-color-primary)' } } @@ -238,6 +240,10 @@ watch( background: var(--el-fill-color-lighter); } +.single-device-dialog__section :deep(.el-table) { + --el-table-row-hover-bg-color: transparent; +} + .single-device-dialog__record-title { font-size: 13px; margin-bottom: 6px; @@ -253,4 +259,8 @@ watch( .single-device-dialog__section :deep(.el-table__inner-wrapper) { border-radius: 0; } + +.single-device-dialog__section :deep(.el-table__header-wrapper th) { + border-bottom-color: var(--el-border-color); +} From 5ca63c5a85bcdc26ae13b60c149d53c7c8a1cb94 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 5 Jan 2026 17:40:47 +0800 Subject: [PATCH 13/13] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=BF=90=E8=A1=8C=E5=8F=82=E6=95=B0=E5=88=86=E6=9E=90?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/deviceParamAnalysis/index.vue | 315 ++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 src/views/iot/deviceParamAnalysis/index.vue diff --git a/src/views/iot/deviceParamAnalysis/index.vue b/src/views/iot/deviceParamAnalysis/index.vue new file mode 100644 index 00000000..731424a0 --- /dev/null +++ b/src/views/iot/deviceParamAnalysis/index.vue @@ -0,0 +1,315 @@ + + + + +