Просмотр исходного кода

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

唐峰 4 лет назад
Родитель
Сommit
f8617a798d
1 измененных файлов с 177 добавлено и 0 удалено
  1. 177 0
      3dDisplayEngine/buildingJs/company.js

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

@@ -1460,3 +1460,180 @@ var show_realtime_status = function(idx) {
             sta.appendChild(tr);
             td = document.createElement('td');
             td.setAttribute('class', 'project_info');
+            td.id = 'CurrentA';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_info');
+            td.id = 'CurrentB';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_info');
+            td.id = 'CurrentC';
+            tr.appendChild(td);
+            tr = document.createElement('tr');
+            sta.appendChild(tr);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_label');
+            td.innerHTML = 'A相温度';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_label');
+            td.innerHTML = 'B相温度';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_label');
+            td.innerHTML = 'C相温度';
+            tr.appendChild(td);
+            tr = document.createElement('tr');
+            sta.appendChild(tr);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_info');
+            td.id = 'TemperatureA';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_info');
+            td.id = 'TemperatureB';
+            tr.appendChild(td);
+            td = document.createElement('td');
+            td.setAttribute('class', 'project_info');
+            td.id = 'TemperatureC';
+            tr.appendChild(td);
+            var status_list = devicesStore[idx].status_list;
+            status_list.sort(staSortBypoint);
+            for (var i = 0; i < status_list.length; i++) {
+                if (status_list[i].point_code == 1) {
+                    $("#HighVoltageAlarm").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 2) {
+                    $("#LowVoltageAlarm").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 3) {
+                    $("#HighCurrentAlarm").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 4) {
+                    $("#ElectricityLeakage").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 5) {
+                    $("#HighTemperatureA").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 6) {
+                    $("#HighTemperatureB").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 7) {
+                    $("#HighTemperatureC").html((status_list[i].point_data == '0') ? '正常' : '告警');
+                } else if (status_list[i].point_code == 65) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#VoltageA").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 66) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#VoltageB").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 67) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#VoltageC").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 68) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#CurrentA").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 69) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#CurrentB").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 70) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#CurrentC").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 71) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#TemperatureA").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 72) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#TemperatureB").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                } else if (status_list[i].point_code == 73) {
+                    if (status_list[i].point_data.length > 0)
+                        $("#TemperatureC").html(status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + status_list[i].point_code + ',\'' + status_list[i].point_name + '\')"/>');
+                }
+            }
+        } else if (devicesStore[idx].dwtype == 'YTSM') {
+            var status_list = devicesStore[idx].status_list;
+            status_list.sort(staSortBypoint);
+            for (var i = 0; i < status_list.length; i++) {
+                if (((status_list[i].point_code > 0) && (status_list[i].point_code < 5) && (status_list[i].point_name != '') && (status_list[i].point_code != 3)) ||
+                    ((status_list[i].point_code == 3) && (status_list[i].point_data != 0))) {
+                    var tr = document.createElement('tr');
+                    sta.appendChild(tr);
+                    var sta_name = document.createElement('td');
+                    sta_name.width = "40%";
+                    sta_name.setAttribute('class', 'point_label project_label');
+                    sta_name.style.paddingTop = '14px';
+                    sta_name.innerHTML = status_list[i].point_name;
+                    tr.appendChild(sta_name);
+                    var sta_value = document.createElement('td');
+                    sta_value.setAttribute('class', 'project_info');
+                    sta_value.style.paddingTop = '12px';
+                    if (status_list[i].point_code == 1)
+                        sta_value.innerHTML = status_list[i].content;
+                    else
+                        sta_value.innerHTML = status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + (status_list[i].point_code + ((devicesStore[idx].start_port > 0) ? (devicesStore[idx].start_port + 63) : 0)) + ',\'' + status_list[i].point_name + '\')"/>';
+                    tr.appendChild(sta_value);
+                }
+            }
+        } else {
+            var status_list = devicesStore[idx].status_list;
+            status_list.sort(staSortBypoint);
+            for (var i = 0; i < status_list.length; i++) {
+                if (status_list[i].point_code > 0) {
+                    var tr = document.createElement('tr');
+                    sta.appendChild(tr);
+                    var sta_name = document.createElement('td');
+                    sta_name.width = "40%";
+                    sta_name.setAttribute('class', 'point_label project_label');
+                    sta_name.style.paddingTop = '14px';
+                    sta_name.innerHTML = status_list[i].point_name;
+                    tr.appendChild(sta_name);
+                    var sta_value = document.createElement('td');
+                    sta_value.setAttribute('class', 'project_info');
+                    sta_value.style.paddingTop = '12px';
+                    //					sta_value.style.paddingBottom='12px';
+                    if (devicesStore[idx].dwtype == 'YTUI') {
+                        if (V_LOGINNAME == 'admin')
+                            sta_value.innerHTML = status_list[i].content + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_userinfo_detail(' + devicesStore[idx].owner_code + ')"/>';
+                        else
+                            sta_value.innerHTML = status_list[i].content;
+                    } else if ((devicesStore[idx].dwtype == 'YTWP') || (devicesStore[idx].dwtype == 'YTLL')) {
+                        if (status_list[i].point_name.indexOf('状态') >= 0) {
+                            if ((status_list[i].point_data == 0) || (status_list[i].point_data == '00'))
+                                sta_value.innerHTML = '正常';
+                            else
+                                sta_value.innerHTML = '--';
+                        } else if (status_list[i].point_data.length > 0)
+                            sta_value.innerHTML = status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + (status_list[i].point_code + ((devicesStore[idx].start_port > 0) ? (devicesStore[idx].start_port + 63) : 0)) + ',\'' + status_list[i].point_name + '\')"/>';
+                    } else if (status_list[i].point_data.length > 0)
+                        sta_value.innerHTML = status_list[i].point_data + '<img class="detail_data_btn" src="' + basePath + 'res/img/common/famicons/chart_curve.png" onclick="show_detail_data(' + devicesStore[idx].owner_code + ',' + (status_list[i].point_code + ((devicesStore[idx].start_port > 0) ? (devicesStore[idx].start_port + 63) : 0)) + ',\'' + status_list[i].point_name + '\')"/>';
+                    tr.appendChild(sta_value);
+                }
+            }
+        }
+    }
+}
+
+var fill_uiwin = function(json) {
+    fillvalue = true;
+    Ext.getCmp('userinfo_pushalarm').setValue(json.PUSH_WX == 1);
+    Ext.getCmp('userinfo_pushtts').setValue(json.PUSH_TTS == 1);
+    fillvalue = false;
+    var data = new Array();
+    for (var i = 0; i < json.LIST.length; i++) {
+        var obj = new Array();
+        if (json.LIST[i].id == 1)
+            obj.push('故障');
+        else if (json.LIST[i].id == 2)
+            obj.push('告警');
+        else if (json.LIST[i].id == 3)
+            obj.push('反馈');
+        else if (json.LIST[i].id == 4)
+            obj.push('监管');
+        else if (json.LIST[i].id == 5)
+            obj.push('启动');
+        else if (json.LIST[i].id == 6)
+            obj.push('自检');
+        else if (json.LIST[i].id == 7)
+            obj.push('屏蔽');
+        else if (json.LIST[i].id == 8)
+            obj.push('复位');
+        else if (json.LIST[i].id == 9)
+            obj.push('消音');
+        obj.push(json.LIST[i].count);
+        data.push(obj);
+    }
+    var themecolor = ((theme == '') || (theme == 'access')) ? '#ffffff' : '#000000';