فهرست منبع

bug:各个问题类别的扣分情况 nan

温红权 8 سال پیش
والد
کامیت
31fd61ba67

+ 3 - 3
VisualInspection/js/statistics/personal_data_statistics.js

@@ -98,15 +98,15 @@ $(function() {
                 if (p_c.fee_station_ranking != undefined && p_l.fee_station_ranking != undefined) {
                     var dept_r = p_c.fee_station_ranking - p_l.fee_station_ranking;
                     if (dept_r != 0) {
-                        $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
+                        $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
                     }
                     var com_r = p_c.company_ranking - p_l.company_ranking;
                     if (com_r != 0) {
-                        $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
+                        $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
                     }
                     var road_r = p_c.center_ranking - p_l.center_ranking;
                     if (road_r != 0) {
-                        $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
+                        $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
                     }
                 }
             }

+ 31 - 5
VisualInspection/js/statistics/road_manage_statistics.js

@@ -1195,8 +1195,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
 
-                                    return '上月\n' + t_map_p.get(name);
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1238,8 +1240,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
 
-                                    return '上月\n' + t_map_p.get(name);
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1284,8 +1288,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
 
-                                    return '本月\n' + t_map_c.get(name);
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1320,6 +1326,19 @@ $(function() {
                                 show: true,
                                 position: 'top',
                                 formatter: '本月',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
+
+                                },
                                 textStyle: {
                                     color: 'red'
                                 }
@@ -1331,7 +1350,13 @@ $(function() {
             }
         }
 
-
+        var maxvaluedata = 0;
+        t_map_c.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+        t_map_p.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
 
 
         var namelist = new Array();
@@ -1396,7 +1421,8 @@ $(function() {
                 data: namelist
             }],
             yAxis: [{
-                type: 'value'
+                type: 'value',
+                max: (maxvaluedata + 200)
             }],
             series: sdata
         };

+ 24 - 6
VisualInspection/js/statistics/total_company_statistics.js

@@ -1007,6 +1007,7 @@ $(function() {
         var t_map_p = new HashMap();
         var t_map_c = new HashMap();
 
+
         var sdata = new Array();
 
         for (var j = 0; j < array_all_deptname.length; j++) {
@@ -1048,7 +1049,9 @@ $(function() {
                                         name = '工作纪律及行为举止';
                                     }
 
-                                    return '上月\n' + t_map_p.get(name);
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1090,8 +1093,9 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
-
-                                    return '上月\n' + t_map_p.get(name);
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1137,7 +1141,9 @@ $(function() {
                                         name = '工作纪律及行为举止';
                                     }
 
-                                    return '本月\n' + t_map_c.get(name);
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1178,8 +1184,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
 
-                                    return '本月\n' + t_map_c.get(name);
+                                    return '本月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1192,6 +1200,15 @@ $(function() {
             }
         }
 
+        var maxvaluedata = 0;
+        t_map_c.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+        t_map_p.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+
+
 
         var namelist = new Array();
         for (var i = 0; i < array_all_name.length; i++) {
@@ -1255,7 +1272,8 @@ $(function() {
                 data: namelist
             }],
             yAxis: [{
-                type: 'value'
+                type: 'value',
+                max: (maxvaluedata + 200)
             }],
             series: sdata
         };

+ 1 - 1
VisualInspection/view/common/head.html

@@ -14,7 +14,7 @@
         <ul class="nav navbar-nav navbar-right">
             <li>
 
-                <div class="btn-group dropdown dropdown-hover">
+                <div class="btn-group dropdown ">
 
                     <p id="user" class="header_font" data-toggle="dropdown" style="padding-right:20px;cursor:pointer;"></p>