old mode 100644
new mode 100755
 |  |  | 
 |  |  |       this.recordListStyle.height = this.winHeight + "px"; | 
 |  |  |       this.playerStyle["height"] = this.winHeight + "px"; | 
 |  |  |       this.chooseDate = moment().format('YYYY-MM-DD') | 
 |  |  |       this.setTime(this.chooseDate + " 00:00:00", this.chooseDate + " 23:59:59"); | 
 |  |  |       this.dateChange(); | 
 |  |  |       window.addEventListener('beforeunload', this.stopPlayRecord) | 
 |  |  |       }, | 
 |  |  |       destroyed() { | 
 |  |  |          this.$destroy('recordVideoPlayer'); | 
 |  |  |       window.removeEventListener('beforeunload', this.stopPlayRecord) | 
 |  |  |       }, | 
 |  |  |       methods: { | 
 |  |  |       dateChange(){ | 
 |  |  |         if (!this.chooseDate) { | 
 |  |  |           return; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         this.setTime(this.chooseDate + " 00:00:00", this.chooseDate + " 23:59:59"); | 
 |  |  |         this.recordsLoading = true; | 
 |  |  |         this.detailFiles = []; | 
 |  |  |         this.$axios({ | 
 |  |  | 
 |  |  |               this.mediaServerId = this.streamInfo.mediaServerId; | 
 |  |  |               this.ssrc = this.streamInfo.ssrc; | 
 |  |  |               this.videoUrl = this.getUrlByStreamInfo(); | 
 |  |  |               this.hasAudio = this.streamInfo.tracks && this.streamInfo.tracks.length > 1 | 
 |  |  |             }else { | 
 |  |  |               this.$message({ | 
 |  |  |                 showClose: true, | 
 |  |  | 
 |  |  |         }); | 
 |  |  |       }, | 
 |  |  |       stopPlayRecord: function (callback) { | 
 |  |  |         this.$refs["recordVideoPlayer"].pause(); | 
 |  |  |         this.videoUrl = ''; | 
 |  |  |         this.$axios({ | 
 |  |  |           method: 'get', | 
 |  |  |           url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId | 
 |  |  |         }).then(function (res) { | 
 |  |  |           if (callback) callback() | 
 |  |  |         }); | 
 |  |  |         console.log("停止录像回放") | 
 |  |  |         if (this.streamId !== "") { | 
 |  |  |           this.$refs["recordVideoPlayer"].pause(); | 
 |  |  |           this.videoUrl = ''; | 
 |  |  |           this.$axios({ | 
 |  |  |             method: 'get', | 
 |  |  |             url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId | 
 |  |  |           }).then(function (res) { | 
 |  |  |             if (callback) callback() | 
 |  |  |           }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |       }, | 
 |  |  |       getDataWidth(item){ | 
 |  |  |         let timeForFile = this.getTimeForFile(item); | 
 |  |  | 
 |  |  |         return hStr + ":" + mStr + ":" + sStr | 
 |  |  |       }, | 
 |  |  |       goBack(){ | 
 |  |  |         // 如果正在进行录像回放则,发送停止 | 
 |  |  |         if (this.streamId !== "") { | 
 |  |  |           this.stopPlayRecord(()=> { | 
 |  |  |             this.streamId = ""; | 
 |  |  |           }) | 
 |  |  |         } | 
 |  |  |         window.history.go(-1); | 
 |  |  |       } | 
 |  |  |       }, | 
 |  |  |       } | 
 |  |  |    }; | 
 |  |  | </script> |