fix: ui反馈问题调整

develop2
donghao 7 months ago
parent 3090ffa557
commit 3c24c51993

@ -2,11 +2,12 @@
* @Author: zhoux zhouxia@supervision.ltd
* @Date: 2023-11-13 11:32:26
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-07-16 10:37:54
* @LastEditTime: 2024-07-22 11:35:44
* @FilePath: \general-ai-platform-web\config\defaultTable.ts
* @Description:
*/
import { PaginationProps } from 'antd';
import { Empty, PaginationProps } from 'antd';
import emptyIcon from '/public/icons/noneData.png';
// 通用列表配置
export const proTableCommonOptions: Record<string, any> = {
scrollX: 'max-content', // 保证左右侧列的固定,并能保证没列标题不换行
@ -32,6 +33,17 @@ export const proTablePaginationOptions: PaginationProps = {
// pageSizeOptions: ['5', '10', '20', '500'], // 每页条数选项
};
// ProTabel ProList 默认值
export const proTableDefaultOptions: Record<string, any> = {
locale: {
emptyText: (
<div className="h-full" style={{ padding: '10px 0' }}>
<Empty style={{ margin: '50px 0' }} image={emptyIcon} description="暂无数据~" />
</div>
),
},
};
// 默认索引列配置
// export const proTableIndexColumnOptions : ProColumns = {
// title: '序号',

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -12,20 +12,20 @@
padding-inline: 0 !important;
}
.app_page_wrap .page_body {
width: calc(100vw - 200px);
width: calc(100vw - 202px);
}
.app_page_wrap .page_body .body_nav_bar {
position: fixed;
top: 0;
right: 0;
z-index: 999;
width: calc(100vw - 200px);
width: calc(100vw - 202px);
min-width: 100px;
height: 64px;
background-color: white;
}
.app_page_wrap .page_body .body_nav_bar .body_nav_bar_inner {
padding: 8px 24px;
padding: 12px 24px;
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15);
}
.app_page_wrap .page_body .body_nav_bar .avatar_box > img {
width: 40px;

@ -12,20 +12,20 @@
padding-inline: 0 !important;
}
.page_body {
width: calc(100vw - 200px);
width: calc(100vw - 202px);
.body_nav_bar {
position: fixed;
top: 0;
right: 0;
z-index: 999;
width: calc(100vw - 200px);
width: calc(100vw - 202px);
min-width: 100px;
height: 64px;
// height: 64px;
// padding: 0 24px ;
background-color: white;
.body_nav_bar_inner {
// border-radius: 6px;
padding: 8px 24px;
padding: 12px 24px;
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15);
}
// background-color: #f8fafd;
.avatar_box {

@ -185,6 +185,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) =
// unAccessible: <div>unAccessible</div>,
// 增加一个 loading 的状态
childrenRender: (children) => {
//
// if (initialState?.loading) return <PageLoading />;
return (
<div className="flex app_page_wrap">

@ -645,3 +645,10 @@
.gn_scroll_list_wrap .ant-list .ant-list-pagination {
margin: 8px 0;
}
.ant-empty .ant-empty-description {
color: #999;
}
:where(.css-dev-only-do-not-override-1okl62o).ant-table-wrapper .ant-table-tbody > tr > th,
:where(.css-dev-only-do-not-override-1okl62o).ant-table-wrapper .ant-table-tbody > tr > td {
border-bottom: 0;
}

@ -785,3 +785,13 @@
margin: 8px 0;
}
}
// empty
.ant-empty .ant-empty-description {
color: #999;
}
:where(.css-dev-only-do-not-override-1okl62o).ant-table-wrapper .ant-table-tbody > tr > th,
:where(.css-dev-only-do-not-override-1okl62o).ant-table-wrapper .ant-table-tbody > tr > td {
border-bottom: 0;
}

@ -16,9 +16,9 @@
background-repeat: no-repeat;
background-position: left bottom;
border-radius: 0px 0px 32px 0px;
box-shadow: 0px 2px 8px 0px rgba(0, 79, 178, 0.15);
// border-radius: 12px;
// box-shadow: 4px 0px 24px 0px rgba(0, 63, 143, 0.3);
// 自定义实现
.single_menu_box {
& > li {

@ -30,6 +30,7 @@ export type UpdateFormProps = {
values: Record<string, any>;
reload: any;
};
const waitTime = (time: number = 100) => {
return new Promise((resolve) => {
setTimeout(() => {

@ -26,7 +26,7 @@ import { ProCard, ProTable } from '@ant-design/pro-components';
import { FormattedMessage, useIntl } from '@umijs/max';
import { Button, message } from 'antd';
import { useRef, useState } from 'react';
import { proTablePaginationOptions } from '../../../../config/defaultTable';
import { proTableDefaultOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import CreateForm from './components/createForm';
import UpdateForm from './components/updateForm';
@ -201,6 +201,7 @@ const BusinessModel: React.FC = () => {
<span className="pl-[8px]"></span>
</div>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: { padding: 0 },

@ -212,6 +212,7 @@ const DetailDeviceState: React.FC<DetailDeviceStateProps> = ({
<span>{item.name}</span>
</div>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table mb-[16px]"
cardProps={{
bodyStyle: { padding: 0, margin: 0 },

@ -15,7 +15,10 @@ import type { ActionType, ProColumns } from '@ant-design/pro-components';
import { ProCard, ProTable } from '@ant-design/pro-components';
import { FormattedMessage } from '@umijs/max';
import { useRef, useState } from 'react';
import { proTablePaginationOptions } from '../../../../../config/defaultTable';
import {
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../../../config/defaultTable';
type DetailDeviceStateLogProps = {
commInfo: Record<string, any>;
};
@ -58,6 +61,7 @@ const DetailDeviceStateLog: React.FC<DetailDeviceStateLogProps> = (props) => {
<div className="detailDeviceStateLog_wrap">
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: { padding: 0 },

@ -15,7 +15,10 @@ import type { ActionType, ProColumns } from '@ant-design/pro-components';
import { ProCard, ProTable } from '@ant-design/pro-components';
import { FormattedMessage } from '@umijs/max';
import { useRef, useState } from 'react';
import { proTablePaginationOptions } from '../../../../../config/defaultTable';
import {
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../../../config/defaultTable';
type DetailServerStateLogProps = {
commInfo: Record<string, any>;
};
@ -56,6 +59,7 @@ const DetailServerStateLog: React.FC<DetailServerStateLogProps> = (props) => {
<div className="detailServerStateLog_wrap">
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: { padding: 0 },

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-05-10 10:47:45
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-25 10:06:05
* @LastEditTime: 2024-07-22 15:17:48
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\deviceSate.tsx
* @Description:
* @
@ -31,7 +31,7 @@ import {
import { FormattedMessage, useIntl } from '@umijs/max';
import { Tabs } from 'antd';
import { useEffect, useState } from 'react';
import { proTablePaginationOptions } from '../../../../config/defaultTable';
import { proTableDefaultOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import DetailDeviceState from './components/detailDeviceState';
import DeviceStateCard from './components/deviceStateCard';
import './index.less';
@ -196,9 +196,7 @@ const DeviceSate: React.FC = () => {
item.label = `${deviceStateEnums[2].label}${currCounts[deviceStateEnums[2].key]}`;
break;
case '1003':
item.label = `${deviceStateEnums[3].label}${
currCounts[deviceStateEnums[3].key]
}}`;
item.label = `${deviceStateEnums[3].label}${currCounts[deviceStateEnums[3].key]}`;
break;
case '1004':
item.label = `${deviceStateEnums[4].label}${currCounts[deviceStateEnums[4].key]}`;
@ -356,6 +354,7 @@ const DeviceSate: React.FC = () => {
></Tabs>
<div className="gn_scroll_list_wrap" style={{ height: 'calc(100vh - 240px)' }}>
<ProList<any>
{...proTableDefaultOptions}
className="gn_pro_list"
ghost={true}
rowKey={'id'}
@ -369,16 +368,20 @@ const DeviceSate: React.FC = () => {
margin: '-4px 0',
},
}}
pagination={{
...proTablePaginationOptions,
pageNo: currentPage,
pageSize: currentPageSize,
total: total || 0, // 指定总条目数
onChange: (pageNo, pageSize) => {
setCurrentPageSize(pageSize);
setCurrentPage(pageNo);
},
}}
pagination={
serverList.length
? {
...proTablePaginationOptions,
pageNo: currentPage,
pageSize: currentPageSize,
total: total || 0, // 指定总条目数
onChange: (pageNo, pageSize) => {
setCurrentPageSize(pageSize);
setCurrentPage(pageNo);
},
}
: false
}
rowSelection={false}
grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }}
metas={{

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-05-07 13:38:03
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-25 10:02:48
* @LastEditTime: 2024-07-22 15:17:31
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessState\index.tsx
* @Description: businessStatebs
* @
@ -19,7 +19,7 @@ import { ProCard, ProList } from '@ant-design/pro-components';
import { FormattedMessage, useIntl } from '@umijs/max';
import { Tabs, message } from 'antd';
import { useEffect, useState } from 'react';
import { proTablePaginationOptions } from '../../../../config/defaultTable';
import { proTableDefaultOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import CreateServerForm from './components/createServerForm';
import DetailServerState from './components/detailServerState';
import ServerStateCard from './components/serverStateCard';
@ -267,6 +267,7 @@ const BusinessState: React.FC = () => {
</div>
<div className="gn_scroll_list_wrap" style={{ height: 'calc(100vh - 240px)' }}>
<ProList<any>
{...proTableDefaultOptions}
className="gn_pro_list"
ghost={true}
rowKey={'id'}
@ -280,16 +281,20 @@ const BusinessState: React.FC = () => {
margin: '-4px 0',
},
}}
pagination={{
...proTablePaginationOptions,
pageNo: currentPage,
pageSize: currentPageSize,
total: total || 0, // 指定总条目数
onChange: (pageNo, pageSize) => {
setCurrentPageSize(pageSize);
setCurrentPage(pageNo);
},
}}
pagination={
serverList.length
? {
...proTablePaginationOptions,
pageNo: currentPage,
pageSize: currentPageSize,
total: total || 0, // 指定总条目数
onChange: (pageNo, pageSize) => {
setCurrentPageSize(pageSize);
setCurrentPage(pageNo);
},
}
: false
}
rowSelection={false}
grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }}
metas={{

@ -30,7 +30,10 @@ import { Access, FormattedMessage, history, useAccess, useIntl } from '@umijs/ma
import { Button, message } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { proTablePaginationOptions } from '../../../../../config/defaultTable';
import {
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../../../config/defaultTable';
import CategorizeUpdate from '@/components/CategorizeUpdate';
import IsDelete from '@/components/TableActionCard/isDelete';
@ -224,6 +227,7 @@ const DeviceList: React.FC<DeviceListProps> = (props) => {
return (
<div className="dg_deviceList_wrap">
<ProTable
{...proTableDefaultOptions}
style={{
display: isSettingOpen ? 'none' : 'block',
}}

@ -153,6 +153,7 @@ const ModelDeploy: React.FC<ModelDeployProps> = ({ nodeInfo }) => {
<span className="pl-[8px]"></span>
</div>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: { padding: 0 },

@ -182,6 +182,7 @@ const ModelDeployConfig: React.FC<ModelDeployConfigProps> = ({
/>
</div>
<ProTable
{...proTableDefaultOptions}
style={{
height: '300px',
overflowY: 'scroll',

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-30 10:02:29
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-20 10:29:40
* @LastEditTime: 2024-07-22 11:40:49
* @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\modelSetting.tsx
* @Description:
* @
@ -16,6 +16,8 @@ import type { ProColumns } from '@ant-design/pro-components';
import { ProList, ProTable } from '@ant-design/pro-components';
import { FormattedMessage } from '@umijs/max';
import { Button } from 'antd';
import { proTableDefaultOptions } from '../../../../../config/defaultTable';
import { useEffect, useState } from 'react';
// import CreateForm from './components/createForm';
import CreateModelParams from './createModelParams';
@ -135,6 +137,7 @@ const ModelSetting: React.FC<ModelSettingProps> = (props) => {
<span>{item?.busi_model_name}</span>
</div>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table mb-[16px]"
// headerTitle={
// <div>
@ -197,6 +200,7 @@ const ModelSetting: React.FC<ModelSettingProps> = (props) => {
return (
<div className="dg_modelSetting_page">
<ProList<{ title: string }>
{...proTableDefaultOptions}
itemLayout="vertical"
itemCardProps={{
ghost: true,

@ -4,6 +4,7 @@
import { ProCard, ProList } from '@ant-design/pro-components';
import { Image } from 'antd';
import React, { useEffect, useState } from 'react';
import { proTableDefaultOptions } from '../../../config/defaultTable';
// type
// import { postPowerGroup, postPowerPoolsList } from '@/services/testApi/computePower';
@ -115,6 +116,7 @@ const ComputePowerAllocation: React.FC = () => {
<li className="mt-[16px]">
<div className="head3 mb-[12px]"></div>
<ProList<any>
{...proTableDefaultOptions}
className="gn_pro_list"
ghost={true}
rowKey={'id'}
@ -128,6 +130,7 @@ const ComputePowerAllocation: React.FC = () => {
margin: '-4px 0',
},
}}
pagination={false}
rowSelection={false}
grid={{ gutter: 16, xs: 1, md: 2, lg: 3, xl: 4, xxl: 5 }}
metas={{

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-28 14:04:41
* @LastEditTime: 2024-07-22 11:28:30
* @FilePath: \general-ai-manage\src\pages\Log\index.tsx
* @Description:
* @
@ -27,7 +27,11 @@ import {
import { FormattedMessage } from '@umijs/max';
import { Tooltip } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { proTableCommonOptions, proTablePaginationOptions } from '../../../config/defaultTable';
import {
proTableCommonOptions,
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../config/defaultTable';
// import './index.less';
const LogIndex: React.FC = () => {
@ -60,7 +64,7 @@ const LogIndex: React.FC = () => {
},
{
title: <FormattedMessage id="server_log.table.list.updateTime" defaultMessage="$$$" />,
dataIndex: 'timestamp',
dataIndex: 'create_time',
hideInSearch: true,
valueType: 'dateTime',
},
@ -184,6 +188,7 @@ const LogIndex: React.FC = () => {
>
<div className="gn_scroll_list_wrap" style={{ maxHeight: 'calc(100vh - 240px)' }}>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: {

@ -28,7 +28,7 @@ import { ProCard, ProDescriptions, ProTable } from '@ant-design/pro-components';
import { FormattedMessage, useIntl, useParams } from '@umijs/max';
import { Button, message } from 'antd';
import { useRef, useState } from 'react';
import { proTablePaginationOptions } from '../../../../config/defaultTable';
import { proTableDefaultOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import CreateForm from './components/createForm';
import UpdateForm from './components/updateForm';
@ -313,6 +313,7 @@ const ModelDetail: React.FC = () => {
style={{ height: 'calc(100vh - 370px)', overflowY: 'scroll', overflowX: 'hidden' }}
>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: { padding: 0 },

@ -34,7 +34,11 @@ import { ProCard, ProForm, ProFormText, ProTable } from '@ant-design/pro-compone
import { Access, FormattedMessage, history, useAccess, useIntl } from '@umijs/max';
import { Button, message } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { proTableCommonOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import {
proTableCommonOptions,
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../../config/defaultTable';
import CreateForm from './components/createForm';
import UpdateForm from './components/updateForm';
@ -303,6 +307,7 @@ const ModelIndex: React.FC = () => {
>
<div className="gn_scroll_list_wrap" style={{ maxHeight: 'calc(100vh - 292px)' }}>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: {

@ -23,7 +23,11 @@ import { ProCard, ProForm, ProFormText, ProTable } from '@ant-design/pro-compone
import { Access, FormattedMessage, history, useAccess, useIntl } from '@umijs/max';
import { Button, message } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { proTableCommonOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
import {
proTableCommonOptions,
proTableDefaultOptions,
proTablePaginationOptions,
} from '../../../../config/defaultTable';
import CreateForm from './components/createForm';
import UpdateForm from './components/updateForm';
@ -243,6 +247,7 @@ const ModelRuntimeLib: React.FC = () => {
>
<div className="gn_scroll_list_wrap" style={{ maxHeight: 'calc(100vh - 292px)' }}>
<ProTable
{...proTableDefaultOptions}
className="gn_pro_table"
cardProps={{
bodyStyle: {

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-23 17:00:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-25 14:03:51
* @LastEditTime: 2024-07-19 16:03:12
* @FilePath: \general-ai-platform-web\src\pages\Project\BusinessInfo\components\baseInfo.tsx
* @Description:
*
@ -19,7 +19,7 @@ const BaseInfo: React.FC<BaseInfoProps> = ({ info }) => {
const ModelDetailColumns = [
{
title: <FormattedMessage id="business.list.table.form.industry" defaultMessage="所属行业" />,
dataIndex: 'industry',
dataIndex: 'industry_name',
},
{
title: <FormattedMessage id="business.list.table.form.contacts" defaultMessage="联系人" />,

@ -16,7 +16,7 @@ import { ProCard, ProList } from '@ant-design/pro-components';
import { Button } from 'antd';
import React, { useEffect, useState } from 'react';
import { proTablePaginationOptions } from '../../../../config/defaultTable';
import { proTableDefaultOptions, proTablePaginationOptions } from '../../../../config/defaultTable';
// import AlarmDetails from './components/AlarmDetails';
import UpdateForm from '../BusinessProject/components/updateForm';
import AccountPsw from './components/accountPsw';
@ -150,6 +150,7 @@ const BusinessInfo: React.FC = () => {
overflowY: 'scroll',
}} */}
<ProList<any>
{...proTableDefaultOptions}
className="gn_pro_list"
ghost={true}
itemCardProps={{
@ -168,18 +169,22 @@ const BusinessInfo: React.FC = () => {
borderRadius: 8,
},
}}
pagination={{
...proTablePaginationOptions,
total: total,
current: currentPage,
pageSize: currentPageSize,
showSizeChanger: true,
onChange: (pageNo, pageSize) => {
console.log(pageNo, pageSize);
setCurrentPage(pageNo);
setCurrentPageSize(pageSize);
},
}}
pagination={
serverList.length
? {
...proTablePaginationOptions,
total: total,
current: currentPage,
pageSize: currentPageSize,
showSizeChanger: true,
onChange: (pageNo, pageSize) => {
console.log(pageNo, pageSize);
setCurrentPage(pageNo);
setCurrentPageSize(pageSize);
},
}
: false
}
showActions="hover"
rowSelection={false}
grid={{ gutter: 16, xs: 1, md: 1, lg: 2, xl: 3, xxl: 4 }}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-24 17:32:23
* @LastEditTime: 2024-07-19 15:58:59
* @FilePath: \general-ai-manage\src\pages\BusinessProject\components\updateForm.tsx
* @Description:
* @
@ -282,7 +282,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
debounceTime={500}
request={async () => {
const { data } = await apiIndustrymap();
// console.log(data,'apiIndustrymap_data')
console.log(data, 'apiIndustrymap_data');
return transformDictByMap(data);
}}
rules={[

@ -110,6 +110,8 @@
display: inline-block;
width: 48px;
height: 48px;
overflow: hidden;
border-radius: 2px;
img {
// width: 48px;
height: 48px;

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-07 14:02:00
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-25 14:26:08
* @LastEditTime: 2024-07-22 11:39:05
* @FilePath: \general-ai-manage\src\pages\BusinessProject\BusinessProject.tsx
* @Description:
* @
@ -15,6 +15,7 @@
*/
import { CommButton, TextButton } from '@/components/Button';
import { isSuccessApi } from '@/utils/forApi';
import { proTableDefaultOptions } from '../../../../config/defaultTable';
import { ReactComponent as BusinessBannerLogo } from '/public/home/business_banner_logo.svg';
import { ReactComponent as BusinessHeader1 } from '/public/home/business_header_1.svg';
import { ReactComponent as BusinessHeader2 } from '/public/home/business_header_2.svg';
@ -328,6 +329,7 @@ const BusinessProject: React.FC = () => {
</div>
<div className="gn_scroll_list_wrap" style={{ maxHeight: 'calc(100vh - 350px)' }}>
<ProList<any>
{...proTableDefaultOptions}
className="gn_pro_list"
ghost={true}
itemCardProps={{

Loading…
Cancel
Save