|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div v-if="tableData && tableData.length" v-loading="paging.loading" class="table-wrapper" @click.stop>
|
|
|
+ <div v-if="tableData" v-loading="paging.loading" class="table-wrapper" @click.stop>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
border
|
|
@@ -30,7 +30,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 团队多选 -->
|
|
|
<div v-if="item.displayType === 'Cascader'">
|
|
|
- <CascaderInfo :team-data="scope.row[item.headerKey].value" />
|
|
|
+ <CascaderInfo v-if="scope.row[item.headerKey] && scope.row[item.headerKey].value" :team-data="scope.row[item.headerKey].value" />
|
|
|
</div>
|
|
|
<div v-else class="edit-wrapper">
|
|
|
<span v-if="item.name === '新增缺陷:总数|P0|P1' && otherColumns.all && otherColumns.all.headerKey" class="other-item-wrapper" @click="print(scope.row, itemIndex)">
|
|
@@ -39,7 +39,7 @@
|
|
|
P1:<span class="p1" @click.stop="query({row: scope.row, column: {property: otherColumns.p1.headerKey}}, 3)">{{ scope.row[otherColumns.p1.headerKey].value }}</span>
|
|
|
</span>
|
|
|
<span v-else class="edit-cell" :class="{'query-colors':item.name === 'P0&P1 过夜率' && scope.row[item.headerKey].value > 30}" @click.stop="query(scope, itemIndex + 2)" v-html="scope.row[item.headerKey].value" />
|
|
|
- <span v-if="item.name === 'P0&P1 过夜率' && scope.row[item.headerKey].value > 0">
|
|
|
+ <span v-if="item.name === 'P0&P1 过夜率' && scope.row[item.headerKey].value !== '--'">
|
|
|
<span>%</span>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -278,75 +278,71 @@ export default {
|
|
|
// 半浮层逻辑
|
|
|
query({ row, column }, lIndex) {
|
|
|
const index = lIndex - 1 || 0
|
|
|
- console.log(row, column, index, row[column.property])
|
|
|
const data = row[column.property]
|
|
|
- console.log(data)
|
|
|
- if (true) {
|
|
|
- // return
|
|
|
- if (index <= 2) {
|
|
|
- const yaxis = this.setList(data, index)
|
|
|
- this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }
|
|
|
- } else if (index === 3) {
|
|
|
- const yaxis = this.setList(data, index)
|
|
|
- this.requireList = { toType: '缺陷', xaxis: this.bugPrioritys, title: '缺陷修复时长', yaxis: yaxis, dataIndex: 0 }
|
|
|
- } else if (index === 5) {
|
|
|
- const yaxis = data.reportBugs.map(item => {
|
|
|
- return item.id
|
|
|
- })
|
|
|
- this.requireList = { toType: '缺陷', title: '累计reopen', yaxis: yaxis, idList: yaxis }
|
|
|
- } else if (index === 4) {
|
|
|
- let [one, tow, three, four] = [[], [], [], []]
|
|
|
- const [a, s, d, f, g, h, j, k, l, z, x, c] = [[], [], [], [], [], [], [], [], []]
|
|
|
- if (data.reportBugs[0]) {
|
|
|
- data.reportBugs.map(item => {
|
|
|
- if (item.isRepaired && item.repairTime < 24) { // 24小时内修复
|
|
|
- f.push(item.id) // 全部
|
|
|
- if (item.priority < 2) {
|
|
|
- g.push(item.id)
|
|
|
- } // P0&P1
|
|
|
- if (item.priority > 1) {
|
|
|
- h.push(item.id)
|
|
|
- } // P1以上
|
|
|
- one = [f, g, h]
|
|
|
- }
|
|
|
- if (item.isRepaired && item.repairTime > 24) { // 修复时常超过24小时
|
|
|
- a.push(item.id)
|
|
|
- if (item.priority < 2) {
|
|
|
- s.push(item.id)
|
|
|
- }
|
|
|
- if (item.priority > 1) {
|
|
|
- d.push(item.id)
|
|
|
- }
|
|
|
- three = [a, s, d]
|
|
|
- }
|
|
|
- if (item.status === 0) { // 未修复
|
|
|
- z.push(item.id)
|
|
|
- if (item.priority < 2) { x.push(item.id) }
|
|
|
- if (item.priority > 1) { c.push(item.id) }
|
|
|
- four = [z, x, c]
|
|
|
- }
|
|
|
- j.push(item.id)
|
|
|
+ // return
|
|
|
+ if (index <= 2) {
|
|
|
+ const yaxis = this.setList(data, index)
|
|
|
+ this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }
|
|
|
+ } else if (index === 3) {
|
|
|
+ const yaxis = this.setList(data, index)
|
|
|
+ this.requireList = { toType: '缺陷', xaxis: this.bugPrioritys, title: '缺陷修复时长', yaxis: yaxis, dataIndex: 0 }
|
|
|
+ } else if (index === 5) {
|
|
|
+ const yaxis = data.reportBugs.map(item => {
|
|
|
+ return item.id
|
|
|
+ })
|
|
|
+ this.requireList = { toType: '缺陷', title: '累计reopen', yaxis: yaxis, idList: yaxis }
|
|
|
+ } else if (index === 4) {
|
|
|
+ let [one, tow, three, four] = [[], [], [], []]
|
|
|
+ const [a, s, d, f, g, h, j, k, l, z, x, c] = [[], [], [], [], [], [], [], [], []]
|
|
|
+ if (data.reportBugs[0]) {
|
|
|
+ data.reportBugs.map(item => {
|
|
|
+ if (item.isRepaired && item.repairTime < 24) { // 24小时内修复
|
|
|
+ f.push(item.id) // 全部
|
|
|
if (item.priority < 2) {
|
|
|
- k.push(item.id)
|
|
|
+ g.push(item.id)
|
|
|
+ } // P0&P1
|
|
|
+ if (item.priority > 1) {
|
|
|
+ h.push(item.id)
|
|
|
+ } // P1以上
|
|
|
+ one = [f, g, h]
|
|
|
+ }
|
|
|
+ if (item.isRepaired && item.repairTime > 24) { // 修复时常超过24小时
|
|
|
+ a.push(item.id)
|
|
|
+ if (item.priority < 2) {
|
|
|
+ s.push(item.id)
|
|
|
}
|
|
|
if (item.priority > 1) {
|
|
|
- l.push(item.id)
|
|
|
+ d.push(item.id)
|
|
|
}
|
|
|
- tow = [j, k, l]
|
|
|
- })
|
|
|
- }
|
|
|
- const yaxis = [tow, one, three, four]
|
|
|
- this.requireList = {
|
|
|
- toType: '缺陷',
|
|
|
- xaxis: this.bugHour,
|
|
|
- towTimeLine: this.bugPrioritys,
|
|
|
- title: '缺陷24小时修复',
|
|
|
- yaxis: yaxis,
|
|
|
- dataIndex: 1
|
|
|
- }
|
|
|
+ three = [a, s, d]
|
|
|
+ }
|
|
|
+ if (item.status === 0) { // 未修复
|
|
|
+ z.push(item.id)
|
|
|
+ if (item.priority < 2) { x.push(item.id) }
|
|
|
+ if (item.priority > 1) { c.push(item.id) }
|
|
|
+ four = [z, x, c]
|
|
|
+ }
|
|
|
+ j.push(item.id)
|
|
|
+ if (item.priority < 2) {
|
|
|
+ k.push(item.id)
|
|
|
+ }
|
|
|
+ if (item.priority > 1) {
|
|
|
+ l.push(item.id)
|
|
|
+ }
|
|
|
+ tow = [j, k, l]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const yaxis = [tow, one, three, four]
|
|
|
+ this.requireList = {
|
|
|
+ toType: '缺陷',
|
|
|
+ xaxis: this.bugHour,
|
|
|
+ towTimeLine: this.bugPrioritys,
|
|
|
+ title: '缺陷24小时修复',
|
|
|
+ yaxis: yaxis,
|
|
|
+ dataIndex: 1
|
|
|
}
|
|
|
- this.openDrawer = true
|
|
|
}
|
|
|
+ this.openDrawer = true
|
|
|
},
|
|
|
/* S 分页 */
|
|
|
handleSizeChange(value) {
|