Procházet zdrojové kódy

完善统计数据转取

qinzhipeng_v@didiglobal.com před 4 roky
rodič
revize
d9fc813577

+ 5 - 2
src/views/quality/components/belongRequirementChart.vue

@@ -11,8 +11,8 @@
         </el-col>
       </el-row>
     </div>
-    <div class="chart-contain">
-      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" />
+    <div class="chart-contain" @click.stop>
+      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" @onClick="getEchartsOption" @clone="$emit('clone')" />
     </div>
   </section>
 </template>
@@ -60,6 +60,9 @@ export default {
     this.changeBarOrPie(this.barOrPie)
   },
   methods: {
+    getEchartsOption(val) {
+      this.$emit('code', val, this.chartData)
+    },
     statusChange(e) {
       this.$emit('change')
     },

+ 50 - 31
src/views/quality/components/drawerAll.vue

@@ -3,7 +3,7 @@
     <div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
     <div v-if="Statistics.title === '分布图数据'" class="qz-drawer-grade-tow">按缺陷等级分布</div>
     <div>
-      <div v-if="Statistics.title !== '模块分布数据' && Statistics.title !== '需求方向分布图数据'" :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
+      <div v-if="Statistics.title !== '模块分布数据' && Statistics.title !== '需求方向分布图数据' && Statistics.title !== '责任人分布数据' && Statistics.title !== `模块分布图数据` " :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
         <div class="qz-drawer-scll">
           <timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
         </div>
@@ -16,9 +16,12 @@
       <div v-if="Statistics.title === '模块分布数据'" class="qz-drawer-H qz-margin-H"> 模块<span>{{ Statistics.name }}</span>的缺陷</div>
       <div v-if="Statistics.title === `${Statistics.qz_holiday}的修复时长区间数据`" class="qz-drawer-H qz-margin-H">{{ Statistics.qz_holiday }}修复时间区间为<span>{{ type }}</span>的<span>{{ typeTow }}</span>级缺陷</div>
       <div v-if="Statistics.title === `状态累积流量图数据`" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>流入到<span>{{ typeTow }}</span>的{{ Statistics.toType }}</div>
-      <div v-if="Statistics.title === `需求方向分布图数据`" class="qz-drawer-H qz-margin-H">需求方向为<span>{{ type }}</span>的需求</div>
+      <div v-if="Statistics.title === `需求方向分布图数据` || Statistics.title === '所属需求方向分布图数据'" class="qz-drawer-H qz-margin-H">需求方向为<span>{{ type }}</span>的{{ Statistics.toType }}</div>
+      <div v-if="Statistics.title === `责任人分布数据`" class="qz-drawer-H qz-margin-H">责任人<span>{{ type }}</span>的缺陷</div>
+      <div v-if="Statistics.title === `趋势图数据`" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>新增的缺陷</div>
+      <div v-if="Statistics.title === `模块分布图数据`" class="qz-drawer-H qz-margin-H">模块为<span>{{ type }}</span>的任务</div>
       <div v-if="Statistics.title === '新增趋势图数据' && Statistics.toType === '任务' || Statistics.title === '上线趋势图数据' && Statistics.toType === '任务'" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>{{ Statistics.title.substring(0, Statistics.title.length - 5 ) }}的任务</div>
-      <div v-if="Statistics.toType === '需求' && Statistics.title === '新增趋势图数据' || Statistics.title === '上线趋势图数据' || Statistics.title === 'PRD评审趋势图数据' || Statistics.title === '技术准入趋势图数据'" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>{{ Statistics.title.substring(0, Statistics.title.length - 5 ) }}的需求</div>
+      <div v-if="Statistics.toType === '需求' && Statistics.title === '新增趋势图数据' || Statistics.title === '上线趋势图数据' && Statistics.toType === '需求' || Statistics.title === 'PRD评审趋势图数据' || Statistics.title === '技术准入趋势图数据'" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>{{ Statistics.title.substring(0, Statistics.title.length - 5 ) }}的需求</div>
       <qzTable
         :data="tableData"
         :title="Statistics.title"
@@ -27,15 +30,19 @@
         :mintitle="Statistics.title === '周期统计数据' || Statistics.title === '人力统计数据' ? min_title : ''"
       />
     </div>
-    <el-pagination
-      style="text-align: right; margin-right: 30px;"
-      :current-page.sync="currentPage"
-      :page-size="10"
-      layout="total, prev, pager, next, jumper"
-      :total="total"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-    />
+    <div class="qz-footer-laout">
+      <el-button type="primary" size="mini">导 出</el-button>
+      <el-pagination
+        :current-page.sync="currentPage"
+        :page-size="10"
+        :pager-count="5"
+        layout="total, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+
   </el-drawer>
 </template>
 
@@ -109,11 +116,17 @@ export default {
   },
   methods: {
     setDrawerDate() {
-      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据') {
+      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
         this.defaultKey = this.Statistics.dataIndex
         this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
         this.getTableData(this.dataList)
-      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据') {
+      } else if (this.Statistics.title === '责任人分布数据') {
+        this.dataList = this.Statistics[this.Statistics.key].idList
+        this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '平均修复mmmmmm时长数据') {
+        this.dataList = this.Statistics[this.Statistics.key].idList
+        this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' || this.Statistics.title === '平均修复时长数据') {
         const key = this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' ? this.Statistics.xaxis.indexOf(this.Statistics.label.substr(2)) : this.Statistics.xaxis.indexOf(this.Statistics.label)
         this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' ? this.min_title = this.Statistics.label.substr(2) : ''
         this.defaultKey = key === -1 ? 0 : key
@@ -143,18 +156,8 @@ export default {
         key === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.subCountList[0].idList }) : '' // 准出
       } else if (this.Statistics.title === '模块分布数据') {
         this.getTableData(this.Statistics.newData.idList)
-      } else if (this.Statistics.title === '需求方向分布图数据') {
-        this.Statistics.children.map(item => {
-          if (item.name === this.Statistics.name) {
-            this.getTableData(item.idList)
-          } else {
-            if (item.children) {
-              item.children.map(i => {
-                i.name === this.Statistics.name ? this.getTableData(i.idList) : ''
-              })
-            }
-          }
-        })
+      } else if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === `模块分布图数据`) {
+        this.mapChildren(this.Statistics)
       } else if (this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
         this.bgMargin = true
         this.typeTow = this.Statistics.seriesName
@@ -185,9 +188,9 @@ export default {
       this.dataList = []
       this.currentPage = 1
       this.paging = { curIndex: 1, pageSize: 10 }
-      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '新增趋势图数据' || this.Statistics.title === '上线趋势图数据' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据') {
+      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '新增趋势图数据' || this.Statistics.title === '上线趋势图数据' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
         this.dataList = this.Statistics.yaxis[0].idList[this.oneVal.value]
-      } else if (this.Statistics.title === '缺陷统计数据') {
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '平均修复时长数据') {
         this.dataList = this.Statistics.yaxis[this.oneVal.value].idList
       } else if (this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据') {
         this.min_title = this.type
@@ -217,7 +220,7 @@ export default {
     },
     async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
       console.log(taskIdList, 'legnth')
-      if (taskIdList.length <= 0) {
+      if (!taskIdList || taskIdList.length <= 0) {
         this.tableData = []
         this.total = 0
         return
@@ -229,13 +232,13 @@ export default {
           this.tableData = res.data.list
           this.total = res.data.total
         }
-      } else if (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 === '任务') {
+      } else if (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 === '所属需求方向分布图数据' || this.Statistics.title === `模块分布图数据`) {
         const res = await taskList(data)
         if (res.code === 200) {
           this.tableData = res.data
           this.total = res.total
         }
-      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据') {
         const res = await bugList(data)
         if (res.code === 200) {
           this.tableData = res.data
@@ -260,6 +263,17 @@ export default {
       this.paging.curIndex = val
       this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
     },
+    mapChildren(item) {
+      item.children.map(i => {
+        if (i.name === this.Statistics.name) {
+          this.getTableData(i.idList)
+        } else {
+          if (i.children) {
+            this.mapChildren(i)
+          }
+        }
+      })
+    },
     handleClose(done) { // 关闭
       this.$emit('clone')
     }
@@ -347,4 +361,9 @@ export default {
 .qz-margin-H {
   margin: 20px 30px 10px;
 }
+.qz-footer-laout {
+  display: flex;
+  justify-content: space-between;
+  margin: 0 30px;
+}
 </style>

+ 6 - 6
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 === '技术准入趋势图数据'" :data="data" style="width: 100%;" :height="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="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-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>
@@ -12,7 +12,7 @@
           <div class="drawer-name" @click="jumper(scope.row, '需求')">{{ scope.row.name }}</div>
         </template>
       </el-table-column>
-      <el-table-column v-if="type === '任务' || type === '任务状态' || type === '任务等级' || type === '开发负责人' || type === '测试负责人' || title === '任务分布图数据' && type === '跟版客户端' || type === '直接归属' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '人力统计数据' && type === '任务'" label="任务名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
+      <el-table-column v-if="type === '任务' || type === '任务状态' || title === '所属需求方向分布图数据' || type === '任务等级' || type === '开发负责人' || type === '测试负责人' || title === '任务分布图数据' && type === '跟版客户端' || type === '直接归属' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === `模块分布图数据`" label="任务名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="drawer-id">{{ scope.row.taskIdSting }}</div>
           <div class="drawer-name" @click="jumper(scope.row, '任务')">{{ scope.row.name }}</div>
@@ -68,7 +68,7 @@
         </template>
       </el-table-column>
       <el-table-column v-if="type === '需求' || type === '需求状态' || type === '需求等级' || title === '状态累积流量图数据' && type === '需求' || title === '周期统计数据' && type === '需求' || title === '人力统计数据' && type === '需求' || title === '新增趋势图数据' && type === '需求' || title === '上线趋势图数据' && type === '需求' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '需求方向分布图数据'" label="状态" prop="statusName" min-width="100" align="center" />
-      <el-table-column v-if="type === '任务' || type === '任务状态' || type === '任务等级' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务'" label="状态" prop="statusString" min-width="100" align="center" />
+      <el-table-column v-if="type === '任务' || type === '任务状态' || type === '任务等级' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '所属需求方向分布图数据' || title === `模块分布图数据`" label="状态" prop="statusString" min-width="100" align="center" />
     </el-table>
 
     <el-table v-if="title === '去除节假日的修复时长区间数据' || title === '不去除节假日的修复时长区间数据'" :data="data" style="width: auto;" height="calc(100vh - 355px)" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
@@ -100,7 +100,7 @@
       </el-table-column>
     </el-table>
 
-    <el-table v-if="title === '分布图数据' || title === '去除节假日的修复时长数据' || title === '模块分布数据' || title === '缺陷统计数据'" :data="data" style="width: auto;" :height="title === '模块分布数据' ? 'calc(100vh - 175px)': '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 === '趋势图数据'" :data="data" style="width: auto;" :height="title === '模块分布数据' ? 'calc(100vh - 175px)': 'calc(100vh - 318px)'" :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]}">{{ scope.row.priorityName }}</span>
@@ -112,12 +112,12 @@
           <span class="drawer-name" @click.stop="jumper(scope.row, '缺陷')">{{ scope.row.bugName }}</span>
         </template>
       </el-table-column>
-      <el-table-column v-if="title === '模块分布数据' || title === '缺陷统计数据'" prop="devFixTime" label="缺陷修复时长" min-width="110" align="center">
+      <el-table-column v-if="title === '模块分布数据' || title === '缺陷统计数据' || title === '责任人分布数据' || title === '平均修复时长数据'" prop="devFixTime" label="缺陷修复时长" min-width="110" align="center">
         <template slot-scope="scope">
           {{ scope.row.devFixTime/(1000 * 3600) | numFilter }}
         </template>
       </el-table-column>
-      <el-table-column v-if="title === '模块分布数据' || title === '去除节假日的修复时长数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" :min-width="title === '模块分布数据' ? '110': '80'" align="center">
+      <el-table-column v-if="title === '模块分布数据' || title === '去除节假日的修复时长数据' || title === '责任人分布数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" :min-width="title === '模块分布数据' || title === '责任人分布数据' ? '110': '80'" align="center">
         <template slot-scope="scope">
           {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}
         </template>

+ 42 - 9
src/views/quality/defectStatistics.vue

@@ -106,8 +106,8 @@
           <h3>趋势图</h3>
           <el-row type="flex" align="middle">
             <el-col :span="24">
-              <div class="chart-contain">
-                <normal-echart v-if="echartsOption3" :chart-id="'chartThird'" :option="echartsOption3" />
+              <div class="chart-contain" @click.stop>
+                <normal-echart v-if="echartsOption3" :chart-id="'chartThird'" :option="echartsOption3" @onClick="getTrendChart" @clone="clone" />
               </div>
             </el-col>
           </el-row>
@@ -148,7 +148,9 @@
               <div v-for="(item, index) in repairTimeList" :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.total }}</div>
+                <div @click.stop>
+                  <div class="repair-time chart-cur" @click="cilckrepairTimeList(item, repairTimeList)">{{ item.total }}</div>
+                </div>
                 <div v-show="Number(item.relativeRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.relativeRatio }}%</span></div>
                 <div v-show="Number(item.relativeRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.relativeRatio.substring(1,item.relativeRatio.length) }}%</span></div>
                 <div v-show="item.relativeRatio === '--'" class="repair-up">环比:<span>{{ item.relativeRatio }}%</span></div>
@@ -262,42 +264,54 @@
             <el-table-column prop="name" label="姓名" />
             <el-table-column v-if="activeTab=== 1" prop="newData" label="新增" sortable="custom" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span class="table-repair-item1 repair-span">{{ scope.row.newData.total }}</span>
+                <span class="table-repair-item1 repair-span" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'newData')">{{ scope.row.newData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.newData.detail[0].label }}:{{ scope.row.newData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.newData.detail[1].label }}:{{ scope.row.newData.detail[1].total }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="newAndReopenData" label="待修复/Reopen" sortable="custom">
               <template slot-scope="scope">
-                <span class="table-repair-item2 repair-span2">{{ scope.row.newAndReopenData.total }}</span>
+                <span class="table-repair-item2 repair-span2" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'newAndReopenData')">{{ scope.row.newAndReopenData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.newAndReopenData.detail[0].label }}:{{ scope.row.newAndReopenData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.newAndReopenData.detail[1].label }}:{{ scope.row.newAndReopenData.detail[1].total }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="waitTestData" label="待测试" sortable="custom">
               <template slot-scope="scope">
