|
@@ -91,13 +91,17 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="content_right">
|
|
<div class="content_right">
|
|
|
<div class="right_header">
|
|
<div class="right_header">
|
|
|
- <span> 扫描 设置</span>
|
|
|
|
|
- <span>
|
|
|
|
|
- 识别号:
|
|
|
|
|
- <el-select v-model="params.batchNo" placeholder="请选择" @change="GoSearch()" style="width: 120px;">
|
|
|
|
|
- <el-option v-for="item in scanIdentifyList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <div class="scan_set"> 扫描设置</div>
|
|
|
|
|
+ <div class="scan_set_scan_code">
|
|
|
|
|
+
|
|
|
|
|
+ <el-select style="width: 100px;margin-right: 6px;" v-model="useDriveUI" placeholder="是否显示驱动弹窗" @change="ChangeDriveUI">
|
|
|
|
|
+ <el-option v-for="item in scanTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <!-- 识别号: -->
|
|
|
|
|
+ <el-select style="width: 100px;margin-right: 6px;" v-model="scanIdentifyCode" placeholder="选择识别号" @change="ChangeCode" >
|
|
|
|
|
+ <el-option v-for="item in scanIdentifyList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="right_center">
|
|
<div class="right_center">
|
|
|
<div class="scan_buttons">
|
|
<div class="scan_buttons">
|
|
@@ -152,7 +156,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="right_button">
|
|
<div class="right_button">
|
|
|
- <el-button type="primary" @click="FinishScanned()" style="width:calc(100% - 40px);">扫描完成</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="FinishScanned()" :loading="finishLoading" style="width:calc(100% - 40px);">扫描完成</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -167,7 +171,7 @@ import { useRouter } from 'vue-router'
|
|
|
import { onMounted ,ref,computed,onUnmounted,nextTick } from 'vue';
|
|
import { onMounted ,ref,computed,onUnmounted,nextTick } from 'vue';
|
|
|
import ScanButton from './components/scanButton.vue'
|
|
import ScanButton from './components/scanButton.vue'
|
|
|
import SelectStudent from './components/selectStudent.vue'
|
|
import SelectStudent from './components/selectStudent.vue'
|
|
|
-import { finishScanned,hasImportStudent,getBatchList,getCurrentBatchNo,deleteBatch,updateScanCount } from '@/api/exam'
|
|
|
|
|
|
|
+import { finishScanned,getExamScoreSummary,hasImportStudent,getBatchList,getCurrentBatchNo,deleteBatch,updateScanCount,setExamScanSetting,saveChooseCode} from '@/api/exam'
|
|
|
import scanCommon from '@/utils/scanCommon';
|
|
import scanCommon from '@/utils/scanCommon';
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
import { formatTimestamp } from '@/utils/common';
|
|
import { formatTimestamp } from '@/utils/common';
|
|
@@ -200,6 +204,34 @@ const examSubjectCode=computed(() => {
|
|
|
const currentUserName=computed(() => {
|
|
const currentUserName=computed(() => {
|
|
|
return userStore.userName;
|
|
return userStore.userName;
|
|
|
})
|
|
})
|
|
|
|
|
+//查询是否导入了学生名单
|
|
|
|
|
+const HasImportStudent = async () => {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ examSubjectId: examSubjectId.value,
|
|
|
|
|
+ schoolId: 0,//单校 0
|
|
|
|
|
+ };
|
|
|
|
|
+ const res = await hasImportStudent(params);
|
|
|
|
|
+ console.log("打印是否导入了学生名单",res);
|
|
|
|
|
+ if(res.code==200)
|
|
|
|
|
+ {
|
|
|
|
|
+ isImportStudent.value=res.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ isImportStudent.value=false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!isImportStudent.value)
|
|
|
|
|
+ {
|
|
|
|
|
+ console.log("未导入学生名单,跳转到选择学生名单界面");
|
|
|
|
|
+ //跳转导入学生名单界面
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'selectStudent',
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 组件创建时立即执行
|
|
|
|
|
+HasImportStudent();//查询是否导入了学生名单();
|
|
|
|
|
|
|
|
const selectSchoolId=ref(0);//学校ID
|
|
const selectSchoolId=ref(0);//学校ID
|
|
|
const showAbnormalDialog=ref(false);//异常弹窗
|
|
const showAbnormalDialog=ref(false);//异常弹窗
|
|
@@ -248,9 +280,22 @@ const scanIdentifyList=[
|
|
|
value:'1',
|
|
value:'1',
|
|
|
}
|
|
}
|
|
|
];//识别号列表
|
|
];//识别号列表
|
|
|
|
|
+const scanTypeList=[
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'不弹窗',
|
|
|
|
|
+ value:0,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'弹窗',
|
|
|
|
|
+ value:1,
|
|
|
|
|
+ }
|
|
|
|
|
+];
|
|
|
|
|
+const scanIdentifyCode=ref('1');////识别号 1-学号 2-考号
|
|
|
|
|
+const useDriveUI=ref(0);//1是会弹框,其他值或不写则不弹
|
|
|
|
|
|
|
|
const isImportStudent=ref(false);//是否导入了学生名单
|
|
const isImportStudent=ref(false);//是否导入了学生名单
|
|
|
const showSelectStudent=ref(false);//是否显示选择学生名单弹窗
|
|
const showSelectStudent=ref(false);//是否显示选择学生名单弹窗
|
|
|
|
|
+const finishLoading=ref(false);//扫描完成加载中
|
|
|
const scanDataInfo=ref({
|
|
const scanDataInfo=ref({
|
|
|
abnormalNum:0,//异常数量
|
|
abnormalNum:0,//异常数量
|
|
|
examMissNum:0,//缺考数量
|
|
examMissNum:0,//缺考数量
|
|
@@ -294,16 +339,34 @@ const FinishScanned= async () =>{
|
|
|
let param={
|
|
let param={
|
|
|
id:examSubjectId.value
|
|
id:examSubjectId.value
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+ finishLoading.value=true;
|
|
|
const res = await finishScanned(param)
|
|
const res = await finishScanned(param)
|
|
|
if(res.code == 200)
|
|
if(res.code == 200)
|
|
|
{
|
|
{
|
|
|
- ElMessage.success("完成成功!")
|
|
|
|
|
|
|
+ // ElMessage.success("完成成功!")
|
|
|
|
|
+ let idList=res.data.split(",");
|
|
|
|
|
+ let analysisParam = {
|
|
|
|
|
+ examId:idList[0],
|
|
|
|
|
+ examPaperIds:[idList[1]],//多科传0 单科传科目ID
|
|
|
|
|
+ }
|
|
|
|
|
+ //扫描完成 调用汇总接口
|
|
|
|
|
+
|
|
|
|
|
+ const analysisRes = await getExamScoreSummary(analysisParam);
|
|
|
|
|
+ if(analysisRes.code == 200)
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.success("完成成功!")
|
|
|
|
|
+ finishLoading.value=false;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.error(analysisRes.msg);
|
|
|
|
|
+ finishLoading.value=false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
ElMessage.error(res.msg);
|
|
ElMessage.error(res.msg);
|
|
|
-
|
|
|
|
|
|
|
+ finishLoading.value=false;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -328,6 +391,44 @@ const ConfigRequestUrlByEnv= () =>{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//切换弹窗模式
|
|
|
|
|
+const ChangeDriveUI=()=>{
|
|
|
|
|
+ console.log("打印弹窗模式", useDriveUI.value);
|
|
|
|
|
+ let params={
|
|
|
|
|
+ alterWindow:useDriveUI.value
|
|
|
|
|
+ };
|
|
|
|
|
+ setExamScanSetting(params).then(res => {
|
|
|
|
|
+ if(res.code == 200)
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.success("设置成功!")
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.error(res.msg);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//改变识别码
|
|
|
|
|
+const ChangeCode=()=>{
|
|
|
|
|
+ let param={
|
|
|
|
|
+ examSubjectId:examSubjectId.value,
|
|
|
|
|
+ chooseCode:scanIdentifyCode.value//识别号 1-学号 2-平台号 3-学籍号 4-考号
|
|
|
|
|
+ };
|
|
|
|
|
+ saveChooseCode(param).then(res=>{
|
|
|
|
|
+ console.log("打印识别码设置结果",res);
|
|
|
|
|
+ if(res.code==200)
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.success("设置成功!")
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ElMessage.error(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//获取未上传图片的数量
|
|
//获取未上传图片的数量
|
|
|
const GetNoUploadNumber=(item:BatchItem)=>
|
|
const GetNoUploadNumber=(item:BatchItem)=>
|
|
|
{
|
|
{
|
|
@@ -648,22 +749,7 @@ const StudentSuccess = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-//查询是否导入了学生名单
|
|
|
|
|
-const HasImportStudent = async () => {
|
|
|
|
|
- const params = {
|
|
|
|
|
- examSubjectId: examSubjectId.value,
|
|
|
|
|
- schoolId: 0,//单校 0
|
|
|
|
|
- };
|
|
|
|
|
- const res = await hasImportStudent(params);
|
|
|
|
|
- console.log("打印是否导入了学生名单",res);
|
|
|
|
|
- if(res.code==200)
|
|
|
|
|
- {
|
|
|
|
|
- isImportStudent.value=res.data;
|
|
|
|
|
- }
|
|
|
|
|
- else{
|
|
|
|
|
- isImportStudent.value=false;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//获取扫描批次列表
|
|
//获取扫描批次列表
|
|
|
const GetScanBatchList=async()=>{
|
|
const GetScanBatchList=async()=>{
|
|
@@ -963,7 +1049,7 @@ onMounted(() => {
|
|
|
console.warn('当前没有选中的考试信息')
|
|
console.warn('当前没有选中的考试信息')
|
|
|
// 可选:如果没有数据,可以重定向回列表页或提示用户
|
|
// 可选:如果没有数据,可以重定向回列表页或提示用户
|
|
|
}
|
|
}
|
|
|
- HasImportStudent();//查询是否导入了学生名单
|
|
|
|
|
|
|
+
|
|
|
GetScanBatchList();//获取扫描批次列表
|
|
GetScanBatchList();//获取扫描批次列表
|
|
|
CalculateTableHeight();//初始化计算表格高度
|
|
CalculateTableHeight();//初始化计算表格高度
|
|
|
console.log("打印当前的配置",import.meta.env.VUE_APP_BASE);
|
|
console.log("打印当前的配置",import.meta.env.VUE_APP_BASE);
|
|
@@ -980,6 +1066,7 @@ onMounted(() => {
|
|
|
// 监听窗口大小变化
|
|
// 监听窗口大小变化
|
|
|
window.addEventListener('resize', CalculateTableHeight);
|
|
window.addEventListener('resize', CalculateTableHeight);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
// 卸载时移除监听,防止内存泄漏
|
|
// 卸载时移除监听,防止内存泄漏
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
window.removeEventListener('resize', CalculateTableHeight);
|
|
window.removeEventListener('resize', CalculateTableHeight);
|