2024-1-12-3 设备管理-汇总报表样式修改

master
A0010407 8 months ago
parent 34d983a6aa
commit a5a692b0e2

@ -64,8 +64,22 @@
</el-form-item>
</el-form>
<el-table :data="checkList" border :span-method="objectSpanMethod">
<el-table-column prop="itemTypeName" label="维护类型" width="100" fixed>
<!-- :span-method="objectSpanMethod" -->
<el-table
:data="checkList"
border
height="520"
>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column prop="itemTypeName" label="维护类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column>
@ -81,157 +95,259 @@
<el-table-column prop="head" label="责任人" width="70"> </el-table-column>
<el-table-column prop="one" label="1" width="40">
<template slot-scope="scope">
{{ scope.row.one == "1" ? "√" : scope.row.one == "0" ? "X" : ""}}
{{ scope.row.one == "1" ? "√" : scope.row.one == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="two" label="2" width="40">
<template slot-scope="scope">
{{ scope.row.two == "1" ? "√" : scope.row.two == "0" ? "X" : ""}}
{{ scope.row.two == "1" ? "√" : scope.row.two == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="three" label="3" width="40">
<template slot-scope="scope">
{{ scope.row.three == "1" ? "√" : scope.row.three == "0" ? "X" : ""}}
{{ scope.row.three == "1" ? "√" : scope.row.three == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="four" label="4" width="40">
<template slot-scope="scope">
{{ scope.row.four == "1" ? "√" : scope.row.four == "0" ? "X" : ""}}
{{ scope.row.four == "1" ? "√" : scope.row.four == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="five" label="5" width="40">
<template slot-scope="scope">
{{ scope.row.five == "1" ? "√" : scope.row.five == "0" ? "X" : ""}}
{{ scope.row.five == "1" ? "√" : scope.row.five == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="six" label="6" width="40">
<template slot-scope="scope">
{{ scope.row.six == "1" ? "√" : scope.row.six == "0" ? "X" : ""}}
{{ scope.row.six == "1" ? "√" : scope.row.six == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="seven" label="7" width="40">
<template slot-scope="scope">
{{ scope.row.seven == "1" ? "√" : scope.row.seven == "0" ? "X" : ""}}
{{ scope.row.seven == "1" ? "√" : scope.row.seven == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="eight" label="8" width="40">
<template slot-scope="scope">
{{ scope.row.eight == "1" ? "√" : scope.row.eight == "0" ? "X" : ""}}
{{ scope.row.eight == "1" ? "√" : scope.row.eight == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="nine" label="9" width="40">
<template slot-scope="scope">
{{ scope.row.nine == "1" ? "√" : scope.row.nine == "0" ? "X" : ""}}
{{ scope.row.nine == "1" ? "√" : scope.row.nine == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="ten" label="10" width="40">
<template slot-scope="scope">
{{ scope.row.ten == "1" ? "√" : scope.row.ten == "0" ? "X" : ""}}
{{ scope.row.ten == "1" ? "√" : scope.row.ten == "0" ? "X" : "" }}
</template>
</el-table-column>
<el-table-column prop="eleven" label="11" width="40">
<template slot-scope="scope">
{{ scope.row.eleven == "1" ? "√" : scope.row.eleven == "0" ? "X" : ""}}
{{
scope.row.eleven == "1" ? "√" : scope.row.eleven == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="twelve" label="12" width="40">
<template slot-scope="scope">
{{ scope.row.twelve == "1" ? "√" : scope.row.twelve == "0" ? "X" : ""}}
{{
scope.row.twelve == "1" ? "√" : scope.row.twelve == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="thirteen" label="13" width="40">
<template slot-scope="scope">
{{ scope.row.thirteen == "1" ? "√" : scope.row.thirteen == "0" ? "X" : ""}}
{{
scope.row.thirteen == "1"
? "√"
: scope.row.thirteen == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="fourteen" label="14" width="40">
<template slot-scope="scope">
{{ scope.row.fourteen == "1" ? "√" : scope.row.fourteen == "0" ? "X" : ""}}
{{
scope.row.fourteen == "1"
? "√"
: scope.row.fourteen == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="fifteen" label="15" width="40">
<template slot-scope="scope">
{{ scope.row.fifteen == "1" ? "√" : scope.row.fifteen == "0" ? "X" : ""}}
{{
scope.row.fifteen == "1" ? "√" : scope.row.fifteen == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="sixteen" label="16" width="40">
<template slot-scope="scope">
{{ scope.row.sixteen == "1" ? "√" : scope.row.sixteen == "0" ? "X" : ""}}
{{
scope.row.sixteen == "1" ? "√" : scope.row.sixteen == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="seventeen" label="17" width="40">
<template slot-scope="scope">
{{ scope.row.seventeen == "1" ? "√" : scope.row.seventeen == "0" ? "X" : ""}}
{{
scope.row.seventeen == "1"
? "√"
: scope.row.seventeen == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="eighteen" label="18" width="40">
<template slot-scope="scope">
{{ scope.row.eighteen == "1" ? "√" : scope.row.eighteen == "0" ? "X" : ""}}
{{
scope.row.eighteen == "1"
? "√"
: scope.row.eighteen == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="nineteen" label="19" width="40">
<template slot-scope="scope">
{{ scope.row.nineteen == "1" ? "√" : scope.row.nineteen == "0" ? "X" : ""}}
{{
scope.row.nineteen == "1"
? "√"
: scope.row.nineteen == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twenty" label="20" width="40">
<template slot-scope="scope">
{{ scope.row.twenty == "1" ? "√" : scope.row.twenty == "0" ? "X" : ""}}
{{
scope.row.twenty == "1" ? "√" : scope.row.twenty == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyOne" label="21" width="40">
<template slot-scope="scope">
{{ scope.row.twentyOne == "1" ? "√" : scope.row.twentyOne == "0" ? "X" : ""}}
{{
scope.row.twentyOne == "1"
? "√"
: scope.row.twentyOne == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyTwo" label="22" width="40">
<template slot-scope="scope">
{{ scope.row.twentyTwo == "1" ? "√" : scope.row.twentyTwo == "0" ? "X" : ""}}
{{
scope.row.twentyTwo == "1"
? "√"
: scope.row.twentyTwo == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyThree" label="23" width="40">
<template slot-scope="scope">
{{ scope.row.twentyThree == "1" ? "√" : scope.row.twentyThree == "0" ? "X" : ""}}
{{
scope.row.twentyThree == "1"
? "√"
: scope.row.twentyThree == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyFour" label="24" width="40">
<template slot-scope="scope">
{{ scope.row.twentyFour == "1" ? "√" : scope.row.twentyFour == "0" ? "X" : ""}}
{{
scope.row.twentyFour == "1"
? "√"
: scope.row.twentyFour == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyFive" label="30" width="40">
<template slot-scope="scope">
{{ scope.row.twentyFive == "1" ? "√" : scope.row.twentyFive == "0" ? "X" : ""}}
{{
scope.row.twentyFive == "1"
? "√"
: scope.row.twentyFive == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentySix" label="26" width="40">
<template slot-scope="scope">
{{ scope.row.twentySix == "1" ? "√" : scope.row.twentySix == "0" ? "X" : ""}}
{{
scope.row.twentySix == "1"
? "√"
: scope.row.twentySix == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentySeven" label="27" width="40">
<template slot-scope="scope">
{{ scope.row.twentySeven == "1" ? "√" : scope.row.twentySeven == "0" ? "X" : ""}}
{{
scope.row.twentySeven == "1"
? "√"
: scope.row.twentySeven == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyEight" label="28" width="40">
<template slot-scope="scope">
{{ scope.row.twentyEight == "1" ? "√" : scope.row.twentyEight == "0" ? "X" : ""}}
{{
scope.row.twentyEight == "1"
? "√"
: scope.row.twentyEight == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="twentyNine" label="29" width="40">
<template slot-scope="scope">
{{ scope.row.twentyNine == "1" ? "√" : scope.row.twentyNine == "0" ? "X" : ""}}
{{
scope.row.twentyNine == "1"
? "√"
: scope.row.twentyNine == "0"
? "X"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="thirty" label="30" width="40">
<template slot-scope="scope">
{{ scope.row.thirty == "1" ? "√" : scope.row.thirty == "0" ? "X" : ""}}
{{
scope.row.thirty == "1" ? "√" : scope.row.thirty == "0" ? "X" : ""
}}
</template>
</el-table-column>
<el-table-column prop="thirtyOne" label="31" width="40">
<template slot-scope="scope">
{{ scope.row.thirtyOne == "1" ? "√" : scope.row.thirtyOne == "0" ? "X" : ""}}
{{
scope.row.thirtyOne == "1"
? "√"
: scope.row.thirtyOne == "0"
? "X"
: ""
}}
</template>
</el-table-column>
</el-table>
@ -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 };
// }
// }
// },
},
};
</script>
@ -663,3 +791,4 @@ export default {
}
</style>

Loading…
Cancel
Save