Преглед на файлове

3dDisplayEngine company.js 唐峰 commit at 2020-12-23

唐峰 преди 4 години
родител
ревизия
b903706188
променени са 1 файла, в които са добавени 199 реда и са изтрити 0 реда
  1. 199 0
      3dDisplayEngine/buildingJs/company.js

+ 199 - 0
3dDisplayEngine/buildingJs/company.js

@@ -1156,3 +1156,202 @@ var chk_cideo = function() {
 
 
 var show_realtime_status = function(idx) {
 var show_realtime_status = function(idx) {
     $("#device_count_label").html('');
     $("#device_count_label").html('');
+    if ((devicesStore != null) && (devicesStore.length > idx)) {
+        $("#device_count_label").html('[ ' + devicesStore.length + '-' + (idx + 1) + ' ]');
+        var status_list_bar = document.getElementById('status_list_bar');
+        status_list_bar.setAttribute('status', '');
+        status_list_bar.innerHTML = '';
+        var title = document.createElement('div');
+        title.id = 'device_list_status_title';
+        title.style.textAlign = 'center';
+        title.style.fontSize = '16px';
+        title.style.fontWeight = 'bold';
+        title.innerHTML = devicesStore[idx].device_name;
+        status_list_bar.appendChild(title);
+        var sta = document.createElement('table');
+        sta.style.marginTop = '10px';
+        sta.width = '100%';
+        sta.idx = i;
+        status_list_bar.appendChild(sta);
+        var v_reset = document.getElementById('v_reset');
+        if (v_reset != undefined) {
+            document.body.removeChild(v_reset);
+        }
+        var big_view = document.getElementById('big_view');
+        if (big_view != undefined) {
+            document.body.removeChild(big_view);
+        }
+        $("#status_list_bar").removeClass('status_list_bar_video');
+        if (devicesStore[idx].dwtype == 'YTVA') {
+            online_video = false;
+            if (onair_video) {
+                onair_video = false;
+                chk_cideo();
+            }
+            v_reset = document.createElement('div');
+            v_reset.id = 'v_reset';
+            v_reset.owner_code = devicesStore[idx].owner_code;
+            v_reset.setAttribute('class', 'v_reset');
+            v_reset.setAttribute('onclick', 'reset_video(this)');
+            v_reset.title = '视频重载';
+            document.body.appendChild(v_reset);
+            $("#v_reset").css('display', 'none');
+            big_view = document.createElement('div');
+            big_view.id = 'big_view';
+            big_view.owner_code = devicesStore[idx].owner_code;
+            big_view.setAttribute('class', 'big_view');
+            big_view.setAttribute('onclick', 'big_view_win(this)');
+            big_view.title = '视频放大';
+            document.body.appendChild(big_view);
+            $("#big_view").css('display', 'none');
+            $("#status_list_bar").addClass('status_list_bar_video');
+            $("#status_list_bar").html('<div style="margin-top:120px;">连接中,请稍候...</div>');
+        } else if (devicesStore[idx].dwtype == 'YTFC') {
+            var tr = document.createElement('tr');
+            sta.appendChild(tr);
+            var td = document.createElement('td');
+            td.width = '30%';
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'PowerAlarmLabel';
+            td.innerHTML = '电源故障状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'PowerAlarm';
+            td.width = '20%';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.width = '30%';
+            td.id = 'ManualActLabel';
+            td.innerHTML = '手自动状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.width = '20%';
+            td.id = 'ManualAct';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            tr = document.createElement('tr');
+            sta.appendChild(tr);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'DevWorking01Label';
+            td.innerHTML = '1#设备运行状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'DevWorking01';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'DevWorking02Label';
+            td.innerHTML = '2#设备运行状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'DevWorking02';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            tr = document.createElement('tr');
+            sta.appendChild(tr);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'DevAlarm01Label';
+            td.innerHTML = '1#设备故障状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'DevAlarm01';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'DevAlarm02Label';
+            td.innerHTML = '2#设备故障状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'DevAlarm02';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            tr = document.createElement('tr');
+            sta.appendChild(tr);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'point_label project_label');
+            td.style.paddingTop = '14px';
+            td.id = 'FireAutoActLabel';
+            td.innerHTML = '消防联动状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.id = 'FireAutoAct';
+            td.setAttribute('class', 'project_info');
+            td.style.paddingTop = '12px';
+            tr.appendChild(td);
+            var status_list = devicesStore[idx].status_list;
+            status_list.sort(staSortBypoint);
+            for (var i = 0; i < status_list.length; i++) {
+                var words = status_list[i].content.split(" ");
+                if (words.length > 0) {
+                    if (status_list[i].point_code == 1) {
+                        $("#PowerAlarmLabel").html(status_list[i].point_name);
+                        $("#PowerAlarm").html(words[0]);
+                    } else if (status_list[i].point_code == 2) {
+                        $("#ManualActLabel").html(status_list[i].point_name);
+                        $("#ManualAct").html(words[0]);
+                    } else if (status_list[i].point_code == 3) {
+                        $("#DevWorking01Label").html(status_list[i].point_name);
+                        $("#DevWorking01").html(words[0]);
+                    } else if (status_list[i].point_code == 4) {
+                        $("#DevWorking02Label").html(status_list[i].point_name);
+                        $("#DevWorking02").html(words[0]);
+                    } else if (status_list[i].point_code == 5) {
+                        $("#DevAlarm01Label").html(status_list[i].point_name);
+                        $("#DevAlarm01").html(words[0]);
+                    } else if (status_list[i].point_code == 6) {
+                        $("#DevAlarm02Label").html(status_list[i].point_name);
+                        $("#DevAlarm02").html(words[0]);
+                    } else if (status_list[i].point_code == 7) {
+                        $("#FireAutoActLabel").html(status_list[i].point_name);
+                        $("#FireAutoAct").html(words[0]);
+                    }
+                }
+            }
+        } else if (devicesStore[idx].dwtype == 'YTWC') {
+            var status_list = devicesStore[idx].status_list;
+            status_list.sort(staSortBypoint);
+            for (var i = 0; i < status_list.length; i++) {
+
+                var tr = document.createElement('tr');
+                sta.appendChild(tr);
+                var td = document.createElement('td');
+                td.width = '30%';
+                td.setAttribute('class', 'point_label project_label');
+                td.style.paddingTop = '14px';
+                td.innerHTML = status_list[i].point_name;
+                tr.appendChild(td);
+                td = document.createElement('td');
+                td.innerHTML = (status_list[i].content).substring(0, 2);
+                td.width = '20%';
+                td.setAttribute('class', 'project_info');
+                td.style.paddingTop = '12px';
+                tr.appendChild(td);
+            }
+        } else if (devicesStore[idx].dwtype == 'YTEF') {
+            var tr = document.createElement('tr');
+            sta.appendChild(tr);
+            var td = document.createElement('td');
+            td.setAttribute('class', 'project_label');
+            td.innerHTML = '供电过压状态';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_label');
+            td.innerHTML = '供电低压状态';