diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1b3251e --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +# 复制为 .env.development / .env.local 后填写 +# Vite 通过 envPrefix: 'APP_' 暴露给前端 + +# 天地图 token(必填,否则 MapLayer 跳过初始化) +# 申请:https://console.tianditu.gov.cn/ +APP_TIANDITU_TOKEN= + +# 默认地图中心(经度 / 纬度)与缩放级别 +APP_MAP_CENTER_LNG=106.62341584179686 +APP_MAP_CENTER_LAT=26.657826154258505 +APP_MAP_ZOOM=5 diff --git a/.gitignore b/.gitignore index 7535211..a238099 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules dist *.log .DS_Store +.env.local +.env.*.local diff --git a/src/layout/components/SideMenu.vue b/src/layout/components/SideMenu.vue index d2c48b6..3985b4a 100644 --- a/src/layout/components/SideMenu.vue +++ b/src/layout/components/SideMenu.vue @@ -128,6 +128,13 @@ async function logout() { 告警运维 + + + + + 操作日志 + + diff --git a/src/styles/prototype.css b/src/styles/prototype.css index c7d2353..04d95cf 100644 --- a/src/styles/prototype.css +++ b/src/styles/prototype.css @@ -363,12 +363,9 @@ svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: .waypoint-item-actions { display: flex; align-items: center; }.waypoint-item-actions button { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 3px; color: #788792; background: transparent; }.waypoint-item-actions button:hover { color: var(--blue); background: #eaf2fc; }.waypoint-item-actions button:last-child:hover { color: var(--red); background: #fff0f0; }.waypoint-item-actions button svg { width: 11px; } .route-form-error { min-height: 25px; padding-top: 8px; color: var(--red); font-size: 10px; } .route-planner-map { position: relative; min-width: 0; min-height: 430px; overflow: hidden; background: #75887a; cursor: crosshair; isolation: isolate; } -.route-map-base { position: absolute; inset: 0; background-image: linear-gradient(rgba(20,45,42,.06), rgba(20,45,42,.16)), url("/assets/map-base-clean.png"); background-size: cover; background-position: center; filter: saturate(.58) contrast(.94); transform: scale(1.01); } -.route-drawing { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; } -.route-drawing polyline { fill: none; stroke: #2d82da; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(12,37,58,.35)); } -.route-drawing circle { stroke: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 3px rgba(12,31,43,.4)); } -.route-drawing text { fill: #fff; font-size: 16px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; } -.route-map-status, .route-map-legend { position: absolute; z-index: 3; display: flex; align-items: center; border-radius: 4px; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(20,36,45,.13); color: #52616d; font-size: 10px; } +.route-planner-map > .maptalks-wrapper, +.route-planner-map > #map { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; z-index: 0; } +.route-map-status, .route-map-legend { position: absolute; z-index: 5; display: flex; align-items: center; border-radius: 4px; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(20,36,45,.13); color: #52616d; font-size: 10px; pointer-events: none; } .route-map-status { top: 12px; right: 12px; height: 30px; padding: 0 9px; gap: 13px; }.route-map-status span { display: flex; align-items: center; gap: 5px; }.route-map-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); } .route-map-legend { right: 12px; bottom: 12px; height: 31px; padding: 0 10px; gap: 11px; }.route-map-legend span { display: flex; align-items: center; gap: 4px; }.route-map-legend i { width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #7e8c97; }.route-map-legend i.start { background: var(--green); }.route-map-legend i.end { background: #c56c28; } .waypoint-dialog { width: min(540px, 100%); }.waypoint-id-row { min-height: 42px; margin-bottom: 14px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 4px; background: #f4f6f8; }.waypoint-id-row span { color: var(--muted); font-size: 11px; }.waypoint-id-row strong { font-size: 14px; }.waypoint-dialog .number-input input { padding-right: 38px; }.waypoint-turn-segment { height: 38px; grid-template-columns: repeat(2, minmax(0, 1fr)); } diff --git a/src/views/TasksView/TasksView.vue b/src/views/TasksView/TasksView.vue index 0399435..a8c54f2 100644 --- a/src/views/TasksView/TasksView.vue +++ b/src/views/TasksView/TasksView.vue @@ -152,10 +152,8 @@ {{ routeFormError }} - - - {{ index + 1 }} - 地图已加载{{ routeCursor }} + + {{ routeMapReady ? '地图已加载' : '地图加载中…' }}{{ routeCursor }} 起点航点终点 @@ -215,12 +213,18 @@