-                <span class="table-repair-item2 repair-span2">{{ scope.row.waitTestData.total }}</span>
+                <span class="table-repair-item2 repair-span2" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'waitTestData')">{{ scope.row.waitTestData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.waitTestData.detail[0].label }}:{{ scope.row.waitTestData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.waitTestData.detail[1].label }}:{{ scope.row.waitTestData.detail[1].total }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="repairData" label="已完成" sortable="custom">
               <template slot-scope="scope">
-                <span class="table-repair-item2 repair-span2">{{ scope.row.repairData.total }}</span>
+                <span class="table-repair-item2 repair-span2" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'repairData')">{{ scope.row.repairData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.repairData.detail[0].label }}:{{ scope.row.repairData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.repairData.detail[1].label }}:{{ scope.row.repairData.detail[1].total }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="repairTimeAvgData" label="平均修复时长" min-width="120">
               <template slot-scope="scope">
-                <span class="table-repair-item3 repair-span">{{ scope.row.repairTimeAvgData.total }}</span>
+                <span class="table-repair-item3 repair-span" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'repairTimeAvgData')">{{ scope.row.repairTimeAvgData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.repairTimeAvgData.detail[0].label }}:{{ scope.row.repairTimeAvgData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.repairTimeAvgData.detail[1].label }}:{{ scope.row.repairTimeAvgData.detail[1].total }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="repairTimeAvgPurgeNhData" label="平均修复时长(去除节假日)" min-width="120">
               <template slot-scope="scope">
