/* 球机树 */ function loadVideoTree() { const bidCode = parent.$('#bidPro').val(); const keyWord = $('#keyWord').val(); const paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '¶m=' + keyWord; let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); const url = commonUrl + 'screen/largeScreen/video/getVideoTree?params=' + montageParam; ajaxRequestGet(url, "GET", true, function () { }, function (result) { if (result.code === 200) { setData(result.data); } else if (result.code === 500) { console.error('视频树' + result.msg); } else if (result.code === 401) { loginout(1); } }, function (xhr, status, error) { errorFn(xhr, status, error) }, aqEnnable); function setData(data) { let totalNum = 0, onlineNum = 0, offLineNum = 0; let isPlay=true; $.each(data, function (index, item) { if (item.id !== '0') { totalNum++; let titleName = item.title; if(item.title.length>20){ titleName = item.title.substr(0, 20) + '...'; } if (item.onLine === '1') { onlineNum++; item.title = '' + titleName + '' if(isPlay){ let puid = item.id.replace('QJ', '').split("-")[0]; playList.push(getPlay(puid,winDom,0)); playVideList(); // QXPlayVideo(puid, '0', winDom) // playControl(); // videoObject.devCode = puid; isPlay=false; } } else { offLineNum++; item.title = '' + titleName + '' } } }) videoTree = dtree.render({ elem: "#video-tree", width: "96%", // 指定树的宽度 data: data, dataFormat: "list", skin: "laySimple", line: false, // 显示树线 }); // 设备在线情况 $('.device-status').eq(0).html('全部(' + totalNum + ')') $('.device-status').eq(1).html('在线(' + onlineNum + ')') $('.device-status').eq(2).html('离线(' + offLineNum + ')') } } function oneVideo(){ for (let i = 2; i < 5; i++) { document.getElementById("windowbox" + i).style.cssText = "width: 48.5%;height: 48.8%;"; document.getElementById("videoPlayer"+i).style.cssText = "width: 100%;height: 100%;"; $('.video'+i+'-dimensions').css("width", "100%"); $('.video'+i+'-dimensions').css("height", "100%"); document.getElementById("windowbox" + i).style.display = "none"; } document.getElementById("windowbox" + 1).style.cssText = "width: 100%;height: 100%;"; document.getElementById("videoPlayer"+1).style.cssText = "width: 100%;height: 100%;"; nowDmoScree=1; while (playList.length > nowDmoScree) { console.log(playList[0].windBox) destoryVideo(playList[0].flvPlayer); playList.pop(); } //播放 for (let i = 0; i nowDmoScree){ playList=playList.slice(-nowDmoScree); } for (let i = 0; i nowDmoScree){ playList=playList.slice(-nowDmoScree); } console.log(playList) for (let i = 0; i