資產管理 : 過濾無效檔案、更新資產編輯和圖表資料來源的處理邏輯
This commit is contained in:
parent
8243900f96
commit
2dfc2e5297
@ -148,7 +148,9 @@ const edit = async (id) => {
|
|||||||
// changeParams({ ...searchParams.value, main_id: record.id });
|
// changeParams({ ...searchParams.value, main_id: record.id });
|
||||||
const res = await getAssetSingle(id);
|
const res = await getAssetSingle(id);
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
res.data.oriFile = res.data.oriFile.map((file, index) => ({
|
res.data.oriFile = res.data.oriFile
|
||||||
|
.filter((file) => file.saveName)
|
||||||
|
.map((file, index) => ({
|
||||||
...file,
|
...file,
|
||||||
key: index,
|
key: index,
|
||||||
src: file.file_url,
|
src: file.file_url,
|
||||||
|
@ -32,7 +32,9 @@ const getMenuData = async () => {
|
|||||||
const getData = async (id) => {
|
const getData = async (id) => {
|
||||||
const res = await getGraphData(id);
|
const res = await getGraphData(id);
|
||||||
if (res.isSuccess) {
|
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 }));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user