|
@@ -46,12 +46,14 @@ import echarts from 'echarts'
|
|
import { bugGetReportOutSumData, bugGetReportNotResolveData, bugGetReportDisDataByMember, bugGetReportDisDataByPri, bugGetReportDisDataByDate } from '@/api/reportTemplate' // 模版添删改查
|
|
import { bugGetReportOutSumData, bugGetReportNotResolveData, bugGetReportDisDataByMember, bugGetReportDisDataByPri, bugGetReportDisDataByDate } from '@/api/reportTemplate' // 模版添删改查
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
- taskIds: { type: [Array, Object], default: null }
|
|
|
|
|
|
+ taskIds: { type: [Array, Object], default: null },
|
|
|
|
+ releaseType: { type: Boolean, default: false }
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
bugTableData: [],
|
|
bugTableData: [],
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
+ types: false,
|
|
taskId: [] // 创建准出的任务
|
|
taskId: [] // 创建准出的任务
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -69,6 +71,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
immediate: true
|
|
immediate: true
|
|
|
|
+ },
|
|
|
|
+ releaseType: {
|
|
|
|
+ handler(newV) {
|
|
|
|
+ this.types = newV
|
|
|
|
+ },
|
|
|
|
+ immediate: true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -128,70 +136,103 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
async getRouterData(val) {
|
|
async getRouterData(val) {
|
|
- const res = await bugGetReportOutSumData({ taskIds: val })
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.bugTableData = [res.data]
|
|
|
|
- }
|
|
|
|
- const res1 = await bugGetReportNotResolveData({ taskIds: val })
|
|
|
|
- if (res1.code === 200) {
|
|
|
|
- this.tableData = res1.dada
|
|
|
|
- }
|
|
|
|
- const res6 = await bugGetReportDisDataByDate({ taskIds: val })
|
|
|
|
- if (res6.code === 200) {
|
|
|
|
- const data = res6.data.yaxis.map(item => ({
|
|
|
|
- ...item,
|
|
|
|
- type: 'line',
|
|
|
|
- smooth: true
|
|
|
|
- }))
|
|
|
|
|
|
+ if (this.types) {
|
|
|
|
+ const res = await bugGetReportOutSumData({ taskIds: val })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.bugTableData = [res.data]
|
|
|
|
+ }
|
|
|
|
+ const res1 = await bugGetReportNotResolveData({ taskIds: val })
|
|
|
|
+ if (res1.code === 200) {
|
|
|
|
+ this.tableData = res1.dada
|
|
|
|
+ }
|
|
|
|
+ const res6 = await bugGetReportDisDataByDate({ taskIds: val })
|
|
|
|
+ if (res6.code === 200) {
|
|
|
|
+ const data = res6.data.yaxis.map(item => ({
|
|
|
|
+ ...item,
|
|
|
|
+ type: 'line',
|
|
|
|
+ smooth: true
|
|
|
|
+ }))
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ echarts.init(document.getElementById('line-echarts')).setOption({
|
|
|
|
+ color: ['#409EFF'],
|
|
|
|
+ title: { text: '新增缺陷趋势图', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
|
|
+ tooltip: { axisPointer: { type: 'shadow' }},
|
|
|
|
+ grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
|
|
+ xAxis: [{ type: 'category', data: res6.data.xaxis === null ? ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期七'] : res6.data.xaxis, axisTick: { alignWithLabel: true }}],
|
|
|
|
+ yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
|
|
+ series: res6.data.yaxis[0].data <= 0 ? [{ name: '直接访问', type: 'line', smooth: true, data: [0, 0, 0, 0, 0, 0, 0] }] : data
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }, 200)
|
|
|
|
+ }
|
|
|
|
+ const res2 = await bugGetReportDisDataByMember({ taskIds: val })
|
|
|
|
+ if (res2.code === 200) {
|
|
|
|
+ const data = res2.data.yaxis.map(item => ({
|
|
|
|
+ ...item,
|
|
|
|
+ type: 'bar',
|
|
|
|
+ barWidth: '20px'
|
|
|
|
+ }))
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ echarts.init(document.getElementById('lineShow')).setOption({
|
|
|
|
+ color: ['#409EFF'],
|
|
|
|
+ title: { text: '缺陷责任人分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
|
|
+ tooltip: { axisPointer: { type: 'shadow' }},
|
|
|
|
+ grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
|
|
+ xAxis: [{ type: 'category', data: res2.data.xaxis[0] ? res2.data.xaxis : ['P0', 'P1', 'P2', 'P3'], axisTick: { alignWithLabel: true }}],
|
|
|
|
+ yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
|
|
+ series: res2.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
|
|
|
|
+ })
|
|
|
|
+ }, 200)
|
|
|
|
+ }
|
|
|
|
+ const res3 = await bugGetReportDisDataByPri({ taskIds: val })
|
|
|
|
+ if (res3.code === 200) {
|
|
|
|
+ const data = res3.data.yaxis.map(item => ({
|
|
|
|
+ ...item,
|
|
|
|
+ type: 'bar',
|
|
|
|
+ barWidth: '20px'
|
|
|
|
+ }))
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ echarts.init(document.getElementById('barShow')).setOption({
|
|
|
|
+ backgroundColor: '#FFF',
|
|
|
|
+ color: ['#409EFF'],
|
|
|
|
+ title: { text: '缺陷等级分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
|
|
+ tooltip: { axisPointer: { type: 'shadow' }},
|
|
|
|
+ grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
|
|
+ xAxis: [{ type: 'category', data: res3.data.xaxis, axisTick: { alignWithLabel: true }}],
|
|
|
|
+ yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
|
|
+ series: res3.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
|
|
|
|
+ })
|
|
|
|
+ }, 200)
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
echarts.init(document.getElementById('line-echarts')).setOption({
|
|
echarts.init(document.getElementById('line-echarts')).setOption({
|
|
color: ['#409EFF'],
|
|
color: ['#409EFF'],
|
|
title: { text: '新增缺陷趋势图', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
title: { text: '新增缺陷趋势图', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
- xAxis: [{ type: 'category', data: res6.data.xaxis === null ? ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期七'] : res6.data.xaxis, axisTick: { alignWithLabel: true }}],
|
|
|
|
|
|
+ xAxis: [{ type: 'category', data: ['未知', '未知', '未知', '未知', '未知', '未知', '未知'], axisTick: { alignWithLabel: true }}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
- series: res6.data.yaxis[0].data <= 0 ? [{ name: '直接访问', type: 'line', smooth: true, data: [0, 0, 0, 0, 0, 0, 0] }] : data
|
|
|
|
-
|
|
|
|
|
|
+ series: [{ name: '直接访问', type: 'line', smooth: true, data: [0, 0, 0, 0, 0, 0, 0] }]
|
|
})
|
|
})
|
|
- }, 200)
|
|
|
|
- }
|
|
|
|
- const res2 = await bugGetReportDisDataByMember({ taskIds: val })
|
|
|
|
- if (res2.code === 200) {
|
|
|
|
- const data = res2.data.yaxis.map(item => ({
|
|
|
|
- ...item,
|
|
|
|
- type: 'bar',
|
|
|
|
- barWidth: '20px'
|
|
|
|
- }))
|
|
|
|
- setTimeout(() => {
|
|
|
|
echarts.init(document.getElementById('lineShow')).setOption({
|
|
echarts.init(document.getElementById('lineShow')).setOption({
|
|
color: ['#409EFF'],
|
|
color: ['#409EFF'],
|
|
title: { text: '缺陷责任人分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
title: { text: '缺陷责任人分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
- xAxis: [{ type: 'category', data: res2.data.xaxis[0] ? res2.data.xaxis : ['P0', 'P1', 'P2', 'P3'], axisTick: { alignWithLabel: true }}],
|
|
|
|
|
|
+ xAxis: [{ type: 'category', data: ['未知', '未知', '未知', '未知'], axisTick: { alignWithLabel: true }}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
- series: res2.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
|
|
|
|
|
|
+ series: [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }]
|
|
})
|
|
})
|
|
- }, 200)
|
|
|
|
- }
|
|
|
|
- const res3 = await bugGetReportDisDataByPri({ taskIds: val })
|
|
|
|
- if (res3.code === 200) {
|
|
|
|
- const data = res3.data.yaxis.map(item => ({
|
|
|
|
- ...item,
|
|
|
|
- type: 'bar',
|
|
|
|
- barWidth: '20px'
|
|
|
|
- }))
|
|
|
|
- setTimeout(() => {
|
|
|
|
echarts.init(document.getElementById('barShow')).setOption({
|
|
echarts.init(document.getElementById('barShow')).setOption({
|
|
backgroundColor: '#FFF',
|
|
backgroundColor: '#FFF',
|
|
color: ['#409EFF'],
|
|
color: ['#409EFF'],
|
|
title: { text: '缺陷等级分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
title: { text: '缺陷等级分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
tooltip: { axisPointer: { type: 'shadow' }},
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
|
|
- xAxis: [{ type: 'category', data: res3.data.xaxis, axisTick: { alignWithLabel: true }}],
|
|
|
|
|
|
+ xAxis: [{ type: 'category', data: ['未知', '未知', '未知', '未知'], axisTick: { alignWithLabel: true }}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
|
|
- series: res3.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
|
|
|
|
|
|
+ series: [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }]
|
|
})
|
|
})
|
|
}, 200)
|
|
}, 200)
|
|
}
|
|
}
|