feat:增加外部考试状态更新及判断跳转界面

This commit is contained in:
wyx
2023-02-10 19:25:40 +08:00
parent 4843b91109
commit b63903092f
4 changed files with 42 additions and 5 deletions

View File

@@ -92,6 +92,9 @@ export const PointList = `/stu/project/rank_list/point_list`
export const QueryEvaluationDetailById = evaluationId => `/evaluation/queryEvaluationDetailById?evaluationId=${evaluationId} post`
// 外部考试点击去完成调用
export const SubmitExternalExam = `/stu/externalExam/submitExternalExam post`
// 发表帖子
export const PostAdd = `/statement/add post`
// 帖子收藏
@@ -105,3 +108,5 @@ export const PostPraise = `/statement/praise post`
// 帖子更新
export const PostUpdate = `/statement/update post`

View File

@@ -411,7 +411,8 @@ import {
STUDY_RECORD,
EvaluationToLearn,
CompletionList,
PointList
PointList,
SubmitExternalExam
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
@@ -670,7 +671,21 @@ function toFinish(d, sName, chapterOrStageId) {
return
}
// 此处判断外部考试跳转
if(d.startTime==null || d.endTime==null){
if(d.examType==2){
// 点击即更新状态 进行中
request(SubmitExternalExam, {
"chapterId": chapterOrStageId,
"externalId": d.courseId,
"externalName": d.name,
"targetId": data.value.projectId,
"studentNo": userInfo.value.userNo
}).then(res=>{
console.log(res)
}).catch(err=>{
console.log(err)
})
router.push({
path: '/externalexamination',
query: {

View File

@@ -277,7 +277,7 @@ import { computed, reactive, ref, watch } from "vue";
// import circle from '../../assets/image/pathdetails/circle.png';
// import circle2 from '../../assets/image/pathdetails/circle2.png';
import { boeRequest, useRequest, request } from "@/api/request";
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD, EvaluationToLearn } from "@/api/api";
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD, EvaluationToLearn, SubmitExternalExam } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import store from "@/store";
@@ -440,7 +440,21 @@ function toFinish(d) {
return
}
// 此处判断外部考试跳转
if(d.startTime==null || d.endTime==null){
if(d.examType==2){
// 点击即更新状态 进行中
request(SubmitExternalExam, {
"chapterId": data.value.currentStageId,
"externalId": d.courseId,
"externalName": d.name,
"targetId": routerId,
"studentNo": userInfo.value.userNo
}).then(res=>{
console.log(res)
}).catch(err=>{
console.log(err)
})
router.push({
path: '/externalexamination',
query: {
@@ -527,7 +541,7 @@ function toFinish(d) {
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
if(d.type == 10) {
// 此处判断测评跳转详情界面
router.push({
path: '/evaluation',

View File

@@ -126,6 +126,9 @@ export default defineConfig(({ command, mode }) =>
},'/statement/list': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},'/stu/externalExam/submitExternalExam': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},
}
}