Commit e1fd5f21 authored by mahui's avatar mahui

修改监控

parent 5cfe657f
......@@ -8,7 +8,7 @@
<div class="left" :style="{width:index==2?'1860px':'1300px'}">
<div id="divPlugin" v-if="index==1"></div>
<video v-if="index==0" class="video" :src="video_src" width="1300" height="750" controls autoplay @ended="ended(sort)">不支持当前video标签</video>
<p class="video_name" v-if="index==0"><span>{{video_name}}</span></p>
<p class="video_name" v-if="index==0">{{video_name}}</p>
<div v-if="index==2" class="videoList">
<div v-for="(item,index) in channelLists" :key="index" class="video_one" @click="item.play=!item.play">
<!--<div class="cover" v-show="!item.play">-->
......@@ -202,13 +202,17 @@
"2":{
list:[
{
title:'公益诉讼在身边--视频',
src:'/static/video/welfare/welfare_6.mp4',
title:'2018年8月14日,杭州市人民检察院公益诉讼检察开放日典型案例介绍',
src:'/static/video/welfare/welfare_1.mp4',
play:false,
},{
title:'野生动物保护案背后的揪心故事',
src:'/static/video/welfare/welfare_2.mp4',
play:false,
},{
title:'爸爸去哪儿了',
src:'/static/video/welfare/welfare_3.mp4',
play:false,
},{
title:'遇到非法猎捕 买卖野生动物 怎么办?',
src:'/static/video/welfare/welfare_4.mp4',
......@@ -218,13 +222,8 @@
src:'/static/video/welfare/welfare_5.mp4',
play:false,
},{
title:'2018年8月14日,杭州市人民检察院公益诉讼检察开放日典型案例介绍',
src:'/static/video/welfare/welfare_1.mp4',
play:false,
},
{
title:'爸爸去哪儿了',
src:'/static/video/welfare/welfare_3.mp4',
title:'公益诉讼在身边--视频',
src:'/static/video/welfare/welfare_6.mp4',
play:false,
}
],
......@@ -257,6 +256,7 @@
}
if(this.index==1){
var self = this;
console.log('this',this);
this.$nextTick(function () {
var iRet = WebVideoCtrl.I_CheckPluginInstall();
if (-2 == iRet) {
......@@ -266,13 +266,12 @@
alert("您还未安装过插件,双击开发包目录里的WebComponentsKit.exe安装!");
return;
}
// 初始化插件参数及插入插件
WebVideoCtrl.I_InitPlugin(1300, 750, {
bWndFull: true, //是否支持单窗口双击全屏,默认支持 true:支持 false:不支持
iWndowType: 1,
cbSelWnd: function(xmlDoc) {
}
});
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
......@@ -365,10 +364,10 @@
},
get_video_info:function() {
this.login_info = {
ip:this.video_data[0],
port:this.video_data[1],
username:this.video_data[2],
password:this.video_data[3],
ip:this.video_data.camera_url[0],
port:this.video_data.camera_url[1],
username:this.video_data.camera_url[2],
password:this.video_data.camera_url[3],
};
this.video();
},
......@@ -387,9 +386,10 @@
}
this.clickLogout();
var self = this;
WebVideoCtrl.I_Login(this.login_info.ip, 1, this.login_info.port, this.login_info.username, this.login_info.password, {
var iRet = WebVideoCtrl.I_Login(this.login_info.ip, 1, this.login_info.port, this.login_info.username, this.login_info.password, {
success: function(xmlDoc) {
WebVideoCtrl.I_ChangeWndNum(1);
console.log(" 登录成功!");
setTimeout(function() {
self.getChannelInfo();
}, 10);
......@@ -397,6 +397,9 @@
error: function() {
}
});
if (-1 == iRet) {
console.log(" 已登录过!");
}
},
// 退出
clickLogout:function() {
......@@ -427,22 +430,23 @@
return;
}
var self = this;
self.channelLists = [];
// 模拟通道
WebVideoCtrl.I_GetAnalogChannelInfo(this.login_info.ip, {
async: false,
success: function(xmlDoc) {
var oChannels = $(xmlDoc).find("VideoInputChannel");
self.channels_id = 0;
self.channelLists = [];
self.channels_id = 1;
$.each(oChannels, function(i) {
var id = $(this).find("id").eq(0).text(),
name = $(this).find("name").eq(0).text();
self.channelLists.push({
id:id,
name:name?name:"未命名"
title:name?name:"未命名"
});
self.video_name = self.channelLists[0].name;
self.video_name = self.channelLists[0].title;
});
console.log('self.channelLists_2',self.channelLists)
},
error: function() {
}
......@@ -451,22 +455,22 @@
WebVideoCtrl.I_GetDigitalChannelInfo(this.login_info.ip, {
async: false,
success: function(xmlDoc) {
var oChannels = $(xmlDoc).find("VideoInputChannel");
self.channels_id = 0;
self.channelLists = [];
var oChannels = $(xmlDoc).find("InputProxyChannelStatus");
$.each(oChannels, function(i) {
var id = $(this).find("id").eq(0).text(),
name = $(this).find("name").eq(0).text(),
online = $(this).find("online").eq(0).text();
console.log('online',id,name,online);
if ("false" == online) { // 过滤禁用的数字通道
return true;
}
self.channelLists.push({
id:id,
name:name?name:"未命名"
id:id,
title:name?name:"未命名"
});
self.video_name = self.channelLists[0].name;
});
self.channels_id = self.channelLists[0].id;
self.video_name = self.channelLists[0].title;
},
error: function() {
......@@ -477,8 +481,6 @@
async: false,
success: function(xmlDoc) {
var oChannels = $(xmlDoc).find("ZeroVideoChannel");
self.channels_id = 0;
self.channelLists = [];
$.each(oChannels, function(i) {
var id = $(this).find("id").eq(0).text(),
name = $(this).find("name").eq(0).text();
......@@ -488,11 +490,12 @@
if ("true" == $(this).find("enabled").eq(0).text()) { // 过滤禁用的零通道
self.channelLists.push({
id:id,
name:name?name:"未命名"
title:name?name:"未命名"
});
self.video_name = self.channelLists[0].name;
}
});
self.channels_id = self.channelLists[0].id;
self.video_name = self.channelLists[0].title;
setTimeout(function() {
self.clickStartRealPlay();
}, 1000);
......@@ -670,21 +673,13 @@
height: 60px;
line-height: 60px;
text-align: left;
background-color: #000;
opacity: .5;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
background-color: rgb(34,28,23);
padding:0 24px;
color: #fff;
font-size: 22px;
z-index: 9999;
overflow: hidden;
}
.video_name span{
opacity: 1;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
}
.right .item{
padding: 10px;
cursor: pointer;
......
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