瀏覽代碼

增加工时占比

seimin 2 年之前
父節點
當前提交
5a4da453e5
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 4 3
      assets/js/controllers/report/chargingCtrl.js
  2. 1 1
      assets/views/report/charging.html

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

@@ -171,11 +171,12 @@ app.controller("chartingCtrl", [
171
             if ((response.status = 200)) {
171
             if ((response.status = 200)) {
172
               $scope.isMaskground = false;
172
               $scope.isMaskground = false;
173
               $scope.charginrow = response.data;
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
               angular.forEach($scope.charginrow, function(item) {
176
               angular.forEach($scope.charginrow, function(item) {
177
                   // sumChargin = sumChargin + item.complexity;
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
               if (response.list && response.list.length == 0) {
181
               if (response.list && response.list.length == 0) {
181
                 $scope.shows = true;
182
                 $scope.shows = true;

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

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