qinzhipeng_v@didiglobal.com 4 жил өмнө
parent
commit
8f14e72bc4

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

@@ -66,11 +66,11 @@ export default {
       })
       this.chart.data(
         dv.getAllNodes().map((node) => {
-          console.log(node, 'cdiub')
+          console.log(node, '图表数据')
           if (node) {
             return {
               name: node.data.name,
-              value: node.data.name === '需求方向分布' ? node.value : node.data.value,
+              value: node.data.name === '需求方向分布' || node.data.name === '模块分布' ? node.value : node.data.value,
               depth: node.depth,
               x: node.x,
               y: node.y

+ 15 - 2
src/views/quality/components/drawerAll.vue

@@ -31,7 +31,9 @@
       />
     </div>
     <div class="qz-footer-laout">
-      <el-button type="primary" size="mini">导 出</el-button>
+      <div style="line-height: 60px;">
+        <el-button type="primary" size="mini">导 出</el-button>
+      </div>
       <el-pagination
         :current-page.sync="currentPage"
         :page-size="10"
@@ -226,6 +228,8 @@ export default {
         return
       }
       const data = { ids: taskIdList, ...this.paging }
+      if (this.Statistics.title === '周期统计数据') { data.statisticsType = 1 }
+      if (this.Statistics.title === '人力统计数据') { data.statisticsType = 2 }
       if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据') {
         const res = await getRequirement(data)
         if (res.code === 200) {
@@ -264,9 +268,18 @@ export default {
       this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
     },
     mapChildren(item) {
+      if (this.Statistics.name === '需求方向分布' || this.Statistics.name === '模块分布') {
+        this.dataList = []
+        item.children.map(i => {
+          this.dataList = this.dataList.concat(i.idList)
+        })
+        this.getTableData(this.dataList)
+        return
+      }
       item.children.map(i => {
         if (i.name === this.Statistics.name) {
-          this.getTableData(i.idList)
+          this.dataList = i.idList
+          this.getTableData(this.dataList)
         } else {
           if (i.children) {
             this.mapChildren(i)

+ 23 - 10
src/views/quality/components/tables/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="margin: 0 30px;">
-    <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '需求方向分布图数据' || title === '任务分布图数据' || title === '状态累积流量图数据' || title === '周期统计数据' || title === '人力统计数据' || title === '新增趋势图数据' || title === '上线趋势图数据' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '所属需求方向分布图数据' || title === `模块分布图数据`" :data="data" style="width: 100%;" :height="title === '状态停留分布图数据' || title === '状态累积流量图数据' || title === `模块分布图数据` ? 'calc(100vh - 363px)': 'calc(100vh - 318px)'" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
+    <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '需求方向分布图数据' || title === '任务分布图数据' || title === '状态累积流量图数据' || title === '周期统计数据' || title === '人力统计数据' || title === '新增趋势图数据' || title === '上线趋势图数据' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '所属需求方向分布图数据' || title === `模块分布图数据`" :data="data" style="width: 100%;" :height="setTitleHeight()" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
       <el-table-column label="优先级" min-width="80" align="left">
         <template slot-scope="scope" style="text-align: center;">
           <span class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</span>
@@ -34,13 +34,12 @@
             </div>
           </el-tooltip>
         </template>
-        <template slot-scope="scope">{{ scope.row.pm }}</template>
+        <template slot-scope="scope">{{ getCountDataList(scope.row) }}</template>
       </el-table-column>
       <el-table-column v-if="title === '人力统计数据' && mintitle !== ''" :label="mintitle" min-width="150" align="center">
         <template slot-scope="scope">
-          {{ scope.row.pm }}
+          {{ getCountDataList(scope.row) }}
         </template>
-        <template slot-scope="scope">{{ scope.row.pm }}</template>
       </el-table-column>
       <el-table-column v-if="type === '开发负责人'" label="开发负责人" min-width="100" align="center">
         <template slot-scope="scope">{{ scope.row.rdObject !== null? scope.row.rdObject.name: '' }}</template>
@@ -182,15 +181,29 @@ export default {
   data() {
     return {
       priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD']
-      // taskTips: [
-      //   '研发交付周期定义:任务排期里开发、联调、上线类型排期的总周期。计算条件:仅计算任务状态已变更为“已排期”且任务排期不为空的任务。',
-      //   '研发周期定义:任务排期里开发、联调类型排期的总周期。计算条件:仅计算状态已变更为“已排期”且排期不为空的任务。',
-      //   '测试周期定义:任务排期里测试类型排期的总周期。计算条件:仅计算状态已变更为“已排期”且排期不为空的任务。',
-      //   '提测等待测试时长定义:任务排期里提测排期结束日期距离测试排期开始日期的天数。计算条件:仅计算任务状态已变更为“已排期”且排期不为空,且提测、测试类型排期不为空的任务。'
-      // ]
     }
   },
   methods: {
+    getCountDataList(list) {
+      let str = ''
+      if (list.countDataList) {
+        list.countDataList.map(item => {
+          if ('平均' + this.mintitle === item.label) {
+            str = item.countStr
+          }
+        })
+      }
+      return str + '天'
+    },
+    setTitleHeight() {
+      if (this.title === '状态停留分布图数据' || this.title === '状态累积流量图数据') {
+        return 'calc(100vh - 363px)'
+      } else if (this.title === '需求方向分布图数据' || this.title === `模块分布图数据`) {
+        return 'calc(100vh - 200px)'
+      } else {
+        return 'calc(100vh - 318px)'
+      }
+    },
     jumper(val, name) { // 需求、任务、缺陷跳转
       const { bizId = null } = this.$store.state.global || {}
       const bizId_id = EncryptId(`${bizId}_${val.id}`)

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

@@ -567,6 +567,7 @@ export default {
     getPeopleList(value, data) {
       console.log(value, data, '点击')
       value.title = '人力统计数据'
+      value.toType = '需求'
       value.xaxis = this.mapData(data)
       value.yaxis = data
       this.requireList = value