Преглед на файлове

选择班级增加全部班级选择项

dengshaobo преди 2 седмици
родител
ревизия
5d4a968fad
променени са 2 файла, в които са добавени 52 реда и са изтрити 1 реда
  1. 8 0
      src/views/exam/components/stepItem.vue
  2. 44 1
      src/views/exam/selectStudent.vue

+ 8 - 0
src/views/exam/components/stepItem.vue

@@ -137,6 +137,14 @@ const menuList = computed(() => {
     } else {
       item.status = 0
     }
+    //成绩查询的状态保持和扫描学生同步
+    if(item.number=='3')
+    {
+      if(stateStr.includes('2'))
+      {
+        item.status = 1
+      }
+    }
   })
 
   return list

+ 44 - 1
src/views/exam/selectStudent.vue

@@ -17,6 +17,12 @@
     </div>
     <div class="page_jg_20">
 
+    </div>
+    <div class="select_all" :class="selectedIds.length==tableData.length ? 'select_all_cur' : ''" @click="CheckAll()">
+      全部班级
+    </div>
+    <div class="page_jg_20">
+
     </div>
     <div class="class_content" >
       <div class="class_list">
@@ -84,6 +90,18 @@ const ChangeClassType=async(type:number)=>{
   }
 }
 
+const CheckAll=()=>{
+
+  if(selectedIds.value.length==tableData.value.length)
+  {
+    selectedIds.value=[];
+  }
+  else
+  {
+    selectedIds.value=tableData.value.map((item:any)=>item.classId);
+  }
+}
+
 // 选中班级id
 const SelectClass=(item:any)=>{
 
@@ -201,7 +219,7 @@ const HandleSubmit= () => {
   .class_content
   {
     width: 100%;
-    height: calc(100% - 160px);
+    height: calc(100% - 240px);
     overflow-y: auto;
   }
 
@@ -259,4 +277,29 @@ const HandleSubmit= () => {
     }
   }
 }
+
+.select_all
+{
+  width: 154px;
+  height: 60px;
+  border-radius: 8px 8px 8px 8px;
+  border: 1px solid #E0E0E0;
+
+  font-weight: 550;
+  font-size: 16px;
+  color: #333333;
+  line-height: 60px;
+  text-align: center;
+
+  cursor: pointer;
+}
+
+.select_all_cur
+{
+  font-weight: 550;
+  font-size: 16px;
+  color: #2E64FA;
+  background: rgba(46,100,250,0.1);
+  border: 1px solid #2E64FA;
+}
 </style>