From 241d327e57cbfe504aa806c61aa22e6205706098 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期六, 11 四月 2026 16:59:46 +0800
Subject: [PATCH] 引用纠正

---
 fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js |  131 +++++++++++++++++++++++++++----------------
 1 files changed, 83 insertions(+), 48 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js b/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
index 784ca79..cd16d3f 100644
--- a/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
+++ b/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
@@ -7,6 +7,8 @@
 var playCamera = null;
 var playList = {};
 
+var playTag = "1";  //榛樿鍐呯綉鎾斁
+
 var playUrl1 = null;
 var videoId1 = null;
 let webrtc1;
@@ -45,53 +47,37 @@
 let mediaStream9;
 
 $(function () {
-    layui.use(['layer', 'table'], function () {
+    layui.use(['layer', 'form', 'table'], function () {
         layer = layui.layer;
         table = layui.table;
+        form = layui.form;
+
+        // 鐩戝惉鎾斁鏂瑰紡
+        form.on('select(select_play)', function (obj) {
+            return renderPlayType();
+        });
     });
 
-    showDeptSelect();
+    //璧嬪�煎唴澶栫綉鎾斁
+    if (lan) {
+        $("#playLan").val(lan)
+        playTag = lan;
+    }
 
     //鍒濆鍖栨覆鏌撴挱鏀惧垪琛�
     renderList();
 });
 
-
 /**
- * 寮瑰嚭鍒囨崲搴撳尯鍒楄〃
+ * 鍒囨崲鎾斁鏂瑰紡
  */
-function showDeptSelect() {
-    if(showDeptList === "N"){
-        $("#deptList").css('display', 'none');
-    }
-    if(showDeptList === "Y"){
-        $("#deptList").css('display', 'block');
-    }
-}
+function renderPlayType() {
+    playTag = $("#playLan").val();
 
-/**
- * 寮瑰嚭鍒囨崲搴撳尯鍒楄〃
- */
-function showDepotAreaSelect() {
-    layer.open({
-        type: 2,
-        title: '閫夋嫨搴撳尯',
-        area: ['400px', '650px'],
-        offset: ['50px', '170px'],
-        shade: 0,
-        content: "/com.fzzy.igds.SelectDept.d",
-        closeBtn: 1
-    });
-}
-
-/**
- *
- * @param id
- * @returns {boolean}
- */
-function onDeptAreaChange(id) {
-    window.location.href = "./security/video-dept?type=" + type + "&deptId=" + id;
-    return true;
+    //鍐呯綉鎾斁锛岄噸缃悇涓挱鏀剧獥鍙�
+    reloadView(1);
+    reloadView(4);
+    reloadView(9);
 }
 
 /**
@@ -133,16 +119,25 @@
  * @param index
  */
 function getMedia(index) {
-    if(windowsNum == null){
+    if(splitWin === 9){
+        layer.msg("褰撳墠娴佸獟浣撴殏涓嶆敮鎸�9鍒嗗睆鎾斁锛�");
+        return;
+    }
+    if (windowsNum == null) {
         windowsNum = 1;
     }
     playCamera = null;
     var camera = listCamera[index];
     playList[windowsNum] = camera;
 
+    var playType = camera.playType;
+    if (playTag === "1") {
+        //鍐呯綉鎾斁,璧嬪�糤ebRtc鎾斁鏂瑰紡
+        playType = "WEB_RTC";
+    }
     var data = {
         id: camera.id,
-        playType: camera.playType
+        playType: playType
     };
     $.ajax({
         type: 'POST',
@@ -257,11 +252,49 @@
     }
 }
 
-
-
+/**
+ * 鍒ゆ柇鍐呯綉鎾斁杩樻槸澶栫綉鎾斁
+ */
 function startPlay() {
+    if (playTag === "1") {
+        //鍐呯綉鎾斁
+        startPlay1();
+    }
+    if (playTag === "2") {
+        //澶栫綉鎾斁
+        startPlay2();
+    }
+}
 
-    if(windowsNum > splitWin){
+/**
+ * 澶栫綉鎾斁
+ */
+function startPlay2() {
+
+    if (windowsNum > splitWin) {
+        windowsNum = 1;
+    }
+    if (!playCamera) {
+        $("#f" + splitWin + "_d" + windowsNum).html("鏈幏鍙栧埌鎽勫儚澶存挱鏀句俊鎭紒锛�");
+    }
+
+    if (playCamera.playUrl) {
+        var html = '<div class="mask" onclick="selectWin(' + splitWin + ',' + windowsNum + ')"></div>';
+        html += '<iframe src="' + playCamera.playUrl + '" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>';
+        $("#f" + splitWin + "_d" + windowsNum).html(html);
+
+        curCamera = playList[windowsNum];
+    } else {
+        $("#f" + splitWin + "_d" + windowsNum).html("鏈幏鍙栧埌鎽勫儚澶�(" + playCamera.cameraName + ")鎾斁淇℃伅锛侊紒");
+    }
+}
+
+/**
+ * 鍐呯綉鎾斁
+ */
+function startPlay1() {
+
+    if (windowsNum > splitWin) {
         windowsNum = 1;
     }
     if (!playCamera) {
@@ -275,49 +308,49 @@
             playUrl1 = playCamera.playUrl;
             videoId1 = playCamera.cameraId;
             webRtcToPlay1();
-        }else if (windowsNum === 2) {
+        } else if (windowsNum === 2) {
             playUrl2 = null;
             mediaStream2 = null;
             playUrl2 = playCamera.playUrl;
             videoId2 = playCamera.cameraId;
             webRtcToPlay2();
-        }else if (windowsNum === 3) {
+        } else if (windowsNum === 3) {
             playUrl3 = null;
             mediaStream3 = null;
             playUrl3 = playCamera.playUrl;
             videoId3 = playCamera.cameraId;
             webRtcToPlay3();
-        }else if (windowsNum === 4) {
+        } else if (windowsNum === 4) {
             playUrl4 = null;
             mediaStream4 = null;
             playUrl4 = playCamera.playUrl;
             videoId4 = playCamera.cameraId;
             webRtcToPlay4();
-        }else if (windowsNum === 5) {
+        } else if (windowsNum === 5) {
             playUrl5 = null;
             mediaStream5 = null;
             playUrl5 = playCamera.playUrl;
             videoId5 = playCamera.cameraId;
             webRtcToPlay5();
-        }else if (windowsNum === 6) {
+        } else if (windowsNum === 6) {
             playUrl6 = null;
             mediaStream6 = null;
             playUrl6 = playCamera.playUrl;
             videoId6 = playCamera.cameraId;
             webRtcToPlay6();
-        }else if (windowsNum === 7) {
+        } else if (windowsNum === 7) {
             playUrl7 = null;
             mediaStream7 = null;
             playUrl7 = playCamera.playUrl;
             videoId7 = playCamera.cameraId;
             webRtcToPlay7();
-        }else if (windowsNum === 8) {
+        } else if (windowsNum === 8) {
             playUrl8 = null;
             mediaStream8 = null;
             playUrl8 = playCamera.playUrl;
             videoId8 = playCamera.cameraId;
             webRtcToPlay8();
-        }else if (windowsNum === 9) {
+        } else if (windowsNum === 9) {
             playUr9 = null;
             mediaStream9 = null;
             playUrl9 = playCamera.playUrl;
@@ -586,6 +619,7 @@
 }
 
 /*============= 瑙嗛鎾斁 ----- 缁撴潫 ===============*/
+
 /*============= webRtc瑙嗛鎾斁5 ----- 寮�濮� ===============*/
 /**
  * 寮�濮嬫挱鏀�
@@ -649,6 +683,7 @@
 }
 
 /*============= 瑙嗛鎾斁 ----- 缁撴潫 ===============*/
+
 /*============= webRtc瑙嗛鎾斁4 ----- 寮�濮� ===============*/
 /**
  * 寮�濮嬫挱鏀�

--
Gitblit v1.9.3