| @@ -19,7 +19,7 @@ const Settings: ProLayoutProps & { | |||||
| title: '智能软件开发平台', | title: '智能软件开发平台', | ||||
| pwa: true, | pwa: true, | ||||
| logo: '/assets/images/left-top-logo.png', | logo: '/assets/images/left-top-logo.png', | ||||
| iconfontUrl: '//at.alicdn.com/t/c/font_4511326_ndnvm4elll.js', | |||||
| iconfontUrl: '//at.alicdn.com/t/c/font_4511326_2511riex401.js', | |||||
| token: { | token: { | ||||
| // 参见ts声明,demo 见文档,通过token 修改样式 | // 参见ts声明,demo 见文档,通过token 修改样式 | ||||
| //https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F | //https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F | ||||
| @@ -151,14 +151,18 @@ body { | |||||
| height: 46px; | height: 46px; | ||||
| padding: 1px 11px; | padding: 1px 11px; | ||||
| } | } | ||||
| .ant-input-textarea-affix-wrapper.ant-input-affix-wrapper{ | |||||
| padding: 0; | |||||
| } | |||||
| .ant-modal .ant-select-single { | .ant-modal .ant-select-single { | ||||
| height: 46px; | height: 46px; | ||||
| } | } | ||||
| .ant-modal .ant-select-single .ant-select-selector .ant-select-selection-placeholder { | .ant-modal .ant-select-single .ant-select-selector .ant-select-selection-placeholder { | ||||
| line-height: 46px; | line-height: 46px; | ||||
| } | } | ||||
| .ant-menu-light.ant-menu-inline .ant-menu-item{ | |||||
| color:#575757; | |||||
| } | |||||
| .ant-modal .ant-modal-close-x { | .ant-modal .ant-modal-close-x { | ||||
| width: 26px; | width: 26px; | ||||
| height: 26px; | height: 26px; | ||||
| @@ -389,6 +389,7 @@ const Dataset = () => { | |||||
| > | > | ||||
| 上传文件 | 上传文件 | ||||
| </Button> | </Button> | ||||
| <div className={Styles.tipContent}>只允许上传.zip,.tgz格式文件</div> | |||||
| </Upload> | </Upload> | ||||
| </Form.Item> | </Form.Item> | ||||
| </Form> | </Form> | ||||
| @@ -60,10 +60,26 @@ const Dataset = () => { | |||||
| <div className={Styles.datasetTopBox}></div> | <div className={Styles.datasetTopBox}></div> | ||||
| <div className={Styles.datasetAllBox}> | <div className={Styles.datasetAllBox}> | ||||
| <Tabs defaultActiveKey="1"> | <Tabs defaultActiveKey="1"> | ||||
| <TabPane tab="数据广场" key="1"> | |||||
| <TabPane | |||||
| tab="数据广场" | |||||
| key="1" | |||||
| icon={ | |||||
| <svg className="icon" style={{ width: '14px', height: '14px' }} aria-hidden="true"> | |||||
| <use xlinkHref="#icon-shujujiguangchang"></use> | |||||
| </svg> | |||||
| } | |||||
| > | |||||
| <PublicData /> | <PublicData /> | ||||
| </TabPane> | </TabPane> | ||||
| <TabPane tab="个人数据" key="2"> | |||||
| <TabPane | |||||
| tab="个人数据" | |||||
| key="2" | |||||
| icon={ | |||||
| <svg className="icon" style={{ width: '14px', height: '14px' }} aria-hidden="true"> | |||||
| <use xlinkHref="#icon-gerenshujuji"></use> | |||||
| </svg> | |||||
| } | |||||
| > | |||||
| <PersonalData /> | <PersonalData /> | ||||
| </TabPane> | </TabPane> | ||||
| </Tabs> | </Tabs> | ||||
| @@ -291,6 +291,10 @@ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| .tipContent{ | |||||
| color: #c73131; | |||||
| margin-top: 5px; | |||||
| } | |||||
| .modal { | .modal { | ||||
| :global { | :global { | ||||
| .ant-modal-content { | .ant-modal-content { | ||||
| @@ -468,6 +468,7 @@ const PublicData = (React.FC = () => { | |||||
| > | > | ||||
| 上传文件 | 上传文件 | ||||
| </Button> | </Button> | ||||
| <div className={Styles.tipContent}>只允许上传.zip,.tgz格式文件</div> | |||||
| </Upload> | </Upload> | ||||
| </Form.Item> | </Form.Item> | ||||
| </Form> | </Form> | ||||
| @@ -59,10 +59,26 @@ const Dataset = () => { | |||||
| <div className={Styles.datasetTopBox}></div> | <div className={Styles.datasetTopBox}></div> | ||||
| <div className={Styles.datasetAllBox}> | <div className={Styles.datasetAllBox}> | ||||
| <Tabs defaultActiveKey="1"> | <Tabs defaultActiveKey="1"> | ||||
| <TabPane tab="模型广场" key="1"> | |||||
| <TabPane | |||||
| tab="模型广场" | |||||
| key="1" | |||||
| icon={ | |||||
| <svg className="icon" style={{ width: '14px', height: '14px' }} aria-hidden="true"> | |||||
| <use xlinkHref="#icon-shujujiguangchang"></use> | |||||
| </svg> | |||||
| } | |||||
| > | |||||
| <PublicData /> | <PublicData /> | ||||
| </TabPane> | </TabPane> | ||||
| <TabPane tab="个人模型" key="2"> | |||||
| <TabPane | |||||
| tab="个人模型" | |||||
| key="2" | |||||
| icon={ | |||||
| <svg className="icon" style={{ width: '14px', height: '14px' }} aria-hidden="true"> | |||||
| <use xlinkHref="#icon-gerenshujuji"></use> | |||||
| </svg> | |||||
| } | |||||
| > | |||||
| <PersonalData /> | <PersonalData /> | ||||
| </TabPane> | </TabPane> | ||||
| </Tabs> | </Tabs> | ||||
| @@ -281,6 +281,10 @@ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| .tipContent{ | |||||
| color: #c73131; | |||||
| margin-top: 5px; | |||||
| } | |||||
| .modal { | .modal { | ||||
| :global { | :global { | ||||
| .ant-modal-content { | .ant-modal-content { | ||||
| @@ -375,7 +375,7 @@ const Dataset = () => { | |||||
| }, | }, | ||||
| ]} | ]} | ||||
| > | > | ||||
| <Upload {...props} data={{ uuid: uuid }} accept=".zip,.tgz"> | |||||
| <Upload {...props} data={{ uuid: uuid }}> | |||||
| <Button | <Button | ||||
| style={{ | style={{ | ||||
| fontSize: '14px', | fontSize: '14px', | ||||
| @@ -503,7 +503,7 @@ const PublicData = () => { | |||||
| /> | /> | ||||
| </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 }}> | |||||
| <Button | <Button | ||||
| style={{ | style={{ | ||||
| fontSize: '14px', | fontSize: '14px', | ||||
| @@ -60,6 +60,8 @@ function patchRouteItems(route: any, menu: any, parentPath: string) { | |||||
| element: React.createElement(lazy(() => import('@/pages/' + path))), | element: React.createElement(lazy(() => import('@/pages/' + path))), | ||||
| path: parentPath + menuItem.path, | path: parentPath + menuItem.path, | ||||
| }; | }; | ||||
| console.log(newRoute); | |||||
| route.children.push(newRoute); | route.children.push(newRoute); | ||||
| route.routes.push(newRoute); | route.routes.push(newRoute); | ||||
| } | } | ||||
| @@ -72,7 +74,10 @@ export function patchRouteWithRemoteMenus(routes: any) { | |||||
| } | } | ||||
| let proLayout = null; | let proLayout = null; | ||||
| for (const routeItem of routes) { | for (const routeItem of routes) { | ||||
| if (routeItem.id === 'ant-design-pro-layout') { | if (routeItem.id === 'ant-design-pro-layout') { | ||||
| proLayout = routeItem; | proLayout = routeItem; | ||||
| break; | break; | ||||
| } | } | ||||
| @@ -96,6 +101,7 @@ export async function refreshToken() { | |||||
| } | } | ||||
| export function convertCompatRouters(childrens: API.RoutersMenuItem[]): any[] { | export function convertCompatRouters(childrens: API.RoutersMenuItem[]): any[] { | ||||
| return childrens.map((item: API.RoutersMenuItem) => { | return childrens.map((item: API.RoutersMenuItem) => { | ||||
| return { | return { | ||||
| path: item.path, | path: item.path, | ||||
| @@ -129,6 +135,7 @@ export function getMatchMenuItem( | |||||
| ): MenuDataItem[] { | ): MenuDataItem[] { | ||||
| if (!menuData) return []; | if (!menuData) return []; | ||||
| let items: MenuDataItem[] = []; | let items: MenuDataItem[] = []; | ||||
| menuData.forEach((item) => { | menuData.forEach((item) => { | ||||
| if (item.path) { | if (item.path) { | ||||
| if (item.path === path) { | if (item.path === path) { | ||||
| @@ -142,9 +149,12 @@ export function getMatchMenuItem( | |||||
| const subpath = path.substr(item.path.length + 1); | const subpath = path.substr(item.path.length + 1); | ||||
| const subItem: MenuDataItem[] = getMatchMenuItem(subpath, item.routes); | const subItem: MenuDataItem[] = getMatchMenuItem(subpath, item.routes); | ||||
| items = items.concat(subItem); | items = items.concat(subItem); | ||||
| } else { | } else { | ||||
| const paths = path.split('/'); | const paths = path.split('/'); | ||||
| if (paths.length >= 2 && paths[0] === item.path && paths[1] === 'index') { | if (paths.length >= 2 && paths[0] === item.path && paths[1] === 'index') { | ||||
| console.log(item); | |||||
| items.push(item); | items.push(item); | ||||
| } | } | ||||
| } | } | ||||