diff --git a/react-ui/src/components/KFSpin/index.less b/react-ui/src/components/KFSpin/index.less index 56ff13a..753154d 100644 --- a/react-ui/src/components/KFSpin/index.less +++ b/react-ui/src/components/KFSpin/index.less @@ -9,7 +9,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: rgba(255, 255, 255, 0.5); + background-color: rgba(255, 255, 255, 0.3); &__label { margin-top: 20px; diff --git a/react-ui/src/pages/Dataset/components/CategoryList/index.tsx b/react-ui/src/pages/Dataset/components/CategoryList/index.tsx index 8582168..44922a2 100644 --- a/react-ui/src/pages/Dataset/components/CategoryList/index.tsx +++ b/react-ui/src/pages/Dataset/components/CategoryList/index.tsx @@ -3,17 +3,12 @@ import { CategoryData, ResourceType, resourceConfig } from '../../config'; import CategoryItem from '../CategoryItem'; import styles from './index.less'; -export type CategoryValue = { - dataType: number | undefined; - dataTag: number | undefined; -}; - type CategoryProps = { resourceType: ResourceType; // 资源类型,数据集还是模型 typeList: CategoryData[]; tagList: CategoryData[]; - activeType?: number; - activeTag?: number; + activeType?: string; + activeTag?: string; onTypeSelect: (value: CategoryData) => void; onTagSelect: (value: CategoryData) => void; onSearch: (value: string) => void; @@ -44,7 +39,7 @@ function CategoryList({ resourceType={resourceType} item={item} onClick={onTypeSelect} - isSelected={item.id === activeType} + isSelected={item.name === activeType} > ))} @@ -58,7 +53,7 @@ function CategoryList({ resourceType={resourceType} item={item} onClick={onTagSelect} - isSelected={item.id === activeTag} + isSelected={item.name === activeTag} > ))} diff --git a/react-ui/src/pages/Dataset/components/ResourceList/index.tsx b/react-ui/src/pages/Dataset/components/ResourceList/index.tsx index d194540..739f324 100644 --- a/react-ui/src/pages/Dataset/components/ResourceList/index.tsx +++ b/react-ui/src/pages/Dataset/components/ResourceList/index.tsx @@ -20,8 +20,8 @@ export type ResourceListRef = { type ResourceListProps = { resourceType: ResourceType; - dataType?: number; - dataTag?: number; + dataType?: string; + dataTag?: string; isPublic: boolean; typeList: CategoryData[]; tagList: CategoryData[]; diff --git a/react-ui/src/pages/Dataset/config.tsx b/react-ui/src/pages/Dataset/config.tsx index 5a9fb00..7f9a4af 100644 --- a/react-ui/src/pages/Dataset/config.tsx +++ b/react-ui/src/pages/Dataset/config.tsx @@ -29,9 +29,9 @@ type ResourceTypeInfo = { deleteVersion: (params: any) => Promise; // 删除版本 getInfo: (params: any) => Promise; // 获取详情 name: string; // 名称 - typeParamKey: string; // 类型参数名称,获取资源列表接口使用 - tagParamKey: string; // 标签参数名称,获取资源列表接口使用 - filePropKey: string; + typeParamKey: 'data_type' | 'model_type'; // 类型参数名称,获取资源列表接口使用 + tagParamKey: 'data_tag' | 'model_tag'; // 标签参数名称,获取资源列表接口使用 + filePropKey: 'dataset_version_vos' | 'model_version_vos'; // 文件列表属性 tabItems: TabsProps['items']; // tab 列表 typeTitle: string; // 类型标题 tagTitle: string; // 标签标题 diff --git a/react-ui/src/pages/Experiment/Comparison/index.tsx b/react-ui/src/pages/Experiment/Comparison/index.tsx index e11a016..c4695d5 100644 --- a/react-ui/src/pages/Experiment/Comparison/index.tsx +++ b/react-ui/src/pages/Experiment/Comparison/index.tsx @@ -34,7 +34,7 @@ function ExperimentComparison() { // const [cacheState, setCacheState] = useCacheState(); // const [total, setTotal] = useState(0); const [selectedRowKeys, setSelectedRowKeys] = useState([]); - const [loading, setLoading] = useState(false); + // const [loading, setLoading] = useState(false); const { message } = App.useApp(); const config = useMemo(() => comparisonConfig[comparisonType], [comparisonType]); // const [pagination, setPagination] = useState( @@ -50,11 +50,11 @@ function ExperimentComparison() { // 获取对比数据列表 const getComparisonData = async () => { - setLoading(true); + // setLoading(true); const request = comparisonType === ComparisonType.Train ? getExpTrainInfosReq : getExpEvaluateInfosReq; const [res] = await to(request(experimentId)); - setLoading(false); + // setLoading(false); if (res && res.data) { // const { content = [], totalElements = 0 } = res.data; setTableData(res.data); @@ -204,7 +204,7 @@ function ExperimentComparison() { scroll={{ y: 'calc(100% - 55px)', x: '100%' }} pagination={false} bordered={true} - loading={loading} + // loading={loading} // pagination={{ // ...pagination, // total: total,