This commit is contained in:
曹辉 2022-11-22 11:02:34 +08:00
parent 59027f9213
commit b4cd1b9b61
2 changed files with 156 additions and 19 deletions

View File

@ -72,18 +72,34 @@
</el-table-column>
<el-table-column prop="itemScoreAll" label="综合得分" align="center">
</el-table-column>
<el-table-column
prop="rootCategoryScoreAll"
label="国民体质测定"
align="center"
>
</el-table-column>
<el-table-column
prop="nationalPhysiqueRank"
label="国民体质评价"
align="center"
>
</el-table-column>
<el-table-column
prop="syntheticalAssess"
label="综合评价"
align="center"
>
</el-table-column>
<el-table-column prop="remark" label="测试目的" align="center" show-overflow-tooltip>
<el-table-column
prop="remark"
label="测试目的"
align="center"
show-overflow-tooltip
>
</el-table-column>
</el-table>
</div>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
@ -117,6 +133,10 @@ export default {
position: 0, //
spanArr2: [],
position2: 0, //
spanArr3: [],
position3: 0, //
spanArr4: [],
position4: 0, //
//
queryParams: {
pageNum: 1,
@ -138,6 +158,10 @@ export default {
this.position = 0;
this.spanArr2.push(1);
this.position2 = 0;
this.spanArr3.push(1);
this.position3 = 0;
this.spanArr4.push(1);
this.position4 = 0;
} else {
// a
if (
@ -158,22 +182,45 @@ export default {
this.actionlist[index].itemScoreAll ==
this.actionlist[index - 1].itemScoreAll
) {
this.spanArr2[this.position] += 1;
this.spanArr2[this.position2] += 1;
this.spanArr2.push(0); // 0
} else {
this.spanArr2.push(1); // 1
this.position2 = index; //
}
if (
this.actionlist[index].rootCategoryScoreAll ==
this.actionlist[index - 1].rootCategoryScoreAll &&
this.actionlist[index].rootCategoryScoreAll ==
this.actionlist[index - 1].rootCategoryScoreAll
) {
this.spanArr3[this.position3] += 1;
this.spanArr3.push(0); // 0
} else {
this.spanArr3.push(1); // 1
this.position3 = index; //
}
if (
this.actionlist[index].nationalPhysiqueRank ==
this.actionlist[index - 1].nationalPhysiqueRank &&
this.actionlist[index].nationalPhysiqueRank ==
this.actionlist[index - 1].nationalPhysiqueRank
) {
this.spanArr4[this.position4] += 1;
this.spanArr4.push(0); // 0
} else {
this.spanArr4.push(1); // 1
this.position4 = index; //
}
}
});
// console.log(this.spanArr);
},
//
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(columnIndex);
// a
if (columnIndex == 0) {
// console.log(this.spanArr);
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
@ -182,7 +229,6 @@ export default {
};
}
if (columnIndex == 7) {
// console.log(this.spanArr2);
const _row = this.spanArr2[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
@ -190,14 +236,46 @@ export default {
colspan: _col,
};
}
if (columnIndex == 8) {
const _row = this.spanArr3[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
if (columnIndex == 9) {
const _row = this.spanArr4[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
},
//
listActioninfo() {
listAction(this.queryParams).then((res) => {
this.spanArr = [];
this.position = 0;
this.spanArr2 = [];
this.position2 = 0;
this.spanArr3 = [];
this.position3 = 0;
this.spanArr4 = [];
this.position4 = 0;
if (!res.rows || res.rows == "") {
this.itemshow2 = true;
this.itemshow = false;
} else {
// res.rows.forEach((e) => {
// if (e.rootCategoryScoreAll == null) {
// e.rootCategoryScoreAll = 0;
// }
// if (e.nationalPhysiqueRank == null) {
// e.nationalPhysiqueRank = 0;
// }
// });
// res.rows.itemCategoryList.forEach((e) => {
// e.push(res.rows.categoryName);
// });
@ -205,12 +283,11 @@ export default {
this.actionforeach();
this.itemshow = true;
this.itemshow2 = false;
console.log(this.actionlist);
// console.log(this.actionlist);
}
});
},
itemlists(studentId, batchCode) {
console.log(studentId, batchCode);
this.queryParams.studentId = studentId;
this.queryParams.batchCode = batchCode;
},

View File

@ -1089,6 +1089,18 @@
</el-table-column>
<el-table-column prop="itemScoreAll" label="综合得分" align="center">
</el-table-column>
<el-table-column
prop="rootCategoryScoreAll"
label="国民体质测定"
align="center"
>
</el-table-column>
<el-table-column
prop="nationalPhysiqueRank"
label="国民体质评价"
align="center"
>
</el-table-column>
<el-table-column
prop="syntheticalAssess"
label="综合评价"
@ -1192,6 +1204,11 @@ export default {
position: 0, //
spanArr2: [],
position2: 0, //
spanArr3: [],
position3: 0, //
spanArr4: [],
position4: 0, //
position2: 0, //
count: 0, //
};
},
@ -1224,7 +1241,6 @@ export default {
// },
// },
created() {
console.log(this.itemlists);
this.echartslist = {
studentId: this.itemlists.studentId,
batchCode: this.itemlists.batchCode,
@ -1564,16 +1580,16 @@ export default {
},
//action
actionforeach() {
this.spanArr = [];
this.position = 0; //
this.spanArr2 = [];
this.position2 = 0; //
this.actionlist.forEach((item, index) => {
if (index == 0) {
this.spanArr.push(1);
this.position = 0;
this.spanArr2.push(1);
this.position2 = 0;
this.spanArr3.push(1);
this.position3 = 0;
this.spanArr4.push(1);
this.position4 = 0;
} else {
// a
if (
@ -1594,22 +1610,41 @@ export default {
this.actionlist[index].itemScoreAll ==
this.actionlist[index - 1].itemScoreAll
) {
this.spanArr2[this.position] += 1;
this.spanArr2[this.position2] += 1;
this.spanArr2.push(0); // 0
} else {
this.spanArr2.push(1); // 1
this.position2 = index; //
}
if (
this.actionlist[index].rootCategoryScoreAll ==
this.actionlist[index - 1].rootCategoryScoreAll
) {
this.spanArr3[this.position3] += 1;
this.spanArr3.push(0); // 0
} else {
this.spanArr3.push(1); // 1
this.position3 = index; //
}
if (
this.actionlist[index].nationalPhysiqueRank ==
this.actionlist[index - 1].nationalPhysiqueRank
) {
this.spanArr4[this.position4] += 1;
this.spanArr4.push(0); // 0
} else {
this.spanArr4.push(1); // 1
this.position4 = index; //
}
}
});
// console.log(this.spanArr);
},
//
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(columnIndex);
// a
if (columnIndex == 0) {
// console.log(this.spanArr);
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
@ -1626,11 +1661,37 @@ export default {
colspan: _col,
};
}
if (columnIndex == 8) {
// console.log(this.spanArr2);
const _row = this.spanArr3[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
if (columnIndex == 9) {
// console.log(this.spanArr2);
const _row = this.spanArr4[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
},
//
listActioninfo() {
setTimeout(() => {
listAction(this.echartslist).then((res) => {
this.spanArr = [];
this.position = 0;
this.spanArr2 = [];
this.position2 = 0;
this.spanArr3 = [];
this.position3 = 0;
this.spanArr4 = [];
this.position4 = 0;
if (!res.rows || res.rows == "") {
} else {
// res.rows.itemCategoryList.forEach((e) => {
@ -1638,7 +1699,6 @@ export default {
// });
this.actionlist = res.rows;
this.actionforeach();
console.log(this.actionlist);
}
});
}, 300);