feat: 外层业务模块问题修复

develop2
donghao 1 year ago
parent 967a6785e0
commit 8a56fb2946

@ -2,11 +2,10 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-27 14:56:27
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-17 13:45:53
* @LastEditTime: 2024-05-20 15:20:34
* @FilePath: \general-ai-manage\config\routes.ts
* @Description:
*/
/**
* @name umi
* @description path,component,routes,redirect,wrappers,name,icon
@ -47,7 +46,7 @@ const modelRouteIndex = {
path: '/home/model-index',
component: './Model/ModelIndex',
access: 'canReadMenu',
menuIcon: 'icon-moxingliebiao-unselected',
// menuIcon: 'icon-moxingliebiao-unselected',
key: 'model000',
};
const subModelRoute = [
@ -56,7 +55,9 @@ const subModelRoute = [
path: '/home/model-index',
component: './Model/ModelIndex',
access: 'canReadMenu',
menuIcon: 'icon-moxingliebiao-unselected',
// menuIcon: 'icon-moxingliebiao-unselected',
defaultIcon: 'modelListActiveIcon',
// activeIcon: modelListActiveIicon,
key: 'model001',
rootMenuKey: 'model000',
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 KiB

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

@ -113,7 +113,6 @@
color: #333333;
font-family: PingFang SC, PingFang SC;
font-style: normal;
text-align: left;
text-transform: none;
font-size: 14px;
line-height: 20px;
@ -122,7 +121,6 @@
color: #333333;
font-family: PingFang SC, PingFang SC;
font-style: normal;
text-align: left;
text-transform: none;
font-size: 14px;
font-family: PingFang SC-Medium;
@ -132,7 +130,6 @@
color: #333333;
font-family: PingFang SC, PingFang SC;
font-style: normal;
text-align: left;
text-transform: none;
font-size: 12px;
line-height: 17px;
@ -150,6 +147,9 @@
}
/* 重置ant组件 */
/* Button */
.ant-btn {
border-radius: 2px;
}
.ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {
background-color: #154ddd;
@ -163,10 +163,12 @@
background: #ffffff;
border-color: #154ddd;
}
.ant-pro-card-extra .ant-btn {
border-radius: 4px;
}
.gn_search_from .ant-btn {
padding: 4px 10px;
border: none;
border-radius: 2px;
}
.gn_search_from .ant-btn-default {
color: #333333;
@ -174,12 +176,12 @@
border: none;
}
.ant-tag {
background: white;
height: 24px;
line-height: 22px;
padding-inline: 8px;
background: white;
border: 1px solid #dcdcdc;
border-radius: 2px;
padding-inline: 8px;
}
.ant-form-item .ant-form-item-label > label {
color: #333333;
@ -294,6 +296,7 @@
background: #ffffff;
border: 1px solid rgba(21, 77, 221, 0.1);
border-radius: 4px;
box-shadow: 0px 4px 8px 0px rgba(0, 79, 178, 0.15);
}
.gn_descriptions .ant-descriptions-item-label {
color: #333333;
@ -389,13 +392,13 @@
background: transparent;
}
/* Card */
.gn_card_123 > .ant-pro-card-header {
.gn_card_wrap > .ant-pro-card-header {
height: 54px;
margin: 0;
padding: 10px 16px;
padding: 16px;
border-bottom: 1px solid #e0e0e0;
}
.gn_card_123 > .ant-pro-card-body {
.gn_card_wrap > .ant-pro-card-body {
margin: 0;
padding: 16px 16px 0;
}
@ -404,15 +407,15 @@
overflow: hidden;
border-radius: 8px;
}
.gn_table_card {
.gn_table_card_wrap {
border-radius: 8px;
}
.gn_table_card .gn_card > .ant-pro-card-header {
.gn_table_card_wrap .gn_card > .ant-pro-card-header {
margin: 0;
padding: 20px 16px;
border-bottom: 1px solid #e0e0e0;
}
.gn_table_card .gn_card > .ant-pro-card-body {
.gn_table_card_wrap .gn_card > .ant-pro-card-body {
margin: 0;
padding: 16px 16px 0;
}
@ -471,7 +474,7 @@
margin: 0;
}
.gn_model_steps_form .ant-steps {
margin: 12px 0 20px;
margin: 16px 0;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item {
flex: auto;
@ -487,14 +490,17 @@
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 8px 0;
justify-content: start;
height: 56px;
padding: 0 16px;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-icon {
margin: 0 8px;
margin: 0;
font-size: 16px;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-content {
margin: 0;
margin-left: 8px;
text-align: left;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-title {
@ -508,9 +514,9 @@
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-tail {
position: absolute;
top: auto;
left: calc(100% - 30px);
width: 16px;
height: 16px;
left: calc(100% - 12px - 16px);
width: 12px;
height: 12px;
margin: 0;
padding: 0;
background: url('../public/home/business_arrow_default.svg') no-repeat;
@ -522,7 +528,7 @@
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-finish {
background: #e5edff;
border: 1px solid #154ddd;
border: 1px solid rgba(21, 77, 221, 0.1);
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-finish .ant-steps-item-icon {
background-color: #154ddd;
@ -546,6 +552,7 @@
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-active .ant-steps-item-title {
color: #154ddd;
font-weight: bold;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-active .ant-steps-item-description {
color: #154ddd;
@ -554,6 +561,23 @@
background: url('../public/home/business_arrow.svg') no-repeat;
background-size: cover;
}
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-active.ant-steps-item-process .ant-steps-item-icon {
background-color: #154ddd;
border-color: #154ddd;
}
/* 表单控件 */
.gn_proFormUploadDragger_formItem.ant-upload-wrapper {
line-height: 1;
}
.gn_proFormUploadDragger_formItem .ant-upload-drag-container {
padding-top: 16px;
}
.gn_proFormUploadDragger_formItem p.ant-upload-drag-icon {
margin: 0 !important;
}
.gn_proFormUploadDragger_formItem .gn_uploadfile_title a {
color: #154ddd;
}
.ant-table-wrapper .ant-table-pagination.ant-pagination {
margin: 0;
padding: 24px 0 !important;

@ -133,7 +133,7 @@
color: #333333;
font-family: PingFang SC, PingFang SC;
font-style: normal;
text-align: left;
// text-align: left;
text-transform: none;
}
.text1 {
@ -168,8 +168,9 @@
}
/* 重置ant组件 */
/* Button */
// .ant-btn {
// }
.ant-btn {
border-radius: 2px;
}
.ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {
background-color: @primary_color;
@ -183,11 +184,16 @@
background: #ffffff;
border-color: @primary_color;
}
// 卡片右侧按钮
.ant-pro-card-extra {
.ant-btn {
border-radius: 4px;
}
}
.gn_search_from {
.ant-btn {
padding: 4px 10px;
border: none;
border-radius: 2px;
}
.ant-btn-default {
color: @text_color_1;
@ -356,6 +362,7 @@
background: #ffffff;
border: 1px solid rgba(21, 77, 221, 0.1);
border-radius: 4px;
box-shadow: 0px 4px 8px 0px rgba(0, 79, 178, 0.15);
.ant-descriptions-item-label {
color: @text_color_1;
font-weight: bold;
@ -488,11 +495,11 @@
}
/* Card */
.gn_card_123 {
.gn_card_wrap {
& > .ant-pro-card-header {
height: 54px;
margin: 0;
padding: 10px 16px;
padding: 16px;
border-bottom: 1px solid #e0e0e0;
}
& > .ant-pro-card-body {
@ -505,7 +512,7 @@
overflow: hidden;
border-radius: 8px;
}
.gn_table_card {
.gn_table_card_wrap {
// padding: 0 24px;
border-radius: 8px;
.gn_card {
@ -522,7 +529,6 @@
}
}
}
/* Form */
// 通用表单
.gn_form {
@ -588,7 +594,7 @@
margin: 0;
}
.ant-steps {
margin: 12px 0 20px;
margin: 16px 0;
}
// 步骤条
.ant-modal-content .ant-modal-body .ant-steps {
@ -606,15 +612,18 @@
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 8px 0;
justify-content: start;
height: 56px;
padding: 0 16px;
}
.ant-steps-item-icon {
margin: 0 8px;
margin: 0;
font-size: 16px;
}
.ant-steps-item-content {
margin: 0;
margin-left: 8px;
text-align: left;
}
.ant-steps-item-title {
@ -630,9 +639,9 @@
// display: none;
position: absolute;
top: auto;
left: calc(100% - 30px);
width: 16px;
height: 16px;
left: calc(100% - 12px - 16px);
width: 12px;
height: 12px;
margin: 0;
padding: 0;
// background-color: red;
@ -649,18 +658,18 @@
// 已完成
.ant-steps-item-finish {
background: #e5edff;
border: 1px solid #154ddd;
border: 1px solid rgba(21, 77, 221, 0.1);
.ant-steps-item-icon {
background-color: #154ddd;
background-color: @primary_color;
.ant-steps-icon {
color: white;
}
}
.ant-steps-item-title {
color: #154ddd;
color: @primary_color;
}
.ant-steps-item-description {
color: #154ddd;
color: @primary_color;
}
.ant-steps-item-tail {
background: url('../public/home/business_arrow.svg') no-repeat;
@ -670,17 +679,41 @@
// 当前选中
.ant-steps-item-active {
background: #e5edff;
border: 1px solid #154ddd;
border: 1px solid @primary_color;
.ant-steps-item-title {
color: #154ddd;
color: @primary_color;
font-weight: bold;
}
.ant-steps-item-description {
color: #154ddd;
color: @primary_color;
}
.ant-steps-item-tail {
background: url('../public/home/business_arrow.svg') no-repeat;
background-size: cover;
}
&.ant-steps-item-process .ant-steps-item-icon {
background-color: @primary_color;
border-color: @primary_color;
}
}
}
}
/* 表单控件 */
.gn_proFormUploadDragger_formItem {
&.ant-upload-wrapper {
line-height: 1;
}
.ant-upload-drag-container {
padding-top: 16px;
}
p.ant-upload-drag-icon {
margin: 0 !important;
}
.gn_uploadfile_title {
a {
color: @primary_color;
}
}
}

@ -0,0 +1,37 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-05-20 15:12:33
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-20 15:33:18
* @FilePath: \general-ai-platform-web\src\hooks\useHomeRoute.tsx
* @Description:
*/
import modelListActive from '../../public/icons/modelList_active.png';
import modelLisDefault from '../../public/icons/modelList_default.png';
import modelRuntimeLibActive from '../../public/icons/modelRuntimeLib_active.png';
import modelRuntimeLibDefault from '../../public/icons/modelRuntimeLib_default.png';
export const useHomeRoute = () => {
const fetchMenuIconByRoute = (menuItem, currRoute) => {
let currIcon = '';
switch (menuItem?.name) {
case 'model-index':
currIcon = currRoute?.path === menuItem.path ? modelListActive : modelLisDefault;
break;
case 'model-runtime-lib':
currIcon =
currRoute?.path === menuItem.path ? modelRuntimeLibActive : modelRuntimeLibDefault;
break;
}
return currIcon ? (
<img className="w-[14px] mr-[4px]" src={currIcon} />
) : (
<i className={`iconfont mr-[4px] ${menuItem.menuIcon}`}></i>
);
};
return {
fetchMenuIconByRoute,
};
};

@ -1,102 +1,101 @@
@font-face {
font-family: "iconfont";
font-family: 'iconfont';
/* Project id 4530966 */
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;
font-size: 16px;
font-family: 'iconfont' !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-fuzhi:before {
content: "\e719";
content: '\e719';
}
.icon-zip:before {
content: "\e71a";
content: '\e71a';
}
.icon-shangchuanwenjian:before {
content: "\e718";
content: '\e718';
}
.icon-you:before {
content: "\e717";
content: '\e717';
}
.icon-delete:before {
content: "\e716";
content: '\e716';
}
.icon-tianjiafenlei:before {
content: "\e714";
content: '\e714';
}
.icon-shanchufenlei:before {
content: "\e715";
content: '\e715';
}
.icon-tianjiajiedian:before {
content: "\e713";
content: '\e713';
}
.icon-banbenxinxi:before {
content: "\e711";
content: '\e711';
}
.icon-shiyonghangye:before {
content: "\e712";
content: '\e712';
}
.icon-jiedianshezhi:before {
content: "\e70f";
content: '\e70f';
}
.icon-fuwuqizhuangtai:before {
content: "\e710";
content: '\e710';
}
.icon-yewumoxing:before {
content: "\e70b";
content: '\e70b';
}
.icon-shouye:before {
content: "\e70c";
content: '\e70c';
}
.icon-shebeizhuangtai:before {
content: "\e70d";
content: '\e70d';
}
.icon-qiyexinxi:before {
content: "\e70e";
content: '\e70e';
}
.icon-moxingliebiao-unselected:before {
content: "\e709";
content: '\e709';
}
.icon-moxingyunhangku-selected:before {
content: "\e70a";
content: '\e70a';
}
.icon-wen:before {
content: "\e704";
content: '\e704';
}
.icon-xia:before {
content: "\e705";
content: '\e705';
}
.icon-moxingliebiao-selected:before {
content: "\e706";
content: '\e706';
}
.icon-moxingyunhangku-unselected:before {
content: "\e707";
content: '\e707';
}
.icon-close:before {
content: "\e708";
content: '\e708';
}
.icon-moxingshuliang:before {
content: "\e6fd";
content: '\e6fd';
}
.icon-shebeishuliang:before {
content: "\e6fe";
content: '\e6fe';
}
.icon-xinjian:before {
content: "\e6ff";
content: '\e6ff';
}
.icon-gengduo:before {
content: "\e700";
content: '\e700';
}
.icon-chuangjianshijian:before {
content: "\e701";
content: '\e701';
}
.icon-search:before {
content: "\e702";
content: '\e702';
}
.icon-refresh:before {
content: "\e703";
content: '\e703';
}

@ -6,7 +6,7 @@
}
.iconfont {
font-size: 16px;
// font-size: 16px;
font-family: 'iconfont' !important;
font-style: normal;
-webkit-font-smoothing: antialiased;

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 15:25:23
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-17 13:56:57
* @LastEditTime: 2024-05-20 15:26:48
* @FilePath: \general-ai-manage\src\layouts\HomeLayout.tsx
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -13,6 +13,7 @@ import { SettingDrawer } from '@ant-design/pro-components';
import { Outlet, history, useIntl, useLocation } from '@umijs/max';
import { ConfigProvider, Layout, theme } from 'antd';
import { useHomeRoute } from '@/hooks/useHomeRoute';
import React, { useEffect, useState } from 'react';
// public/home/logo.svg
// import defaultSettings from '../../config/defaultSettings';
@ -26,6 +27,7 @@ const isDev = false;
const { Header, Content } = Layout;
const HomeLayout: React.FC = () => {
const { fetchMenuIconByRoute } = useHomeRoute();
const { initialState, setInitialState } = useModel('@@initialState');
// const { token } = theme.useToken();
const intl = useIntl();
@ -185,7 +187,8 @@ const HomeLayout: React.FC = () => {
}`}
>
<div className="flex justify-center items-center w-[120px]">
<i className={`iconfont pr-[4px] ${menuItem.menuIcon}`}></i>
{fetchMenuIconByRoute(menuItem, currRoute)}
{/* <i className={`iconfont pr-[4px] ${menuItem.menuIcon}`}></i> */}
<span>
{intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })}
</span>

@ -18,7 +18,11 @@
padding: 0 32px;
color: rgba(0, 0, 0, 0.88);
line-height: 64px;
background: @primary_color;
background-color: @primary_color;
background-image: url('../../public/home/nav_bg.png');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
border-radius: 8px;
// box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
.home_logo {
@ -47,7 +51,7 @@
li {
height: 32px;
margin: 14px 0;
padding: 0 12px;
padding: 0 16px;
color: #fff;
font-size: 16px;
line-height: 32px;

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-22 15:23:36
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-07 13:26:50
* @LastEditTime: 2024-05-20 11:00:25
* @FilePath: \general-ai-platform-web\src\pages\Node\BusinessModel\index.tsx
* @Description:
* @
@ -127,7 +127,7 @@ const BusinessModel: React.FC = () => {
return (
<div className="businessModel_page gn_head_card">
<ProCard
className="gn_card_123 pb-[16px]"
className="gn_card_wrap pb-[16px]"
title={
<span className="head3">
<FormattedMessage id="business_model.table.title" defaultMessage="标题" />

@ -251,7 +251,7 @@ const DetailDeviceState: React.FC<DetailDeviceStateProps> = ({ info, detailOpen,
}
}}
>
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<Tabs
className="gn_tabs"
activeKey={tabKey}
@ -262,7 +262,7 @@ const DetailDeviceState: React.FC<DetailDeviceStateProps> = ({ info, detailOpen,
></Tabs>
{tabKey === '0' && (
<div>
<ProCard className="gn_card_123 bs_server_info_wrap" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap bs_server_info_wrap" bodyStyle={{ padding: 0 }}>
<ul>
<li className="pb-[8px]">
<p className="head4">

@ -52,7 +52,7 @@ const DetailDeviceStateLog: React.FC = () => {
];
return (
<div className="detailDeviceStateLog_wrap">
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ProTable
className="gn_pro_table"
cardProps={{

@ -260,7 +260,7 @@ const DetailServerState: React.FC<DetailServerStateProps> = ({ info, detailOpen,
}
}}
>
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<Tabs
className="gn_tabs"
activeKey={tabKey}
@ -271,7 +271,7 @@ const DetailServerState: React.FC<DetailServerStateProps> = ({ info, detailOpen,
></Tabs>
{tabKey === '0' && (
<div>
<ProCard className="gn_card_123 bs_server_info_wrap" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap bs_server_info_wrap" bodyStyle={{ padding: 0 }}>
<ul>
<li className="pb-[8px]">
<p className="head4">

@ -51,7 +51,7 @@ const DetailServerStateLog: React.FC = () => {
];
return (
<div className="detailServerStateLog_wrap">
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ProTable
className="gn_pro_table"
cardProps={{

@ -240,7 +240,7 @@ const DeviceSate: React.FC = () => {
</ProForm>
</div>
<ProCard className="gn_card_123 pb-[16px]">
<ProCard className="gn_card_wrap pb-[16px]">
<div className="bs_server_state_box">
<Tabs
className="gn_tabs"

@ -166,7 +166,7 @@ const BusinessState: React.FC = () => {
return (
<div className="flex-1 bs_server_state_page bs_state_page gn_head_card">
<ProCard className="gn_card_123 pb-[16px]">
<ProCard className="gn_card_wrap pb-[16px]">
<div className="bs_server_state_box">
<Tabs
className="gn_tabs"

@ -127,7 +127,7 @@ const ModelDeployConfig: React.FC<ModelDeployConfigProps> = ({ info, detailOpen,
okText={<FormattedMessage id="pages.modelForm.okText" defaultMessage="确认" />}
cancelText={<FormattedMessage id="pages.modelForm.cancelText" defaultMessage="取消" />}
>
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<div className="my-[8px] gn_active_descriptions gn_descriptions bg_active_4">
<ProDescriptions column={1} columns={detailColumns} dataSource={info}></ProDescriptions>
</div>

@ -3,10 +3,10 @@
/* 节点列表 */
/* 节点信息 */
}
.deviceGroup_page .dg_content .gn_card_123 {
.deviceGroup_page .dg_content .gn_card_wrap {
height: calc(100% - 8px);
}
.deviceGroup_page .node_list > .gn_card_123 {
.deviceGroup_page .node_list > .gn_card_wrap {
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15);
}
.deviceGroup_page .node_info {

@ -1,13 +1,13 @@
.deviceGroup_page {
height: calc(100vh - 92px);
.dg_content {
.gn_card_123 {
.gn_card_wrap {
height: calc(100% - 8px);
}
}
/* 节点列表 */
.node_list {
& > .gn_card_123 {
& > .gn_card_wrap {
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15);
}
}

@ -68,7 +68,7 @@ const DeviceGroup: React.FC = () => {
<div className="flex deviceGroup_page">
{/* 节点列表 */}
<div className="dg_content gn_head_card w-[300px] node_list">
<ProCard className="gn_card_123 pb-[16px]" title={<span className="head3"></span>}>
<ProCard className="gn_card_wrap pb-[16px]" title={<span className="head3"></span>}>
<div className="dg_tree_box">
<DeviceGroupTree
dataSource={deviceTreeList}
@ -94,7 +94,7 @@ const DeviceGroup: React.FC = () => {
{/* 节点信息 */}
<div className="flex-1 dg_content gn_head_card node_info">
<ProCard
className="gn_card_123 pb-[16px]"
className="gn_card_wrap pb-[16px]"
title={<span className="head3"></span>}
extra={
<Button

@ -186,6 +186,9 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
/>
<ProFormText
width={proFormSmallItemStyleProps.width}
fieldProps={{
prefix: <span>V</span>,
}}
name="name"
label={<FormattedMessage id="model_detail.version.form.name" defaultMessage="版本号" />}
placeholder={`${intl.formatMessage({
@ -255,20 +258,30 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
>
<ProFormUploadDragger
label={<span className="font-bold"></span>}
title={
<div className="gn_uploadfile_title py-[16px] text1 text-center">
<span></span>
<a></a>
</div>
}
description=""
icon={<i className="iconfont icon-shangchuanwenjian text_primary text-[32px]"></i>}
name="projectFilePath"
action="/api/v1/file/uploadFile"
max={1}
fieldProps={{
className: 'gn_proFormUploadDragger_formItem',
name: 'file',
// beforeUpload: beforeUploadFile,
data: { path: `models/${Date.now()}` },
headers: {
'X-CSRFToken': cookie.load('csrftoken'),
Authorization: `Bearer ${localStorage.getItem('access') || ''}`,
},
}}
/>
<div style={{ color: '#666666' }}>zip.tar.gz</div>
<div style={{ color: '#666666', marginTop: '-8px' }}>zip.tar.gz</div>
</StepsForm.StepForm>
{/* 参数配置 */}
<StepsForm.StepForm<{
@ -316,9 +329,18 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
width={proFormSmallItemStyleProps.width}
max={1}
label={<span className="font-bold"></span>}
title={
<div className="gn_uploadfile_title py-[16px] text1 text-center">
<span></span>
<a></a>
</div>
}
description=""
icon={<i className="iconfont icon-shangchuanwenjian text_primary text-[32px]"></i>}
value={fileList}
name="dragger"
fieldProps={{
className: 'gn_proFormUploadDragger_formItem',
onChange: handleFileChange,
onRemove: () => {
let index_ids = actionFormListRef.current?.getList()?.map((v, i) => {
@ -364,17 +386,19 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
},
}}
/>
<div style={{ color: '#666666', marginTop: '-8px', marginBottom: '16px' }}>
zip.tar.gz
</div>
{/* // TODO label字重与上面统一, 操作按钮需要与输入框对齐 */}
<ProFormList
name="params"
label={
<div>
{' '}
<span className="font-bold"></span>
<p style={{ color: '#666666' }}>
<div style={{ color: '#333333', padding: '8px 0 4px' }}>
~
</p>
</div>
</div>
}
actionRef={actionFormListRef}
@ -386,8 +410,8 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
{() => {
return (
<>
<ProFormText key="name" name="name" label="键名" />
<ProFormText key="default" name="default" label="默认值" />
<ProFormText width={268} key="name" name="name" label="键名" />
<ProFormText width={268} key="default" name="default" label="默认值" />
</>
);
}}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-08 10:36:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-16 14:02:17
* @LastEditTime: 2024-05-20 11:10:22
* @FilePath: \general-ai-manage\src\pages\Model\ModelDetail\index.tsx
* @Description:
* @
@ -86,6 +86,8 @@ const ModelDetail: React.FC = () => {
hideInSearch: true,
key: 'fixedName',
fixed: 'left',
width: '16%',
render: (dom, record) => (
<div>
<span>{dom}</span>
@ -93,8 +95,12 @@ const ModelDetail: React.FC = () => {
{record.isEnable && (
<span
style={{
marginLeft: 8,
padding: '2px 5px',
display: 'inline-block',
marginLeft: '4px',
width: '64px',
textAlign: 'center',
height: '24px',
lineHeight: '22px',
background: '#FFFFFF',
borderRadius: '20px',
color: '#154DDD',
@ -119,12 +125,13 @@ const ModelDetail: React.FC = () => {
),
dataIndex: 'path',
hideInSearch: true,
width: '40%',
width: '45%',
},
{
title: <FormattedMessage id="model_detail.version.table.list.size" defaultMessage="大小" />,
dataIndex: 'size',
hideInSearch: true,
width: '10%',
},
{
@ -213,7 +220,7 @@ const ModelDetail: React.FC = () => {
style={{ padding: 0, margin: 0, backgroundColor: 'transparent' }}
bodyStyle={{ padding: 0, margin: 0, backgroundColor: 'transparent' }}
>
<InnerPageBack title=""></InnerPageBack>
<InnerPageBack title="模型列表"></InnerPageBack>
<div className="gn_descriptions mb-[20px]">
<ProDescriptions
column={3}
@ -234,7 +241,7 @@ const ModelDetail: React.FC = () => {
</div>
<div className="gn_head_card" style={{ padding: 0 }}>
<ProCard
className="gn_card_123"
className="gn_card_wrap"
title={
<span className="head3">
<FormattedMessage
@ -259,7 +266,7 @@ const ModelDetail: React.FC = () => {
}
>
<div
style={{ height: 'calc(100vh - 350px)', overflowY: 'scroll', overflowX: 'hidden' }}
style={{ height: 'calc(100vh - 370px)', overflowY: 'scroll', overflowX: 'hidden' }}
>
<ProTable
className="gn_pro_table"

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-17 16:15:45
* @LastEditTime: 2024-05-20 13:25:17
* @FilePath: \general-ai-manage\src\pages\ModelIndex\ModelIndex.tsx
* @Description:
* @
@ -182,7 +182,7 @@ const ModelIndex: React.FC = () => {
}, [actionRef, querysData]);
return (
<div className="modelIndex_page home_container gn_table_card">
<div className="modelIndex_page home_container gn_table_card_wrap">
<ProCard
className="gn_card"
style={{ backgroundColor: 'white' }}
@ -254,7 +254,7 @@ const ModelIndex: React.FC = () => {
<FormattedMessage id="model_index.table.list.add" defaultMessage="New" />
</Button>
<Button
className="ml-[4px]"
className="ml-[12px]"
key="setIndustry"
onClick={() => {
setIndustryOpen(true);

@ -1,3 +1,4 @@
import { CommButton } from '@/components/Button';
import { getModelRuntimeLibFilesList } from '@/services/testApi/model';
import {
ModalForm,
@ -7,8 +8,9 @@ import {
ProFormTextArea,
} from '@ant-design/pro-components';
import { FormattedMessage, useIntl } from '@umijs/max';
import { Button, Form, message } from 'antd';
import { Form, message } from 'antd';
import React, { useState } from 'react';
import {
proFormSmallItemStyleProps,
proFormSmallModelWidth,
@ -146,9 +148,14 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
},
]}
/>
<Button
className="search_ip_port_btn"
style={{ marginTop: '30px' }}
<CommButton
style={{
width: '52px',
height: '32px',
marginTop: '30px',
borderRadius: '4px',
}}
onClick={() => {
const { ip, port } = form.getFieldsValue();
if (ip && port) {
@ -160,9 +167,8 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
console.log(form.getFieldsValue(), 'searchIP');
}}
>
</Button>
buttonLabel={<FormattedMessage id="pages.searchTable.search" defaultMessage="查询" />}
></CommButton>
</ProForm.Group>
{openFiles ? (
<ProFormSelect

@ -152,7 +152,7 @@ const ModelRuntimeLib: React.FC = () => {
},
];
return (
<div className="modelRuntimeLib_page home_container gn_table_card">
<div className="modelRuntimeLib_page home_container gn_table_card_wrap">
<ProCard
className="gn_card"
style={{ backgroundColor: 'white' }}

@ -106,7 +106,7 @@ const BusinessInfo: React.FC = () => {
<div className="businessInfo_page pb-[1px]">
<div className="gn_head_card mb-[20px]">
<ProCard
className="gn_card_123 pb-[16px]"
className="gn_card_wrap pb-[16px]"
title={<span className="head3"></span>}
extra={
<Button
@ -136,14 +136,14 @@ const BusinessInfo: React.FC = () => {
</div>
<div className="gn_head_card mb-[20px]">
<ProCard className="gn_card_123" title={<span className="head3"></span>}>
<ProCard className="gn_card_wrap" title={<span className="head3"></span>}>
<AccountPsw></AccountPsw>
</ProCard>
</div>
<div className="gn_head_card mb-[20px]">
<ProCard
className="gn_card_123 pb-[16px]"
className="gn_card_wrap pb-[16px]"
title={<span className="head3">({total})</span>}
>
<ProList<any>

Loading…
Cancel
Save