seimin 1 year ago
parent
commit
f68876c855
1 changed files with 13 additions and 4 deletions
  1. 13 4
      src/app/views/compre-statistics/compre-statistics.component.ts

+ 13 - 4
src/app/views/compre-statistics/compre-statistics.component.ts

@@ -847,11 +847,20 @@ export class CompreStatisticsComponent implements OnInit {
847 847
       that.taskTypeInfo = data.data || [];
848 848
       that.taskTotal = data.total;
849 849
       if (data.total - 0) {
850
-        data.data.forEach((e) => {
851
-          e.value = e.count;
850
+        let numData = that.taskTypeInfo.map((e) => {
851
+          return {
852
+            ...e,
853
+            value: e.num
854
+          }
855
+        });
856
+        let countData = that.taskTypeInfo.forEach((e) => {
857
+          return {
858
+            ...e,
859
+            value: e.count
860
+          }
852 861
         });
853
-        this.taskTypeChart(data.data);
854
-        this.durationChart(data.data);
862
+        this.taskTypeChart(numData);
863
+        this.durationChart(countData);
855 864
       } else {
856 865
         this.taskTypeChart([]);
857 866
         this.durationChart([]);