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

View File

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