#
luxiaotao1123
2024-10-08 c19920d096e0d53b08653a1b6427341e64004fa3
zy-acs-flow/src/map/MapPage.jsx
@@ -1,7 +1,5 @@
import React from 'react';
import {
    AppBar,
    Toolbar,
    TextField,
    Select,
    MenuItem,
@@ -35,43 +33,70 @@
    ];
    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', // 更美观的背景色
                }}
            >
                {/* 地图占位符 */}
@@ -79,7 +104,7 @@
                    sx={{
                        width: '100%',
                        height: '100%',
                        backgroundColor: '#f0f0f0',
                        backgroundColor: '#f5f5f5',
                    }}
                />
                {/* Speed Dial组件 */}
@@ -97,7 +122,7 @@
                    ))}
                </SpeedDial>
            </Box>
        </div>
        </Box>
    );
}