Commit 56752d79 authored by 王亚晖's avatar 王亚晖
parents 2e6ed3da 84a23ecb
......@@ -98,19 +98,23 @@ onDeactivated(() => {
hidePlay();
})
// console.log('w:',window.innerWidth);
//声明公用变量
var initCount = 0;
var pubKey = '';
var playWnd_width = window.innerWidth;
var playWnd_height = 700;
var oWebControl;
var videoIp;
var videoPort=1443;
const enterpriseId = ref(null);
enterpriseId.value = store.getters.getEnterpriseId();
var VideoInfo = reactive({
selectOptions: [],
value: [],
videoList: [],
playVideoList: []
});
const props = { multiple: false, emitPath: false }
initPage();
......@@ -150,7 +154,6 @@ function getStats() {
})
//增加供热站节点
s.children.push({ value: s.value, label: s.label })
if (s.children.length > 0) {
//判断该供热站是否有换热站机组,若有则加入列表
serv.children.push(s);
......@@ -169,7 +172,6 @@ function getStats() {
s.label = supply.supplyName;
s.children = [];
supply.transferList.forEach(unit => {
// var tmpUnit = { value: unit.unitName, label: unit.unitName }
var tmpUnit = { value: unit.unitId, label: unit.unitName }
s.children.push(tmpUnit);
})
......@@ -186,19 +188,14 @@ function getStats() {
}
}
}
// if (VideoInfo.selectOptions) {
// }
}
// console.log($)
//从数据库获得监控点信息
function getVideoInfo() {
http.post('/api/video/GetVideoTable').then((result) => {
//console.log(result);
//若获得视频列表,则存入
if (result.data.count > 0) {
VideoInfo.videoList.push.apply(VideoInfo.videoList, result.data.dataTable);
......@@ -211,25 +208,20 @@ function initPage() {
getVideoInfo();//视频信息
getStats();//下拉列表
initIp();//ip
// console.log(VideoInfo)
}
//从视频列表中找到当前被选中的换热站对应的所有视频id
function getVideoFromVideoList(Id) {
// console.log(Id)
stopAllPreview();
VideoInfo.playVideoList.length = 0;
VideoInfo.videoList.forEach(video => {
if (video.stationId === Id) {
//console.log(video)
var videoId = video.videoId.replaceAll('-', '');
VideoInfo.playVideoList.push(videoId);
}
})
console.log(VideoInfo);
if (oWebControl) {
// console.log('批量播放')
playVideoByVideoList(VideoInfo.playVideoList)
}
......@@ -239,38 +231,12 @@ function visibleCascader(isshow) {
return;
}
if (isshow) {
hidePlay();
} else {
// resizeVideo();
showPlay();
}
}
//列出所有站
// {
// "videoId": "eb1907ab-4462-41b5-9776-268528ad27d9",
// "videoName": "枫雅园水箱",
// "supplyId": "b354f45b-23e5-42be-a210-0fb92394f457",
// "supplyName": "小王庄供热站",
// "stationId": "eef904a5-62e4-4dee-b1a9-3dde42b001b4",
// "videoAddress": "枫雅园换热站(6号地)",
// "centerId": "7e0263d8-61bc-46f9-aa4f-52394687f8cd",
// "centerName": "港东供热服务中心"
// }
//------视频播放控制
//页面加载时创建播放实例初始化
// $(window).load(function () {
// //将播放函数写入初始化成功回调函数中,以确保播放函数在初始化成功后执行
// // initPlugin();
// });
$(document).ready(function () {
initPlugin();
$('#startPlay').click(
......@@ -291,25 +257,10 @@ $(document).ready(function () {
)
})
onUnmounted(() => {
hidePlay();
})
//声明公用变量
var initCount = 0;
var pubKey = '';
var playWnd_width = window.innerWidth;
var playWnd_height = 700;
// var testWeb= new WebControl();
var oWebControl;
var videoIp;
var videoPort=1443;
// 创建播放实例
function initPlugin() {
oWebControl = new WebControl({
......@@ -367,8 +318,6 @@ function initPlugin() {
});
}
// 设置窗口控制回调
function setCallbacks() {
oWebControl.JS_SetWindowControlCallback({
......@@ -378,12 +327,6 @@ function setCallbacks() {
// 推送消息
function cbIntegrationCallBack(oData) {
//showCBInfo(JSON.stringify(oData.responseMsg));
/* var json = JSON.stringify(oData.responseMsg);
console.log(json);
if (oData.responseMsg.type === 7) {
oWebControl.JS_HideWnd();
} */
}
//初始化ip
......@@ -473,12 +416,8 @@ $(window).resize(function () {
});
function resizeVideo() {
// console.log('触发重绘')
// console.log('resize')
playWnd_width = window.innerWidth;
if (oWebControl != null) {
// console.log('startresize')
// console.log('重绘界面位置')
oWebControl.JS_Resize(playWnd_width, playWnd_height);
setWndCover();
}
......@@ -492,7 +431,6 @@ $(window).scroll(function () {
}
});
// 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
function setWndCover() {
var iWidth = $(window).width();
......@@ -527,7 +465,6 @@ function setWndCover() {
//视频预览功能
$("#startPreview").click(function () {
var cameraIndexCode = $("#cameraIndexCode").val(); //获取输入的监控点编号值,必填
// cameraIndexCode = '875B9153-F5A6-4321-83EE-01C57EF561B5'
var streamMode = 0; //主子码流标识:0-主码流,1-子码流
var transMode = 1; //传输协议:0-UDP,1-TCP
var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用
......@@ -558,17 +495,6 @@ function stopAllPreview() {
});
};
// 标签关闭
// $(window).unload(function () {
// if (oWebControl != null) {
// oWebControl.JS_HideWnd(); // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
// oWebControl.JS_Disconnect().then(function () { // 断开与插件服务连接成功
// },
// function () { // 断开与插件服务连接失败
// });
// }
// });
//播放视频函数,需要传入监控点编码☆☆☆☆
function playVideo(videoCode) {
// stopAllPreview();
......@@ -605,17 +531,11 @@ function playVideoByVideoList(videoList) {
if (!videoList || videoList.length === 0) {
return;
}
// console.log("play:" + String(cameraIndexCode));
// var cameraIndexCode = String(cameraIndexCode); //获取输入的监控点编号值,必填
var streamMode = 0; //主子码流标识:0-主码流,1-子码流
var transMode = 1; //传输协议:0-UDP,1-TCP
var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用
var wndId = -1; //播放窗口序号(在2x2以上布局下可指定播放窗口)
// cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
// cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
var list = []
for (var i = 0; i < videoList.length; i++) {
......@@ -634,7 +554,6 @@ function playVideoByVideoList(videoList) {
}
list.push(tmp);
}
// console.log(list)
if (list.length === 0) {
return;
}
......@@ -668,8 +587,6 @@ function playVideotest(cameraIndexCode) {
return;
}
console.log("play:" + String(cameraIndexCode));
var cameraIndexCode = String(cameraIndexCode); //获取输入的监控点编号值,必填
var streamMode = 0; //主子码流标识:0-主码流,1-子码流
var transMode = 1; //传输协议:0-UDP,1-TCP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment