From bedc1d235e6ec600699332cffcb7395178c55d03 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 09 Mar 2023 15:23:28 +0800
Subject: [PATCH] 巡逻路线播放更改

---
 src/views/activity/components/videoControlBox.vue |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/views/activity/components/videoControlBox.vue b/src/views/activity/components/videoControlBox.vue
index 41198ce..1a43de5 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: '',
@@ -189,10 +187,10 @@
          * @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)
             let arr = chunkLine.features.reduce((pre, cur) =>
@@ -203,7 +201,7 @@
             const time = arr.filter(item => arr.indexOf(item) == arr.lastIndexOf(item)).length * 16
             const newPostion = arr.filter((item, index) => index == arr.lastIndexOf(item)).join(';')
 
-            this.getRegionList(this.polygonPosition)
+            this.getRegionList(polygonPosition)
             this.videoShow = true
 
             if (tc) {

--
Gitblit v1.9.3