| @@ -224,8 +224,8 @@ const Dataset = () => { | |||||
| <span style={{ color: '#1d1d20', fontSize: '20px' }}>{datasetDetailObj.name}</span> | <span style={{ color: '#1d1d20', fontSize: '20px' }}>{datasetDetailObj.name}</span> | ||||
| <div className={Styles.smallTagBox}> | <div className={Styles.smallTagBox}> | ||||
| <div className={Styles.tagItem}>数据集 id:{datasetDetailObj.id}</div> | <div className={Styles.tagItem}>数据集 id:{datasetDetailObj.id}</div> | ||||
| <div className={Styles.tagItem}>{datasetDetailObj.data_tag || '...'}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.data_type}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.dataset_type_name || '...'}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.dataset_tag_name || '...'}</div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div className={Styles.datasetIntroCneterBox}> | <div className={Styles.datasetIntroCneterBox}> | ||||
| @@ -229,6 +229,11 @@ | |||||
| border-color: #eaeaea; | border-color: #eaeaea; | ||||
| border-radius: 4px; | border-radius: 4px; | ||||
| cursor: pointer; | cursor: pointer; | ||||
| .dropdown{ | |||||
| position: absolute; | |||||
| right: 20px; | |||||
| top: 15px; | |||||
| } | |||||
| .itemText { | .itemText { | ||||
| position: absolute; | position: absolute; | ||||
| top: 20px; | top: 20px; | ||||
| @@ -1,14 +1,22 @@ | |||||
| import { getAccessToken } from '@/access'; | import { getAccessToken } from '@/access'; | ||||
| import clock from '@/assets/img/clock.png'; | import clock from '@/assets/img/clock.png'; | ||||
| import creatByImg from '@/assets/img/creatBy.png'; | import creatByImg from '@/assets/img/creatBy.png'; | ||||
| import deleteIcon from '@/assets/img/delete-icon.png'; | |||||
| import KFIcon from '@/components/KFIcon'; | import KFIcon from '@/components/KFIcon'; | ||||
| import { addDatesetAndVesion, getAssetIcon, getDatasetList } from '@/services/dataset/index.js'; | |||||
| import { | |||||
| addDatesetAndVesion, | |||||
| deleteDataset, | |||||
| getAssetIcon, | |||||
| getDatasetList, | |||||
| } from '@/services/dataset/index.js'; | |||||
| import { getDictSelectOption } from '@/services/system/dict'; | import { getDictSelectOption } from '@/services/system/dict'; | ||||
| import { modalConfirm } from '@/utils/ui'; | |||||
| import { UploadOutlined } from '@ant-design/icons'; | import { UploadOutlined } from '@ant-design/icons'; | ||||
| import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload } from 'antd'; | import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload } from 'antd'; | ||||
| import moment from 'moment'; | import moment from 'moment'; | ||||
| import React, { useEffect, useState } from 'react'; | import React, { useEffect, useState } from 'react'; | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| import './index.less'; | import './index.less'; | ||||
| import Styles from './index.less'; | import Styles from './index.less'; | ||||
| const { Search } = Input; | const { Search } = Input; | ||||
| @@ -277,7 +285,30 @@ const PublicData = (React.FC = () => { | |||||
| return ( | return ( | ||||
| <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | ||||
| <span className={Styles.itemText}>{item.name}</span> | <span className={Styles.itemText}>{item.name}</span> | ||||
| <img | |||||
| onClick={(e) => { | |||||
| e.stopPropagation(); | |||||
| modalConfirm({ | |||||
| title: '确定删除该条数据集实例吗?', | |||||
| onOk: () => { | |||||
| deleteDataset(item.id).then((ret) => { | |||||
| if (ret.code === 200) { | |||||
| message.success('删除成功'); | |||||
| getModelLists(queryFlow); | |||||
| } else { | |||||
| message.error(ret.msg); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }); | |||||
| }} | |||||
| className={Styles.dropdown} | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={deleteIcon} | |||||
| alt="" | |||||
| /> | |||||
| <div className={Styles.itemDescripition}>{item.description}</div> | <div className={Styles.itemDescripition}>{item.description}</div> | ||||
| <div className={Styles.itemTime}> | <div className={Styles.itemTime}> | ||||
| <img | <img | ||||
| style={{ width: '17px', marginRight: '6px' }} | style={{ width: '17px', marginRight: '6px' }} | ||||
| @@ -1,6 +1,8 @@ | |||||
| import clock from '@/assets/img/clock.png'; | import clock from '@/assets/img/clock.png'; | ||||
| import creatByImg from '@/assets/img/creatBy.png'; | import creatByImg from '@/assets/img/creatBy.png'; | ||||
| import { getAssetIcon, getDatasetList } from '@/services/dataset/index.js'; | |||||
| import deleteIcon from '@/assets/img/delete-icon.png'; | |||||
| import { deleteDataset, getAssetIcon, getDatasetList } from '@/services/dataset/index.js'; | |||||
| import { modalConfirm } from '@/utils/ui'; | |||||
| import { Form, Input, Pagination } from 'antd'; | import { Form, Input, Pagination } from 'antd'; | ||||
| import moment from 'moment'; | import moment from 'moment'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| @@ -225,6 +227,28 @@ const PublicData = () => { | |||||
| return ( | return ( | ||||
| <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | ||||
| <span className={Styles.itemText}>{item.name}</span> | <span className={Styles.itemText}>{item.name}</span> | ||||
| <img | |||||
| onClick={(e) => { | |||||
| e.stopPropagation(); | |||||
| modalConfirm({ | |||||
| title: '确定删除该条数据集实例吗?', | |||||
| onOk: () => { | |||||
| deleteDataset(item.id).then((ret) => { | |||||
| if (ret.code === 200) { | |||||
| message.success('删除成功'); | |||||
| getModelLists(queryFlow); | |||||
| } else { | |||||
| message.error(ret.msg); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }); | |||||
| }} | |||||
| className={Styles.dropdown} | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={deleteIcon} | |||||
| alt="" | |||||
| /> | |||||
| <div className={Styles.itemDescripition}>{item.description}</div> | <div className={Styles.itemDescripition}>{item.description}</div> | ||||
| <div className={Styles.itemTime}> | <div className={Styles.itemTime}> | ||||
| <img | <img | ||||
| @@ -29,12 +29,37 @@ | |||||
| background: #ffffff; | background: #ffffff; | ||||
| box-shadow: 0px 3px 6px rgba(146, 146, 146, 0.09); | box-shadow: 0px 3px 6px rgba(146, 146, 146, 0.09); | ||||
| } | } | ||||
| .drawBox{ | |||||
| :global{ | |||||
| .ant-drawer .ant-drawer-body{ | |||||
| overflow: hidden; | |||||
| } | |||||
| } | |||||
| } | |||||
| .experimentDrawer{ | |||||
| :global{ | |||||
| .ant-tabs >.ant-tabs-nav .ant-tabs-nav-list{ | |||||
| margin-left: 24px; | |||||
| } | |||||
| .ant-drawer .ant-drawer-body{ | |||||
| overflow-y: hidden; | |||||
| } | |||||
| .ant-tabs { | |||||
| height: calc(100% - 160px); | |||||
| overflow-y: auto; | |||||
| } | |||||
| } | |||||
| } | |||||
| .detailBox { | .detailBox { | ||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; | ||||
| margin-bottom: 15px; | margin-bottom: 15px; | ||||
| color: #1d1d20; | color: #1d1d20; | ||||
| font-size: 15px; | font-size: 15px; | ||||
| padding-left: 24px; | |||||
| } | } | ||||
| .allMessageItem { | .allMessageItem { | ||||
| display: flex; | display: flex; | ||||
| @@ -386,7 +386,7 @@ const Props = forwardRef(({ onParentChange }, ref) => { | |||||
| }, | }, | ||||
| })); | })); | ||||
| return ( | return ( | ||||
| <> | |||||
| <div className={Styles.drawBox}> | |||||
| <Drawer | <Drawer | ||||
| title="任务执行详情" | title="任务执行详情" | ||||
| placement="right" | placement="right" | ||||
| @@ -397,9 +397,12 @@ const Props = forwardRef(({ onParentChange }, ref) => { | |||||
| afterOpenChange={afterOpenChange} | afterOpenChange={afterOpenChange} | ||||
| open={open} | open={open} | ||||
| width={420} | width={420} | ||||
| className={Styles.experimentDrawer} | |||||
| destroyOnClose={true} | destroyOnClose={true} | ||||
| > | > | ||||
| <div className={Styles.detailBox}>任务名称:{stagingItem.label}</div> | |||||
| <div className={Styles.detailBox} style={{ marginTop: '15px' }}> | |||||
| 任务名称:{stagingItem.label} | |||||
| </div> | |||||
| <div className={Styles.detailBox}> | <div className={Styles.detailBox}> | ||||
| 执行状态: | 执行状态: | ||||
| <div | <div | ||||
| @@ -429,7 +432,7 @@ const Props = forwardRef(({ onParentChange }, ref) => { | |||||
| </div> | </div> | ||||
| <Tabs defaultActiveKey="1" items={items} /> | <Tabs defaultActiveKey="1" items={items} /> | ||||
| </Drawer> | </Drawer> | ||||
| </> | |||||
| </div> | |||||
| ); | ); | ||||
| }); | }); | ||||
| @@ -69,6 +69,7 @@ function Experiment() { | |||||
| return { ...item, key: item.id }; | return { ...item, key: item.id }; | ||||
| }), | }), | ||||
| ); | ); | ||||
| setTotal(res.data.totalElements); | setTotal(res.data.totalElements); | ||||
| } | } | ||||
| }; | }; | ||||
| @@ -82,6 +83,7 @@ function Experiment() { | |||||
| // 获取实验实例 | // 获取实验实例 | ||||
| const getQueryByExperiment = (val) => { | const getQueryByExperiment = (val) => { | ||||
| getQueryByExperimentId(val).then((ret) => { | getQueryByExperimentId(val).then((ret) => { | ||||
| console.log(val); | |||||
| setExpandedRowKeys(val); | setExpandedRowKeys(val); | ||||
| if (ret && ret.data && ret.data.length > 0) { | if (ret && ret.data && ret.data.length > 0) { | ||||
| try { | try { | ||||
| @@ -159,6 +161,7 @@ function Experiment() { | |||||
| }; | }; | ||||
| const expandChange = (e, record) => { | const expandChange = (e, record) => { | ||||
| clearExperimentInTimers(); | clearExperimentInTimers(); | ||||
| console.log(e, record); | |||||
| if (record.id === expandedRowKeys) { | if (record.id === expandedRowKeys) { | ||||
| setExpandedRowKeys(null); | setExpandedRowKeys(null); | ||||
| } else { | } else { | ||||
| @@ -517,6 +520,7 @@ function Experiment() { | |||||
| : ''} | : ''} | ||||
| </div> | </div> | ||||
| ), | ), | ||||
| onExpand: (e, a) => { | onExpand: (e, a) => { | ||||
| expandChange(e, a); | expandChange(e, a); | ||||
| }, | }, | ||||
| @@ -219,6 +219,11 @@ | |||||
| border-color: #eaeaea; | border-color: #eaeaea; | ||||
| border-radius: 4px; | border-radius: 4px; | ||||
| cursor: pointer; | cursor: pointer; | ||||
| .dropdown{ | |||||
| position: absolute; | |||||
| right: 20px; | |||||
| top: 15px; | |||||
| } | |||||
| .itemText { | .itemText { | ||||
| position: absolute; | position: absolute; | ||||
| top: 20px; | top: 20px; | ||||
| @@ -222,8 +222,8 @@ const Dataset = () => { | |||||
| <span style={{ color: '#1d1d20', fontSize: '20px' }}>{datasetDetailObj.name}</span> | <span style={{ color: '#1d1d20', fontSize: '20px' }}>{datasetDetailObj.name}</span> | ||||
| <div className={Styles.smallTagBox}> | <div className={Styles.smallTagBox}> | ||||
| <div className={Styles.tagItem}>模型 id:{datasetDetailObj.id}</div> | <div className={Styles.tagItem}>模型 id:{datasetDetailObj.id}</div> | ||||
| <div className={Styles.tagItem}>{datasetDetailObj.data_tag || '...'}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.data_type}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.model_type_name || '...'}</div> | |||||
| <div className={Styles.tagItem}>{datasetDetailObj.model_tag_name || '...'}</div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div className={Styles.datasetIntroCneterBox}> | <div className={Styles.datasetIntroCneterBox}> | ||||
| @@ -1,10 +1,12 @@ | |||||
| import { getAccessToken } from '@/access'; | import { getAccessToken } from '@/access'; | ||||
| import clock from '@/assets/img/clock.png'; | import clock from '@/assets/img/clock.png'; | ||||
| import creatByImg from '@/assets/img/creatBy.png'; | import creatByImg from '@/assets/img/creatBy.png'; | ||||
| import deleteIcon from '@/assets/img/delete-icon.png'; | |||||
| import KFIcon from '@/components/KFIcon'; | import KFIcon from '@/components/KFIcon'; | ||||
| import { addModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; | |||||
| import { addModel, deleteModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; | |||||
| import { modalConfirm } from '@/utils/ui'; | |||||
| import { UploadOutlined } from '@ant-design/icons'; | import { UploadOutlined } from '@ant-design/icons'; | ||||
| import { Button, Form, Input, Modal, Pagination, Select, Upload } from 'antd'; | |||||
| import { Button, Form, Input, Modal, Pagination, Select, Upload, message } from 'antd'; | |||||
| import moment from 'moment'; | import moment from 'moment'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| @@ -54,8 +56,8 @@ const PublicData = () => { | |||||
| }); | }); | ||||
| const [activeType, setActiveType] = useState(null); | const [activeType, setActiveType] = useState(null); | ||||
| const [activeTag, setActiveTag] = useState(null); | const [activeTag, setActiveTag] = useState(null); | ||||
| const [datasetTypeList, setDatasetTypeList] = useState([]); | |||||
| const [datasetDirectionList, setDatasetDirectionList] = useState([]); | |||||
| const [modelTypeList, setmodelTypeList] = useState([]); | |||||
| const [modelDirectionList, setmodelDirectionList] = useState([]); | |||||
| const [isModalOpen, setIsModalOpen] = useState(false); | const [isModalOpen, setIsModalOpen] = useState(false); | ||||
| const [datasetList, setDatasetList] = useState([]); | const [datasetList, setDatasetList] = useState([]); | ||||
| const [total, setTotal] = useState(0); | const [total, setTotal] = useState(0); | ||||
| @@ -82,11 +84,11 @@ const PublicData = () => { | |||||
| getAssetIcon(params).then((ret) => { | getAssetIcon(params).then((ret) => { | ||||
| console.log(ret); | console.log(ret); | ||||
| if (ret.code == 200 && ret.data.content && ret.data.content.length > 0) { | if (ret.code == 200 && ret.data.content && ret.data.content.length > 0) { | ||||
| setDatasetTypeList(ret.data.content.filter((item) => item.category_id == 3)); | |||||
| setDatasetDirectionList(ret.data.content.filter((item) => item.category_id == 4)); | |||||
| setmodelTypeList(ret.data.content.filter((item) => item.category_id == 3)); | |||||
| setmodelDirectionList(ret.data.content.filter((item) => item.category_id == 4)); | |||||
| } else { | } else { | ||||
| setDatasetTypeList([]); | |||||
| setDatasetDirectionList([]); | |||||
| setmodelTypeList([]); | |||||
| setmodelDirectionList([]); | |||||
| } | } | ||||
| }); | }); | ||||
| }; | }; | ||||
| @@ -181,8 +183,8 @@ const PublicData = () => { | |||||
| /> | /> | ||||
| <div className={Styles.itemTitle}>模型框架</div> | <div className={Styles.itemTitle}>模型框架</div> | ||||
| <div className={Styles.itemBox}> | <div className={Styles.itemBox}> | ||||
| {datasetTypeList && datasetTypeList.length > 0 | |||||
| ? datasetTypeList.map((item) => { | |||||
| {modelTypeList && modelTypeList.length > 0 | |||||
| ? modelTypeList.map((item) => { | |||||
| return ( | return ( | ||||
| <div> | <div> | ||||
| <div | <div | ||||
| @@ -222,8 +224,8 @@ const PublicData = () => { | |||||
| </div> | </div> | ||||
| <div className={Styles.itemTitle}>模型能力</div> | <div className={Styles.itemTitle}>模型能力</div> | ||||
| <div className={Styles.itemBox}> | <div className={Styles.itemBox}> | ||||
| {datasetDirectionList && datasetDirectionList.length > 0 | |||||
| ? datasetDirectionList.map((item) => { | |||||
| {modelDirectionList && modelDirectionList.length > 0 | |||||
| ? modelDirectionList.map((item) => { | |||||
| return ( | return ( | ||||
| <div> | <div> | ||||
| <div | <div | ||||
| @@ -282,9 +284,80 @@ const PublicData = () => { | |||||
| {datasetList && datasetList.length > 0 | {datasetList && datasetList.length > 0 | ||||
| ? datasetList.map((item) => { | ? datasetList.map((item) => { | ||||
| return ( | return ( | ||||
| <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | |||||
| <div | |||||
| className={Styles.dataItem} | |||||
| onClick={(e) => { | |||||
| routeToIntro(e, item); | |||||
| }} | |||||
| > | |||||
| <span className={Styles.itemText}>{item.name}</span> | <span className={Styles.itemText}>{item.name}</span> | ||||
| <div className={Styles.itemDescripition}>{item.description}</div> | |||||
| <img | |||||
| onClick={(e) => { | |||||
| e.stopPropagation(); | |||||
| modalConfirm({ | |||||
| title: '确定删除该条模型实例吗?', | |||||
| onOk: () => { | |||||
| deleteModel(item.id).then((ret) => { | |||||
| if (ret.code === 200) { | |||||
| message.success('删除成功'); | |||||
| getModelLists(queryFlow); | |||||
| } else { | |||||
| message.error(ret.msg); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }); | |||||
| }} | |||||
| className={Styles.dropdown} | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={deleteIcon} | |||||
| alt="" | |||||
| /> | |||||
| {/* <Dropdown | |||||
| className={Styles.dropdown} | |||||
| key={item.name} | |||||
| menu={{ | |||||
| items: [ | |||||
| { | |||||
| label: '详情', | |||||
| key: 'detail', | |||||
| }, | |||||
| { | |||||
| label: '删除', | |||||
| key: 'delete', | |||||
| }, | |||||
| ], | |||||
| onClick: (e) => { | |||||
| console.log(e); | |||||
| if (e.key === 'detail') { | |||||
| routeToIntro(e, item); | |||||
| } else if (e.key === 'delete') { | |||||
| modalConfirm({ | |||||
| title: '确定删除该条模型实例吗?', | |||||
| onOk: () => { | |||||
| deleteModel(item.id).then((ret) => { | |||||
| if (ret.code === 200) { | |||||
| message.success('删除成功'); | |||||
| getModelLists(queryFlow); | |||||
| } else { | |||||
| message.error(ret.msg); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }); | |||||
| } | |||||
| }, | |||||
| }} | |||||
| > | |||||
| <div> | |||||
| <img | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={moreBack} | |||||
| alt="" | |||||
| /> | |||||
| </div> | |||||
| </Dropdown> */} | |||||
| ,<div className={Styles.itemDescripition}>{item.description}</div> | |||||
| <div className={Styles.itemTime}> | <div className={Styles.itemTime}> | ||||
| <img | <img | ||||
| style={{ width: '17px', marginRight: '6px' }} | style={{ width: '17px', marginRight: '6px' }} | ||||
| @@ -401,7 +474,13 @@ const PublicData = () => { | |||||
| ] | ] | ||||
| } | } | ||||
| > | > | ||||
| <Select allowClear placeholder="请选择模型类型" options={[]} /> | |||||
| <Select | |||||
| allowClear | |||||
| placeholder="请选择模型类型" | |||||
| options={modelTypeList.map((item) => { | |||||
| return { value: item.id, label: item.name }; | |||||
| })} | |||||
| /> | |||||
| </Form.Item> | </Form.Item> | ||||
| <Form.Item | <Form.Item | ||||
| label="模型能力" | label="模型能力" | ||||
| @@ -415,7 +494,13 @@ const PublicData = () => { | |||||
| ] | ] | ||||
| } | } | ||||
| > | > | ||||
| <Select allowClear placeholder="请选择模型标签" options={[]} /> | |||||
| <Select | |||||
| allowClear | |||||
| placeholder="请选择模型标签" | |||||
| options={modelDirectionList.map((item) => { | |||||
| return { value: item.id, label: item.name }; | |||||
| })} | |||||
| /> | |||||
| </Form.Item> | </Form.Item> | ||||
| <Form.Item label="模型文件" name="models_version_vos"> | <Form.Item label="模型文件" name="models_version_vos"> | ||||
| <Upload {...props} data={{ uuid: uuid }} accept=".zip,.tgz"> | <Upload {...props} data={{ uuid: uuid }} accept=".zip,.tgz"> | ||||
| @@ -1,7 +1,9 @@ | |||||
| import clock from '@/assets/img/clock.png'; | import clock from '@/assets/img/clock.png'; | ||||
| import creatByImg from '@/assets/img/creatBy.png'; | import creatByImg from '@/assets/img/creatBy.png'; | ||||
| import { getAssetIcon, getModelList } from '@/services/dataset/index.js'; | |||||
| import { Form, Input, Modal, Pagination, Radio } from 'antd'; | |||||
| import deleteIcon from '@/assets/img/delete-icon.png'; | |||||
| import { deleteModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; | |||||
| import { modalConfirm } from '@/utils/ui'; | |||||
| import { Form, Input, Modal, Pagination, Radio, message } from 'antd'; | |||||
| import moment from 'moment'; | import moment from 'moment'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| @@ -224,8 +226,35 @@ const PublicData = () => { | |||||
| {datasetList && datasetList.length > 0 | {datasetList && datasetList.length > 0 | ||||
| ? datasetList.map((item) => { | ? datasetList.map((item) => { | ||||
| return ( | return ( | ||||
| <div className={Styles.dataItem} onClick={(e) => routeToIntro(e, item)}> | |||||
| <div | |||||
| className={Styles.dataItem} | |||||
| onClick={(e) => { | |||||
| routeToIntro(e, item); | |||||
| }} | |||||
| > | |||||
| <span className={Styles.itemText}>{item.name}</span> | <span className={Styles.itemText}>{item.name}</span> | ||||
| <img | |||||
| onClick={(e) => { | |||||
| e.stopPropagation(); | |||||
| modalConfirm({ | |||||
| title: '确定删除该条模型实例吗?', | |||||
| onOk: () => { | |||||
| deleteModel(item.id).then((ret) => { | |||||
| if (ret.code === 200) { | |||||
| message.success('删除成功'); | |||||
| getModelLists(queryFlow); | |||||
| } else { | |||||
| message.error(ret.msg); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }); | |||||
| }} | |||||
| className={Styles.dropdown} | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={deleteIcon} | |||||
| alt="" | |||||
| /> | |||||
| <div className={Styles.itemDescripition}>{item.description}</div> | <div className={Styles.itemDescripition}>{item.description}</div> | ||||
| <div className={Styles.itemTime}> | <div className={Styles.itemTime}> | ||||
| <img | <img | ||||
| @@ -118,3 +118,15 @@ export function exportDataset(id) { | |||||
| method: 'GET', | method: 'GET', | ||||
| }); | }); | ||||
| } | } | ||||
| // 删除模型集 | |||||
| export function deleteModel(id) { | |||||
| return request(`/api/mmp/models/${id}`, { | |||||
| method: 'DELETE', | |||||
| }); | |||||
| } | |||||
| // 删除数据集 | |||||
| export function deleteDataset(id) { | |||||
| return request(`/api/mmp/dataset/${id}`, { | |||||
| method: 'DELETE', | |||||
| }); | |||||
| } | |||||