From d6014aa998ecac16a2547d37ed5d6482a02836c8 Mon Sep 17 00:00:00 2001 From: donghao Date: Thu, 16 May 2024 09:13:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=86=85=E5=B1=82?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.css | 6 -- src/app.less | 11 --- src/base.css | 64 ++++++++++++- src/base.less | 92 +++++++++++++++++++ src/components/MenuBar/index.less | 3 + src/components/MenuBar/index.tsx | 7 +- src/components/Tree/src/baseTree.css | 4 + src/components/Tree/src/baseTree.less | 4 + src/components/Tree/src/baseTree.tsx | 43 +++++---- src/components/Tree/src/deviceGroupTree.tsx | 4 +- src/global.css | 26 ------ src/global.less | 35 ------- src/locales/zh-CN/menu.ts | 10 +- src/locales/zh-CN/model.ts | 71 +------------- src/locales/zh-CN/server.ts | 2 +- .../Business/BusinessState/deviceSate.tsx | 69 +++++++------- src/pages/Business/BusinessState/index.tsx | 68 +++++++------- .../DeviceGroup/components/alarmSetForm.tsx | 22 +---- .../components/createModelParams.tsx | 5 +- .../components/modelDeployConfig.tsx | 6 +- .../DeviceGroup/components/modelSetting.tsx | 4 +- src/pages/Business/DeviceGroup/index.tsx | 5 +- .../BusinessInfo/components/algorithmCard.tsx | 2 +- src/pages/Project/BusinessInfo/index.tsx | 1 - src/pages/User/Login/index.tsx | 2 +- 25 files changed, 287 insertions(+), 279 deletions(-) diff --git a/src/app.css b/src/app.css index 0058e65..8133b97 100644 --- a/src/app.css +++ b/src/app.css @@ -12,12 +12,6 @@ background-color: transparent; padding-inline: 0 !important; } -.app_page_wrap .page_menu .ant-menu { - background-image: url(../public/home/menu_footer_bg.png); - background-repeat: no-repeat; - background-position: left bottom; - background-size: cover; -} .app_page_wrap .page_body { width: calc(100vw - 200px); } diff --git a/src/app.less b/src/app.less index f1c874d..a0f4e0c 100644 --- a/src/app.less +++ b/src/app.less @@ -12,17 +12,6 @@ background-color: transparent; padding-inline: 0 !important; } - .page_menu { - // menu_footer_bg.png - - .ant-menu { - // background-color: red; - background-image: url(../public/home/menu_footer_bg.png); - background-repeat: no-repeat; - background-position: left bottom; - background-size: cover; - } - } .page_body { width: calc(100vw - 200px); .body_nav_bar { diff --git a/src/base.css b/src/base.css index 0fd12ce..90bacc5 100644 --- a/src/base.css +++ b/src/base.css @@ -275,12 +275,12 @@ } /* 表单组件 */ .gn_form .ant-radio-button-wrapper { + height: 28px; margin-right: 12px; - border-radius: 4px; - border-inline-start-width: 1px; color: #666666; - height: 28px; line-height: 26px; + border-radius: 4px; + border-inline-start-width: 1px; } .gn_form .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover::before { background-color: transparent; @@ -297,10 +297,66 @@ background-color: transparent; } .gn_form .ant-radio-button-checked { - border-radius: 4px; color: #ffffff; background: #154ddd; + border-radius: 4px; } .gn_form .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) { color: #ffffff; } +/* 树控件 */ +.gn_tree_wrap .tree_node_item { + color: #333333; +} +/* tab控件 */ +.gn_tabs.ant-tabs .ant-tabs-tab { + color: #666666; +} +/* ProTable ProList */ +.gn_pro_table .ant-table-wrapper .ant-table-thead > tr > th, +.gn_pro_table .ant-table-wrapper .ant-table-thead > tr > td { + background: rgba(21, 77, 221, 0.1); +} +.gn_pro_table .ant-btn-link.ant-btn-dangerous, +.gn_pro_table .ant-btn-default.ant-btn-dangerous { + color: #f15d53; +} +.gn_pro_table .ant-btn-default.ant-btn-dangerous { + border-color: #f15d53; +} +.gn_pro_table .ant-table-cell .ant-btn.ant-btn-sm { + padding: 0; +} +.gn_pro_table .ant-pro-table-list-toolbar-container { + padding: 0; +} +.gn_pro_table .ant-table-wrapper .ant-table, +.gn_pro_table .ant-table-wrapper .ant-table-thead > tr > th { + color: #333333; +} +.gn_pro_table .ant-pro-table-alert { + background-color: rgba(21, 77, 221, 0.1); + border-radius: 4px; + margin-block-end: 12px; +} +.gn_pro_table .ant-pro-table-alert :where(.css-dev-only-do-not-override-1y19ift).ant-pro-table-alert-info { + color: #333333; +} +.gn_pro_list .ant-pro-checkcard { + background: transparent; + border: none !important; +} +.gn_pro_list .ant-pro-checkcard-content { + padding-inline: 0; + padding-block: 0; +} +/* 弹窗 modal */ +.ant-modal .ant-modal-header { + background: transparent; +} +.ant-modal .ant-modal-content { + background: linear-gradient(to bottom, transparent 0%, white 100px, white 100%), /* 底部白色背景 */ linear-gradient(to left, #fff 0%, #ccdbff 40%, /* 第一个从左到右的渐变 */ #fff 40%, #dbe6ff 45%, /* 第二个从左到右的渐变 */ #fff 45%, #e0e9ff 68%, /* 第三个从左到右的渐变 */ #e0e9ff 68%, #e0e9ff 100%); +} +.ant-modal .ant-pro-card { + background: transparent; +} diff --git a/src/base.less b/src/base.less index fef132c..df3b9b4 100644 --- a/src/base.less +++ b/src/base.less @@ -12,6 +12,8 @@ @gray_color_3: #e0e0e0; // 用于分割线色值 @primary_bg_color: #f5f5f5; // 主题背景色 +@shallow_primary_1: rgba(21, 77, 221, 0.1); + /* 颜色 */ .text_color_0 { color: #000000; @@ -171,6 +173,7 @@ .ant-form-item { .ant-form-item-label > label { color: @text_color_1; + // font-weight: bold; } .ant-input-affix-wrapper { color: @text_color_1; @@ -361,3 +364,92 @@ color: #ffffff; } } + +/* 树控件 */ +.gn_tree_wrap { + .tree_node_item { + color: @text_color_1; + } +} + +/* tab控件 */ +.gn_tabs { + &.ant-tabs .ant-tabs-tab { + color: @text_color_2; + } +} + +/* ProTable ProList */ +.gn_pro_table { + .ant-table-wrapper .ant-table-thead > tr > th, + .ant-table-wrapper .ant-table-thead > tr > td { + background: @shallow_primary_1; + } + .ant-btn-link.ant-btn-dangerous, + .ant-btn-default.ant-btn-dangerous { + color: @active_color_2; + } + .ant-btn-default.ant-btn-dangerous { + border-color: @active_color_2; + } + // 小尺寸按钮,统一间距 (列表操作栏位按钮) + .ant-table-cell .ant-btn.ant-btn-sm { + padding: 0; + } + // 筛选栏 + .ant-pro-table-list-toolbar-container { + padding: 0; + } + .ant-table-wrapper .ant-table, + .ant-table-wrapper .ant-table-thead > tr > th { + color: @text_color_1; + } + + .ant-pro-table-alert { + background-color: @shallow_primary_1; + border-radius: 4px; + margin-block-end: 12px; + :where(.css-dev-only-do-not-override-1y19ift).ant-pro-table-alert-info { + color: @text_color_1; + } + } +} + +.gn_pro_list { + .ant-pro-checkcard { + background: transparent; + border: none !important; + } + + .ant-pro-checkcard-content { + padding-inline: 0; + padding-block: 0; + } +} +/* 弹窗 modal */ +.ant-modal { + // background: white; + .ant-modal-header { + background: transparent; + } + .ant-modal-content { + background: linear-gradient(to bottom, transparent 0%, white 100px, white 100%), + /* 底部白色背景 */ + linear-gradient( + to left, + #fff 0%, + #ccdbff 40%, + /* 第一个从左到右的渐变 */ #fff 40%, + #dbe6ff 45%, + /* 第二个从左到右的渐变 */ #fff 45%, + #e0e9ff 68%, + /* 第三个从左到右的渐变 */ #e0e9ff 68%, + #e0e9ff 100% + ) + // /* 第二个从左到右的渐变 */ linear-gradient(to right, white, gray) 0 80% / 100% 20%, + // /* 第三个从左到右的渐变 */ linear-gradient(to right, orange, brown) 0 100% / 100% 20%;; + } + .ant-pro-card { + background: transparent; + } +} diff --git a/src/components/MenuBar/index.less b/src/components/MenuBar/index.less index 3dd93f4..49cf1cb 100644 --- a/src/components/MenuBar/index.less +++ b/src/components/MenuBar/index.less @@ -12,6 +12,9 @@ height: 100vh; padding: 0; background-color: @menubar_ThemeColor; + background-image: url(../../../public/home/menu_footer_bg.png); + background-repeat: no-repeat; + background-position: left bottom; border-radius: 0px 0px 32px 0px; // border-radius: 12px; // box-shadow: 4px 0px 24px 0px rgba(0, 63, 143, 0.3); diff --git a/src/components/MenuBar/index.tsx b/src/components/MenuBar/index.tsx index 9ef650b..7d858c5 100644 --- a/src/components/MenuBar/index.tsx +++ b/src/components/MenuBar/index.tsx @@ -2,12 +2,12 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-03-27 16:03:20 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 17:46:32 + * @LastEditTime: 2024-05-15 15:41:57 * @FilePath: \general-ai-manage\src\components\Header\index.tsx * @Description: 内层layout菜单配置 */ import { useBusinessInfo } from '@/hooks/useBusinessInfo'; -import { history, useIntl } from '@umijs/max'; +import { FormattedMessage, history } from '@umijs/max'; import { ReactComponent as BusinessLogoIcon } from '/public/home/business_logo.svg'; import type { MenuProps } from 'antd'; @@ -24,7 +24,6 @@ export type MenuBarProps = { }; const MenuBar: React.FC = ({ menuData, changeMenu }) => { - const intl = useIntl(); const { getStoreBusinessInfo } = useBusinessInfo(); const [selectedMenu, setSelectedMenu] = useState([]); @@ -133,7 +132,7 @@ const MenuBar: React.FC = ({ menuData, changeMenu }) => { >
- {intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '菜单' })} +
))} diff --git a/src/components/Tree/src/baseTree.css b/src/components/Tree/src/baseTree.css index 26763eb..74c790a 100644 --- a/src/components/Tree/src/baseTree.css +++ b/src/components/Tree/src/baseTree.css @@ -19,6 +19,9 @@ box-shadow: none; /* 去掉聚焦时的阴影效果 */ } +.base_tree_wrap .ant-tree .ant-tree-switcher .ant-tree-switcher-icon { + font-size: 12px; +} .base_tree_wrap .tree_node_1 { width: 100%; margin: 12px 0; @@ -35,6 +38,7 @@ } .base_tree_wrap .tree_node_1:hover, .base_tree_wrap .ant-tree-treenode-selected { + font-weight: bold; color: #154ddd; background: rgba(21, 77, 221, 0.1); border-radius: 8px; diff --git a/src/components/Tree/src/baseTree.less b/src/components/Tree/src/baseTree.less index cea4e89..3c3f00b 100644 --- a/src/components/Tree/src/baseTree.less +++ b/src/components/Tree/src/baseTree.less @@ -16,6 +16,9 @@ box-shadow: none; /* 去掉聚焦时的阴影效果 */ } } + .ant-tree .ant-tree-switcher .ant-tree-switcher-icon { + font-size: 12px; + } .tree_node_1 { width: 100%; @@ -36,6 +39,7 @@ .tree_node_1:hover, .ant-tree-treenode-selected { color: #154ddd; + font-weight: bold; background: rgba(21, 77, 221, 0.1); border-radius: 8px; } diff --git a/src/components/Tree/src/baseTree.tsx b/src/components/Tree/src/baseTree.tsx index 6172361..15d9929 100644 --- a/src/components/Tree/src/baseTree.tsx +++ b/src/components/Tree/src/baseTree.tsx @@ -1,5 +1,5 @@ import { formatTreeValByKey } from '@/utils/baseTree'; -import { DeleteFilled, SearchOutlined } from '@ant-design/icons'; +import { SearchOutlined } from '@ant-design/icons'; import { Button, Form, Input, Modal, Tree } from 'antd'; import _debounce from 'lodash/debounce'; import React, { useEffect, useState } from 'react'; @@ -171,7 +171,8 @@ const BaseTree: React.FC = (props) => { props.handleDelete(node); }} > - + + {/* */} ) : ( <> @@ -186,7 +187,7 @@ const BaseTree: React.FC = (props) => { }, [props.treeData]); return ( -
+
{!props?.hideInSearch ? ( = (props) => { ) : ( <> )} - { - console.log('selected', selectedKeys); - props.selectTree(selectedKeys, info); - }} - titleRender={(node) => { - if (node.title) { - return renderTreeItem(node); - } - return renderAddAction(node); - }} - {...defaultProps} - > - {renderTreeNodes(currTreeData)} - -
{renderAddAction()}
+
+ { + console.log('selected', selectedKeys); + props.selectTree(selectedKeys, info); + }} + titleRender={(node) => { + if (node.title) { + return renderTreeItem(node); + } + return renderAddAction(node); + }} + {...defaultProps} + > + {renderTreeNodes(currTreeData)} + +
{renderAddAction()}
+
{/*
添加一级节点
*/} {/* TODO 使用ProForm */} diff --git a/src/components/Tree/src/deviceGroupTree.tsx b/src/components/Tree/src/deviceGroupTree.tsx index b0568ea..8b6cd0a 100644 --- a/src/components/Tree/src/deviceGroupTree.tsx +++ b/src/components/Tree/src/deviceGroupTree.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-26 11:11:05 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-04-29 16:26:05 + * @LastEditTime: 2024-05-15 14:12:06 * @FilePath: \general-ai-manage\src\components\Tree\src\deviceGroupTree.tsx * @Description: 设备节点树 * @交互说明 @@ -52,7 +52,7 @@ const DeviceGroupTree: React.FC = (props) => { key={node?.key || 'add'} > - {node?.key ? '添加子节点' : '添加节点'} + {node?.key ? '添加子节点' : '添加节点'}
); }} diff --git a/src/global.css b/src/global.css index f297e1d..fd4b1f3 100644 --- a/src/global.css +++ b/src/global.css @@ -183,32 +183,6 @@ ol { background: url('../public/home/business_arrow.svg') no-repeat; background-size: cover; } -/* ProTable ProList */ -.gn_pro_table .ant-table-wrapper .ant-table-thead > tr > th, -.gn_pro_table .ant-table-wrapper .ant-table-thead > tr > td { - background: rgba(21, 77, 221, 0.1); -} -.gn_pro_table .ant-btn-link.ant-btn-dangerous, -.gn_pro_table .ant-btn-default.ant-btn-dangerous { - color: #e80d0d; -} -.gn_pro_table .ant-btn-default.ant-btn-dangerous { - border-color: #e80d0d; -} -.gn_pro_table .ant-table-cell .ant-btn.ant-btn-sm { - padding: 0; -} -.gn_pro_table .ant-pro-table-list-toolbar-container { - padding: 0; -} -.gn_pro_list .ant-pro-checkcard { - background: transparent; - border: none !important; -} -.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 4965d4d..d46e614 100644 --- a/src/global.less +++ b/src/global.less @@ -226,41 +226,6 @@ ol { } } -/* ProTable ProList */ -.gn_pro_table { - .ant-table-wrapper .ant-table-thead > tr > th, - .ant-table-wrapper .ant-table-thead > tr > td { - background: rgba(21, 77, 221, 0.1); - } - .ant-btn-link.ant-btn-dangerous, - .ant-btn-default.ant-btn-dangerous { - color: #e80d0d; - } - .ant-btn-default.ant-btn-dangerous { - border-color: #e80d0d; - } - // 小尺寸按钮,统一间距 (列表操作栏位按钮) - .ant-table-cell .ant-btn.ant-btn-sm { - padding: 0; - } - // 筛选栏 - .ant-pro-table-list-toolbar-container { - padding: 0; - } -} - -.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/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts index ce49557..fc55527 100644 --- a/src/locales/zh-CN/menu.ts +++ b/src/locales/zh-CN/menu.ts @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-01 11:20:09 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-07 14:54:37 + * @LastEditTime: 2024-05-15 16:02:24 * @FilePath: \uighur-recognition-web2\src\locales\zh-CN\menu.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -66,4 +66,12 @@ export default { 'menu.business-model-index': '业务模型', 'menu.business-server-state': '服务器状态', 'menu.business-device-state': '设备状态', + // 'home-business-project': '企业项目', + // 'model-index': '模型管理', + // 'model-runtime-lib': '模型运行库', + // 'business-info-index': '企业信息', + // 'business-device-group': '节点设置', + // 'business-model-index': '业务模型', + // 'business-server-state': '服务器状态', + // 'business-device-state': '设备状态', }; diff --git a/src/locales/zh-CN/model.ts b/src/locales/zh-CN/model.ts index ef4bb97..e45afc5 100644 --- a/src/locales/zh-CN/model.ts +++ b/src/locales/zh-CN/model.ts @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-10 17:21:34 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-14 16:40:35 + * @LastEditTime: 2024-05-14 17:05:30 * @FilePath: \general-ai-manage\src\locales\zh-CN\model.ts * @Description: 模型管理 */ @@ -33,8 +33,6 @@ export const model_index: { [key: string]: string } = { 'model_index.create.form.rule.required.industry': '请选择行业分类', 'model_index.create.form.remark': '备注', 'model_index.create.form.rule.required.remark': '请填写备注', - - // 'model_detail.version.table.list.action.defaultVersion': '设为默认' }; // 模型运行库 export const model_runtimeLib: { [key: string]: string } = { @@ -77,7 +75,6 @@ export const model_version: { [key: string]: string } = { 'model_detail.version.form.required.name': '请填写版本号', 'model_detail.version.form.remark': '备注', 'model_detail.version.list.table.form.rule.required.name': '请填写版本号', - 'model_detail.version.table.list.tag.defaultVersion': '默认版本', 'model_detail.version.table.list.title': '版本列表', 'model_detail.version.table.list.action.add': '新建版本信息', @@ -135,69 +132,3 @@ export const base_model: { [key: string]: string } = { 'base_model.form.remark': '备注', 'base_model.list.table.form.rule.required.name': '请填写版本号', }; - -export const server_state: { [key: string]: string } = { - 'server_state.table.list.name': '服务器名称', - 'server_state.table.list.userName': '用户名', - 'server_state.table.list.ip': 'IP', - 'server_state.table.list.pwd': '密码', - 'server_state.table.list.defaultPort': '默认端口', - 'server_state.table.list.parameter': '服务器参数', - 'server_state.table.list.publicKeyString': '公钥字符串', - 'server_state.table.list.connectivityTesting': '连通性测试', - 'server_state.table.list.isEnable': '是否启用', - 'server_state.table.list.remark': '备注', - 'server_state.table.list.createTime': '创建时间', - 'server_state.table.list.updateTime': '更新时间', - 'server_state.table.rule.required.modelFkId': '模型为必填项', - 'server_state.table.rule.required.path': '模型地址为必填项', - 'server_state.table.list.add': '新建服务器', - 'server_state.table.list.editor': '编辑服务器', - 'server_state.table.list.update': '更新模型版本', -}; - -// 未启用 -export const business_image: { [key: string]: string } = { - 'resource.business_image.table.list.id': 'ID', - 'resource.business_image.table.list.name': '镜像名称', - 'resource.business_image.table.list.version': '镜像版本', - 'resource.business_image.table.list.projectFkId': '项目', - 'resource.business_image.table.list.path': '镜像地址', - 'resource.business_image.table.list.startCode': '启动代码', - 'resource.business_image.table.list.config': '配置', - 'resource.business_image.table.list.configHash': '配置hash', - 'resource.business_image.table.list.remark': '备注', - 'resource.business_image.table.list.createTime': '创建时间', - 'resource.business_image.table.list.updateTime': '更新时间', - 'resource.business_image.table.rule.required.name': '镜像名称为必填项', - 'resource.business_image.table.rule.required.version': '镜像版本为必填项', - 'resource.business_image.table.rule.required.projectFkId': '项目为必填项', - 'resource.business_image.table.list.add': '新建业务镜像', - 'resource.business_image.table.list.update': '更新业务镜像', -}; -export const model_category: { [key: string]: string } = { - 'resource.model_category.table.list.id': 'ID', - 'resource.model_category.table.list.name': '类别名称', - 'resource.model_category.table.list.code': '类别代码', - 'resource.model_category.table.list.remark': '备注', - 'resource.model_category.table.list.createTime': '创建时间', - 'resource.model_category.table.list.updateTime': '更新时间', - 'resource.model_category.table.rule.required.name': '类别名称为必填项', - 'resource.model_category.table.rule.required.code': '类别代码为必填项', - 'resource.model_category.table.list.add': '新建模型类别', - 'resource.model_category.table.list.update': '更新模型类别', -}; -export const model_image: { [key: string]: string } = { - 'resource.model_image.table.list.id': 'ID', - 'resource.model_image.table.list.name': '镜像名称', - 'resource.model_image.table.list.modelVersionFkId': '模型版本', - 'resource.model_image.table.list.path': '镜像地址', - 'resource.model_image.table.list.startCode': '启动代码', - 'resource.model_image.table.list.remark': '备注', - 'resource.model_image.table.list.createTime': '创建时间', - 'resource.model_image.table.list.updateTime': '更新时间', - 'resource.model_image.table.rule.required.name': '镜像名称为必填项', - 'resource.model_image.table.rule.required.modelVersionFkId': '模型版本为必填项', - 'resource.model_image.table.list.add': '新建模型镜像', - 'resource.model_image.table.list.update': '更新模型镜像', -}; diff --git a/src/locales/zh-CN/server.ts b/src/locales/zh-CN/server.ts index 0c8b4f1..f88cf6d 100644 --- a/src/locales/zh-CN/server.ts +++ b/src/locales/zh-CN/server.ts @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-05-09 15:21:03 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 14:51:36 + * @LastEditTime: 2024-05-14 17:04:43 * @FilePath: \general-ai-platform-web\src\locales\zh-CN\server.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ diff --git a/src/pages/Business/BusinessState/deviceSate.tsx b/src/pages/Business/BusinessState/deviceSate.tsx index e1fedd5..2d849f0 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-13 16:13:55 + * @LastEditTime: 2024-05-15 15:35:20 * @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\deviceSate.tsx * @Description: 设备状态列表 * @交互说明 @@ -33,7 +33,7 @@ const DeviceSate: React.FC = () => { // 列表 const [serverList, setServerList] = useState[]>([]); // 列表数据 const [currentRow, setCurrentRow] = useState>(); - const [currentPageSize, setCurrentPageSize] = useState(8); + const [currentPageSize, setCurrentPageSize] = useState(12); const [currentPage, setCurrentPage] = useState(1); const [total, setTotal] = useState(1); @@ -208,7 +208,6 @@ const DeviceSate: React.FC = () => { onFinish={async (values) => { console.log(values, 'filter_finish_values'); setQuerysData(() => values); - return true; }} > @@ -251,37 +250,39 @@ const DeviceSate: React.FC = () => { changeTabMode(key); }} > - - className="gn_pro_list" - ghost={true} - rowKey={'id'} - itemCardProps={{ - ghost: true, - bodyStyle: { padding: 0, margin: 0 }, - }} - cardProps={{ - bodyStyle: { - background: 'transparent', - margin: '-4px 0', - }, - }} - pagination={{ - ...proTablePaginationOptions, - page: currentPage, - pageSize: currentPageSize, - total: total || 0, // 指定总条目数 - onChange: (page, pageSize) => { - setCurrentPageSize(pageSize); - setCurrentPage(page); - }, - }} - rowSelection={false} - grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }} - metas={{ - content: {}, - }} - dataSource={serverList} - /> +
+ + className="gn_pro_list" + ghost={true} + rowKey={'id'} + itemCardProps={{ + ghost: true, + bodyStyle: { padding: 0, margin: 0 }, + }} + cardProps={{ + bodyStyle: { + background: 'transparent', + margin: '-4px 0', + }, + }} + pagination={{ + ...proTablePaginationOptions, + page: currentPage, + pageSize: currentPageSize, + total: total || 0, // 指定总条目数 + onChange: (page, pageSize) => { + setCurrentPageSize(pageSize); + setCurrentPage(page); + }, + }} + rowSelection={false} + grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }} + metas={{ + content: {}, + }} + dataSource={serverList} + /> +
diff --git a/src/pages/Business/BusinessState/index.tsx b/src/pages/Business/BusinessState/index.tsx index 3579b55..39a9143 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-13 11:30:19 + * @LastEditTime: 2024-05-15 16:30:02 * @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\index.tsx * @Description: 设备服务器状态 一级关键词 businessState(bs) * @交互说明 @@ -29,7 +29,7 @@ const BusinessState: React.FC = () => { // 列表 const [serverList, setServerList] = useState[]>([]); // 列表数据 const [currentRow, setCurrentRow] = useState>(); - const [currentPageSize, setCurrentPageSize] = useState(8); + const [currentPageSize, setCurrentPageSize] = useState(12); const [currentPage, setCurrentPage] = useState(1); const [total, setTotal] = useState(1); const [createModalOpen, setCreateModalOpen] = useState(false); @@ -187,37 +187,39 @@ const BusinessState: React.FC = () => { } > - - className="gn_pro_list" - ghost={true} - rowKey={'id'} - itemCardProps={{ - ghost: true, - bodyStyle: { padding: 0, margin: 0 }, - }} - cardProps={{ - bodyStyle: { - background: 'transparent', - margin: '-4px 0', - }, - }} - pagination={{ - ...proTablePaginationOptions, - page: currentPage, - pageSize: currentPageSize, - total: total || 0, // 指定总条目数 - onChange: (page, pageSize) => { - setCurrentPageSize(pageSize); - setCurrentPage(page); - }, - }} - rowSelection={false} - grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }} - metas={{ - content: {}, - }} - dataSource={serverList} - /> +
+ + className="gn_pro_list" + ghost={true} + rowKey={'id'} + itemCardProps={{ + ghost: true, + bodyStyle: { padding: 0, margin: 0 }, + }} + cardProps={{ + bodyStyle: { + background: 'transparent', + margin: '-4px 0', + }, + }} + pagination={{ + ...proTablePaginationOptions, + page: currentPage, + pageSize: currentPageSize, + total: total || 0, // 指定总条目数 + onChange: (page, pageSize) => { + setCurrentPageSize(pageSize); + setCurrentPage(page); + }, + }} + rowSelection={false} + grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }} + metas={{ + content: {}, + }} + dataSource={serverList} + /> +
= (props) => { // const [initialValues, setInitialValues] = useState>({}); - function fetchInitialValues() { - // setInitialValues({ - // type: '2', - // ways: [ - // { - // label: '短信', - // value: [], - // isChecked: [], - // }, - // { - // label: '邮件', - // value: [], - // isChecked: [], - // }, - // ] - // }); - } + function fetchInitialValues() {} useEffect(() => { fetchInitialValues(); }, []); @@ -109,7 +93,7 @@ const AlarmSetForm: React.FC = (props) => { disabled={!isChecked?.length} request={async () => { // const resp = await postCurrentIP(); - const resp = ['test001', 'test002', 'test003']; + const resp = ['用户A', '用户B', '用户C']; return resp?.map((v: any) => { return { label: v, diff --git a/src/pages/Business/DeviceGroup/components/createModelParams.tsx b/src/pages/Business/DeviceGroup/components/createModelParams.tsx index 1d7d399..ef6a0af 100644 --- a/src/pages/Business/DeviceGroup/components/createModelParams.tsx +++ b/src/pages/Business/DeviceGroup/components/createModelParams.tsx @@ -95,6 +95,7 @@ const CreateModelParams: React.FC = (props) => { } }, []); return ( + // TODO stepForm 中上传文件,新增参数与UI图不一致 @@ -246,8 +247,8 @@ const CreateModelParams: React.FC = (props) => { {() => { return ( <> - - + + ); }} diff --git a/src/pages/Business/DeviceGroup/components/modelDeployConfig.tsx b/src/pages/Business/DeviceGroup/components/modelDeployConfig.tsx index 19db610..4ce184c 100644 --- a/src/pages/Business/DeviceGroup/components/modelDeployConfig.tsx +++ b/src/pages/Business/DeviceGroup/components/modelDeployConfig.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-08 16:57:30 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-05-10 17:28:39 + * @LastEditTime: 2024-05-15 15:01:35 * @FilePath: \general-ai-manage\src\pages\Project\BusinessProject\components\detailServerState.tsx * @Description: 服务器详情 * @交互说明 @@ -13,7 +13,7 @@ import { ProCard, ProColumns, ProDescriptions, ProTable } from '@ant-design/pro- import { FormattedMessage, useIntl } from '@umijs/max'; import { Modal } from 'antd'; import { useEffect, useRef, useState } from 'react'; -import { proFormMaxModelWidth } from '../../../../../config/defaultForm'; +import { proFormSmallModelWidth } from '../../../../../config/defaultForm'; type ModelDeployConfigProps = { info: Record; @@ -110,7 +110,7 @@ const ModelDeployConfig: React.FC = ({ info, detailOpen, return ( = () => { bodyStyle: { padding: 0, margin: 0, - height: 'calc(100vh - 400px)', + height: 'calc(100vh - 420px)', overflow: 'scroll', }, }} diff --git a/src/pages/Business/DeviceGroup/index.tsx b/src/pages/Business/DeviceGroup/index.tsx index 8e57a4f..a1ddbeb 100644 --- a/src/pages/Business/DeviceGroup/index.tsx +++ b/src/pages/Business/DeviceGroup/index.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 17:29:38 + * @LastEditTime: 2024-05-15 11:44:01 * @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\index.tsx * @Description: 设备节点设置 关键词 deviceGroup(dg) * @交互说明 @@ -34,7 +34,7 @@ const DeviceGroup: React.FC = () => { const [createModalOpen, setCreateModalOpen] = useState(false); // 创建新增窗口是否打开 // 切换模块 - const [tabKey, setTabKey] = useState(deviceGroupEnums[1].key); + const [tabKey, setTabKey] = useState(deviceGroupEnums[0].key); const [tabs] = useState([...deviceGroupEnums]); const changeTabMode = (key: string) => { setTabKey(key); @@ -55,7 +55,6 @@ const DeviceGroup: React.FC = () => { const handleCreateModal = () => { setCreateModalOpen(!createModalOpen); }; - // 节点信息展示 // 切换 diff --git a/src/pages/Project/BusinessInfo/components/algorithmCard.tsx b/src/pages/Project/BusinessInfo/components/algorithmCard.tsx index c883a6b..23b442c 100644 --- a/src/pages/Project/BusinessInfo/components/algorithmCard.tsx +++ b/src/pages/Project/BusinessInfo/components/algorithmCard.tsx @@ -37,7 +37,7 @@ const AlgorithmCard: React.FC = ({ info }) => {
{ const [detailInfo, setDetailInfo] = useState>({}); const { getStoreBusinessInfo } = useBusinessInfo(); const [updateModalOpen, setUpdateModalOpen] = useState(false); - // 未启用 /** * @en-US International configuration diff --git a/src/pages/User/Login/index.tsx b/src/pages/User/Login/index.tsx index 338cdb3..a955ec3 100644 --- a/src/pages/User/Login/index.tsx +++ b/src/pages/User/Login/index.tsx @@ -127,7 +127,7 @@ const Login: React.FC = () => { let localData = getAllRouteNameTile(menusData, ''); let localRes: any = {}; localData.forEach((v) => { - localRes[`menu${v.name}`] = v.title; + localRes[`menu.${v.name}`] = v.title; }); console.log(localRes); addLocale('zh-CN', localRes, {