This commit is contained in:
mmc
2026-05-27 12:48:17 +08:00
parent e3e5595f16
commit 8eef08f77a

View File

@@ -585,7 +585,7 @@ export default function WayLinePage({ planedevices }) {
} }
bordered={false} bordered={false}
bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" }} bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" }}
style={{ ...cardStyle, height: "410px" }} style={{ ...cardStyle, height: "250px", flex: 1, marginBottom: 0 }}
> >
<Table <Table
size="small" size="small"
@@ -655,7 +655,7 @@ export default function WayLinePage({ planedevices }) {
bodyStyle={{ padding: '16px' }} bodyStyle={{ padding: '16px' }}
style={{ ...cardStyle, marginBottom: 8 }} style={{ ...cardStyle, marginBottom: 8 }}
> >
<Row gutter={[24, 8]}> <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '8px', marginBottom: 8 }}>
{[ {[
{ label: '飞行高度', value: '35', unit: 'm' }, { label: '飞行高度', value: '35', unit: 'm' },
{ label: '速度', value: '6', unit: 'm/s' }, { label: '速度', value: '6', unit: 'm/s' },
@@ -666,17 +666,27 @@ export default function WayLinePage({ planedevices }) {
{ label: '除草宽幅', value: '1.2', unit: 'm' }, { label: '除草宽幅', value: '1.2', unit: 'm' },
{ label: '巡检采样频率', value: '2', unit: 'Hz' }, { label: '巡检采样频率', value: '2', unit: 'Hz' },
].map((item, idx) => ( ].map((item, idx) => (
<Col span={6} key={idx}> <div
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 6 }}>{item.label}</div> key={idx}
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}> style={{
<Input size="small" defaultValue={item.value} style={{ width: '100%', height: 26, borderRadius: 4, textAlign: 'center', fontWeight: 600 }} /> background: '#F7F8FA',
<span style={{ fontSize: 11, color: '#4E5969' }}>{item.unit}</span> borderRadius: 8,
padding: '4px 10px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between'
}}
>
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
<span style={{ fontSize: 16, fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
<span style={{ fontSize: 11, color: '#86909C' }}>{item.unit}</span>
</div> </div>
</Col> </div>
))} ))}
</Row> </div>
<Divider style={{ margin: '16px 0' }} />
<div style={{ display: 'flex', gap: 32 }}> <div style={{ display: 'flex', gap: 32, marginBottom: 8 }}>
<Space size={8}> <Space size={8}>
<span style={{ fontSize: fontNormal, color: '#4E5969' }}>避障开关</span> <span style={{ fontSize: fontNormal, color: '#4E5969' }}>避障开关</span>
<Switch size="small" defaultChecked /> <Switch size="small" defaultChecked />
@@ -686,7 +696,6 @@ export default function WayLinePage({ planedevices }) {
<Switch size="small" /> <Switch size="small" />
</Space> </Space>
</div> </div>
<Divider style={{ margin: '16px 0' }} />
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}> <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
{/* 执行/挂起/继续 逻辑 */} {/* 执行/挂起/继续 逻辑 */}
{selectedTask?.status === 'executing' || selectedTask?.status === 'running' || selectedTask?.status === 'restored' ? ( {selectedTask?.status === 'executing' || selectedTask?.status === 'running' || selectedTask?.status === 'restored' ? (
@@ -697,7 +706,7 @@ export default function WayLinePage({ planedevices }) {
onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')} onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')}
loading={loading} loading={loading}
// 统一样式:高度36 + 圆角18 + 字重600 + 图标文字居中 // 统一样式:高度36 + 圆角18 + 字重600 + 图标文字居中
style={{ height: 36, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }} style={{ height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
> >
挂起任务 挂起任务
</Button> </Button>
@@ -714,7 +723,7 @@ export default function WayLinePage({ planedevices }) {
}} }}
loading={loading} loading={loading}
// 统一样式:主色#165DFF + 高度36 + 圆角18 + 字重600 // 统一样式:主色#165DFF + 高度36 + 圆角18 + 字重600
style={{ background: '#165DFF', height: 36, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }} style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
> >
{selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'} {selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}
</Button> </Button>
@@ -726,7 +735,7 @@ export default function WayLinePage({ planedevices }) {
icon={isReturningHome ? <X size={16} /> : <MapPin size={16} />} icon={isReturningHome ? <X size={16} /> : <MapPin size={16} />}
onClick={() => sendFlightCommand(isReturningHome ? 'return_home_cancel' : 'return_home')} onClick={() => sendFlightCommand(isReturningHome ? 'return_home_cancel' : 'return_home')}
loading={flightCommandLoading} loading={flightCommandLoading}
style={{ background: '#165DFF', height: 36, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }} style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
> >
{isReturningHome ? '取消返航' : '返航'} {isReturningHome ? '取消返航' : '返航'}
</Button> </Button>
@@ -737,7 +746,7 @@ export default function WayLinePage({ planedevices }) {
icon={isTaskPaused ? <RotateCw size={16} /> : <Square size={16} />} icon={isTaskPaused ? <RotateCw size={16} /> : <Square size={16} />}
onClick={() => sendFlightCommand(isTaskPaused ? 'flighttask_recovery' : 'flighttask_pause')} onClick={() => sendFlightCommand(isTaskPaused ? 'flighttask_recovery' : 'flighttask_pause')}
loading={flightCommandLoading} loading={flightCommandLoading}
style={{ height: 36, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }} style={{ height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
> >
{isTaskPaused ? '恢复任务' : '暂停任务'} {isTaskPaused ? '恢复任务' : '暂停任务'}
</Button> </Button>
@@ -1286,6 +1295,6 @@ export default function WayLinePage({ planedevices }) {
</div> </div>
</Modal> </Modal>
</div> </div >
); );
} }