From 2dfc2e5297119235702b7004c1ffa009d0c67c42 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Mon, 25 Aug 2025 11:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B3=87=E7=94=A2=E7=AE=A1=E7=90=86=20:=20?= =?UTF-8?q?=E9=81=8E=E6=BF=BE=E7=84=A1=E6=95=88=E6=AA=94=E6=A1=88=E3=80=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B3=87=E7=94=A2=E7=B7=A8=E8=BC=AF=E5=92=8C?= =?UTF-8?q?=E5=9C=96=E8=A1=A8=E8=B3=87=E6=96=99=E4=BE=86=E6=BA=90=E7=9A=84?= =?UTF-8?q?=E8=99=95=E7=90=86=E9=82=8F=E8=BC=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetManagement/components/AssetTable.vue | 16 +++++++++------- .../components/AssetTableModalLeftInfoGraph.vue | 4 +++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/AssetManagement/components/AssetTable.vue b/src/views/AssetManagement/components/AssetTable.vue index 03391b1..b2bff26 100644 --- a/src/views/AssetManagement/components/AssetTable.vue +++ b/src/views/AssetManagement/components/AssetTable.vue @@ -148,13 +148,15 @@ const edit = async (id) => { // changeParams({ ...searchParams.value, main_id: record.id }); const res = await getAssetSingle(id); if (res.isSuccess) { - res.data.oriFile = res.data.oriFile.map((file, index) => ({ - ...file, - key: index, - src: file.file_url, - name: file.orgName, - ext: file.saveName.split(".")[file.saveName.split(".").length - 1], - })); + res.data.oriFile = res.data.oriFile + .filter((file) => file.saveName) + .map((file, index) => ({ + ...file, + key: index, + src: file.file_url, + name: file.orgName, + ext: file.saveName.split(".")[file.saveName.split(".").length - 1], + })); res.data.sub_device = res.data.sub_device?.map( ({ device_number, points }) => ({ device_number, diff --git a/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue b/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue index 55ccf75..95729e9 100644 --- a/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue +++ b/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue @@ -32,7 +32,9 @@ const getMenuData = async () => { const getData = async (id) => { const res = await getGraphData(id); if (res.isSuccess) { - dataSource.value = res.data.map((d) => ({ ...d, key: d.id })); + dataSource.value = res.data + .filter((d) => d.oriSavName) + .map((d) => ({ ...d, key: d.id })); } };