|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<el-drawer :title="Statistics.title" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
|
|
|
+ <div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
|
|
|
<div>
|
|
|
<div class="qz-drawer-header">
|
|
|
<div class="qz-drawer-scll">
|
|
@@ -9,12 +10,12 @@
|
|
|
<timeline :data="Statistics.towTimeLine" :num="defaultKey2" :bgmargin="bgMargin" @update="getvalueTow" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="Statistics.title === '需求分布图数据'" class="qz-drawer-H">{{ status }}为{{ type }}的需求</div>
|
|
|
- <div v-if="Statistics.title === '状态停留分布图数据'" class="qz-drawer-H">在{{ type }}状态停留时长为{{ typeTow }}的需求</div>
|
|
|
+ <div v-if="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据'" class="qz-drawer-H">{{ status }}为{{ type }}的{{ Statistics.toType }}</div>
|
|
|
+ <div v-if="Statistics.title === '状态停留分布图数据'" class="qz-drawer-H">在{{ type }}状态停留时长为{{ typeTow }}的{{ Statistics.toType }}</div>
|
|
|
<qzTable :data="tableData" :title="Statistics.title" />
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
- style="text-align: center;"
|
|
|
+ style="text-align: right; margin-right: 30px;"
|
|
|
:current-page.sync="currentPage"
|
|
|
:page-size="10"
|
|
|
layout="total, prev, pager, next, jumper"
|
|
@@ -27,7 +28,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { getRequirement } from '@/api/requirement.js'
|
|
|
-// import { taskList } from '@/api/taskIndex'
|
|
|
+import { taskList } from '@/api/taskIndex'
|
|
|
import { bugList } from '@/api/defectManage'
|
|
|
import timeline from '@/components/timeline'
|
|
|
import qzTable from './tables'
|
|
@@ -95,7 +96,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
setDrawerDate() {
|
|
|
- if (this.Statistics.title === '需求分布图数据') {
|
|
|
+ if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据') {
|
|
|
this.defaultKey = this.Statistics.dataIndex
|
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
|
this.getTableData(this.dataList)
|
|
@@ -111,6 +112,10 @@ export default {
|
|
|
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 === '报告统计数据') { // 等接口
|
|
|
+ this.defaultKey = this.Statistics.dataIndex
|
|
|
+ this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
+ // this.getTableData(this.dataList)
|
|
|
}
|
|
|
},
|
|
|
handleClick(row) {
|
|
@@ -132,12 +137,14 @@ export default {
|
|
|
this.dataList = []
|
|
|
this.currentPage = 1
|
|
|
this.paging = { curIndex: 1, pageSize: 10 }
|
|
|
- if (this.Statistics.title === '需求分布图数据') {
|
|
|
+ if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据') {
|
|
|
this.dataList = this.Statistics.yaxis[0].idList[this.oneVal.value]
|
|
|
} else if (this.Statistics.title === '缺陷统计数据') {
|
|
|
this.dataList = this.Statistics.yaxis[this.oneVal.value].idList
|
|
|
} else if (this.Statistics.title === '状态停留分布图数据') {
|
|
|
this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
+ } else if (this.Statistics.title === '报告统计数据') { // 等接口
|
|
|
+ this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
}
|
|
|
if (this.dataList[0]) { // 判断idList有没有数据
|
|
|
this.getTableData(this.dataList)
|
|
@@ -155,13 +162,12 @@ export default {
|
|
|
this.tableData = res.data.list
|
|
|
this.total = res.data.total
|
|
|
}
|
|
|
-
|
|
|
- // } else if (this.Statistics.typeStr === '任务') {
|
|
|
- // const res = await taskList(this.paging)
|
|
|
- // if (res.code === 200) {
|
|
|
- // this.tableData = res.data
|
|
|
- // this.total = res.total
|
|
|
- // }
|
|
|
+ } else if (this.Statistics.title === '任务分布图数据') {
|
|
|
+ const res = await taskList(data)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableData = res.data
|
|
|
+ this.total = res.total
|
|
|
+ }
|
|
|
} else if (this.Statistics.title === '缺陷统计数据') {
|
|
|
const res = await bugList(data)
|
|
|
if (res.code === 200) {
|
|
@@ -208,6 +214,11 @@ export default {
|
|
|
margin: 0 30px;
|
|
|
color: #333333;
|
|
|
}
|
|
|
+.qz-drawer-grade {
|
|
|
+ position: absolute;
|
|
|
+ top: 28px;
|
|
|
+ left: 185px;
|
|
|
+}
|
|
|
>>> :focus{outline:0;}
|
|
|
.integration-num {
|
|
|
margin: 5px 30px;
|