From 8998160f7a204e8a1e9dd263ea519dfb5bde3490 Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 15 Jan 2026 17:06:55 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E8=83=BD=E6=BA=90=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E6=9B=B4=E6=8D=A2=E5=AD=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 4 ++-- src/views/mes/energydevicecheck/index.vue | 24 ++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.env.local b/.env.local index 5bdf058c..9f6a531f 100644 --- a/.env.local +++ b/.env.local @@ -8,8 +8,8 @@ VITE_DEV=true # 线上环境 # VITE_BASE_URL='https://besure.ngsk.tech:7001' # 本地联调 -VITE_BASE_URL='http://localhost:48081' -# VITE_BASE_URL='http://192.168.5.135:48081' +# VITE_BASE_URL='http://192.168.5.107:48081' +VITE_BASE_URL='http://192.168.5.131:48081' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 diff --git a/src/views/mes/energydevicecheck/index.vue b/src/views/mes/energydevicecheck/index.vue index 8900fe01..742e43b4 100644 --- a/src/views/mes/energydevicecheck/index.vue +++ b/src/views/mes/energydevicecheck/index.vue @@ -39,10 +39,14 @@ @@ -116,20 +120,18 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -const getOperationRuleRows = (row: EnergyDeviceDataRecordVO) => { - const map = row?.operationRulesVOMap - if (!map) return [] - const entries = Object.entries(map).filter(([k]) => !!k) - if (!entries.length) return [] - return entries.map(([name, value]) => ({ name, value: value ?? '-' })) +const getPointDetailsRows = (row: EnergyDeviceDataRecordVO) => { + const list = (row as any)?.pointDetails + if (!Array.isArray(list)) return [] + return list } const getRowClassName = ({ row }: { row: EnergyDeviceDataRecordVO }) => { - return getOperationRuleRows(row).length ? '' : 'row-no-expand' + return getPointDetailsRows(row).length ? '' : 'row-no-expand' } const handleRowClick = (row: EnergyDeviceDataRecordVO) => { - const rows = getOperationRuleRows(row) + const rows = getPointDetailsRows(row) if (!rows.length) return const key = row.id const idx = expandRowKeys.value.findIndex((k) => k === key)