From 2ebc17e3bbe2baa31824da432e1c7c1297f7dfa0 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 3 Mar 2023 00:19:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=9D=A2=E6=8E=88?= =?UTF-8?q?=E8=AF=BE=E5=8E=BB=E8=80=83=E8=AF=95=E5=8F=8A=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BC=A0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/faceteach/FaceTeach.vue | 36 +++++++++++++++------ src/views/homework/HomeworkPage.vue | 4 +-- src/views/testscore/ExternalExamination.vue | 4 +-- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue index 9ec27a2..351d6ff 100644 --- a/src/views/faceteach/FaceTeach.vue +++ b/src/views/faceteach/FaceTeach.vue @@ -236,7 +236,7 @@ name="third" :disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))" > -
+
{{ data.examinationDto?.examinationName }} @@ -244,8 +244,7 @@
+ v-if="data.examinationDto?.examinationFlag"> 必修
考试
@@ -260,8 +259,7 @@ : '', }" class="submit" - @click="toExamItem(data.examinationDto)" - > + @click="toExamItem(data.examinationDto)"> 去考试
@@ -481,6 +479,7 @@ function toSurvery() { } function toWork() { + console.log(data) if (data.value.planDto.beginTime) { let date1 = new Date(data.value.planDto.beginTime).getTime(); let date2 = new Date().getTime(); @@ -510,11 +509,28 @@ function toExamItem(obj) { ElMessage.warning("未到开始时间,请耐心等待!"); } } - console.log("obj", obj.examinationTestId); - window.open( - window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, - "_top" - ); //测评 + console.log("obj", obj, obj.examType); + // 判断内部还是外部考试 + if(obj.examType==2){ + router.push({ + path: '/externalexamination', + query: { + courseId: obj.id, + type: 3, + exname: obj.examinationName, // 考试名称 + }, + }); + }else{ + window.open( + window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, + "_top" + ); + } + // window.open( + // window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, + // "_top" + // ); + //测评 // router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId }); } diff --git a/src/views/homework/HomeworkPage.vue b/src/views/homework/HomeworkPage.vue index d1defe4..c8733fb 100644 --- a/src/views/homework/HomeworkPage.vue +++ b/src/views/homework/HomeworkPage.vue @@ -487,8 +487,8 @@ const { } = useRoute(); const { data } = taskId && taskId !== "undefined" - ? useRequest(TASK_WORK_DETAIL, { workId, taskId }) - : useRequest(TASK_WORK_DETAIL, { workId }); + ? useRequest(TASK_WORK_DETAIL, { workId, taskId, type }) + : useRequest(TASK_WORK_DETAIL, { workId, type }); console.log("data==----->", data); diff --git a/src/views/testscore/ExternalExamination.vue b/src/views/testscore/ExternalExamination.vue index c4fdbfb..6032404 100644 --- a/src/views/testscore/ExternalExamination.vue +++ b/src/views/testscore/ExternalExamination.vue @@ -82,7 +82,7 @@ import {useTaskPage} from "@/api/useCommon"; const { - query: {courseId, pName, sName, chapterOrStageId, infoId, id, exname}, + query: {courseId, pName, sName, chapterOrStageId, infoId, id, exname, type}, } = useRoute(); const {nextPage,prevPage,hasPrev, hasNext} = useTaskPage() const router = useRouter(); @@ -95,7 +95,7 @@ }) //获取基本信息 - request(EXTERNALEXAM, {externalId:courseId}).then(res=>{ + request(EXTERNALEXAM, {externalId:courseId, type}).then(res=>{ console.log(res) state.datainfo = res.data }).catch(err=>{