ソースを参照

Merge branch 'daily_0.4.2' into http_test

洪海涛 4 年 前
コミット
74a0f32b10

+ 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) {

+ 37 - 14
src/views/dataBigManage/components/dataItem/index.vue

@@ -1,28 +1,38 @@
 <template>
-  <div v-if="item" class="dataItem flex-center-start" :style="{ background: item.bgColor, padding: item.padding, alignItems: item.type === 'circle' && 'baseline' }">
-    <div v-if="item.type === 'circle'" class="circle" :style="{ background: item.color }" />
-    <addIcon v-else :inner-color="item.innerColor" :out-color="item.outColor" />
-    <div class="textWord ellipsis">
-      <div>
-        <span :style="{color: item.labelColor ? item.labelColor : '#666'}">{{ item.label }}</span>
-        <span class="title isHove">{{ item.title }}</span>
-        <span>{{ item.titleUnit }}</span>
-        <span v-if="item.remark" class="remark">({{ item.remark }})</span>
-      </div>
-      <!-- <div class="ellipsis" v-html="subTitle" /> -->
-      <div class="subTitleName">
+  <div class="dataItem" :style="{ background: item.bgColor, padding: item.padding, alignItems: item.type === 'circle' && 'baseline' }">
+    <div v-if="item" class=" flex-center-start">
+      <div v-if="item.type === 'circle'" class="circle" :style="{ background: item.color }" />
+      <addIcon v-else :inner-color="item.innerColor" :out-color="item.outColor" />
+      <div class="textWord ellipsis">
+        <div>
+          <span :style="{color: item.labelColor ? item.labelColor : '#666'}">{{ item.label }}</span>
+          <span class="title isHove" @click.stop="$emit('subCountListClick', { index: 1, subIndex: 0})">{{ item.title }}</span>
+          <span>{{ item.titleUnit }}</span>
+          <span v-if="item.remark" class="remark">({{ item.remark }})</span>
+        </div>
+        <!-- <div class="ellipsis" v-html="subTitle" /> -->
+        <div class="subTitleName">
         <span v-if="item.subTitleUnit === 'rate'">
           <span>环比:</span>
-          <span :class="Number(item.subTitle) > 0 ? 'item-up isHove' : 'item-down isHove'">
+          <span :class="Number(item.subTitle) > 0 ? 'item-up isHove' : 'item-down isHove'" @click.stop="$emit('subCountListClick', { index: 0, subIndex: 0})">
             <i v-if="Number(item.subTitle) > 0" class="el-icon-caret-top" />
             <i v-else class="el-icon-caret-bottom" />
             {{ item.subTitle }}%
           </span>
         </span>
-        <span v-else style="font-weight: 600" v-html="item.subTitle" />
+          <span v-else style="font-weight: 600" v-html="item.subTitle" />
+        </div>
+      </div>
+    </div>
+    <div v-if="item.subListCountList" class="subCountList">
+      <div v-for="(subItem, subItemIndex) in item.subListCountList" :key="subItemIndex" class="subCountItem" @click.stop="$emit('subCountListClick', { 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', { index: subItemIndex + 1, subIndex: subItemIndexIndex})">{{ subItemItem.countStr }}{{ subItemItem.unit }}</span>&nbsp;&nbsp;<span>{{ subItemItem.afterLabel }}</span>
+          </span>
       </div>
     </div>
   </div>
+
 </template>
 <script>
 import addIcon from '@/components/addIcon'
@@ -79,5 +89,18 @@ export default {
       }
     }
   }
+  .subCountList {
+    font-size: 12px;
+    color: #666;
+    font-weight: 500;
+    margin-top: 10px;
+    .subCountItem {
+      margin-bottom: 1px;
+      cursor: pointer;
+      &:last-child{
+        margin-bottom: 0;
+      }
+    }
+  }
 }
 </style>

+ 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: [
+    '全部', '逾期', '逾期-高优'
   ]
 }
 

+ 117 - 11
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">{{ 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 {
@@ -218,7 +231,7 @@ export default {
       console.log(slotProp)
     },
     init() {
-      console.log(this.drawerData, 210)
+      // console.log(this.drawerData, 210)
       this.headerTitle = this.drawerData.headerTitle
       this.title = this.headerTitle.search(/质量|效率/) > -1 ? this.drawerData.label || '' : this.drawerData.activeLabel
       console.log(this.headerTitle, this.title)
@@ -247,7 +260,7 @@ export default {
       const paging = _.cloneDeep(this.paging)
       paging.pageSize = Number.parseInt(pageSize)
       this.paging = _.cloneDeep(paging)
-      console.log(this.paging, 250)
+      // console.log(this.paging, 250)
     },
     // 设置标题
     setTitle() {
@@ -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,17 @@ 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)
+          // }
+          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 +365,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 +495,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 +565,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 +590,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 +619,11 @@ export default {
             this.setStarFlowerList()
           }
         }
+        if (this.title.search(/改进项/) > -1) {
+          this.loading = true
+          // console.log(624)
+          this.dataMarketQualityGetImproveListFn()
+        }
         if (this.title.search(/提测报告|准出记录/) > -1) {
           if (this.ids.length) {
             this.loading = true
@@ -649,6 +709,52 @@ export default {
         }
       }
     },
