Selaa lähdekoodia

增加工时占比

seimin 2 vuotta sitten
vanhempi
commit
5a4da453e5

+ 4 - 3
assets/js/controllers/report/chargingCtrl.js

@@ -171,11 +171,12 @@ app.controller("chartingCtrl", [
171 171
             if ((response.status = 200)) {
172 172
               $scope.isMaskground = false;
173 173
               $scope.charginrow = response.data;
174
-              var totalComplexity = 0;
175
-              totalComplexity = $scope.charginrow.reduce((pre,cur)=>pre + cur.complexity,0)
174
+              // var totalComplexity = 0;
175
+              // totalComplexity = $scope.charginrow.reduce((pre,cur)=>pre + cur.complexity,0)
176 176
               angular.forEach($scope.charginrow, function(item) {
177 177
                   // sumChargin = sumChargin + item.complexity;
178
-                  item.complexityPercentage = (item.complexity / totalComplexity * 100).toFixed(2) + '%';
178
+                  // item.complexityPercentage = (item.complexity / totalComplexity * 100).toFixed(2) + '%';
179
+                  item.percent += '%';
179 180
               })
180 181
               if (response.list && response.list.length == 0) {
181 182
                 $scope.shows = true;

+ 1 - 1
assets/views/report/charging.html

@@ -126,7 +126,7 @@
126 126
                                             {{rowData.complexity}}
127 127
                                         </td>
128 128
                                         <td ng-class="fieldData.thclass" style="text-align: center">
129
-                                            {{rowData.complexityPercentage}}
129
+                                            {{rowData.percent}}
130 130
                                         </td>
131 131
                                         <td ng-class="fieldData.thclass" style="text-align: center">
132 132
                                             {{rowData.score||0}}