xx
This commit is contained in:
@@ -585,7 +585,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
}
|
||||
bordered={false}
|
||||
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
|
||||
size="small"
|
||||
@@ -655,7 +655,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
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: '6', unit: 'm/s' },
|
||||
@@ -666,17 +666,27 @@ export default function WayLinePage({ planedevices }) {
|
||||
{ label: '除草宽幅', value: '1.2', unit: 'm' },
|
||||
{ label: '巡检采样频率', value: '2', unit: 'Hz' },
|
||||
].map((item, idx) => (
|
||||
<Col span={6} key={idx}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 6 }}>{item.label}</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<Input size="small" defaultValue={item.value} style={{ width: '100%', height: 26, borderRadius: 4, textAlign: 'center', fontWeight: 600 }} />
|
||||
<span style={{ fontSize: 11, color: '#4E5969' }}>{item.unit}</span>
|
||||
<div
|
||||
key={idx}
|
||||
style={{
|
||||
background: '#F7F8FA',
|
||||
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>
|
||||
</Col>
|
||||
</div>
|
||||
))}
|
||||
</Row>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<div style={{ display: 'flex', gap: 32 }}>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', gap: 32, marginBottom: 8 }}>
|
||||
<Space size={8}>
|
||||
<span style={{ fontSize: fontNormal, color: '#4E5969' }}>避障开关</span>
|
||||
<Switch size="small" defaultChecked />
|
||||
@@ -686,7 +696,6 @@ export default function WayLinePage({ planedevices }) {
|
||||
<Switch size="small" />
|
||||
</Space>
|
||||
</div>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
|
||||
{/* 执行/挂起/继续 逻辑 */}
|
||||
{selectedTask?.status === 'executing' || selectedTask?.status === 'running' || selectedTask?.status === 'restored' ? (
|
||||
@@ -697,7 +706,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')}
|
||||
loading={loading}
|
||||
// 统一样式:高度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>
|
||||
@@ -714,7 +723,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
}}
|
||||
loading={loading}
|
||||
// 统一样式:主色#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' ? '继续任务' : '执行任务'}
|
||||
</Button>
|
||||
@@ -726,7 +735,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
icon={isReturningHome ? <X size={16} /> : <MapPin size={16} />}
|
||||
onClick={() => sendFlightCommand(isReturningHome ? 'return_home_cancel' : 'return_home')}
|
||||
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 ? '取消返航' : '返航'}
|
||||
</Button>
|
||||
@@ -737,7 +746,7 @@ export default function WayLinePage({ planedevices }) {
|
||||
icon={isTaskPaused ? <RotateCw size={16} /> : <Square size={16} />}
|
||||
onClick={() => sendFlightCommand(isTaskPaused ? 'flighttask_recovery' : 'flighttask_pause')}
|
||||
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 ? '恢复任务' : '暂停任务'}
|
||||
</Button>
|
||||
@@ -1286,6 +1295,6 @@ export default function WayLinePage({ planedevices }) {
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
</div >
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user