| @@ -7,10 +7,9 @@ | |||||
| border-radius: 10px; | border-radius: 10px; | ||||
| &__download { | &__download { | ||||
| display: flex; | |||||
| align-items: center; | |||||
| height: 34px; | |||||
| margin-bottom: 16px; | |||||
| padding-top: 16px; | |||||
| padding-bottom: 16px; | |||||
| padding-left: @content-padding; | padding-left: @content-padding; | ||||
| color: @text-color; | color: @text-color; | ||||
| font-size: 13px; | font-size: 13px; | ||||
| @@ -18,7 +17,10 @@ | |||||
| border-radius: 4px; | border-radius: 4px; | ||||
| &__btn { | &__btn { | ||||
| margin-left: 22px; | |||||
| display: block; | |||||
| height: 36px; | |||||
| margin-top: 15px; | |||||
| font-size: 14px; | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,5 +1,4 @@ | |||||
| import InfoGroup from '@/components/InfoGroup'; | import InfoGroup from '@/components/InfoGroup'; | ||||
| import KFIcon from '@/components/KFIcon'; | |||||
| import { getFileReq } from '@/services/file'; | import { getFileReq } from '@/services/file'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { Button, Image } from 'antd'; | import { Button, Image } from 'antd'; | ||||
| @@ -38,28 +37,10 @@ function ExperimentResult({ fileUrl, imageUrl, modelPath }: ExperimentResultProp | |||||
| return ( | return ( | ||||
| <div className={styles['experiment-result']}> | <div className={styles['experiment-result']}> | ||||
| {modelPath && ( | |||||
| <div className={styles['experiment-result__download']}> | |||||
| <span style={{ marginRight: '12px', color: '#606b7a' }}>文件名</span> | |||||
| <span>save_model.joblib</span> | |||||
| <Button | |||||
| type="link" | |||||
| className={styles['experiment-result__download__btn']} | |||||
| icon={<KFIcon type="icon-a-xiazai1" />} | |||||
| size="small" | |||||
| iconPosition="end" | |||||
| onClick={() => { | |||||
| window.location.href = modelPath; | |||||
| }} | |||||
| > | |||||
| 模型下载 | |||||
| </Button> | |||||
| </div> | |||||
| )} | |||||
| <InfoGroup title="实验结果" contentScroll> | <InfoGroup title="实验结果" contentScroll> | ||||
| <div className={styles['experiment-result__text']}>{result}</div> | <div className={styles['experiment-result__text']}>{result}</div> | ||||
| </InfoGroup> | </InfoGroup> | ||||
| <InfoGroup title="可视化结果" style={{ marginTop: '16px' }}> | |||||
| <InfoGroup title="可视化结果" style={{ margin: '16px 0' }}> | |||||
| <div className={styles['experiment-result__images']}> | <div className={styles['experiment-result__images']}> | ||||
| <Image.PreviewGroup | <Image.PreviewGroup | ||||
| preview={{ | preview={{ | ||||
| @@ -80,6 +61,21 @@ function ExperimentResult({ fileUrl, imageUrl, modelPath }: ExperimentResultProp | |||||
| </Image.PreviewGroup> | </Image.PreviewGroup> | ||||
| </div> | </div> | ||||
| </InfoGroup> | </InfoGroup> | ||||
| {modelPath && ( | |||||
| <div className={styles['experiment-result__download']}> | |||||
| <span style={{ marginRight: '12px', color: '#606b7a' }}>文件名</span> | |||||
| <span>save_model.joblib</span> | |||||
| <Button | |||||
| type="primary" | |||||
| className={styles['experiment-result__download__btn']} | |||||
| onClick={() => { | |||||
| window.location.href = modelPath; | |||||
| }} | |||||
| > | |||||
| 模型下载 | |||||
| </Button> | |||||
| </div> | |||||
| )} | |||||
| </div> | </div> | ||||
| ); | ); | ||||
| } | } | ||||
| @@ -3,6 +3,12 @@ | |||||
| .ant-drawer-body { | .ant-drawer-body { | ||||
| overflow-y: hidden; | overflow-y: hidden; | ||||
| } | } | ||||
| .ant-drawer-close { | |||||
| position: absolute; | |||||
| top: 16px; | |||||
| right: 16px; | |||||
| } | |||||
| } | } | ||||
| &__tabs { | &__tabs { | ||||
| @@ -2,7 +2,7 @@ import { ExperimentStatus } from '@/enums'; | |||||
| import { experimentStatusInfo } from '@/pages/Experiment/status'; | import { experimentStatusInfo } from '@/pages/Experiment/status'; | ||||
| import { PipelineNodeModelSerialize } from '@/types'; | import { PipelineNodeModelSerialize } from '@/types'; | ||||
| import { elapsedTime, formatDate } from '@/utils/date'; | import { elapsedTime, formatDate } from '@/utils/date'; | ||||
| import { DatabaseOutlined, ProfileOutlined } from '@ant-design/icons'; | |||||
| import { CloseOutlined, DatabaseOutlined, ProfileOutlined } from '@ant-design/icons'; | |||||
| import { Drawer, Tabs } from 'antd'; | import { Drawer, Tabs } from 'antd'; | ||||
| import { useMemo } from 'react'; | import { useMemo } from 'react'; | ||||
| import ExperimentParameter from '../ExperimentParameter'; | import ExperimentParameter from '../ExperimentParameter'; | ||||
| @@ -95,10 +95,11 @@ const ExperimentDrawer = ({ | |||||
| return ( | return ( | ||||
| <Drawer | <Drawer | ||||
| rootStyle={{ marginTop: '55px' }} | |||||
| title="任务执行详情" | title="任务执行详情" | ||||
| placement="right" | placement="right" | ||||
| getContainer={false} | getContainer={false} | ||||
| closeIcon={false} | |||||
| closeIcon={<CloseOutlined className={styles['experiment-drawer__close']} />} | |||||
| onClose={onClose} | onClose={onClose} | ||||
| open={open} | open={open} | ||||
| width={520} | width={520} | ||||
| @@ -49,7 +49,7 @@ const GlobalParamsDrawer = forwardRef( | |||||
| return ( | return ( | ||||
| <Drawer | <Drawer | ||||
| rootStyle={{ marginTop: '45px' }} | |||||
| rootStyle={{ marginTop: '55px' }} | |||||
| title="全局参数" | title="全局参数" | ||||
| placement="right" | placement="right" | ||||
| closeIcon={false} | closeIcon={false} | ||||
| @@ -335,7 +335,7 @@ const PipelineNodeParameter = forwardRef(({ onFormChange }: PipelineNodeParamete | |||||
| <Drawer | <Drawer | ||||
| title="编辑任务" | title="编辑任务" | ||||
| placement="right" | placement="right" | ||||
| rootStyle={{ marginTop: '52px' }} | |||||
| rootStyle={{ marginTop: '55px' }} | |||||
| getContainer={false} | getContainer={false} | ||||
| closeIcon={false} | closeIcon={false} | ||||
| onClose={onClose} | onClose={onClose} | ||||