-                <span class="table-repair-item4 repair-span">{{ scope.row.repairTimeAvgPurgeNhData.total }}</span>
+                <span class="table-repair-item4 repair-span" @click.stop>
+                  <span style="cursor: pointer;" @click="getBugmembers(scope.row, 'repairTimeAvgPurgeNhData')">{{ scope.row.repairTimeAvgPurgeNhData.total }}</span>
+                </span>
                 <span class="repair-span">{{ scope.row.repairTimeAvgPurgeNhData.detail[0].label }}:{{ scope.row.repairTimeAvgPurgeNhData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.repairTimeAvgPurgeNhData.detail[1].label }}:{{ scope.row.repairTimeAvgPurgeNhData.detail[1].total }}</span>
               </template>
@@ -607,6 +621,25 @@ export default {
       this.openDrawer = true
       window.log({ c: 'statistic', d: 'bug_statistic_distribution_map' })
     },
+    getTrendChart(value) {
+      value.title = '趋势图数据'
+      this.requireList = { ...value, ...this.chart3Data }
+      this.openDrawer = true
+    },
+    getBugmembers(value, key) {
+      value.title = '责任人分布数据'
+      value.key = key
+      value.memberData = this.memberData
+      this.requireList = { ...value }
+      this.openDrawer = true
+    },
+    cilckrepairTimeList(value, data) {
+      value.title = '平均修复时长数据'
+      value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']
+      value.yaxis = { ...data }
+      this.requireList = { ...value, ...data }
+      this.openDrawer = true
+    },
     cilckRepairTimeListNoHoliday(value, data) {
       value.title = '去除节假日的修复时长数据'
       value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']

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

@@ -573,7 +573,10 @@ export default {
       this.openDrawer = true
     },
     statusOrntDistributeData(value, data) {
-      // console.log(value, data, '点击')
+      if (value.data === undefined) {
+        this.clone()
+        return
+      }
       value.title = '需求方向分布图数据'
       value.xaxis = ['全部']
       this.requireList = { ...value, ...data, name: value.data.data ? value.data.data.name : value.data._origin.name }

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

@@ -113,7 +113,7 @@
         </div>
         <div class="chart-item">
           <h3>所属需求方向分布图</h3>
-          <belong-requirement-chart :chart-data="belongRequirementData" />
+          <belong-requirement-chart :chart-data="belongRequirementData" @code="getRequirementData" @clone="openDrawer = false" />
         </div>
         <div class="chart-item">
           <h3>周期统计<span>(根据排期计算)</span></h3>
@@ -172,7 +172,7 @@
         </div>
         <div class="chart-item">
           <h3>模块分布图</h3>
-          <belong-chart :chart-data="moduleDistributeData" />
+          <belong-chart :chart-data="moduleDistributeData" @code="getModuleDistribute" @clone="openDrawer = false" />
         </div>
         <div class="chart-item">
           <h3>排期发生变更的任务(<span class="strong-font">{{ changeTotal }}</span>个)</h3>
@@ -576,6 +576,17 @@ export default {
       value.typeStr = '任务'
       this.requireList = value
     },
+    getModuleDistribute(value, data) {
+      console.log(value, data, '点击')
+      if (value.data === undefined) {
+        this.clone()
+        return
+      }
+      value.title = '模块分布图数据'
+      value.xaxis = ['全部']
+      this.requireList = { ...value, ...data, name: value.data.data ? value.data.data.name : value.data._origin.name }
+      this.openDrawer = true
+    },
     statusCumulativeData(value, option, data) {
       value.title = '状态累积流量图数据'
       value.toType = '任务'
@@ -584,6 +595,13 @@ export default {
       this.requireList = { ...value, xaxis: data[0].dayTime }
       this.openDrawer = true
     },
+    getRequirementData(value, data) {
+      console.log(value, data, '嗲集')
+      value.title = '所属需求方向分布图数据'
+      value.toType = '任务'
+      this.requireList = { ...value, ...data }
+      this.openDrawer = true
+    },
     getTrendChart(value, option, data) {
       const titArr = ['占位', '新增趋势图', '上线趋势图']
       value.title = titArr[Number(this.activeTab)] + '数据'