|
@@ -38,7 +38,10 @@
|
|
|
P0:<span class="p0" @click.stop="query({row: scope.row, column: {property: otherColumns.p0.headerKey}}, 2)">{{ scope.row[otherColumns.p0.headerKey].value }}</span>
|
|
|
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" @click.stop="query(scope, itemIndex + 3)" v-html="scope.row[item.headerKey].value" />
|
|
|
+ <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>%</span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -205,6 +208,9 @@ export default {
|
|
|
if (elm.name === '新增缺陷总数') {
|
|
|
elm.name = '新增缺陷:总数|P0|P1'
|
|
|
}
|
|
|
+ if (elm.name === 'P0&P1 24小时过夜率') {
|
|
|
+ elm.name = 'P0&P1 过夜率'
|
|
|
+ }
|
|
|
if (elm.name === '新增P0缺陷' || elm.name === '新增P1缺陷') {
|
|
|
return false
|
|
|
}
|
|
@@ -274,70 +280,73 @@ export default {
|
|
|
const index = lIndex - 1 || 0
|
|
|
console.log(row, column, index, row[column.property])
|
|
|
const data = row[column.property]
|
|
|
- // 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)
|
|
|
+ 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)
|
|
|
if (item.priority < 2) {
|
|
|
- s.push(item.id)
|
|
|
+ k.push(item.id)
|
|
|
}
|
|
|
if (item.priority > 1) {
|
|
|
- d.push(item.id)
|
|
|
+ l.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)
|
|
|
- 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
|
|
|
+ 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) {
|
|
@@ -360,7 +369,7 @@ export default {
|
|
|
},
|
|
|
/* E 分页 */
|
|
|
setList(data, index) {
|
|
|
- if (data.reportBugs[0]) {
|
|
|
+ if (data.reportBugs.length) {
|
|
|
const [q, w, e, r, t] = [[], [], [], [], []]
|
|
|
data.reportBugs.forEach(item => {
|
|
|
q.push(item.id) // 全部
|
|
@@ -412,5 +421,12 @@ export default {
|
|
|
min-height: 23px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+ .fontWeight {
|
|
|
+ color: #333;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ .query-colors {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|