From 53b288b94d9828c530ac3ed7695327323f9ec107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=AA?= <727393967@qq.com> Date: Wed, 16 Oct 2024 09:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=A3=80=E7=B4=A2=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataSearch.vue | 22 +++++++++++-------- .../sampleViews/formViews/DataType.vue | 10 ++++++++- .../sampleViews/formViews/Equipment.vue | 2 +- src/views/dataTransfer/voyageReg.vue | 1 + 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/views/dataSearch.vue b/src/views/dataSearch.vue index da20e70..6e93972 100644 --- a/src/views/dataSearch.vue +++ b/src/views/dataSearch.vue @@ -100,7 +100,7 @@
-

{{ item.voyage_name }} {{ item.voyage_mileage }}海里

+

{{ item.voyage_name }} {{ item.voyage_mileage }}海里

{{ item.funding_org }}
@@ -216,6 +216,7 @@ export default { job: '', chooseStation: null, chooseLine: null, + currentVoyage: null, // 当前选中的航次 // 地图图层基础地址 CesiumHostAddr: '' } @@ -384,7 +385,7 @@ export default { res2.array.forEach(point => { points.push(Number(point.nav_lon), Number(point.nav_lat)) }) - this.drawLine(index, item.tsy_id, points) + this.drawLine(index, item.tsy_id, points, '航次航线') // 将坐标点添加到航次列表中 item.points = points }) @@ -404,7 +405,7 @@ export default { // 格式化坐标点 res.array.forEach(line => { if (line.start_lon && line.start_lat && line.end_lon && line.end_lat) { - this.drawLine(index, line.tsy_id, [Number(line.start_lon), Number(line.start_lat), Number(line.end_lon), Number(line.end_lat)]) + this.drawLine(index, line.tsy_id, [Number(line.start_lon), Number(line.start_lat), Number(line.end_lon), Number(line.end_lat)], '样品航线') } }) }) @@ -430,7 +431,7 @@ export default { res.array.forEach(point => { points.push(Number(point.track_lon), Number(point.track_lat)) }) - this.drawLine(index, item.tsy_id, points) + this.drawLine(index, item.tsy_id, points, '数据样品集航线') // 将坐标点添加到航次列表中 item.points = points }) @@ -484,14 +485,17 @@ export default { const pickedObject = this.viewer.scene.pick(click.position); this.currenSample = pickedObject.id._id const type = pickedObject.id._type - if (type === 'line') { - this.job = '测线作业' - } else { + if (type === 'point') { this.job = '站位作业' + } else { + this.job = '测线作业' } this.onSample({ tsy_id: pickedObject.id._id }) + if (type === '航次航线') { + this.currentVoyage = pickedObject.id._id + } }, Cesium.ScreenSpaceEventType.LEFT_CLICK); // 叠加叠加影像服务 @@ -532,10 +536,10 @@ export default { this.viewer.imageryLayers.addImageryProvider(shipline) }, /* cesium 绘制线 */ - drawLine(index, id, degreeArr) { + drawLine(index, id, degreeArr, type) { this.viewer.entities.add({ id: id, - type: 'line', + type: type, polyline: { //polyline折线实体 positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),//位置 clampToGround: true, //地表层高度模式, diff --git a/src/views/dataTransfer/sampleViews/formViews/DataType.vue b/src/views/dataTransfer/sampleViews/formViews/DataType.vue index f246ae9..deba783 100644 --- a/src/views/dataTransfer/sampleViews/formViews/DataType.vue +++ b/src/views/dataTransfer/sampleViews/formViews/DataType.vue @@ -1,5 +1,8 @@