|
|
@@ -13,6 +13,7 @@
|
|
|
<el-table
|
|
|
:data="state.tableData"
|
|
|
border
|
|
|
+ stripe
|
|
|
row-key="questionId"
|
|
|
max-height="700"
|
|
|
:span-method="SpanMethod"
|
|
|
@@ -195,7 +196,7 @@ const GetErrorQuestionAnalysis = async () => {
|
|
|
const res: any = await errorQuestionAnalysis({
|
|
|
...(analysisStore.filterObject as any),
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
if (res.code === 200) {
|
|
|
const allTableData = res.data || [];
|
|
|
state.tableData = [];
|
|
|
@@ -206,7 +207,7 @@ const GetErrorQuestionAnalysis = async () => {
|
|
|
return item.className == analysisStore.filterObject.classGroupName;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
if (tableData?.length) {
|
|
|
tableData[0].questionStatsList.forEach((item: any, key: number) => {
|
|
|
const answerListLen = item?.answerList?.length || 0;
|
|
|
@@ -286,7 +287,12 @@ const ErrorTableRowClassName = ({ row, rowIndex }: any) => {
|
|
|
};
|
|
|
|
|
|
// 设置单元格样式
|
|
|
-const ErrorTableCellClassName = ({ row, column, rowIndex, columnIndex }: any) => {
|
|
|
+const ErrorTableCellClassName = ({
|
|
|
+ row,
|
|
|
+ column,
|
|
|
+ rowIndex,
|
|
|
+ columnIndex,
|
|
|
+}: any) => {
|
|
|
if (column.property == "registrationCodeList") {
|
|
|
return "white_space_normal";
|
|
|
} else {
|
|
|
@@ -298,7 +304,7 @@ const ErrorTableCellClassName = ({ row, column, rowIndex, columnIndex }: any) =>
|
|
|
const ExportExcel = () => {
|
|
|
// 1. 设置加载状态
|
|
|
reportModuleRef.value?.SetExportLoading?.(true);
|
|
|
-
|
|
|
+
|
|
|
// 2. 参数
|
|
|
const examName = getExamName.value;
|
|
|
let params: any = {
|
|
|
@@ -306,16 +312,16 @@ const ExportExcel = () => {
|
|
|
examName: examName, // 考试名称
|
|
|
sheetName: "错题分析表", // sheet页名称
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
const staticHeader: any[] = errorQuestionDataStaticHeaderData();
|
|
|
const childHeader = ["name", "rate", "studentNum", "registrationCodeList"];
|
|
|
const childHeaderData: any[] = errorQuestionDataChildHeaderData(childHeader);
|
|
|
const staticHeaderData = [...staticHeader, ...childHeaderData];
|
|
|
-
|
|
|
+
|
|
|
params.staticHeaderData = staticHeaderData;
|
|
|
params.childHeaderData = [];
|
|
|
params.dynamicsHeaderData = [];
|
|
|
-
|
|
|
+
|
|
|
let dataList: any[] = [];
|
|
|
state.tableData.forEach((item) => {
|
|
|
const rowData: any[] = [];
|
|
|
@@ -329,10 +335,10 @@ const ExportExcel = () => {
|
|
|
});
|
|
|
dataList.push(rowData);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
params.dataList = dataList;
|
|
|
params.mergeColumn = staticHeader.length - 1; // 合并的列
|
|
|
-
|
|
|
+
|
|
|
// 3. 调用通用下载方法,并在完成后重置加载状态
|
|
|
downloadExcel(exportErrorQuestion, params).finally(() => {
|
|
|
reportModuleRef.value?.SetExportLoading?.(false);
|
|
|
@@ -361,7 +367,7 @@ watch(
|
|
|
async () => {
|
|
|
pageInit();
|
|
|
},
|
|
|
- { deep: true }
|
|
|
+ { deep: true },
|
|
|
);
|
|
|
|
|
|
onMounted(() => {
|
|
|
@@ -375,10 +381,6 @@ onMounted(() => {
|
|
|
.el-table__header {
|
|
|
.is-group {
|
|
|
tr {
|
|
|
- th.el-table__cell:nth-last-child(3) {
|
|
|
- border-right: 1px solid #ebeef5;
|
|
|
- }
|
|
|
-
|
|
|
&:nth-child(2) {
|
|
|
display: none;
|
|
|
}
|
|
|
@@ -424,7 +426,7 @@ onMounted(() => {
|
|
|
background: #fafafa;
|
|
|
}
|
|
|
|
|
|
- &.el-table--enable-row-hover .el-table__body tr.row_color_FFFFFF:hover > td {
|
|
|
+ &.el-table--enable-row-hover .el-table__body tr.row_color_FFFFFF > td {
|
|
|
background-color: transparent !important;
|
|
|
}
|
|
|
}
|