样式
This commit is contained in:
@@ -106,29 +106,30 @@ export default function WayLinePage() {
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px' }}>
|
||||
{/* 顶部统计卡片 */}
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '0' }}>
|
||||
|
||||
|
||||
<Row gutter={[8, 8]} style={{ marginBottom: 10 }}>
|
||||
{topCards.map((item, index) => (
|
||||
<Col xs={12} sm={8} md={4} key={index}>
|
||||
<Card bordered={false} bodyStyle={{ padding: '16px 20px' }} style={cardStyle}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
|
||||
<Card bordered={false} bodyStyle={{ padding: '12px 14px' }} style={cardStyle}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
||||
<div style={{
|
||||
width: 44, height: 44,
|
||||
width: 36, height: 36,
|
||||
background: item.bg,
|
||||
borderRadius: 12,
|
||||
borderRadius: 10,
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center',
|
||||
color: item.color
|
||||
}}>
|
||||
{item.icon}
|
||||
{React.cloneElement(item.icon as React.ReactElement, { size: 18 })}
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: fontSmall, color: '#86909C', marginBottom: 2 }}>{item.title}</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 0 }}>{item.title}</div>
|
||||
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
||||
<span style={{ fontSize: fontLarge, fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
|
||||
<span style={{ fontSize: fontSmall, color: '#4E5969' }}>{item.unit}</span>
|
||||
<span style={{ fontSize: 'clamp(16px, 1vw, 20px)', fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
|
||||
<span style={{ fontSize: 9, color: '#4E5969' }}>{item.unit}</span>
|
||||
</div>
|
||||
<div style={{ fontSize: 10, color: item.trendColor || '#86909C', fontWeight: 500 }}>
|
||||
<div style={{ fontSize: 9, color: item.trendColor || '#86909C', fontWeight: 500, lineHeight: 1 }}>
|
||||
{item.trend || item.desc}
|
||||
</div>
|
||||
</div>
|
||||
@@ -139,27 +140,27 @@ export default function WayLinePage() {
|
||||
</Row>
|
||||
|
||||
{/* 中间主要内容区 */}
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Row gutter={10} style={{ marginBottom: 10 }}>
|
||||
{/* 左侧:航线编辑与路径规划 */}
|
||||
<Col xs={24} xl={14}>
|
||||
<Col xs={24} xl={14} style={{ display: "flex", flexDirection: "column" }}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700, color: '#1D2129' }}>航线编辑与路径规划</span>}
|
||||
title={<span style={{ fontSize: fontNormal, fontWeight: 700, color: '#1D2129' }}>航线编辑与路径规划</span>}
|
||||
size="small"
|
||||
extra={
|
||||
<Space size={8}>
|
||||
<Button size="small" icon={<PlusOutlined />} style={{ borderRadius: 6 }}>新增航线</Button>
|
||||
<Button size="small" icon={<ImportOutlined />} style={{ borderRadius: 6 }}>导入模板</Button>
|
||||
<Button size="small" icon={<NodeIndexOutlined />} style={{ borderRadius: 6 }}>路径优化</Button>
|
||||
<Button size="small" icon={<SafetyCertificateOutlined />} style={{ borderRadius: 6 }}>风险检查</Button>
|
||||
<Button size="small" icon={<SaveOutlined />} style={{ borderRadius: 6 }}>保存草稿</Button>
|
||||
<Button size="small" icon={<Maximize2 size={14} />} style={{ borderRadius: 6 }} />
|
||||
<Space size={4}>
|
||||
<Button size="small" icon={<PlusOutlined />} style={{ borderRadius: 4, fontSize: 11 }}>新增</Button>
|
||||
<Button size="small" icon={<ImportOutlined />} style={{ borderRadius: 4, fontSize: 11 }}>导入</Button>
|
||||
<Button size="small" icon={<NodeIndexOutlined />} style={{ borderRadius: 4, fontSize: 11 }}>优化</Button>
|
||||
<Button size="small" icon={<SaveOutlined />} style={{ borderRadius: 4, fontSize: 11 }}>保存</Button>
|
||||
<Button size="small" icon={<Maximize2 size={12} />} style={{ borderRadius: 4 }} />
|
||||
</Space>
|
||||
}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden' }}
|
||||
style={{ ...cardStyle, marginBottom: 16 }}
|
||||
style={{ ...cardStyle, marginBottom: 10 }}
|
||||
>
|
||||
{/* 地图区域 */}
|
||||
<div style={{ width: '100%', height: 500, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
|
||||
<div style={{ width: '100%', height: 420, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
|
||||
{/* SVG 航线与区域覆盖 */}
|
||||
<svg style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', pointerEvents: 'none' }}>
|
||||
{/* 航线 1 (蓝色) */}
|
||||
@@ -227,34 +228,50 @@ export default function WayLinePage() {
|
||||
|
||||
{/* 航点列表 */}
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>航点列表 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}>航线:FL-03 (无人机热斑巡检)</Text></span>}
|
||||
extra={<PlusOutlined style={{ cursor: 'pointer', color: '#165DFF' }} />}
|
||||
title={<span style={{ fontSize: fontNormal, fontWeight: 700 }}>航点列表 <Text type="secondary" style={{ fontSize: 10, fontWeight: 400, marginLeft: 8 }}>航线:FL-03</Text></span>}
|
||||
size="small"
|
||||
extra={<PlusOutlined style={{ cursor: 'pointer', color: '#165DFF', fontSize: 12 }} />}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: 0, height: "100%" }}
|
||||
style={{
|
||||
...cardStyle,
|
||||
flex: 1,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<Table
|
||||
size="small"
|
||||
pagination={false}
|
||||
scroll={{ y: 220 }}
|
||||
dataSource={[
|
||||
{ key: '1', point: 'WP-01', coord: '30.32921, 120.12345', action: '起飞', height: 35, speed: 6.0, stay: 0, remark: '从机场起飞' },
|
||||
{ key: '2', point: 'WP-02', coord: '区块 B-01', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
|
||||
{ key: '3', point: 'WP-03', coord: '区块 B-05', action: '热成像', height: 35, speed: 6.0, stay: 3, remark: '热斑检测' },
|
||||
{ key: '4', point: 'WP-04', coord: '区块 B-09', action: '悬停', height: 35, speed: 0.0, stay: 10, remark: '重点检查' },
|
||||
{ key: '5', point: 'WP-05', coord: '区块 B-12', action: '热成像', height: 35, speed: 6.0, stay: 3, remark: '高优先区' },
|
||||
{ key: '6', point: 'WP-06', coord: '区块 B-16', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
|
||||
]}
|
||||
columns={[
|
||||
{ title: '航点', dataIndex: 'point', width: 80, render: (t) => <Text strong>{t}</Text> },
|
||||
{ title: '坐标/区域', dataIndex: 'coord', width: 120, ellipsis: true },
|
||||
{ title: '动作', dataIndex: 'action', width: 80, render: (a) => <Tag color={a === '起飞' ? 'blue' : a === '悬停' ? 'orange' : 'cyan'} bordered={false} style={{ margin: 0 }}>{a}</Tag> },
|
||||
{ title: '高度(m)', dataIndex: 'height', width: 70 },
|
||||
{ title: '速度(m/s)', dataIndex: 'speed', width: 90 },
|
||||
{ title: '停留(s)', dataIndex: 'stay', width: 70 },
|
||||
{ title: '备注', dataIndex: 'remark', ellipsis: true },
|
||||
]}
|
||||
/>
|
||||
<div style={{
|
||||
flex: 1,
|
||||
height: "100%",
|
||||
position: "relative",
|
||||
}}>
|
||||
<Table
|
||||
size="small"
|
||||
pagination={false}
|
||||
scroll={{
|
||||
y: "auto",
|
||||
}}
|
||||
dataSource={[
|
||||
{ key: '1', point: 'WP-01', coord: '30.32921, 120.12345', action: '起飞', height: 35, speed: 6.0, stay: 0, remark: '从机场起飞' },
|
||||
{ key: '2', point: 'WP-02', coord: '区块 B-01', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
|
||||
{ key: '3', point: 'WP-03', coord: '区块 B-05', action: '热成像', height: 35, speed: 6.0, stay: 3, remark: '热斑检测' },
|
||||
{ key: '4', point: 'WP-04', coord: '区块 B-09', action: '悬停', height: 35, speed: 0.0, stay: 10, remark: '重点检查' },
|
||||
{ key: '5', point: 'WP-05', coord: '区块 B-12', action: '热成像', height: 35, speed: 6.0, stay: 3, remark: '高优先区' },
|
||||
{ key: '6', point: 'WP-06', coord: '区块 B-16', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
|
||||
]}
|
||||
columns={[
|
||||
{ title: '航点', dataIndex: 'point', width: 80, render: (t) => <Text strong>{t}</Text> },
|
||||
{ title: '坐标/区域', dataIndex: 'coord', width: 120, ellipsis: true },
|
||||
{ title: '动作', dataIndex: 'action', width: 80, render: (a) => <Tag color={a === '起飞' ? 'blue' : a === '悬停' ? 'orange' : 'cyan'} bordered={false} style={{ margin: 0 }}>{a}</Tag> },
|
||||
{ title: '高度(m)', dataIndex: 'height', width: 70 },
|
||||
{ title: '速度(m/s)', dataIndex: 'speed', width: 90 },
|
||||
{ title: '停留(s)', dataIndex: 'stay', width: 70 },
|
||||
{ title: '备注', dataIndex: 'remark', ellipsis: true },
|
||||
]}
|
||||
style={{ height: "100%" }}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user