|
@@ -1,326 +1,252 @@
|
|
<template>
|
|
<template>
|
|
- <el-drawer v-if="drawer_" :title="Statistics.title" :visible.sync="drawer_" :direction="direction" :modal="false" class="drawer-box" 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 !== '模块分布数据' && Statistics.title !== '需求方向分布图数据' && Statistics.title !== '责任人分布数据' && Statistics.title !== `模块分布图数据` && show === true " :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
|
|
|
|
- <div id="index" class="qz-drawer-scll">
|
|
|
|
- <timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
|
|
|
|
- </div>
|
|
|
|
- <div v-if="Statistics.towTimeLine" id="index1" class="qz-drawer-scll">
|
|
|
|
- <timeline :data="Statistics.towTimeLine" :num="defaultKey2" :bgmargin="bgMargin" @update="getvalueTow" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <el-drawer
|
|
|
|
+ :modal="false"
|
|
|
|
+ size="50%"
|
|
|
|
+ class="drawer-box"
|
|
|
|
+ destroy-on-close
|
|
|
|
+ :visible.sync="drawer"
|
|
|
|
+ :before-close="handleClose"
|
|
|
|
+ >
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <div>{{ title }}<span class="sub-title">{{ subTitle }}</span></div>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 时间线 -->
|
|
|
|
+ <div v-if="openDrawer && isTimeLine(1)" class="qz-drawer-padding qz-drawer-header">
|
|
|
|
+ <div ref="timeline1" class="qz-drawer-scll">
|
|
|
|
+ <timeline :data="['P0','P1','P2','P3','P4','P5','P6']" @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)" />
|
|
</div>
|
|
</div>
|
|
- <div v-if="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据'" class="qz-drawer-H"><span>{{ status }}</span>为<span>{{ type }}</span>的{{ Statistics.toType }}</div>
|
|
|
|
- <div v-if="Statistics.title === '状态停留分布图数据'" class="qz-drawer-H">在<span>{{ type }}</span>状态停留时长为<span>{{ typeTow }}</span>的{{ Statistics.toType }}</div>
|
|
|
|
- <div v-if="Statistics.title === '模块分布数据'" class="qz-drawer-H qz-margin-H"> 模块<span>{{ Statistics.name }}</span>的缺陷</div>
|
|
|
|
- <div v-if="Statistics.title === `${Statistics.qz_holiday}的修复时长区间数据`" class="qz-drawer-H qz-margin-H">{{ Statistics.qz_holiday }}修复时间区间为<span>{{ type }}</span>的<span>{{ typeTow }}</span>级缺陷</div>
|
|
|
|
- <div v-if="Statistics.title === `状态累积流量图数据`" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>流入到<span>{{ typeTow }}</span>的{{ Statistics.toType }}</div>
|
|
|
|
- <div v-if="Statistics.title === `需求方向分布图数据` || Statistics.title === '所属需求方向分布图数据'" class="qz-drawer-H qz-margin-H">需求方向为<span>{{ type }}</span>的{{ Statistics.toType }}</div>
|
|
|
|
- <div v-if="Statistics.title === `责任人分布数据`" class="qz-drawer-H qz-margin-H">责任人<span>{{ type }}</span>的缺陷</div>
|
|
|
|
- <div v-if="Statistics.title === `趋势图数据`" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>新增的缺陷</div>
|
|
|
|
- <div v-if="Statistics.title === `模块分布图数据`" class="qz-drawer-H qz-margin-H">模块为<span>{{ type }}</span>的任务</div>
|
|
|
|
- <div v-if="Statistics.title === '新增趋势图数据' && Statistics.toType === '任务' || Statistics.title === '上线趋势图数据' && Statistics.toType === '任务'" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>{{ Statistics.title.substring(0, Statistics.title.length - 5 ) }}的任务</div>
|
|
|
|
- <div v-if="Statistics.toType === '需求' && Statistics.title === '新增趋势图数据' || Statistics.title === '上线趋势图数据' && Statistics.toType === '需求' || Statistics.title === 'PRD评审趋势图数据' || Statistics.title === '技术准入趋势图数据'" class="qz-drawer-H qz-margin-H"><span>{{ type }}</span>{{ Statistics.title.substring(0, Statistics.title.length - 5 ) }}的需求</div>
|
|
|
|
- <qzTable
|
|
|
|
- :data="tableData"
|
|
|
|
- :title="Statistics.title"
|
|
|
|
- :type="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据' || Statistics.title === '分布图数据' ? status : Statistics.toType"
|
|
|
|
- :oftype="type"
|
|
|
|
- :mintitle="Statistics.title === '周期统计数据' || Statistics.title === '人力统计数据' ? min_title : ''"
|
|
|
|
- />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
+ <dmTable v-if="openDrawer" :table-list="tableList" :total="tableList" :column="column" :table-height="tableHeight" />
|
|
|
|
+ <!-- 下拉 -->
|
|
<div class="qz-footer-laout">
|
|
<div class="qz-footer-laout">
|
|
<div style="line-height: 60px;">
|
|
<div style="line-height: 60px;">
|
|
- <el-button type="primary" size="mini" @click="exportTable">导 出</el-button>
|
|
|
|
|
|
+<!-- <el-button type="primary" size="mini" @click="exportTable">导 出</el-button>-->
|
|
</div>
|
|
</div>
|
|
<el-pagination
|
|
<el-pagination
|
|
- :current-page.sync="currentPage"
|
|
|
|
- :page-size="10"
|
|
|
|
|
|
+ :current-page.sync="paging.curIndex"
|
|
|
|
+ :page-size="paging.pageSize"
|
|
:pager-count="5"
|
|
:pager-count="5"
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
- :total="total"
|
|
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ :page-sizes="[10, 15, 20, 30]"
|
|
|
|
+ :total="paging.pageTotal"
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
-import { getRequirement, requirementDownload } from '@/api/requirement.js'
|
|
|
|
-import { taskList, taskDownload } from '@/api/taskIndex'
|
|
|
|
-import { bugList, bugDownload } from '@/api/defectManage'
|
|
|
|
-import { getReportList } from '@/api/reportTemplate'
|
|
|
|
-import timeline from '@/components/timeline'
|
|
|
|
-import qzTable from './tables'
|
|
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
+import { bugList } from '@/api/defectManage'
|
|
|
|
+import dmTable from './components/table.vue'
|
|
|
|
+import timeline from './components/timeline'
|
|
|
|
+import { columns, timelineData } from './drawerModalData'
|
|
|
|
+
|
|
|
|
+Object.freeze(timelineData)
|
|
export default {
|
|
export default {
|
|
- components: { timeline, qzTable },
|
|
|
|
|
|
+ name: 'DrawerModal',
|
|
|
|
+ components: {
|
|
|
|
+ dmTable, timeline
|
|
|
|
+ },
|
|
props: {
|
|
props: {
|
|
- data: { type: Object, required: true },
|
|
|
|
- drawer: { type: Boolean, default: false },
|
|
|
|
- status: { type: String, default: '' }
|
|
|
|
|
|
+ // title: {
|
|
|
|
+ // type: String,
|
|
|
|
+ // required: false,
|
|
|
|
+ // default: ''
|
|
|
|
+ // },
|
|
|
|
+ // subTitle: {
|
|
|
|
+ // type: String,
|
|
|
|
+ // required: false,
|
|
|
|
+ // default: ''
|
|
|
|
+ // },
|
|
|
|
+ openDrawer: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ required: false,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
|
|
+ drawerData: {
|
|
|
|
+ type: Object,
|
|
|
|
+ required: false,
|
|
|
|
+ default: () => {}
|
|
|
|
+ }
|
|
|
|
+ // ids: {
|
|
|
|
+ // type: Array,
|
|
|
|
+ // required: false,
|
|
|
|
+ // default: () => [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]
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- list: [],
|
|
|
|
- show: true,
|
|
|
|
- responseDownload: '',
|
|
|
|
- min_title: '', // 周期统计表头标题
|
|
|
|
- bgMargin: false,
|
|
|
|
- dataList: [],
|
|
|
|
- Statistics: {}, // title
|
|
|
|
- direction: 'rtl',
|
|
|
|
- defaultKey2: 0,
|
|
|
|
- defaultKey: 0,
|
|
|
|
- bugList: [],
|
|
|
|
- type: '',
|
|
|
|
- typeTow: '',
|
|
|
|
- towVal: '',
|
|
|
|
- oneVal: '',
|
|
|
|
- currentPage: 1,
|
|
|
|
- total: 0,
|
|
|
|
- reportData: {},
|
|
|
|
|
|
+ drawer: false,
|
|
|
|
+ timelineData,
|
|
|
|
+ tableList: [],
|
|
|
|
+ tableHeight: 'auto',
|
|
|
|
+ column: [],
|
|
|
|
+ ids: [],
|
|
|
|
+ label: '',
|
|
|
|
+ subTitle: '',
|
|
paging: {
|
|
paging: {
|
|
- curIndex: 1, // 分页
|
|
|
|
- pageSize: 10 // 分页
|
|
|
|
- },
|
|
|
|
- tableData: []
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- drawer_: {
|
|
|
|
- get() { return this.drawer },
|
|
|
|
- set(v) { this.$emit('clone', v) }
|
|
|
|
|
|
+ curIndex: 1,
|
|
|
|
+ pageTotal: 0,
|
|
|
|
+ pageSize: 10
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- data: {
|
|
|
|
- handler(newV, oldV) {
|
|
|
|
- if (newV) {
|
|
|
|
- this.Statistics = newV
|
|
|
|
- this.list = newV.xaxis
|
|
|
|
- this.type = newV.name
|
|
|
|
- this.bgMargin = false
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.paging = { curIndex: 1, pageSize: 10 }
|
|
|
|
- this.setDrawerDate()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- immediate: true
|
|
|
|
|
|
+ openDrawer(value) {
|
|
|
|
+ if (value) {
|
|
|
|
+ this.init()
|
|
|
|
+ this.setTitleHeight()
|
|
|
|
+ this.setTimeLine()
|
|
|
|
+ this.setColumn()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters(['bizId'])
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.drawer = false
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
- // this.$nextTick(() => {
|
|
|
|
- // const dateId = document.getElementById('index')
|
|
|
|
- // dateId.scrollLeft = Number(this.defaultKey) * 100 - 60
|
|
|
|
- // })
|
|
|
|
|
|
+ this.drawer = false
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- setDrawerDate() {
|
|
|
|
- this.show = true
|
|
|
|
- if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
|
|
|
|
- this.defaultKey = this.Statistics.dataIndex
|
|
|
|
- this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '责任人分布数据') {
|
|
|
|
- this.dataList = this.Statistics[this.Statistics.key].idList
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' || this.Statistics.title === '平均修复时长数据') {
|
|
|
|
- const key = this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' ? this.Statistics.xaxis.indexOf(this.Statistics.label.substr(2)) : this.Statistics.xaxis.indexOf(this.Statistics.label)
|
|
|
|
- this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据' ? this.min_title = this.Statistics.label.substr(2) : ''
|
|
|
|
- this.defaultKey = key === -1 ? 0 : key
|
|
|
|
- this.dataList = this.Statistics.idList
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '状态累积流量图数据') {
|
|
|
|
- this.bgMargin = true
|
|
|
|
- this.typeTow = this.Statistics.seriesName
|
|
|
|
- this.defaultKey = this.Statistics.dataIndex
|
|
|
|
- this.defaultKey2 = Number(this.Statistics.seriesIndex)
|
|
|
|
- const statusArr = this.Statistics.statusList[this.Statistics.seriesName]
|
|
|
|
- this.dataList = statusArr[this.defaultKey].idList
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '状态停留分布图数据') {
|
|
|
|
- this.bgMargin = true
|
|
|
|
- this.typeTow = this.Statistics.seriesName // 停留时长
|
|
|
|
- this.defaultKey = this.Statistics.dataIndex
|
|
|
|
- this.defaultKey2 = Number(this.Statistics.seriesIndex)
|
|
|
|
- this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '报告统计数据') {
|
|
|
|
- const key = this.Statistics.xaxis.indexOf(this.Statistics.label)
|
|
|
|
- this.defaultKey = key === -1 ? 0 : key
|
|
|
|
- this.Statistics.label === '总数' ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList, dailyReportIdList: this.Statistics.subCountList[1].idList, releaseReportIdList: this.Statistics.subCountList[2].idList }) : ''
|
|
|
|
- key === 1 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList }) : '' // 提测
|
|
|
|
- key === 2 ? this.getIdList({ dailyReportIdList: this.Statistics.subCountList[0].idList }) : '' // 日报
|
|
|
|
- key === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.subCountList[0].idList }) : '' // 准出
|
|
|
|
- } else if (this.Statistics.title === '模块分布数据') {
|
|
|
|
- this.getTableData(this.Statistics.newData.idList)
|
|
|
|
- } else if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === `模块分布图数据`) {
|
|
|
|
- this.mapChildren(this.Statistics)
|
|
|
|
- } else if (this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
|
|
|
|
- this.bgMargin = true
|
|
|
|
- this.typeTow = this.Statistics.seriesName
|
|
|
|
- this.defaultKey = this.Statistics.dataIndex
|
|
|
|
- this.defaultKey2 = Number(this.Statistics.seriesIndex)
|
|
|
|
- this.dataList = this.Statistics.series[this.defaultKey2].idList[this.defaultKey]
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '新增趋势图数据' || this.Statistics.title === '上线趋势图数据' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据') {
|
|
|
|
- this.defaultKey = this.Statistics.dataIndex
|
|
|
|
- this.defaultKey2 = this.Statistics.seriesIndex
|
|
|
|
- this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else if (this.Statistics.title === '累计新增' || this.Statistics.title === 'PRD评审通过' || this.Statistics.title === '技术准入' || this.Statistics.title === '累计上线' || this.Statistics.title === '累计hold' || this.Statistics.title === '累计修复' || this.Statistics.title === '累计reopen') {
|
|
|
|
- this.show = false
|
|
|
|
- this.dataList = this.Statistics.idList
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- }
|
|
|
|
- this.$nextTick(() => { // 时间轴定位
|
|
|
|
- const dateId = document.getElementById('index')
|
|
|
|
- dateId.scrollLeft = Number(this.defaultKey) * 109 - 60
|
|
|
|
- if (this.Statistics.towTimeLine) {
|
|
|
|
- const dateIds = document.getElementById('index1')
|
|
|
|
- dateIds.scrollLeft = Number(this.defaultKey2) * 100 - 60
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ init() {
|
|
|
|
+ this.drawer = this.openDrawer
|
|
|
|
+ this.title = this.drawerData.label
|
|
|
|
+ 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.getBugStatisticData()
|
|
},
|
|
},
|
|
- getvalue(e) { // 时间轴one
|
|
|
|
- this.oneVal = e
|
|
|
|
- this.type = e.name
|
|
|
|
- this.defaultKey = e.value
|
|
|
|
- this.getTimeLine()
|
|
|
|
|
|
+ handleClose() {
|
|
|
|
+ this.drawer = false
|
|
|
|
+ this.$emit('update:openDrawer', this.drawer)
|
|
},
|
|
},
|
|
- getvalueTow(e) { // 时间轴tow
|
|
|
|
- this.towVal = e
|
|
|
|
- this.typeTow = e.name
|
|
|
|
- this.defaultKey2 = e.value
|
|
|
|
- this.getTimeLine()
|
|
|
|
|
|
+ handleSizeChange(value) {
|
|
|
|
+ this.paging.pageSize = value
|
|
|
|
+ this.getBugStatisticData()
|
|
},
|
|
},
|
|
- getTimeLine() { // 数据筛选
|
|
|
|
- this.dataList = []
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.paging = { curIndex: 1, pageSize: 10 }
|
|
|
|
- if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '新增趋势图数据' || this.Statistics.title === '上线趋势图数据' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
|
|
|
|
- this.dataList = this.Statistics.yaxis[0].idList[this.oneVal.value]
|
|
|
|
- } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '平均修复时长数据') {
|
|
|
|
- this.dataList = this.Statistics.yaxis[this.oneVal.value].idList
|
|
|
|
- } else if (this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据') {
|
|
|
|
- this.min_title = this.type
|
|
|
|
- this.dataList = this.Statistics.yaxis[this.defaultKey].idList
|
|
|
|
- } else if (this.Statistics.title === '状态累积流量图数据') {
|
|
|
|
- const statusArr = this.Statistics.statusList[this.typeTow]
|
|
|
|
- this.dataList = statusArr[this.defaultKey].idList
|
|
|
|
- } else if (this.Statistics.title === '状态停留分布图数据') {
|
|
|
|
- this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
|
- } else if (this.Statistics.title === '报告统计数据') {
|
|
|
|
- this.defaultKey === 0 ? this.getIdList({ deliverTestReportIdList: this.Statistics.reportData[1].subCountList[0].idList, dailyReportIdList: this.Statistics.reportData[2].subCountList[0].idList, releaseReportIdList: this.Statistics.reportData[3].subCountList[0].idList }) : ''
|
|
|
|
- this.defaultKey === 1 ? this.getIdList({ deliverTestReportIdList: this.Statistics.reportData[1].subCountList[0].idList }) : '' // 提测
|
|
|
|
- this.defaultKey === 2 ? this.getIdList({ dailyReportIdList: this.Statistics.reportData[2].subCountList[0].idList }) : '' // 日报
|
|
|
|
- this.defaultKey === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.reportData[3].subCountList[0].idList }) : '' // 准出
|
|
|
|
- return
|
|
|
|
- } else if (this.Statistics.title === '去除节假日的修复时长数据') {
|
|
|
|
- this.dataList = this.Statistics[this.defaultKey].idList
|
|
|
|
- } else if (this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
|
|
|
|
- this.dataList = this.Statistics.series[this.defaultKey2].idList[this.defaultKey]
|
|
|
|
- }
|
|
|
|
- if (this.dataList[0]) { // 判断idList有没有数据
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else { // 没有数据初始化table
|
|
|
|
- this.tableData = []
|
|
|
|
- this.total = 0
|
|
|
|
- }
|
|
|
|
|
|
+ handleCurrentChange(value) {
|
|
|
|
+ console.log(value)
|
|
|
|
+ this.paging.curIndex = value
|
|
|
|
+ this.getBugStatisticData()
|
|
},
|
|
},
|
|
- async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
|
|
|
|
- if (!taskIdList || taskIdList.length <= 0) {
|
|
|
|
- this.tableData = []
|
|
|
|
- this.total = 0
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const data = { ids: taskIdList, ...this.paging }
|
|
|
|
- if (this.Statistics.title === '周期统计数据') { data.statisticsType = 1 }
|
|
|
|
- if (this.Statistics.title === '人力统计数据') { data.statisticsType = 2 }
|
|
|
|
- if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '累计新增' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审通过' && this.Statistics.toType === '需求' || this.Statistics.title === '技术准入' && this.Statistics.toType === '需求' || this.Statistics.title === '累计上线' && this.Statistics.toType === '需求' || this.Statistics.title === '累计hold' && this.Statistics.toType === '需求') {
|
|
|
|
- const res = await getRequirement(data)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.tableData = res.data.list
|
|
|
|
- this.total = res.data.total
|
|
|
|
- }
|
|
|
|
- } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === `模块分布图数据` || this.Statistics.title === '累计新增' && this.Statistics.toType === '任务' || this.Statistics.title === '技术准入' && this.Statistics.toType === '任务' || this.Statistics.title === '累计上线' && this.Statistics.toType === '任务' || this.Statistics.title === '累计hold' && this.Statistics.toType === '任务') {
|
|
|
|
- const res = await taskList(data)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.tableData = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
- }
|
|
|
|
- } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据' || this.Statistics.title === '累计修复' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计reopen' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计新增' && this.Statistics.toType === '缺陷') {
|
|
|
|
- const res = await bugList(data)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.tableData = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
- }
|
|
|
|
|
|
+ // 导出
|
|
|
|
+ exportTable() {
|
|
|
|
+ },
|
|
|
|
+ // 设置表格头
|
|
|
|
+ setColumn() {
|
|
|
|
+ if (this.title.search(/新增缺陷|reopen缺陷|缺陷24小时修复率/) > -1) {
|
|
|
|
+ this.column = columns.bugColumn.map(e => e)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async getIdList(value) {
|
|
|
|
- this.reportData = value
|
|
|
|
- const data = { ...value, ...this.paging }
|
|
|
|
- const res = await getReportList(data)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.tableData = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
|
|
+ // 时间轴点击事件
|
|
|
|
+ timeLineClick({ value, name }, index) {
|
|
|
|
+ this.pagingInit()
|
|
|
|
+ if (index === 1) {
|
|
|
|
+ console.log(value, name, '第一条')
|
|
|
|
+ }
|
|
|
|
+ if (index === 2) {
|
|
|
|
+ console.log(value, name, '第二条')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleSizeChange(val) {
|
|
|
|
- this.paging.pageSize = val
|
|
|
|
- this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
|
|
|
|
|
|
+ // 累计新增缺陷
|
|
|
|
+ async getBugStatisticData() {
|
|
|
|
+ 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 bugList({
|
|
|
|
+ ids: this.ids,
|
|
|
|
+ curIndex: this.paging.curIndex,
|
|
|
|
+ pageSize: this.paging.pageSize
|
|
|
|
+ })
|
|
|
|
+ this.tableList = res.data
|
|
|
|
+ this.paging.pageTotal = res.total
|
|
|
|
+ this.paging = { ...paging }
|
|
},
|
|
},
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.paging.curIndex = val
|
|
|
|
- this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
|
|
|
|
|
|
+ // 分页数据初始化
|
|
|
|
+ pagingInit() {
|
|
|
|
+ this.paging = {
|
|
|
|
+ curIndex: 1,
|
|
|
|
+ pageTotal: 0,
|
|
|
|
+ pageSize: 5
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- mapChildren(item) {
|
|
|
|
- if (this.Statistics.name === '需求方向分布' || this.Statistics.name === '模块分布') {
|
|
|
|
- this.dataList = []
|
|
|
|
- item.children.map(i => {
|
|
|
|
- this.dataList = this.dataList.concat(i.idList)
|
|
|
|
- })
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- return
|
|
|
|
|
|
+ // 设置表格高度
|
|
|
|
+ setTitleHeight() {
|
|
|
|
+ console.log(this.title)
|
|
|
|
+ if (this.title.search(/状态停留分布图数据|状态累积流量图数据/) > -1) {
|
|
|
|
+ this.tableHeight = 'calc(100vh - 363px)'
|
|
|
|
+ } else if (this.title.search(/需求方向分布图数据|模块分布图数据/) > -1) {
|
|
|
|
+ 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 === '缺陷24小时修复率') {
|
|
|
|
+ this.tableHeight = 'calc(100vh - 416px)'
|
|
|
|
+ } else if (this.title === '新增缺陷') {
|
|
|
|
+ this.tableHeight = 'calc(100vh - 136px)'
|
|
|
|
+ } else {
|
|
|
|
+ this.tableHeight = 'calc(100vh - 318px)'
|
|
|
|
+ // this.tableHeight = 'calc(100vh - 10px)'
|
|
}
|
|
}
|
|
- item.children.map(i => {
|
|
|
|
- if (i.name === this.Statistics.name) {
|
|
|
|
- this.dataList = i.idList
|
|
|
|
- this.getTableData(this.dataList)
|
|
|
|
- } else {
|
|
|
|
- if (i.children) {
|
|
|
|
- this.mapChildren(i)
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 设置表头
|
|
|
|
+
|
|
|
|
+ // 设置时间轴自动滚动
|
|
|
|
+ setTimeLine() {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ if (this.isTimeLine(1)) {
|
|
|
|
+ // Number(this.defaultKey) * 109 - 60
|
|
|
|
+ this.$refs.timeline1.scrollLeft = 100
|
|
|
|
+ }
|
|
|
|
+ if (this.isTimeLine(2)) {
|
|
|
|
+ // Number(this.defaultKey2) * 100 - 60
|
|
|
|
+ // this.$refs.timeline2.scrollLeft = 256
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- async exportTable() {
|
|
|
|
- const data = { ids: this.dataList }
|
|
|
|
- if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '累计新增' && this.Statistics.toType === '需求' || this.Statistics.title === '技术准入' && this.Statistics.toType === '需求' || this.Statistics.title === '累计上线' && this.Statistics.toType === '需求' || this.Statistics.title === '累计hold' && this.Statistics.toType === '需求') {
|
|
|
|
- this.responseDownload = await requirementDownload(data)
|
|
|
|
- } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === `模块分布图数据` || this.Statistics.title === '累计新增' && this.Statistics.toType === '任务' || this.Statistics.title === '技术准入' && this.Statistics.toType === '任务' || this.Statistics.title === '累计上线' && this.Statistics.toType === '任务' || this.Statistics.title === '累计hold' && this.Statistics.toType === '任务') {
|
|
|
|
- this.responseDownload = await taskDownload(data)
|
|
|
|
- } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据' || this.Statistics.title === '累计修复' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计reopen' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计新增' && this.Statistics.toType === '缺陷') {
|
|
|
|
- this.responseDownload = await bugDownload(data)
|
|
|
|
|
|
+ // 设置时间轴自动滚动
|
|
|
|
+ isTimeLine(index = 1) {
|
|
|
|
+ // 是第一条
|
|
|
|
+ if (index === 1) {
|
|
|
|
+ return this.title.search(/缺陷24小时修复率/) > -1
|
|
|
|
+ }
|
|
|
|
+ // 是第二条
|
|
|
|
+ if (index === 2) {
|
|
|
|
+ return this.title.search(/缺陷24小时修复率/) > -1
|
|
}
|
|
}
|
|
- const aLink = document.createElement('a')
|
|
|
|
- const blob = new Blob([this.responseDownload], { type: 'application/vnd.ms-excel' })
|
|
|
|
- aLink.href = URL.createObjectURL(blob)
|
|
|
|
- aLink.download = this.Statistics.title + '.xlsx'
|
|
|
|
- aLink.style.display = 'none'
|
|
|
|
- aLink.click()
|
|
|
|
- },
|
|
|
|
- handleClose(done) { // 关闭
|
|
|
|
- this.$emit('clone')
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
+<style scoped lang='less'>
|
|
|
|
+/deep/ .el-drawer__header {
|
|
|
|
+ color: #444;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ padding: 20px 30px;
|
|
|
|
+ border-bottom: 1px solid #E2E2E2;
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
|
|
|
+ .sub-title {
|
|
|
|
+ color: #444;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.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);
|
|
|
|
+}
|
|
|
|
+/* S 时间轴 */
|
|
.qz-drawer-header {
|
|
.qz-drawer-header {
|
|
text-align: center;
|
|
text-align: center;
|
|
background: #F7F7F7;
|
|
background: #F7F7F7;
|
|
@@ -344,71 +270,19 @@ export default {
|
|
margin: 0 30px;
|
|
margin: 0 30px;
|
|
color: #444444;
|
|
color: #444444;
|
|
}
|
|
}
|
|
-.qz-drawer-H span {
|
|
|
|
- color: #333333;
|
|
|
|
- font-weight: 600;
|
|
|
|
-}
|
|
|
|
-.qz-message { color: #444; font-size: 14px;}
|
|
|
|
-.qz-drawer-grade {
|
|
|
|
- @extend .qz-message;
|
|
|
|
- position: absolute;
|
|
|
|
- top: 28px;
|
|
|
|
- left: 185px;
|
|
|
|
-}
|
|
|
|
-.qz-drawer-grade-tow {
|
|
|
|
- @extend .qz-message;
|
|
|
|
- position: absolute;
|
|
|
|
- top: 28px;
|
|
|
|
- left: 150px;
|
|
|
|
-}
|
|
|
|
-/deep/ :focus{outline:0;}
|
|
|
|
-/deep/.el-table::before {
|
|
|
|
- left: 0;
|
|
|
|
- bottom: 0;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 0px;
|
|
|
|
-}
|
|
|
|
-/deep/.el-drawer__header {
|
|
|
|
- color: #444;
|
|
|
|
- font-size: 20px;
|
|
|
|
- font-weight: 500;
|
|
|
|
- margin-bottom: 0px;
|
|
|
|
- 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);
|
|
|
|
- }
|
|
|
|
- .el-drawer__wrapper {
|
|
|
|
- width: 100%;
|
|
|
|
- position: fixed;
|
|
|
|
- top: 0;
|
|
|
|
- right: 0;
|
|
|
|
- bottom: 0;
|
|
|
|
- left: 50%;
|
|
|
|
- overflow: hidden;
|
|
|
|
- margin: 0;
|
|
|
|
-}
|
|
|
|
-/deep/.el-drawer__container {
|
|
|
|
- left: 0;
|
|
|
|
- right: 0;
|
|
|
|
- width: 50%;
|
|
|
|
-}
|
|
|
|
-/deep/.el-table td, .el-table th {
|
|
|
|
- padding: 5px 0;
|
|
|
|
|
|
+.qz-drawer-scll {
|
|
|
|
+ overflow-x: scroll;
|
|
}
|
|
}
|
|
-.qz-margin-H {
|
|
|
|
- margin: 20px 30px 10px;
|
|
|
|
|
|
+.qz-drawer-scll::-webkit-scrollbar { width: 0 !important; height: 0 !important }
|
|
|
|
+.qz-drawer-H {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ margin: 0 30px;
|
|
|
|
+ color: #444444;
|
|
}
|
|
}
|
|
|
|
+/* E 时间轴 */
|
|
.qz-footer-laout {
|
|
.qz-footer-laout {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
margin: 0 30px;
|
|
margin: 0 30px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-<style>
|
|
|
|
-.el-drawer__open .el-drawer.rtl {
|
|
|
|
- -webkit-animation: none;
|
|
|
|
- animation: none;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|