From 2fa66c208202f420a5f001cf0d67e5aa1bf94578 Mon Sep 17 00:00:00 2001 From: aijinhui <aijinhui> Date: 星期四, 07 九月 2023 16:53:39 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ard-work/src/main/resources/templates/test.html | 65 +++++++++++++++++++++----------- 1 files changed, 42 insertions(+), 23 deletions(-) diff --git a/ard-work/src/main/resources/templates/test.html b/ard-work/src/main/resources/templates/test.html index 25cbd19..25ea102 100644 --- a/ard-work/src/main/resources/templates/test.html +++ b/ard-work/src/main/resources/templates/test.html @@ -308,7 +308,7 @@ $("#setPreset").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1, "speed": 8, "presetIndex": 1}; + opt = {"cameraId": cameraId, "chanNo": 1, "speed": 8, "presetIndex": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -326,7 +326,7 @@ }) $("#gotoPreset").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1, "speed": 8, "presetIndex": 1}; + opt = {"cameraId": cameraId, "chanNo": 1, "speed": 8, "presetIndex": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -344,7 +344,7 @@ }) $("#getPTZ").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1}; + opt = {"cameraId": cameraId, "chanNo": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -370,7 +370,7 @@ var z = $('#z').val(); //瀹氫箟涓�涓甫鏈塎ap瀛楁鐨勫疄浣撳璞� var myEntity = { - channelNum: 1, + chanNo: 1, cameraId: cameraId, ptzMap: { p: p, @@ -401,7 +401,7 @@ var targetP = $('#targetPostion').val(); //瀹氫箟涓�涓甫鏈塎ap瀛楁鐨勫疄浣撳璞� var myEntity = { - channelNum: 1, + chanNo: 1, cameraId: cameraId, targetPosition: targetP, camPosition: camP, @@ -424,7 +424,7 @@ }) $("#setZeroPTZ").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1}; + opt = {"cameraId": cameraId, "chanNo": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -442,7 +442,7 @@ }) $("#WiperPwron").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1, "speed": 8, "enable": true, "code": 16}; + opt = {"cameraId": cameraId, "chanNo": 1, "speed": 8, "enable": true, "code": 16}; $.ajax({ headers: { 'Accept': 'application/json', @@ -461,8 +461,8 @@ var defogflag = true; $("#Defogcfg").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (defogflag) { $(this).text("鍏抽棴閫忛浘"); defogflag = false; @@ -503,8 +503,8 @@ var infrareflag = true; $("#Infrarecfg").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (infrareflag) { $(this).text("鍏抽棴绾㈠"); infrareflag = false; @@ -545,8 +545,8 @@ var focusModeflag = true; $("#FocusMode").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (focusModeflag) { $(this).text("鑷姩鑱氱劍"); focusModeflag = false; @@ -583,11 +583,30 @@ }) } }) + $("#getFocusPos").click(function () { + cameraId = $('#select option:selected').val(); + opt = {"cameraId": cameraId, "chanNo": 1}; + $.ajax({ + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': token + }, + url: "../hik/getFocusPos", + type: "post", + dataType: "json", + data: JSON.stringify(opt), + success: function (datas) { + console.log(datas); + $("#focus").val(datas.data.dwFocus); + } + }) + }) var heateRpwronflag = true; $("#HeateRpwron").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (heateRpwronflag) { $(this).text("鍏抽棴浜戝彴鍔犵儹"); heateRpwronflag = false; @@ -627,8 +646,8 @@ var CameraDeicingflag = true; $("#CameraDeicing").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (CameraDeicingflag) { $(this).text("鍏抽棴闀滃ご鍔犵儹"); CameraDeicingflag = false; @@ -666,7 +685,7 @@ }) $("#realCutPic").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1}; + opt = {"cameraId": cameraId, "chanNo": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -685,7 +704,7 @@ }) $("#saveCutPic").click(function () { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1}; + opt = {"cameraId": cameraId, "chanNo": 1}; $.ajax({ headers: { 'Accept': 'application/json', @@ -705,8 +724,8 @@ var recordflag = true; $("#record").click(function () { cameraId = $('#select option:selected').val(); - optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true}; - optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false}; + optOpen = {"cameraId": cameraId, "chanNo": 1, "enable": true}; + optClose = {"cameraId": cameraId, "chanNo": 1, "enable": false}; if (recordflag) { $(this).text("鍋滄褰曞儚"); recordflag = false; @@ -749,7 +768,7 @@ /*浜戝彴鍏叡鏂规硶*/ function commondMethod(url, code, enable) { cameraId = $('#select option:selected').val(); - opt = {"cameraId": cameraId, "channelNum": 1, "speed": 8, "enable": enable, "code": code}; + opt = {"cameraId": cameraId, "chanNo": 1, "speed": 8, "enable": enable, "code": code}; $.ajax({ headers: { 'Accept': 'application/json', @@ -790,7 +809,7 @@ //棰勮娴峰悍鐩告満 function realViewHik(serverip, elem, username, password, ipaddr, port) { // webRtcServer = new WebRtcStreamer(elem, "http://" + serverip + ":8000"); - webRtcServer = new WebRtcStreamer(elem, "http://192.168.1.227:9000"); + webRtcServer = new WebRtcStreamer(elem, "http://192.168.1.227:8000"); let rtspUrl = "rtsp://" + username + ":" + password + "@" + ipaddr + ":" + port + "/ch1/main/av_stream"; let option = "rtptransport=tcp"; console.log("rtsp鍦板潃锛�" + rtspUrl); -- Gitblit v1.9.3