Browse Source

Merge branch 'dev' of http://git.dnzc.vip:3000/yangqishu/tmzn-weihe into dev

yangqishu 3 months atrás
parent
commit
069427fb33

+ 1 - 3
src/views/safety-inspection/addInspectionTask.vue

@@ -231,16 +231,14 @@ export default {
         })
         return
       }
-      this.$globalEventBus.$emit('clickVideoPlay', { visible: false, type: 'add' })
-      setTimeout(() => {
         const point = this.addTaskFrom.inspectionPoint[this.currentPatrolIndex]
         this.flyToPoint(point)
         // 播放视频
         this.playVideo(point)
         this.currentPatrolIndex++
-      }, 100)
     },
     playVideo(point) {
+      console.info(point)
       this.$globalEventBus.$emit('clickVideoPlay', { point: point, visible: true, type: 'add' })
     },
     stopPatrol() {

+ 3 - 2
src/views/smart-early-warning/left.vue

@@ -9,7 +9,7 @@
         <template v-slot:mainArea>
           <template v-if="lists.length > 0">
             <div class="list-container">
-              <el-input placeholder="请输入关键字" suffix-icon="el-icon-search" v-model="searchVal"> </el-input>
+              <el-input placeholder="请输入关键字" suffix-icon="el-icon-search" v-model="searchVal" @change="getData"> </el-input>
               <el-collapse v-model="activeNames" class="v-collapse">
                 <template v-for="(item, index) in lists">
                   <el-collapse-item :title="item.name" :name="index + 1" :key="index">
@@ -95,7 +95,8 @@ export default {
           '/event/getEventListByType',
           {
             alarmTimeStart:moment().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
-            alarmTimeEnd: moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
+            alarmTimeEnd: moment().endOf('day').format('YYYY-MM-DD HH:mm:ss'),
+            keyword:this.searchVal
           },
           {},
           'post'

+ 27 - 30
src/views/video-play-popup/index.vue

@@ -4,11 +4,26 @@
       <span class="title-text">{{ title }}</span>
       <img src="@/assets/image/common/close.png" style="cursor: pointer" alt="" @click="openTsModal" />
     </div>
-    <Artplayer :option="option" :style="style" @getInstance="getInstance"/>
+    <!-- <Artplayer :option="option" :style="style" @getInstance="getInstance"/> -->
+     <div class="video-player-area" >
+       <EasyPlayer
+             ref="playerRef"
+             playerName="测试"
+             :videoUrl="option.url"
+             class="video-player screenshot"
+             live
+             speed
+             :easyStretch="true"
+             :muted="true"
+             :has-audio="false"
+             :reconnection="true"
+             @click.native.stop
+           />
+     </div>
     <el-dialog title="提示" :visible.sync="tsModalVisible" width="60%">
       <span>是否中断当前巡查点监控,进行下一个巡查点视频播放?</span>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="closeVideoDialog">中断当前视频</el-button>
+        <el-button type="primary" @click="closeVideoDialog">中断本次任务</el-button>
         <el-button @click="toNext">播放下一个视频</el-button>
         <el-button @click="tsModalVisible = false">取 消</el-button>
       </span>
@@ -17,34 +32,13 @@
 </template>
 
 <script>
-import Artplayer from '@/components/video-player/video-player.vue'
-import flvjs from 'flv.js'
 export default {
   name: 'VideoPlayerPopup',
   data() {
     return {
       visible: false,
       title: '巡查点',
-      option: {
-        url: '',
-        isLive: true, //使用直播模式,会隐藏进度条和播放时间
-        autoplay: true,
-        muted: true, //是否静音
-        type: 'flv',
-        autoSize: true,
-        customType: {
-          flv: (video, url, art) => {
-            if (flvjs.isSupported()) {
-              if (art.flv) art.flv.destroy()
-              const flv = flvjs.createPlayer({ type: 'flv', url })
-              flv.attachMediaElement(video)
-              flv.load()
-              art.flv = flv
-              art.on('destroy', () => flv.destroy())
-            }
-          }
-        }
-      },
+      option: {url: ''},
       tsModalVisible: false,
       style: {
         width: '600px',
@@ -53,17 +47,16 @@ export default {
       type:'add'
     }
   },
-  components: {
-    Artplayer
-  },
   mounted() {
     this.$globalEventBus.$on('clickVideoPlay', (data) => {
       this.type = data.type
-      this.visible = data.visible
       this.tsModalVisible = false
       this.title = data.point?data.point.devName:''
       const url =data.point&&data.point.url? data.point.url:''
       this.$set(this.option,'url',url)
+      this.$nextTick(()=>{
+        this.visible = data.visible
+      })
     })
   },
   destroyed() {
@@ -102,10 +95,10 @@ export default {
 <style scoped lang="scss">
 .video-player-container {
   position: absolute;
-  top: 10%;
+  top: 8%;
   left: 50%;
   transform: translate(-50%, 0%);
-  width: 600px;
+  width: px-to-rem(600);
   z-index: 9999;
   .video-player-title {
     background: url('@/assets/image/common/popup_title_bg.png') no-repeat;
@@ -122,5 +115,9 @@ export default {
       margin-left: px-to-rem(20);
     }
   }
+  .video-player-area{
+    width: px-to-rem(600);
+    height: px-to-rem(350);
+  }
 }
 </style>