优化代码消除 控制台的报错信息
This commit is contained in:
@@ -1110,12 +1110,14 @@ export default function RobotTaskPage() {
|
||||
{topCards.map((item, index) => (
|
||||
<Col xs={12} sm={8} md={4} key={index}>
|
||||
<Card
|
||||
bordered={false}
|
||||
bodyStyle={{
|
||||
padding: '12px 14px',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
variant="borderless"
|
||||
styles={{
|
||||
body: {
|
||||
padding: '12px 14px',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
...cardStyle,
|
||||
@@ -1211,8 +1213,8 @@ export default function RobotTaskPage() {
|
||||
{/*<Button size="small" icon={<Maximize2 size={12} />} />*/}
|
||||
</Space>
|
||||
}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0, position: 'relative' }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: 0, position: 'relative' } }}
|
||||
style={{ ...cardStyle, marginBottom: 10 }}
|
||||
>
|
||||
<div style={{ width: '100%', height: 420, background: '#e8f3ff center/cover', position: 'relative' }}>
|
||||
@@ -1305,8 +1307,8 @@ export default function RobotTaskPage() {
|
||||
{/* 机器人任务模块,带Tab切换 */}
|
||||
<Card
|
||||
size="small"
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100%)", overflow: "auto" }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100%)", overflow: "auto" } }}
|
||||
style={{ ...cardStyle, maxHeight: "300px", flex: 1, marginBottom: 0 }}
|
||||
|
||||
>
|
||||
@@ -1537,31 +1539,52 @@ export default function RobotTaskPage() {
|
||||
<Col xs={24} xl={10} style={{ display: "flex", flexDirection: "column" }} >
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.operationSuggestion')}</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '12px 16px' }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: '12px 16px' } }}
|
||||
style={{ ...cardStyle, marginBottom: 8 }}
|
||||
>
|
||||
<Timeline mode="left">
|
||||
<Timeline.Item label="09:30" color="green">
|
||||
<Text strong>{t('devices.timelineMow', { robot: 'RBT-01' })}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMowDetail')}</div>
|
||||
</Timeline.Item>
|
||||
<Timeline.Item label="11:00" color="blue">
|
||||
<Text strong>{t('devices.timelineInspect', { robot: 'RBT-02' })}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineInspectDetail')}</div>
|
||||
</Timeline.Item>
|
||||
<Timeline.Item label="14:00" color="gray">
|
||||
<Text strong>{t('devices.timelineMaintenance')}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMaintenanceDetail')}</div>
|
||||
</Timeline.Item>
|
||||
</Timeline>
|
||||
<Timeline
|
||||
mode="left"
|
||||
items={[
|
||||
{
|
||||
color: 'green',
|
||||
label: '09:30',
|
||||
children: (
|
||||
<>
|
||||
<Text strong>{t('devices.timelineMow', { robot: 'RBT-01' })}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMowDetail')}</div>
|
||||
</>
|
||||
)
|
||||
},
|
||||
{
|
||||
color: 'blue',
|
||||
label: '11:00',
|
||||
children: (
|
||||
<>
|
||||
<Text strong>{t('devices.timelineInspect', { robot: 'RBT-02' })}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineInspectDetail')}</div>
|
||||
</>
|
||||
)
|
||||
},
|
||||
{
|
||||
color: 'gray',
|
||||
label: '14:00',
|
||||
children: (
|
||||
<>
|
||||
<Text strong>{t('devices.timelineMaintenance')}</Text>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMaintenanceDetail')}</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<Button type="primary" block style={{ marginTop: 16, borderRadius: 18 }}>{t('devices.autoGenerateTodayPlan')}</Button>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.deviceEnvironment')}</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: '16px' } }}
|
||||
style={{ ...cardStyle, flex: 1 }}
|
||||
>
|
||||
<Row gutter={[8, 8]}>
|
||||
@@ -1613,8 +1636,8 @@ export default function RobotTaskPage() {
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '12px', height: 400, overflow: 'auto' }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: '12px', height: 400, overflow: 'auto' } }}
|
||||
style={cardStyle}
|
||||
>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
@@ -1745,8 +1768,8 @@ export default function RobotTaskPage() {
|
||||
<Col xs={24} xl={18}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.taskBoard')}</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
variant="borderless"
|
||||
styles={{ body: { padding: '12px' } }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Row gutter={16}>
|
||||
|
||||
Reference in New Issue
Block a user