Parcourir la source

优化统计缺陷

qinzhipeng_v@didiglobal.com il y a 4 ans
Parent
commit
32139eb3eb

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

@@ -1,6 +1,7 @@
 <template>
   <el-drawer :title="Statistics.title" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
     <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 !== '模块分布数据'" :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
         <div class="qz-drawer-scll">
@@ -22,7 +23,12 @@
       <div v-if="Statistics.title === `${Statistics.qz_holiday}的修复时长区间数据`" class="qz-drawer-H" style="margin: 20px 30px 10px;">
         {{ Statistics.qz_holiday }}修复时间区间为<span class="fontSize">{{ type }}</span>的<span class="fontSize">{{ typeTow }}</span>级缺陷
       </div>
-      <qzTable :data="tableData" :title="Statistics.title" :type="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据' ? status : Statistics.toType" :oftype="type" />
+      <qzTable
+        :data="tableData"
+        :title="Statistics.title"
+        :type="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据' || Statistics.title === '分布图数据' ? status : Statistics.toType"
+        :oftype="type"
+      />
     </div>
     <el-pagination
       style="text-align: right; margin-right: 30px;"
@@ -207,7 +213,6 @@ export default {
       }
     },
     async getIdList(value) {
-      console.log(value, '报告点击')
       this.reportData = value
       const data = { ...value, ...this.paging }
       const res = await getReportList(data)
@@ -262,6 +267,13 @@ export default {
   top: 28px;
   left: 185px;
 }
+.qz-drawer-grade-tow {
+   color: #444;
+  font-size: 14px;
+  position: absolute;
+  top: 28px;
+  left: 150px;
+}
 .fontSize {
   color: #333333;
   font-weight: 500;

+ 2 - 1
src/views/quality/components/requireDrawer.vue

@@ -193,7 +193,8 @@ export default {
     font-size: 20px;
     font-weight: 500;
     margin-bottom: 0px;
-    padding: 20px 30px 0;
+    padding: 20px 30px;
+    border-bottom: 1px solid #E2E2E2;
 }
 .drawer-box {
   box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12);

+ 14 - 2
src/views/quality/components/tables/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div style="margin: 0 30px;">
+    {{ type }}
     <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '任务分布图数据'" :data="data" style="width: 100%;" :height="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;">
@@ -33,7 +34,6 @@
       <el-table-column v-if="type === '直接归属'" label="直接归属" min-width="110" align="center" show-overflow-tooltip>
         {{ oftype }}
       </el-table-column>
-      <!-- <el-table-column v-if="type === '需求'" prop="typeName" label="需求类型" min-width="110" align="center" /> -->
       <el-table-column v-if="type === 'pm'" label="PM" min-width="100" show-overflow-tooltip align="center">
         <template v-if="scope.row.pmMemberInfoResponse" slot-scope="scope">
           <span>{{ scope.row.pmMemberInfoResponse.name }}</span>
@@ -99,7 +99,19 @@
           {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
         </template>
       </el-table-column>
-      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center" />
+      <el-table-column v-if="type === '缺陷状态' || type === '优先级' " prop="bugStatusName" label="状态" min-width="100" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.bugStatusName }}
+        </template>
+      </el-table-column>
+      <el-table-column v-if="type === '缺陷等级'" prop="bugStatusName" label="缺陷等级" min-width="100" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.priorityName }}
+        </template>
+      </el-table-column>
+      <el-table-column v-if="type === '端类型' || type === '发现方式' || type === '发现阶段' || type === '缺陷类型'" :label="type" min-width="100" align="center">
+        {{ oftype }}
+      </el-table-column>
     </el-table>
 
     <el-table v-if="title === '报告统计数据'" :data="data" style="width: auto;" height="calc(100vh - 296px)" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">

+ 5 - 1
src/views/quality/defectStatistics.vue

@@ -123,6 +123,7 @@
                   :disabled="activeTab === 2&&item.code === 1"
                   :label="item.label"
                   :value="item.code"
+                  @click.native="getReqStatus(item.label)"
                 />
               </el-select>
             </el-col>
@@ -338,7 +339,7 @@ export default {
     return {
       drawer: false,
       requireList: {},
-      reqStatus: '',
+      reqStatus: '缺陷状态',
       openDrawer: false,
       echartsOption1: null,
       echartsOption2: null,
@@ -678,6 +679,9 @@ export default {
       type === 'off' ? this.chart2Data = this.offHoliday : this.chart2Data = this.onHoliday
       this.changeBarOrLine(this.barOrLine)
     },
+    getReqStatus(e) {
+      this.reqStatus = e
+    },
     changeBarOrLine(type) { // 柱状图折线图切换
       this.barOrLine = type
       if (!this.chart2Data.yaxis) return