Jelajahi Sumber

Signed-off-by: zhaobao <528046418@qq.com>

zhaobao 1 tahun lalu
induk
melakukan
12c0d57906
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  1. 9 1
      admin/src/components/cameras/index.vue

+ 9 - 1
admin/src/components/cameras/index.vue

@@ -18,7 +18,7 @@
                 <div id="camera-box">
                     <div class="title">                        
                         <a :href="'https://open.ys7.com/ezopen/h5/iframe?url=ezopen://open.ys7.com/'+device.deviceSerial+'/1.rec&autoplay=1&accessToken='+accessToken" target="_blank"><span>{{ device.deviceName }}</span></a>
-                        【<span style="padding: 10px;color:#000;cursor: pointer;" @click="changePlayUrl">{{devicePlayIsRec?'录像':"监控"}}</span> 】                     
+                        【<span style="padding: 10px;color:#000;cursor: pointer;" @click="showRecView">{{devicePlayIsRec?'录像':"查看录像"}}</span> 】                     
                         <div class="close" @click="close">X</div>
                     </div>           
                     <div id="camera-deviceSerial"></div>     
@@ -94,6 +94,14 @@
                 }).then(()=>{
                     this.devicePlayIsRec=!this.devicePlayIsRec 
                 }) 
+            },
+            showRecView(){
+                if(this.devicePlayIsRec)return
+                this.device.player.changePlayUrl({
+                    url: `ezopen://open.ys7.com/${this.device.deviceSerial}/1.rec`,
+                }).then(()=>{
+                    this.devicePlayIsRec=true
+                }) 
             },     
             async getDevicelist(){
                 var devicelist=[]