|
|
@@ -7,7 +7,7 @@ import { |
|
|
import { to } from '@/utils/promise'; |
|
|
import { to } from '@/utils/promise'; |
|
|
import tableCellRender, { arrayFormatter, dateFormatter } from '@/utils/table'; |
|
|
import tableCellRender, { arrayFormatter, dateFormatter } from '@/utils/table'; |
|
|
import { useSearchParams } from '@umijs/max'; |
|
|
import { useSearchParams } from '@umijs/max'; |
|
|
import { App, Button, Table, /*TablePaginationConfig,*/ TableProps } from 'antd'; |
|
|
|
|
|
|
|
|
import { App, Button, Table, /* TablePaginationConfig,*/ TableProps } from 'antd'; |
|
|
import classNames from 'classnames'; |
|
|
import classNames from 'classnames'; |
|
|
import { useEffect, useMemo, useState } from 'react'; |
|
|
import { useEffect, useMemo, useState } from 'react'; |
|
|
import ExperimentStatusCell from '../components/ExperimentStatusCell'; |
|
|
import ExperimentStatusCell from '../components/ExperimentStatusCell'; |
|
|
@@ -38,6 +38,7 @@ function ExperimentComparison() { |
|
|
// const [cacheState, setCacheState] = useCacheState(); |
|
|
// const [cacheState, setCacheState] = useCacheState(); |
|
|
// const [total, setTotal] = useState(0); |
|
|
// const [total, setTotal] = useState(0); |
|
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]); |
|
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]); |
|
|
|
|
|
const [loading, setLoading] = useState(false); |
|
|
const { message } = App.useApp(); |
|
|
const { message } = App.useApp(); |
|
|
// const [pagination, setPagination] = useState<TablePaginationConfig>( |
|
|
// const [pagination, setPagination] = useState<TablePaginationConfig>( |
|
|
// cacheState?.pagination ?? { |
|
|
// cacheState?.pagination ?? { |
|
|
@@ -52,9 +53,11 @@ function ExperimentComparison() { |
|
|
|
|
|
|
|
|
// 获取对比数据列表 |
|
|
// 获取对比数据列表 |
|
|
const getComparisonData = async () => { |
|
|
const getComparisonData = async () => { |
|
|
|
|
|
setLoading(true); |
|
|
const request = |
|
|
const request = |
|
|
comparisonType === ComparisonType.Train ? getExpTrainInfosReq : getExpEvaluateInfosReq; |
|
|
comparisonType === ComparisonType.Train ? getExpTrainInfosReq : getExpEvaluateInfosReq; |
|
|
const [res] = await to(request(experimentId)); |
|
|
const [res] = await to(request(experimentId)); |
|
|
|
|
|
setLoading(false); |
|
|
if (res && res.data) { |
|
|
if (res && res.data) { |
|
|
// const { content = [], totalElements = 0 } = res.data; |
|
|
// const { content = [], totalElements = 0 } = res.data; |
|
|
setTableData(res.data); |
|
|
setTableData(res.data); |
|
|
@@ -180,6 +183,7 @@ function ExperimentComparison() { |
|
|
scroll={{ y: 'calc(100% - 55px)' }} |
|
|
scroll={{ y: 'calc(100% - 55px)' }} |
|
|
pagination={false} |
|
|
pagination={false} |
|
|
bordered={true} |
|
|
bordered={true} |
|
|
|
|
|
loading={loading} |
|
|
// pagination={{ |
|
|
// pagination={{ |
|
|
// ...pagination, |
|
|
// ...pagination, |
|
|
// total: total, |
|
|
// total: total, |
|
|
|