From 01d3b03a8dac2145b7e47f4a6f51c5fa98a10362 Mon Sep 17 00:00:00 2001 From: lixg Date: Thu, 2 Mar 2023 10:29:58 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E6=8A=95=E7=A5=A8?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/views/ballotpage/BallotPage.vue | 2 +- src/views/evaluation/Evaluation.vue | 10 +++++----- src/views/liveboradcast/LiveBoradcast.vue | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index 562ec06..e1ae1eb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,7 +27,7 @@ import { GET_USER_INFO } from "@/api/ThirdApi"; import { getCookie } from "@/api/utils"; import { USER_INFO } from "@/api/api"; -console.log("版本1.3.1------------"); +console.log("版本1.3.2------------"); const store = useStore(); const router = useRouter(); diff --git a/src/views/ballotpage/BallotPage.vue b/src/views/ballotpage/BallotPage.vue index fb180ba..d6c7ccc 100644 --- a/src/views/ballotpage/BallotPage.vue +++ b/src/views/ballotpage/BallotPage.vue @@ -182,7 +182,7 @@ import dayjs from "dayjs"; import store from "@/store"; import { ElMessage } from "element-plus"; import { useRoute, useRouter } from "vue-router/dist/vue-router"; - +const router = useRouter(); const { query: { courseId, chapterOrStageId, infoId, id, btype }, } = useRoute(); diff --git a/src/views/evaluation/Evaluation.vue b/src/views/evaluation/Evaluation.vue index b227324..c864c91 100644 --- a/src/views/evaluation/Evaluation.vue +++ b/src/views/evaluation/Evaluation.vue @@ -139,11 +139,11 @@ const goOuterChain = () => { }) .then((res) => { console.log(res); - // if (res.code == 200) { - // let jumpUrl = res.data.quizUrl; - // // 此处写跳转url - // window.open(jumpUrl, "_top"); - // } + if (res.code == 200) { + let jumpUrl = res.data.quizUrl; + // 此处写跳转url + window.open(jumpUrl, "_top"); + } }) .catch((err) => { console.log(err); diff --git a/src/views/liveboradcast/LiveBoradcast.vue b/src/views/liveboradcast/LiveBoradcast.vue index b551b5f..4ebcc07 100644 --- a/src/views/liveboradcast/LiveBoradcast.vue +++ b/src/views/liveboradcast/LiveBoradcast.vue @@ -16,10 +16,10 @@
-
+
{{ data?.liveName }}
From 91b503be4eecb10bc41591be5f4178fe3b03822d Mon Sep 17 00:00:00 2001 From: lixg Date: Thu, 2 Mar 2023 13:38:27 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index e1ae1eb..79eceb8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,7 +27,7 @@ import { GET_USER_INFO } from "@/api/ThirdApi"; import { getCookie } from "@/api/utils"; import { USER_INFO } from "@/api/api"; -console.log("版本1.3.2------------"); +console.log("版本1.3.3------------"); const store = useStore(); const router = useRouter(); From 7e5a014802b458c36706d1e3d27ddef50414b863 Mon Sep 17 00:00:00 2001 From: lixg Date: Thu, 2 Mar 2023 21:50:46 +0800 Subject: [PATCH 03/10] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=84?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 6 +- src/views/evaluation/Evaluation.vue | 97 +++++++++++++++++++++++------ src/views/faceteach/FaceTeach.vue | 31 +++++---- src/views/filestorag/fileStorag.vue | 4 +- src/views/pathmap/PathmapPage.vue | 1 + 5 files changed, 104 insertions(+), 35 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 62ab106..f196a15 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2023-01-13 11:42:48 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-03-01 19:07:28 + * @LastEditTime: 2023-03-02 18:04:53 * @FilePath: /stu_h5/src/api/api.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -82,4 +82,6 @@ export const SubmitExternalExam = `/stu/externalExam/submitExternalExam post` export const UPDATE_CURRENT_TASK = `/admin/student/updateCurrentTask post` // 测评任务去学习 export const EvaluationToLearn = '/evaluation/evaluationToLearn post' -export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img' \ No newline at end of file +export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img' +// 查询单个测评的状态 +export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne` \ No newline at end of file diff --git a/src/views/evaluation/Evaluation.vue b/src/views/evaluation/Evaluation.vue index c864c91..9b71199 100644 --- a/src/views/evaluation/Evaluation.vue +++ b/src/views/evaluation/Evaluation.vue @@ -71,7 +71,12 @@ 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 { EVALUATION_DETAIL, STUDY_RECORD, EvaluationToLearn } from "@/api/api"; +import { + EVALUATION_DETAIL, + STUDY_RECORD, + EvaluationToLearn, + QueryEvaluationTaskStatusOne, +} from "@/api/api"; import { useRoute } from "vue-router/dist/vue-router"; import { useRouter } from "vue-router"; import { useUserInfo } from "@/api/utils"; @@ -86,6 +91,7 @@ const { chapterOrStageId, infoId, btype, + quizTaskId, }, } = useRoute(); const router = useRouter(); @@ -128,26 +134,77 @@ onUnmounted(() => { }); const goOuterChain = () => { console.log("点击去查看"); - request(EvaluationToLearn, { - businessType: btype == 1 ? "project" : "learningpath", - chapterId: chapterOrStageId, - courseId: evaluationId, - quizKid: data.value.evaluationTypeId, - routerOrProjectId: infoId, - 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"); - } + if (quizTaskId == null) { + request(EvaluationToLearn, { + businessType: btype == 1 ? "project" : "learningpath", + chapterId: chapterOrStageId, + courseId: evaluationId, + quizKid: data.value.evaluationTypeId, + routerOrProjectId: infoId, + studentId: userInfo.value.id, + studentName: userInfo.value.realName, }) - .catch((err) => { - console.log(err); - }); + .then((res) => { + console.log(res); + if (res.code == 200) { + let jumpUrl = res.data.quizUrl; + // 此处写跳转url + window.open(jumpUrl, "_top"); + } + }) + .catch((err) => { + console.log(err); + }); + } else { + request(QueryEvaluationTaskStatusOne, { + quizTaskId: quizTaskId, + }) + .then((res) => { + console.log(res); + if (res.code == 200) { + if (res.data.complete_status == 2) { + ElMessage.error("您已完成测评"); + return; + } else { + // 重新查询跳转 + // 调用接口 跳转页面 + console.log("我是查询测评跳转链接所传递得参数", { + businessType: btype === 2 ? "learningpath" : "project", + chapterId: chapterOrStageId, + courseId: evaluationId, + quizKid: data.value.evaluationTypeId, + routerOrProjectId: infoId, + studentId: userInfo.value.id, + studentName: userInfo.value.realName, + }); + request(EvaluationToLearn, { + businessType: "learningpath", + chapterId: chapterOrStageId, + courseId: evaluationId, + quizKid: data.value.evaluationTypeId, + routerOrProjectId: infoId, + 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); + }); + } + } + }) + .catch((err) => { + console.log(err); + }); + } + // window.open( // evaType == 0 // ? window.location.protocol + diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue index d7608d7..e7573c0 100644 --- a/src/views/faceteach/FaceTeach.vue +++ b/src/views/faceteach/FaceTeach.vue @@ -314,7 +314,7 @@ name="third" :disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))" > -
+
{{ data.examinationDto?.examinationName }}
@@ -559,9 +559,9 @@ function toWork() { router.push({ path: "/homeworkpage", query: { - courseId: data.value.workDto.workId, + courseId: data.value.planDto.homeWorkId, id: taskId, - infoId: data.value.offcourseDto.offcourseId, + infoId: data.value.planDto.id, chapterOrStageId: 0, type, pName: "面授课", @@ -579,14 +579,23 @@ function toExamItem(obj) { return; } } - console.log("obj", obj.examinationTestId); - window.open( - window.location.protocol + - import.meta.env.VITE_BOE_EXAM_DETAIL_URL + - "/mobile/pages/exam/exam?id=" + - obj.examinationTestId, - "_top" - ); //测评 + console.log("obj", obj); + if (obj.examType === 2) { + router.push({ + path: "/externalexam", + query: { + courseId: obj.id, + }, + }); + } else { + window.open( + window.location.protocol + + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + + obj.id, + "_top" + ); + } + // router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId }); } diff --git a/src/views/filestorag/fileStorag.vue b/src/views/filestorag/fileStorag.vue index 321fd6b..7136457 100644 --- a/src/views/filestorag/fileStorag.vue +++ b/src/views/filestorag/fileStorag.vue @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2023-01-13 11:42:48 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-02-18 15:27:53 + * @LastEditTime: 2023-03-02 13:55:02 * @FilePath: /stu_h5/src/views/filestorag/fileStorag.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -108,7 +108,7 @@ const fileList = computed(() => ); //下载 function downloadFile(url) { - window.open(url); + window.open(import.meta.env.VITE_FILE_PATH + url); }