fix:更新优化
This commit is contained in:
parent
ef5b31c0e2
commit
5eb55f6ca7
@ -14,9 +14,9 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/api/': {
|
||||
// target: 'http://10.39.13.78:8002/',
|
||||
target: 'http://10.39.13.78:8002/',
|
||||
// target: 'https://test-admin.linyikj.com.cn/',
|
||||
target: 'https://admin.linyikj.com.cn/',
|
||||
// target: 'https://admin.linyikj.com.cn/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import {
|
||||
DownOutlined,
|
||||
LogoutOutlined,
|
||||
UnlockOutlined,
|
||||
UserOutlined,
|
||||
@ -62,6 +63,7 @@ export default function AvatarProps({ user }: { user: any }) {
|
||||
size={28}
|
||||
/>
|
||||
<span>{user?.username}</span>
|
||||
<DownOutlined />
|
||||
</Space>
|
||||
</Dropdown>
|
||||
</Space>
|
||||
|
||||
@ -7,7 +7,10 @@ export const MyExport = (props: any) => {
|
||||
label: '当前页(含查询条件)',
|
||||
onClick: () =>
|
||||
props?.keyParams
|
||||
? props?.download?.({ download_type: 'page', ...props?.item })
|
||||
? props?.download?.({
|
||||
download_type: 'page',
|
||||
...props?.item,
|
||||
})
|
||||
: props?.download?.Export?.({
|
||||
download_type: 'page',
|
||||
...props?.item,
|
||||
|
||||
@ -3,26 +3,19 @@ import {
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
||||
import {
|
||||
MsgPropertyAnnouncementsObjectEnum,
|
||||
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import AnnouncementCreate from './modals/AnnouncementCreate';
|
||||
import AnnouncementShow from './modals/AnnouncementShow';
|
||||
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
||||
|
||||
export default function Index({ title = '项目公告' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'msg-property-announcements',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
@ -88,6 +81,12 @@ export default function Index({ title = '项目公告' }) {
|
||||
valueEnum: MsgPropertyAnnouncementsPublishTypeEnum,
|
||||
search: false,
|
||||
}),
|
||||
MyColumns.EnumTag({
|
||||
title: '展示对象',
|
||||
dataIndex: 'object',
|
||||
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||
search: false,
|
||||
}),
|
||||
{
|
||||
title: '发布时间',
|
||||
dataIndex: 'schedule_publish_at',
|
||||
|
||||
@ -8,7 +8,10 @@ import {
|
||||
import MyEditor from '@/common/components/Editor';
|
||||
import { Selects } from '@/components/Select';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
||||
import {
|
||||
MsgPropertyAnnouncementsObjectEnum,
|
||||
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
|
||||
@ -67,6 +70,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
...rulesHelper.text,
|
||||
},
|
||||
},
|
||||
|
||||
MyFormItems.EnumRadio({
|
||||
key: 'publish_type',
|
||||
title: '发布方式',
|
||||
@ -78,7 +82,17 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
...rulesHelper.text,
|
||||
},
|
||||
}),
|
||||
|
||||
MyFormItems.EnumRadio({
|
||||
key: 'object',
|
||||
title: '展示对象',
|
||||
colProps: { span: 8 },
|
||||
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||
formItemProps: {
|
||||
labelCol: { span: 8 },
|
||||
wrapperCol: { span: 12 },
|
||||
...rulesHelper.text,
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: ['publish_type'],
|
||||
valueType: 'dependency',
|
||||
|
||||
@ -7,7 +7,10 @@ import {
|
||||
} from '@/common';
|
||||
import MyEditor from '@/common/components/Editor';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
||||
import {
|
||||
MsgPropertyAnnouncementsObjectEnum,
|
||||
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
|
||||
@ -66,7 +69,17 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
...rulesHelper.text,
|
||||
},
|
||||
}),
|
||||
|
||||
MyFormItems.EnumRadio({
|
||||
key: 'object',
|
||||
title: '展示对象',
|
||||
colProps: { span: 8 },
|
||||
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||
formItemProps: {
|
||||
labelCol: { span: 8 },
|
||||
wrapperCol: { span: 12 },
|
||||
...rulesHelper.text,
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: ['publish_type'],
|
||||
valueType: 'dependency',
|
||||
|
||||
@ -3,7 +3,6 @@ import {
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { MyExport } from '@/components/MyExport';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
@ -12,7 +11,6 @@ import {
|
||||
AssetHousesUsageEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import { useState } from 'react';
|
||||
import HousesShow from '../dictionary/modals/HousesShow';
|
||||
@ -21,16 +19,11 @@ import HousesUpdate from '../dictionary/modals/HousesUpdate';
|
||||
export default function Index({ title = '房屋列表' }) {
|
||||
const [getParams, setParams] = useState({});
|
||||
|
||||
const navigate = useNavigate();
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'asset-houses',
|
||||
tabLabel: title,
|
||||
});
|
||||
return (
|
||||
<MyPageContainer title={title}>
|
||||
<MyPageContainer title={title} enableTabs={false} tabKey="asset-houses">
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
headerTitle={title}
|
||||
request={async (params, sort) => {
|
||||
setParams(params);
|
||||
return MyProTableProps.request(
|
||||
|
||||
@ -72,7 +72,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
{
|
||||
title: '重置登录密码',
|
||||
key: 'password',
|
||||
tooltip: '必须超过6位数,且包含数字、字母、符号',
|
||||
tooltip: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符',
|
||||
colProps: { span: 24 },
|
||||
},
|
||||
Selects?.Positions({
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Card } from 'antd';
|
||||
import React from 'react';
|
||||
import { Card, Tooltip } from 'antd';
|
||||
import { useNavigate } from 'umi';
|
||||
|
||||
interface QuickActionCardProps {
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
themeColor: string;
|
||||
to: string;
|
||||
}
|
||||
@ -13,7 +13,6 @@ interface QuickActionCardProps {
|
||||
const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||
icon,
|
||||
title,
|
||||
description,
|
||||
themeColor,
|
||||
to,
|
||||
}) => {
|
||||
@ -24,7 +23,6 @@ const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip title={title}>
|
||||
<Card
|
||||
hoverable
|
||||
onClick={handleClick}
|
||||
@ -36,10 +34,10 @@ const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||
handleClick();
|
||||
}
|
||||
}}
|
||||
aria-label={`${title} - ${description}`}
|
||||
aria-label={title}
|
||||
style={{
|
||||
width: '100%',
|
||||
height: 160,
|
||||
height: 130,
|
||||
borderRadius: 8,
|
||||
transition: 'all 0.3s ease',
|
||||
cursor: 'pointer',
|
||||
@ -48,14 +46,14 @@ const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||
}}
|
||||
styles={{
|
||||
body: {
|
||||
padding: 24,
|
||||
padding: 30,
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
gap: 12,
|
||||
}
|
||||
gap: 10,
|
||||
},
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.transform = 'translateY(-4px)';
|
||||
@ -66,26 +64,17 @@ const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||
e.currentTarget.style.boxShadow = '0 2px 8px rgba(0,0,0,0.1)';
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 48, color: themeColor }}>
|
||||
{icon}
|
||||
</div>
|
||||
<div style={{
|
||||
fontSize: 18,
|
||||
fontWeight: 600,
|
||||
<div style={{ fontSize: 36, color: themeColor }}>{icon}</div>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 16,
|
||||
color: '#262626',
|
||||
textAlign: 'center'
|
||||
}}>
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</div>
|
||||
<div style={{
|
||||
fontSize: 14,
|
||||
color: '#8c8c8c',
|
||||
textAlign: 'center'
|
||||
}}>
|
||||
{description}
|
||||
</div>
|
||||
</Card>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
AuditOutlined,
|
||||
BuildOutlined,
|
||||
DollarOutlined,
|
||||
ImportOutlined,
|
||||
TeamOutlined,
|
||||
ApartmentOutlined,
|
||||
DollarOutlined,
|
||||
AuditOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import React from 'react';
|
||||
import QuickActionCard from './QuickActionCard';
|
||||
|
||||
const QuickActionsGrid: React.FC = () => {
|
||||
@ -32,13 +31,13 @@ const QuickActionsGrid: React.FC = () => {
|
||||
themeColor: '#fa8c16',
|
||||
path: '/company/employees',
|
||||
},
|
||||
{
|
||||
icon: <ApartmentOutlined />,
|
||||
title: '导入楼栋',
|
||||
description: '批量导入楼栋数据',
|
||||
themeColor: '#722ed1',
|
||||
path: '/asset/houses',
|
||||
},
|
||||
// {
|
||||
// icon: <ApartmentOutlined />,
|
||||
// title: '导入楼栋',
|
||||
// description: '批量导入楼栋数据',
|
||||
// themeColor: '#722ed1',
|
||||
// path: '/asset/list',
|
||||
// },
|
||||
{
|
||||
icon: <DollarOutlined />,
|
||||
title: '创建收费标准',
|
||||
@ -60,7 +59,7 @@ const QuickActionsGrid: React.FC = () => {
|
||||
<div
|
||||
style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'repeat(6, 1fr)',
|
||||
gridTemplateColumns: 'repeat(5, 1fr)',
|
||||
gap: '16px',
|
||||
marginBottom: '24px',
|
||||
}}
|
||||
|
||||
@ -4,8 +4,6 @@ const StatisticsPlaceholder: React.FC = () => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
minHeight: '60vh',
|
||||
background: '#f0f2f5',
|
||||
padding: '24px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@ -13,9 +11,7 @@ const StatisticsPlaceholder: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
{/* 未来扩展:统计数据卡片、图表、报表等 */}
|
||||
<div>
|
||||
{/* 当前阶段:完全空白,便于未来扩展 */}
|
||||
</div>
|
||||
<div>{/* 当前阶段:完全空白,便于未来扩展 */}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@ -7,18 +7,11 @@ export default function Index() {
|
||||
const username = snap.session?.user?.username || '用户';
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
padding: '24px',
|
||||
minHeight: '100vh',
|
||||
background: '#f0f2f5',
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
{/* 欢迎语区域 */}
|
||||
<div
|
||||
style={{
|
||||
marginBottom: '32px',
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<h1
|
||||
|
||||
98
src/pages/index.tsx.backup
Normal file
98
src/pages/index.tsx.backup
Normal file
@ -0,0 +1,98 @@
|
||||
import { useMyState } from '@/common';
|
||||
import {
|
||||
BuildOutlined,
|
||||
ImportOutlined,
|
||||
TeamOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import QuickActionCard from './components/QuickActionCard';
|
||||
|
||||
export default function Index() {
|
||||
const { snap } = useMyState();
|
||||
const username = snap.session?.user?.username || '用户';
|
||||
|
||||
const quickActions = [
|
||||
{
|
||||
icon: <BuildOutlined />,
|
||||
title: '添加机构',
|
||||
themeColor: '#1890ff',
|
||||
path: '/company/list',
|
||||
},
|
||||
{
|
||||
icon: <ImportOutlined />,
|
||||
title: '导入项目',
|
||||
themeColor: '#52c41a',
|
||||
path: '/asset/list',
|
||||
},
|
||||
{
|
||||
icon: <TeamOutlined />,
|
||||
title: '导入员工',
|
||||
themeColor: '#fa8c16',
|
||||
path: '/company/employees',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
padding: '48px 24px',
|
||||
minHeight: 'calc(100vh - 64px)',
|
||||
background: '#f0f2f5',
|
||||
}}>
|
||||
<div style={{
|
||||
maxWidth: 1200,
|
||||
margin: '0 auto',
|
||||
}}>
|
||||
{/* 欢迎语区域 */}
|
||||
<div style={{
|
||||
marginBottom: 48,
|
||||
textAlign: 'center',
|
||||
}}>
|
||||
<h1 style={{
|
||||
fontSize: 32,
|
||||
color: '#262626',
|
||||
marginBottom: 12,
|
||||
}}>
|
||||
欢迎回来,{username}!
|
||||
</h1>
|
||||
<p style={{
|
||||
fontSize: 16,
|
||||
color: '#8c8c8c',
|
||||
marginBottom: 0,
|
||||
}}>
|
||||
这里是您的快捷工作台,点击下方卡片快速开始常用操作
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* 快捷操作卡片区域 */}
|
||||
<div
|
||||
className="quick-actions-grid"
|
||||
style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))',
|
||||
gap: 24,
|
||||
maxWidth: 900,
|
||||
margin: '0 auto',
|
||||
}}
|
||||
>
|
||||
{quickActions.map((action) => (
|
||||
<QuickActionCard
|
||||
key={action.path}
|
||||
icon={action.icon}
|
||||
title={action.title}
|
||||
themeColor={action.themeColor}
|
||||
to={action.path}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* 移动端响应式样式 */}
|
||||
<style>{`
|
||||
@media (max-width: 768px) {
|
||||
.quick-actions-grid {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
5
tmp/check-icons.js
Normal file
5
tmp/check-icons.js
Normal file
@ -0,0 +1,5 @@
|
||||
const icons = require('@ant-design/icons');
|
||||
console.log('DollarOutlined:', typeof icons.DollarOutlined !== 'undefined');
|
||||
console.log('AuditOutlined:', typeof icons.AuditOutlined !== 'undefined');
|
||||
console.log('CheckCircleOutlined:', typeof icons.CheckCircleOutlined !== 'undefined');
|
||||
console.log('FileSearchOutlined:', typeof icons.FileSearchOutlined !== 'undefined');
|
||||
Loading…
x
Reference in New Issue
Block a user