+    // 线上问题-改进项半浮层
+    async dataMarketQualityGetImproveListFn() {
+      const paging = { ...this.paging }
+      const { index, subIndex } = this.drawerData.subCountItem
+      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 = '高优'
+      }
+
+      if (!firstActive) {
+        delete params.status
+      } else {
+        delete params.isOverDue
+      }
+
+      if (!secondActive) {
+        delete params.isOverDue
+      } else {
+        params.isOverDue = 1
+      }
+
+      // if (index < 2 && subIndex < 1) {
+      //   delete params.isOverDue
+      // }
+      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
@@ -841,7 +947,7 @@ export default {
         paging.pageTotal = this.tableListOld.length
         paging.pageTotal = this.sourceData[0].IdList.length
         this.paging = { ...paging }
-        console.log(847, this.paging)
+        // console.log(847, this.paging)
         this.loading = false
       }
     },
@@ -963,7 +1069,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 - 300px)' : 'calc(100vh - 136px)'
       }
       if (this.headerTitle === '吞吐量') {
         this.tableHeight = 'calc(100vh - 288px)'
@@ -1038,7 +1144,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 === '上线过程') {
@@ -1047,7 +1153,7 @@ export default {
         if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
           return true
         }
-        console.log(1049, this.title, this.headerTitle)
+        // console.log(1049, this.title, this.headerTitle)
         if (this.headerTitle.search(/效率/) > -1 && this.title.search(/需求周期|任务周期|需求人力|任务人力/) > -1) {
           return false
         }
@@ -1055,7 +1161,7 @@ export default {
       }
       // 是第二条
       if (index === 2) {
-        return this.title.search(/缺陷24小时修复率/) > -1
+        return this.title.search(/缺陷24小时修复率|改进项/) > -1
       }
     }
   }

+ 43 - 20
src/views/dataBigManage/components/qualityModule/index.vue

@@ -8,17 +8,35 @@
       <div class="itemBox onlineProblem" style="height: 470px">
         <div class="titleLevel3 mb10">线上问题</div>
         <el-row :gutter="10">
+          <el-col :span="11">
+            <el-row
+              v-for="(item, index) in [...mainData.onlineProblemList || []].filter((item, itemIndex)=> itemIndex !== 2)"
+              :key="index"
+              :span="12"
+              class="mb10"
+            >
+              <div
+                :style="{ cursor: item.label === '新增问题' && 'pointer'}"
+                @click.stop="onDetial('线上问题', item)"
+              >
+                <dataItem :item="item" />
+              </div>
+            </el-row>
+          </el-col>
+          <!-- 20210712日常: http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=629812523 -->
           <el-col
-            v-for="(item, index) in mainData.onlineProblemList"
-            :key="index"
-            :span="12"
+            v-if="mainData.onlineProblemList && mainData.onlineProblemList[2]"
+            :span="13"
             class="mb10"
           >
-            <div
-              :style="{ cursor: item.label == '新增问题' && 'pointer'}"
-              @click.stop="onDetial('线上问题', item)"
-            >
-              <dataItem :item="item" />
+            <div>
+              <dataItem
+                :item="mainData.onlineProblemList[2]"
+                @subCountListClick="(subCountItem) => onDetial('线上问题', {
+                  ...mainData.onlineProblemList[2],
+                  subCountItem
+                })"
+              />
             </div>
           </el-col>
         </el-row>
@@ -245,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 !== '免测上线率')
       ) {
@@ -297,7 +317,8 @@ export default {
     },
     // 组织线上问题表数据
     getOnlineProblemList() {
-      const { ImprovementsOverRate, depleteUnavailableTime, newOnlineProblems, onlineBreakRate } = this.datas.onlineProblemList
+      const { ImprovementsOverRate, // depleteUnavailableTime,
+        newOnlineProblems, onlineBreakRate } = this.datas.onlineProblemList
       return [
         {
           ...this.redObj,
@@ -308,15 +329,15 @@ export default {
           'subTitle': newOnlineProblems.chainRatio,
           'IdList': newOnlineProblems.idList
         },
-        {
-          ...this.yellowObj,
-          'label': depleteUnavailableTime.label,
-          'title': depleteUnavailableTime.countStr,
-          'titleUnit': '分',
-          'subTitleUnit': 'rate',
-          'subTitle': depleteUnavailableTime.chainRatio,
-          'IdList': depleteUnavailableTime.IdList
-        },
+        // {
+        //   ...this.yellowObj,
+        //   'label': depleteUnavailableTime.label,
+        //   'title': depleteUnavailableTime.countStr,
+        //   'titleUnit': '分',
+        //   'subTitleUnit': 'rate',
+        //   'subTitle': depleteUnavailableTime.chainRatio,
+        //   'IdList': depleteUnavailableTime.IdList
+        // },
         {
           ...this.purpleObj,
           'label': onlineBreakRate.label,
@@ -327,13 +348,15 @@ export default {
           'IdList': onlineBreakRate.IdList
         },
         {
-          ...this.greenObj,
+          ...this.yellowObj,
           'label': ImprovementsOverRate.label,
           'title': ImprovementsOverRate.countStr,
           'titleUnit': '%',
           'subTitleUnit': 'rate',
           'subTitle': ImprovementsOverRate.chainRatio,
-          'IdList': ImprovementsOverRate.IdList
+          'IdList': ImprovementsOverRate.idList,
+          'subCountList': ImprovementsOverRate.subCountList,
+          'subListCountList': ImprovementsOverRate.subListCountList
         }
       ]
     },