|
@@ -9,20 +9,20 @@
|
|
|
@click.stop
|
|
|
>
|
|
|
<template slot="title">
|
|
|
- <div v-if="title">{{ title }}<span class="sub-title">{{ subTitle }}</span></div>
|
|
|
+ <div v-if="title" @click.stop>{{ title }}<span class="sub-title">{{ subTitle }}</span></div>
|
|
|
</template>
|
|
|
<!-- 时间线 -->
|
|
|
- <div v-if="openDrawer && isTimeLine(1)" class="qz-drawer-padding qz-drawer-header">
|
|
|
+ <div v-if="openDrawer && isTimeLine(1)" class="qz-drawer-padding qz-drawer-header" @click.stop>
|
|
|
<div ref="timeline1" class="qz-drawer-scll">
|
|
|
- <timeline :data="['P0','P1','P2','P3','P4','P5','P6']" @update="(params)=>timeLineClick(params, 1)" />
|
|
|
+ <timeline :num="timelineData.firstActive" bgmargin :data="timelineData.first" @update="(params) => timeLineClick(params, 1)" />
|
|
|
</div>
|
|
|
<div v-if="isTimeLine(2)" ref="timeline2" class="qz-drawer-scll">
|
|
|
- <timeline :data="['P0','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1','P1']" @update="(params)=>timeLineClick(params, 2)" />
|
|
|
+ <timeline :num="timelineData.secondActive" :data="timelineData.second" @update="(params)=>timeLineClick(params, 2)" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 表格 -->
|
|
|
- <dmTable v-if="openDrawer" v-loading="loading" :table-list="tableList" :total="tableList" :column="column" :table-height="tableHeight" @change="dmTableChange">
|
|
|
+ <dmTable v-if="openDrawer" v-loading="loading" :table-list="tableList" :total="tableList" :column="column" :table-height="tableHeight" @click.stop @change="dmTableChange">
|
|
|
<template #bugStatusNameSlot="{scope}">
|
|
|
<div @click="print(scope)">自定义</div>
|
|
|
</template>
|
|
@@ -65,6 +65,7 @@ import timeline from './components/timeline'
|
|
|
import { columns, timelineData } from './drawerModalData'
|
|
|
import { EncryptId } from '@/utils/crypto-js'
|
|
|
import Clickoutside from 'element-ui/src/utils/clickoutside'
|
|
|
+import { requirementQueryRequirementInfoList, taskList } from '@/api/projectIndex'
|
|
|
|
|
|
Object.freeze(timelineData)
|
|
|
export default {
|
|
@@ -106,13 +107,20 @@ export default {
|
|
|
loading: false,
|
|
|
title: '',
|
|
|
headerTitle: '',
|
|
|
- timelineData,
|
|
|
+ // timelineData,
|
|
|
tableList: [],
|
|
|
tableHeight: 'auto',
|
|
|
column: [],
|
|
|
ids: [],
|
|
|
label: '',
|
|
|
subTitle: '',
|
|
|
+ sourceData: null,
|
|
|
+ timelineData: {
|
|
|
+ first: [],
|
|
|
+ firstActive: 0,
|
|
|
+ second: [],
|
|
|
+ secondActive: 0
|
|
|
+ },
|
|
|
paging: {
|
|
|
curIndex: 1,
|
|
|
pageTotal: 0,
|
|
@@ -128,10 +136,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
openDrawer(value) {
|
|
|
- this.drawer = false
|
|
|
- if (value) {
|
|
|
- this.init()
|
|
|
- }
|
|
|
+ this.drawer = value
|
|
|
+ // if (value) {
|
|
|
+ // this.init()
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -150,15 +158,42 @@ export default {
|
|
|
this.column = []
|
|
|
this.tableList = []
|
|
|
this.drawer = this.openDrawer
|
|
|
- this.title = this.drawerData.label
|
|
|
this.headerTitle = this.drawerData.headerTitle
|
|
|
+ this.title = this.headerTitle === '质量' ? this.drawerData.label : this.drawerData.activeLabel
|
|
|
+ this.sourceData = this.drawerData.list
|
|
|
// this.ids = this.drawerData.IdList.map(e => e)
|
|
|
// this.ids = [14952, 15453, 15988, 16182, 17445, 17447, 17735, 18062, 18064, 18067, 19255, 19568, 19569, 19570, 19571, 19572, 19574, 19575, 19576, 19577, 19578, 19579, 19587, 19588, 19590, 19593, 19595, 19596, 19597, 19599, 19619, 19642, 19644, 19645, 19652, 19655, 19673, 19674, 19887, 19888, 19931, 19935, 19970, 20048, 20049, 20058, 20071, 20086, 20149, 20181, 20182, 20183, 20184, 20301, 20442, 20755, 20758, 20760, 20765, 20770, 20777, 20778, 20782, 20783, 20789, 20803, 20804, 20805, 20808, 20809, 20810, 20812, 20813, 20814, 20815, 20816, 20817, 20818, 20819, 20820, 20825, 20826, 20831, 20848, 20850, 20851]
|
|
|
this.ids = [2049, 1662, 2050, 1644, 2051, 1657, 1670, 1715, 1728, 1692, 2048, 2052, 2047] // 提测报告
|
|
|
- this.setTableList()
|
|
|
+ this.setTimeLineData()
|
|
|
this.setTitleHeight()
|
|
|
this.setTimeLine()
|
|
|
this.setColumn()
|
|
|
+ this.setTableList()
|
|
|
+ },
|
|
|
+ // 设置时间轴
|
|
|
+ setTimeLineData() {
|
|
|
+ let { firstActive, first, secondActive, second } = this.timelineData
|
|
|
+
|
|
|
+ if (this.title.search(/新增问题|新增缺陷|reopen|提测打回率|准出不通过/) < 0) {
|
|
|
+ if (this.title.search(/缺陷24小时修复率/) > -1) {
|
|
|
+ second = []
|
|
|
+ }
|
|
|
+ if (this.headerTitle === '吞吐量') {
|
|
|
+ // first = this.sourceData.map(elm => elm.label)
|
|
|
+ secondActive = 0
|
|
|
+ first = []
|
|
|
+ this.sourceData.forEach((elm, index) => {
|
|
|
+ if (this.title === elm.label) {
|
|
|
+ firstActive = index
|
|
|
+ }
|
|
|
+ first.push(elm.label)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.headerTitle === '效率') {
|
|
|
+ first = []
|
|
|
+ }
|
|
|
+ this.timelineData = { firstActive, first, secondActive, second }
|
|
|
+ }
|
|
|
},
|
|
|
handleClose() {
|
|
|
console.log(123)
|
|
@@ -185,11 +220,25 @@ export default {
|
|
|
if (this.title.search(/提测打回率|准出不通过/) > -1) {
|
|
|
this.column = columns.deliverTestReportIdListColumns.map(e => e)
|
|
|
}
|
|
|
+ if (this.headerTitle === '吞吐量') {
|
|
|
+ if (this.title.search(/需求/) > -1) {
|
|
|
+ this.column = columns.requirementListColumns.map(e => e)
|
|
|
+ }
|
|
|
+ if (this.title.search(/任务/) > -1) {
|
|
|
+ this.column = columns.taskListColumns.map(e => e)
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
// 时间轴点击事件
|
|
|
timeLineClick({ value, name }, index) {
|
|
|
this.pagingInit()
|
|
|
if (index === 1) {
|
|
|
+ if (this.headerTitle === '吞吐量') {
|
|
|
+ this.timelineData.firstActive = value
|
|
|
+ this.ids = this.sourceData[value].IdList
|
|
|
+ this.title = name
|
|
|
+ }
|
|
|
+ this.setTableList()
|
|
|
console.log(value, name, '第一条')
|
|
|
}
|
|
|
if (index === 2) {
|
|
@@ -206,6 +255,46 @@ export default {
|
|
|
this.loading = true
|
|
|
this.setReportList()
|
|
|
}
|
|
|
+ if (this.headerTitle === '吞吐量') {
|
|
|
+ if (this.title.search(/需求/) > -1) {
|
|
|
+ this.getRequirementList()
|
|
|
+ }
|
|
|
+ if (this.title.search(/任务/) > -1) {
|
|
|
+ this.getTaskList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取需求
|
|
|
+ async getRequirementList() {
|
|
|
+ const paging = this.paging
|
|
|
+ // {"ids":[14952,15453,15988,16182,17445,17447,17735,18062,18064,18067,18134,18137,18138,18140],"curIndex":2,"pageSize":10}
|
|
|
+ const res = await requirementQueryRequirementInfoList({
|
|
|
+ ids: this.ids,
|
|
|
+ curIndex: this.paging.curIndex,
|
|
|
+ pageSize: this.paging.pageSize
|
|
|
+ })
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableList = res.data.list
|
|
|
+ this.paging.pageTotal = res.data.total
|
|
|
+ this.paging = { ...paging }
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取任务
|
|
|
+ async getTaskList() {
|
|
|
+ const paging = this.paging
|
|
|
+ // {"ids":[14952,15453,15988,16182,17445,17447,17735,18062,18064,18067,18134,18137,18138,18140],"curIndex":2,"pageSize":10}
|
|
|
+ const res = await taskList({
|
|
|
+ ids: this.ids,
|
|
|
+ curIndex: this.paging.curIndex,
|
|
|
+ pageSize: this.paging.pageSize
|
|
|
+ })
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableList = res.data
|
|
|
+ this.paging.pageTotal = res.total
|
|
|
+ this.paging = { ...paging }
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
},
|
|
|
// 累计新增缺陷
|
|
|
async getBugStatisticData() {
|
|
@@ -223,7 +312,6 @@ export default {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
- //
|
|
|
// 提测报告 deliverTestReportIdList 准出记录 releaseReportIdList
|
|
|
async setReportList() {
|
|
|
const key = this.title === '提测打回率' ? 'deliverTestReportIdList' : 'releaseReportIdList'
|
|
@@ -258,8 +346,9 @@ export default {
|
|
|
this.tableHeight = 'calc(100vh - 200px)'
|
|
|
} else if (this.title.search(/累计新增|PRD评审通过|技术准入|累计上线|累计hold|累计修复|累计reopen/) > -1) {
|
|
|
this.tableHeight = 'calc(100vh - 134px)'
|
|
|
- } else if (this.title === '模块分布数据') {
|
|
|
- this.tableHeight = 'calc(100vh - 175px)'
|
|
|
+ } else if (this.title.search(/需求|任务|项目/) > -1) {
|
|
|
+ // 吞吐量: 需求
|
|
|
+ this.tableHeight = 'calc(100vh - 188px)'
|
|
|
} else if (this.title === '缺陷24小时修复率') {
|
|
|
this.tableHeight = 'calc(100vh - 416px)'
|
|
|
} else if (this.title.search(/新增缺陷|提测打回率|reopen|准出不通过/) > -1) {
|
|
@@ -273,14 +362,26 @@ export default {
|
|
|
// 表格跳转
|
|
|
dmTableChange({ column, row }) {
|
|
|
// console.log(column, row)
|
|
|
- this.jumper(row, '缺陷')
|
|
|
+ if (this.headerTitle === '吞吐量') {
|
|
|
+ if (this.title.search(/需求/) > -1) {
|
|
|
+ this.jumper(row, '需求')
|
|
|
+ }
|
|
|
+ if (this.title.search(/任务/) > -1) {
|
|
|
+ this.jumper(row, '任务')
|
|
|
+ }
|
|
|
+ if (this.title.search(/项目/) > -1) {
|
|
|
+ this.jumper(row, '项目')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.jumper(row, '缺陷')
|
|
|
+ }
|
|
|
},
|
|
|
// 设置时间轴自动滚动
|
|
|
setTimeLine() {
|
|
|
this.$nextTick(() => {
|
|
|
if (this.isTimeLine(1)) {
|
|
|
// Number(this.defaultKey) * 109 - 60
|
|
|
- this.$refs.timeline1.scrollLeft = 100
|
|
|
+ // this.$refs.timeline1.scrollLeft = 100
|
|
|
}
|
|
|
if (this.isTimeLine(2)) {
|
|
|
// Number(this.defaultKey2) * 100 - 60
|
|
@@ -298,7 +399,7 @@ export default {
|
|
|
isTimeLine(index = 1) {
|
|
|
// 是第一条
|
|
|
if (index === 1) {
|
|
|
- return this.title.search(/缺陷24小时修复率/) > -1
|
|
|
+ return this.headerTitle.search(/吞吐量/) > -1
|
|
|
}
|
|
|
// 是第二条
|
|
|
if (index === 2) {
|
|
@@ -352,14 +453,14 @@ export default {
|
|
|
/* S 时间轴 */
|
|
|
.qz-drawer-header {
|
|
|
text-align: center;
|
|
|
- background: #F7F7F7;
|
|
|
- border-radius: 4px;
|
|
|
- min-height: 120px;
|
|
|
- margin: 20px 30px;
|
|
|
+ //background: #F7F7F7;
|
|
|
+ //border-radius: 4px;
|
|
|
+ //min-height: 120px;
|
|
|
+ //margin: 20px 30px;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.qz-drawer-padding {
|
|
|
- padding: 20px 0;
|
|
|
+ //padding: 20px 0;
|
|
|
}
|
|
|
.qz-drawer-padding-s {
|
|
|
padding: 1px 0;
|