From 6daa09918c90fb3b8b62656164ee143820c6dcba Mon Sep 17 00:00:00 2001 From: sheng <905537351@qq.com> Date: Fri, 26 Jun 2026 17:05:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E5=A4=87=E7=82=B9?= =?UTF-8?q?=E6=A3=80=E6=97=A5=E5=BF=97=E5=88=86=E9=A1=B5=E6=80=BB=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection-management/inspection-logs/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/equipment-management/inspection-management/inspection-logs/index.vue b/src/views/equipment-management/inspection-management/inspection-logs/index.vue index 42622876..0b00ac6a 100644 --- a/src/views/equipment-management/inspection-management/inspection-logs/index.vue +++ b/src/views/equipment-management/inspection-management/inspection-logs/index.vue @@ -56,10 +56,11 @@ import { getUserList } from '@/api/system-administration/user' import { getDetailsList, createExportTask } from '@/api/equipment-management/inspection-logs' function readPageData (res) { - const data = res && res.data !== undefined ? res.data : res - if (Array.isArray(data)) return { list: data, total: data.length } - if (data && Array.isArray(data.data)) return { list: data.data, total: Number(data.count || data.total || data.data.length) } - if (data && data.data && Array.isArray(data.data.data)) return { list: data.data.data, total: Number(data.data.count || data.data.total || data.data.data.length) } + if (Array.isArray(res)) return { list: res, total: res.length } + if (res && Array.isArray(res.data)) return { list: res.data, total: Number(res.count || res.total || res.data.length) } + if (res && res.data && Array.isArray(res.data.data)) { + return { list: res.data.data, total: Number(res.data.count || res.data.total || res.data.data.length) } + } return { list: [], total: 0 } }