From cc4b646243ff6785c5fdb98888ea1a969f0c2f5a Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 19 Dec 2024 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dutyTask/remotePatrol/remotePatrol.html | 2 +- bns/html/video/video.html | 2 +- bns/js/video/video.js | 41 ++++++------------- 3 files changed, 14 insertions(+), 31 deletions(-) diff --git a/bns/html/dutyTask/remotePatrol/remotePatrol.html b/bns/html/dutyTask/remotePatrol/remotePatrol.html index 9151ccc..46f69b8 100644 --- a/bns/html/dutyTask/remotePatrol/remotePatrol.html +++ b/bns/html/dutyTask/remotePatrol/remotePatrol.html @@ -134,7 +134,7 @@
- +
diff --git a/bns/html/video/video.html b/bns/html/video/video.html index c6727c0..b3159cc 100644 --- a/bns/html/video/video.html +++ b/bns/html/video/video.html @@ -180,7 +180,7 @@
- +
diff --git a/bns/js/video/video.js b/bns/js/video/video.js index c891442..83e4767 100644 --- a/bns/js/video/video.js +++ b/bns/js/video/video.js @@ -86,7 +86,14 @@ layui.extend({ } }); dtree.on("node('ballTree')", function (obj) { - if (!videoObject.recordVideoState && isEmpty(videoObject.remoteId)) { + console.error(obj); + if(obj.param.recordData.state === '1'){ + let idx = getRandomInteger(1,3); + $('#video').attr('src','../../video/'+idx+'.mp4'); + }else{ + return layer.msg('球机不在线',{icon:2}); + } + /* if (!videoObject.recordVideoState && isEmpty(videoObject.remoteId)) { let data = obj.param.recordData; let devName = data.tName; let passWay = localStorage.getItem("passWay"); @@ -115,8 +122,11 @@ layui.extend({ layer.msg("当前视频正在远程录像,请先关闭远程录像", {icon: 0}); } - } + } */ + function getRandomInteger(min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; + } }); tree = dtree.render({ elem: "#ballTree", @@ -170,33 +180,6 @@ function openRemotePatrol(id, puid, tCode, twCode, tdCode, passWay) { * @param keyWord */ function initTreeCity(keyWord) { - let params = { - keyWord: $('#keyWord').val() - }; - let url = dataUrl + 'proteam/pot/video/getMenuListCity'; - // ajaxRequest(url, "POST", params, true, function () { - // }, function (result) { - // if (result.code === 200) { - // calleArr(data.data); - // let treeData = [{ - // id: "top", - // title: '球机  (在线:' + num + '  ' + " 不在线:" + '' + noNum + '  ' + " 总数:" + all + ')', - // checkArr: "0", - // parentId: "-1", - // children: data.data, - // iconClass: 'iconfont icon-shexiangtou', - // spread: true, - // }]; - // dtree.reload(tree, { - // data: treeData, - // }); - // } else if (result.code === 500) { - // layer.alert(result.msg, { icon: 2 }) - // } - // }, function (xhr, status, error) { - // errorFn(xhr, status, error) - // }, null); - console.log(122) $.ajax({ type:"POST", headers: {