|
|
@@ -4,7 +4,9 @@
|
|
|
<div class="step_item" v-for="(item, index) in menuList" :key="index" :class="activeIndex==index?(activeIndex==2?'active_score':'active'):''">
|
|
|
<div class="step_title" @click="MenuChange(index, item)">
|
|
|
<div class="num_box">
|
|
|
- <span v-if="item.status === 1" class="el-icon-success"></span>
|
|
|
+ <span v-if="item.status === 1" class="icon_success">
|
|
|
+ <el-icon><Check /></el-icon>
|
|
|
+ </span>
|
|
|
<span v-else class="step_num">{{ index + 1 }}</span>
|
|
|
</div>
|
|
|
<span>{{ item.name }}</span>
|
|
|
@@ -27,6 +29,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|
|
import { useExamStore } from '@/store/exam'
|
|
|
import { useAnalysisStore } from '@/store/analysis'
|
|
|
import { queryQuestionGroupByAiId } from '@/api/analysis'
|
|
|
+import {getExamProcess } from '@/api/exam'
|
|
|
|
|
|
const examStore = useExamStore()
|
|
|
const analysisStore = useAnalysisStore()
|
|
|
@@ -50,7 +53,7 @@ const examSubjectId = computed(() => {
|
|
|
// 2. 考试状态字符串
|
|
|
const examStateStr = computed(() => {
|
|
|
// 替换为: return makeTemplateStore.examStateStr
|
|
|
- return examStore.currentExam?.examStateStr
|
|
|
+ return examStore.examStateStr
|
|
|
})
|
|
|
|
|
|
// 3. 考试类型 1 选择题 2 填空题 3 Ai作文
|
|
|
@@ -72,7 +75,7 @@ const menuList = computed(() => {
|
|
|
//选择题判分
|
|
|
if(stepFlow.value < 2){
|
|
|
list = [
|
|
|
- { name: '试题结构', number: '1', path: 'question', desc: '建立考试试题结构、设置标答、分组等信息', status: 0 },
|
|
|
+ { name: '试题结构', number: '1', path: 'question', desc: '建立考试试题结构、设置标答、分组等信息', status:0 },
|
|
|
{ name: '扫描学生', number: '2', path: 'scanList', desc: '扫描学生,处理扫描异常学生等', status: 0 },
|
|
|
];
|
|
|
}else{
|
|
|
@@ -121,19 +124,18 @@ const menuList = computed(() => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
|
|
|
- // // 更新状态
|
|
|
- // const stateStr = String(examStateStr.value || '')
|
|
|
- // list.forEach((item) => {
|
|
|
- // if (stateStr.includes(item.number)) {
|
|
|
- // item.status = 1
|
|
|
- // } else {
|
|
|
- // item.status = 0
|
|
|
- // }
|
|
|
- // })
|
|
|
+ // 更新状态
|
|
|
+ const stateStr = String(examStateStr.value || '')
|
|
|
+ console.log('打印菜单stateStr', examStateStr.value)
|
|
|
+ list.forEach((item) => {
|
|
|
+ if (stateStr.includes(item.number)) {
|
|
|
+ item.status = 1
|
|
|
+ } else {
|
|
|
+ item.status = 0
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
return list
|
|
|
})
|
|
|
@@ -158,16 +160,14 @@ const activeIndex = computed(() => {
|
|
|
// --- 方法 ---
|
|
|
|
|
|
// 获取模板数据
|
|
|
-const GetThirdCardData = () => {
|
|
|
+const GetExamProcess = () => {
|
|
|
if (!examSubjectId.value) return
|
|
|
|
|
|
const param = {
|
|
|
examSubjectId: examSubjectId.value
|
|
|
}
|
|
|
-
|
|
|
- // 假设 $api 已全局挂载或在 utils 中引入
|
|
|
- // import { examApi } from '@/api/exam'
|
|
|
- ;(window as any).$api?.exam.getExamThirdCardData(param).then((res: any) => {
|
|
|
+ //获取考试流程状态
|
|
|
+ getExamProcess(param).then((res: any) => {
|
|
|
console.log('获取模板相关数据 包含第三方卡和系统卡', res)
|
|
|
if (res.code === 200) {
|
|
|
localStorage.setItem('templateData', JSON.stringify(res.data.examCardPageVOS))
|
|
|
@@ -181,22 +181,25 @@ const GetThirdCardData = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// // 获取考试流程状态
|
|
|
-// const GetExamState = () => {
|
|
|
-// const param = {
|
|
|
-// examSubjectId: route.query.id
|
|
|
-// }
|
|
|
+// 获取考试流程状态
|
|
|
+const GetExamState = () => {
|
|
|
+ const param = {
|
|
|
+ examSubjectId:examSubjectId.value
|
|
|
+ }
|
|
|
|
|
|
-// ;(window as any).$api?.reviewBlock.getExamFlowStatus(param).then((res: any) => {
|
|
|
-// console.log('打印考试流程状态返回', res)
|
|
|
-// if (res.code === 200) {
|
|
|
-// const newStateStr = res.data.finished.join(',')
|
|
|
-// // 替换为 Store Commit/Action
|
|
|
-// // makeTemplateStore.setExamStateStr(newStateStr)
|
|
|
-// console.warn('请在此处调用 Store 的 action 更新 examStateStr')
|
|
|
-// }
|
|
|
-// })
|
|
|
-// }
|
|
|
+ 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);//设置状态数据
|
|
|
+
|
|
|
+ // makeTemplateStore.setExamStateStr(newStateStr)
|
|
|
+ console.warn('请在此处调用 Store 的 action 更新 examStateStr')
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
// 菜单点击事件
|
|
|
const MenuChange = (index: number, item: any) => {
|
|
|
@@ -238,6 +241,8 @@ onMounted(async () => {
|
|
|
stepOnIndex.value = 0
|
|
|
|
|
|
}
|
|
|
+ GetExamState()//获取流程状态
|
|
|
+
|
|
|
const res = await queryQuestionGroupByAiId(examSubjectId.value)
|
|
|
if (res.code === 200) {
|
|
|
analysisStore.setIsShowGroupAnalysis(true);
|
|
|
@@ -287,8 +292,21 @@ onMounted(async () => {
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
|
|
|
+ .icon_success
|
|
|
+ {
|
|
|
+ width:16px;
|
|
|
+ height:16px;
|
|
|
+ background: #15BC83;
|
|
|
+ border-radius: 50%;
|
|
|
+ color:#fff;
|
|
|
+ font-size: 16px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
.el-icon-success::before {
|
|
|
font-size: 19px;
|
|
|
+ color:red;
|
|
|
}
|
|
|
}
|
|
|
.step_num {
|