Browse Source

选择题bug修复

dengshaobo 4 weeks ago
parent
commit
5fd8d65678

+ 359 - 3
src/styles/common.scss

@@ -693,7 +693,7 @@ body {
             width: calc(50% - 22px);
             margin-right: 20px;
             margin-bottom: 30px;
-            height: 50px;
+            height: 70px;
             font-weight: 500;
             font-size: 14px;
             // color: #333333;
@@ -878,7 +878,7 @@ body {
             width: calc(50% - 22px);
             margin-right: 20px;
             margin-bottom: 20px;
-            height: 70px;
+            height: 80px;
             font-weight: 500;
             font-size: 16px;
             // color: #333333;
@@ -1096,7 +1096,7 @@ body {
                 display: flex;
                 justify-content: space-between;
                 align-items: center;
-                // height: 50px;
+                min-height: 50px;
                 // line-height: 60px;
 
                 // 未扫描
@@ -1229,6 +1229,362 @@ body {
           }
         }
       }
+
+      /* 当屏幕高度至少为900px时应用的样式  常见分辨率:2560x1440*/
+      @media screen and (min-height: 900px) and (max-height: 1200px) {
+        .scan_list {
+          width: calc(100% - 20px);
+          margin-left: 20px;
+          margin-top: 40px;
+          display: flex;
+          justify-content: flex-start;
+          flex-wrap: wrap;
+          // gap: 20px;
+
+          .list_item {
+            width: calc(50% - 22px);
+            height: clamp(80px, 12vh, 120px);
+            min-height: 80px;
+            max-height: 150px;
+            font-weight: 500;
+            font-size: clamp(14px, 1.5vw, 18px);
+            text-align: center;
+            background: #ffffff;
+            border-radius: 10px;
+            border: 1px solid #ebeef5;
+            cursor: pointer;
+            background-position: calc(100% - 10px) 10px;
+            background-repeat: no-repeat;
+            background-size: clamp(32px, 3.5vw, 40px) clamp(32px, 3.5vw, 40px);
+
+            .list_item_info {
+              width: calc(100% - 20px);
+              margin: auto;
+              height: 100%;
+              padding: 10px 0;
+
+              .item_info_title {
+                font-weight: 600;
+                font-size: clamp(14px, 1.5vw, 18px);
+                color: #333333;
+                padding-top: 10px;
+                text-align: left;
+              }
+
+              .item_info_number {
+                width: 100%;
+                position: relative;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                min-height: clamp(40px, 7vh, 60px);
+
+                .number_no_scan,
+                .number_no_exam,
+                .number_uploaded,
+                .number_abnormal {
+                  font-weight: 600;
+                  font-size: clamp(18px, 2.5vw, 24px);
+                }
+
+                .number_no_scan {
+                  color: #2e64fa;
+                }
+
+                .number_no_exam {
+                  color: #fb9f34;
+                }
+
+                .number_uploaded {
+                  color: #2bc644;
+                }
+
+                .number_abnormal {
+                  color: #f56c6c;
+                }
+
+                .number_no_icon {
+                  width: clamp(32px, 3.5vw, 40px);
+                  height: clamp(32px, 3.5vw, 40px);
+                  display: flex;
+                  justify-content: flex-start;
+                  margin-left: 20px;
+                  margin-top: 5px;
+                }
+              }
+            }
+          }
+
+          .no_hover {
+            pointer-events: none;
+          }
+
+          .no_scan {
+            background-image: url("../assets/icon/no_scan_icon.png");
+            border: 1px solid #2e64fa;
+
+            .item_info_title {
+              color: #2e64fa !important;
+            }
+          }
+
+          .no_scan:hover {
+            background-color: rgba(46, 100, 250, 0.1);
+            background-image: url("../assets/icon/no_scan_icon_hover.png");
+            border-radius: 10px;
+            border: 1px solid #2e64fa;
+            box-shadow: 4px 2px 10px #2e64fa;
+
+            .item_info_title {
+              color: #2e64fa !important;
+            }
+          }
+
+          .no_exam {
+            background-image: url("../assets/icon/miss_exam.png");
+            border: 1px solid #fb9f34;
+
+            .item_info_title {
+              color: #fb9f34 !important;
+            }
+          }
+
+          .no_exam:hover {
+            background-color: rgba(251, 159, 52, 0.1);
+            background-image: url("../assets/icon/miss_exam_hover.png");
+            border-radius: 10px;
+            border: 1px solid #fb9f34;
+            box-shadow: 4px 2px 10px #fb9f34;
+
+            .item_info_title {
+              color: #fb9f34 !important;
+            }
+          }
+
+          .annormal_icon {
+            background-image: url("../assets/icon/abnormal_icon.png");
+            border: 1px solid #f56c6c;
+
+            .item_info_title {
+              color: #f56c6c !important;
+            }
+          }
+
+          .annormal_icon:hover {
+            background-color: rgba(245, 108, 108, 0.1);
+            background-image: url("../assets/icon/abnormal_icon_hover.png");
+            border-radius: 10px;
+            border: 1px solid #f56c6c;
+            box-shadow: 4px 2px 10px #f56c6c;
+
+            .item_info_title {
+              color: #f56c6c !important;
+            }
+          }
+
+          .sucess_upload {
+            background-image: url("../assets/icon/sucess_upload.png");
+            border: 1px solid #2bc644;
+
+            .item_info_title {
+              color: #2bc644 !important;
+            }
+          }
+
+          .sucess_upload:hover {
+            background-color: rgba(43, 198, 68, 0.1);
+            background-image: url("../assets/icon/sucess_upload_hover.png");
+            border-radius: 10px;
+            border: 1px solid #2bc644;
+            box-shadow: 4px 2px 10px #2bc644;
+
+            .item_info_title {
+              color: #2bc644 !important;
+            }
+          }
+        }
+      }
+
+      /* 超高分辨率样式 常见分辨率:3840x2160 (4K), 高度>1440px */
+      @media screen and (min-height: 1200px) {
+        .scan_list {
+          width: calc(100% - 40px);
+          margin-left: 40px;
+          margin-top: 60px;
+          display: flex;
+          justify-content: flex-start;
+          flex-wrap: wrap;
+          // gap: 30px;
+
+          .list_item {
+            width: calc(50% - 15px);
+            height: clamp(100px, 15vh, 180px);
+            min-height: 100px;
+            max-height: 200px;
+            font-weight: 500;
+            font-size: clamp(16px, 2vw, 24px);
+            text-align: center;
+            background: #ffffff;
+            border-radius: 15px;
+            border: 2px solid #ebeef5;
+            cursor: pointer;
+            background-position: calc(100% - 15px) 15px;
+            background-repeat: no-repeat;
+            background-size: clamp(40px, 5vw, 60px) clamp(40px, 5vw, 60px);
+            transition: all 0.3s ease;
+
+            .list_item_info {
+              width: calc(100% - 30px);
+              margin: auto;
+              height: 100%;
+              padding: 15px 0;
+
+              .item_info_title {
+                font-weight: 600;
+                font-size: clamp(16px, 2vw, 24px);
+                color: #333333;
+                padding-top: 15px;
+                text-align: left;
+              }
+
+              .item_info_number {
+                width: 100%;
+                position: relative;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                min-height: clamp(50px, 8vh, 80px);
+
+                .number_no_scan,
+                .number_no_exam,
+                .number_uploaded,
+                .number_abnormal {
+                  font-weight: 600;
+                  font-size: clamp(22px, 3vw, 32px);
+                }
+
+                .number_no_scan {
+                  color: #2e64fa;
+                }
+
+                .number_no_exam {
+                  color: #fb9f34;
+                }
+
+                .number_uploaded {
+                  color: #2bc644;
+                }
+
+                .number_abnormal {
+                  color: #f56c6c;
+                }
+
+                .number_no_icon {
+                  width: clamp(40px, 5vw, 60px);
+                  height: clamp(40px, 5vw, 60px);
+                  display: flex;
+                  justify-content: flex-start;
+                  margin-left: 30px;
+                  margin-top: 10px;
+                }
+              }
+            }
+          }
+
+          .no_hover {
+            pointer-events: none;
+          }
+
+          .no_scan {
+            background-image: url("../assets/icon/no_scan_icon.png");
+            border: 2px solid #2e64fa;
+
+            .item_info_title {
+              color: #2e64fa !important;
+            }
+          }
+
+          .no_scan:hover {
+            background-color: rgba(46, 100, 250, 0.1);
+            background-image: url("../assets/icon/no_scan_icon_hover.png");
+            border-radius: 15px;
+            border: 2px solid #2e64fa;
+            box-shadow: 6px 4px 15px #2e64fa;
+            transform: translateY(-3px);
+
+            .item_info_title {
+              color: #2e64fa !important;
+            }
+          }
+
+          .no_exam {
+            background-image: url("../assets/icon/miss_exam.png");
+            border: 2px solid #fb9f34;
+
+            .item_info_title {
+              color: #fb9f34 !important;
+            }
+          }
+
+          .no_exam:hover {
+            background-color: rgba(251, 159, 52, 0.1);
+            background-image: url("../assets/icon/miss_exam_hover.png");
+            border-radius: 15px;
+            border: 2px solid #fb9f34;
+            box-shadow: 6px 4px 15px #fb9f34;
+            transform: translateY(-3px);
+
+            .item_info_title {
+              color: #fb9f34 !important;
+            }
+          }
+
+          .annormal_icon {
+            background-image: url("../assets/icon/abnormal_icon.png");
+            border: 2px solid #f56c6c;
+
+            .item_info_title {
+              color: #f56c6c !important;
+            }
+          }
+
+          .annormal_icon:hover {
+            background-color: rgba(245, 108, 108, 0.1);
+            background-image: url("../assets/icon/abnormal_icon_hover.png");
+            border-radius: 15px;
+            border: 2px solid #f56c6c;
+            box-shadow: 6px 4px 15px #f56c6c;
+            transform: translateY(-3px);
+
+            .item_info_title {
+              color: #f56c6c !important;
+            }
+          }
+
+          .sucess_upload {
+            background-image: url("../assets/icon/sucess_upload.png");
+            border: 2px solid #2bc644;
+
+            .item_info_title {
+              color: #2bc644 !important;
+            }
+          }
+
+          .sucess_upload:hover {
+            background-color: rgba(43, 198, 68, 0.1);
+            background-image: url("../assets/icon/sucess_upload_hover.png");
+            border-radius: 15px;
+            border: 2px solid #2bc644;
+            box-shadow: 6px 4px 15px #2bc644;
+            transform: translateY(-3px);
+
+            .item_info_title {
+              color: #2bc644 !important;
+            }
+          }
+        }
+      }
+
     }
 
     .right_button {

+ 1 - 1
src/views/exam/abnormal/abnormal.vue

@@ -394,7 +394,7 @@ const abnormalObj = ref({
 // 左侧导航/显示控制
 const isShowDraw = ref(false)      // 客观题是否显示画框
 const isShowDrawType = ref(1)    // 划分异常显示类型: 1-答题卡 2-划分区
-const isShowAbnormalQuestion = ref(false) // 是否只显示异常题
+const isShowAbnormalQuestion = ref(true) // 是否只显示异常题
 
 // 图片与Canvas相关 试卷图片相关数据
 const currentIndex= ref(0);//当前表格学生索引

+ 31 - 3
src/views/exam/abnormal/tableList.vue

@@ -106,7 +106,7 @@
                         <!-- 缺考 -->
                         <div class="table_row_option" v-if="scanState == 2">
                             <span class="el_button_editor"  @click="OptionView(scope.row)" v-if="scope.row.paperUrl">查看</span>
-                            <span class="option_button_editor"  @click="MarkToNormal(scope)">标记为正常</span>
+                            <span class="option_button_editor"  @click="MarkToNormal(scope.row)">标记为正常</span>
                         </div>
                         <!-- 已上传 -->
                         <div class="table_row_option" v-if="scanState == 1">
@@ -459,10 +459,11 @@ const studentTableData = computed(() => {
   else
   {
     return studentList.value.filter(student=>{
+        const keyword = keyWord.value.toLowerCase();
         return (
-            student.studentName.toLowerCase().includes(keyWord.value.toLowerCase()) 
+            student.studentName.toLowerCase().includes(keyword) 
             ||
-            student.exCode.toLowerCase().includes(keyWord.value.toLowerCase())
+            (student.examCode && student.examCode.toLowerCase().includes(keyword))
         );
     })
   }
@@ -1090,6 +1091,7 @@ const OptionView=(item:any)=>{
  * @description 调用删除接口移除学生的答题卡数据,并刷新列表
  */
 const UploadDelete = async (item: any) => {
+    console.log("已上传删除item",item);
     try {
         // 显示确认对话框
         await ElMessageBox.confirm('是否要删除此条数据?', '提示', {
@@ -1141,6 +1143,7 @@ const MarkToMiss=(item:any)=>{
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
+            customClass:'page_dialog',
         }
     ).then(() => {
         // 确定按钮点击事件处理
@@ -1153,6 +1156,29 @@ const MarkToMiss=(item:any)=>{
 
 }
 
+//单个标记正常
+const MarkToNormal=(item:any)=>{ 
+    console.log("打印选择的学生数据",item);
+    //二次弹窗提示
+    ElMessageBox.confirm(
+        `确定要将学生 ${item.studentName} 标记为正常吗?`,
+        '提示',
+        {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+            customClass:'page_dialog',
+        }
+    ).then(() => {
+        // 确定按钮点击事件处理
+        let studentScanIds=[];
+      
+        studentScanIds.push(item.id);   
+        
+        UpdateScanStatus(studentScanIds,0);//修改状态 0 未扫描 1 已上传 2  缺考  3 异常   0-未扫描 2-缺考(修改时传,删除不传)
+    })
+}
+
 //标记状态
 const MarkStudent=(status:number)=>{ 
     console.log("打印选择的学生数据",multiSelection.value);
@@ -1171,6 +1197,7 @@ const MarkStudent=(status:number)=>{
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
+            customClass:'page_dialog',
         }
     ).then(() => {
         // 确定按钮点击事件处理
@@ -1193,6 +1220,7 @@ const MarkCardNumberAbnormal=()=>{
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
+            customClass:'page_dialog',
         }
     ).then(() => {
         // 确定按钮点击事件处理

+ 5 - 1
src/views/exam/question.vue

@@ -532,7 +532,11 @@ const GetSmartQuestionList=()=>{
 //确定设置题目
 const EnterSetQuestion=()=>{
     console.log("打印提交参数",queryParams.value)
-
+    // 添加判断:end 不能小于 start
+    if (queryParams.value.end < queryParams.value.start) {
+        ElMessage.error('结束题号不能小于起始题号');
+        return;
+    }
     const params={
         examSubjectId: examSubjectId.value,//考试科目id
         questionMin: queryParams.value.start,//起始题号

+ 6 - 6
src/views/exam/selectExamination.vue

@@ -14,7 +14,7 @@
         </el-select>
         </div>
         <div class="container_item">
-          <div class="item_title">方案1</div>
+          <!-- <div class="item_title">方案1</div> -->
           <div class="item_card" >
             <div class="card_title">
               系统名单
@@ -30,7 +30,7 @@
             </div>
           </div>
         </div>
-        <div class="container_item">
+        <!-- <div class="container_item">
           <div class="item_title">方案2</div>
           <div class="item_card" >
             <div class="card_title">
@@ -43,13 +43,13 @@
             <div class="card_desc">以标准EXCEL模板导入        </div>
             <div class="card_button">
               <el-button @click="DownloadModule" class="bottom">下载模板</el-button>
-              <!-- <el-button  @click="OpenUpload" class="buttom" type="primary" :loading="uploadLoading" :disabled="schoolType==0 && examSchoolType==1">{{uploadText}}</el-button> -->
+             
               <el-button class="buttom" type="primary"  :disabled="true">{{uploadText}}</el-button>
               <input ref="uploadRef" accept=".xls, .xlsx" @change="UploadFile" class="buttom" type="file" style="display: none;"></input>
             </div>
           </div>
         </div>
-        <!-- 联校账号 查看联考的时候选择单校的时候 不显示历史名单 其他都显示 -->
+
         <div class="container_item" >
           <div class="item_title" v-if="!(schoolType == 1 && examSchoolType == 1 && selectSchoolId)">方案3</div>
           <div class="item_card" v-if="!(schoolType == 1 && examSchoolType == 1 && selectSchoolId)">
@@ -62,11 +62,11 @@
             </div>
             <div class="card_desc">从历史考试调用考场名单</div>
             <div class="card_button">
-              <!-- <el-button class="buttom" type="primary" @click="OpenHistoryDialog" :disabled="schoolType==0 && examSchoolType==1">立即复用</el-button> -->
+              
                <el-button class="buttom" type="primary"  :disabled="true">立即复用</el-button>
             </div>
           </div>
-        </div>
+        </div> -->
       </div>
       <SelectStudent v-model="showSelectStudent" :reuse="reuse"  @success="StudentSuccess"></SelectStudent>
       <!-- <SelectHistoryList ref="selectHistoryListRef" @GoToScanExamHome="GoToScanExamHome" typeValue="1" :schoolId="selectSchoolId" v-if="showHistoryList" @historyCancel="CancelHistoryDialog"></SelectHistoryList>

+ 3 - 3
src/views/layout/components/header.vue

@@ -8,12 +8,12 @@
         <img class="version_icon" src="@/assets/icon/version.webp" alt="">
       </div>
       <div class="header_menu">
-        <el-menu :default-active="activeMenuName" class="el-menu-wrap" mode="horizontal" :router="true"
+        <!-- <el-menu :default-active="activeMenuName" class="el-menu-wrap" mode="horizontal" :router="true"
           background-color="#2E64FA" text-color="#fff" active-text-color="#fff">
           <el-menu-item :index="item.externalLink" v-for="(item, index) in menuList" :key="index">
             {{ item.menuName }}
           </el-menu-item>
-        </el-menu>
+        </el-menu> -->
       </div>
       <div class="header_right">
         <el-dropdown trigger="click" @command="UserCommand" placement="bottom-end">
@@ -68,7 +68,7 @@ import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
 // 1. 引入 Pinia store
 import { useUserStore } from '@/store/user'
-import { replace } from 'lodash-es'
+
 
 // 2. 初始化 store
 const userStore = useUserStore()