From 88874df91e96fb6cf94230cb35640353ce832fcd Mon Sep 17 00:00:00 2001 From: liutao <790864623@qq.com> Date: Tue, 21 Apr 2026 14:14:04 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=8E=82=E5=8C=BA=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 3 + .../mes/organization/OrganizationForm.vue | 230 ++++++++++++++++-- 2 files changed, 217 insertions(+), 16 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 6b5407cc..d8ec18d2 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -102,6 +102,9 @@ export const DeviceApi = { getAvailableList: async () => { return await request.get({ url: `/iot/device/available-list` }) }, + getAvailableListPage: async (params: any) => { + return await request.get({ url: `/iot/device/available-page` , params}) + }, // 新增物联设备 createDevice: async (data: DeviceVO) => { return await request.post({ url: `/iot/device/create`, data }) diff --git a/src/views/mes/organization/OrganizationForm.vue b/src/views/mes/organization/OrganizationForm.vue index 74f247f6..ebcb42a0 100644 --- a/src/views/mes/organization/OrganizationForm.vue +++ b/src/views/mes/organization/OrganizationForm.vue @@ -79,7 +79,7 @@ - + - - + + - + + + + + + + + + + + diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index 29a77974..acd67889 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -322,7 +322,7 @@ - + { const handleShowAttribute = (row: any) => { attributeDeviceId.value = row?.id attributeDeviceName.value = row?.deviceName ?? '' + router.push({ + path: '/iot/pointManagement', + query: { + id: row?.id, + name: row?.deviceName + } + }); + } const ruleLoading = ref(false) -- 2.38.5 From 91c2ef7e805eefc17ef426f5c6dcf5798ecde20d Mon Sep 17 00:00:00 2001 From: liutao <790864623@qq.com> Date: Thu, 23 Apr 2026 17:15:11 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 4 + src/locales/en.ts | 2 +- src/locales/zh-CN.ts | 4 +- .../iot/historyData/HistorySingleAnalyse.vue | 924 ++++++++++++++++++ src/views/iot/historyData/index.vue | 31 +- 5 files changed, 959 insertions(+), 6 deletions(-) create mode 100644 src/views/iot/historyData/HistorySingleAnalyse.vue diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 235ab29f..c786a796 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -177,6 +177,10 @@ export const DeviceApi = { getDeviceAttributePage: async (params) => { return await request.get({ url: `/iot/device/device-attribute/page`, params }) }, + // 获得设备属性按类型分租 + getDeviceAttributeGroupList: async (params) => { + return await request.get({ url: `/iot/device/device-attribute/groupList`, params }) + }, // 获得设备属性列表 getDeviceAttributeList: async (deviceId: number | string) => { return await request.get({ url: `/iot/device/device-attribute/list?deviceId=` + deviceId }) diff --git a/src/locales/en.ts b/src/locales/en.ts index 803dec7d..1603c11e 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -4227,7 +4227,7 @@ export default { tableCollectionTimeColumn: 'Collection Time', tableOperateColumn: 'Operation', tableActionHistoryLabel: 'History', - + tableActionHistoryAnalyseLabel: 'History Data Analysis', dialogTitlePrefix: 'History: ', dialogCollectionTimeLabel: 'Collection Time', dialogPointFilterLabel:'Point Filter', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index b139997a..3063462a 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -4070,7 +4070,7 @@ export default { tableCollectionTimeColumn: '采集时间', tableOperateColumn: '操作', tableActionHistoryLabel: '历史记录', - + tableActionHistoryAnalyseLabel: '数据分析', dialogTitlePrefix: '历史记录:', dialogCollectionTimeLabel: '采集时间', dialogPointFilterLabel: '点位筛选', @@ -4444,7 +4444,7 @@ export default { tableCollectionTimeColumn: '采集时间', tableOperateColumn: '操作', tableActionHistoryLabel: '历史记录', - + tableActionHistoryAnalyseLabel: '数据分析', dialogTitlePrefix: '历史记录:', dialogCollectionTimeLabel: '采集时间', dialogPointFilterLabel: '点位筛选', diff --git a/src/views/iot/historyData/HistorySingleAnalyse.vue b/src/views/iot/historyData/HistorySingleAnalyse.vue new file mode 100644 index 00000000..ab02af57 --- /dev/null +++ b/src/views/iot/historyData/HistorySingleAnalyse.vue @@ -0,0 +1,924 @@ + + + + + diff --git a/src/views/iot/historyData/index.vue b/src/views/iot/historyData/index.vue index c815878e..0f137ed8 100644 --- a/src/views/iot/historyData/index.vue +++ b/src/views/iot/historyData/index.vue @@ -108,12 +108,15 @@ :label="t('DataCollection.HistoryData.tableOperateColumn')" align="center" fixed="right" - width="150px" + width="300px" > @@ -137,9 +140,10 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import { DeviceApi, LineDeviceVO, LineDevicePageParams } from '@/api/iot/device' import HistorySingleDeviceDialog from './HistorySingleDeviceDialog.vue' - +import {useRouter} from "vue-router"; +// 路由 +const router = useRouter() defineOptions({ name: 'HistoryData' }) - const message = useMessage() const { t } = useI18n() @@ -225,6 +229,27 @@ const handleSingleView = (row: LineDeviceVO) => { singleDialogVisible.value = true } +const handleSingleAnalyseView = (row: LineDeviceVO) => { + const deviceId = (row as any)?.deviceId ?? row?.id + if (deviceId === undefined || deviceId === null || deviceId === '') { + return + } + singleDeviceId.value = deviceId + singleDeviceName.value = row.deviceName || '' + router.push({ + path: '/iot/historySingleAnalyse', + query: { + id: deviceId, + name: singleDeviceName.value, + deviceCode: row.deviceCode, + lineNode: row.lineNode, + lineName: row.lineName, + collectionTime: row.collectionTime + } + }); +} + + onMounted(() => { getList() }) -- 2.38.5 From 2dfbe31f0d00c6ee34b7f33a71f5a7e9b795e85b Mon Sep 17 00:00:00 2001 From: liutao <790864623@qq.com> Date: Tue, 28 Apr 2026 16:38:53 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=86=E6=9E=90=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/historyData/HistorySingleAnalyse.vue | 540 ++++++++++++++---- 1 file changed, 424 insertions(+), 116 deletions(-) diff --git a/src/views/iot/historyData/HistorySingleAnalyse.vue b/src/views/iot/historyData/HistorySingleAnalyse.vue index ab02af57..fa3f0bf6 100644 --- a/src/views/iot/historyData/HistorySingleAnalyse.vue +++ b/src/views/iot/historyData/HistorySingleAnalyse.vue @@ -17,10 +17,10 @@ 保存分析方案 - + 刷新 @@ -64,6 +64,7 @@ format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" + @change="handleStartTimeChange" /> @@ -77,6 +78,8 @@ format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" + @change="handleEndTimeChange" + :picker-options="endTimeOptions" /> @@ -101,8 +104,9 @@ placeholder="搜索点位名称或编码" clearable style="width: 200px; margin-right: 10px" + @input="handlePointSearch" /> - 选择温度类 + 选择工艺参数 清空 @@ -123,9 +127,9 @@
@@ -152,17 +156,17 @@
- + @@ -197,19 +201,14 @@ 多点位历史趋势分析
- 全部显示 - 仅异常点位 + + - - -
- -
- - +
+ - +
- +