diff --git a/config/defaultForm.ts b/config/defaultForm.ts index 19b3e8d..7d8002a 100644 --- a/config/defaultForm.ts +++ b/config/defaultForm.ts @@ -2,9 +2,9 @@ * @Author: zhoux zhouxia@supervision.ltd * @Date: 2023-11-13 14:19:57 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-09 11:33:23 + * @LastEditTime: 2024-05-13 10:20:45 * @FilePath: \general-ai-platform-web\config\defaultForm.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE2 + * @Description: 表单类默认字段统一配置 */ import { CloseCircleOutlined, CopyOutlined, DeleteOutlined } from '@ant-design/icons'; diff --git a/config/defaultIcon.ts b/config/defaultIcon.ts index 6100ba5..e16290c 100644 --- a/config/defaultIcon.ts +++ b/config/defaultIcon.ts @@ -4,7 +4,7 @@ * @LastEditors: zhoux zhouxia@supervision.ltd * @LastEditTime: 2023-12-22 16:17:35 * @FilePath: \general-ai-platform-web\config\defaultIcon.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A + * @Description: 图标类默认字段统一配置 */ import { proFormItemStyleProps } from './defaultForm'; diff --git a/config/defaultSettings.ts b/config/defaultSettings.ts index f5f0513..cbd05c9 100644 --- a/config/defaultSettings.ts +++ b/config/defaultSettings.ts @@ -2,9 +2,9 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-03-27 14:56:27 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-04-24 16:30:59 + * @LastEditTime: 2024-05-13 10:23:57 * @FilePath: \general-ai-manage\config\defaultSettings.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 通用类默认字段统一配置 */ import { ProLayoutProps } from '@ant-design/pro-components'; diff --git a/config/defaultStyle.ts b/config/defaultStyle.ts index 211810b..3502e2e 100644 --- a/config/defaultStyle.ts +++ b/config/defaultStyle.ts @@ -1,10 +1,10 @@ /* * @Author: zhoux zhouxia@supervision.ltd * @Date: 2023-12-26 15:51:09 - * @LastEditors: zhoux zhouxia@supervision.ltd - * @LastEditTime: 2023-12-26 15:51:18 + * @LastEditors: donghao donghao@supervision.ltd + * @LastEditTime: 2024-05-13 10:24:15 * @FilePath: \general-ai-platform-web\config\defaultStyle.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 全局样式类默认字段统一配置 */ export const flex: React.CSSProperties = { display: 'flex', diff --git a/config/defaultTable.ts b/config/defaultTable.ts index 14e94b7..f564b73 100644 --- a/config/defaultTable.ts +++ b/config/defaultTable.ts @@ -1,10 +1,10 @@ /* * @Author: zhoux zhouxia@supervision.ltd * @Date: 2023-11-13 11:32:26 - * @LastEditors: zhoux zhouxia@supervision.ltd - * @LastEditTime: 2023-11-21 13:36:39 + * @LastEditors: donghao donghao@supervision.ltd + * @LastEditTime: 2024-05-13 10:24:31 * @FilePath: \general-ai-platform-web\config\defaultTable.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 表格类默认字段统一配置 */ import { PaginationProps } from 'antd'; // 通用列表配置 diff --git a/config/proxy.ts b/config/proxy.ts index 95b1eb6..f5ca1a0 100644 --- a/config/proxy.ts +++ b/config/proxy.ts @@ -4,7 +4,7 @@ * @LastEditors: donghao donghao@supervision.ltd * @LastEditTime: 2024-04-19 16:51:36 * @FilePath: \general-ai-manage\config\proxy.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 代理配置 */ /** * @name 代理的配置 diff --git a/config/routes.ts b/config/routes.ts index 4b4eb63..3a0e955 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -2,9 +2,9 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-03-27 14:56:27 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 13:41:47 + * @LastEditTime: 2024-05-13 15:32:09 * @FilePath: \general-ai-manage\config\routes.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 页面路由池 */ /** @@ -46,6 +46,7 @@ const modelRouteIndex = { path: '/home/model-index', component: './Model/ModelIndex', access: 'canReadMenu', + menuIcon: 'icon-moxingliebiao-unselected', key: 'model001', }; const subModelRoute = [ @@ -55,6 +56,7 @@ const subModelRoute = [ component: './Model/ModelRuntimeLib', access: 'canReadMenu', key: 'model002', + menuIcon: 'icon-moxingyunhangku-unselected', level: 2, }, { diff --git a/src/base.css b/src/base.css index 300083e..6c7c4bd 100644 --- a/src/base.css +++ b/src/base.css @@ -136,6 +136,29 @@ text-align: left; text-transform: none; } +/* 重置ant组件 */ +/* Button */ +.gn_search_from .ant-btn { + border: none; + border-radius: 2px; +} +.gn_search_from .ant-btn-default { + color: #333333; + background: #f5f5f5; + border: none; +} +.ant-form-item .ant-form-item-label > label { + color: #333333; +} +.ant-form-item .ant-input-affix-wrapper { + color: #333333; +} +.ant-form-item .ant-input::placeholder { + color: #cccccc; +} +.ant-form-item .anticon { + color: #cccccc !important; +} /* 自定义组件 */ .gn_list_card_title { display: flex; diff --git a/src/base.less b/src/base.less index 210fba1..60535d6 100644 --- a/src/base.less +++ b/src/base.less @@ -151,6 +151,37 @@ text-align: left; text-transform: none; } +/* 重置ant组件 */ +/* Button */ +// .ant-btn { +// } +.gn_search_from { + .ant-btn { + border: none; + border-radius: 2px; + } + .ant-btn-default { + color: @text_color_1; + background: #f5f5f5; + border: none; + } +} + +// 通用表单 +.ant-form-item { + .ant-form-item-label > label { + color: @text_color_1; + } + .ant-input-affix-wrapper { + color: @text_color_1; + } + .ant-input::placeholder { + color: @gray_color_1; + } + .anticon { + color: @gray_color_1 !important; + } +} /* 自定义组件 */ // 列表下卡片标题 @@ -214,6 +245,7 @@ } } } + // 卡片下标签 .gn_card_tag { padding: 2px 4px; diff --git a/src/global.css b/src/global.css index a2b1dcb..cb0dc52 100644 --- a/src/global.css +++ b/src/global.css @@ -57,10 +57,6 @@ ol { margin-bottom: 0 !important; padding: 0 !important; } -.gn .ant-pro-checkcard-content { - padding-inline: 0; - padding-block: 0; -} /* 单行显示的搜索表单 */ .single-search-form-item .ant-form-item { margin-bottom: 0; @@ -212,6 +208,14 @@ ol { .gn_pro_table .ant-pro-table-list-toolbar-container { padding: 0; } +.gn_pro_list .ant-pro-checkcard { + border: none !important; + background: transparent; +} +.gn_pro_list .ant-pro-checkcard-content { + padding-inline: 0; + padding-block: 0; +} /* 主题样式 */ .ant-btn-primary, .ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover { diff --git a/src/global.less b/src/global.less index 6bd0653..80ad8e1 100644 --- a/src/global.less +++ b/src/global.less @@ -70,21 +70,14 @@ ol { padding: 0 !important; } -.gn { - .ant-pro-checkcard-content { - padding-inline: 0; - padding-block: 0; - } -} - /* 单行显示的搜索表单 */ .single-search-form-item { .ant-form-item { margin-bottom: 0; } } -/* Card */ +/* Card */ .gn_card { & > .ant-pro-card-header { height: 54px; @@ -104,7 +97,7 @@ ol { border-radius: 8px; } /* Form */ -// 通用表单 + .gn_form { .ant-form-item { margin-bottom: 16px; @@ -114,6 +107,7 @@ ol { gap: 0px 12px !important; } } + .gn_modal_form { margin-top: 16px; } @@ -264,6 +258,18 @@ ol { } } +.gn_pro_list { + .ant-pro-checkcard { + background: transparent; + border: none !important; + } + + .ant-pro-checkcard-content { + padding-inline: 0; + padding-block: 0; + } +} + /* 主题样式 */ .ant-btn-primary, .ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover { diff --git a/src/iconfont.css b/src/iconfont.css index a71cb6b..1943a84 100644 --- a/src/iconfont.css +++ b/src/iconfont.css @@ -1,7 +1,7 @@ @font-face { font-family: "iconfont"; /* Project id 4530966 */ - src: url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff2?t=1715311346156') format('woff2'), url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff?t=1715311346156') format('woff'), url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.ttf?t=1715311346156') format('truetype'); + src: url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff2?t=1715586941725') format('woff2'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff?t=1715586941725') format('woff'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.ttf?t=1715586941725') format('truetype'); } .iconfont { font-family: "iconfont" !important; diff --git a/src/iconfont.less b/src/iconfont.less index 9a8a4c3..319fd17 100644 --- a/src/iconfont.less +++ b/src/iconfont.less @@ -1,8 +1,8 @@ @font-face { font-family: 'iconfont'; /* Project id 4530966 */ - src: url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff2?t=1715311346156') format('woff2'), - url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff?t=1715311346156') format('woff'), - url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.ttf?t=1715311346156') format('truetype'); + src: url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff2?t=1715586941725') format('woff2'), + url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff?t=1715586941725') format('woff'), + url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.ttf?t=1715586941725') format('truetype'); } .iconfont { diff --git a/src/layouts/HomeLayout.css b/src/layouts/HomeLayout.css index 2d7e498..565bc0a 100644 --- a/src/layouts/HomeLayout.css +++ b/src/layouts/HomeLayout.css @@ -1,6 +1,9 @@ .homeLayout_wrap { /* 导航栏 */ } +.homeLayout_wrap .home_nav_action { + color: white; +} .homeLayout_wrap .ant-layout { background: #f8fafd; } @@ -51,3 +54,21 @@ border-radius: 16px; opacity: 1 !important; } +.sub_menu_box .sub_menu_item { + height: 32px; + cursor: pointer; + line-height: 32px; + background: #ffffff; + border: 1px solid #dcdcdc; +} +.sub_menu_box .sub_menu_item:first-child { + border-radius: 4px 0px 0px 4px; +} +.sub_menu_box .sub_menu_item:nth-child(2) { + border-radius: 0px 4px 4px 0px; +} +.sub_menu_box .activeMenu { + background: rgba(21, 77, 221, 0.1); + border: 1px solid #154ddd; + color: #154DDD; +} diff --git a/src/layouts/HomeLayout.tsx b/src/layouts/HomeLayout.tsx index 80cba44..498d55d 100644 --- a/src/layouts/HomeLayout.tsx +++ b/src/layouts/HomeLayout.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-07 15:25:23 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-04-24 16:31:35 + * @LastEditTime: 2024-05-13 15:41:26 * @FilePath: \general-ai-manage\src\layouts\HomeLayout.tsx * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -12,7 +12,7 @@ import { AvatarDropdown, AvatarName } from '@/components'; import { useModel } from '@@/exports'; import { SettingDrawer } from '@ant-design/pro-components'; import { Outlet, history, useIntl, useLocation } from '@umijs/max'; -import { ConfigProvider, Layout, Radio, theme } from 'antd'; +import { ConfigProvider, Layout, theme } from 'antd'; import React, { useEffect, useState } from 'react'; // public/home/logo.svg @@ -170,33 +170,59 @@ const HomeLayout: React.FC = () => { {/* 二级菜单 */} {/* //TODO 按UI图调整二级菜单栏效果 */} {currRoute?.subMenu && !currRoute?.isHideMenu && ( - - {currRoute.subMenu.map((menuItem) => { +
+ {currRoute.subMenu.map((menuItem, index) => { return menuItem?.isHideMenu ? ( - <> + ) : ( - tabRouter(menuItem)} - className={[currRoute?.path === menuItem.path ? 'activeMenu' : '']} + className={`sub_menu_item ${ + currRoute?.path === menuItem.path ? 'activeMenu' : 'text_color_2' + }`} >
-
- {intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })} - {currRoute?.isHideMenu} + + + {intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })} +
-
+
); })} -
+ + + // + // {currRoute.subMenu.map((menuItem) => { + // return menuItem?.isHideMenu ? ( + // <> + // ) : ( + // tabRouter(menuItem)} + // className={[currRoute?.path === menuItem.path ? 'activeMenu' : '']} + // > + //
+ //
+ // + //
+ // {intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })} + // {currRoute?.isHideMenu} + //
+ //
+ // ); + // })} + //
)}
diff --git a/src/layouts/homeLayout.less b/src/layouts/homeLayout.less index 89c4492..fdb64be 100644 --- a/src/layouts/homeLayout.less +++ b/src/layouts/homeLayout.less @@ -2,6 +2,9 @@ .homeLayout_wrap { // padding-top: 24px; // background: red; + .home_nav_action { + color: white; + } .ant-layout { background: #f8fafd; } @@ -61,3 +64,29 @@ } } } + +.sub_menu_box { + // border-radius: 4px; + + .sub_menu_item { + height: 32px; + + line-height: 32px; + background: #ffffff; + border: 1px solid #dcdcdc; + cursor: pointer; + // border-radius: 4px; + &:first-child { + border-radius: 4px 0px 0px 4px; + } + &:nth-child(2) { + border-radius: 0px 4px 4px 0px; + // border: 1px solid red; + } + } + .activeMenu { + color: #154ddd; + background: rgba(21, 77, 221, 0.1); + border: 1px solid #154ddd; + } +} diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 03a253e..d43809e 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -2,9 +2,9 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-01 11:20:09 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-09 15:22:39 + * @LastEditTime: 2024-05-13 10:25:25 * @FilePath: \uighur-recognition-web2\src\locales\zh-CN.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 国际化中文入口文件 */ import * as alarms from './zh-CN/alarm'; import * as businessProject from './zh-CN/businessProject'; diff --git a/src/locales/zh-CN/businessProject.ts b/src/locales/zh-CN/businessProject.ts index bf2996e..0bb2d5b 100644 --- a/src/locales/zh-CN/businessProject.ts +++ b/src/locales/zh-CN/businessProject.ts @@ -2,12 +2,12 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-09 15:08:13 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-04-24 16:46:08 + * @LastEditTime: 2024-05-13 15:20:28 * @FilePath: \general-ai-manage\src\locales\zh-CN\businessProject.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @Description: 企业项目国际化中文 */ // 企业项目列表 -export const business_project_list: { [key: string]: string } = { +export const business_list: { [key: string]: string } = { 'business.list.table.createForm.add': '新建企业项目', 'business.list.table.form.name': '公司全称', 'business.list.table.form.rule.required.name': '请填写公司全称', @@ -27,6 +27,10 @@ export const business_project_list: { [key: string]: string } = { 'business.list.table.form.rule.required.remark': '请填写简介', 'business.list.table.form.logo': '企业logo', 'business.list.table.form.rule.required.logo': '请上传企业logo', + + 'business.list.table.action.edit': '资料编辑', + 'business.list.table.action.destroy': '删除项目', + 'business.list.table.searchForm.name': '企业名称', }; // 企业信息主页 diff --git a/src/pages/Business/BusinessState/components/detailDeviceState.tsx b/src/pages/Business/BusinessState/components/detailDeviceState.tsx index cabcab1..36113d5 100644 --- a/src/pages/Business/BusinessState/components/detailDeviceState.tsx +++ b/src/pages/Business/BusinessState/components/detailDeviceState.tsx @@ -315,6 +315,7 @@ const DetailDeviceState: React.FC = ({ info, detailOpen,

+ className="gn_pro_list" itemLayout="vertical" itemCardProps={{ ghost: true, diff --git a/src/pages/Business/BusinessState/components/detailServerState.tsx b/src/pages/Business/BusinessState/components/detailServerState.tsx index bf49555..f19cc49 100644 --- a/src/pages/Business/BusinessState/components/detailServerState.tsx +++ b/src/pages/Business/BusinessState/components/detailServerState.tsx @@ -324,6 +324,7 @@ const DetailServerState: React.FC = ({ info, detailOpen,

+ className="gn_pro_list" itemLayout="vertical" itemCardProps={{ ghost: true, diff --git a/src/pages/Business/BusinessState/components/detailServerStateLog.tsx b/src/pages/Business/BusinessState/components/detailServerStateLog.tsx index f617eef..b80ab68 100644 --- a/src/pages/Business/BusinessState/components/detailServerStateLog.tsx +++ b/src/pages/Business/BusinessState/components/detailServerStateLog.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-22 15:23:36 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 14:44:54 + * @LastEditTime: 2024-05-13 10:44:03 * @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\components\detailServerStateLog.tsx * @Description: 服务器日志 * @交互说明 @@ -61,7 +61,7 @@ const DetailServerStateLog: React.FC = () => { search={false} options={{ fullScreen: false, setting: false, density: false, reload: false }} actionRef={actionRef} - rowKey="key" + rowKey="id" pagination={{ ...proTablePaginationOptions, pageSize: currentPageSize, @@ -80,9 +80,7 @@ const DetailServerStateLog: React.FC = () => { let resp = await getServerStateLogList({ ...reqParams }); console.log(resp, 'getServerStateLogList_resp'); return { - data: resp.data?.results.map((v: Record) => { - return { ...v, key: v.id }; - }), + data: resp.data?.results, success: resp.success, total: resp.data.count, current: current, diff --git a/src/pages/Business/BusinessState/deviceSate.tsx b/src/pages/Business/BusinessState/deviceSate.tsx index 96005b2..e1fedd5 100644 --- a/src/pages/Business/BusinessState/deviceSate.tsx +++ b/src/pages/Business/BusinessState/deviceSate.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-05-10 10:47:45 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 14:57:18 + * @LastEditTime: 2024-05-13 16:13:55 * @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\deviceSate.tsx * @Description: 设备状态列表 * @交互说明 @@ -176,6 +176,7 @@ const DeviceSate: React.FC = () => {
{ }} > - className="gn" + className="gn_pro_list" ghost={true} rowKey={'id'} itemCardProps={{ diff --git a/src/pages/Business/BusinessState/index.tsx b/src/pages/Business/BusinessState/index.tsx index 86a52d0..3579b55 100644 --- a/src/pages/Business/BusinessState/index.tsx +++ b/src/pages/Business/BusinessState/index.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-05-07 13:38:03 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 13:39:39 + * @LastEditTime: 2024-05-13 11:30:19 * @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\index.tsx * @Description: 设备服务器状态 一级关键词 businessState(bs) * @交互说明 @@ -188,7 +188,7 @@ const BusinessState: React.FC = () => { >
- className="gn" + className="gn_pro_list" ghost={true} rowKey={'id'} itemCardProps={{ diff --git a/src/pages/Business/DeviceGroup/components/modelDeploy.tsx b/src/pages/Business/DeviceGroup/components/modelDeploy.tsx index 9acb5e6..54989b6 100644 --- a/src/pages/Business/DeviceGroup/components/modelDeploy.tsx +++ b/src/pages/Business/DeviceGroup/components/modelDeploy.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-30 10:02:29 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 16:41:37 + * @LastEditTime: 2024-05-13 10:44:10 * @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\modelDeploy.tsx * @Description: 业务模型部署 * @交互说明 @@ -145,7 +145,7 @@ const ModelDeploy: React.FC = () => { scroll={{ y: proTableCommonOptions.commscrollY }} options={{ fullScreen: false, setting: false, density: false, reload: false }} actionRef={actionRef} - rowKey="key" + rowKey="id" onDataSourceChange={(data) => { console.log(data, 'onDataSourceChange_data'); // let CategoryFkIdIds: any = data.map((v) => { @@ -171,9 +171,7 @@ const ModelDeploy: React.FC = () => { let resp = await getBusinessModelList({ ...reqParams }); console.log(resp, 'getModelVersionList_resp'); return { - data: resp.data?.results.map((v: Record) => { - return { ...v, key: v.id }; - }), + data: resp.data?.results, success: resp.success, total: resp.data.count, current: current, diff --git a/src/pages/Business/DeviceGroup/components/modelSetting.tsx b/src/pages/Business/DeviceGroup/components/modelSetting.tsx index 5535a24..740d3e5 100644 --- a/src/pages/Business/DeviceGroup/components/modelSetting.tsx +++ b/src/pages/Business/DeviceGroup/components/modelSetting.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-30 10:02:29 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-06 16:18:40 + * @LastEditTime: 2024-05-13 10:44:23 * @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\modelSetting.tsx * @Description: 业务模型部署 * @交互说明 @@ -139,7 +139,7 @@ const ModelSetting: React.FC = () => { // 标题栏 search={false} options={{ fullScreen: false, setting: false, density: false, reload: false }} - rowKey="key" + rowKey="id" onDataSourceChange={(data) => { console.log(data, 'onDataSourceChange_data'); }} diff --git a/src/pages/Model/ModelDetail/index.tsx b/src/pages/Model/ModelDetail/index.tsx index e993442..c252107 100644 --- a/src/pages/Model/ModelDetail/index.tsx +++ b/src/pages/Model/ModelDetail/index.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-08 10:36:06 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-07 13:28:53 + * @LastEditTime: 2024-05-13 10:44:32 * @FilePath: \general-ai-manage\src\pages\Model\ModelDetail\index.tsx * @Description: 模型详情(基础信息展示、模型版本列表) * @交互说明 @@ -253,7 +253,7 @@ const ModelDetail: React.FC = () => { scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }} options={{ fullScreen: false, setting: false, density: false, reload: false }} actionRef={actionRef} - rowKey="key" + rowKey="id" onDataSourceChange={(data) => { console.log(data, 'onDataSourceChange_data'); // let CategoryFkIdIds: any = data.map((v) => { @@ -279,9 +279,7 @@ const ModelDetail: React.FC = () => { let resp = await getModelVersionList({ ...reqParams }); console.log(resp, 'getModelVersionList_resp'); return { - data: resp.data?.results.map((v: Record) => { - return { ...v, key: v.id }; - }), + data: resp.data?.results, success: resp.success, total: resp.data.count, current: current, diff --git a/src/pages/Model/ModelIndex/index.tsx b/src/pages/Model/ModelIndex/index.tsx index dd89ade..cdb6b42 100644 --- a/src/pages/Model/ModelIndex/index.tsx +++ b/src/pages/Model/ModelIndex/index.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-07 14:02:00 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-09 10:25:13 + * @LastEditTime: 2024-05-13 16:11:46 * @FilePath: \general-ai-manage\src\pages\ModelIndex\ModelIndex.tsx * @Description: 模型列表首页 * @交互说明 @@ -192,6 +192,7 @@ const ModelIndex: React.FC = () => { headerTitle={
{ type="primary" htmlType="submit" prevIcon={} - buttonLabel="查询" + buttonLabel={ + + } > } - buttonLabel="重置" + buttonLabel={ + + } onClick={() => { form.resetFields(); // 点击重置按钮时重置表单数据 setQuerysData(() => {}); // 清空筛选项 @@ -273,7 +278,7 @@ const ModelIndex: React.FC = () => { scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }} options={{ fullScreen: false, setting: false, density: false, reload: false }} actionRef={actionRef} - rowKey="key" + rowKey="id" onDataSourceChange={(data) => { console.log(data, 'onDataSourceChange_data'); // let CategoryFkIdIds: any = data.map((v) => { @@ -305,9 +310,7 @@ const ModelIndex: React.FC = () => { } let resp = await getModelList({ ...reqParams, ...querysData }); return { - data: resp.data.results.map((v: Record) => { - return { ...v, key: v.id }; - }), + data: resp.data.results, success: resp.success, total: resp.data.count, current: current, diff --git a/src/pages/Model/ModelRuntimeLib/index.tsx b/src/pages/Model/ModelRuntimeLib/index.tsx index 57ee1e7..37c8e0d 100644 --- a/src/pages/Model/ModelRuntimeLib/index.tsx +++ b/src/pages/Model/ModelRuntimeLib/index.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-08 10:36:06 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-07 13:29:08 + * @LastEditTime: 2024-05-13 16:22:29 * @FilePath: \general-ai-manage\src\pages\Model\ModelRuntimeLib\index.tsx * @Description: 模型运行库 * @交互说明 @@ -128,7 +128,7 @@ const ModelRuntimeLib: React.FC = () => { type="link" size="small" onClick={() => { - setUpdateModalOpen(true); + // setUpdateModalOpen(true); setCurrentRow(record); }} > @@ -162,6 +162,7 @@ const ModelRuntimeLib: React.FC = () => { headerTitle={
{ type="primary" htmlType="submit" prevIcon={} - buttonLabel="查询" + buttonLabel={ + + } > } - buttonLabel="重置" + buttonLabel={ + + } onClick={() => { form.resetFields(); // 点击重置按钮时重置表单数据 setQuerysData(() => {}); // 清空筛选项 @@ -234,7 +239,7 @@ const ModelRuntimeLib: React.FC = () => { scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }} options={{ fullScreen: false, setting: false, density: false, reload: false }} actionRef={actionRef} - rowKey="key" + rowKey="id" onDataSourceChange={(data) => { console.log(data, 'onDataSourceChange_data'); // let CategoryFkIdIds: any = data.map((v) => { @@ -266,9 +271,7 @@ const ModelRuntimeLib: React.FC = () => { } let resp = await getModelRuntimeLibList({ ...reqParams, ...querysData }); return { - data: resp.data.results.map((v: Record) => { - return { ...v, key: v.id }; - }), + data: resp.data.results, success: resp.success, total: resp.data.count, current: current, diff --git a/src/pages/Project/BusinessInfo/index.tsx b/src/pages/Project/BusinessInfo/index.tsx index e5f60e3..986687f 100644 --- a/src/pages/Project/BusinessInfo/index.tsx +++ b/src/pages/Project/BusinessInfo/index.tsx @@ -148,7 +148,7 @@ const BusinessInfo: React.FC = () => { title={企业算法({total})} > - className="gn" + className="gn_pro_list" ghost={true} itemCardProps={{ ghost: true, diff --git a/src/pages/Project/BusinessProject/components/businessCard.tsx b/src/pages/Project/BusinessProject/components/businessCard.tsx index 9af922f..96dfda3 100644 --- a/src/pages/Project/BusinessProject/components/businessCard.tsx +++ b/src/pages/Project/BusinessProject/components/businessCard.tsx @@ -25,17 +25,17 @@ const BusinessCard: React.FC = ({ info, renderActions }) => { const { setStoreBusinessInfo } = useBusinessInfo(); return (
{ setStoreBusinessInfo(info); history.push(`/business/index?id=${info.id}`); console.log('跳转企业'); }} > -
-
-
{info?.industryName}
-
+
+
{info?.industryName}
+
+
@@ -48,7 +48,7 @@ const BusinessCard: React.FC = ({ info, renderActions }) => { {info.name}
-
    +
    • diff --git a/src/pages/Project/BusinessProject/index.css b/src/pages/Project/BusinessProject/index.css index 051f016..477aa8c 100644 --- a/src/pages/Project/BusinessProject/index.css +++ b/src/pages/Project/BusinessProject/index.css @@ -46,26 +46,38 @@ background: url('../../../../public/home/business_card.png') no-repeat; background-size: cover; border-radius: 4px; + overflow: visible; + position: relative; + border: 10px solid transparent; /* 新建 */ /* 卡片内容 */ } +.businessProject_page .bp_card_box .ant-dropdown .ant-dropdown-menu, +.businessProject_page .bp_card_box .ant-dropdown-menu-submenu .ant-dropdown-menu { + background: rgba(0, 0, 0, 0.75); + color: #fff; +} .businessProject_page .bp_card_box .plus_icon { width: 32px; height: 32px; margin-bottom: 16px; } .businessProject_page .bp_card_box .tag_box { + position: absolute; color: white; font-size: 12px; + top: 8px; + margin-left: -6px; + width: 100px; } .businessProject_page .bp_card_box .tag_box .bg_tag_info { - top: 0; - left: 8px; + top: 10px; + left: -19px; z-index: 999999; width: 76px; height: 29px; - text-align: center; line-height: 24px; + text-align: center; background: url('../../../../public/home/business_tag.svg') no-repeat; background-size: contain; } @@ -86,7 +98,6 @@ height: 16px; } .businessProject_page .bp_card_box .main_info .label_box { - color: #000000; font-size: 14px; line-height: 22px; } diff --git a/src/pages/Project/BusinessProject/index.less b/src/pages/Project/BusinessProject/index.less index be1b1cd..a6ee624 100644 --- a/src/pages/Project/BusinessProject/index.less +++ b/src/pages/Project/BusinessProject/index.less @@ -45,10 +45,19 @@ } /* 列表展示 & businessCard 组件样式 */ .bp_card_box { + position: relative; min-height: 194px; + overflow: visible; background: url('../../../../public/home/business_card.png') no-repeat; background-size: cover; + border: 10px solid transparent; border-radius: 4px; + .ant-dropdown .ant-dropdown-menu, + .ant-dropdown-menu-submenu .ant-dropdown-menu { + color: #fff; + background: rgba(0, 0, 0, 0.75); + } + /* 新建 */ .plus_icon { width: 32px; @@ -57,13 +66,16 @@ } /* 卡片内容 */ .tag_box { - // position: absolute; + position: absolute; + top: 8px; + width: 100px; + // background-color: red; + margin-left: -6px; color: white; font-size: 12px; - // left: -6px; .bg_tag_info { - top: 0; - left: 8px; + top: 10px; + left: -19px; z-index: 999999; width: 76px; height: 29px; @@ -91,7 +103,6 @@ height: 16px; } .label_box { - color: #000000; font-size: 14px; line-height: 22px; } diff --git a/src/pages/Project/BusinessProject/index.tsx b/src/pages/Project/BusinessProject/index.tsx index 819de32..93ebaa5 100644 --- a/src/pages/Project/BusinessProject/index.tsx +++ b/src/pages/Project/BusinessProject/index.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-07 14:02:00 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-04-24 14:47:04 + * @LastEditTime: 2024-05-13 16:13:22 * @FilePath: \general-ai-manage\src\pages\BusinessProject\BusinessProject.tsx * @Description: 企业项目首页 * @交互说明 @@ -13,7 +13,7 @@ * # 企业logo添加需要上传base64编码(小图标适用) * */ -import { CommButton } from '@/components/Button'; +import { CommButton, TextButton } from '@/components/Button'; import { isSuccessApi } from '@/utils/forApi'; import { ReactComponent as BusinessBannerLogo } from '/public/home/business_banner_logo.svg'; import { ReactComponent as BusinessHeader1 } from '/public/home/business_header_1.svg'; @@ -26,11 +26,10 @@ import { ReactComponent as SearchIcon } from '/public/home/search_icon.svg'; // device_count_icon model_count_icon import IsDelete from '@/components/TableActionCard/isDelete'; import { getBusinessProject } from '@/services/testApi/businessProject'; -import { EditOutlined, SearchOutlined } from '@ant-design/icons'; +import { SearchOutlined } from '@ant-design/icons'; import { ProCard, ProForm, ProFormText, ProList } from '@ant-design/pro-components'; -import { FormattedMessage } from '@umijs/max'; +import { FormattedMessage, useIntl } from '@umijs/max'; import React, { useEffect, useState } from 'react'; -import { proIconForTableActionStyle } from '../../../../config/defaultIcon'; import BusinessCard from './components/businessCard'; import CreateForm from './components/createForm'; import './index.less'; @@ -61,6 +60,8 @@ const headerItems: headerItemsProps[] = [ const BusinessProject: React.FC = () => { /**state */ + const intl = useIntl(); + const [businessProjectList, setBusinessProjectList] = useState[]>([]); // 列表数据 const [querysData, setQuerysData] = useState>({}); // 列表查询参数 const [createModalOpen, setCreateModalOpen] = useState(false); // 创建新增窗口是否打开 @@ -101,7 +102,6 @@ const BusinessProject: React.FC = () => { { setCurrentRow(record); }} > - - 资料编辑 + + + + } + >
), }, @@ -129,8 +132,22 @@ const BusinessProject: React.FC = () => { renderDom: (
+ } + buttonRender={ + + + + } + > + } deleteApi={() => { // TODO 调用删除接口 // handleDestroy(record).then(() => {}); @@ -172,7 +189,7 @@ const BusinessProject: React.FC = () => {
  • {item.icon}
    -

    {item.title}

    +

    {item.title}

    {item.count}
  • @@ -189,6 +206,7 @@ const BusinessProject: React.FC = () => { >
    { type="primary" htmlType="submit" prevIcon={} - buttonLabel="查询" + buttonLabel={ + + } > } - buttonLabel="重置" + buttonLabel={ + + } onClick={() => { form.resetFields(); // 点击重置按钮时重置表单数据 setQuerysData(() => {}); // 清空筛选项 @@ -221,7 +243,9 @@ const BusinessProject: React.FC = () => { }} > + } labelClassName="label_set_1" fieldProps={{ style: { @@ -230,12 +254,18 @@ const BusinessProject: React.FC = () => { prefix: , }} name="name" - placeholder="请输入企业名称" + placeholder={`${intl.formatMessage({ + id: 'common.please_input', + defaultMessage: '$$$', + })}${intl.formatMessage({ + id: 'business.list.table.searchForm.name', + defaultMessage: '$$$', + })}`} />
    - className="gn" + className="gn_pro_list" ghost={true} itemCardProps={{ ghost: true,