qinzhipeng_v@didiglobal.com 4 jaren geleden
bovenliggende
commit
6afd806d84
2 gewijzigde bestanden met toevoegingen van 19 en 29 verwijderingen
  1. 5 0
      src/views/quality/components/drawerAll.vue
  2. 14 29
      src/views/quality/components/tables/index.vue

+ 5 - 0
src/views/quality/components/drawerAll.vue

@@ -180,6 +180,11 @@ export default {
       }
     },
     async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
+      if (taskIdList.length <= 0) {
+        this.tableData = []
+        this.total = 0
+        return
+      }
       const data = { ids: taskIdList, ...this.paging }
       if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求') {
         const res = await getRequirement(data)

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

@@ -31,17 +31,23 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="bugName" label="缺陷标题" min-width="200" align="left" show-overflow-tooltip>
+      <el-table-column prop="bugName" label="缺陷名称" min-width="200" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="drawer-id">{{ 'BUG-' + scope.row.id }}</div>
           <span class="drawer-name" @click.stop="jumper(scope.row, '缺陷')">{{ scope.row.bugName }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="devFixTimePurgeNH" label="缺陷修复时长" min-width="110" align="center">
+      <el-table-column v-if="title === '不去除节假日的修复时长区间数据'" prop="devFixTime" label="缺陷修复时长" min-width="80" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.devFixTime/(1000 * 3600) | numFilter }}H
+        </template>
+      </el-table-column>
+      <el-table-column v-if="title === '去除节假日的修复时长区间数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" min-width="80" align="center">
         <template slot-scope="scope">
           {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
         </template>
       </el-table-column>
+      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center" />
     </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' }">
@@ -52,23 +58,23 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="bugName" label="缺陷标题" min-width="200" align="left" show-overflow-tooltip>
+      <el-table-column prop="bugName" label="缺陷名称" min-width="200" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="drawer-id">{{ 'BUG-' + scope.row.id }}</div>
           <span class="drawer-name" @click.stop="jumper(scope.row, '缺陷')">{{ scope.row.bugName }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="fixTimePurgeNH" label="缺陷修复时长" min-width="110" align="center">
+      <el-table-column v-if="title === '模块分布数据' || title === '缺陷统计数据'" prop="devFixTime" label="缺陷修复时长" min-width="110" align="center">
         <template slot-scope="scope">
-          {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
+          {{ scope.row.devFixTime/(1000 * 3600) | numFilter }}H
         </template>
       </el-table-column>
-      <!-- <el-table-column prop="priorityName" label="缺陷等级" align="center" /> -->
-      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center">
+      <el-table-column v-if="title === '模块分布数据' || title === '去除节假日的修复时长数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" :min-width="title === '模块分布数据' ? '110': '80'" align="center">
         <template slot-scope="scope">
-          <statusChange :status-code="Number(scope.row.status)" :bug-data="scope.row" :status-obj="statusObj" />
+          {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
         </template>
       </el-table-column>
+      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center" />
     </el-table>
 
     <el-table v-if="title === '报告统计数据'" :data="data" style="width: auto;" height="calc(100vh - 318px)" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
@@ -92,12 +98,7 @@
 <script>
 import '@/styles/PublicStyle/index.scss'
 import { EncryptId } from '@/utils/crypto-js.js'
-import { bugGetEnum } from '@/api/defectManage'
-import statusChange from '@/views/projectManage/bugList/details/statusChange'
 export default {
-  components: {
-    statusChange
-  },
   filters: {
     numFilter(value) {
       let realVal = ''
@@ -116,26 +117,10 @@ export default {
   },
   data() {
     return {
-      statusObj: null, // 状态对象
       priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD']
     }
   },
-  created() {
-    this.bugGetEnum()
-  },
   methods: {
-    async bugGetEnum() { // 缺陷修改状态
-      const res = await bugGetEnum()
-      if (res.code === 200) {
-        this.statusObj = {
-          bugEnumList: res.data.bugEnumList, // status
-          repairResultEnumList: res.data.repairResultEnumList, // 修复结果
-          bugReasonEnumList: res.data.bugReasonEnumList, // 缺陷原因
-          theBugTypeEnumList: this.deleteChild(res.data.theBugTypeEnumList), // 缺陷类型
-          priorityEnumList: res.data.priorityEnumList // 缺陷等级
-        }
-      }
-    },
     deleteChild(arr) { // 删除无用子属性
       const bfs = arr => {
         arr.forEach(item => {