Commit 1fc9b7c6 authored by Wallen姚文辉's avatar Wallen姚文辉

添加bug严重程度字段

parent ad1399f0
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.a3e09a14.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.1eedf6d0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.075fdd90.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.1eedf6d0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -94,7 +94,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -94,7 +94,7 @@ router.beforeEach(async (to, from, next) => {
if (localStorage.getItem('token')) { if (localStorage.getItem('token')) {
let userinfo = localStorage.getItem("userinfo") let userinfo = localStorage.getItem("userinfo")
if (!userinfo) { if (!userinfo) {
result = await axios[method]("user/userdetail", 'get') result = await axios.get("user/userdetail", 'get')
userinfo = res.data.data userinfo = res.data.data
} else { } else {
userinfo = JSON.parse(userinfo) userinfo = JSON.parse(userinfo)
......
...@@ -152,6 +152,11 @@ ...@@ -152,6 +152,11 @@
{{ priorityMap[row.priorityId] }} {{ priorityMap[row.priorityId] }}
</p> </p>
</template> </template>
<template #Severity="{ row, index }">
<p>
{{ row.Severity }}
</p>
</template>
<template #status="{ row, index }"> <template #status="{ row, index }">
<p> <p>
{{ statusMap[row.statusId] }} {{ statusMap[row.statusId] }}
...@@ -176,6 +181,8 @@ ...@@ -176,6 +181,8 @@
<v-chart :option="bug_p_column" style="height: 300px"></v-chart></Col> <v-chart :option="bug_p_column" style="height: 300px"></v-chart></Col>
</Row> </Row>
<Row> <Row>
<Col justify="center" :span="12">
<v-chart :option="bug_s_column" style="height: 300px"></v-chart></Col>
<!-- <Col justify="center" :span="12"> <!-- <Col justify="center" :span="12">
<v-chart :option="case_s_column" style="height: 300px"></v-chart></Col> --> <v-chart :option="case_s_column" style="height: 300px"></v-chart></Col> -->
<Col :span="12"> <Col :span="12">
...@@ -233,6 +240,34 @@ export default { ...@@ -233,6 +240,34 @@ export default {
} }
} }
] ]
}, bug_s_column: {
title: {
text: 'bug严重程度占比',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}, },
mycase: [], mycase: [],
report: false, report: false,
...@@ -377,6 +412,10 @@ export default { ...@@ -377,6 +412,10 @@ export default {
title: '优先级', title: '优先级',
slot: 'priority' slot: 'priority'
}, },
{
title: '严重程度',
slot: 'Severity'
},
{ {
title: '状态', title: '状态',
slot: 'status' slot: 'status'
...@@ -515,16 +554,19 @@ export default { ...@@ -515,16 +554,19 @@ export default {
bug: { bug: {
handler(value) { handler(value) {
this.bug_p_column.series[0].data = [] this.bug_p_column.series[0].data = []
this.bug_s_column.series[0].data = []
this.bug_create_column.xAxis.data = [] this.bug_create_column.xAxis.data = []
this.bug_create_column.series[0].data = [] this.bug_create_column.series[0].data = []
this.bug_user_column.xAxis.data = [] this.bug_user_column.xAxis.data = []
this.bug_user_column.series[0].data = [] this.bug_user_column.series[0].data = []
if (value) { if (value) {
var pinfo = {} var pinfo = {}
var sinfo = {}
var dateinfo = {} var dateinfo = {}
var bugUser = {} var bugUser = {}
value.forEach(ele => { value.forEach(ele => {
ele.priorityId in pinfo ? pinfo[ele.priorityId]++ : pinfo[ele.priorityId] = 1 ele.priorityId in pinfo ? pinfo[ele.priorityId]++ : pinfo[ele.priorityId] = 1
ele.Severity in sinfo ? sinfo[ele.Severity]++ : sinfo[ele.Severity] = 1
// let date = ele.extraFields[1].html.split(' ')[0] || '' // let date = ele.extraFields[1].html.split(' ')[0] || ''
const index = ele.extraFields.findIndex(ele => { return ele.id == "created" }) const index = ele.extraFields.findIndex(ele => { return ele.id == "created" })
let date = index != -1 ? ele.extraFields[index].html.split(' ')[0] : 0 let date = index != -1 ? ele.extraFields[index].html.split(' ')[0] : 0
...@@ -535,6 +577,10 @@ export default { ...@@ -535,6 +577,10 @@ export default {
this.bug_p_column.series[0].data.push({ value: pinfo[i], name: this.priorityMap[i] }) this.bug_p_column.series[0].data.push({ value: pinfo[i], name: this.priorityMap[i] })
} }
for (var i in sinfo) {
this.bug_s_column.series[0].data.push({ value: sinfo[i], name: i })
}
for (var i in dateinfo) { for (var i in dateinfo) {
this.bug_create_column.xAxis.data.push(i) this.bug_create_column.xAxis.data.push(i)
this.bug_create_column.series[0].data.push(dateinfo[i]) this.bug_create_column.series[0].data.push(dateinfo[i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment