|
@@ -142,7 +142,7 @@
|
|
|
</view>
|
|
|
<!-- 视频部分 -->
|
|
|
<view class="video-max-box" v-if="urlList[0]">
|
|
|
- <video v-for="(item,index) in urlList" :key="index" :id="urlList.id" :src="item.url"
|
|
|
+ <video v-for="(item,index) in urlList" :key="index" ref="videoRef" :src="item.url"
|
|
|
:poster="videoCover" :custom-cache='false' :autoplay="true" :controls="true"
|
|
|
:enable-danmu="false" :muted="true" :show-fullscreen-btn="true" :show-center-play-btn="false"
|
|
|
:show-play-btn="false" @error="videoErrorCallback">
|
|
@@ -377,6 +377,7 @@ export default {
|
|
|
methods: {
|
|
|
//返回按钮
|
|
|
backButton(){
|
|
|
+ let self = this;
|
|
|
this.offMQTT();
|
|
|
this.$set(this,'buildingName',null);
|
|
|
this.$set(this,'buildingId',null);
|
|
@@ -385,7 +386,35 @@ export default {
|
|
|
this.$set(this,'floorId',null);
|
|
|
this.$set(this,'subId',null);
|
|
|
this.$set(this,'subName',null);
|
|
|
+ // console.log('this.$refs.videoRef',this.$refs.videoRef)
|
|
|
+ // console.log('this.$refs.videoRef',this.$refs.videoRef.getTotalList())
|
|
|
+ // for(let i=0;i<self.urlList.length;i++){
|
|
|
+ // let id = self.urlList[i].id;
|
|
|
+ // console.log(self.$refs.id);
|
|
|
+ // console.log('urlList',this.urlList[i]);
|
|
|
+ // let query = wx.createSelectorQuery();//创建节点查询器 query
|
|
|
+ // query.select('#440102004920000000010014')
|
|
|
+ // let a = query.select('#440102004920000000010014');
|
|
|
+ // console.log('query',query.select('#440102004920000000010014'));
|
|
|
+
|
|
|
+
|
|
|
+ // console.log('wx.createSelectorQuery',wx.createSelectorQuery('440102004920000000010014'));
|
|
|
+
|
|
|
+ // let videoElement1 = document.getElementById('440102004920000000010014');
|
|
|
+ // console.log('videoElement1',videoElement1);
|
|
|
+
|
|
|
+
|
|
|
+ // let videoElement = document.getElementById(self.urlList[i].id);
|
|
|
+ // console.log('videoElement',videoElement);
|
|
|
+ // videoElement.pause();
|
|
|
+ // videoElement.removeAttribute('src'); // empty source
|
|
|
+ // videoElement.load();
|
|
|
+ // // console.log('关闭',self.urlList[i].videoContext)
|
|
|
+ // // self.urlList[i].videoContext.stop();
|
|
|
+ // }
|
|
|
+ // return
|
|
|
this.$set(this,'pageType',1);
|
|
|
+ this.$set(this,'urlList',[]);
|
|
|
this.treeselectByUser();
|
|
|
},
|
|
|
//全屏疏散页面
|
|
@@ -619,6 +648,7 @@ export default {
|
|
|
for(let o=0;o<self.buildingList.length;o++){
|
|
|
for(let i=0;i<data.data.length;i++){
|
|
|
if(data.data[i].buildId == self.buildingList[o].id){
|
|
|
+ self.buildingList[o].name.replace('(预案发生)')
|
|
|
self.buildingList[o].name = '(预案发生) '+self.buildingList[o].name
|
|
|
}
|
|
|
}
|
|
@@ -629,6 +659,7 @@ export default {
|
|
|
for(let o=0;o<self.floorList.length;o++){
|
|
|
for(let i=0;i<data.data.length;i++){
|
|
|
if(data.data[i].floorId == self.floorList[o].id){
|
|
|
+ self.floorList[o].name.replace('(预案发生)')
|
|
|
self.floorList[o].name = '(预案发生) '+self.floorList[o].name
|
|
|
}
|
|
|
}
|
|
@@ -639,6 +670,7 @@ export default {
|
|
|
for(let o=0;o<self.fjListArray.length;o++){
|
|
|
for(let i=0;i<data.data.length;i++){
|
|
|
if(data.data[i].subId == self.fjListArray[o].subId){
|
|
|
+ self.fjListArray[o].subName.replace('(预案发生)')
|
|
|
self.fjListArray[o].subName = '(预案发生) '+self.fjListArray[o].subName
|
|
|
}
|
|
|
}
|
|
@@ -737,8 +769,9 @@ export default {
|
|
|
let newUrl = text + 'rtp/' + url[1];
|
|
|
let obj = {
|
|
|
name: "楼道监控" + (i + 1),
|
|
|
- id:data.data.data[i].deviceID,
|
|
|
+ id:data.data.data[i].deviceID,
|
|
|
url: newUrl,
|
|
|
+ videoContext:wx.createVideoContext(data.data.data[i].deviceID)
|
|
|
}
|
|
|
list.push(obj)
|
|
|
}
|