diff --git a/react-ui/public/assets/images/modal-back.png b/react-ui/public/assets/images/modal-back.png new file mode 100644 index 00000000..883b277f Binary files /dev/null and b/react-ui/public/assets/images/modal-back.png differ diff --git a/react-ui/src/global.less b/react-ui/src/global.less index df9fc389..29b900b5 100644 --- a/react-ui/src/global.less +++ b/react-ui/src/global.less @@ -31,6 +31,12 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +a{ + color:#1664ff; +} +.ant-btn-link{ + color: #1664ff; +} .ant-pro-layout .ant-pro-layout-content { padding: 10px; } @@ -46,6 +52,10 @@ body { .ant-menu-light .ant-menu-item-selected { background: rgba(197, 232, 255, 0.8) !important; } +.ant-pro-layout .ant-pro-sider .ant-layout-sider-children{ + background:#f2f5f7; + +} .ant-pro-base-menu-inline { // height: 87vh; background: #f2f5f7; @@ -54,7 +64,14 @@ body { .ant-pro-layout .ant-pro-layout-content { background-color: transparent; } - +.ant-table-wrapper .ant-table-pagination.ant-pagination{ + background-color: #fff; + margin: 0; + padding: 21px 16px; +} +.ant-table-wrapper .ant-table{ + height: 75vh; +} .ant-pro-global-header-logo img { height: 21px; } @@ -64,15 +81,38 @@ body { .ant-pro-layout .ant-pro-layout-container { height: 98vh; } +.ant-modal .ant-modal-close-x{ + border: 2px solid #272536; + border-radius: 50%; + width: 26px; + height: 26px; + color: #272536; +} +.ant-modal-content{ + margin-left: -130px; + margin-top: 50px; +} +.ant-modal .ant-modal-close:hover { + background-color: transparent; +} +.ant-modal .ant-modal-footer >.ant-btn+.ant-btn{ + margin-left: 20px; +} .ant-pagination .ant-pagination-item-active a { color: #fff; background: #1664ff; border-color: #1664ff; + border-radius:6px; } -.ant-pagination .ant-pagination-item-active a:hover { +.ant-pagination .ant-pagination-item-active:hover { color: #fff; background: rgba(22, 100, 255, 0.8); border-color: rgba(22, 100, 255, 0.8); + border-radius:6px; +} +.ant-pagination .ant-pagination-item { + border: 1px solid #e6e6e6; + border-radius:6px; } // ::-webkit-scrollbar-button { // background: #97a1bd; diff --git a/react-ui/src/pages/Dataset/datasetIntro.jsx b/react-ui/src/pages/Dataset/datasetIntro.jsx index 5fb5e093..bdc9171b 100644 --- a/react-ui/src/pages/Dataset/datasetIntro.jsx +++ b/react-ui/src/pages/Dataset/datasetIntro.jsx @@ -39,9 +39,9 @@ const Dataset = () => { return { ...form.getFieldsValue(), dataset_id: locationParams.id, - file_name: item.response.data[0].fileName, - file_size: item.response.data[0].fileSize, - url: item.response.data[0].url, + file_name: item.response.code === 200 ? item.response.data[0].fileName : null, + file_size: item.response.code === 200 ? item.response.data[0].fileSize : null, + url: item.response.code === 200 ? item.response.data[0].url : null, }; }), ); @@ -59,18 +59,16 @@ const Dataset = () => { const locationParams = useParams(); //新版本获取路由参数接口 const [wordList, setWordList] = useState([]); const [activeTabKey, setActiveTabKey] = useState('1'); - const [uuid, setUuid] = useState(Date.now()); const getDatasetByDetail = () => { getDatasetById(locationParams.id).then((ret) => { console.log(ret); setDatasetDetailObj(ret.data); }); }; - // 获取数据集版本 const getDatasetVersionList = () => { getDatasetVersionsById(locationParams.id).then((ret) => { console.log(ret); - if (ret && ret.data && ret.data.length > 0) { + if (ret.data && ret.data.length > 0) { setVersionList( ret.data.map((item) => { return { @@ -79,8 +77,6 @@ const Dataset = () => { }; }), ); - setVersion(ret.data[0]); - getDatasetVersions({ version: ret.data[0], dataset_id: locationParams.id }); } }); }; @@ -94,7 +90,6 @@ const Dataset = () => { form.setFieldsValue({ name: datasetDetailObj.name }); setDialogTitle('创建新版本'); - setUuid(Date.now()); setIsModalOpen(true); }; const handleCancel = () => { @@ -114,7 +109,9 @@ const Dataset = () => { onOk: () => { deleteDatasetVersion({ dataset_id: locationParams.id, version }).then((ret) => { + setVersion(null); getDatasetVersionList(); + getDatasetVersions({ version, dataset_id: locationParams.id }); message.success('删除成功'); }); }, @@ -127,7 +124,6 @@ const Dataset = () => { message.success('创建成功'); }); }; - // 获取版本下的文件列表 const getDatasetVersions = (params) => { getDatasetVersionIdList(params).then((res) => { setWordList(res?.data?.content ?? []); @@ -372,7 +368,7 @@ const Dataset = () => { }, ]} > - +