This commit is contained in:
zhangsir
2024-06-28 13:51:03 +08:00
parent ad270b43e8
commit b3a9563185

View File

@@ -567,73 +567,73 @@ function toFinish(d, sName, chapterOrStageId,studyModel) {
return; return;
} }
} }
if (d.type == 10) { // if (d.type == 10) {
if (d.quizTaskId == null) { // if (d.quizTaskId == null) {
// 肯定没有完成测评 // // 肯定没有完成测评
// 调用接口 跳转页面 // // 调用接口 跳转页面
request(EvaluationToLearn, { // request(EvaluationToLearn, {
"businessType": "project", // "businessType": "project",
"chapterId": chapterOrStageId, // "chapterId": chapterOrStageId,
"courseId": d.courseId, // "courseId": d.courseId,
"quizKid": d.targetId, // "quizKid": d.targetId,
"routerOrProjectId": projectId, // "routerOrProjectId": projectId,
"studentId": userInfo.value.id, // "studentId": userInfo.value.id,
"studentName": userInfo.value.realName // "studentName": userInfo.value.realName
}).then(res => { // }).then(res => {
console.log(res) // console.log(res)
if (res.code == 200) { // if (res.code == 200) {
let jumpUrl = res.data.quizUrl // let jumpUrl = res.data.quizUrl
// 此处写跳转url // // 此处写跳转url
window.open(jumpUrl, '_top') // window.open(jumpUrl, '_top')
} // }
}).catch(err => { // }).catch(err => {
console.log(err) // console.log(err)
}) // })
return // return
} else { // } else {
// 进行中 或者 已完成 // // 进行中 或者 已完成
// 调用接口 判断当前测评状态 跳转页面 // // 调用接口 判断当前测评状态 跳转页面
console.log('我是查询测评跳转链接所传递得参数', { // console.log('我是查询测评跳转链接所传递得参数', {
"quizTaskId": d.quizTaskId // "quizTaskId": d.quizTaskId
}) // })
request(QueryEvaluationTaskStatusOne, { // request(QueryEvaluationTaskStatusOne, {
"quizTaskId": d.quizTaskId // "quizTaskId": d.quizTaskId
}).then(res => { // }).then(res => {
console.log(res) // console.log(res)
if (res.code == 200) { // if (res.code == 200) {
if (res.data.complete_status == 2) { // if (res.data.complete_status == 2) {
ElMessage.error("您已完成测评") // ElMessage.error("您已完成测评")
return // return
} else { // } else {
// 重新查询跳转 // // 重新查询跳转
// 调用接口 跳转页面 // // 调用接口 跳转页面
request(EvaluationToLearn, { // request(EvaluationToLearn, {
"businessType": "project", // "businessType": "project",
"chapterId": chapterOrStageId, // "chapterId": chapterOrStageId,
"courseId": d.courseId, // "courseId": d.courseId,
"quizKid": d.targetId, // "quizKid": d.targetId,
"routerOrProjectId": projectId, // "routerOrProjectId": projectId,
"studentId": userInfo.value.id, // "studentId": userInfo.value.id,
"studentName": userInfo.value.realName // "studentName": userInfo.value.realName
}).then(res => { // }).then(res => {
console.log(res) // console.log(res)
if (res.code == 200) { // if (res.code == 200) {
let jumpUrl = res.data.quizUrl // let jumpUrl = res.data.quizUrl
// 此处写跳转url // // 此处写跳转url
window.open(jumpUrl, '_top') // window.open(jumpUrl, '_top')
} // }
}).catch(err => { // }).catch(err => {
console.log(err) // console.log(err)
}) // })
return // return
} // }
} // }
}).catch(err => { // }).catch(err => {
console.log(err) // console.log(err)
}) // })
return // return
} // }
} // }
if (!TASK_TYPES.path[d.type]) { if (!TASK_TYPES.path[d.type]) {
ElMessage.error("暂时未开放"); ElMessage.error("暂时未开放");