Commit e1fd5f21 authored by mahui's avatar mahui

修改监控

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