浏览代码

数据质量相关bug

haojianlong 4 年之前
父节点
当前提交
7ca26e374a
共有 1 个文件被更改,包括 62 次插入61 次删除
  1. 62 61
      src/views/ledger/report/index.vue

+ 62 - 61
src/views/ledger/report/index.vue

@@ -139,7 +139,8 @@ import {
   queryTenantCompletion,
   queryZoneCount,
   ShaftRelationBusinessSpace,
-  systemInfoPoint
+  systemInfoPoint,
+  gatherInfoPoint
 } from "@/api/scan/request";
 import { getDataDictionary } from "@/api/dict";
 import dataOrigin from "@/components/ledger/report/dataorigin";
@@ -259,7 +260,7 @@ export default {
     this.getFunctionType();
     this.getStatisticsCount();
     this.getEquipCount();
-    // this.gatherInfoPoints();
+    this.gatherInfoPoints();
     this.systemInfoPoints();
     this.infoPoints();
     this.getAssetsCount();
@@ -358,40 +359,40 @@ export default {
       })
     },
     // 统计设备信息点与需采集数据占比
-    // gatherInfoPoints() {
-    //   gatherInfoPoint(this.params, res => {
-    //     let arr = JSON.parse(JSON.stringify(res.Content))
-    //     arr.forEach(i => {
-    //       this.$set(this.deviceMessageData, 0, {
-    //         title: '统计设备信息点与需采集数据占比',
-    //         tips: '统计设备信息点与需采集数据占比',
-    //         contentValueO: '总数:',
-    //         contentValueT: '标准静态:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherStaticInfoPointCounts,
-    //         text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.static
-    //       })
-    //       this.$set(this.deviceMessageData, 1, {
-    //         contentValueO: '总数:',
-    //         contentValueT: '标准动态:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherDynamicInfoPointCounts,
-    //         text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.dynamic
-    //       })
-    //
-    //       this.$set(this.deviceMessageData, 2, {
-    //         contentValueO: '总数:',
-    //         contentValueT: '自定义:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherCustomInfoPointCounts,
-    //         text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.custom
-    //       })
-    //     })
-    //   })
-    // },
+    gatherInfoPoints() {
+      gatherInfoPoint(this.params, res => {
+        let arr = JSON.parse(JSON.stringify(res.content))
+        arr.forEach(i => {
+          this.$set(this.deviceMessageData, 0, {
+            title: '统计设备信息点与需采集数据占比',
+            tips: '统计设备信息点与需采集数据占比',
+            contentValueO: '总数:',
+            contentValueT: '标准静态:',
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherStaticInfoPointCounts,
+            text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
+            val: this.static
+          })
+          this.$set(this.deviceMessageData, 1, {
+            contentValueO: '总数:',
+            contentValueT: '标准动态:',
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherDynamicInfoPointCounts,
+            text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
+            val: this.dynamic
+          })
+    
+          // this.$set(this.deviceMessageData, 2, {
+          //   contentValueO: '总数:',
+          //   contentValueT: '自定义:',
+          //   needCountO: i.gatherInfoPointCounts,
+          //   needCountT: i.gatherCustomInfoPointCounts,
+          //   text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
+          //   val: this.custom
+          // })
+        })
+      })
+    },
 
     // 统计系统信息点与需采集数据占比
     systemInfoPoints() {
@@ -416,14 +417,14 @@ export default {
             text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
             val: this.dynamic
           })
-          this.$set(this.sysMessageData, 2, {
-            contentValueO: '总数:',
-            contentValueT: '自定义:',
-            needCountO: i.gatherInfoPointCounts,
-            needCountT: i.gatherCustomInfoPointCounts,
-            text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
-            val: this.custom
-          })
+          // this.$set(this.sysMessageData, 2, {
+          //   contentValueO: '总数:',
+          //   contentValueT: '自定义:',
+          //   needCountO: i.gatherInfoPointCounts,
+          //   needCountT: i.gatherCustomInfoPointCounts,
+          //   text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
+          //   val: this.custom
+          // })
         })
 
       })
@@ -452,20 +453,20 @@ export default {
             text: this.toPercent(i.dynamicInfoPoint / i.dynamicInfoPointCounts),
             val: this.dynamic
           })
-          let obj = i.customInfoPointCounts ? {} : ''
-          if (obj) {
-            obj = {
-              contentValueO: '总数:',
-              contentValueT: '自定义:',
-              needCountO: i.customInfoPointCounts,
-              needCountT: i.customInfoPoint,
-              text: this.toPercent(i.customInfoPoint / i.customInfoPointCounts),
-              val: this.custom
-            }
-          }
-          this.$set(this.deviceMessageTotal, 2, {
-            ...obj
-          })
+          // let obj = i.customInfoPointCounts ? {} : ''
+          // if (obj) {
+          //   obj = {
+          //     contentValueO: '总数:',
+          //     contentValueT: '自定义:',
+          //     needCountO: i.customInfoPointCounts,
+          //     needCountT: i.customInfoPoint,
+          //     text: this.toPercent(i.customInfoPoint / i.customInfoPointCounts),
+          //     val: this.custom
+          //   }
+          // }
+          // this.$set(this.deviceMessageTotal, 2, {
+          //   ...obj
+          // })
 
 
         })
@@ -721,7 +722,7 @@ export default {
       this.shaft = [];
       // 获取竖井总数
       queryCenoteCount(this.params, res => {
-        this.shaftCount = res.Count;
+        this.shaftCount = res.count;
       })
 
       let promise1 = new Promise((resolve) => {
@@ -770,7 +771,7 @@ export default {
   watch: {
     projectId(n, o) {
       this.params = {
-        ProjectId: this.projectId
+        projectId: this.projectId
       }
       this.getFunctionType();
       this.getStatisticsCount();
@@ -780,7 +781,7 @@ export default {
       this.getSystemCount();
       this.getTenantCount();
       this.getShaftFunType();
-      // this.gatherInfoPoints();
+      this.gatherInfoPoints();
       this.systemInfoPoints();
       this.infoPoints();
     }