| | |
| | | </div> |
| | | <div v-if="data.form.questions && data.form.questions.length>0" style="display: flex;flex-wrap: wrap;line-height: 40px"> |
| | | <div v-for="(item,index) in data.form.questions" :key="index" style="margin-right: 5px"> |
| | | <el-tag size="large" style="cursor: pointer" effect="light" :type="item.studentAnswer.passed == 0 ? 'danger' :item.studentAnswer.passed == 1?'success': 'warning'">{{index+1}}</el-tag> |
| | | <el-tag size="large" style="cursor: pointer" effect="light" :type="item.studentAnswer.passed == 0 ? 'danger' :item.studentAnswer.passed == 1?'success': 'warning'" @click="toView(index+1)">{{index+1}}</el-tag> |
| | | </div> |
| | | <el-divider /> |
| | | </div> |
| | | <div style="display: flex;justify-content: center;"> |
| | | <el-button type="primary" @click="submitExam">提交批改</el-button> |
| | | <el-button type="primary" @click="submitExam" v-if="data.queryParams.state != 2">提交批改</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | <div v-for="(item,index) in data.singleList" :key="index" style="margin-left: 15px;margin-top: 10px"> |
| | | <div style="display: flex;flex-direction: column;"> |
| | | <div style="margin-top: 10px;display: flex;align-items: center"> |
| | | <span style="font-size: 15px">{{index+1}}.</span> |
| | | <span style="font-size: 15px" :id="index+1">{{index+1}}.</span> |
| | | <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> |
| | | </div> |
| | | <div style="display: flex;margin-top: 15px;margin-left: 25px"> |
| | |
| | | <div v-for="(item,index) in data.multiList" :key="index" style="margin-left: 15px;margin-top: 10px"> |
| | | <div style="display: flex;flex-direction: column;"> |
| | | <div style="margin-top: 10px;display: flex;align-items: center"> |
| | | <span style="font-size: 15px">{{data.singleList.length + index+1}}.</span> |
| | | <span style="font-size: 15px" :id="data.singleList.length + index+1">{{data.singleList.length + index+1}}.</span> |
| | | <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> |
| | | </div> |
| | | <div style="display: flex;margin-top: 15px;margin-left: 25px"> |
| | |
| | | <div v-for="(item,index) in data.judgeList" :key="index" style="margin-left: 15px;margin-top: 10px"> |
| | | <div style="display: flex;flex-direction: column;"> |
| | | <div style="margin-top: 10px;display: flex;align-items: center"> |
| | | <span style="font-size: 15px">{{data.singleList.length+data.multiList.length + index+1}}.</span> |
| | | <span style="font-size: 15px" :id="data.singleList.length+data.multiList.length + index+1">{{data.singleList.length+data.multiList.length + index+1}}.</span> |
| | | <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> |
| | | </div> |
| | | <div style="display: flex;margin-top: 15px;margin-left: 25px"> |
| | |
| | | <div v-for="(item,index) in data.easyList" :key="index" style="margin-left: 15px;margin-top: 10px"> |
| | | <div style="display: flex;flex-direction: column;"> |
| | | <div style="margin-top: 10px;display: flex;align-items: center"> |
| | | <span style="font-size: 15px">{{data.singleList.length + data.multiList.length + data.judgeList.length + index+1}}.</span> |
| | | <span style="font-size: 15px" :id="data.singleList.length + data.multiList.length + data.judgeList.length + index+1">{{data.singleList.length + data.multiList.length + data.judgeList.length + index+1}}.</span> |
| | | <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> |
| | | </div> |
| | | <div style="display: flex;margin-top: 15px;margin-left: 30px"> |
| | |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-backtop target=""></el-backtop> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import Cookies from "js-cookie"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {getClassification} from "@/api/onlineEducation/courseClass"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {doConfirmExam, getPaperStu} from "@/api/onlineEducation/exam"; |
| | | import {removeToken} from "@/utils/auth"; |
| | | import {isRelogin} from "@/utils/request"; |
| | | const route = useRoute() |
| | | const router = useRouter(); |
| | | |
| | |
| | | paperId: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | state: null, |
| | | }, |
| | | form: { |
| | | id: null, |
| | |
| | | backValue.value = val |
| | | data.queryParams.paperId = val.paperId |
| | | data.queryParams.id = val.id |
| | | data.queryParams.state = val.state |
| | | await getStuPaper() |
| | | }) |
| | | |
| | |
| | | score: item.score, |
| | | } |
| | | }) |
| | | questions.forEach(item => { |
| | | if(item.score == '' || item.score == null){ |
| | | ElMessage.warning('有未批改题目'); |
| | | return; |
| | | } |
| | | }) |
| | | const param = { |
| | | id:data.form.id, |
| | | paperId: data.form.paperId, |
| | |
| | | const res = await doConfirmExam(param); |
| | | if(res.code === 200){ |
| | | await getStuPaper() |
| | | await ElMessageBox.alert(`试卷得分:${data.form.score}分`, '考试结果', { |
| | | confirmButtonText: '关闭', |
| | | callback: async () => { |
| | | // back() |
| | | }, |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | console.log('简答',param) |
| | | |
| | | } |
| | | const toView = (data) => { |
| | | document?.getElementById(data)?.scrollIntoView({ |
| | | behavior: "smooth", //smooth:平滑,auto:直接定位 |
| | | block: "center", |
| | | inline: "center", |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | | |