diff --git a/src/views/device/summaryReport/index.vue b/src/views/device/summaryReport/index.vue index 30bb251..5d516f5 100644 --- a/src/views/device/summaryReport/index.vue +++ b/src/views/device/summaryReport/index.vue @@ -64,8 +64,22 @@ - - + + + + + @@ -81,157 +95,259 @@ @@ -350,189 +466,201 @@ export default { ) { var str = this.matchList[j].orderEnd.substr(8); if (str == "01") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].one = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].one = this.matchList[j].detailReach; } } else if (str == "02") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].two = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].two = this.matchList[j].detailReach; } } else if (str == "03") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].three = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].three = this.matchList[j].detailReach; } } else if (str == "04") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].four = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].four = this.matchList[j].detailReach; } } else if (str == "05") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].five = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].five = this.matchList[j].detailReach; } } else if (str == "06") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].six = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].six = this.matchList[j].detailReach; } } else if (str == "07") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].seven = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].seven = this.matchList[j].detailReach; } } else if (str == "08") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eight = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eight = this.matchList[j].detailReach; } } else if (str == "09") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].nine = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].nine = this.matchList[j].detailReach; } } else if (str == "10") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].ten = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].ten = this.matchList[j].detailReach; } } else if (str == "11") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eleven = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eleven = this.matchList[j].detailReach; } } else if (str == "12") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twelve = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twelve = this.matchList[j].detailReach; } } else if (str == "13") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirteen = this.matchList[j].detailReach; } } else if (str == "14") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].fourteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].fourteen = this.matchList[j].detailReach; } } else if (str == "15") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].fifteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].fifteen = this.matchList[j].detailReach; } } else if (str == "16") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].sixteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].sixteen = this.matchList[j].detailReach; } } else if (str == "17") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].seventeen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].seventeen = this.matchList[j].detailReach; } } else if (str == "18") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eighteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eighteen = this.matchList[j].detailReach; } } else if (str == "19") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].nineteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].nineteen = this.matchList[j].detailReach; } } else if (str == "20") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twenty = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twenty = this.matchList[j].detailReach; } } else if (str == "21") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentyOne = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentyOne = this.matchList[j].detailReach; } } else if (str == "22") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentyTwo = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentyTwo = this.matchList[j].detailReach; } } else if (str == "23") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyThree = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyThree = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyThree = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyThree = + this.matchList[j].detailReach; } } else if (str == "24") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyFour = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyFour = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyFour = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyFour = + this.matchList[j].detailReach; } } else if (str == "25") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyFive = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyFive = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyFive = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyFive = + this.matchList[j].detailReach; } } else if (str == "26") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentySix = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentySix = this.matchList[j].detailReach; } } else if (str == "27") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentySeven = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentySeven = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentySeven = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentySeven = + this.matchList[j].detailReach; } } else if (str == "28") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyEight = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyEight = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyEight = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyEight = + this.matchList[j].detailReach; } } else if (str == "29") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyNine = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyNine = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyNine = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyNine = + this.matchList[j].detailReach; } } else if (str == "30") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirty = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirty = this.matchList[j].detailReach; } } else if (str == "31") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirtyOne = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirtyOne = this.matchList[j].detailReach; } } @@ -601,57 +729,57 @@ export default { this.$refs.itemSelect.showFlag = true; }, - objectSpanMethod({ row, column, rowIndex, columnIndex }) { - if (columnIndex === 0) { - // 获取当前单元格的值 - const currentValue = row[column.property]; - // 获取上一行相同列的值 - const preRow = this.checkList[rowIndex - 1]; - const preValue = preRow ? preRow[column.property] : null; - // 如果当前值和上一行的值相同,则将当前单元格隐藏 - if (currentValue === preValue) { - return { rowspan: 0, colspan: 0 }; - } else { - // 否则计算当前单元格应该跨越多少行 - let rowspan = 1; - for (let i = rowIndex + 1; i < this.checkList.length; i++) { - const nextRow = this.checkList[i]; - const nextValue = nextRow[column.property]; - if (nextValue === currentValue) { - rowspan++; - } else { - break; - } - } - return { rowspan, colspan: 1 }; - } - } + // objectSpanMethod({ row, column, rowIndex, columnIndex }) { + // if (columnIndex === 0) { + // // 获取当前单元格的值 + // const currentValue = row[column.property]; + // // 获取上一行相同列的值 + // const preRow = this.checkList[rowIndex - 1]; + // const preValue = preRow ? preRow[column.property] : null; + // // 如果当前值和上一行的值相同,则将当前单元格隐藏 + // if (currentValue === preValue) { + // return { rowspan: 0, colspan: 0 }; + // } else { + // // 否则计算当前单元格应该跨越多少行 + // let rowspan = 1; + // for (let i = rowIndex + 1; i < this.checkList.length; i++) { + // const nextRow = this.checkList[i]; + // const nextValue = nextRow[column.property]; + // if (nextValue === currentValue) { + // rowspan++; + // } else { + // break; + // } + // } + // return { rowspan, colspan: 1 }; + // } + // } - if (columnIndex === 1) { - // 获取当前单元格的值 - const currentValue = row[column.property]; - // 获取上一行相同列的值 - const preRow = this.checkList[rowIndex - 1]; - const preValue = preRow ? preRow[column.property] : null; - // 如果当前值和上一行的值相同,则将当前单元格隐藏 - if (currentValue === preValue) { - return { rowspan: 0, colspan: 0 }; - } else { - // 否则计算当前单元格应该跨越多少行 - let rowspan = 1; - for (let i = rowIndex + 1; i < this.checkList.length; i++) { - const nextRow = this.checkList[i]; - const nextValue = nextRow[column.property]; - if (nextValue === currentValue) { - rowspan++; - } else { - break; - } - } - return { rowspan, colspan: 1 }; - } - } - }, + // if (columnIndex === 1) { + // // 获取当前单元格的值 + // const currentValue = row[column.property]; + // // 获取上一行相同列的值 + // const preRow = this.checkList[rowIndex - 1]; + // const preValue = preRow ? preRow[column.property] : null; + // // 如果当前值和上一行的值相同,则将当前单元格隐藏 + // if (currentValue === preValue) { + // return { rowspan: 0, colspan: 0 }; + // } else { + // // 否则计算当前单元格应该跨越多少行 + // let rowspan = 1; + // for (let i = rowIndex + 1; i < this.checkList.length; i++) { + // const nextRow = this.checkList[i]; + // const nextValue = nextRow[column.property]; + // if (nextValue === currentValue) { + // rowspan++; + // } else { + // break; + // } + // } + // return { rowspan, colspan: 1 }; + // } + // } + // }, }, }; @@ -663,3 +791,4 @@ export default { } +