/** * 羚牛氢能 - 车辆网络 (Bilingual & Restrained Apple Engine) * Key: 1868920ac8ff6b6f88dbe9fa2609c183 * SecurityCode: 0b54a41143bec162788d01deba851340 */ // ========================================== // BILINGUAL TRANSLATION DICTIONARY // ========================================== const i18n = { zh: { vehicleModeTitle: '车辆网络', stationModeTitle: '加氢站网络', kpiTotalFleet: '车辆总数', kpiOnlineFleet: '当前在线运行', kpiDailyMileage: '今日运营里程', unitVehicles: '辆', unitStations: '座', btnVehicle: '车辆', btnStation: '加氢站', themeDark: '深色', themeLight: '浅色', mapStatusText: '全域实时节点已同步 · 15个省份 · 42座加氢站', legendPrimary: '核心区域 (>100)', legendMid: '重点分布 (20-100)', legendLow: '普通节点 (<20)', btnResetView: '复位视角', btn3dView: '3D/2D 视角', btnNationalView: '全国视图', mapFooterGis: '高质感地图引擎: 羚牛氢能GIS (AMap 3D Engine)', mapFooterStatus: '系统状态: 稳定连接 (AES-256)', hintNational: '视角: 全国运营态势', hintProvince: '视角: {prov}专向统计', panelStatusTitle: '车辆运营状态分布', panelRankTitle: '重点区域运营 TOP 排名', statusRunning: '运行中', statusStopped: '静止中', statusOffline: '离线', rankByFleet: '按车辆', rankByDist: '按里程', onlineText: '在线', fleetOverview: '📍 {prov}省运营概况', fleetTotalLabel: '车辆总量', onlineRunLabel: '在线运行', unitTail: '台', descLabel: '说明' }, en: { vehicleModeTitle: 'Vehicle Network', stationModeTitle: 'H₂ Station Network', kpiTotalFleet: 'Total Fleet', kpiOnlineFleet: 'Active Online', kpiDailyMileage: 'Today Mileage', unitVehicles: 'units', unitStations: 'stations', btnVehicle: 'Fleet', btnStation: 'H₂ Stations', themeDark: 'Dark', themeLight: 'Light', mapStatusText: 'Real-time Nodes Synced · 15 Provinces · 42 H₂ Stations', legendPrimary: 'Core (>100)', legendMid: 'Key (20-100)', legendLow: 'Standard (<20)', btnResetView: 'Reset View', btn3dView: '3D/2D View', btnNationalView: 'National View', mapFooterGis: 'Engine: Lingniu H₂ GIS (AMap 3D Engine)', mapFooterStatus: 'Status: Secure Connected (AES-256)', hintNational: 'View: National Overview', hintProvince: 'View: {prov} Focus', panelStatusTitle: 'Fleet Status Breakdown', panelRankTitle: 'TOP Regional Operations', statusRunning: 'Active', statusStopped: 'Idle', statusOffline: 'Offline', rankByFleet: 'By Fleet', rankByDist: 'By Mileage', onlineText: 'Online', fleetOverview: '📍 {prov} Province Overview', fleetTotalLabel: 'Total Fleet', onlineRunLabel: 'Active Fleet', unitTail: 'units', descLabel: 'Note' } }; // Province name English mapping const provinceEnMap = { '浙江': 'Zhejiang', '广东': 'Guangdong', '上海': 'Shanghai', '江苏': 'Jiangsu', '新疆': 'Xinjiang', '湖北': 'Hubei', '四川': 'Sichuan', '陕西': 'Shaanxi', '安徽': 'Anhui', '重庆': 'Chongqing', '山东': 'Shandong', '天津': 'Tianjin', '河南': 'Henan', '北京': 'Beijing' }; // ========================================== // STATE MANAGEMENT (DEFAULT: LIGHT MODE) // ========================================== let map = null; let markerList = []; let is3DPitch = true; let currentMode = 'vehicle'; // 'vehicle' | 'station' let currentTheme = 'theme-white'; // DEFAULT: LIGHT MODE (纯白/浅色模式) let currentLang = 'zh'; // 'zh' | 'en' let selectedProvince = null; let currentRankType = 'fleet'; // Province-Level Aggregates for Vehicle Operations const vehicleGeoNodes = [ { id: 'zj', name: '浙江', lnglat: [120.155070, 30.274085], count: 322, online: 286, dist: 168420, detail: '322台在途车辆 (在线率 88.8%)' }, { id: 'gd', name: '广东', lnglat: [113.264385, 23.129112], count: 209, online: 175, dist: 124150, detail: '209台大湾区冷链运力' }, { id: 'sh', name: '上海', lnglat: [121.473701, 31.230416], count: 54, online: 48, dist: 38200, detail: '54台港口短驳及城配集群' }, { id: 'js', name: '江苏', lnglat: [118.796877, 32.060255], count: 35, online: 31, dist: 28900, detail: '35台49吨牵引车集群' }, { id: 'xj', name: '新疆', lnglat: [87.617733, 43.792818], count: 28, online: 21, dist: 31200, detail: '28台重载矿用牵引车' }, { id: 'hb', name: '湖北', lnglat: [114.305393, 30.593099], count: 27, online: 24, dist: 21800, detail: '27台双飞翼货车' }, { id: 'sc', name: '四川', lnglat: [104.066541, 30.572269], count: 25, online: 22, dist: 24500, detail: '25台成渝零碳走廊车队' }, { id: 'sx', name: '陕西', lnglat: [108.948024, 34.263161], count: 19, online: 16, dist: 14200, detail: '19台物流货车' }, { id: 'ah', name: '安徽', lnglat: [117.283042, 31.861190], count: 19, online: 17, dist: 15600, detail: '19台长途牵引车' }, { id: 'cq', name: '重庆', lnglat: [106.551556, 29.563009], count: 16, online: 14, dist: 12800, detail: '16台厢式货车' }, { id: 'sd', name: '山东', lnglat: [117.000923, 36.675807], count: 90, online: 82, dist: 58300, detail: '90台青岛港重卡车队' }, { id: 'tj', name: '天津', lnglat: [117.200983, 39.084158], count: 6, online: 5, dist: 4200, detail: '6台港口短驳车' }, { id: 'hn', name: '河南', lnglat: [113.665412, 34.757975], count: 3, online: 3, dist: 2800, detail: '3台冷链物流车' }, { id: 'bj', name: '北京', lnglat: [116.407526, 39.904030], count: 1, online: 1, dist: 980, detail: '1台平谷干线示范车' } ]; // Province-Level Station Data const stationGeoNodes = [ { id: 'gd-st', name: '广东', lnglat: [113.264385, 23.129112], count: '12 站', online: 11, detail: '南海撬装站、佛山示范站等 12座' }, { id: 'sh-st', name: '上海', lnglat: [121.473701, 31.230416], count: '8 站', online: 8, detail: '嘉定70MPa加氢母站等 8座' }, { id: 'bj-st', name: '北京', lnglat: [116.407526, 39.904030], count: '6 站', online: 6, detail: '大兴国际氢能枢纽站等 6座' }, { id: 'js-st', name: '江苏', lnglat: [118.796877, 32.060255], count: '5 站', online: 5, detail: '苏州港加氢站等 5座' }, { id: 'zj-st', name: '浙江', lnglat: [120.155070, 30.274085], count: '4 站', online: 4, detail: '嘉兴嘉善站等 4座' }, { id: 'sd-st', name: '山东', lnglat: [117.000923, 36.675807], count: '3 站', online: 3, detail: '青岛港加氢站等 3座' }, { id: 'sc-st', name: '四川', lnglat: [104.066541, 30.572269], count: '2 站', online: 2, detail: '成都皮口加注中心等 2座' }, { id: 'hb-st', name: '湖北', lnglat: [114.305393, 30.593099], count: '2 站', online: 2, detail: '武汉东湖高新加氢站等 2座' } ]; // ========================================== // INITIALIZATION // ========================================== document.addEventListener('DOMContentLoaded', () => { initClock(); initAMapInstance(); renderRankingList(currentRankType); }); function initAMapInstance() { if (typeof AMap === 'undefined') return; map = new AMap.Map('amapContainer', { zoom: 4.8, center: [108.948024, 34.263161], viewMode: '3D', pitch: 30, mapStyle: getAMapThemeStyle(currentTheme), showBuildingBlock: false, showLabel: true }); map.on('complete', () => { renderAMapMarkers(); }); } function getAMapThemeStyle(theme) { return (theme === 'theme-white') ? 'amap://styles/light' : 'amap://styles/darkblue'; } function getLocalizedProv(name) { if (currentLang === 'en') { return provinceEnMap[name] || name; } return name; } // Render Restrained Province Markers function renderAMapMarkers() { if (!map) return; markerList.forEach(m => m.remove()); markerList = []; const nodes = (currentMode === 'vehicle') ? vehicleGeoNodes : stationGeoNodes; const cyanColor = getThemeColor('--accent-cyan', '#0284C7'); const cardBg = getThemeColor('--glass-bg', 'rgba(255, 255, 255, 0.85)'); const textMain = getThemeColor('--text-main', '#1D1D1F'); const cardBorder = getThemeColor('--glass-border', 'rgba(0, 0, 0, 0.08)'); const dict = i18n[currentLang]; nodes.forEach(node => { const isSelected = (selectedProvince === node.name); const dotColor = cyanColor; const displayName = getLocalizedProv(node.name); const markerContent = document.createElement('div'); markerContent.className = 'province-info-badge-wrap'; markerContent.innerHTML = `