From 40f6fb590c67adece6d297a32db42b100a4f110b Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 21 Nov 2025 09:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/model-manage/index.vue | 35 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/views/basic/model-manage/index.vue b/src/views/basic/model-manage/index.vue index 2808a40..e9e898f 100644 --- a/src/views/basic/model-manage/index.vue +++ b/src/views/basic/model-manage/index.vue @@ -708,6 +708,7 @@ export default { // 根据newPointList 中的type绘制线和半圆 newPointList.forEach((item) => { if (item.type === 'line') { + console.log(item, 'item画直线, ') const line = new BMapGL.Polyline( [ new BMapGL.Point(item.start[0], item.start[1]), @@ -724,18 +725,30 @@ export default { console.log('画半圆', item) // 绘制半圆弧线 if (item.start_point && item.end_point && item.center && item.radius) { - const arcPoints = this.generateArcPoints( - item.center, - item.radius, - item.start_point, - item.end_point, + const line = new BMapGL.Polyline( + [ + new BMapGL.Point(item.start_point[0], item.start_point[1]), + new BMapGL.Point(item.end_point[0], item.end_point[1]), + ], + { + strokeColor: 'red', + strokeWeight: 2, + strokeOpacity: 0.8, + }, ) - const arcPolyline = new BMapGL.Polyline(arcPoints, { - strokeColor: 'red', - strokeWeight: 2, - strokeOpacity: 0.8, - }) - this.map.addOverlay(arcPolyline) + this.map.addOverlay(line) + // const arcPoints = this.generateArcPoints( + // item.center, + // item.radius, + // item.start_point, + // item.end_point, + // ) + // const arcPolyline = new BMapGL.Polyline(arcPoints, { + // strokeColor: 'red', + // strokeWeight: 2, + // strokeOpacity: 0.8, + // }) + // this.map.addOverlay(arcPolyline) } else { // 如果没有起点和终点,则绘制完整圆(备用方案) const circle = new BMapGL.Circle(