|
|
@@ -205,7 +205,7 @@ import { useRouter } from 'vue-router'
|
|
|
import { onMounted ,ref,computed,onUnmounted,nextTick } from 'vue';
|
|
|
import ScanButton from './components/scanButton.vue'//扫描按钮
|
|
|
import UploadImage from './components/UploadImage.vue'//导入扫描图片
|
|
|
-import {setExamNumberPosition,finishScanned,getExamScoreSummary,hasImportStudent,getBatchList,getCurrentBatchNo,deleteBatch,updateScanCount,setExamScanSetting,saveChooseCode} from '@/api/exam'
|
|
|
+import {getExamProcess,setExamNumberPosition,finishScanned,getExamScoreSummary,hasImportStudent,getBatchList,getCurrentBatchNo,deleteBatch,updateScanCount,setExamScanSetting,saveChooseCode} from '@/api/exam'
|
|
|
import { queryQuestionGroupByAiId } from '@/api/analysis'
|
|
|
import scanCommon from '@/utils/scanCommon';
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
@@ -486,6 +486,8 @@ const FinishScanned= async () =>{
|
|
|
const res = await queryQuestionGroupByAiId(examSubjectId.value);
|
|
|
const isShow = res.code === 200;
|
|
|
analysisStore.setIsShowGroupAnalysis(isShow);
|
|
|
+
|
|
|
+ GetExamStatus();//更新状态
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -501,6 +503,32 @@ const FinishScanned= async () =>{
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+//获取考试状态
|
|
|
+const GetExamStatus=async ()=>{
|
|
|
+ const param = {
|
|
|
+ examSubjectId:examSubjectId.value
|
|
|
+ }
|
|
|
+ getExamProcess(param).then((res: any) => {
|
|
|
+ console.log('打印考试流程状态返回', res)
|
|
|
+ if (res.code === 200) {
|
|
|
+ const newStateStr = res.data;
|
|
|
+ console.log('打印考试流程状态', newStateStr)
|
|
|
+ // 替换为 Store Commit/Action
|
|
|
+ examStore.setExamState(newStateStr);//设置状态数据
|
|
|
+ if(newStateStr.includes(2))
|
|
|
+ {
|
|
|
+
|
|
|
+ router.push('/exam/score')
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 根据环境配置请求地址
|
|
|
const ConfigRequestUrlByEnv= () =>{
|
|
|
console.log("打印环境", import.meta.env.MODE);
|