徐景良 2023-09-28 16:33:13 +08:00
commit 5137554171
1 changed files with 53 additions and 3 deletions

View File

@ -26,8 +26,8 @@
<div class="body-left">
<div class="b-l-top">视频分组</div>
<div class="b-l-search">
<input />
<div>
<input v-model="searchVal" />
<div @click="selectTree">
<i class="el-icon-search"> </i>
<span style="margin-left: 5px">搜索</span>
</div>
@ -39,6 +39,8 @@
style="border: 1px solid white; width: 90%; margin-top: 10px"
:load="treeExpand"
@node-click="treeClick"
:filter-node-method="filterNode"
ref="treeFilt"
></el-tree>
</div>
<div class="body-video">
@ -59,6 +61,7 @@
class="video"
ref="videoPlay"
@ontimeupdate="progress"
@dblclick="dblVideo"
></video>
</div>
</div>
@ -237,11 +240,48 @@ export default {
visible: false,
yzpId: "",
ylxId: "",
searchVal: "",
};
},
watch: {},
created() {},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
selectTree() {
this.$refs.treeFilt.filter(this.searchVal);
},
//
dblVideo() {
let videoElement = document.getElementById("video" + this.nowSelectVideo);
if (videoElement.requestFullscreen) {
if (document.fullscreenElement) {
document.exitFullscreen();
} else {
videoElement.requestFullscreen();
}
} else if (videoElement.mozRequestFullScreen) {
if (document.mozFullScreenElement) {
document.mozCancelFullScreen();
} else {
videoElement.mozRequestFullScreen();
}
} else if (videoElement.webkitRequestFullscreen) {
if (document.webkitFullscreenElement) {
document.webkitExitFullscreen();
} else {
videoElement.webkitRequestFullscreen();
}
} else if (videoElement.msRequestFullscreen) {
if (document.msFullscreenElement) {
document.msExitFullscreen();
} else {
videoElement.msRequestFullscreen();
}
}
},
//
startmanual() {
if (!this.nowSelect) return;
@ -307,7 +347,11 @@ export default {
let url = `${videoConfig.q2http_url}stream.flv?puid=${e.PUID}&idx=${e.Idx}&stream=0&token=${e.token}`;
//
this.stopcall();
this.nowSelect = e;
this.nowSelect = {
...e,
puid: e.PUID,
Idx: e.Idx,
};
if (flvjs.isSupported()) {
that.videoDataList[that.nowSelectVideo] = e;
if (that.videoList[that.nowSelectVideo]) {
@ -671,9 +715,11 @@ export default {
let list = [];
data.map((item) => {
if (item.Type == "IV") {
console.log(item);
item.label = item.Name;
item.id = item.Name;
item.leaf = true;
item.OnlineFlag = node.data.OnlineFlag;
item.puid = node.data.id;
list.push(item);
}
@ -686,6 +732,10 @@ export default {
//
if (data.leaf) {
console.log(data);
if (data.OnlineFlag == "0") {
this.$message.error("当前设备已下线!");
return;
}
let url = `${videoConfig.q2http_url}stream.flv?puid=${data.puid}&idx=${data.Idx}&stream=0&token=${this.token}`;
//
this.stopcall();