From b2e2ce4343b562ac85f774bb25969db8e86cffd8 Mon Sep 17 00:00:00 2001 From: gcw_IJ7DAiVL Date: Wed, 10 Sep 2025 08:26:56 +0800 Subject: [PATCH 1/2] fix --- src/views/home.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index be6e7d1..b62e796 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -191,7 +191,7 @@ export default { this.clear() }, async getMapOption() { - await fetch('/config/map.json') + await fetch('./config/map.json') .then((response) => { return response.json() }) @@ -278,7 +278,7 @@ export default { // const shpJson = await shp(shpBuffer); // {features: [...]} // 1. 读取本地 jeojson - const shpBuffer = await fetch('/config/dao.geojson') + const shpBuffer = await fetch('./config/dao.geojson') .then((response) => { return response.json() }) @@ -310,7 +310,7 @@ export default { }, // 弹框 async openDialog() { - await fetch('/data/minTurnRadius.json') + await fetch('./data/minTurnRadius.json') .then((response) => { return response.json() }) From 0c59002bd4048438b780b43e721a606a56b4796b Mon Sep 17 00:00:00 2001 From: gcw_IJ7DAiVL Date: Wed, 10 Sep 2025 08:30:28 +0800 Subject: [PATCH 2/2] fix --- src/views/home.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/home.vue b/src/views/home.vue index b62e796..86eb775 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -829,7 +829,7 @@ export default { }, async calculateShortestPath() { if (!this.pointQD || !this.pointZD || !this.roadNetworkGeoJSON) { - alert('请先加载路网数据并绘制障碍面、起点和终点!') + this.$message.warning('请先加载路网数据并绘制障碍面、起点和终点!') return } this.shortestPathLayer.clear()