| @@ -17,7 +17,7 @@ const filterResourceStandard: SelectProps<string, ComputingResource>['filterOpti | |||||
| const convertId = (item: any) => ({ | const convertId = (item: any) => ({ | ||||
| ...item, | ...item, | ||||
| id: JSON.stringify({ | id: JSON.stringify({ | ||||
| id: item.id, | |||||
| id: `${item.id}`, | |||||
| name: item.name, | name: item.name, | ||||
| identifier: item.identifier, | identifier: item.identifier, | ||||
| owner: item.owner, | owner: item.owner, | ||||
| @@ -37,7 +37,7 @@ export const paramSelectConfig: Record<string, SelectPropsConfig> = { | |||||
| const res = await getDatasetList({ | const res = await getDatasetList({ | ||||
| page: 0, | page: 0, | ||||
| size: 1000, | size: 1000, | ||||
| available_range: 0, | |||||
| is_public: false, | |||||
| }); | }); | ||||
| return res?.data?.content?.map(convertId) ?? []; | return res?.data?.content?.map(convertId) ?? []; | ||||
| }, | }, | ||||
| @@ -52,7 +52,7 @@ export const paramSelectConfig: Record<string, SelectPropsConfig> = { | |||||
| const res = await getModelList({ | const res = await getModelList({ | ||||
| page: 0, | page: 0, | ||||
| size: 1000, | size: 1000, | ||||
| available_range: 0, | |||||
| is_public: false, | |||||
| }); | }); | ||||
| return res?.data?.content?.map(convertId) ?? []; | return res?.data?.content?.map(convertId) ?? []; | ||||
| }, | }, | ||||
| @@ -24,7 +24,12 @@ function ResourceVersion({ resourceType, info }: ResourceVersionProps) { | |||||
| // 全部导出 | // 全部导出 | ||||
| const handleExport = async () => { | const handleExport = async () => { | ||||
| const url = config.downloadAllAction; | const url = config.downloadAllAction; | ||||
| downLoadZip(url, { name: info.name, id: info.id, version: info.version }); | |||||
| downLoadZip(url, { | |||||
| name: info.name, | |||||
| id: info.id, | |||||
| version: info.version, | |||||
| identifier: info.identifier, | |||||
| }); | |||||
| }; | }; | ||||
| // 单个导出 | // 单个导出 | ||||
| @@ -80,7 +80,7 @@ export const resourceConfig: Record<ResourceType, ResourceTypeInfo> = { | |||||
| uploadAction: '/api/mmp/newdataset/upload', | uploadAction: '/api/mmp/newdataset/upload', | ||||
| uploadAccept: '.zip,.tgz', | uploadAccept: '.zip,.tgz', | ||||
| downloadAllAction: '/api/mmp/newdataset/downloadAllFiles', | downloadAllAction: '/api/mmp/newdataset/downloadAllFiles', | ||||
| downloadSingleAction: '/api/mmp/newdataset/downloadSinggerFile', | |||||
| downloadSingleAction: '/api/mmp/newdataset/downloadSingleFile', | |||||
| }, | }, | ||||
| [ResourceType.Model]: { | [ResourceType.Model]: { | ||||
| getList: getModelList, | getList: getModelList, | ||||
| @@ -75,7 +75,7 @@ function ExportModelModal({ path, onOk, ...rest }: ExportModelModalProps) { | |||||
| const params = { | const params = { | ||||
| page: 0, | page: 0, | ||||
| size: 1000, | size: 1000, | ||||
| available_range: 0, // 个人 | |||||
| is_public: false, // 个人 | |||||
| }; | }; | ||||
| const [res] = await to(getModelList(params)); | const [res] = await to(getModelList(params)); | ||||
| if (res && res.data) { | if (res && res.data) { | ||||
| @@ -67,14 +67,6 @@ export function downloadAllFiles(params) { | |||||
| }); | }); | ||||
| } | } | ||||
| // 下载数据集单个文件 | |||||
| export function downloadSingleFile(params) { | |||||
| return request(`/api/mmp/newdataset/downloadSinggerFile`, { | |||||
| method: 'GET', | |||||
| params, | |||||
| }); | |||||
| } | |||||
| // 删除数据集版本 | // 删除数据集版本 | ||||
| export function deleteDatasetVersion(params) { | export function deleteDatasetVersion(params) { | ||||
| return request(`/api/mmp/newdataset/deleteDatasetVersion`, { | return request(`/api/mmp/newdataset/deleteDatasetVersion`, { | ||||