2 Commits d3a5ec0ff0 ... b8ea881ed6

Author SHA1 Message Date
  fujunwen b8ea881ed6 集团首页修改样式 4 years ago
  fujunwen c715e5a5f8 集团首页修改样式 4 years ago
1 changed files with 5 additions and 7 deletions
  1. 5 7
      src/views/statistics/index.vue

+ 5 - 7
src/views/statistics/index.vue

@@ -1088,12 +1088,10 @@ export default {
       queryEventStatus(params).then((res) => {
         if (res.result === "success") {
           let data = res.data;
+          console.log(data)
           data[0].forEach((item) => {
-            if (
-              typeof item.rptGlsmsStatistics.overdue_unfinished === "undefined"
-            ) {
-              item.rptGlsmsStatistics.overdue_unfinished = 0;
-            }
+            const val = item.rptGlsmsStatistics.overdue_unfinished
+            item.rptGlsmsStatistics.overdue_unfinished = val === "undefined" ? 0 : val
           });
           let orginalObj = {
             1: { title: "维保", data: [], expand: 0, showToolTip: false },
@@ -1103,7 +1101,7 @@ export default {
           let arr = new Array(3);
           for (let key in data) {
             let obj = {};
-            let sortData = data[key];
+            let sortData = data[key].filter(item => item.cname);
             if (data.hasOwnProperty(key)) {
               // 维保,第三方检测排名按照即将逾期任务数量从多到少排序,多的靠前。专维按照 逾期未完成 + 即将逾期任务数据排序,多的靠前
               // due_num 即将逾期    unfinished 逾期未完成
@@ -1120,7 +1118,7 @@ export default {
               }
               orginalObj[key].data = sortBy(sortData, (option) => {
                 return option.sort;
-              }).reverse();
+              });
             }
           }
           arr[0] = orginalObj[1];