lrf402788946 4 년 전
부모
커밋
18fd05bd0a
1개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. 11 3
      app/service/statistics.js

+ 11 - 3
app/service/statistics.js

@@ -83,7 +83,11 @@ class IndexService extends CrudService {
     const org = await this.orgModel.count({ status: '1' });
     const expert = await this.expertModel.count({ status: '1' });
     const mech = await this.mechanismModel.count({ status: '1' });
-    return { organization: org, expert, mechanism: mech };
+    const arr = [];
+    arr.push({ name: '企业用户', value: org });
+    arr.push({ name: '专家用户', value: expert });
+    arr.push({ name: '机构用户', value: mech });
+    return arr;
   }
   /**
    * 统计各种数据
@@ -93,9 +97,13 @@ class IndexService extends CrudService {
     const policy = await this.policyModel.count({ status: '1' });
     // 创新券领取成果数量 4
     const ticket = await this.ticketModel.count({ status: '4' });
-    // 科技成果成功的数量 8
+    // 科技成果成功的数量 6
     const product = await this.productModel.count({ status: '6' });
-    return { policy, ticket, product };
+    const arr = [];
+    arr.push({ name: '高企政策服务', value: policy });
+    arr.push({ name: '创新券服务', value: ticket });
+    arr.push({ name: '科技成果评价服务', value: product });
+    return arr;
   }
 
   /**