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

develop2
donghao 1 year ago
parent 967a6785e0
commit 8a56fb2946

@ -2,11 +2,10 @@
* @Author: donghao donghao@supervision.ltd * @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-27 14:56:27 * @Date: 2024-03-27 14:56:27
* @LastEditors: donghao donghao@supervision.ltd * @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 * @FilePath: \general-ai-manage\config\routes.ts
* @Description: * @Description:
*/ */
/** /**
* @name umi * @name umi
* @description path,component,routes,redirect,wrappers,name,icon * @description path,component,routes,redirect,wrappers,name,icon
@ -47,7 +46,7 @@ const modelRouteIndex = {
path: '/home/model-index', path: '/home/model-index',
component: './Model/ModelIndex', component: './Model/ModelIndex',
access: 'canReadMenu', access: 'canReadMenu',
menuIcon: 'icon-moxingliebiao-unselected', // menuIcon: 'icon-moxingliebiao-unselected',
key: 'model000', key: 'model000',
}; };
const subModelRoute = [ const subModelRoute = [
@ -56,7 +55,9 @@ const subModelRoute = [
path: '/home/model-index', path: '/home/model-index',
component: './Model/ModelIndex', component: './Model/ModelIndex',
access: 'canReadMenu', access: 'canReadMenu',
menuIcon: 'icon-moxingliebiao-unselected', // menuIcon: 'icon-moxingliebiao-unselected',
defaultIcon: 'modelListActiveIcon',
// activeIcon: modelListActiveIicon,
key: 'model001', key: 'model001',
rootMenuKey: 'model000', 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; color: #333333;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-style: normal; font-style: normal;
text-align: left;
text-transform: none; text-transform: none;
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
@ -122,7 +121,6 @@
color: #333333; color: #333333;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-style: normal; font-style: normal;
text-align: left;
text-transform: none; text-transform: none;
font-size: 14px; font-size: 14px;
font-family: PingFang SC-Medium; font-family: PingFang SC-Medium;
@ -132,7 +130,6 @@
color: #333333; color: #333333;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-style: normal; font-style: normal;
text-align: left;
text-transform: none; text-transform: none;
font-size: 12px; font-size: 12px;
line-height: 17px; line-height: 17px;
@ -150,6 +147,9 @@
} }
/* 重置ant组件 */ /* 重置ant组件 */
/* Button */ /* Button */
.ant-btn {
border-radius: 2px;
}
.ant-btn-primary, .ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover { .ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {
background-color: #154ddd; background-color: #154ddd;
@ -163,10 +163,12 @@
background: #ffffff; background: #ffffff;
border-color: #154ddd; border-color: #154ddd;
} }
.ant-pro-card-extra .ant-btn {
border-radius: 4px;
}
.gn_search_from .ant-btn { .gn_search_from .ant-btn {
padding: 4px 10px; padding: 4px 10px;
border: none; border: none;
border-radius: 2px;
} }
.gn_search_from .ant-btn-default { .gn_search_from .ant-btn-default {
color: #333333; color: #333333;
@ -174,12 +176,12 @@
border: none; border: none;
} }
.ant-tag { .ant-tag {
background: white;
height: 24px; height: 24px;
line-height: 22px; line-height: 22px;
padding-inline: 8px; background: white;
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
border-radius: 2px; border-radius: 2px;
padding-inline: 8px;
} }
.ant-form-item .ant-form-item-label > label { .ant-form-item .ant-form-item-label > label {
color: #333333; color: #333333;
@ -294,6 +296,7 @@
background: #ffffff; background: #ffffff;
border: 1px solid rgba(21, 77, 221, 0.1); border: 1px solid rgba(21, 77, 221, 0.1);
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 4px 8px 0px rgba(0, 79, 178, 0.15);
} }
.gn_descriptions .ant-descriptions-item-label { .gn_descriptions .ant-descriptions-item-label {
color: #333333; color: #333333;
@ -389,13 +392,13 @@
background: transparent; background: transparent;
} }
/* Card */ /* Card */
.gn_card_123 > .ant-pro-card-header { .gn_card_wrap > .ant-pro-card-header {
height: 54px; height: 54px;
margin: 0; margin: 0;
padding: 10px 16px; padding: 16px;
border-bottom: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
} }
.gn_card_123 > .ant-pro-card-body { .gn_card_wrap > .ant-pro-card-body {
margin: 0; margin: 0;
padding: 16px 16px 0; padding: 16px 16px 0;
} }
@ -404,15 +407,15 @@
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: 8px;
} }
.gn_table_card { .gn_table_card_wrap {
border-radius: 8px; border-radius: 8px;
} }
.gn_table_card .gn_card > .ant-pro-card-header { .gn_table_card_wrap .gn_card > .ant-pro-card-header {
margin: 0; margin: 0;
padding: 20px 16px; padding: 20px 16px;
border-bottom: 1px solid #e0e0e0; 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; margin: 0;
padding: 16px 16px 0; padding: 16px 16px 0;
} }
@ -471,7 +474,7 @@
margin: 0; margin: 0;
} }
.gn_model_steps_form .ant-steps { .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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item {
flex: auto; flex: auto;
@ -487,14 +490,17 @@
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: start;
margin: 8px 0; height: 56px;
padding: 0 16px;
} }
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-icon { .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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-content {
margin: 0; margin: 0;
margin-left: 8px;
text-align: left; text-align: left;
} }
.gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-title { .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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item .ant-steps-item-tail {
position: absolute; position: absolute;
top: auto; top: auto;
left: calc(100% - 30px); left: calc(100% - 12px - 16px);
width: 16px; width: 12px;
height: 16px; height: 12px;
margin: 0; margin: 0;
padding: 0; padding: 0;
background: url('../public/home/business_arrow_default.svg') no-repeat; 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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-finish {
background: #e5edff; 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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-finish .ant-steps-item-icon {
background-color: #154ddd; 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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-active .ant-steps-item-title {
color: #154ddd; 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 { .gn_model_steps_form .ant-modal-content .ant-modal-body .ant-steps .ant-steps-item-active .ant-steps-item-description {
color: #154ddd; color: #154ddd;
@ -554,6 +561,23 @@
background: url('../public/home/business_arrow.svg') no-repeat; background: url('../public/home/business_arrow.svg') no-repeat;
background-size: cover; 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 { .ant-table-wrapper .ant-table-pagination.ant-pagination {
margin: 0; margin: 0;
padding: 24px 0 !important; padding: 24px 0 !important;

@ -133,7 +133,7 @@
color: #333333; color: #333333;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-style: normal; font-style: normal;
text-align: left; // text-align: left;
text-transform: none; text-transform: none;
} }
.text1 { .text1 {
@ -168,8 +168,9 @@
} }
/* 重置ant组件 */ /* 重置ant组件 */
/* Button */ /* Button */
// .ant-btn { .ant-btn {
// } border-radius: 2px;
}
.ant-btn-primary, .ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover { .ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {
background-color: @primary_color; background-color: @primary_color;
@ -183,11 +184,16 @@
background: #ffffff; background: #ffffff;
border-color: @primary_color; border-color: @primary_color;
} }
// 卡片右侧按钮
.ant-pro-card-extra {
.ant-btn {
border-radius: 4px;
}
}
.gn_search_from { .gn_search_from {
.ant-btn { .ant-btn {
padding: 4px 10px; padding: 4px 10px;
border: none; border: none;
border-radius: 2px;
} }
.ant-btn-default { .ant-btn-default {
color: @text_color_1; color: @text_color_1;
@ -356,6 +362,7 @@
background: #ffffff; background: #ffffff;
border: 1px solid rgba(21, 77, 221, 0.1); border: 1px solid rgba(21, 77, 221, 0.1);
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 4px 8px 0px rgba(0, 79, 178, 0.15);
.ant-descriptions-item-label { .ant-descriptions-item-label {
color: @text_color_1; color: @text_color_1;
font-weight: bold; font-weight: bold;
@ -488,11 +495,11 @@
} }
/* Card */ /* Card */
.gn_card_123 { .gn_card_wrap {
& > .ant-pro-card-header { & > .ant-pro-card-header {
height: 54px; height: 54px;
margin: 0; margin: 0;
padding: 10px 16px; padding: 16px;
border-bottom: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
} }
& > .ant-pro-card-body { & > .ant-pro-card-body {
@ -505,7 +512,7 @@
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: 8px;
} }
.gn_table_card { .gn_table_card_wrap {
// padding: 0 24px; // padding: 0 24px;
border-radius: 8px; border-radius: 8px;
.gn_card { .gn_card {
@ -522,7 +529,6 @@
} }
} }
} }
/* Form */ /* Form */
// 通用表单 // 通用表单
.gn_form { .gn_form {
@ -588,7 +594,7 @@
margin: 0; margin: 0;
} }
.ant-steps { .ant-steps {
margin: 12px 0 20px; margin: 16px 0;
} }
// 步骤条 // 步骤条
.ant-modal-content .ant-modal-body .ant-steps { .ant-modal-content .ant-modal-body .ant-steps {
@ -606,15 +612,18 @@
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: start;
margin: 8px 0; height: 56px;
padding: 0 16px;
} }
.ant-steps-item-icon { .ant-steps-item-icon {
margin: 0 8px; margin: 0;
font-size: 16px;
} }
.ant-steps-item-content { .ant-steps-item-content {
margin: 0; margin: 0;
margin-left: 8px;
text-align: left; text-align: left;
} }
.ant-steps-item-title { .ant-steps-item-title {
@ -630,9 +639,9 @@
// display: none; // display: none;
position: absolute; position: absolute;
top: auto; top: auto;
left: calc(100% - 30px); left: calc(100% - 12px - 16px);
width: 16px; width: 12px;
height: 16px; height: 12px;
margin: 0; margin: 0;
padding: 0; padding: 0;
// background-color: red; // background-color: red;
@ -649,18 +658,18 @@
// 已完成 // 已完成
.ant-steps-item-finish { .ant-steps-item-finish {
background: #e5edff; background: #e5edff;
border: 1px solid #154ddd; border: 1px solid rgba(21, 77, 221, 0.1);
.ant-steps-item-icon { .ant-steps-item-icon {
background-color: #154ddd; background-color: @primary_color;
.ant-steps-icon { .ant-steps-icon {
color: white; color: white;
} }
} }
.ant-steps-item-title { .ant-steps-item-title {
color: #154ddd; color: @primary_color;
} }
.ant-steps-item-description { .ant-steps-item-description {
color: #154ddd; color: @primary_color;
} }
.ant-steps-item-tail { .ant-steps-item-tail {
background: url('../public/home/business_arrow.svg') no-repeat; background: url('../public/home/business_arrow.svg') no-repeat;
@ -670,17 +679,41 @@
// 当前选中 // 当前选中
.ant-steps-item-active { .ant-steps-item-active {
background: #e5edff; background: #e5edff;
border: 1px solid #154ddd; border: 1px solid @primary_color;
.ant-steps-item-title { .ant-steps-item-title {
color: #154ddd; color: @primary_color;
font-weight: bold;
} }
.ant-steps-item-description { .ant-steps-item-description {
color: #154ddd; color: @primary_color;
} }
.ant-steps-item-tail { .ant-steps-item-tail {
background: url('../public/home/business_arrow.svg') no-repeat; background: url('../public/home/business_arrow.svg') no-repeat;
background-size: cover; 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-face {
font-family: "iconfont"; font-family: 'iconfont';
/* Project id 4530966 */ /* 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'); 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 { .iconfont {
font-family: "iconfont" !important; font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-fuzhi:before { .icon-fuzhi:before {
content: "\e719"; content: '\e719';
} }
.icon-zip:before { .icon-zip:before {
content: "\e71a"; content: '\e71a';
} }
.icon-shangchuanwenjian:before { .icon-shangchuanwenjian:before {
content: "\e718"; content: '\e718';
} }
.icon-you:before { .icon-you:before {
content: "\e717"; content: '\e717';
} }
.icon-delete:before { .icon-delete:before {
content: "\e716"; content: '\e716';
} }
.icon-tianjiafenlei:before { .icon-tianjiafenlei:before {
content: "\e714"; content: '\e714';
} }
.icon-shanchufenlei:before { .icon-shanchufenlei:before {
content: "\e715"; content: '\e715';
} }
.icon-tianjiajiedian:before { .icon-tianjiajiedian:before {
content: "\e713"; content: '\e713';
} }
.icon-banbenxinxi:before { .icon-banbenxinxi:before {
content: "\e711"; content: '\e711';
} }
.icon-shiyonghangye:before { .icon-shiyonghangye:before {
content: "\e712"; content: '\e712';
} }
.icon-jiedianshezhi:before { .icon-jiedianshezhi:before {
content: "\e70f"; content: '\e70f';
} }
.icon-fuwuqizhuangtai:before { .icon-fuwuqizhuangtai:before {
content: "\e710"; content: '\e710';
} }
.icon-yewumoxing:before { .icon-yewumoxing:before {
content: "\e70b"; content: '\e70b';
} }
.icon-shouye:before { .icon-shouye:before {
content: "\e70c"; content: '\e70c';
} }
.icon-shebeizhuangtai:before { .icon-shebeizhuangtai:before {
content: "\e70d"; content: '\e70d';
} }
.icon-qiyexinxi:before { .icon-qiyexinxi:before {
content: "\e70e"; content: '\e70e';
} }
.icon-moxingliebiao-unselected:before { .icon-moxingliebiao-unselected:before {
content: "\e709"; content: '\e709';
} }
.icon-moxingyunhangku-selected:before { .icon-moxingyunhangku-selected:before {
content: "\e70a"; content: '\e70a';
} }
.icon-wen:before { .icon-wen:before {
content: "\e704"; content: '\e704';
} }
.icon-xia:before { .icon-xia:before {
content: "\e705"; content: '\e705';
} }
.icon-moxingliebiao-selected:before { .icon-moxingliebiao-selected:before {
content: "\e706"; content: '\e706';
} }
.icon-moxingyunhangku-unselected:before { .icon-moxingyunhangku-unselected:before {
content: "\e707"; content: '\e707';
} }
.icon-close:before { .icon-close:before {
content: "\e708"; content: '\e708';
} }
.icon-moxingshuliang:before { .icon-moxingshuliang:before {
content: "\e6fd"; content: '\e6fd';
} }
.icon-shebeishuliang:before { .icon-shebeishuliang:before {
content: "\e6fe"; content: '\e6fe';
} }
.icon-xinjian:before { .icon-xinjian:before {
content: "\e6ff"; content: '\e6ff';
} }
.icon-gengduo:before { .icon-gengduo:before {
content: "\e700"; content: '\e700';
} }
.icon-chuangjianshijian:before { .icon-chuangjianshijian:before {
content: "\e701"; content: '\e701';
} }
.icon-search:before { .icon-search:before {
content: "\e702"; content: '\e702';
} }
.icon-refresh:before { .icon-refresh:before {
content: "\e703"; content: '\e703';
} }

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

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

@ -18,7 +18,11 @@
padding: 0 32px; padding: 0 32px;
color: rgba(0, 0, 0, 0.88); color: rgba(0, 0, 0, 0.88);
line-height: 64px; 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; border-radius: 8px;
// box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05); // box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
.home_logo { .home_logo {
@ -47,7 +51,7 @@
li { li {
height: 32px; height: 32px;
margin: 14px 0; margin: 14px 0;
padding: 0 12px; padding: 0 16px;
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
line-height: 32px; line-height: 32px;

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd * @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-22 15:23:36 * @Date: 2024-04-22 15:23:36
* @LastEditors: donghao donghao@supervision.ltd * @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 * @FilePath: \general-ai-platform-web\src\pages\Node\BusinessModel\index.tsx
* @Description: * @Description:
* @ * @
@ -127,7 +127,7 @@ const BusinessModel: React.FC = () => {
return ( return (
<div className="businessModel_page gn_head_card"> <div className="businessModel_page gn_head_card">
<ProCard <ProCard
className="gn_card_123 pb-[16px]" className="gn_card_wrap pb-[16px]"
title={ title={
<span className="head3"> <span className="head3">
<FormattedMessage id="business_model.table.title" defaultMessage="标题" /> <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 <Tabs
className="gn_tabs" className="gn_tabs"
activeKey={tabKey} activeKey={tabKey}
@ -262,7 +262,7 @@ const DetailDeviceState: React.FC<DetailDeviceStateProps> = ({ info, detailOpen,
></Tabs> ></Tabs>
{tabKey === '0' && ( {tabKey === '0' && (
<div> <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> <ul>
<li className="pb-[8px]"> <li className="pb-[8px]">
<p className="head4"> <p className="head4">

@ -52,7 +52,7 @@ const DetailDeviceStateLog: React.FC = () => {
]; ];
return ( return (
<div className="detailDeviceStateLog_wrap"> <div className="detailDeviceStateLog_wrap">
<ProCard className="gn_card_123" bodyStyle={{ padding: 0 }}> <ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ProTable <ProTable
className="gn_pro_table" className="gn_pro_table"
cardProps={{ 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 <Tabs
className="gn_tabs" className="gn_tabs"
activeKey={tabKey} activeKey={tabKey}
@ -271,7 +271,7 @@ const DetailServerState: React.FC<DetailServerStateProps> = ({ info, detailOpen,
></Tabs> ></Tabs>
{tabKey === '0' && ( {tabKey === '0' && (
<div> <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> <ul>
<li className="pb-[8px]"> <li className="pb-[8px]">
<p className="head4"> <p className="head4">

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

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

@ -166,7 +166,7 @@ const BusinessState: React.FC = () => {
return ( return (
<div className="flex-1 bs_server_state_page bs_state_page gn_head_card"> <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"> <div className="bs_server_state_box">
<Tabs <Tabs
className="gn_tabs" className="gn_tabs"

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

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

@ -1,13 +1,13 @@
.deviceGroup_page { .deviceGroup_page {
height: calc(100vh - 92px); height: calc(100vh - 92px);
.dg_content { .dg_content {
.gn_card_123 { .gn_card_wrap {
height: calc(100% - 8px); height: calc(100% - 8px);
} }
} }
/* 节点列表 */ /* 节点列表 */
.node_list { .node_list {
& > .gn_card_123 { & > .gn_card_wrap {
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15); 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="flex deviceGroup_page">
{/* 节点列表 */} {/* 节点列表 */}
<div className="dg_content gn_head_card w-[300px] node_list"> <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"> <div className="dg_tree_box">
<DeviceGroupTree <DeviceGroupTree
dataSource={deviceTreeList} dataSource={deviceTreeList}
@ -94,7 +94,7 @@ const DeviceGroup: React.FC = () => {
{/* 节点信息 */} {/* 节点信息 */}
<div className="flex-1 dg_content gn_head_card node_info"> <div className="flex-1 dg_content gn_head_card node_info">
<ProCard <ProCard
className="gn_card_123 pb-[16px]" className="gn_card_wrap pb-[16px]"
title={<span className="head3"></span>} title={<span className="head3"></span>}
extra={ extra={
<Button <Button

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

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

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

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

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

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

Loading…
Cancel
Save