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 })); } };