From f13afcb61276061871b30bce17a7877287df0b67 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Sat, 20 Jan 2024 09:56:43 +0800
Subject: [PATCH] 1

---
 src/views/activity/components/videoControlBox.vue |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/views/activity/components/videoControlBox.vue b/src/views/activity/components/videoControlBox.vue
index 41198ce..fd9638e 100644
--- a/src/views/activity/components/videoControlBox.vue
+++ b/src/views/activity/components/videoControlBox.vue
@@ -130,8 +130,6 @@
 import { getRegionList, getDevices } from '@/api/video/index.js'
 
 export default {
-    props: ['linePosition'],
-
     data () {
         return {
             valChoosed: '',
@@ -181,6 +179,8 @@
     mounted () {
         this.$nextTick(() => {
             tc = new global.DC.TrackController(global.viewer)
+
+
         })
     },
 
@@ -189,21 +189,22 @@
          * @description: 轨迹点击弹窗中,查看视频
          * @return {*}
          */
-        watchVideo () {
+        watchVideo (linePosition, polygonPosition) {
+
             const that = this
 
-            const line = this.$turf.lineString(this.linePosition.split(';').filter(item => item != '').map(item => item.split(',').map(i => Number(i))))
+            const line = this.$turf.lineString(linePosition.split(';').filter(item => item != '').map(item => item.split(',').map(i => Number(i))))
             // const lineLength = this.$turf.length(line) * 1000
             const chunkLine = this.$turf.lineChunk(line, 0.1)
+            console.log('chunkLine', chunkLine)
             let arr = chunkLine.features.reduce((pre, cur) =>
                 pre.concat(cur.geometry.coordinates)
                 , []).map(item => item.join(','))
-
-
             const time = arr.filter(item => arr.indexOf(item) == arr.lastIndexOf(item)).length * 16
             const newPostion = arr.filter((item, index) => index == arr.lastIndexOf(item)).join(';')
+            console.log('arr', arr, 'time', time, 'newPostion', newPostion)
 
-            this.getRegionList(this.polygonPosition)
+            this.getRegionList(polygonPosition)
             this.videoShow = true
 
             if (tc) {
@@ -283,15 +284,15 @@
 
                     }
                 })
+            }, {
+                headingOffset: -90
             })
 
             track.setModel('/model/qiche.gltf', {
-                scale: 0.8
+                scale: 1.2
             })
 
             tc.addTrack(track)
-
-            this.$parent.lineEditVisible = false
         },
 
         // 遍历监控图标

--
Gitblit v1.9.3