|
@@ -2,7 +2,7 @@
|
|
|
<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 v-if="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>
|
|
@@ -10,9 +10,19 @@
|
|
|
<timeline :data="Statistics.towTimeLine" :num="defaultKey2" :bgmargin="bgMargin" @update="getvalueTow" />
|
|
|
</div>
|
|
|
</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 v-if="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据'" class="qz-drawer-H">
|
|
|
+ <span class="fontSize">{{ status }}</span>为<span class="fontSize">{{ type }}</span>的{{ Statistics.toType }}
|
|
|
+ </div>
|
|
|
+ <div v-if="Statistics.title === '状态停留分布图数据'" class="qz-drawer-H">
|
|
|
+ 在<span class="fontSize">{{ type }}</span>状态停留时长为<span class="fontSize">{{ typeTow }}</span>的{{ Statistics.toType }}
|
|
|
+ </div>
|
|
|
+ <div v-if="Statistics.title === '模块分布数据'" class="qz-drawer-H" style="margin: 20px 30px 10px;">
|
|
|
+ 模块<span class="fontSize">{{ Statistics.name }}</span>的缺陷
|
|
|
+ </div>
|
|
|
+ <div v-if="Statistics.title === `${Statistics.qz_holiday}的修复时长区间数据`" class="qz-drawer-H" style="margin: 20px 30px 10px;">
|
|
|
+ {{ Statistics.qz_holiday }}修复时间区间为<span class="fontSize">{{ type }}</span>的<span class="fontSize">{{ typeTow }}</span>级缺陷
|
|
|
+ </div>
|
|
|
+ <qzTable :data="tableData" :title="Statistics.title" :type="Statistics.toType" />
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
style="text-align: right; margin-right: 30px;"
|
|
@@ -30,13 +40,11 @@
|
|
|
import { getRequirement } from '@/api/requirement.js'
|
|
|
import { taskList } from '@/api/taskIndex'
|
|
|
import { bugList } from '@/api/defectManage'
|
|
|
+import { getReportList } from '@/api/reportTemplate'
|
|
|
import timeline from '@/components/timeline'
|
|
|
import qzTable from './tables'
|
|
|
export default {
|
|
|
- components: {
|
|
|
- timeline,
|
|
|
- qzTable
|
|
|
- },
|
|
|
+ components: { timeline, qzTable },
|
|
|
props: {
|
|
|
data: { type: Object, required: true },
|
|
|
drawer: { type: Boolean, default: false },
|
|
@@ -59,6 +67,7 @@ export default {
|
|
|
oneVal: '',
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
+ reportData: {},
|
|
|
paging: {
|
|
|
curIndex: 1, // 分页
|
|
|
pageSize: 10 // 分页
|
|
@@ -96,11 +105,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
setDrawerDate() {
|
|
|
- if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据') {
|
|
|
+ if (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 === '缺陷统计数据') {
|
|
|
+ } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据') {
|
|
|
const key = this.Statistics.xaxis.indexOf(this.Statistics.label)
|
|
|
this.defaultKey = key === -1 ? 0 : key
|
|
|
this.dataList = this.Statistics.idList
|
|
@@ -112,22 +121,31 @@ 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 === '报告统计数据') { // 等接口
|
|
|
+ } 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.qz_holiday}的修复时长区间数据`) {
|
|
|
+ this.bgMargin = true
|
|
|
+ this.typeTow = this.Statistics.seriesName
|
|
|
this.defaultKey = this.Statistics.dataIndex
|
|
|
- this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
|
|
|
- // this.getTableData(this.dataList)
|
|
|
+ this.defaultKey2 = Number(this.Statistics.seriesIndex)
|
|
|
+ this.dataList = this.Statistics.series[this.defaultKey2].idList[this.defaultKey]
|
|
|
+ this.getTableData(this.dataList)
|
|
|
}
|
|
|
},
|
|
|
- handleClick(row) {
|
|
|
- console.log(row)
|
|
|
- },
|
|
|
- getvalue(e) {
|
|
|
+ getvalue(e) { // 时间轴one
|
|
|
this.oneVal = e
|
|
|
this.type = e.name
|
|
|
this.defaultKey = e.value
|
|
|
this.getTimeLine()
|
|
|
},
|
|
|
- getvalueTow(e) {
|
|
|
+ getvalueTow(e) { // 时间轴tow
|
|
|
this.towVal = e
|
|
|
this.typeTow = e.name
|
|
|
this.defaultKey2 = e.value
|
|
@@ -137,14 +155,22 @@ export default {
|
|
|
this.dataList = []
|
|
|
this.currentPage = 1
|
|
|
this.paging = { curIndex: 1, pageSize: 10 }
|
|
|
- if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据') {
|
|
|
+ if (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.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]
|
|
|
+ } else if (this.Statistics.title === '报告统计数据') {
|
|
|
+ this.defaultKey === 0 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList, dailyReportIdList: this.Statistics.subCountList[1].idList, releaseReportIdList: this.Statistics.subCountList[2].idList }) : ''
|
|
|
+ this.defaultKey === 1 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList }) : '' // 提测
|
|
|
+ this.defaultKey === 2 ? this.getIdList({ dailyReportIdList: this.Statistics.subCountList[0].idList }) : '' // 日报
|
|
|
+ this.defaultKey === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.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)
|
|
@@ -153,41 +179,48 @@ export default {
|
|
|
this.total = 0
|
|
|
}
|
|
|
},
|
|
|
- async getTableData(taskIdList) {
|
|
|
+ async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
|
|
|
const data = { ids: taskIdList, ...this.paging }
|
|
|
- if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据') {
|
|
|
+ if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求') {
|
|
|
const res = await getRequirement(data)
|
|
|
if (res.code === 200) {
|
|
|
- console.log(res, '农村科技大厦')
|
|
|
this.tableData = res.data.list
|
|
|
this.total = res.data.total
|
|
|
}
|
|
|
- } else if (this.Statistics.title === '任务分布图数据') {
|
|
|
+ } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && 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 === '缺陷统计数据') {
|
|
|
+ } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
|
|
|
const res = await bugList(data)
|
|
|
if (res.code === 200) {
|
|
|
this.tableData = res.data
|
|
|
this.total = res.total
|
|
|
}
|
|
|
}
|
|
|
- // } else {
|
|
|
- // this.tableData = []
|
|
|
- // }
|
|
|
+ },
|
|
|
+ async getIdList(value) {
|
|
|
+ console.log(value, '你经常看电视吧')
|
|
|
+ this.reportData = value
|
|
|
+ const data = { ...value, ...this.paging }
|
|
|
+ console.log(data, '你经cdslkcmd常看电视吧')
|
|
|
+ const res = await getReportList(data)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableData = res.data
|
|
|
+ this.total = res.total
|
|
|
+ }
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.paging.pageSize = val
|
|
|
- this.getTableData(this.dataList)
|
|
|
+ this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.paging.curIndex = val
|
|
|
- this.getTableData(this.dataList)
|
|
|
+ this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
|
|
|
},
|
|
|
- handleClose(done) {
|
|
|
+ handleClose(done) { // 关闭
|
|
|
this.$emit('clone')
|
|
|
}
|
|
|
}
|
|
@@ -197,31 +230,44 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.qz-drawer-header {
|
|
|
text-align: center;
|
|
|
- background: rgb(252, 252, 252);
|
|
|
+ background: #F7F7F7;
|
|
|
border-radius: 4px;
|
|
|
min-height: 120px;
|
|
|
margin: 20px 30px;
|
|
|
- padding: 1px 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
+.qz-drawer-padding {
|
|
|
+ padding: 20px 0;
|
|
|
+}
|
|
|
+.qz-drawer-padding-s {
|
|
|
+ padding: 1px 0;
|
|
|
+}
|
|
|
.qz-drawer-scll {
|
|
|
overflow-x: auto;
|
|
|
}
|
|
|
.qz-drawer-scll::-webkit-scrollbar { width: 0 !important; height: 0 !important }
|
|
|
.qz-drawer-H {
|
|
|
font-size: 16px;
|
|
|
- font-weight: 500;
|
|
|
margin: 0 30px;
|
|
|
- color: #333333;
|
|
|
+ color: #444444;
|
|
|
}
|
|
|
.qz-drawer-grade {
|
|
|
- position: absolute;
|
|
|
- top: 28px;
|
|
|
- left: 185px;
|
|
|
+ color: #444;
|
|
|
+ font-size: 14px;
|
|
|
+ position: absolute;
|
|
|
+ top: 28px;
|
|
|
+ left: 185px;
|
|
|
+}
|
|
|
+.fontSize {
|
|
|
+ color: #333333;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
>>> :focus{outline:0;}
|
|
|
-.integration-num {
|
|
|
- margin: 5px 30px;
|
|
|
+>>>.el-table::before {
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 0px;
|
|
|
}
|
|
|
|
|
|
.div_priority {
|
|
@@ -251,7 +297,6 @@ export default {
|
|
|
left: 50%;
|
|
|
overflow: hidden;
|
|
|
margin: 0;
|
|
|
- // box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
|
|
}
|
|
|
>>>.el-drawer__container {
|
|
|
left: 0;
|