From 5d308a1c6879d2597d7f7dd737708ed0efd86e96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Mon, 9 Oct 2023 09:34:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/static/board/monitoring.css | 4 +
.../main/resources/static/board/monitoring.js | 369 +++++++++---------
.../resources/templates/board/board1.html | 13 +-
.../resources/templates/board/monitoring.html | 14 +-
4 files changed, 214 insertions(+), 186 deletions(-)
diff --git a/haiwei-admin/src/main/resources/static/board/monitoring.css b/haiwei-admin/src/main/resources/static/board/monitoring.css
index e69de29..02849e2 100644
--- a/haiwei-admin/src/main/resources/static/board/monitoring.css
+++ b/haiwei-admin/src/main/resources/static/board/monitoring.css
@@ -0,0 +1,4 @@
+.plugin{
+ width: 100%;
+ height: 100%;
+}
diff --git a/haiwei-admin/src/main/resources/static/board/monitoring.js b/haiwei-admin/src/main/resources/static/board/monitoring.js
index 0939b5c..0cc4b2c 100644
--- a/haiwei-admin/src/main/resources/static/board/monitoring.js
+++ b/haiwei-admin/src/main/resources/static/board/monitoring.js
@@ -28,7 +28,7 @@ var ERROR_CODE_TALK_FAIL = 5000; //语音对讲失败
let isLogin = false
-var version="V3.3.0build20230322"
+var version = "V3.3.0build20230322"
$(() => {
// 初始化插件参数及插入插件
@@ -85,17 +85,17 @@ $(() => {
$("#downloadendtime").val(szCurTime + " 23:59:59");
})
+
// 显示操作信息
-function showOPInfo(szInfo, status, xmlDoc) {
+function showOPInfo(szInfo, status, xmlDoc) {
var szTip = "
" + dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss") + " " + szInfo;
if (typeof status != "undefined" && status != 200) {
var szStatusString = $(xmlDoc).find("statusString").eq(0).text();
var szSubStatusCode = $(xmlDoc).find("subStatusCode").eq(0).text();
if ("" === szSubStatusCode) {
- if("" === szSubStatusCode && "" === szStatusString){
+ if ("" === szSubStatusCode && "" === szStatusString) {
szTip += "(" + status + ")";
- }
- else{
+ } else {
szTip += "(" + status + ", " + szStatusString + ")";
}
} else {
@@ -137,7 +137,7 @@ function dateFormat(oDate, fmt) {
// 获取窗口尺寸
function getWindowSize() {
- var nWidth = $(window).width() ,
+ var nWidth = $(window).width(),
nHeight = $(window).height()
return {width: nWidth, height: nHeight};
@@ -145,12 +145,12 @@ function getWindowSize() {
// 打开选择框 0:文件夹 1:文件
function clickOpenFileDlg(id, iType) {
- WebVideoCtrl.I_OpenFileDlg(iType).then(function(szDirPath){
+ WebVideoCtrl.I_OpenFileDlg(iType).then(function (szDirPath) {
if (szDirPath != -1 && szDirPath != "" && szDirPath != null) {
$("#" + id).val(szDirPath);
}
- }, function() {
- console.log("打开文件路径失败");
+ }, function () {
+ console.log("打开文件路径失败");
});
}
@@ -171,10 +171,10 @@ function clickGetLocalCfg() {
$("#playbackFilePath").val(oLocalConfig.playbackFilePath);
$("#protocolType").val(oLocalConfig.protocolType);
$("#secretKey").val("\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F");
- console.log("本地配置获取成功!");
+ console.log("本地配置获取成功!");
}, (oError) => {
var szInfo = "本地配置获取失败!";
- console.log(szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -196,10 +196,10 @@ async function clickSetLocalCfg() {
g_oLocalConfig.secretKey = await WebVideoCtrl.I_GetEncryptString($("#secretKey").val());
}
WebVideoCtrl.I_SetLocalCfg(g_oLocalConfig).then(() => {
- console.log("本地配置设置成功!");
+ console.log("本地配置设置成功!");
}, (oError) => {
var szInfo = "本地配置设置失败!";
- console.log(szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -207,10 +207,10 @@ async function clickSetLocalCfg() {
function changeWndNum(iType) {
iType = parseInt(iType, 10);
WebVideoCtrl.I_ChangeWndNum(iType).then(() => {
- console.log("窗口分割成功!");
+ console.log("窗口分割成功!");
}, (oError) => {
var szInfo = "窗口分割失败!";
- console.log(szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -224,11 +224,10 @@ function clickLogin() {
if ("" == szIP || "" == szPort) {
return;
}
- if(isLogin){
-
- setTimeout(() =>{
+ if (isLogin) {
+ setTimeout(() => {
clickStartRealPlay()
- },2000)
+ }, 2000)
return
}
@@ -242,20 +241,20 @@ function clickLogin() {
$("#ip").prepend("
");
setTimeout(function () {
$("#ip").val(szDeviceIdentify);
- setTimeout(function() {
+ setTimeout(function () {
getChannelInfo();
}, 1000);
getDevicePort();
- setTimeout(() =>{
+ setTimeout(() => {
clickStartRealPlay()
- },2000)
+ }, 2000)
}, 10);
},
error: function (oError) {
if (ERROR_CODE_LOGIN_REPEATLOGIN === status) {
- console.log(szDeviceIdentify + " 已登录过!");
+ console.log(szDeviceIdentify + " 已登录过!");
} else {
- console.log(szDeviceIdentify + " 登录失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 登录失败!", oError.errorCode, oError.errorMsg);
}
}
});
@@ -270,9 +269,9 @@ function clickLogout() {
}
WebVideoCtrl.I_Logout(szDeviceIdentify).then(() => {
- console.log(szDeviceIdentify + " " + "退出成功!");
+ console.log(szDeviceIdentify + " " + "退出成功!");
}, () => {
- console.log(szDeviceIdentify + " " + "退出失败!");
+ console.log(szDeviceIdentify + " " + "退出失败!");
});
}
@@ -295,11 +294,11 @@ function clickGetDeviceInfo() {
arrStr.push("主控版本:" + $(xmlDoc).find("firmwareVersion").eq(0).text() + " " + $(xmlDoc).find("firmwareReleasedDate").eq(0).text() + "\r\n");
arrStr.push("编码版本:" + $(xmlDoc).find("encoderVersion").eq(0).text() + " " + $(xmlDoc).find("encoderReleasedDate").eq(0).text() + "\r\n");
- console.log(szDeviceIdentify + " 获取设备信息成功!");
+ console.log(szDeviceIdentify + " 获取设备信息成功!");
alert(arrStr.join(""));
},
error: function (oError) {
- console.log(szDeviceIdentify + " 获取设备信息失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 获取设备信息失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -326,10 +325,10 @@ function getChannelInfo() {
}
oSel.append("
");
});
- console.log(szDeviceIdentify + " 获取模拟通道成功!");
+ console.log(szDeviceIdentify + " 获取模拟通道成功!");
},
error: function (oError) {
- console.log(szDeviceIdentify + " 获取模拟通道失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 获取模拟通道失败!", oError.errorCode, oError.errorMsg);
}
});
// 数字通道
@@ -349,10 +348,10 @@ function getChannelInfo() {
}
oSel.append("
");
});
- console.log(szDeviceIdentify + " 获取数字通道成功!");
+ console.log(szDeviceIdentify + " 获取数字通道成功!");
},
error: function (oError) {
- console.log(szDeviceIdentify + " 获取数字通道失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 获取数字通道失败!", oError.errorCode, oError.errorMsg);
}
});
// 零通道
@@ -370,10 +369,10 @@ function getChannelInfo() {
oSel.append("
");
}
});
- console.log(szDeviceIdentify + " 获取零通道成功!");
+ console.log(szDeviceIdentify + " 获取零通道成功!");
},
error: function (oError) {
- console.log(szDeviceIdentify + " 获取零通道失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 获取零通道失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -390,10 +389,10 @@ function getDevicePort() {
$("#deviceport").val(oPort.iDevicePort);
$("#rtspport").val(oPort.iRtspPort);
- console.log(szDeviceIdentify + " 获取端口成功!");
+ console.log(szDeviceIdentify + " 获取端口成功!");
}, (oError) => {
var szInfo = "获取端口失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -445,14 +444,15 @@ async function clickGetDigitalChannelInfo() {
objTd.width = "25%";
objTd.innerHTML = proxyProtocol;
});
- console.log(szDeviceIdentify + " 获取数字通道成功!");
+ console.log(szDeviceIdentify + " 获取数字通道成功!");
},
error: function (oError) {
- console.log(szDeviceIdentify + " 没有数字通道!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 没有数字通道!", oError.errorCode, oError.errorMsg);
}
});
}
}
+
// 开始预览
function clickStartRealPlay(iStreamType) {
@@ -477,10 +477,10 @@ function clickStartRealPlay(iStreamType) {
bZeroChannel: bZeroChannel,
success: function () {
szInfo = "开始预览成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
- console.log(szDeviceIdentify + " 开始预览失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 开始预览失败!", oError.errorCode, oError.errorMsg);
}
});
};
@@ -495,14 +495,15 @@ function clickStartRealPlay(iStreamType) {
startRealPlay();
}
}
+
function setTextOverlay() {
- var szDeviceIdentify = $("#ip").val();
+ var szDeviceIdentify = $("#ip").val();
var szInfo = "";
var that = this;
var iChannelID = parseInt($("#channels").val(), 10);
var szUrl = "ISAPI/System/Video/inputs/channels/" + iChannelID + "/overlays";
- WebVideoCtrl.I_GetTextOverlay(szUrl,szDeviceIdentify,{
- success:function(data){
+ WebVideoCtrl.I_GetTextOverlay(szUrl, szDeviceIdentify, {
+ success: function (data) {
$(data).find("TextOverlay").eq(0).find("displayText").eq(0).text("我tet");
$(data).find("TextOverlay").eq(0).find("positionX").eq(0).text("20");
$(data).find("TextOverlay").eq(0).find("positionY").eq(0).text("30");
@@ -510,22 +511,23 @@ function setTextOverlay() {
var newOptions = {
type: "PUT",
data: xmldoc,
- success: function(){
+ success: function () {
szInfo = "绘制osd信息成功";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
},
- error: function(oError){
- console.log(szDeviceIdentify + " 设置osd信息失败!", oError.errorCode, oError.errorMsg);
+ error: function (oError) {
+ console.log(szDeviceIdentify + " 设置osd信息失败!", oError.errorCode, oError.errorMsg);
}
};
- WebVideoCtrl.I_SendHTTPRequest(szDeviceIdentify,szUrl,newOptions);
+ WebVideoCtrl.I_SendHTTPRequest(szDeviceIdentify, szUrl, newOptions);
},
- error: function(oError){
- console.log(szDeviceIdentify + " 设置osd信息失败!", oError.errorCode, oError.errorMsg);
+ error: function (oError) {
+ console.log(szDeviceIdentify + " 设置osd信息失败!", oError.errorCode, oError.errorMsg);
}
});
}
+
// 停止预览
function clickStopRealPlay() {
var oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex),
@@ -535,10 +537,10 @@ function clickStopRealPlay() {
WebVideoCtrl.I_Stop({
success: function () {
szInfo = "停止预览成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
- console.log(szDeviceIdentify + " 停止预览失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 停止预览失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -561,10 +563,10 @@ function clickOpenSound() {
}
WebVideoCtrl.I_OpenSound().then(() => {
- console.log(oWndInfo.szDeviceIdentify + " " + "打开声音成功!");
+ console.log(oWndInfo.szDeviceIdentify + " " + "打开声音成功!");
}, (oError) => {
var szInfo = " 打开声音失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -576,10 +578,10 @@ function clickCloseSound() {
if (oWndInfo != null) {
WebVideoCtrl.I_CloseSound().then(() => {
- console.log(oWndInfo.szDeviceIdentify + " " + "关闭声音成功!");
+ console.log(oWndInfo.szDeviceIdentify + " " + "关闭声音成功!");
}, (oError) => {
var szInfo = " 关闭声音失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -592,10 +594,10 @@ function clickSetVolume() {
if (oWndInfo != null) {
WebVideoCtrl.I_SetVolume(iVolume).then(() => {
- console.log(oWndInfo.szDeviceIdentify + " " + "设置音量成功");
+ console.log(oWndInfo.szDeviceIdentify + " " + "设置音量成功");
}, (oError) => {
var szInfo = " 设置音量失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -619,37 +621,39 @@ async function clickCapturePic(szType) {
szPicName = "playback_" + oWndInfo.szDeviceIdentify + "_" + szChannelID + "_" + new Date().getTime();
}
- szPicName += ("0" === szCaptureFileFormat) ? ".jpg": ".bmp";
+ szPicName += ("0" === szCaptureFileFormat) ? ".jpg" : ".bmp";
WebVideoCtrl.I_CapturePic(szPicName, {
bDateDir: true //是否生成日期文件
- }).then(function(){
+ }).then(function () {
szInfo = "抓图成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
- }, function(oError){
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ }, function (oError) {
szInfo = " 抓图失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
+
// 抓图
function clickCapturePicData() {
var oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex),
szInfo = "";
if (oWndInfo != null) {
- WebVideoCtrl.I_CapturePicData().then(function(data){
+ WebVideoCtrl.I_CapturePicData().then(function (data) {
console.log(data);
szInfo = "抓图上传成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
- },function(){
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ }, function () {
szInfo = "抓图失败!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
});
}
}
// 开始录像
var g_szRecordType = "";
+
function clickStartRecord(szType) {
var oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex),
szInfo = "";
@@ -668,7 +672,7 @@ function clickStartRecord(szType) {
} else if ('playback' === szType) {
szInfo = "开始剪辑成功!";
}
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
if ('realplay' === szType) {
@@ -676,7 +680,7 @@ function clickStartRecord(szType) {
} else if ('playback' === szType) {
szInfo = " 开始剪辑失败!";
}
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -698,7 +702,7 @@ function clickStopRecord(szType, iWndIndex) {
} else if ('playback' === szType) {
szInfo = "停止剪辑成功!";
}
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
if ('realplay' === szType) {
@@ -729,10 +733,10 @@ function clickGetAudioInfo() {
oSel.append("
");
});
- console.log(szDeviceIdentify + " 获取对讲通道成功!");
+ console.log(szDeviceIdentify + " 获取对讲通道成功!");
},
error: function (oError) {
- console.log(szDeviceIdentify + " 获取对讲通道失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 获取对讲通道失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -754,10 +758,10 @@ function clickStartVoiceTalk() {
WebVideoCtrl.I_StartVoiceTalk(szDeviceIdentify, iAudioChannel).then(() => {
szInfo = "开始对讲成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
var szInfo = " 开始对讲失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -766,10 +770,10 @@ function clickStopVoiceTalk() {
var szDeviceIdentify = $("#ip").val();
WebVideoCtrl.I_StopVoiceTalk().then(() => {
szInfo = "停止对讲成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
var szInfo = " 停止对讲失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -782,10 +786,10 @@ function clickEnableEZoom() {
if (oWndInfo != null) {
WebVideoCtrl.I_EnableEZoom().then(() => {
szInfo = "启用电子放大成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "启用电子放大失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -800,10 +804,10 @@ function clickDisableEZoom() {
if (oWndInfo != null) {
WebVideoCtrl.I_DisableEZoom().then(() => {
szInfo = "禁用电子放大成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "禁用电子放大失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -817,10 +821,10 @@ function clickEnable3DZoom() {
if (oWndInfo != null) {
WebVideoCtrl.I_Enable3DZoom().then(() => {
szInfo = "启用3D放大成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "启用3D放大失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -834,10 +838,10 @@ function clickDisable3DZoom() {
if (oWndInfo != null) {
WebVideoCtrl.I_Disable3DZoom().then(() => {
szInfo = "禁用3D放大成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "禁用3D放大失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
}
@@ -845,14 +849,15 @@ function clickDisable3DZoom() {
// 全屏
function clickFullScreen() {
WebVideoCtrl.I_FullScreen(true).then(() => {
- console.log("全屏成功");
+ console.log("全屏成功");
}, (oError) => {
- console.log("全屏失败!", oError.errorCode, oError.errorMsg);
+ console.log("全屏失败!", oError.errorCode, oError.errorMsg);
});
}
// PTZ控制 9为自动,1,2,3,4,5,6,7,8为方向PTZ
var g_bPTZAuto = false;
+
function mouseDownPTZControl(iPTZIndex) {
var oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex),
bZeroChannel = $("#channels option").eq($("#channels").get(0).selectedIndex).attr("bZero") == "true" ? true : false,
@@ -873,16 +878,16 @@ function mouseDownPTZControl(iPTZIndex) {
iPTZSpeed: iPTZSpeed,
success: function (xmlDoc) {
if (9 == iPTZIndex && g_bPTZAuto) {
- console.log(oWndInfo.szDeviceIdentify + " 停止云台成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 停止云台成功!");
} else {
- console.log(oWndInfo.szDeviceIdentify + " 开启云台成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 开启云台成功!");
}
if (9 == iPTZIndex) {
g_bPTZAuto = !g_bPTZAuto;
}
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 开启云台失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 开启云台失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -895,10 +900,10 @@ function mouseUpPTZControl() {
if (oWndInfo != null) {
WebVideoCtrl.I_PTZControl(1, true, {
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 停止云台成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 停止云台成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 停止云台失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 停止云台失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -912,10 +917,10 @@ function clickSetPreset() {
if (oWndInfo != null) {
WebVideoCtrl.I_SetPreset(iPresetID, {
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 设置预置点成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 设置预置点成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 设置预置点失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 设置预置点失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -929,10 +934,10 @@ function clickGoPreset() {
if (oWndInfo != null) {
WebVideoCtrl.I_GoPreset(iPresetID, {
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 调用预置点成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 调用预置点成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 调用预置点失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 调用预置点失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -940,6 +945,7 @@ function clickGoPreset() {
// 搜索录像
var g_iSearchTimes = 0;
+
function clickRecordSearch(iType) {
var szDeviceIdentify = $("#ip").val(),
iChannelID = parseInt($("#channels").val(), 10),
@@ -970,9 +976,9 @@ function clickRecordSearch(iType) {
iSearchPos: g_iSearchTimes,
success: function (xmlDoc) {
if ("MORE" === $(xmlDoc).find("responseStatusStrg").eq(0).text()) {
- for(var i = 0, nLen = $(xmlDoc).find("searchMatchItem").length; i < nLen; i++) {
+ for (var i = 0, nLen = $(xmlDoc).find("searchMatchItem").length; i < nLen; i++) {
var szPlaybackURI = $(xmlDoc).find("playbackURI").eq(i).text();
- if(szPlaybackURI.indexOf("name=") < 0) {
+ if (szPlaybackURI.indexOf("name=") < 0) {
break;
}
var szStartTime = $(xmlDoc).find("startTime").eq(i).text();
@@ -1003,9 +1009,9 @@ function clickRecordSearch(iType) {
clickRecordSearch(1);// 继续搜索
} else if ("OK" === $(xmlDoc).find("responseStatusStrg").eq(0).text()) {
var iLength = $(xmlDoc).find("searchMatchItem").length;
- for(var i = 0; i < iLength; i++) {
+ for (var i = 0; i < iLength; i++) {
var szPlaybackURI = $(xmlDoc).find("playbackURI").eq(i).text();
- if(szPlaybackURI.indexOf("name=") < 0) {
+ if (szPlaybackURI.indexOf("name=") < 0) {
break;
}
var szStartTime = $(xmlDoc).find("startTime").eq(i).text();
@@ -1032,17 +1038,17 @@ function clickRecordSearch(iType) {
$("#downloadTd" + g_iSearchTimes).data("playbackURI", szPlaybackURI);
++g_iSearchTimes;
}
- console.log(szDeviceIdentify + " 搜索录像文件成功!");
- } else if("NO MATCHES" === $(xmlDoc).find("responseStatusStrg").eq(0).text()) {
- setTimeout(function() {
+ console.log(szDeviceIdentify + " 搜索录像文件成功!");
+ } else if ("NO MATCHES" === $(xmlDoc).find("responseStatusStrg").eq(0).text()) {
+ setTimeout(function () {
g_iSearchTimes = 0;
- console.log(szDeviceIdentify + " 没有录像文件!");
+ console.log(szDeviceIdentify + " 没有录像文件!");
}, 50);
}
},
error: function (oError) {
g_iSearchTimes = 0;
- console.log(szDeviceIdentify + " 搜索录像文件失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 搜索录像文件失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1085,11 +1091,11 @@ function clickStartPlayback() {
oTransCodeParam: oTransCodeParam,
success: function () {
szInfo = "开始回放成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "开始回放失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
} else {
@@ -1101,11 +1107,11 @@ function clickStartPlayback() {
szEndTime: szEndTime,
success: function () {
szInfo = "开始回放成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "开始回放失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1131,11 +1137,11 @@ function clickStopPlayback() {
WebVideoCtrl.I_Stop({
success: function () {
szInfo = "停止回放成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "停止回放失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1170,10 +1176,10 @@ function clickReversePlayback() {
szEndTime: szEndTime
}).then(() => {
szInfo = "开始倒放成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "开始倒放失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
};
@@ -1197,11 +1203,11 @@ function clickFrame() {
WebVideoCtrl.I_Frame({
success: function () {
szInfo = "单帧播放成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "单帧播放失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1216,11 +1222,11 @@ function clickPause() {
WebVideoCtrl.I_Pause({
success: function () {
szInfo = "暂停成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "暂停失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1235,11 +1241,11 @@ function clickResume() {
WebVideoCtrl.I_Resume({
success: function () {
szInfo = "恢复成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "恢复失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1254,11 +1260,11 @@ function clickPlaySlow() {
WebVideoCtrl.I_PlaySlow({
success: function () {
szInfo = "慢放成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "慢放失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1273,11 +1279,11 @@ function clickPlayFast() {
WebVideoCtrl.I_PlayFast({
success: function () {
szInfo = "快放成功!";
- console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
+ console.log(oWndInfo.szDeviceIdentify + " " + szInfo);
},
error: function (oError) {
szInfo = "快放失败!";
- console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
}
});
}
@@ -1291,10 +1297,10 @@ function clickGetOSDTime() {
WebVideoCtrl.I_GetOSDTime({
success: function (szOSDTime) {
$("#osdtime").val(szOSDTime);
- console.log(oWndInfo.szDeviceIdentify + " 获取OSD时间成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 获取OSD时间成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 获取OSD时间失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 获取OSD时间失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1303,6 +1309,7 @@ function clickGetOSDTime() {
// 下载录像
var g_iDownloadID = -1;
var g_tDownloadProcess = 0;
+
function clickStartDownloadRecord(i) {
var szDeviceIdentify = $("#ip").val(),
szChannelID = $("#channels").val(),
@@ -1322,15 +1329,16 @@ function clickStartDownloadRecord(i) {
}, (oError) => {
WebVideoCtrl.I_GetLastError().then((iErrorValue) => {
if (34 == iErrorValue) {
- console.log(szDeviceIdentify + " 已下载!");
+ console.log(szDeviceIdentify + " 已下载!");
} else if (33 == iErrorValue) {
- console.log(szDeviceIdentify + " 空间不足!");
+ console.log(szDeviceIdentify + " 空间不足!");
} else {
- console.log(szDeviceIdentify + " 下载失败!");
+ console.log(szDeviceIdentify + " 下载失败!");
}
});
});
}
+
function clickStartDownloadRecordByTime() {
var szDeviceIdentify = $("#ip").val(),
szChannelID = $("#channels").val(),
@@ -1345,28 +1353,29 @@ function clickStartDownloadRecordByTime() {
alert("开始时间大于结束时间");
return;
}
- WebVideoCtrl.I_StartDownloadRecordByTime(szDeviceIdentify, szPlaybackURI, szFileName, szStartTime,szEndTime,{
+ WebVideoCtrl.I_StartDownloadRecordByTime(szDeviceIdentify, szPlaybackURI, szFileName, szStartTime, szEndTime, {
bDateDir: true //是否生成日期文件
}).then((iDownloadID) => {
g_iDownloadID = iDownloadID;
$("
").appendTo("body");
g_tDownloadProcess = setInterval("downProcess(" + 0 + ")", 1000);
}, (oError) => {
- console.log(szDeviceIdentify + " 下载失败!");
+ console.log(szDeviceIdentify + " 下载失败!");
});
}
function clickStopDownload() {
WebVideoCtrl.I_StopDownloadRecord(g_iDownloadID).then(() => {
- console.log("停止下载成功!");
+ console.log("停止下载成功!");
clearInterval(g_tDownloadProcess);
g_tDownloadProcess = 0;
g_iDownloadID = -1;
$("#downProcess").remove();
}, (oError) => {
- console.log(szDeviceIdentify + " 停止下载失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 停止下载失败!", oError.errorCode, oError.errorMsg);
});
}
+
// 下载进度
async function downProcess() {
var iStatus = await WebVideoCtrl.I_GetDownloadStatus(g_iDownloadID);
@@ -1393,7 +1402,7 @@ async function downProcess() {
await WebVideoCtrl.I_StopDownloadRecord(g_iDownloadID);
- console.log("录像下载完成!");
+ console.log("录像下载完成!");
clearInterval(g_tDownloadProcess);
g_tDownloadProcess = 0;
g_iDownloadID = -1;
@@ -1417,12 +1426,12 @@ function clickExportDeviceConfig() {
}
var szDevicePassWord = $("#edfpassword").val();
- WebVideoCtrl.I_ExportDeviceConfig(szDeviceIdentify,szDevicePassWord).then(() => {
+ WebVideoCtrl.I_ExportDeviceConfig(szDeviceIdentify, szDevicePassWord).then(() => {
szInfo = "导出配置文件成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}, (oError) => {
szInfo = "导出配置文件失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -1441,9 +1450,9 @@ function clickImportDeviceConfig() {
return;
}
- WebVideoCtrl.I_ImportDeviceConfig(szDeviceIdentify, szFileName,szDevicePassWord).then(() => {
+ WebVideoCtrl.I_ImportDeviceConfig(szDeviceIdentify, szFileName, szDevicePassWord).then(() => {
szInfo = "导入成功!";
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
WebVideoCtrl.I_Restart(szDeviceIdentify, {
success: function (xmlDoc) {
$("
重启中...
").appendTo("body");
@@ -1458,12 +1467,12 @@ function clickImportDeviceConfig() {
setTimeout("reconnect('" + szDeviceIdentify + "')", 20000);
},
error: function (oError) {
- console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
}
});
}, (oError) => {
szInfo = "导入失败!";
- console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + szInfo, oError.errorCode, oError.errorMsg);
});
}
@@ -1475,13 +1484,16 @@ function reconnect(szDeviceIdentify) {
$("#restartDiv").remove();
},
error: function () {
- setTimeout(function () {reconnect(szDeviceIdentify);}, 5000);
+ setTimeout(function () {
+ reconnect(szDeviceIdentify);
+ }, 5000);
}
});
}
// 开始升级
var g_tUpgrade = 0;
+
function clickStartUpgrade(szDeviceIdentify) {
var szDeviceIdentify = $("#ip").val(),
szFileName = $("#upgradeFile").val();
@@ -1494,11 +1506,11 @@ function clickStartUpgrade(szDeviceIdentify) {
alert("请选择升级文件!");
return;
}
- WebVideoCtrl.I_StartUpgrade(szDeviceIdentify, szFileName).then(function(){
+ WebVideoCtrl.I_StartUpgrade(szDeviceIdentify, szFileName).then(function () {
g_tUpgrade = setInterval("getUpgradeStatus('" + szDeviceIdentify + "')", 1000);
- },function(){
+ }, function () {
clearInterval(g_tUpgrade);
- console.log(szDeviceIdentify + " 升级失败!");
+ console.log(szDeviceIdentify + " 升级失败!");
});
}
@@ -1510,7 +1522,7 @@ async function getUpgradeStatus(szDeviceIdentify) {
if (iProcess < 0) {
clearInterval(g_tUpgrade);
g_tUpgrade = 0;
- console.log(szDeviceIdentify + " 获取进度失败!");
+ console.log(szDeviceIdentify + " 获取进度失败!");
return;
} else if (iProcess < 100) {
if (0 == $("#restartDiv").length) {
@@ -1546,7 +1558,7 @@ async function getUpgradeStatus(szDeviceIdentify) {
setTimeout("reconnect('" + szDeviceIdentify + "')", 20000);
},
error: function (oError) {
- console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1571,7 +1583,7 @@ async function getUpgradeStatus(szDeviceIdentify) {
setTimeout("reconnect('" + szDeviceIdentify + "')", 20000);
},
error: function (oError) {
- console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 重启失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1587,7 +1599,7 @@ function clickCheckPluginVersion() {
alert("您的插件版本已经是最新的!");
}
}, () => {
- console.log(szDeviceIdentify + " 检测插件新版本失败");
+ console.log(szDeviceIdentify + " 检测插件新版本失败");
});
}
@@ -1596,9 +1608,9 @@ function clickRestoreDefault() {
szMode = "basic";
WebVideoCtrl.I_RestoreDefault(szDeviceIdentify, szMode).then(() => {
$("#restartDiv").remove();
- console.log(szDeviceIdentify + " 恢复默认参数成功!");
+ console.log(szDeviceIdentify + " 恢复默认参数成功!");
}, (oError) => {
- console.log(szDeviceIdentify + " 恢复默认参数失败!", oError.errorCode, oError.errorMsg);
+ console.log(szDeviceIdentify + " 恢复默认参数失败!", oError.errorCode, oError.errorMsg);
});
}
@@ -1609,10 +1621,10 @@ function PTZZoomIn() {
WebVideoCtrl.I_PTZControl(10, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦+成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 调焦+成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦+失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 调焦+失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1625,10 +1637,10 @@ function PTZZoomout() {
WebVideoCtrl.I_PTZControl(11, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦-成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 调焦-成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦-失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 调焦-失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1641,10 +1653,10 @@ function PTZZoomStop() {
WebVideoCtrl.I_PTZControl(11, true, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦停止成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 调焦停止成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 调焦停止失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 调焦停止失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1657,10 +1669,10 @@ function PTZFocusIn() {
WebVideoCtrl.I_PTZControl(12, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦+成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦+成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦+失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦+失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1673,10 +1685,10 @@ function PTZFoucusOut() {
WebVideoCtrl.I_PTZControl(13, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦-成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦-成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦-失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦-失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1689,10 +1701,10 @@ function PTZFoucusStop() {
WebVideoCtrl.I_PTZControl(12, true, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦停止成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦停止成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 聚焦停止失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 聚焦停止失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1705,10 +1717,10 @@ function PTZIrisIn() {
WebVideoCtrl.I_PTZControl(14, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈+成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 光圈+成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈+失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 光圈+失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1721,10 +1733,10 @@ function PTZIrisOut() {
WebVideoCtrl.I_PTZControl(15, false, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈-成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 光圈-成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈-失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 光圈-失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1737,10 +1749,10 @@ function PTZIrisStop() {
WebVideoCtrl.I_PTZControl(14, true, {
iWndIndex: g_iWndIndex,
success: function (xmlDoc) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈停止成功!");
+ console.log(oWndInfo.szDeviceIdentify + " 光圈停止成功!");
},
error: function (oError) {
- console.log(oWndInfo.szDeviceIdentify + " 光圈停止失败!", oError.errorCode, oError.errorMsg);
+ console.log(oWndInfo.szDeviceIdentify + " 光圈停止失败!", oError.errorCode, oError.errorMsg);
}
});
}
@@ -1776,12 +1788,13 @@ function changeIPMode(iType) {
// 启用多边形绘制
var g_bEnableDraw = false;
+
function clickEnableDraw() {
WebVideoCtrl.I_SetPlayModeType(6).then(() => {
g_bEnableDraw = true;
- console.log("启用绘制成功!");
+ console.log("启用绘制成功!");
}, (oError) => {
- console.log("启用绘制失败!", oError.errorCode, oError.errorMsg);
+ console.log("启用绘制失败!", oError.errorCode, oError.errorMsg);
});
}
@@ -1789,9 +1802,9 @@ function clickEnableDraw() {
function clickDisableDraw() {
WebVideoCtrl.I_SetSnapDrawMode(0, -1).then(() => {
g_bEnableDraw = false;
- console.log("禁用绘制成功!");
+ console.log("禁用绘制成功!");
}, (oError) => {
- console.log("禁用绘制失败!", oError.errorCode, oError.errorMsg);
+ console.log("禁用绘制失败!", oError.errorCode, oError.errorMsg);
});
}
@@ -1819,7 +1832,7 @@ function clickAddSnapPolygon() {
szInfo += "";
WebVideoCtrl.I_SetSnapPolygonInfo(g_iWndIndex, szInfo).then(() => {
- console.log("添加图形成功!");
+ console.log("添加图形成功!");
});
WebVideoCtrl.I_SetSnapDrawMode(g_iWndIndex, 2);
}
@@ -1885,9 +1898,9 @@ function clickSetSnapPolygon() {
szInfo += "";
WebVideoCtrl.I_SetSnapPolygonInfo(g_iWndIndex, szInfo).then(() => {
- console.log("设置图形成功!");
+ console.log("设置图形成功!");
}, (oError) => {
- console.log("设置图形失败!", oError.errorCode, oError.errorMsg);
+ console.log("设置图形失败!", oError.errorCode, oError.errorMsg);
});
}
@@ -1898,9 +1911,9 @@ function clickDelAllSnapPolygon() {
}
WebVideoCtrl.I_ClearSnapInfo(g_iWndIndex).then(() => {
- console.log("清空图形成功!");
+ console.log("清空图形成功!");
}, (oError) => {
- console.log("清空图形失败!", oError.errorCode, oError.errorMsg);
+ console.log("清空图形失败!", oError.errorCode, oError.errorMsg);
});
}
@@ -1933,11 +1946,11 @@ function clickDeviceCapturePic() {
} else {
szInfo = "设备抓图失败!";
}
- console.log(szDeviceIdentify + " " + szInfo);
+ console.log(szDeviceIdentify + " " + szInfo);
}
function loadXML(szXml) {
- if(null == szXml || "" == szXml) {
+ if (null == szXml || "" == szXml) {
return null;
}
diff --git a/haiwei-admin/src/main/resources/templates/board/board1.html b/haiwei-admin/src/main/resources/templates/board/board1.html
index 071da6a..0eb7952 100644
--- a/haiwei-admin/src/main/resources/templates/board/board1.html
+++ b/haiwei-admin/src/main/resources/templates/board/board1.html
@@ -38,7 +38,10 @@
backgroundImage: status[`bottomBtn${e}S`] ? 'url("../../board/img/btn1bg.png")' : 'url("../../board/img/btnbg.png")'
})
if (e === 3) {
- // clickStopRealPlay()
+ document.getElementById("monitoringIframe").contentWindow.edit()
+ setTimeout(()=>{
+ $("#monitoring").empty()
+ },100)
}
}
const toggleInfo = () => {
@@ -50,7 +53,10 @@
}
const bottomBtnInfo = (e, el) => {
if (e === 3) {
- // clickLogin()
+ $("#monitoring").append(`
`)
+ setTimeout(()=>{
+ document.getElementById("monitoringIframe").contentWindow.login()
+ },1000)
}
$("#modal" + e).toggle()
switch (e) {
@@ -231,13 +237,12 @@