diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index 99e5499..1f97ee9 100644 --- a/src/views/projectdetails/projectDetails.vue +++ b/src/views/projectdetails/projectDetails.vue @@ -567,73 +567,73 @@ function toFinish(d, sName, chapterOrStageId,studyModel) { return; } } - // if (d.type == 10) { - // if (d.quizTaskId == null) { - // // 肯定没有完成测评 - // // 调用接口 跳转页面 - // request(EvaluationToLearn, { - // "businessType": "project", - // "chapterId": chapterOrStageId, - // "courseId": d.courseId, - // "quizKid": d.targetId, - // "routerOrProjectId": projectId, - // "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 - // } 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 { - // // 重新查询跳转 - // // 调用接口 跳转页面 - // request(EvaluationToLearn, { - // "businessType": "project", - // "chapterId": chapterOrStageId, - // "courseId": d.courseId, - // "quizKid": d.targetId, - // "routerOrProjectId": projectId, - // "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 - // } - // } + if (d.type == 10) { + if (d.quizTaskId == null) { + // 肯定没有完成测评 + // 调用接口 跳转页面 + request(EvaluationToLearn, { + "businessType": "project", + "chapterId": chapterOrStageId, + "courseId": d.courseId, + "quizKid": d.targetId, + "routerOrProjectId": projectId, + "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 + } 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 { + // 重新查询跳转 + // 调用接口 跳转页面 + request(EvaluationToLearn, { + "businessType": "project", + "chapterId": chapterOrStageId, + "courseId": d.courseId, + "quizKid": d.targetId, + "routerOrProjectId": projectId, + "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 + } + } if (!TASK_TYPES.path[d.type]) { ElMessage.error("暂时未开放");