From cc774db444d0d0a826a7e0b771a9c0a1d4a855bd Mon Sep 17 00:00:00 2001 From: gcw_IJ7DAiVL Date: Wed, 10 Sep 2025 08:55:33 +0800 Subject: [PATCH 1/3] 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 fb4e899..9e486d5 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -201,7 +201,6 @@ export default { } }, async mounted() { - console.log('go') this.viewer = null await this.getMapOption() this.$nextTick(async () => { @@ -235,6 +234,7 @@ export default { { ...this.mapOptions, scene: { + ...this.mapOptions.scene, // mode: Cesium.SceneMode.SCENE2D, center: { lat: 27.729862392917948, From 935846d7f2b66ea6f3f67d6d0a372536079f21e3 Mon Sep 17 00:00:00 2001 From: gcw_IJ7DAiVL Date: Wed, 10 Sep 2025 09:13:58 +0800 Subject: [PATCH 2/3] fix --- src/views/home.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index 9e486d5..8020bc2 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -33,12 +33,16 @@ @@ -47,6 +51,8 @@ v-model="item.points" placeholder="" @blur="pointsChange('viaPoints', item)" + @clear="pointsChange('viaPoints', item)" + clearable > @@ -56,17 +62,19 @@ v-model="item.points" placeholder="" @blur="pointsChange('avoidPoints', item)" + @clear="pointsChange('avoidPoints', item)" + clearable >
@@ -509,6 +517,7 @@ export default { }, // 输入框失去焦点 反向编辑点 pointsChange(type, row) { + console.log('111', type) if (type === 'startPoint') { if ( (!this.form.startPoint || From 3e7ccea682e49b06de2514a1c903a772892a6b09 Mon Sep 17 00:00:00 2001 From: gcw_IJ7DAiVL Date: Wed, 10 Sep 2025 09:34:52 +0800 Subject: [PATCH 3/3] fix --- public/data/minTurnRadius.json | 16 ++++++++-------- public/data/points.json | 26 +++++--------------------- src/views/home.vue | 14 +++++++++----- 3 files changed, 22 insertions(+), 34 deletions(-) diff --git a/public/data/minTurnRadius.json b/public/data/minTurnRadius.json index 58fe20f..6bae886 100644 --- a/public/data/minTurnRadius.json +++ b/public/data/minTurnRadius.json @@ -1,26 +1,26 @@ [ { "id": 1, - "width": 30, - "load": 500, + "width": 7, + "load": 3, "minTurnRadius": 5 }, { "id": 2, - "width": 10, - "load": 600, + "width": 11, + "load": 1, "minTurnRadius": 6 }, { "id": 3, - "width": 40, - "load": 700, + "width": 8, + "load": 7, "minTurnRadius": 10 }, { "id": 4, - "width": 20, - "load": 700, + "width": 10, + "load": 5, "minTurnRadius": 2 } ] \ No newline at end of file diff --git a/public/data/points.json b/public/data/points.json index 8d5a390..94e5f44 100644 --- a/public/data/points.json +++ b/public/data/points.json @@ -1,38 +1,22 @@ { - "startPoint": "114.262694,27.786216", - "endPoint": "114.274729,27.777062", + "startPoint": "114.26344,27.800982", + "endPoint": "114.284668,27.794961", "viaPoints": [ { "time": "1694352000000", - "points": "114.263233,27.777047" - }, - { - "time": "1694352001000", - "points": "114.265512,27.789935" - }, - { - "time": "1694352002000", - "points": "114.256863,27.780437" + "points": "114.272329,27.797299" } ], "avoidPoints": [ { "time": "1694352003000", - "points": "114.261166,27.800982" - }, - { - "time": "1694352004000", - "points": "114.251312,27.786932" + "points": "114.27882,27.792857" } ], "avoidAreas": [ { "time": "1694352005000", - "points": "[[114.267217,27.777566,0],[114.276695,27.78048,0],[114.276001,27.772547,0],[114.276001,27.772486,0]]" - }, - { - "time": "1694352006000", - "points": "[[114.272317,27.786501,0],[114.281341,27.79818,0],[114.290389,27.779594,0],[114.284888,27.773934,0]]" + "points": "[[114.272797,27.7935,0],[114.27268,27.794201,0],[114.27537,27.795838,0]]" } ] } \ No newline at end of file diff --git a/src/views/home.vue b/src/views/home.vue index 8020bc2..a182395 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -181,9 +181,9 @@ export default { tableData: [], multipleSelection: [], inputform: { - width: '', - load: '', - minTurnRadius: '', + width: 0, + load: 0, + minTurnRadius: 0, }, form: { startPoint: '', @@ -962,10 +962,13 @@ export default { const nextNode = pathNodes[j + 1] const segment = this.roadNetworkGeoJSON.features.find( (f) => - (f.properties.FNODE_ == currentNode && + ((f.properties.FNODE_ == currentNode && f.properties.TNODE_ == nextNode) || (f.properties.FNODE_ == nextNode && - f.properties.TNODE_ == currentNode) + f.properties.TNODE_ == currentNode) )&& + f.properties.载重吨 >= this.inputform.load && + f.properties.宽度 >= this.inputform.width && + f.properties.曲率半 <= this.inputform.minTurnRadius ) if (segment) { fullPath.push(...segment.geometry.coordinates[0]) @@ -1023,6 +1026,7 @@ export default { // 单独的路径绘制方法 drawPath(path) { const positions = path + if (positions.fullPath.length == 0) return const polyline = new window.mars3d.graphic.PolylinePrimitive({ positions: positions.fullPath, style: {