|
@@ -840,3 +840,177 @@ var showBuilding = function(company_code) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ draw_pie('data_pie_1', StatusStore[i].d1a, StatusStore[i].d1ac);
|
|
|
+ draw_pie('data_pie_2', StatusStore[i].d7a, StatusStore[i].d7ac);
|
|
|
+ draw_pie('data_pie_3', StatusStore[i].d2a, StatusStore[i].d2ac);
|
|
|
+
|
|
|
+ $("#device_count_num_11").html(StatusStore[i].d1);
|
|
|
+ $("#device_count_num_12").html(StatusStore[i].d1oc);
|
|
|
+ $("#device_count_num_13").html(StatusStore[i].d1o - StatusStore[i].d1oc);
|
|
|
+ if (StatusStore[i].d1o == 0)
|
|
|
+ $("#device_count_num_14").html('100%');
|
|
|
+ else
|
|
|
+ $("#device_count_num_14").html(toDecimal(StatusStore[i].d1oc * 100 / StatusStore[i].d1o) + '%');
|
|
|
+ $("#device_count_num_21").html(StatusStore[i].d7);
|
|
|
+ $("#device_count_num_22").html(StatusStore[i].d7oc);
|
|
|
+ $("#device_count_num_23").html(StatusStore[i].d7o - StatusStore[i].d7oc);
|
|
|
+ if (StatusStore[i].d7o == 0)
|
|
|
+ $("#device_count_num_24").html('100%');
|
|
|
+ else
|
|
|
+ $("#device_count_num_24").html(toDecimal(StatusStore[i].d7oc * 100 / StatusStore[i].d7o) + '%');
|
|
|
+ $("#device_count_num_31").html(StatusStore[i].d2);
|
|
|
+ $("#device_count_num_32").html(StatusStore[i].d2oc);
|
|
|
+ $("#device_count_num_33").html(StatusStore[i].d2o - StatusStore[i].d2oc);
|
|
|
+ if (StatusStore[i].d2o == 0)
|
|
|
+ $("#device_count_num_34").html('100%');
|
|
|
+ else
|
|
|
+ $("#device_count_num_34").html(toDecimal(StatusStore[i].d2oc * 100 / StatusStore[i].d2o) + '%');
|
|
|
+
|
|
|
+ if (StatusStore[i].d1o != 0) {
|
|
|
+ $("#device_confirm_14").css('width', (280 * StatusStore[i].d1oc / StatusStore[i].d1o) + 'px');
|
|
|
+ } else
|
|
|
+ $("#device_confirm_14").css('width', '280px');
|
|
|
+ if (StatusStore[i].d7o != 0)
|
|
|
+ $("#device_confirm_24").css('width', (280 * StatusStore[i].d7oc / StatusStore[i].d7o) + 'px');
|
|
|
+ else
|
|
|
+ $("#device_confirm_24").css('width', '280px');
|
|
|
+ if (StatusStore[i].d2o != 0)
|
|
|
+ $("#device_confirm_34").css('width', (280 * StatusStore[i].d2oc / StatusStore[i].d2o) + 'px');
|
|
|
+ else
|
|
|
+ $("#device_confirm_34").css('width', '280px');
|
|
|
+
|
|
|
+ $("#label_" + company_code).css('display', 'block');
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+var clear_detail_info = function() {
|
|
|
+ var d0 = 0,
|
|
|
+ d0o = 0,
|
|
|
+ d0oc = 0,
|
|
|
+ d0a = 0,
|
|
|
+ d0ac = 0;
|
|
|
+ var d1 = 0,
|
|
|
+ d1o = 0,
|
|
|
+ d1oc = 0,
|
|
|
+ d1a = 0,
|
|
|
+ d1ac = 0;
|
|
|
+ var d2 = 0,
|
|
|
+ d2o = 0,
|
|
|
+ d2oc = 0,
|
|
|
+ d2a = 0,
|
|
|
+ d2ac = 0;
|
|
|
+ var d6 = 0,
|
|
|
+ d6o = 0,
|
|
|
+ d6oc = 0,
|
|
|
+ d6a = 0,
|
|
|
+ d6ac = 0;
|
|
|
+ var d7 = 0,
|
|
|
+ d7o = 0,
|
|
|
+ d7oc = 0,
|
|
|
+ d7a = 0,
|
|
|
+ d7ac = 0;
|
|
|
+ var detail_info = document.getElementById('detail_info');
|
|
|
+ var parent = document.getElementById('container');
|
|
|
+ if (detail_info != undefined) {
|
|
|
+ parent.removeChild(detail_info);
|
|
|
+ current_company_code = "";
|
|
|
+ for (var i = 0; i < StatusStore.length; i++) {
|
|
|
+ var obj = StatusStore[i];
|
|
|
+ d1 += obj.d1;
|
|
|
+ d1o += obj.d1o;
|
|
|
+ d1a += obj.d1a;
|
|
|
+ d1oc += obj.d1oc;
|
|
|
+ d1ac += obj.d1ac;
|
|
|
+ d2 += obj.d2;
|
|
|
+ d2o += obj.d2o;
|
|
|
+ d2a += obj.d2a;
|
|
|
+ d2oc += obj.d2oc;
|
|
|
+ d2ac += obj.d2ac;
|
|
|
+ d6 += obj.d6;
|
|
|
+ d6o += obj.d6o;
|
|
|
+ d6a += obj.d6a;
|
|
|
+ d6oc += obj.d6oc;
|
|
|
+ d6ac += obj.d6ac;
|
|
|
+ d7 += obj.d7;
|
|
|
+ d7o += obj.d7o;
|
|
|
+ d7a += obj.d7a;
|
|
|
+ d7oc += obj.d7oc;
|
|
|
+ d7ac += obj.d7ac;
|
|
|
+ }
|
|
|
+ $("#data_number_11").html(d1a);
|
|
|
+ $("#data_number_12").html(d1a - d1ac);
|
|
|
+ $("#data_number_21").html(d7a);
|
|
|
+ $("#data_number_22").html(d7a - d7ac);
|
|
|
+ $("#data_number_31").html(d2a);
|
|
|
+ $("#data_number_32").html(d2a - d2ac);
|
|
|
+
|
|
|
+ if (V_LOGINNAME == 'ypxy') {
|
|
|
+ var query = new Object();
|
|
|
+ query.V_LOGINNAME = V_LOGINNAME;
|
|
|
+ query.V_PASSWORD = V_PASSWORD;
|
|
|
+ query.dwtype = '2';
|
|
|
+ query.COMMSTATUS = 'NO';
|
|
|
+ if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))
|
|
|
+ query.company_code = company_code;
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: baseUrl + "iot/alarm/view/getConfirmStatusByDays",
|
|
|
+ data: {
|
|
|
+ queryJson: Ext.JSON.encode(query)
|
|
|
+ },
|
|
|
+ success: function(result) {
|
|
|
+ var json = eval('(' + result + ')');
|
|
|
+ if (json.action == 'getConfirmStatusByDays') {
|
|
|
+ if (json.check == 'true') {
|
|
|
+ ConfirmStore = json.RESULT;
|
|
|
+ if (json.company_name != null)
|
|
|
+ companyName = json.company_name;
|
|
|
+ else
|
|
|
+ companyName = null;
|
|
|
+ for (var i = 0; i < ConfirmStore.length; i++) {
|
|
|
+ if (ConfirmStore[i].id == 'water_alarm') {
|
|
|
+ $("#data_number_41").html(ConfirmStore[i].count);
|
|
|
+ $("#data_number_42").html(ConfirmStore[i].count - ConfirmStore[i].sum);
|
|
|
+ draw_pie('data_pie_4', ConfirmStore[i].count, ConfirmStore[i].sum);
|
|
|
+
|
|
|
+ // $("#device_count_num_41").html(StatusStore[i].d6);
|
|
|
+ $("#device_count_num_42").html(ConfirmStore[i].count);
|
|
|
+ $("#device_count_num_43").html(ConfirmStore[i].count - ConfirmStore[i].sum);
|
|
|
+ if (ConfirmStore[i].count == 0)
|
|
|
+ $("#device_count_num_44").html('100%');
|
|
|
+ else
|
|
|
+ $("#device_count_num_44").html(toDecimal(ConfirmStore[i].sum * 100 / ConfirmStore[i].count) + '%');
|
|
|
+ if (ConfirmStore[i].count != 0)
|
|
|
+ $("#device_confirm_44").css('width', (280 * ConfirmStore[i].sum / ConfirmStore[i].count) + 'px');
|
|
|
+ else
|
|
|
+ $("#device_confirm_44").css('width', '280px');
|
|
|
+ $("#data_number_51").html(0);
|
|
|
+ $("#data_number_52").html(0);
|
|
|
+ draw_pie('data_pie_5', 0, 0);
|
|
|
+ $("#device_count_num_52").html(0);
|
|
|
+ $("#device_count_num_53").html(0);
|
|
|
+ $("#device_count_num_54").html('100%');
|
|
|
+ $("#device_confirm_54").css('width', '280px');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function() {
|
|
|
+ window.parent.document.location = baseUrl;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ $("#data_number_41").html(d6a);
|
|
|
+ $("#data_number_42").html(d6a - d6ac);
|
|
|
+ draw_pie('data_pie_4', d6a, d6ac);
|
|
|
+ $("#device_count_num_41").html(d6);
|
|
|
+ $("#device_count_num_42").html(d6oc);
|
|
|
+ $("#device_count_num_43").html(d6o - d6oc);
|
|
|
+ if (d6o == 0)
|
|
|
+ $("#device_count_num_44").html('100%');
|
|
|
+ else
|