Bladeren bron

3dDisplayEngine map.js 袁明明 commit at 2020-12-24

袁明明 4 jaren geleden
bovenliggende
commit
7448d8bcb8
1 gewijzigde bestanden met toevoegingen van 123 en 0 verwijderingen
  1. 123 0
      3dDisplayEngine/buildingJs/map.js

+ 123 - 0
3dDisplayEngine/buildingJs/map.js

@@ -1014,3 +1014,126 @@ var clear_detail_info = function() {
             if (d6o == 0)
                 $("#device_count_num_44").html('100%');
             else
+                $("#device_count_num_44").html(toDecimal(d6oc * 100 / d6o) + '%');
+            if (d6o != 0)
+                $("#device_confirm_44").css('width', (280 * d6oc / d6o) + 'px');
+            else
+                $("#device_confirm_44").css('width', '280px');
+        }
+
+
+        draw_pie('data_pie_1', d1a, d1ac);
+        draw_pie('data_pie_2', d7a, d7ac);
+        draw_pie('data_pie_3', d2a, d2ac);
+
+        $("#device_count_num_11").html(d1);
+        $("#device_count_num_12").html(d1oc);
+        $("#device_count_num_13").html(d1o - d1oc);
+        if (d1o == 0)
+            $("#device_count_num_14").html('100%');
+        else
+            $("#device_count_num_14").html(toDecimal(d1oc * 100 / d1o) + '%');
+        $("#device_count_num_21").html(d7);
+        $("#device_count_num_22").html(d7oc);
+        $("#device_count_num_23").html(d7o - d7oc);
+        if (d7o == 0)
+            $("#device_count_num_24").html('100%');
+        else
+            $("#device_count_num_24").html(toDecimal(d7oc * 100 / d7o) + '%');
+        $("#device_count_num_31").html(d2);
+        $("#device_count_num_32").html(d2oc);
+        $("#device_count_num_33").html(d2o - d2oc);
+        if (d2o == 0)
+            $("#device_count_num_34").html('100%');
+        else
+            $("#device_count_num_34").html(toDecimal(d2oc * 100 / d2o) + '%');
+
+        if (d1o != 0) {
+            $("#device_confirm_14").css('width', (280 * d1oc / d1o) + 'px');
+        } else
+            $("#device_confirm_14").css('width', '280px');
+        if (d7o != 0)
+            $("#device_confirm_24").css('width', (280 * d7oc / d7o) + 'px');
+        else
+            $("#device_confirm_24").css('width', '280px');
+        if (d2o != 0)
+            $("#device_confirm_34").css('width', (280 * d2oc / d2o) + 'px');
+        else
+            $("#device_confirm_34").css('width', '280px');
+
+        $(".alarm_tab_area").remove();
+        if ((AlarmStore != null) && (AlarmStore.length > 0)) {
+            var parent = document.getElementById('container');
+            AlarmStore.sort(alarmSortByTime);
+            var area = document.createElement('div');
+            area.id = 'alarm_tab_area';
+            area.setAttribute('class', 'alarm_tab_area');
+            parent.appendChild(area);
+            for (var i = 0; i < AlarmStore.length; i++) {
+                if (i >= 6)
+                    break;
+                var tab = document.createElement('div');
+                tab.id = 'alarm_tab_' + (i + 1);
+                tab.setAttribute('class', 'alarm_tab');
+                tab.setAttribute('onclick', (AlarmStore[i].dwtype == 1) ? 'show_all_fireAlarm()' :
+                    (AlarmStore[i].dwtype == 2) ? 'show_all_waterAlarm()' :
+                    (AlarmStore[i].dwtype == 5) ? 'show_all_waterAlarm()' :
+                    (AlarmStore[i].dwtype == 6) ? 'show_all_rtuAlarm()' :
+                    (AlarmStore[i].dwtype == 7) ? 'show_all_efireAlarm()' : '#');
+                tab.style.top = (120 * i) + 'px';
+                if (($(document).innerHeight() - 205) > (120 * (i + 1)))
+                    $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');
+                else
+                    $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');
+                area.appendChild(tab);
+                var title = document.createElement('div');
+                title.id = 'alarm_tab_title_' + (i + 1);
+                title.setAttribute('class', 'alarm_tab_title');
+                title.innerHTML = (AlarmStore[i].dwtype == 1) ? '火警监测报告' :
+                    (AlarmStore[i].dwtype == 2) ? '水系统监测报告' :
+                    (AlarmStore[i].dwtype == 5) ? '水系统监测报告' :
+                    (AlarmStore[i].dwtype == 6) ? 'RTU监测报告' :
+                    (AlarmStore[i].dwtype == 7) ? '电气火灾监测报告' : '其他报告';
+                tab.appendChild(title);
+                var time_label = document.createElement('div');
+                time_label.id = 'alarm_tab_time_' + (i + 1);
+                time_label.setAttribute('class', 'alarm_tab_time');
+                time_label.innerHTML = AlarmStore[i].time;
+                tab.appendChild(time_label);
+                var data = document.createElement('div');
+                data.id = "alarm_tab_data_" + (i + 1);
+                data.setAttribute('class', 'alarm_tab_data');
+                data.innerHTML = AlarmStore[i].company_name + ' ' + AlarmStore[i].data;
+                tab.appendChild(data);
+                var icon = document.createElement('img');
+                icon.setAttribute('class', 'alarm_tab_icon');
+                icon.height = '66';
+                icon.width = '66';
+                icon.src = baseUrl + 'res/img/icons/' + ((AlarmStore[i].dwtype == 1) ? 'alarm_tab_01.gif' :
+                    (AlarmStore[i].dwtype == 2) ? 'alarm_tab_03.gif' :
+                    (AlarmStore[i].dwtype == 5) ? 'alarm_tab_03.gif' :
+                    (AlarmStore[i].dwtype == 6) ? 'alarm_tab_04.gif' :
+                    (AlarmStore[i].dwtype == 7) ? 'alarm_tab_02.gif' : 'alarm_tab_04.gif');
+                //				var icon = document.createElement('div');
+                //				icon.id = "alarm_tab_icon_"+(i+1);
+                //				icon.setAttribute('class',(AlarmStore[i].dwtype==1)?'alarm_tab_icon alarm_icon_01':
+                //					(AlarmStore[i].dwtype==2)?'alarm_tab_icon alarm_icon_03':
+                //						(AlarmStore[i].dwtype==5)?'alarm_tab_icon alarm_icon_03':
+                //							(AlarmStore[i].dwtype==6)?'alarm_tab_icon alarm_icon_04':
+                //								(AlarmStore[i].dwtype==7)?'alarm_tab_icon alarm_icon_02':'alarm_tab_icon alarm_icon_04');
+                tab.appendChild(icon);
+            }
+        }
+    }
+}
+
+var showInfo = function(e) {
+    var pixel = e.pixel;
+    var company_code = e.target.getExtData().company_code;
+    var detail_info;
+    var parent = document.getElementById('container')
+    for (var i = 0; i < StatusStore.length; i++) {
+        if (StatusStore[i].company_code == company_code) {
+            if (current_company_code == company_code)
+                return;
+            clear_detail_info();