mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 04:16:50 +08:00
feat:增加测评状态判断,提示及跳转测评界面添加。
This commit is contained in:
@@ -120,6 +120,9 @@ export const GetMoreComments = `/statement/getMoreComments`
|
|||||||
// 查询讨论下的帖子
|
// 查询讨论下的帖子
|
||||||
export const PostList = `/statement/list`
|
export const PostList = `/statement/list`
|
||||||
|
|
||||||
|
// 查询单个测评的状态
|
||||||
|
export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -406,7 +406,7 @@
|
|||||||
import {computed, onMounted, ref, watch} from "vue";
|
import {computed, onMounted, ref, watch} from "vue";
|
||||||
import {ElLoading, ElMessage} from 'element-plus'
|
import {ElLoading, ElMessage} from 'element-plus'
|
||||||
import {request} from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
import {CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam} from "@/api/api";
|
import {CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
@@ -681,23 +681,8 @@ async function toFinish(d, sName, chapterOrStageId) {
|
|||||||
}
|
}
|
||||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||||
if (d.type == 10) {
|
if (d.type == 10) {
|
||||||
// 此处判断测评跳转详情界面
|
if(d.quizTaskId==null){
|
||||||
router.push({
|
// 肯定没有完成测评
|
||||||
path: '/evaluation',
|
|
||||||
query: {
|
|
||||||
id: d.id,
|
|
||||||
type: PROJECT,
|
|
||||||
infoId: data.value.projectId,
|
|
||||||
courseId: d.courseId,
|
|
||||||
pName: data.value.name,
|
|
||||||
sName,
|
|
||||||
chapterOrStageId,
|
|
||||||
exname: d.name, // 测评名称
|
|
||||||
btype: 1 // 1项目 2 路径图
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return
|
|
||||||
|
|
||||||
// 调用接口 跳转页面
|
// 调用接口 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数', {
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
"businessType": "project",
|
"businessType": "project",
|
||||||
@@ -727,6 +712,58 @@ async function toFinish(d, sName, chapterOrStageId) {
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
}else{
|
||||||
|
// 进行中 或者 已完成
|
||||||
|
// 调用接口 判断当前测评状态 跳转页面
|
||||||
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
|
"quizTaskId": d.quizTaskId
|
||||||
|
})
|
||||||
|
request(QueryEvaluationTaskStatusOne, {
|
||||||
|
"quizTaskId": d.quizTaskId
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
if(res.data.complete_status==2){
|
||||||
|
ElMessage.error("您已完成测评")
|
||||||
|
return
|
||||||
|
}else{
|
||||||
|
// 重新查询跳转
|
||||||
|
// 调用接口 跳转页面
|
||||||
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
|
"businessType": "project",
|
||||||
|
"chapterId": chapterOrStageId,
|
||||||
|
"courseId": d.courseId,
|
||||||
|
"quizKid": d.targetId,
|
||||||
|
"routerOrProjectId": projectId,
|
||||||
|
"studentId": userInfo.value.projectId,
|
||||||
|
"studentName": userInfo.value.realName
|
||||||
|
})
|
||||||
|
request(EvaluationToLearn, {
|
||||||
|
"businessType": "project",
|
||||||
|
"chapterId": chapterOrStageId,
|
||||||
|
"courseId": d.courseId,
|
||||||
|
"quizKid": d.targetId,
|
||||||
|
"routerOrProjectId": projectId,
|
||||||
|
"studentId": userInfo.value.projectId,
|
||||||
|
"studentName": userInfo.value.realName
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
let jumpUrl = res.data.quizUrl
|
||||||
|
// 此处写跳转url
|
||||||
|
window.open(jumpUrl, '_top')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TASK_TYPES.path[d.type]) {
|
if (!TASK_TYPES.path[d.type]) {
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ import {computed, onMounted, ref} from "vue";
|
|||||||
import circle from '@/assets/image/pathdetails/circle.png';
|
import circle from '@/assets/image/pathdetails/circle.png';
|
||||||
import circle2 from '@/assets/image/pathdetails/circle2.png';
|
import circle2 from '@/assets/image/pathdetails/circle2.png';
|
||||||
import {request} from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
import {STUDY_RECORD, UPDATE_CURRENT_TASK} from "@/api/api";
|
import {STUDY_RECORD, UPDATE_CURRENT_TASK, QueryEvaluationTaskStatusOne, EvaluationToLearn} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {ROUTER, TASK_TYPES} from "@/api/CONST";
|
import {ROUTER, TASK_TYPES} from "@/api/CONST";
|
||||||
@@ -445,22 +445,89 @@ async function toFinish(d) {
|
|||||||
|
|
||||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||||
if (d.type == 10) {
|
if (d.type == 10) {
|
||||||
// 此处判断测评跳转详情界面
|
if(d.quizTaskId==null){
|
||||||
router.push({
|
// 肯定没有完成测评
|
||||||
path: '/evaluation',
|
// 调用接口 跳转页面
|
||||||
query: {
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
id: d.id,
|
"businessType": "learningpath",
|
||||||
type: ROUTER,
|
"chapterId": data.value.currentStageId,
|
||||||
infoId: routerId,
|
"courseId": d.courseId,
|
||||||
courseId: d.courseId,
|
"quizKid": d.targetId,
|
||||||
pName: data.value.name,
|
"routerOrProjectId": routerId,
|
||||||
sName: data.value.currentStageName,
|
"studentId": userInfo.value.id,
|
||||||
chapterOrStageId: data.value.currentStageId,
|
"studentName": userInfo.value.realName
|
||||||
exname: d.name, // 测评名称
|
})
|
||||||
btype: 2 // 1项目 2 路径图
|
request(EvaluationToLearn, {
|
||||||
},
|
"businessType": "learningpath",
|
||||||
});
|
"chapterId": data.value.currentStageId,
|
||||||
|
"courseId": d.courseId,
|
||||||
|
"quizKid": d.targetId,
|
||||||
|
"routerOrProjectId": routerId,
|
||||||
|
"studentId": userInfo.value.id,
|
||||||
|
"studentName": userInfo.value.realName
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
let jumpUrl = res.data.quizUrl
|
||||||
|
// 此处写跳转url
|
||||||
|
window.open(jumpUrl, '_top')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
return
|
return
|
||||||
|
}else{
|
||||||
|
// 进行中 或者 已完成
|
||||||
|
// 调用接口 判断当前测评状态 跳转页面
|
||||||
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
|
"quizTaskId": d.quizTaskId
|
||||||
|
})
|
||||||
|
request(QueryEvaluationTaskStatusOne, {
|
||||||
|
"quizTaskId": d.quizTaskId
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
if(res.data.complete_status==2){
|
||||||
|
ElMessage.error("您已完成测评")
|
||||||
|
return
|
||||||
|
}else{
|
||||||
|
// 重新查询跳转
|
||||||
|
// 调用接口 跳转页面
|
||||||
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
|
"businessType": "learningpath",
|
||||||
|
"chapterId": data.value.currentStageId,
|
||||||
|
"courseId": d.courseId,
|
||||||
|
"quizKid": d.targetId,
|
||||||
|
"routerOrProjectId": routerId,
|
||||||
|
"studentId": userInfo.value.id,
|
||||||
|
"studentName": userInfo.value.realName
|
||||||
|
})
|
||||||
|
request(EvaluationToLearn, {
|
||||||
|
"businessType": "learningpath",
|
||||||
|
"chapterId": data.value.currentStageId,
|
||||||
|
"courseId": d.courseId,
|
||||||
|
"quizKid": d.targetId,
|
||||||
|
"routerOrProjectId": routerId,
|
||||||
|
"studentId": userInfo.value.id,
|
||||||
|
"studentName": userInfo.value.realName
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
let jumpUrl = res.data.quizUrl
|
||||||
|
// 此处写跳转url
|
||||||
|
window.open(jumpUrl, '_top')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目任务 直接跳转项目详情
|
// 项目任务 直接跳转项目详情
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ export default defineConfig(({ command, mode }) =>
|
|||||||
},'/vote/queryVoteById': {
|
},'/vote/queryVoteById': {
|
||||||
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
},'/evaluation/queryEvaluationTaskStatusOne': {
|
||||||
|
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||||
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user