|
@@ -3,7 +3,7 @@
|
|
<div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
|
|
<div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
|
|
<div v-if="Statistics.title === '分布图数据'" class="qz-drawer-grade-tow">按缺陷等级分布</div>
|
|
<div v-if="Statistics.title === '分布图数据'" class="qz-drawer-grade-tow">按缺陷等级分布</div>
|
|
<div>
|
|
<div>
|
|
- <div v-if="Statistics.title !== '模块分布数据' && Statistics.title !== '需求方向分布图数据' && Statistics.title !== '责任人分布数据' && Statistics.title !== `模块分布图数据` " :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
|
|
|
|
|
|
+ <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 class="qz-drawer-scll">
|
|
<div class="qz-drawer-scll">
|
|
<timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
|
|
<timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
|
|
</div>
|
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
</div>
|
|
</div>
|
|
<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">导 出</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="exportTable">导 出</el-button>
|
|
</div>
|
|
</div>
|
|
<el-pagination
|
|
<el-pagination
|
|
:current-page.sync="currentPage"
|
|
:current-page.sync="currentPage"
|
|
@@ -49,9 +49,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getRequirement } from '@/api/requirement.js'
|
|
|
|
-import { taskList } from '@/api/taskIndex'
|
|
|
|
-import { bugList } from '@/api/defectManage'
|
|
|
|
|
|
+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 { getReportList } from '@/api/reportTemplate'
|
|
import timeline from '@/components/timeline'
|
|
import timeline from '@/components/timeline'
|
|
import qzTable from './tables'
|
|
import qzTable from './tables'
|
|
@@ -65,6 +65,8 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
list: [],
|
|
list: [],
|
|
|
|
+ show: true,
|
|
|
|
+ responseDownload: '',
|
|
min_title: '', // 周期统计表头标题
|
|
min_title: '', // 周期统计表头标题
|
|
bgMargin: false,
|
|
bgMargin: false,
|
|
dataList: [],
|
|
dataList: [],
|
|
@@ -118,6 +120,7 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
setDrawerDate() {
|
|
setDrawerDate() {
|
|
|
|
+ this.show = true
|
|
if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
|
|
if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
|
|
this.defaultKey = this.Statistics.dataIndex
|
|
this.defaultKey = this.Statistics.dataIndex
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
@@ -172,6 +175,10 @@ export default {
|
|
this.defaultKey2 = this.Statistics.seriesIndex
|
|
this.defaultKey2 = this.Statistics.seriesIndex
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
this.getTableData(this.dataList)
|
|
this.getTableData(this.dataList)
|
|
|
|
+ } else if (this.Statistics.title === '累计新增' || 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)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getvalue(e) { // 时间轴one
|
|
getvalue(e) { // 时间轴one
|
|
@@ -230,19 +237,19 @@ export default {
|
|
const data = { ids: taskIdList, ...this.paging }
|
|
const data = { ids: taskIdList, ...this.paging }
|
|
if (this.Statistics.title === '周期统计数据') { data.statisticsType = 1 }
|
|
if (this.Statistics.title === '周期统计数据') { data.statisticsType = 1 }
|
|
if (this.Statistics.title === '人力统计数据') { data.statisticsType = 2 }
|
|
if (this.Statistics.title === '人力统计数据') { data.statisticsType = 2 }
|
|
- 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 === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据') {
|
|
|
|
|
|
+ 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 === '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 === '需求') {
|
|
const res = await getRequirement(data)
|
|
const res = await getRequirement(data)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.tableData = res.data.list
|
|
this.tableData = res.data.list
|
|
this.total = res.data.total
|
|
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 === `模块分布图数据`) {
|
|
|
|
|
|
+ } 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.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)
|
|
const res = await taskList(data)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.tableData = res.data
|
|
this.tableData = res.data
|
|
this.total = res.total
|
|
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 === '趋势图数据') {
|
|
|
|
|
|
+ } 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)
|
|
const res = await bugList(data)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.tableData = res.data
|
|
this.tableData = res.data
|
|
@@ -287,6 +294,22 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ 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 === '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.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)
|
|
|
|
+ }
|
|
|
|
+ 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) { // 关闭
|
|
handleClose(done) { // 关闭
|
|
this.$emit('clone')
|
|
this.$emit('clone')
|
|
}
|
|
}
|