feat: 外层静态交互调整

develop2
donghao 12 months ago
parent b4a51cac7f
commit cd86b64789

@ -2,9 +2,9 @@
* @Author: zhoux zhouxia@supervision.ltd
* @Date: 2023-11-13 14:19:57
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-09 11:33:23
* @LastEditTime: 2024-05-13 10:20:45
* @FilePath: \general-ai-platform-web\config\defaultForm.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE2
* @Description:
*/
import { CloseCircleOutlined, CopyOutlined, DeleteOutlined } from '@ant-design/icons';

@ -4,7 +4,7 @@
* @LastEditors: zhoux zhouxia@supervision.ltd
* @LastEditTime: 2023-12-22 16:17:35
* @FilePath: \general-ai-platform-web\config\defaultIcon.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
* @Description:
*/
import { proFormItemStyleProps } from './defaultForm';

@ -2,9 +2,9 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-27 14:56:27
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-24 16:30:59
* @LastEditTime: 2024-05-13 10:23:57
* @FilePath: \general-ai-manage\config\defaultSettings.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
import { ProLayoutProps } from '@ant-design/pro-components';

@ -1,10 +1,10 @@
/*
* @Author: zhoux zhouxia@supervision.ltd
* @Date: 2023-12-26 15:51:09
* @LastEditors: zhoux zhouxia@supervision.ltd
* @LastEditTime: 2023-12-26 15:51:18
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-13 10:24:15
* @FilePath: \general-ai-platform-web\config\defaultStyle.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
export const flex: React.CSSProperties = {
display: 'flex',

@ -1,10 +1,10 @@
/*
* @Author: zhoux zhouxia@supervision.ltd
* @Date: 2023-11-13 11:32:26
* @LastEditors: zhoux zhouxia@supervision.ltd
* @LastEditTime: 2023-11-21 13:36:39
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-13 10:24:31
* @FilePath: \general-ai-platform-web\config\defaultTable.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
import { PaginationProps } from 'antd';
// 通用列表配置

@ -4,7 +4,7 @@
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-19 16:51:36
* @FilePath: \general-ai-manage\config\proxy.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
/**
* @name

@ -2,9 +2,9 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-27 14:56:27
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-10 13:41:47
* @LastEditTime: 2024-05-13 15:32:09
* @FilePath: \general-ai-manage\config\routes.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
/**
@ -46,6 +46,7 @@ const modelRouteIndex = {
path: '/home/model-index',
component: './Model/ModelIndex',
access: 'canReadMenu',
menuIcon: 'icon-moxingliebiao-unselected',
key: 'model001',
};
const subModelRoute = [
@ -55,6 +56,7 @@ const subModelRoute = [
component: './Model/ModelRuntimeLib',
access: 'canReadMenu',
key: 'model002',
menuIcon: 'icon-moxingyunhangku-unselected',
level: 2,
},
{

@ -136,6 +136,29 @@
text-align: left;
text-transform: none;
}
/* 重置ant组件 */
/* Button */
.gn_search_from .ant-btn {
border: none;
border-radius: 2px;
}
.gn_search_from .ant-btn-default {
color: #333333;
background: #f5f5f5;
border: none;
}
.ant-form-item .ant-form-item-label > label {
color: #333333;
}
.ant-form-item .ant-input-affix-wrapper {
color: #333333;
}
.ant-form-item .ant-input::placeholder {
color: #cccccc;
}
.ant-form-item .anticon {
color: #cccccc !important;
}
/* 自定义组件 */
.gn_list_card_title {
display: flex;

@ -151,6 +151,37 @@
text-align: left;
text-transform: none;
}
/* 重置ant组件 */
/* Button */
// .ant-btn {
// }
.gn_search_from {
.ant-btn {
border: none;
border-radius: 2px;
}
.ant-btn-default {
color: @text_color_1;
background: #f5f5f5;
border: none;
}
}
// 通用表单
.ant-form-item {
.ant-form-item-label > label {
color: @text_color_1;
}
.ant-input-affix-wrapper {
color: @text_color_1;
}
.ant-input::placeholder {
color: @gray_color_1;
}
.anticon {
color: @gray_color_1 !important;
}
}
/* 自定义组件 */
// 列表下卡片标题
@ -214,6 +245,7 @@
}
}
}
// 卡片下标签
.gn_card_tag {
padding: 2px 4px;

@ -57,10 +57,6 @@ ol {
margin-bottom: 0 !important;
padding: 0 !important;
}
.gn .ant-pro-checkcard-content {
padding-inline: 0;
padding-block: 0;
}
/* 单行显示的搜索表单 */
.single-search-form-item .ant-form-item {
margin-bottom: 0;
@ -212,6 +208,14 @@ ol {
.gn_pro_table .ant-pro-table-list-toolbar-container {
padding: 0;
}
.gn_pro_list .ant-pro-checkcard {
border: none !important;
background: transparent;
}
.gn_pro_list .ant-pro-checkcard-content {
padding-inline: 0;
padding-block: 0;
}
/* 主题样式 */
.ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {

@ -70,21 +70,14 @@ ol {
padding: 0 !important;
}
.gn {
.ant-pro-checkcard-content {
padding-inline: 0;
padding-block: 0;
}
}
/* 单行显示的搜索表单 */
.single-search-form-item {
.ant-form-item {
margin-bottom: 0;
}
}
/* Card */
/* Card */
.gn_card {
& > .ant-pro-card-header {
height: 54px;
@ -104,7 +97,7 @@ ol {
border-radius: 8px;
}
/* Form */
// 通用表单
.gn_form {
.ant-form-item {
margin-bottom: 16px;
@ -114,6 +107,7 @@ ol {
gap: 0px 12px !important;
}
}
.gn_modal_form {
margin-top: 16px;
}
@ -264,6 +258,18 @@ ol {
}
}
.gn_pro_list {
.ant-pro-checkcard {
background: transparent;
border: none !important;
}
.ant-pro-checkcard-content {
padding-inline: 0;
padding-block: 0;
}
}
/* 主题样式 */
.ant-btn-primary,
.ant-btn-primary:not(:disabled):not(.ant-btn-disabled):hover {

@ -1,7 +1,7 @@
@font-face {
font-family: "iconfont";
/* Project id 4530966 */
src: url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff2?t=1715311346156') format('woff2'), url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff?t=1715311346156') format('woff'), url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.ttf?t=1715311346156') format('truetype');
src: url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff2?t=1715586941725') format('woff2'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff?t=1715586941725') format('woff'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.ttf?t=1715586941725') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;

@ -1,8 +1,8 @@
@font-face {
font-family: 'iconfont'; /* Project id 4530966 */
src: url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff2?t=1715311346156') format('woff2'),
url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.woff?t=1715311346156') format('woff'),
url('//at.alicdn.com/t/c/font_4530966_1jxithnpibx.ttf?t=1715311346156') format('truetype');
src: url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff2?t=1715586941725') format('woff2'),
url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff?t=1715586941725') format('woff'),
url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.ttf?t=1715586941725') format('truetype');
}
.iconfont {

@ -1,6 +1,9 @@
.homeLayout_wrap {
/* 导航栏 */
}
.homeLayout_wrap .home_nav_action {
color: white;
}
.homeLayout_wrap .ant-layout {
background: #f8fafd;
}
@ -51,3 +54,21 @@
border-radius: 16px;
opacity: 1 !important;
}
.sub_menu_box .sub_menu_item {
height: 32px;
cursor: pointer;
line-height: 32px;
background: #ffffff;
border: 1px solid #dcdcdc;
}
.sub_menu_box .sub_menu_item:first-child {
border-radius: 4px 0px 0px 4px;
}
.sub_menu_box .sub_menu_item:nth-child(2) {
border-radius: 0px 4px 4px 0px;
}
.sub_menu_box .activeMenu {
background: rgba(21, 77, 221, 0.1);
border: 1px solid #154ddd;
color: #154DDD;
}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 15:25:23
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-24 16:31:35
* @LastEditTime: 2024-05-13 15:41:26
* @FilePath: \general-ai-manage\src\layouts\HomeLayout.tsx
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -12,7 +12,7 @@ import { AvatarDropdown, AvatarName } from '@/components';
import { useModel } from '@@/exports';
import { SettingDrawer } from '@ant-design/pro-components';
import { Outlet, history, useIntl, useLocation } from '@umijs/max';
import { ConfigProvider, Layout, Radio, theme } from 'antd';
import { ConfigProvider, Layout, theme } from 'antd';
import React, { useEffect, useState } from 'react';
// public/home/logo.svg
@ -170,33 +170,59 @@ const HomeLayout: React.FC = () => {
{/* 二级菜单 */}
{/* //TODO 按UI图调整二级菜单栏效果 */}
{currRoute?.subMenu && !currRoute?.isHideMenu && (
<Radio.Group
className="mx-[32px] mb-[12px]"
defaultValue={currRoute?.path}
buttonStyle="solid"
>
{currRoute.subMenu.map((menuItem) => {
<div className="mx-[32px] mb-[12px] flex sub_menu_box">
{currRoute.subMenu.map((menuItem, index) => {
return menuItem?.isHideMenu ? (
<></>
<span key={index}></span>
) : (
<Radio.Button
<div
value={menuItem.path}
key={menuItem.key}
key={index}
onClick={() => tabRouter(menuItem)}
className={[currRoute?.path === menuItem.path ? 'activeMenu' : '']}
className={`sub_menu_item ${
currRoute?.path === menuItem.path ? 'activeMenu' : 'text_color_2'
}`}
>
<div className="flex justify-center items-center w-[120px]">
<div
className="mr-[4px]"
style={{ width: 14, height: 14, background: 'white' }}
></div>
{intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })}
{currRoute?.isHideMenu}
<i className={`iconfont pr-[4px] ${menuItem.menuIcon}`}></i>
<span>
{intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })}
</span>
</div>
</Radio.Button>
</div>
);
})}
</Radio.Group>
</div>
// <Radio.Group
// className="mx-[32px] mb-[12px]"
// defaultValue={currRoute?.path}
// buttonStyle="solid"
// >
// {currRoute.subMenu.map((menuItem) => {
// return menuItem?.isHideMenu ? (
// <></>
// ) : (
// <Radio.Button
// value={menuItem.path}
// key={menuItem.key}
// onClick={() => tabRouter(menuItem)}
// className={[currRoute?.path === menuItem.path ? 'activeMenu' : '']}
// >
// <div className="flex justify-center items-center w-[120px]">
// <div
// className="mr-[4px]"
// style={{ width: 14, height: 14}}
// >
// <i className="iconfont icon-moxingliebiao-selected"></i>
// </div>
// {intl.formatMessage({ id: `menu.${menuItem.name}`, defaultMessage: '$$$' })}
// {currRoute?.isHideMenu}
// </div>
// </Radio.Button>
// );
// })}
// </Radio.Group>
)}
<Content>
<div className="home-layout-content">

@ -2,6 +2,9 @@
.homeLayout_wrap {
// padding-top: 24px;
// background: red;
.home_nav_action {
color: white;
}
.ant-layout {
background: #f8fafd;
}
@ -61,3 +64,29 @@
}
}
}
.sub_menu_box {
// border-radius: 4px;
.sub_menu_item {
height: 32px;
line-height: 32px;
background: #ffffff;
border: 1px solid #dcdcdc;
cursor: pointer;
// border-radius: 4px;
&:first-child {
border-radius: 4px 0px 0px 4px;
}
&:nth-child(2) {
border-radius: 0px 4px 4px 0px;
// border: 1px solid red;
}
}
.activeMenu {
color: #154ddd;
background: rgba(21, 77, 221, 0.1);
border: 1px solid #154ddd;
}
}

@ -2,9 +2,9 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-01 11:20:09
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-09 15:22:39
* @LastEditTime: 2024-05-13 10:25:25
* @FilePath: \uighur-recognition-web2\src\locales\zh-CN.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
import * as alarms from './zh-CN/alarm';
import * as businessProject from './zh-CN/businessProject';

@ -2,12 +2,12 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-09 15:08:13
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-24 16:46:08
* @LastEditTime: 2024-05-13 15:20:28
* @FilePath: \general-ai-manage\src\locales\zh-CN\businessProject.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description:
*/
// 企业项目列表
export const business_project_list: { [key: string]: string } = {
export const business_list: { [key: string]: string } = {
'business.list.table.createForm.add': '新建企业项目',
'business.list.table.form.name': '公司全称',
'business.list.table.form.rule.required.name': '请填写公司全称',
@ -27,6 +27,10 @@ export const business_project_list: { [key: string]: string } = {
'business.list.table.form.rule.required.remark': '请填写简介',
'business.list.table.form.logo': '企业logo',
'business.list.table.form.rule.required.logo': '请上传企业logo',
'business.list.table.action.edit': '资料编辑',
'business.list.table.action.destroy': '删除项目',
'business.list.table.searchForm.name': '企业名称',
};
// 企业信息主页

@ -315,6 +315,7 @@ const DetailDeviceState: React.FC<DetailDeviceStateProps> = ({ info, detailOpen,
</p>
<div className="pt-[8px]">
<ProList<{ title: string }>
className="gn_pro_list"
itemLayout="vertical"
itemCardProps={{
ghost: true,

@ -324,6 +324,7 @@ const DetailServerState: React.FC<DetailServerStateProps> = ({ info, detailOpen,
</p>
<div className="pt-[8px]">
<ProList<{ title: string }>
className="gn_pro_list"
itemLayout="vertical"
itemCardProps={{
ghost: true,

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-22 15:23:36
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-10 14:44:54
* @LastEditTime: 2024-05-13 10:44:03
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\components\detailServerStateLog.tsx
* @Description:
* @
@ -61,7 +61,7 @@ const DetailServerStateLog: React.FC = () => {
search={false}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="key"
rowKey="id"
pagination={{
...proTablePaginationOptions,
pageSize: currentPageSize,
@ -80,9 +80,7 @@ const DetailServerStateLog: React.FC = () => {
let resp = await getServerStateLogList({ ...reqParams });
console.log(resp, 'getServerStateLogList_resp');
return {
data: resp.data?.results.map((v: Record<string, any>) => {
return { ...v, key: v.id };
}),
data: resp.data?.results,
success: resp.success,
total: resp.data.count,
current: current,

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-05-10 10:47:45
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-10 14:57:18
* @LastEditTime: 2024-05-13 16:13:55
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\deviceSate.tsx
* @Description:
* @
@ -176,6 +176,7 @@ const DeviceSate: React.FC = () => {
<div className="flex-1 bs_server_state_page bs_state_page gn_head_card">
<div className="gn_table_query_filter">
<ProForm
className="gn_search_from"
form={form}
layout="horizontal"
submitter={{
@ -251,7 +252,7 @@ const DeviceSate: React.FC = () => {
}}
></Tabs>
<ProList<any>
className="gn"
className="gn_pro_list"
ghost={true}
rowKey={'id'}
itemCardProps={{

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-05-07 13:38:03
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-10 13:39:39
* @LastEditTime: 2024-05-13 11:30:19
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\index.tsx
* @Description: businessStatebs
* @
@ -188,7 +188,7 @@ const BusinessState: React.FC = () => {
></CommButton>
</div>
<ProList<any>
className="gn"
className="gn_pro_list"
ghost={true}
rowKey={'id'}
itemCardProps={{

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-30 10:02:29
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-10 16:41:37
* @LastEditTime: 2024-05-13 10:44:10
* @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\modelDeploy.tsx
* @Description:
* @
@ -145,7 +145,7 @@ const ModelDeploy: React.FC = () => {
scroll={{ y: proTableCommonOptions.commscrollY }}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="key"
rowKey="id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
// let CategoryFkIdIds: any = data.map((v) => {
@ -171,9 +171,7 @@ const ModelDeploy: React.FC = () => {
let resp = await getBusinessModelList({ ...reqParams });
console.log(resp, 'getModelVersionList_resp');
return {
data: resp.data?.results.map((v: Record<string, any>) => {
return { ...v, key: v.id };
}),
data: resp.data?.results,
success: resp.success,
total: resp.data.count,
current: current,

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-30 10:02:29
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-06 16:18:40
* @LastEditTime: 2024-05-13 10:44:23
* @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\modelSetting.tsx
* @Description:
* @
@ -139,7 +139,7 @@ const ModelSetting: React.FC<ModelSettingProps> = () => {
// 标题栏
search={false}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
rowKey="key"
rowKey="id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
}}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-08 10:36:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-07 13:28:53
* @LastEditTime: 2024-05-13 10:44:32
* @FilePath: \general-ai-manage\src\pages\Model\ModelDetail\index.tsx
* @Description:
* @
@ -253,7 +253,7 @@ const ModelDetail: React.FC = () => {
scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="key"
rowKey="id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
// let CategoryFkIdIds: any = data.map((v) => {
@ -279,9 +279,7 @@ const ModelDetail: React.FC = () => {
let resp = await getModelVersionList({ ...reqParams });
console.log(resp, 'getModelVersionList_resp');
return {
data: resp.data?.results.map((v: Record<string, any>) => {
return { ...v, key: v.id };
}),
data: resp.data?.results,
success: resp.success,
total: resp.data.count,
current: current,

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-09 10:25:13
* @LastEditTime: 2024-05-13 16:11:46
* @FilePath: \general-ai-manage\src\pages\ModelIndex\ModelIndex.tsx
* @Description:
* @
@ -192,6 +192,7 @@ const ModelIndex: React.FC = () => {
headerTitle={
<div className="gn_table_query_filter">
<ProForm
className="gn_search_from"
form={form}
layout="horizontal"
submitter={{
@ -201,13 +202,17 @@ const ModelIndex: React.FC = () => {
type="primary"
htmlType="submit"
prevIcon={<SearchIcon />}
buttonLabel="查询"
buttonLabel={
<FormattedMessage id="pages.searchTable.search" defaultMessage="查询" />
}
></CommButton>
<CommButton
style={{ marginLeft: 12 }}
htmlType="button"
prevIcon={<ResetIcon />}
buttonLabel="重置"
buttonLabel={
<FormattedMessage id="pages.searchTable.reset" defaultMessage="重置" />
}
onClick={() => {
form.resetFields(); // 点击重置按钮时重置表单数据
setQuerysData(() => {}); // 清空筛选项
@ -273,7 +278,7 @@ const ModelIndex: React.FC = () => {
scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="key"
rowKey="id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
// let CategoryFkIdIds: any = data.map((v) => {
@ -305,9 +310,7 @@ const ModelIndex: React.FC = () => {
}
let resp = await getModelList({ ...reqParams, ...querysData });
return {
data: resp.data.results.map((v: Record<string, any>) => {
return { ...v, key: v.id };
}),
data: resp.data.results,
success: resp.success,
total: resp.data.count,
current: current,

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-08 10:36:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-07 13:29:08
* @LastEditTime: 2024-05-13 16:22:29
* @FilePath: \general-ai-manage\src\pages\Model\ModelRuntimeLib\index.tsx
* @Description:
* @
@ -128,7 +128,7 @@ const ModelRuntimeLib: React.FC = () => {
type="link"
size="small"
onClick={() => {
setUpdateModalOpen(true);
// setUpdateModalOpen(true);
setCurrentRow(record);
}}
>
@ -162,6 +162,7 @@ const ModelRuntimeLib: React.FC = () => {
headerTitle={
<div className="gn_table_query_filter">
<ProForm
className="gn_search_from"
form={form}
layout="horizontal"
submitter={{
@ -171,13 +172,17 @@ const ModelRuntimeLib: React.FC = () => {
type="primary"
htmlType="submit"
prevIcon={<SearchIcon />}
buttonLabel="查询"
buttonLabel={
<FormattedMessage id="pages.searchTable.search" defaultMessage="查询" />
}
></CommButton>
<CommButton
style={{ marginLeft: 12 }}
htmlType="button"
prevIcon={<ResetIcon />}
buttonLabel="重置"
buttonLabel={
<FormattedMessage id="pages.searchTable.reset" defaultMessage="重置" />
}
onClick={() => {
form.resetFields(); // 点击重置按钮时重置表单数据
setQuerysData(() => {}); // 清空筛选项
@ -234,7 +239,7 @@ const ModelRuntimeLib: React.FC = () => {
scroll={{ y: proTableCommonOptions.commscrollY, x: proTableCommonOptions.commscrollX }}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="key"
rowKey="id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
// let CategoryFkIdIds: any = data.map((v) => {
@ -266,9 +271,7 @@ const ModelRuntimeLib: React.FC = () => {
}
let resp = await getModelRuntimeLibList({ ...reqParams, ...querysData });
return {
data: resp.data.results.map((v: Record<string, any>) => {
return { ...v, key: v.id };
}),
data: resp.data.results,
success: resp.success,
total: resp.data.count,
current: current,

@ -148,7 +148,7 @@ const BusinessInfo: React.FC = () => {
title={<span className="head3">({total})</span>}
>
<ProList<any>
className="gn"
className="gn_pro_list"
ghost={true}
itemCardProps={{
ghost: true,

@ -25,17 +25,17 @@ const BusinessCard: React.FC<BusinessCardProps> = ({ info, renderActions }) => {
const { setStoreBusinessInfo } = useBusinessInfo();
return (
<div
className="w-full bp_card_box"
className="w-full bp_card_box text_color_1"
onClick={() => {
setStoreBusinessInfo(info);
history.push(`/business/index?id=${info.id}`);
console.log('跳转企业');
}}
>
<div className="flex justify-between items-center pt-[8px]">
<div className="tag_box">
<div className="bg_tag_info single_line">{info?.industryName}</div>
</div>
<div className="tag_box">
<div className="bg_tag_info single_line">{info?.industryName}</div>
</div>
<div className="flex justify-end items-center pt-[8px]">
<span className="pr-[14px]">
<TableActionCard renderActions={renderActions} maxActionCount={1}></TableActionCard>
</span>
@ -48,7 +48,7 @@ const BusinessCard: React.FC<BusinessCardProps> = ({ info, renderActions }) => {
<span>{info.name}</span>
</div>
<ul className="main_info mt-[8px]">
<ul className="main_info mt-[8px] ">
<li className="flex items-center">
<span className="icon_box mr-[4px]">
<ModelCountIcon></ModelCountIcon>

@ -46,26 +46,38 @@
background: url('../../../../public/home/business_card.png') no-repeat;
background-size: cover;
border-radius: 4px;
overflow: visible;
position: relative;
border: 10px solid transparent;
/* 新建 */
/* 卡片内容 */
}
.businessProject_page .bp_card_box .ant-dropdown .ant-dropdown-menu,
.businessProject_page .bp_card_box .ant-dropdown-menu-submenu .ant-dropdown-menu {
background: rgba(0, 0, 0, 0.75);
color: #fff;
}
.businessProject_page .bp_card_box .plus_icon {
width: 32px;
height: 32px;
margin-bottom: 16px;
}
.businessProject_page .bp_card_box .tag_box {
position: absolute;
color: white;
font-size: 12px;
top: 8px;
margin-left: -6px;
width: 100px;
}
.businessProject_page .bp_card_box .tag_box .bg_tag_info {
top: 0;
left: 8px;
top: 10px;
left: -19px;
z-index: 999999;
width: 76px;
height: 29px;
text-align: center;
line-height: 24px;
text-align: center;
background: url('../../../../public/home/business_tag.svg') no-repeat;
background-size: contain;
}
@ -86,7 +98,6 @@
height: 16px;
}
.businessProject_page .bp_card_box .main_info .label_box {
color: #000000;
font-size: 14px;
line-height: 22px;
}

@ -45,10 +45,19 @@
}
/* 列表展示 & businessCard 组件样式 */
.bp_card_box {
position: relative;
min-height: 194px;
overflow: visible;
background: url('../../../../public/home/business_card.png') no-repeat;
background-size: cover;
border: 10px solid transparent;
border-radius: 4px;
.ant-dropdown .ant-dropdown-menu,
.ant-dropdown-menu-submenu .ant-dropdown-menu {
color: #fff;
background: rgba(0, 0, 0, 0.75);
}
/* 新建 */
.plus_icon {
width: 32px;
@ -57,13 +66,16 @@
}
/* 卡片内容 */
.tag_box {
// position: absolute;
position: absolute;
top: 8px;
width: 100px;
// background-color: red;
margin-left: -6px;
color: white;
font-size: 12px;
// left: -6px;
.bg_tag_info {
top: 0;
left: 8px;
top: 10px;
left: -19px;
z-index: 999999;
width: 76px;
height: 29px;
@ -91,7 +103,6 @@
height: 16px;
}
.label_box {
color: #000000;
font-size: 14px;
line-height: 22px;
}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-24 14:47:04
* @LastEditTime: 2024-05-13 16:13:22
* @FilePath: \general-ai-manage\src\pages\BusinessProject\BusinessProject.tsx
* @Description:
* @
@ -13,7 +13,7 @@
* # logobase64
*
*/
import { CommButton } from '@/components/Button';
import { CommButton, TextButton } from '@/components/Button';
import { isSuccessApi } from '@/utils/forApi';
import { ReactComponent as BusinessBannerLogo } from '/public/home/business_banner_logo.svg';
import { ReactComponent as BusinessHeader1 } from '/public/home/business_header_1.svg';
@ -26,11 +26,10 @@ import { ReactComponent as SearchIcon } from '/public/home/search_icon.svg';
// device_count_icon model_count_icon
import IsDelete from '@/components/TableActionCard/isDelete';
import { getBusinessProject } from '@/services/testApi/businessProject';
import { EditOutlined, SearchOutlined } from '@ant-design/icons';
import { SearchOutlined } from '@ant-design/icons';
import { ProCard, ProForm, ProFormText, ProList } from '@ant-design/pro-components';
import { FormattedMessage } from '@umijs/max';
import { FormattedMessage, useIntl } from '@umijs/max';
import React, { useEffect, useState } from 'react';
import { proIconForTableActionStyle } from '../../../../config/defaultIcon';
import BusinessCard from './components/businessCard';
import CreateForm from './components/createForm';
import './index.less';
@ -61,6 +60,8 @@ const headerItems: headerItemsProps[] = [
const BusinessProject: React.FC = () => {
/**state */
const intl = useIntl();
const [businessProjectList, setBusinessProjectList] = useState<Record<string, any>[]>([]); // 列表数据
const [querysData, setQuerysData] = useState<Record<string, any>>({}); // 列表查询参数
const [createModalOpen, setCreateModalOpen] = useState<boolean>(false); // 创建新增窗口是否打开
@ -101,7 +102,6 @@ const BusinessProject: React.FC = () => {
<BusinessCard
info={item}
renderActions={[
// TODO 统一调整样式 按 UI效果
{
key: 'update',
renderDom: (
@ -113,14 +113,17 @@ const BusinessProject: React.FC = () => {
setCurrentRow(record);
}}
>
<EditOutlined
key="update"
style={{
color: 'rgba(21, 77, 221, 1)',
...proIconForTableActionStyle,
}}
/>
<span></span>
<TextButton
fontSize={12}
buttonLabel={
<span className="text-white">
<FormattedMessage
id="business.list.table.action.edit"
defaultMessage="编辑"
/>
</span>
}
></TextButton>
</div>
),
},
@ -129,8 +132,22 @@ const BusinessProject: React.FC = () => {
renderDom: (
<div className="action_item_box">
<IsDelete
buttonType="deleteIcon"
deleteNextText="删除项目"
deleteNextText={
<FormattedMessage id="pages.searchTable.destroy" defaultMessage="删除" />
}
buttonRender={
<TextButton
fontSize={12}
buttonLabel={
<span className="text-white">
<FormattedMessage
id="business.list.table.action.destroy"
defaultMessage="删除"
/>
</span>
}
></TextButton>
}
deleteApi={() => {
// TODO 调用删除接口
// handleDestroy(record).then(() => {});
@ -172,7 +189,7 @@ const BusinessProject: React.FC = () => {
<li className="flex items-center" key={index}>
<span className="info_icon">{item.icon}</span>
<div className="info_body">
<p>{item.title}</p>
<p className="text_color_2">{item.title}</p>
<span>{item.count}</span>
</div>
</li>
@ -189,6 +206,7 @@ const BusinessProject: React.FC = () => {
>
<div className="gn_table_query_filter">
<ProForm
className="gn_search_from"
form={form}
layout="horizontal"
submitter={{
@ -198,13 +216,17 @@ const BusinessProject: React.FC = () => {
type="primary"
htmlType="submit"
prevIcon={<SearchIcon />}
buttonLabel="查询"
buttonLabel={
<FormattedMessage id="pages.searchTable.search" defaultMessage="查询" />
}
></CommButton>
<CommButton
style={{ marginLeft: 12 }}
htmlType="button"
prevIcon={<ResetIcon />}
buttonLabel="重置"
buttonLabel={
<FormattedMessage id="pages.searchTable.reset" defaultMessage="重置" />
}
onClick={() => {
form.resetFields(); // 点击重置按钮时重置表单数据
setQuerysData(() => {}); // 清空筛选项
@ -221,7 +243,9 @@ const BusinessProject: React.FC = () => {
}}
>
<ProFormText
label="企业名称"
label={
<FormattedMessage id="business.list.table.searchForm.name" defaultMessage="名称" />
}
labelClassName="label_set_1"
fieldProps={{
style: {
@ -230,12 +254,18 @@ const BusinessProject: React.FC = () => {
prefix: <SearchOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
}}
name="name"
placeholder="请输入企业名称"
placeholder={`${intl.formatMessage({
id: 'common.please_input',
defaultMessage: '$$$',
})}${intl.formatMessage({
id: 'business.list.table.searchForm.name',
defaultMessage: '$$$',
})}`}
/>
</ProForm>
</div>
<ProList<any>
className="gn"
className="gn_pro_list"
ghost={true}
itemCardProps={{
ghost: true,

Loading…
Cancel
Save