Jelajahi Sumber

成绩查询样式修改

liurongli 1 bulan lalu
induk
melakukan
1296cc6dc9

+ 12 - 10
src/components/ReportModule.vue

@@ -52,14 +52,14 @@
       <!-- 表格分页 -->
       <div
         class="page_pagination"
-        v-if="tableOrChart == 'table' && showTablePage && total > pageSize"
+        v-if="tableOrChart == 'table' && showTablePage"
       >
         <el-pagination
           background
           :current-page="currentPage"
           :page-size="pageSize"
           :page-sizes="pageSizes"
-          layout="total,sizes,prev,pager,next"
+          :layout="total > pageSize ? 'total,sizes,prev,pager,next' : 'total,sizes'"
           :total="total"
           @size-change="ChangePageSize"
           @current-change="ChangeCurrentPage"
@@ -202,18 +202,19 @@ defineExpose({
     padding: 20px 20px 10px;
     box-sizing: border-box;
     margin: auto;
-    font-weight: 600;
-    font-size: 16px;
-    color: #333333;
-    text-align: left;
-    line-height: 36px;
     display: flex;
+    align-items: center;
     justify-content: space-between;
 
     .title_left {
       display: inline-flex;
       align-items: center;
       flex-wrap: wrap;
+      font-weight: 600;
+      font-size: 16px;
+      color: #333333;
+      text-align: left;
+      line-height: 36px;
 
       .span_item {
         font-weight: 400;
@@ -234,7 +235,7 @@ defineExpose({
       justify-content: flex-end;
       align-items: center;
       gap: 10px;
-      :deep(.el-button){
+      :deep(.el-button) {
         span {
           display: flex;
           align-items: center;
@@ -272,7 +273,8 @@ defineExpose({
           color: #666;
         }
       }
-      :deep(.button_set_header) {//设置表头
+      :deep(.button_set_header) {
+        //设置表头
         font-size: 14px;
         color: #2e64fa;
         border: 1px solid #2e64fa;
@@ -284,7 +286,7 @@ defineExpose({
         font-weight: 400;
         cursor: pointer;
         height: 30px;
-        line-height: 32px;
+        line-height: 30px;
         margin-right: 5px;
         border-bottom: 2px solid #ffffff;
         &.no_border {

+ 1 - 1
src/components/echarts/lineBarChart.vue

@@ -443,7 +443,7 @@ onBeforeUnmount(() => {
     .echart_type {
         position: absolute;
         right: 0;
-        top: 3px;
+        top: 8px;
         z-index: 7;
         display: flex;
         justify-content: flex-end;

+ 17 - 15
src/views/analysis/errorAnalysis.vue

@@ -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;
   }
 }

+ 2 - 0
src/views/analysis/levelDistribution.vue

@@ -752,6 +752,8 @@ onMounted(() => {
   font-weight: 400;
   font-size: 14px;
   color: #333333;
+  display: flex;
+  align-items: center;
 
   :deep(.el-input) {
     padding: 0 5px;

+ 1 - 2
src/views/analysis/optionDetail.vue

@@ -371,8 +371,7 @@ const TableScrollTop = () => {
 const SetTableHeight = () => {
   const container = document.getElementsByClassName("report_content")?.[0];
   if (container) {
-    const gap = state.pageInfo.total > state.pageInfo.pageSize ? 152 : 100;
-    state.tableHeight = container.clientHeight - gap;
+    state.tableHeight = container.clientHeight - 152;
   }
 };
 // 窗口大小改变事件

+ 1 - 2
src/views/analysis/score.vue

@@ -410,8 +410,7 @@ const TableScrollTop = () => {
 const SetTableHeight = () => {
   const container = document.getElementsByClassName("report_content")?.[0];
   if (container) {
-    const gap = state.pageInfo.total > state.pageInfo.pageSize ? 152 : 102;
-    state.tableHeight = container.clientHeight - gap;
+    state.tableHeight = container.clientHeight - 152;
   }
 };
 // 窗口大小改变事件