This commit is contained in:
yiqiuyang
2025-09-10 08:48:38 +08:00

View File

@ -220,7 +220,7 @@ export default {
this.clear() this.clear()
}, },
async getMapOption() { async getMapOption() {
await fetch('/config/map.json') await fetch('./config/map.json')
.then((response) => { .then((response) => {
return response.json() return response.json()
}) })
@ -311,7 +311,7 @@ export default {
// const shpJson = await shp(shpBuffer); // {features: [...]} // const shpJson = await shp(shpBuffer); // {features: [...]}
// 1. 读取本地 jeojson // 1. 读取本地 jeojson
const shpBuffer = await fetch('/config/dao.geojson') const shpBuffer = await fetch('./config/dao.geojson')
.then((response) => { .then((response) => {
return response.json() return response.json()
}) })
@ -343,15 +343,15 @@ export default {
}, },
// 弹框 // 弹框
async openDialog() { async openDialog() {
await fetch('/data/minTurnRadius.json') await fetch('./data/minTurnRadius.json')
.then((response) => { .then((response) => {
return response.json() return response.json()
}) })
.then((data) => { .then((data) => {
this.tableData = data this.tableData = data
}) })
.catch((error) => {}) .catch((error) => {})
this.dialogVisible = true this.dialogVisible = true;
}, },
handleSelectionChange({records}) { handleSelectionChange({records}) {
this.multipleSelection = records this.multipleSelection = records
@ -969,7 +969,7 @@ export default {
}, },
async calculateShortestPath() { async calculateShortestPath() {
if (!this.pointQD || !this.pointZD || !this.roadNetworkGeoJSON) { if (!this.pointQD || !this.pointZD || !this.roadNetworkGeoJSON) {
alert('请先加载路网数据并绘制障碍面、起点和终点!') this.$message.warning('请先加载路网数据并绘制障碍面、起点和终点!')
return return
} }
this.shortestPathLayer.clear() this.shortestPathLayer.clear()