|
|
@@ -50,7 +50,7 @@
|
|
|
<div class="search_button el_button">
|
|
|
<el-button class="refresh_btn" @click="RefreshList()" ><i class="iconfont icon_shuaxin"></i>刷新</el-button>
|
|
|
<el-button class="marke_miss_exam_btn" @click="AllMarkedMiss()" v-if="scanState == 0" >全部标缺</el-button>
|
|
|
- <!-- <el-button class="refresh_btn" @click="ExportData()"><i class="iconfont icon_export" style="margin-right: 5px;"></i>导出</el-button> -->
|
|
|
+ <el-button class="refresh_btn" @click="ExportData()"><i class="iconfont icon_export" style="margin-right: 5px;"></i>导出</el-button>
|
|
|
<el-button style="padding:0px 10px;" @click="OpenReldentify()" v-if="scanState == 1">重新识别客观题</el-button>
|
|
|
<el-button :class="multiSelection.length>0?'marke_normal_btn':'marke_normal_btn_disable'" @click="MarkStudent(0)" v-if="scanState == 2" :disabled="!multiSelection.length">标记为正常</el-button>
|
|
|
<el-button :class="multiSelection.length>0?'marke_anomaly_btn':'marke_anomaly_btn_disable'" @click="MarkCardNumberAbnormal()" v-if="scanState == 1" :disabled="!multiSelection.length>0">标记为异常</el-button>
|
|
|
@@ -132,6 +132,7 @@
|
|
|
:page-sizes="[20,50,100]"
|
|
|
layout="sizes,prev, pager, next"
|
|
|
@size-change="ChangePageSize"
|
|
|
+ :page-size="pageInfo.pageSize"
|
|
|
:current-page="pageInfo.pageNum"
|
|
|
:total="pageInfo.total">
|
|
|
</el-pagination>
|
|
|
@@ -334,6 +335,8 @@ import { useRouter } from 'vue-router'
|
|
|
import { onMounted ,ref,nextTick,onUnmounted,computed, watch} from 'vue';
|
|
|
import {deleteAnswerCard, getExamStudentList,updateScannedStatus,updateExamNumberException,correctObjectiveQuestion,getTemplateDetail } from '@/api/exam';
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
+
|
|
|
+// ... existing code ...
|
|
|
import PaperPreview from '../components/PaperPreview.vue'//图片预览组件
|
|
|
import ActionImage from '@/components/ActionImage.vue'// 画布图片组件
|
|
|
import ReIdentify from '@/views/exam/components/ReIdentify.vue';//重新识别弹窗
|
|
|
@@ -557,6 +560,58 @@ const AllMarkedMiss=async()=>{
|
|
|
|
|
|
}
|
|
|
|
|
|
+//导出数据
|
|
|
+const ExportData = () => {
|
|
|
+ //前端导出 this.studentList 的数据
|
|
|
+ // 创建表头
|
|
|
+ const headers = ['序号', '学号', '考号', '姓名', '行政班', '教学班', '学生类型', '考场', '状态'];
|
|
|
+
|
|
|
+ // 处理数据
|
|
|
+ const rows = studentList.value.map((item, index) => {
|
|
|
+ const statusMap = {
|
|
|
+ 0: '未扫描',
|
|
|
+ 1: '已上传',
|
|
|
+ 2: '缺考',
|
|
|
+ 3: '异常'
|
|
|
+ };
|
|
|
+
|
|
|
+ const classroom = item.examRoomName || item.adminClassName || '';
|
|
|
+
|
|
|
+ return [
|
|
|
+ index + 1,
|
|
|
+ item.studentCode || '',
|
|
|
+ item.examCode || '',
|
|
|
+ item.studentName || '',
|
|
|
+ item.adminClassName || '',
|
|
|
+ item.teachingClassName || '',
|
|
|
+ item.registrationTypeName || '',
|
|
|
+ classroom,
|
|
|
+ statusMap[item.scannedStatus] || ''
|
|
|
+ ];
|
|
|
+ });
|
|
|
+
|
|
|
+ // 组合CSV数据
|
|
|
+ const csvContent = [
|
|
|
+ headers.join(','),
|
|
|
+ ...rows.map(row => row.join(','))
|
|
|
+ ].join('\n');
|
|
|
+
|
|
|
+ // 添加BOM以支持中文
|
|
|
+ const BOM = '\uFEFF';
|
|
|
+ const csvData = BOM + csvContent;
|
|
|
+
|
|
|
+ // 创建下载链接
|
|
|
+ const blob = new Blob([csvData], { type: 'text/csv;charset=utf-8;' });
|
|
|
+ const url = URL.createObjectURL(blob);
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = url;
|
|
|
+ link.download = '缺考的学生列表_'+ new Date().toISOString().slice(0, 10) + '.csv';
|
|
|
+ link.style.visibility = 'hidden';
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ document.body.removeChild(link);
|
|
|
+}
|
|
|
+
|
|
|
//重新识别客观题
|
|
|
const OpenReldentify=()=>
|
|
|
{
|
|
|
@@ -1461,6 +1516,8 @@ const SetObjectTableHeight = () => {
|
|
|
|
|
|
console.log("最终客观题表格高度:", objectTableHeights.value);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
//切换显示
|