| | |
| | | import React from 'react'; |
| | | import { |
| | | AppBar, |
| | | Toolbar, |
| | | TextField, |
| | | Select, |
| | | MenuItem, |
| | |
| | | ]; |
| | | |
| | | return ( |
| | | <div> |
| | | <Box |
| | | sx={{ |
| | | height: '100%', |
| | | display: 'flex', |
| | | flexDirection: 'column', |
| | | }} |
| | | > |
| | | {/* 菜单栏 */} |
| | | <AppBar position="static"> |
| | | <Toolbar> |
| | | {/* 左侧搜索框 */} |
| | | <TextField |
| | | variant="outlined" |
| | | size="small" |
| | | placeholder="搜索..." |
| | | style={{ marginRight: 'auto' }} |
| | | /> |
| | | {/* 模式选择下拉框 */} |
| | | <Select |
| | | value={mode} |
| | | onChange={handleModeChange} |
| | | variant="outlined" |
| | | size="small" |
| | | style={{ marginRight: 16 }} |
| | | > |
| | | <MenuItem value="monitoring">监控模式</MenuItem> |
| | | <MenuItem value="edit">编辑模式</MenuItem> |
| | | <MenuItem value="configuration">配置模式</MenuItem> |
| | | </Select> |
| | | {/* 功能按钮 */} |
| | | <Button variant="contained" color="primary" style={{ marginRight: 8 }}> |
| | | 停止RCS运转 |
| | | </Button> |
| | | <Button variant="contained" color="secondary"> |
| | | 模拟AGV运行 |
| | | </Button> |
| | | </Toolbar> |
| | | </AppBar> |
| | | <Box |
| | | sx={{ |
| | | display: 'flex', |
| | | alignItems: 'center', |
| | | backgroundColor: 'rgb(47, 104, 172)', // 使用主题颜色 |
| | | color: '#fff', |
| | | padding: '8px 16px', |
| | | }} |
| | | > |
| | | {/* 左侧搜索框 */} |
| | | <TextField |
| | | variant="outlined" |
| | | size="small" |
| | | placeholder="搜索..." |
| | | sx={{ |
| | | width: '200px', |
| | | backgroundColor: '#fff', |
| | | borderRadius: 1, |
| | | }} |
| | | /> |
| | | {/* 占位符,推动右侧内容 */} |
| | | <Box sx={{ flexGrow: 1 }} /> |
| | | {/* 模式选择下拉框 */} |
| | | <Select |
| | | value={mode} |
| | | onChange={handleModeChange} |
| | | variant="outlined" |
| | | size="small" |
| | | sx={{ |
| | | mr: 2, |
| | | backgroundColor: '#fff', |
| | | borderRadius: 1, |
| | | }} |
| | | > |
| | | <MenuItem value="monitoring">监控模式</MenuItem> |
| | | <MenuItem value="edit">编辑模式</MenuItem> |
| | | <MenuItem value="configuration">配置模式</MenuItem> |
| | | </Select> |
| | | {/* 功能按钮 */} |
| | | <Button |
| | | variant="contained" |
| | | color="primary" |
| | | sx={{ mr: 1 }} |
| | | > |
| | | 停止RCS运转 |
| | | </Button> |
| | | <Button variant="contained" color="secondary"> |
| | | 模拟AGV运行 |
| | | </Button> |
| | | </Box> |
| | | {/* 地图区域 */} |
| | | <Box |
| | | sx={{ |
| | | height: 'calc(100vh - 64px)', // 减去AppBar的高度 |
| | | flexGrow: 1, |
| | | position: 'relative', |
| | | backgroundColor: '#e0e0e0', // 更美观的背景色 |
| | | }} |
| | | > |
| | | {/* 地图占位符 */} |
| | |
| | | sx={{ |
| | | width: '100%', |
| | | height: '100%', |
| | | backgroundColor: '#f0f0f0', |
| | | backgroundColor: '#f5f5f5', |
| | | }} |
| | | /> |
| | | {/* Speed Dial组件 */} |
| | |
| | | ))} |
| | | </SpeedDial> |
| | | </Box> |
| | | </div> |
| | | </Box> |
| | | ); |
| | | } |
| | | |