|
@@ -3,7 +3,7 @@
|
|
|
<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 !== '需求方向分布图数据'" :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
|
|
|
+ <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 class="qz-drawer-scll">
|
|
|
<timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
|
|
|
</div>
|
|
@@ -16,9 +16,12 @@
|
|
|
<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 === `需求方向分布图数据`" class="qz-drawer-H qz-margin-H">需求方向为<span>{{ type }}</span>的需求</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.title === 'PRD评审趋势图数据' || Statistics.title === '技术准入趋势图数据'" 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"
|
|
@@ -27,15 +30,19 @@
|
|
|
:mintitle="Statistics.title === '周期统计数据' || Statistics.title === '人力统计数据' ? min_title : ''"
|
|
|
/>
|
|
|
</div>
|
|
|
- <el-pagination
|
|
|
- style="text-align: right; margin-right: 30px;"
|
|
|
- :current-page.sync="currentPage"
|
|
|
- :page-size="10"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
+ <div class="qz-footer-laout">
|
|
|
+ <el-button type="primary" size="mini">导 出</el-button>
|
|
|
+ <el-pagination
|
|
|
+ :current-page.sync="currentPage"
|
|
|
+ :page-size="10"
|
|
|
+ :pager-count="5"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-drawer>
|
|
|
</template>
|
|
|
|
|
@@ -109,11 +116,17 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
setDrawerDate() {
|
|
|
- if (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.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
|
|
|
this.getTableData(this.dataList)
|
|
|
- } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '周期统计数据' || this.Statistics.title === '人力统计数据') {
|
|
|
+ } else if (this.Statistics.title === '责任人分布数据') {
|
|
|
+ this.dataList = this.Statistics[this.Statistics.key].idList
|
|
|
+ this.getTableData(this.dataList)
|
|
|
+ } else if (this.Statistics.title === '平均修复mmmmmm时长数据') {
|
|
|
+ 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
|
|
@@ -143,18 +156,8 @@ export default {
|
|
|
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.children.map(item => {
|
|
|
- if (item.name === this.Statistics.name) {
|
|
|
- this.getTableData(item.idList)
|
|
|
- } else {
|
|
|
- if (item.children) {
|
|
|
- item.children.map(i => {
|
|
|
- i.name === this.Statistics.name ? this.getTableData(i.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
|
|
@@ -185,9 +188,9 @@ export default {
|
|
|
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 === '技术准入趋势图数据') {
|
|
|
+ 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 === '缺陷统计数据') {
|
|
|
+ } 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
|
|
@@ -217,7 +220,7 @@ export default {
|
|
|
},
|
|
|
async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
|
|
|
console.log(taskIdList, 'legnth')
|
|
|
- if (taskIdList.length <= 0) {
|
|
|
+ if (!taskIdList || taskIdList.length <= 0) {
|
|
|
this.tableData = []
|
|
|
this.total = 0
|
|
|
return
|
|
@@ -229,13 +232,13 @@ export default {
|
|
|
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 === '任务') {
|
|
|
+ } 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 === `模块分布图数据`) {
|
|
|
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.qz_holiday}的修复时长区间数据`) {
|
|
|
+ } 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 === '趋势图数据') {
|
|
|
const res = await bugList(data)
|
|
|
if (res.code === 200) {
|
|
|
this.tableData = res.data
|
|
@@ -260,6 +263,17 @@ export default {
|
|
|
this.paging.curIndex = val
|
|
|
this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
|
|
|
},
|
|
|
+ mapChildren(item) {
|
|
|
+ item.children.map(i => {
|
|
|
+ if (i.name === this.Statistics.name) {
|
|
|
+ this.getTableData(i.idList)
|
|
|
+ } else {
|
|
|
+ if (i.children) {
|
|
|
+ this.mapChildren(i)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleClose(done) { // 关闭
|
|
|
this.$emit('clone')
|
|
|
}
|
|
@@ -347,4 +361,9 @@ export default {
|
|
|
.qz-margin-H {
|
|
|
margin: 20px 30px 10px;
|
|
|
}
|
|
|
+.qz-footer-laout {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 0 30px;
|
|
|
+}
|
|
|
</style>
|