From e1c2e6e4aac609eabfd49dc42302eb3d89f94996 Mon Sep 17 00:00:00 2001 From: g82tt Date: Sat, 18 Oct 2025 03:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=9B=BE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- .../MapData/1977947221534052352.zip | Bin 0 -> 7122 bytes .../api/Map/Data/1977947221534052352 | 2 +- .../22776dd7-b5eb-494c-8d6f-370aba42cc28.glb | Bin 0 -> 18940 bytes .../3e92eb0b-45aa-46ea-ac48-9fd6cae36cc4.glb | Bin 0 -> 50468 bytes .../9dd0f3b2-6604-4cfe-a1a1-6d0c3a545dc7.glb | Bin 0 -> 101056 bytes .../www.wxb3d.com/saas/sdk/v2.0/VgoMap.umd.js | 9 +- src/components/DisplayRouteLine.vue | 6 +- src/components/Filter.vue | 7 +- src/hooks/useNavi.js | 14 ++- src/router/index.js | 98 +++++++++--------- src/views/Key/KeyRecord.vue | 4 + src/views/Path/PathEditor.vue | 3 +- 13 files changed, 84 insertions(+), 61 deletions(-) create mode 100644 public/api.vgomap.com/MapData/1977947221534052352.zip create mode 100644 public/vgo-1258766855.cos.ap-nanjing.myqcloud.com/saas/general/22776dd7-b5eb-494c-8d6f-370aba42cc28.glb create mode 100644 public/vgo-1258766855.cos.ap-nanjing.myqcloud.com/saas/general/3e92eb0b-45aa-46ea-ac48-9fd6cae36cc4.glb create mode 100644 public/vgo-1258766855.cos.ap-nanjing.myqcloud.com/saas/general/9dd0f3b2-6604-4cfe-a1a1-6d0c3a545dc7.glb diff --git a/index.html b/index.html index 1368087..7cc05fd 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ diff --git a/src/components/Filter.vue b/src/components/Filter.vue index 0fdc10e..ed408e9 100644 --- a/src/components/Filter.vue +++ b/src/components/Filter.vue @@ -53,8 +53,8 @@ const markerStatus = ref({}); const checkedStatus = ref({}) watch(checkedStatus, (checked) => { for (let key in checked) { - markerStatus.value[key].forEach((marker) => { - marker.visible = checked[key] + markerStatus.value?.[key]?.forEach((marker) => { + marker.visible = !checked[key] }) } }, { @@ -67,7 +67,8 @@ function createDivMarker(content, polygon) { contentNode.className = "marker" contentNode.textContent = content contentNode.onclick = (e) => { - routeLineRef.value.addPathId(polygon.id) + if(!polygon?.isNavi) return + routeLineRef.value.addPath(polygon) } wrapper.appendChild(contentNode) diff --git a/src/hooks/useNavi.js b/src/hooks/useNavi.js index 9a70635..f57736c 100644 --- a/src/hooks/useNavi.js +++ b/src/hooks/useNavi.js @@ -2,9 +2,20 @@ import { ref, watch } from "vue" export function useNavi(map) { const pathIdList = ref([]) + + function addPath(polygon) { + if(polygon?.id && pathIdList.value[pathIdList.value.length - 1] === polygon?.id) return // 不连续添加相同的项 + + const modelId = polygon.extrasModelId; + const model = map.value.getModelById(modelId) + const modelName = model.userData.modelData.name + console.log(modelName, 'model.name') + + addPathId(polygon.id) + } function addPathId(id) { - if(pathIdList.value[pathIdList.value.length - 1] === id) return + if(id && pathIdList.value[pathIdList.value.length - 1] === id) return pathIdList.value.push(id) } @@ -70,6 +81,7 @@ export function useNavi(map) { return { pathIdList, + addPath, addPathId, startNavi, pauseNavi, diff --git a/src/router/index.js b/src/router/index.js index e6c70b4..a15e43b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -74,54 +74,54 @@ const router = createRouter({ } }, { - path: '/Path/PathManager', - name: 'pathManager', - components: { - map: HomeView, // 左侧显示地图视图 - right: PathManager // 右侧显示巡检路径管理视图 - } - }, - { - path: '/Path/PathSchedule', - name: 'pathSchedule', - components: { - map: HomeView, // 左侧显示地图视图 - right: PathSchedule // 右侧显示巡检计划管理视图 - } - }, - { - path: '/Path/PathLog', - name: 'pathLog', - components: { - map: HomeView, // 左侧显示地图视图 - right: PathLog // 右侧显示巡检日志管理视图 - } - }, - { - path: '/Car/CarManager', - name: 'carManager', - components: { - map: HomeView, // 左侧显示地图视图 - right: CarManager // 右侧显示车辆管理视图 - } - }, - { - path: '/Car/CarUseLog', - name: 'carUseLog', - components: { - map: HomeView, // 左侧显示地图视图 - right: CarUseLog // 右侧显示车辆使用记录视图 - } - }, - { - path: '/Car/CarEntryExitLog', - name: 'carEntryExitLog', - components: { - map: HomeView, // 左侧显示地图视图 - right: CarEntryExitLog // 右侧显示车辆进出记录视图 - } - } - // 可以在这里添加更多子路由 + path: '/Path/PathManager', + name: 'pathManager', + components: { + map: HomeView, // 左侧显示地图视图 + right: PathManager // 右侧显示巡检路径管理视图 + } + }, + { + path: '/Path/PathSchedule', + name: 'pathSchedule', + components: { + map: HomeView, // 左侧显示地图视图 + right: PathSchedule // 右侧显示巡检计划管理视图 + } + }, + { + path: '/Path/PathLog', + name: 'pathLog', + components: { + map: HomeView, // 左侧显示地图视图 + right: PathLog // 右侧显示巡检日志管理视图 + } + }, + { + path: '/Car/CarManager', + name: 'carManager', + components: { + map: HomeView, // 左侧显示地图视图 + right: CarManager // 右侧显示车辆管理视图 + } + }, + { + path: '/Car/CarUseLog', + name: 'carUseLog', + components: { + map: HomeView, // 左侧显示地图视图 + right: CarUseLog // 右侧显示车辆使用记录视图 + } + }, + { + path: '/Car/CarEntryExitLog', + name: 'carEntryExitLog', + components: { + map: HomeView, // 左侧显示地图视图 + right: CarEntryExitLog // 右侧显示车辆进出记录视图 + } + } + // 可以在这里添加更多子路由 ] } ] @@ -134,7 +134,7 @@ const router = createRouter({ router.beforeEach((to, from, next) => { const userStore = useUserStore() // 获取用户状态管理实例 const isLoggedIn = userStore.isLoggedIn // 检查用户是否已登录 - + // 检查路由是否需要身份验证 if (to.matched.some(record => record.meta.requiresAuth)) { // 需要身份验证的路由 diff --git a/src/views/Key/KeyRecord.vue b/src/views/Key/KeyRecord.vue index 9d971d2..3254f76 100644 --- a/src/views/Key/KeyRecord.vue +++ b/src/views/Key/KeyRecord.vue @@ -290,6 +290,10 @@ onMounted(() => { backdrop-filter: blur(5px); } +:deep(.el-table tr){ + background: transparent !important; +} + :deep(.el-table__header th) { background: rgba(12, 43, 77, 0.7) !important; border-bottom: 1px solid #68c9ff !important; diff --git a/src/views/Path/PathEditor.vue b/src/views/Path/PathEditor.vue index 962fd7a..b428c59 100644 --- a/src/views/Path/PathEditor.vue +++ b/src/views/Path/PathEditor.vue @@ -41,12 +41,13 @@ +

路径地图

- +