Просмотр исходного кода

数据大盘: 线上问题指标调整。

洪海涛 4 лет назад
Родитель
Сommit
af0d3efb58

+ 11 - 0
src/api/dataMarket.js

@@ -117,6 +117,17 @@ export function getEfficiencyDataRequest(data) {
   })
 }
 
+/* S 质量:半浮层数据接口 */
+// 线上问题-改进项半浮层
+export function dataMarketQualityGetImproveList(data) {
+  return request({
+    url: TeamManagement + '/dataMarket/quality/getImproveList',
+    method: 'post',
+    data
+  })
+}
+/* E 质量:半浮层数据接口 */
+
 /* S 效率:半浮层数据接口 */
 // 需求平均交付周期:/dataMarket/efficiency/getRequireAvgData
 export function getRequireAvgData(data) {

+ 6 - 3
src/views/dataBigManage/components/dataItem/index.vue

@@ -24,9 +24,11 @@
         </div>
       </div>
     </div>
-    <div v-if="item.subCountList" class="subCountList">
-      <div v-for="(subItem, subItemIndex) in item.subCountList" :key="subItemIndex" class="subCountItem" @click.stop="$emit('subCountListClick', subItem)">
-        <div>{{ subItem.label }}:&nbsp;{{ subItem.countStr }}</div>
+    <div v-if="item.subListCountList" class="subCountList">
+      <div v-for="(subItem, subItemIndex) in item.subListCountList" :key="subItemIndex" class="subCountItem" @click.stop="$emit('subCountListClick', {subItemList: subItem, index: subItemIndex + 1, subIndex: 0})">
+          <span v-for="(subItemItem, subItemIndexIndex) in subItem" :key="subItemIndex + subItemIndexIndex">
+            <span>{{ subItemItem.label }}</span><span>{{ subItemItem.beforeLabel }}</span>&nbsp;&nbsp;<span class="isHove title" @click.stop="$emit('subCountListClick', {subItemList: subItem, index: subItemIndex + 1, subIndex: subItemIndexIndex})">{{ subItemItem.countStr }}{{ subItemItem.unit }}</span>&nbsp;&nbsp;<span>{{ subItemItem.afterLabel }}</span>
+          </span>
       </div>
     </div>
   </div>
@@ -94,6 +96,7 @@ export default {
     margin-top: 10px;
     .subCountItem {
       margin-bottom: 1px;
+      cursor: pointer;
       &:last-child{
         margin-bottom: 0;
       }

+ 42 - 8
src/views/dataBigManage/components/drawerModal/drawerModalData.js

@@ -24,6 +24,33 @@ export const columns = {
       align: 'center'
     }
   ],
+  // 改进项完成率
+  improvementsOverRateColumns: [
+    {
+      label: '改进项',
+      key: 'title',
+      minWidth: 150
+    },
+    {
+      label: '级别',
+      key: 'priority',
+      minWidth: 70
+    },
+    {
+      label: '关联线上问题',
+      key: 'caseName',
+      minWidth: 250,
+      type: 'slot',
+      slotName: 'improvementsOverRateColumnsPrioritySlot'
+    },
+    {
+      label: '状态',
+      key: 'status',
+      minWidth: 200,
+      type: 'slot',
+      slotName: 'improvementsOverRateColumnsStatusSlot'
+    }
+  ],
   // 新增问题
   newQuestionColumns: [
     {
@@ -254,7 +281,7 @@ export const columns = {
         label: '研发周期',
         key: 'title3',
         minWidth: 100,
-        tips: '计算范围内需求, 需求排期里开发、联调、提测、上线类型排期的总周期',
+        tips: '计算范围内需求, 方案设计、需求排期里开发、自测、联调、提测、上线类型排期的总周期',
         align: 'left'
       },
       {
@@ -290,7 +317,7 @@ export const columns = {
         label: '研发周期',
         key: 'title',
         minWidth: 100,
-        tips: '计算范围内需求, 需求排期里开发、联调、提测、上线类型排期的总周期',
+        tips: '计算范围内需求, 方案设计、需求排期里开发、自测、联调、提测、上线类型排期的总周期',
         align: 'left'
       },
       {
@@ -330,7 +357,7 @@ export const columns = {
         label: '研发周期',
         key: 'title2',
         minWidth: 100,
-        tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
+        tips: '计算范围内任务,方案设计、任务开发、自测、联调、提测、上线排期的总周期',
         align: 'center'
       },
       {
@@ -359,7 +386,7 @@ export const columns = {
         label: '研发周期',
         key: 'title',
         minWidth: 100,
-        tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
+        tips: '计算范围内任务,方案设计、任务开发、自测、联调、提测、上线排期的总周期',
         align: 'center'
       },
       {
@@ -399,7 +426,7 @@ export const columns = {
         label: '开发人力',
         key: 'title2',
         minWidth: 100,
-        tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
+        tips: ' 计算范围内需求,方案设计、需求开发、自测、联调、提测、上线排期人日总量',
         align: 'center'
       },
       {
@@ -435,7 +462,7 @@ export const columns = {
         label: '开发人力',
         key: 'title',
         minWidth: 100,
-        tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
+        tips: ' 计算范围内需求,方案设计、需求开发、自测、联调、提测、上线排期人日总量',
         align: 'center'
       },
       {
@@ -482,7 +509,7 @@ export const columns = {
         label: '开发人力',
         key: 'title2',
         minWidth: 100,
-        tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
+        tips: '计算范围内任务,方案设计、开发、自测、联调、提测、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
@@ -518,7 +545,7 @@ export const columns = {
         label: '开发人力',
         key: 'title',
         minWidth: 100,
-        tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
+        tips: '计算范围内任务,方案设计、开发、自测联调、提测、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
@@ -688,6 +715,13 @@ export const timelineList = {
   // 回滚次数
   returnCase: [
     '全部', '预发回滚', '全量回滚', '小流量回滚'
+  ],
+  // 改进项
+  ImprovementsOverRate: [
+    '全部', '已完成', '未完成'
+  ],
+  ImprovementsOverRateTwo: [
+    '全部', '逾期', '逾期-高优'
   ]
 }
 

+ 94 - 7
src/views/dataBigManage/components/drawerModal/index.vue

@@ -54,6 +54,18 @@
       <template #bugStatusNameSlot="{scope}">
         <div @click.stop="print(scope)">自定义</div>
       </template>
+      <!-- 改进项:级别 -->
+      <template #improvementsOverRateColumnsPrioritySlot="{scope}">
+        <div v-if="scope.row.caseName" @click.stop>
+          <a target="_blank" :href="scope.row.url.replace(/https:\/\//g,'http://')">{{ scope.row.caseName }}</a>
+        </div>
+      </template>
+      <!-- 改进项:状态 -->
+      <template #improvementsOverRateColumnsStatusSlot="{scope}">
+        <div v-if="scope.row.status" @click.stop>
+          {{ scope.row.status }} <el-tag v-if="scope.row.tag" size="mini" type="danger" effect="dark">{{ scope.row.tag }}</el-tag>
+        </div>
+      </template>
       <!-- 报告名称 -->
       <template #returnReasonSlot="{scope}">
         <div v-if="scope.row.reportName" @click.stop>
@@ -134,7 +146,8 @@ import {
   bugRepair2Data, // 缺陷平均修复时长
   getStarFlowerList, // 线上问题:半浮层 列表
   getProjectList, // 需求任务项目列表: 半浮层
-  getOdinJobList // 获取上线过程列表
+  getOdinJobList, // 获取上线过程列表
+  dataMarketQualityGetImproveList // 线上问题-改进项半浮层
 } from '@/api/dataMarket'
 
 export default {
@@ -259,6 +272,9 @@ export default {
         if (this.drawerData.label === '准出不通过率') {
           this.title = '准出记录'
         }
+        if (this.drawerData.label === '改进项完成率') {
+          this.title = '改进项'
+        }
         if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
           this.title = !this.drawerData.index ? '回滚次数' : this.drawerData[this.drawerData.itemKey].label
         }
@@ -301,7 +317,16 @@ export default {
     // 设置ids
     setIds() {
       if (this.headerTitle === '质量' && !this.drawerData.moduleName) {
-        this.ids = this.drawerData.IdList.map(e => e)
+        if (this.drawerData.label === '改进项完成率') {
+          if (this.drawerData.hasOwnProperty('subCountItem')) {
+            const { subItemList, subIndex } = this.drawerData.subCountItem
+            this.ids = subItemList[subIndex].idList.map(e => e)
+          } else {
+            this.ids = this.drawerData.idList.map(e => e)
+          }
+        } else {
+          this.ids = this.drawerData.IdList.map(e => e)
+        }
       }
       if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
         this.ids = this.drawerData.IdList.map(e => e)
@@ -339,6 +364,22 @@ export default {
             first = [...timelineList.returnCase]
             firstActive = this.drawerData.index
           }
+          if (this.title === '改进项') {
+            secondActive = 0
+            firstActive = 0
+            first = [...timelineList.ImprovementsOverRate]
+            second = [...timelineList.ImprovementsOverRateTwo]
+            firstActive = this.drawerData.index
+            if (this.drawerData.hasOwnProperty('subCountItem')) {
+              if (this.drawerData.subCountItem.index === 3) {
+                firstActive = 0
+                secondActive = this.drawerData.subCountItem.subIndex + 1
+              } else {
+                firstActive = this.drawerData.subCountItem.index
+                secondActive = this.drawerData.subCountItem.subIndex
+              }
+            }
+          }
         }
         if (this.headerTitle === '吞吐量') {
           secondActive = 0
@@ -453,6 +494,9 @@ export default {
         // this.ids = this.drawerData[this.drawerData.itemKey].idList.map(e => e)
         this.column = [...columns.test_freeOn_lineRateIdListColumns]
       }
+      if (this.title === '改进项') {
+        this.column = [...columns.improvementsOverRateColumns]
+      }
       if (this.title.search(/新增问题/) > -1) {
         this.column = [...columns.newQuestionColumns]
       }
@@ -520,6 +564,10 @@ export default {
             const items = ['countStr', 'preCountStr', 'fullCountStr', 'lowCountStr']
             this.ids = [...this.drawerData[items[value]].idList]
           }
+          if (this.title === '改进项') {
+            this.ids = this.drawerData.IdList.map(e => e)
+            this.priorityList = value ? [value - 1] : []
+          }
         }
         if (this.headerTitle === '吞吐量') {
           this.timelineData.firstActive = value || 0
@@ -541,8 +589,14 @@ export default {
         this.setTableList()
       }
       if (index === 2) {
-        this.timelineData.secondActive = value || 0
-        this.ids = this.sourceData[value || 0].IdList
+        if (this.title === '改进项') {
+          console.log(593, value)
+          this.timelineData.secondActive = value
+        } else {
+          this.timelineData.secondActive = value || 0
+          this.ids = this.sourceData[value || 0].IdList
+          // this.setTableList()
+        }
         this.setTableList()
       }
     },
@@ -564,6 +618,13 @@ export default {
             this.setStarFlowerList()
           }
         }
+        if (this.title.search(/改进项/) > -1) {
+          if (this.ids.length) {
+            this.loading = true
+            console.log(624)
+            this.dataMarketQualityGetImproveListFn()
+          }
+        }
         if (this.title.search(/提测报告|准出记录/) > -1) {
           if (this.ids.length) {
             this.loading = true
@@ -649,6 +710,32 @@ export default {
         }
       }
     },
+    // 线上问题-改进项半浮层
+    async dataMarketQualityGetImproveListFn() {
+      const paging = { ...this.paging }
+      const { firstActive, first, secondActive, second } = this.timelineData
+      const params = {
+        ...paging,
+        isOverDue: 1,
+        ids: this.drawerData.IdList
+      }
+      if (firstActive) {
+        params.status = timelineList.ImprovementsOverRate[firstActive]
+      }
+      console.log(722, secondActive)
+      if (secondActive === 2) {
+        params.priority = '高优'
+      }
+
+      delete params.pageTotal
+      const res = await dataMarketQualityGetImproveList(params)
+      if (res.code === 200) {
+        this.tableList = res.data.result
+        paging.pageTotal = res.data.total
+        this.paging = { ...paging }
+        this.loading = false
+      }
+    },
     // 获取需求
     async getRequirementList() {
       const paging = this.paging
@@ -963,7 +1050,7 @@ export default {
         this.tableHeight = 'calc(100vh - 136px)'
       }
       if (this.headerTitle === '质量' && this.title.search(/新增缺陷|reopen/) < 0 && !this.drawerData.moduleName) {
-        this.tableHeight = 'calc(100vh - 136px)'
+        this.tableHeight = this.title === '改进项' ? 'calc(100vh - 328px)' : 'calc(100vh - 136px)'
       }
       if (this.headerTitle === '吞吐量') {
         this.tableHeight = 'calc(100vh - 288px)'
@@ -1038,7 +1125,7 @@ export default {
     isTimeLine(index = 1) {
       // 是第一条
       if (index === 1) {
-        if (this.headerTitle.search(/质量/) > -1 && this.title.search(/新增缺陷|reopen/) > -1) {
+        if (this.headerTitle.search(/质量/) > -1 && this.title.search(/新增缺陷|reopen|改进项/) > -1) {
           return true
         }
         if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
@@ -1055,7 +1142,7 @@ export default {
       }
       // 是第二条
       if (index === 2) {
-        return this.title.search(/缺陷24小时修复率/) > -1
+        return this.title.search(/缺陷24小时修复率|改进项/) > -1
       }
     }
   }

+ 6 - 3
src/views/dataBigManage/components/qualityModule/index.vue

@@ -29,7 +29,7 @@
             :span="13"
             class="mb10"
           >
-            <div @click.stop="onDetial('线上问题', mainData.onlineProblemList[2])">
+            <div>
               <dataItem
                 :item="mainData.onlineProblemList[2]"
                 @subCountListClick="(subCountItem) => onDetial('线上问题', {
@@ -263,8 +263,10 @@ export default {
   },
   methods: {
     onDetial(name, item) {
+      console.log(266, name, item)
       if (
         (name === '线上问题' && item.label === '新增问题') ||
+        (name === '线上问题' && item.label === '改进项完成率') ||
         name === '线下质量' ||
         (name === '上线过程' && item.label !== '免测上线率')
       ) {
@@ -352,8 +354,9 @@ export default {
           'titleUnit': '%',
           'subTitleUnit': 'rate',
           'subTitle': ImprovementsOverRate.chainRatio,
-          'IdList': ImprovementsOverRate.IdList,
-          'subCountList': ImprovementsOverRate.subCountList
+          'IdList': ImprovementsOverRate.idList,
+          'subCountList': ImprovementsOverRate.subCountList,
+          'subListCountList': ImprovementsOverRate.subListCountList
         }
       ]
     },