紧凑样式
This commit is contained in:
@@ -167,23 +167,13 @@ const BasicSettings = () => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ padding: 'clamp(10px, 1.2vw, 20px)', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
<div style={{ marginBottom: 12, display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<Title level={4} style={{ margin: 0, fontSize: fontLarge }}>系统设置</Title>
|
||||
<Space split={<Divider type="vertical" />}>
|
||||
<Button type="text" size="small" icon={<SettingOutlined />} style={{ color: '#1677ff', fontWeight: 600 }}>基础设置</Button>
|
||||
<Button type="text" size="small" icon={<UserOutlined />}>用户与角色</Button>
|
||||
<Button type="text" size="small" icon={<NotificationOutlined />}>通知策略</Button>
|
||||
<Button type="text" size="small" icon={<ApiOutlined />}>设备接入</Button>
|
||||
<Button type="text" size="small" icon={<SafetyCertificateOutlined />}>数据与安全</Button>
|
||||
<Button type="text" size="small" icon={<ToolOutlined />}>系统维护</Button>
|
||||
</Space>
|
||||
</div>
|
||||
<div className="normal-spacing" style={{ padding: '8px', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
|
||||
|
||||
{/* 顶部统计卡片 */}
|
||||
<Row gutter={[10, 10]} style={{ marginBottom: 12 }}>
|
||||
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
|
||||
{topCards.map((item, idx) => (
|
||||
<Col key={idx} xs={12} sm={8} md={4} style={{ flex: 1 }}>
|
||||
<Col key={idx} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
|
||||
<AntdCard bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
||||
<div style={{ width: 40, height: 40, borderRadius: 10, background: item.bg, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
@@ -203,14 +193,14 @@ const BasicSettings = () => {
|
||||
))}
|
||||
</Row>
|
||||
|
||||
<Row gutter={12}>
|
||||
<Row gutter={[8, 8]}>
|
||||
{/* 左侧 */}
|
||||
<Col xs={24} xl={17}>
|
||||
{/* 基础配置 */}
|
||||
<AntdCard
|
||||
title={<Space><SettingOutlined style={{ color: '#1677ff' }} /><b>基础配置</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
@@ -291,10 +281,10 @@ const BasicSettings = () => {
|
||||
<AntdCard
|
||||
title={<Space><BellOutlined style={{ color: '#1677ff' }} /><b>通知与告警策略</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 8 }}>
|
||||
{[
|
||||
{ label: '短信', icon: <Smartphone size={16} />, color: '#52c41a', status: '已启用' },
|
||||
{ label: '邮件', icon: <Mail size={16} />, color: '#1677ff', status: '已启用' },
|
||||
@@ -340,6 +330,10 @@ const BasicSettings = () => {
|
||||
<Table
|
||||
size="small"
|
||||
scroll={{ x: 'max-content' }}
|
||||
rowStyle={{ height: '32px', padding: 0 }}
|
||||
empty={false}
|
||||
|
||||
|
||||
pagination={{ size: 'small', total: 4, pageSize: 4, showTotal: (total) => `共 ${total} 条` }}
|
||||
columns={[
|
||||
{ title: '用户名', dataIndex: 'name', key: 'name', fixed: 'left', width: 80 },
|
||||
@@ -391,7 +385,7 @@ const BasicSettings = () => {
|
||||
<AntdCard
|
||||
title={<Space><Users size={16} style={{ color: '#1677ff' }} /><b>角色权限概览</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '10px' }}
|
||||
>
|
||||
<Row gutter={[8, 8]}>
|
||||
@@ -422,7 +416,7 @@ const BasicSettings = () => {
|
||||
title={<Space><ApiOutlined style={{ color: '#1677ff' }} /><b>设备接入状态</b></Space>}
|
||||
extra={<Button type="link" size="small" style={{ fontSize: 11, padding: 0 }}>详情 <RightOutlined style={{ fontSize: 9 }} /></Button>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 12 }}>
|
||||
@@ -481,7 +475,7 @@ const BasicSettings = () => {
|
||||
<AntdCard
|
||||
title={<Space><Shield size={16} style={{ color: '#1677ff' }} /><b>数据与安全</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(120px, 1fr))', gap: '10px 16px' }}>
|
||||
|
||||
Reference in New Issue
Block a user