|
|
@@ -551,7 +551,7 @@ import { onMounted, ref, computed, nextTick, watch } from 'vue';
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
|
// 引入可能需要的 API (请根据实际路径调整)
|
|
|
-// import { getAbnormalList, updateAbnormalStatus, deletePaper } from '@/api/exam'
|
|
|
+import { getExamAbnormalList, updateAbnormalStatus, deletePaper } from '@/api/exam'
|
|
|
|
|
|
// 引入子组件 (确保路径正确)
|
|
|
// import PositionCanvas from './components/PositionCanvas.vue' // 假设路径
|
|
|
@@ -562,6 +562,24 @@ import { ElMessage } from 'element-plus'
|
|
|
const examStore = useExamStore()
|
|
|
const router = useRouter()
|
|
|
|
|
|
+// ==================== 考试通用数据(可追加)====================
|
|
|
+// 考试科目 ID
|
|
|
+const examSubjectId = computed(() => {
|
|
|
+ return examStore.currentExam?.id
|
|
|
+})//计算属性
|
|
|
+
|
|
|
+const schoolId = computed(() => {
|
|
|
+ return 0;
|
|
|
+})//学校id
|
|
|
+
|
|
|
+//考试科目code
|
|
|
+const examSubjectCode=computed(() => {
|
|
|
+ return examStore.currentExam?.examSubjectCode
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// ==================== 状态定义 ====================
|
|
|
|
|
|
// 异常类型: 2-定位异常 3-考号异常 4-客观题异常 5-选做题异常 6-划分异常(空白卷) 7-缺页异常
|
|
|
@@ -611,7 +629,7 @@ const searchContent = ref('')
|
|
|
const searchStudetList = ref<any[]>([])
|
|
|
|
|
|
// 表格高度与Key
|
|
|
-const tableHeightRight = ref(200)
|
|
|
+const tableHeightRight = ref(200)//定位表格高度
|
|
|
const losePagetableHeight = ref(200)
|
|
|
const searchTableHeight = ref(200)
|
|
|
const objectTableHeight = ref(200)
|
|
|
@@ -655,6 +673,7 @@ const AbnormalChanage = (type: number) => {
|
|
|
abnormalType.value = type
|
|
|
// TODO: 加载对应类型的异常列表数据
|
|
|
console.log('切换异常类型:', type)
|
|
|
+ GetAbnormalList();
|
|
|
}
|
|
|
|
|
|
// 2. 刷新异常列表
|
|
|
@@ -892,6 +911,83 @@ const SubjectiveCheck = () => {
|
|
|
}, 1000)
|
|
|
}
|
|
|
|
|
|
+//定位异常数据处理
|
|
|
+const PositionAbnormal= () => {
|
|
|
+ console.log("定位异常数据处理");
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//初始化重置数据
|
|
|
+const ResetData = () => {
|
|
|
+ // rotationAngle.value = 0;
|
|
|
+ currentPaperIndex.value=0;
|
|
|
+}
|
|
|
+
|
|
|
+// ==================== API 请求 ==========
|
|
|
+
|
|
|
+//通用获取异常列表数据
|
|
|
+const GetAbnormalList = async () => {
|
|
|
+ const params={
|
|
|
+ examSubjectId: examSubjectId.value,//考试id
|
|
|
+ schoolId:schoolId.value,
|
|
|
+ };
|
|
|
+ const res = await getExamAbnormalList(params);
|
|
|
+ console.log("打印异常数据",res);
|
|
|
+ if(res.code == 200)
|
|
|
+ {
|
|
|
+ let examInfoCount={
|
|
|
+ unScanned:res.data.unScanned,//未扫描
|
|
|
+ examMissNum:res.data.examMissNum,//缺考
|
|
|
+ scannedNum:res.data.scannedNum,//已上传
|
|
|
+ abnormalNum:res.data.abnormalNum,//异常
|
|
|
+ examTotal:res.data.totalNum,//总数
|
|
|
+ };
|
|
|
+ examStore.setExamInfoCount(examInfoCount);//设置扫描数据信息
|
|
|
+ //异常数据处理
|
|
|
+ if(res.data.abnormalGroupVO)
|
|
|
+ {
|
|
|
+
|
|
|
+ //定位异常处理
|
|
|
+ if(res.data.abnormalGroupVO.dwAbnormal)
|
|
|
+ {
|
|
|
+ positionData.value.pendingList = res.data.abnormalGroupVO.dwAbnormal || [];
|
|
|
+ }
|
|
|
+
|
|
|
+ //考号异常处理
|
|
|
+ if(res.data.abnormalGroupVO.cardNumberAbnormal)
|
|
|
+ {
|
|
|
+ numberData.value.pendingList = res.data.abnormalGroupVO.cardNumberAbnormal || [];
|
|
|
+ }
|
|
|
+
|
|
|
+ //客观题异常处理
|
|
|
+ if(res.data.abnormalGroupVO.objectiveAbnormal)
|
|
|
+ {
|
|
|
+ objectData.value.pendingList = res.data.abnormalGroupVO.objectiveAbnormal || [];
|
|
|
+ objectData.value.processedList = res.data.abnormalGroupVO.dealObjectiveAbnormal || [];
|
|
|
+ }
|
|
|
+
|
|
|
+ abnormalObj.value={
|
|
|
+ locationErrorNum: positionData.value.pendingList.length, // 定位异常数量
|
|
|
+ examNumberErrorNum: numberData.value.pendingList.length, // 考号异常数量
|
|
|
+ losePageErrorNum: losePageData.value.pendingList.length, // 缺页异常数量
|
|
|
+ objectErrorNum: objectData.value.pendingList.length, // 客观题异常数量
|
|
|
+ choiceErrorNum: choiceData.value.pendingList.length, // 选做题异常数量
|
|
|
+ subjectiveErrorNum: subjectiveData.value.pendingList.length, // 划分异常数量
|
|
|
+ };//异常数据
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
// ==================== 生命周期 ====================
|
|
|
|
|
|
onMounted(() => {
|
|
|
@@ -902,17 +998,18 @@ onMounted(() => {
|
|
|
// LoadAbnormalStats()
|
|
|
// LoadAbnormalList(abnormalType.value)
|
|
|
}
|
|
|
-
|
|
|
+ GetAbnormalList();
|
|
|
// 监听窗口变化调整高度
|
|
|
- window.addEventListener('resize', CalculateHeight)
|
|
|
- CalculateHeight()
|
|
|
+ window.addEventListener('resize', CalculateTableHeight)
|
|
|
+ CalculateTableHeight()
|
|
|
})
|
|
|
|
|
|
-const CalculateHeight = () => {
|
|
|
+//计算表格高度
|
|
|
+const CalculateTableHeight = () => {
|
|
|
nextTick(() => {
|
|
|
- const h = window.innerHeight - 150
|
|
|
- tableHeightRight.value = h > 200 ? h : 200
|
|
|
- losePagetableHeight.value = h > 200 ? h : 200
|
|
|
+
|
|
|
+ tableHeightRight.value = window.innerHeight - 220;
|
|
|
+
|
|
|
// 其他高度同理
|
|
|
})
|
|
|
}
|