Bladeren bron

模块分布图

wangziqian 5 jaren geleden
bovenliggende
commit
38c3dd283b

+ 1 - 1
src/components/chart/antvChart.vue

@@ -69,7 +69,7 @@ export default {
           if (node) {
             return {
               name: node.data.name,
-              value: node.data.value,
+              value: node.value,
               depth: node.depth,
               x: node.x,
               y: node.y

+ 1 - 1
src/views/quality/components/cycleStatistic.vue

@@ -5,7 +5,7 @@
         <div v-for="(item, index) in chartData" :key="'time'+index" class="repair-item" :class="[Number(item.relativeRatio)<0?'repair-slow':'repair-rise']">
           <div class="repair-item-point" :class="['point'+index]" />
           <span>{{ item.label }}</span>
-          <div class="repair-time">{{ item.countStr }}</div>
+          <div class="repair-time">{{ item.countStr }}</div>
           <div v-show="Number(item.chainRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.chainRatio }}%</span></div>
           <div v-show="Number(item.chainRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.chainRatio.substring(1,item.chainRatio.length) }}%</span></div>
           <div v-show="item.chainRatio === '--'" class="repair-up">环比:<span>{{ item.chainRatio }}%</span></div>

+ 1 - 3
src/views/quality/requireStatistics.vue

@@ -401,10 +401,8 @@ export default {
       if (res.code === 200) this.orntDistributeData = this.handlerData(res.data)
     },
     handlerData(arr) { // 处理需求方向分布图数据
-      let num = 0
       const bfs = (arr) => {
         for (const item of arr) {
-          num = num + item.value
           if (item.children && item.children.length > 0) {
             bfs(item.children)
           } else {
@@ -413,7 +411,7 @@ export default {
         }
       }
       bfs(arr)
-      return { children: arr, name: '总量', value: num }
+      return { children: arr, name: '需求方向分布' }
     },
     async getReqUnlockData() { // 排期发生变更的需求
       const params = {

+ 2 - 3
src/views/quality/taskStatistics.vue

@@ -392,11 +392,10 @@ export default {
       if (res.code === 200) this.moduleDistributeData = this.handlerData(res.data)
     },
     handlerData(arr) { // 处理任务模块分布图数据
-      let num = 0
       const bfs = (arr) => {
         for (const item of arr) {
-          num = num + item.value
           if (item.children && item.children.length > 0) {
+            delete item.value
             bfs(item.children)
           } else {
             delete item.children
@@ -404,7 +403,7 @@ export default {
         }
       }
       bfs(arr)
-      return { children: arr, name: '总量', value: num }
+      return { children: arr, name: '模块分布' }
     },
     async getTaskUnlockData() { // 排期发生变更的任务
       const params = {