修改
This commit is contained in:
parent
59027f9213
commit
b4cd1b9b61
@ -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;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user