From 1f091bce39fa6de32cd0053f7571a2a8609f95a8 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 25 Jun 2024 15:36:49 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 3 +++ src/views/ballotpage/BallotPage.vue | 13 +++++++++++++ src/views/homeworkpage/HomeworkPage.vue | 12 ++++++++++++ src/views/investigat/InvestigatPage.vue | 10 ++++++++++ 4 files changed, 38 insertions(+) diff --git a/src/api/api.js b/src/api/api.js index 6a24190..9c6244d 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -35,9 +35,11 @@ export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post' export const LINK_DETAILS = `/link/getOne` export const STUDY_RECORD = '/stu/task/thirdTask/submit post' export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById' +export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post` export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId' export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById` export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post' +export const TASK_NO_COMMIT = `/stu/task/evaluate/nocommit post` export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/stuUploadAnnex' export const ROUTER_DETAILS = '/admin/router/detail' export const TASK_LIST = '/stu/tasks' @@ -88,5 +90,6 @@ export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + '/file/img' export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne` // 投票浏览和参与数目 export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post` +export const NO_COMMIT = `/voteSubmit/vote/nocommit post` //任务是否删除 export const checkStudentExist = `/admin/taskmanage/checkStudentExist post` \ No newline at end of file diff --git a/src/views/ballotpage/BallotPage.vue b/src/views/ballotpage/BallotPage.vue index 56b956c..ba84e72 100644 --- a/src/views/ballotpage/BallotPage.vue +++ b/src/views/ballotpage/BallotPage.vue @@ -181,6 +181,7 @@ import { VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse, + NO_COMMIT, checkStudentExist, } from "@/api/api"; import dayjs from "dayjs"; @@ -230,6 +231,18 @@ watch(data, () => { useRequest(EditVoteInvolvedAndBrowse, { operationType: "2", voteId: data.value.id, + },(res)=>{ + let noCommitParams = { + beginTime: answerTime, + chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, + result: JSON.stringify(data.value), + targetId: infoId, // 项目 路径图 id + taskId: id, + type: btype, // 1 项目 2 路径图 + voteId: data.value.id, + voteName: data.value.voteName, + } + useRequest(NO_COMMIT, noCommitParams); }); }); console.log("投票基本信息", data); diff --git a/src/views/homeworkpage/HomeworkPage.vue b/src/views/homeworkpage/HomeworkPage.vue index 32d5935..49b4412 100644 --- a/src/views/homeworkpage/HomeworkPage.vue +++ b/src/views/homeworkpage/HomeworkPage.vue @@ -99,6 +99,7 @@ import { TASK_WORK_COMMIT, TASK_WORK_DETAIL, TASK_WORK_SUBMIT_LIST, + SUB_STUDENT_DETAIL, WORK_HISTROY, checkStudentExist, } from "@/api/api"; @@ -272,6 +273,17 @@ const dohomework = () => { // function reUpload(i) { // uploadRef.value.reUpload(i); // } +const handleSub = () => { + request(SUB_STUDENT_DETAIL,{ + projectOrRouterLogo: type, + workUploadContent: sbValue.value.content, + workUploadAddress: fileList.value.map((e) => e.url).join(",") || "", + workId, + type, + taskId: taskId || infoId, + }) +} +handleSub() diff --git a/src/views/investigat/InvestigatPage.vue b/src/views/investigat/InvestigatPage.vue index c02189f..a983329 100644 --- a/src/views/investigat/InvestigatPage.vue +++ b/src/views/investigat/InvestigatPage.vue @@ -266,6 +266,7 @@ import { request, usePage, useRequest } from "@/api/request"; import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT, + TASK_NO_COMMIT, checkStudentExist, } from "@/api/api"; import { ElMessage } from "element-plus"; @@ -416,6 +417,15 @@ onMounted(() => { chapterOrStageId, targetId: infoId ? infoId : 0, },(res)=>{ + useRequest(TASK_NO_COMMIT, { + targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id + chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空 + assessmentId: courseId, + taskId: taskId ? taskId : 0, + type, + result: JSON.stringify(data.value), + beginTime: answerTime, + }) if (res.data.isSubmit) { open(); } From fdc23445607b3e996b765c072046b7bdba7b26fb Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 25 Jun 2024 19:37:29 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectdetails/projectDetails.vue | 85 +++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index c6fa130..8941f11 100644 --- a/src/views/projectdetails/projectDetails.vue +++ b/src/views/projectdetails/projectDetails.vue @@ -565,6 +565,91 @@ function toFinish(d, sName, chapterOrStageId,studyModel) { return; } } + if (d.type == 10) { + if (d.quizTaskId == null) { + // 肯定没有完成测评 + // 调用接口 跳转页面 + console.log('我是查询测评跳转链接所传递得参数', { + "businessType": "project", + "chapterId": chapterOrStageId, + "courseId": d.courseId, + "quizKid": d.targetId, + "routerOrProjectId": projectId, + "studentId": userInfo.value.id, + "studentName": userInfo.value.realName + }) + 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 { + // 重新查询跳转 + // 调用接口 跳转页面 + console.log('我是查询测评跳转链接所传递得参数', { + "businessType": "project", + "chapterId": chapterOrStageId, + "courseId": d.courseId, + "quizKid": d.targetId, + "routerOrProjectId": projectId, + "studentId": userInfo.value.id, + "studentName": userInfo.value.realName + }) + 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("暂时未开放"); From 9094ca0dd0637015a5a3631dde0bcc7cb36129aa Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 25 Jun 2024 19:53:33 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectdetails/projectDetails.vue | 24 ++++----------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index 8941f11..cd3dc6e 100644 --- a/src/views/projectdetails/projectDetails.vue +++ b/src/views/projectdetails/projectDetails.vue @@ -236,6 +236,8 @@ import { SubmitExternalExam, UPDATE_CURRENT_TASK, checkStudentExist, + EvaluationToLearn, + QueryEvaluationTaskStatusOne } from "@/api/api"; import { useRoute, useRouter } from "vue-router"; import store from "@/store"; @@ -568,16 +570,7 @@ function toFinish(d, sName, chapterOrStageId,studyModel) { if (d.type == 10) { if (d.quizTaskId == null) { // 肯定没有完成测评 - // 调用接口 跳转页面 - console.log('我是查询测评跳转链接所传递得参数', { - "businessType": "project", - "chapterId": chapterOrStageId, - "courseId": d.courseId, - "quizKid": d.targetId, - "routerOrProjectId": projectId, - "studentId": userInfo.value.id, - "studentName": userInfo.value.realName - }) + // 调用接口 跳转页面 request(EvaluationToLearn, { "businessType": "project", "chapterId": chapterOrStageId, @@ -613,16 +606,7 @@ function toFinish(d, sName, chapterOrStageId,studyModel) { return } else { // 重新查询跳转 - // 调用接口 跳转页面 - console.log('我是查询测评跳转链接所传递得参数', { - "businessType": "project", - "chapterId": chapterOrStageId, - "courseId": d.courseId, - "quizKid": d.targetId, - "routerOrProjectId": projectId, - "studentId": userInfo.value.id, - "studentName": userInfo.value.realName - }) + // 调用接口 跳转页面 request(EvaluationToLearn, { "businessType": "project", "chapterId": chapterOrStageId, From 54821e1101ad37f30afb9562239aad76dac6cf30 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 28 Jun 2024 12:36:26 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=A4=96=E9=93=BE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 2 ++ src/views/outerchain/OuterChain.vue | 44 ++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 9c6244d..9898423 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -34,6 +34,8 @@ export const TASK_OFFCOURSE_NOTASK_SIGN = '/stu/task/offcourse/notask/sign post' export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post' export const LINK_DETAILS = `/link/getOne` export const STUDY_RECORD = '/stu/task/thirdTask/submit post' +export const LEARN = `/xboe/m/boe/umu/enterprise/learn post` +export const NOLOGINURL = `/xboe/m/boe/hongshan/noLoginUrl post` export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById' export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post` export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId' diff --git a/src/views/outerchain/OuterChain.vue b/src/views/outerchain/OuterChain.vue index 2057e65..2e89107 100644 --- a/src/views/outerchain/OuterChain.vue +++ b/src/views/outerchain/OuterChain.vue @@ -46,7 +46,7 @@
-
去查看
+
去查看
@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue"; import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue"; import img from "@/assets/image/uploadimg.png"; import { request, useRequest } from "@/api/request"; -import { LINK_DETAILS, STUDY_RECORD, checkStudentExist } from "@/api/api"; +import { LINK_DETAILS, STUDY_RECORD, checkStudentExist,LEARN,NOLOGINURL } from "@/api/api"; import { useRoute } from "vue-router/dist/vue-router"; import { useRouter } from "vue-router"; import { useUserInfo } from "@/api/utils"; @@ -105,19 +105,35 @@ const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => { console.log("外链信息", data); const userInfo = computed(() => store.state.userInfo); -const goOuterChain = () => { +const goOuterChain = async (url) => { console.log("userInfo", userInfo); - request(STUDY_RECORD, { - studentId: userInfo.value.id, - targetId: infoId, - logo: type, - stageOrChapterId: chapterOrStageId, - taskId: taskId, - type: type, - taskType: 7, - }); - - window.open(data.value.linkAddress, "_top"); + // request(STUDY_RECORD, { + // studentId: userInfo.value.id, + // targetId: infoId, + // logo: type, + // stageOrChapterId: chapterOrStageId, + // taskId: taskId, + // type: type, + // taskType: 7, + // }); + if(url.includes('umu.cn')){ + await request(LEARN, {url,userId:userInfo.value.userId}).then(res=>{ + if(res.code == 200){ + window.open(res.data) + } + }) + return + } + if(url.includes('firacademy.com')){ + await request(NOLOGINURL, {url,userId:userInfo.value.userId}).then(res=>{ + if(res.code == 200){ + window.open(res.data) + } + }) + return + } + window.open(url); + // window.open(data.value.linkAddress, "_top"); }; From ad270b43e8e942a0b78d46a6badcd3fd9d66fd39 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 28 Jun 2024 12:49:44 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=A4=96=E9=93=BE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/outerchain/OuterChain.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/outerchain/OuterChain.vue b/src/views/outerchain/OuterChain.vue index 2e89107..0c8ed89 100644 --- a/src/views/outerchain/OuterChain.vue +++ b/src/views/outerchain/OuterChain.vue @@ -118,8 +118,9 @@ const goOuterChain = async (url) => { // }); if(url.includes('umu.cn')){ await request(LEARN, {url,userId:userInfo.value.userId}).then(res=>{ + console.log(res,'res') if(res.code == 200){ - window.open(res.data) + window.open(res.data, "_top") } }) return @@ -127,7 +128,7 @@ const goOuterChain = async (url) => { if(url.includes('firacademy.com')){ await request(NOLOGINURL, {url,userId:userInfo.value.userId}).then(res=>{ if(res.code == 200){ - window.open(res.data) + window.open(res.data, "_top") } }) return From b3a9563185deccfbcbb64af48006a99847015266 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 28 Jun 2024 13:51:03 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectdetails/projectDetails.vue | 134 ++++++++++---------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index cd3dc6e..99e5499 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("暂时未开放"); From c8aa93c4d72c738160eff648d3cb7ebe058cfbd0 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Wed, 10 Jul 2024 17:07:18 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=B8=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 13f1a6f..9111ef0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -101,7 +101,7 @@ export default createStore({ } state.routerInfo.statusName = '进行中' if (state.routerInfo.unlockMode === 1) { - state.routerInfo.taskBoList?.forEach((s) => s.statusName = (s.status === 1) ? '已完成' : TASK_TYPES.toName[s.type]) + state.routerInfo.taskBoList?.forEach((s) => s.statusName = (s.status === 1) ? "已完成" : s.status === 2 ? (s.statusName = "进行中") : TASK_TYPES.toName[s.type]); state.routerInfo.taskBoList?.every((s) => s.status === 1) && (state.routerInfo.statusName = '已完成') return } @@ -109,7 +109,7 @@ export default createStore({ state.routerInfo.taskBoList?.some((s) => { s.unlock = true s.statusName = '已完成' - s.status !== 1 && (s.statusName = TASK_TYPES.toName[s.type]) + s.status === 2 ? (s.statusName = "进行中") : (!s.status && (s.statusName = TASK_TYPES.toName[s.type])); return state.routerInfo.unlockMode === 2 ? s.status !== 1 : (s.status !== 1 && s.flag) }) && (state.routerInfo.statusName = '进行中') }, From fda3d2958834ecad2da1a74e637713622391cfb1 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 12 Jul 2024 10:15:43 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=94=BE=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectdetails/projectDetails.vue | 134 ++++++++++---------- 1 file changed, 67 insertions(+), 67 deletions(-) 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("暂时未开放");