<!DOCTYPE html>  
<html lang="zh-CN">  
<head>  
    <meta charset="UTF-8">  
    <meta name="viewport" content="width=device-width, initial-scale=1.0">  
    <title>智能物流系统 - 路径规划</title>  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">  
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.3/echarts.min.js"></script>  
    <style>  
        * {  
            margin: 0;  
            padding: 0;  
            box-sizing: border-box;  
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;  
        }  
  
        body {  
            display: flex;  
            background-color: #f5f7fa;  
            color: #333;  
        }  
  
        .sidebar {  
            background-color: #2c3e50;  
            color: white;  
            width: 250px;  
            height: 100vh;  
            padding: 20px;  
            position: fixed;  
            left: 0;  
            top: 0;  
            overflow-y: auto;  
        }  
  
        .logo {  
            margin-bottom: 30px;  
            font-size: 20px;  
            font-weight: bold;  
            display: flex;  
            align-items: center;  
            padding: 10px 0;  
            border-bottom: 1px solid #34495e;  
        }  
  
        .logo i {  
            margin-right: 10px;  
            font-size: 24px;  
        }  
  
        .sidebar ul {  
            list-style: none;  
            padding: 0;  
        }  
  
        .sidebar li {  
            padding: 12px 15px;  
            margin-bottom: 5px;  
            cursor: pointer;  
            border-radius: 4px;  
            transition: all 0.3s ease;  
            display: flex;  
            align-items: center;  
        }  
  
        .sidebar li:hover {  
            background-color: #34495e;  
        }  
  
        .sidebar li.active {  
            background-color: #3498db;  
        }  
  
        .sidebar li i {  
            margin-right: 10px;  
            width: 20px;  
            text-align: center;  
        }  
  
        .main-content {  
            flex: 1;  
            margin-left: 250px;  
            padding: 20px;  
        }  
  
        .header {  
            display: flex;  
            justify-content: space-between;  
            align-items: center;  
            margin-bottom: 20px;  
            padding-bottom: 15px;  
            border-bottom: 1px solid #e0e6ed;  
        }  
  
        .header h1 {  
            color: #2c3e50;  
            font-size: 24px;  
            display: flex;  
            align-items: center;  
        }  
  
        .header h1 i {  
            margin-right: 10px;  
            color: #3498db;  
        }  
  
        .time-display {  
            background-color: #e3f2fd;  
            padding: 8px 15px;  
            border-radius: 20px;  
            font-size: 14px;  
            color: #1976d2;  
            font-weight: 500;  
        }  
  
        .route-form {  
            background: white;  
            border-radius: 8px;  
            padding: 20px;  
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);  
            margin-bottom: 20px;  
        }  
  
        .form-row {  
            display: flex;  
            gap: 15px;  
            margin-bottom: 15px;  
        }  
  
        .form-group {  
            flex: 1;  
        }  
  
        .form-group label {  
            display: block;  
            margin-bottom: 8px;  
            font-weight: 500;  
            color: #2c3e50;  
        }  
  
        .form-group input, .form-group select {  
            width: 100%;  
            padding: 12px 15px;  
            border: 1px solid #ddd;  
            border-radius: 4px;  
            font-size: 14px;  
            transition: border 0.3s;  
        }  
  
        .form-group input:focus, .form-group select:focus {  
            border-color: #3498db;  
            outline: none;  
        }  
  
        .btn {  
            background-color: #3498db;  
            color: white;  
            border: none;  
            padding: 12px 25px;  
            border-radius: 4px;  
            cursor: pointer;  
            font-size: 16px;  
            font-weight: 500;  
            transition: background 0.3s;  
            display: flex;  
            align-items: center;  
            justify-content: center;  
        }  
  
        .btn i {  
            margin-right: 8px;  
        }  
  
        .btn:hover {  
            background-color: #2980b9;  
        }  
  
        .map-container {  
            background: white;  
            border-radius: 8px;  
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);  
            height: 500px;  
            position: relative;  
            overflow: hidden;  
        }  
  
        #map {  
            width: 100%;  
            height: 100%;  
        }  
  
        .route-info {  
            background: white;  
            border-radius: 8px;  
            padding: 20px;  
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);  
            margin-top: 20px;  
        }  
  
        .info-grid {  
            display: grid;  
            grid-template-columns: repeat(3, 1fr);  
            gap: 15px;  
            margin-top: 15px;  
        }  
  
        .info-card {  
            background: #f8f9fa;  
            border-radius: 6px;  
            padding: 15px;  
            border-left: 4px solid #3498db;  
        }  
  
        .info-card h3 {  
            font-size: 14px;  
            color: #7f8c8d;  
            margin-bottom: 8px;  
        }  
  
        .info-card p {  
            font-size: 18px;  
            font-weight: 600;  
            color: #2c3e50;  
        }  
  
        .info-card .value {  
            color: #3498db;  
        }  
  
        .optimization-result {  
            margin-top: 20px;  
            padding-top: 20px;  
            border-top: 1px solid #eee;  
        }  
  
        .result-item {  
            display: flex;  
            justify-content: space-between;  
            padding: 10px 0;  
            border-bottom: 1px solid #f0f0f0;  
        }  
  
        .result-item:last-child {  
            border-bottom: none;  
        }  
  
        .result-label {  
            font-weight: 500;  
            color: #7f8c8d;  
        }  
  
        .result-value {  
            font-weight: 600;  
            color: #2c3e50;  
        }  
  
        .improvement {  
            color: #27ae60;  
            font-weight: 500;  
        }  
  
        .map-overlay {  
            position: absolute;  
            top: 20px;  
            right: 20px;  
            background: rgba(255, 255, 255, 0.9);  
            padding: 15px;  
            border-radius: 8px;  
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);  
            z-index: 10;  
            width: 300px;  
        }  
  
        .traffic-legend {  
            display: flex;  
            justify-content: space-between;  
            margin-top: 10px;  
        }  
  
        .legend-item {  
            display: flex;  
            align-items: center;  
            font-size: 12px;  
        }  
  
        .legend-color {  
            width: 20px;  
            height: 10px;  
            margin-right: 5px;  
            border-radius: 2px;  
        }  
  
        .legend-1 { background-color: #27ae60; }  
        .legend-2 { background-color: #f1c40f; }  
        .legend-3 { background-color: #e67e22; }  
        .legend-4 { background-color: #e74c3c; }  
    </style>  
</head>  
<body>  
    <!-- 侧边栏 -->  
    <div class='sidebar'>  
        <div class='logo'>  
            <i class='fas fa-truck'></i>智能物流系统  
        </div>  
        <ul>  
            <li><i class='fas fa-home'></i>首页</li>  
            <li class="active"><i class='fas fa-map-marked-alt'></i>路径规划</li>  
            <li><i class='fas fa-chart-line'></i>数据分析</li>  
            <li><i class='fas fa-truck-moving'></i>车辆监控</li>  
            <li><i class='fas fa-exclamation-triangle'></i>异常处理</li>  
            <li><i class='fas fa-cog'></i>系统设置</li>  
            <li><i class='fas fa-user'></i>个人中心</li>  
            <li><i class='fas fa-sign-out-alt'></i>退出登录</li>  
        </ul>  
    </div>  
  
    <!-- 主内容区 -->  
    <div class="main-content">  
        <div class="header">  
            <h1><i class="fas fa-route"></i>路径规划</h1>  
            <div class="time-display">2023-05-15 14:30:25</div>  
        </div>  
  
        <div class="route-form">  
            <div class="form-row">  
                <div class="form-group">  
                    <label for="start-point"><i class="fas fa-map-marker-alt"></i> 起点</label>  
                    <input type="text" id="start-point" placeholder="输入起点位置">  
                </div>  
                <div class="form-group">  
                    <label for="end-point"><i class="fas fa-flag-checkered"></i> 终点</label>  
                    <input type="text" id="end-point" placeholder="输入终点位置">  
                </div>  
            </div>  
  
            <div class="form-row">  
                <div class="form-group">  
                    <label for="vehicle-type"><i class="fas fa-truck"></i> 车辆类型</label>  
                    <select id="vehicle-type">  
                        <option>小型货车 (载重1吨)</option>  
                        <option>中型货车 (载重3吨)</option>  
                        <option selected>大型货车 (载重5吨)</option>  
                        <option>冷链运输车</option>  
                    </select>  
                </div>  
                <div class="form-group">  
                    <label for="priority"><i class="fas fa-tachometer-alt"></i> 优化优先级</label>  
                    <select id="priority">  
                        <option>最短距离</option>  
                        <option>最短时间</option>  
                        <option selected>综合成本最优</option>  
                        <option>避开收费站</option>  
                    </select>  
                </div>  
            </div>  
  
            <button class="btn"><i class="fas fa-route"></i> 开始路径规划</button>  
        </div>  
  
        <div class="map-container">  
            <div id="map"></div>  
            <div class="map-overlay">  
                <h3>实时路况</h3>  
                <div class="traffic-legend">  
                    <div class="legend-item">  
                        <div class="legend-color legend-1"></div>  
                        <span>畅通</span>  
                    </div>  
                    <div class="legend-item">  
                        <div class="legend-color legend-2"></div>  
                        <span>缓行</span>  
                    </div>  
                    <div class="legend-item">  
                        <div class="legend-color legend-3"></div>  
                        <span>拥堵</span>  
                    </div>  
                    <div class="legend-item">  
                        <div class="legend-color legend-4"></div>  
                        <span>严重拥堵</span>  
                    </div>  
                </div>  
            </div>  
        </div>  
  
        <div class="route-info">  
            <h2><i class="fas fa-info-circle"></i> 路径信息</h2>  
            <div class="info-grid">  
                <div class="info-card">  
                    <h3>总距离</h3>  
                    <p class="value">58.7 <span>公里</span></p>  
                </div>  
                <div class="info-card">  
                    <h3>预计时间</h3>  
                    <p class="value">1小时 25分钟</p>  
                </div>  
                <div class="info-card">  
                    <h3>预估油耗</h3>  
                    <p class="value">18.6 <span></span></p>  
                </div>  
            </div>  
  
            <div class="optimization-result">  
                <h3><i class="fas fa-chart-line"></i> 优化效果</h3>  
                <div class="result-item">  
                    <span class="result-label">相比传统路径</span>  
                    <span class="result-value improvement">距离减少 12%</span>  
                </div>  
                <div class="result-item">  
                    <span class="result-label">时间节省</span>  
                    <span class="result-value improvement">22分钟</span>  
                </div>  
                <div class="result-item">  
                    <span class="result-label">成本降低</span>  
                    <span class="result-value improvement">¥86.50</span>  
                </div>  
            </div>  
        </div>  
    </div>  
  
    <script>  
        // 初始化地图  
        const mapChart = echarts.init(document.getElementById('map'));  
  
        // 模拟地图数据  
        const option = {  
            backgroundColor: '#fff',  
            title: {  
                text: '上海市物流配送路线',  
                left: 'center',  
                textStyle: {  
                    color: '#2c3e50'  
                }  
            },  
            tooltip: {  
                trigger: 'item',  
                formatter: '{b}'  
            },  
            series: [{  
                name: '路线规划',  
                type: 'lines',  
                coordinateSystem: 'cartesian2d',  
                polyline: true,  
                lineStyle: {  
                    width: 3,  
                    color: '#3498db',  
                    type: 'solid',  
                    curveness: 0.3  
                },  
                effect: {  
                    show: true,  
                    period: 3,  
                    trailLength: 0.4,  
                    symbol: 'arrow',  
                    symbolSize: 6,  
                    color: '#fff'  
                },  
                data: [{  
                    coords: [  
                        [121.30, 31.25], // 起点  
                        [121.35, 31.28],  
                        [121.40, 31.30],  
                        [121.45, 31.32],  
                        [121.50, 31.35]  // 终点  
                    ]  
                }]  
            }, {  
                name: '关键节点',  
                type: 'scatter',  
                coordinateSystem: 'cartesian2d',  
                symbolSize: 10,  
                itemStyle: {  
                    color: '#3498db'  
                },  
                data: [  
                    {name: '仓库A', value: [121.30, 31.25]},  
                    {name: '配送点B', value: [121.40, 31.30]},  
                    {name: '客户C', value: [121.50, 31.35]}  
                ]  
            }],  
            xAxis: {  
                min: 121.2,  
                max: 121.6,  
                type: 'value',  
                axisLine: {show: false},  
                axisTick: {show: false},  
                axisLabel: {show: false}  
            },  
            yAxis: {  
                min: 31.2,  
                max: 31.4,  
                type: 'value',  
                axisLine: {show: false},  
                axisTick: {show: false},  
                axisLabel: {show: false}  
            },  
            grid: {  
                left: 0,  
                right: 0,  
                top: 40,  
                bottom: 0  
            }  
        };  
  
        mapChart.setOption(option);  
  
        // 响应窗口大小变化  
        window.addEventListener('resize', function() {  
            mapChart.resize();  
        });  
    </script>  
</body>  
</html>  
问题反馈