mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-11 20:06:48 +08:00
feat:修改测评跳转等
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2023-01-13 11:42:48
|
* @Date: 2023-01-13 11:42:48
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @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
|
* @FilePath: /stu_h5/src/api/api.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @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 UPDATE_CURRENT_TASK = `/admin/student/updateCurrentTask post`
|
||||||
// 测评任务去学习
|
// 测评任务去学习
|
||||||
export const EvaluationToLearn = '/evaluation/evaluationToLearn post'
|
export const EvaluationToLearn = '/evaluation/evaluationToLearn post'
|
||||||
export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img'
|
export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img'
|
||||||
|
// 查询单个测评的状态
|
||||||
|
export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
|
||||||
@@ -71,7 +71,12 @@ import ReturnHead from "@/components/ReturnHead.vue";
|
|||||||
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { request, useRequest } from "@/api/request";
|
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 { useRoute } from "vue-router/dist/vue-router";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
@@ -86,6 +91,7 @@ const {
|
|||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
infoId,
|
infoId,
|
||||||
btype,
|
btype,
|
||||||
|
quizTaskId,
|
||||||
},
|
},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -128,26 +134,77 @@ onUnmounted(() => {
|
|||||||
});
|
});
|
||||||
const goOuterChain = () => {
|
const goOuterChain = () => {
|
||||||
console.log("点击去查看");
|
console.log("点击去查看");
|
||||||
request(EvaluationToLearn, {
|
if (quizTaskId == null) {
|
||||||
businessType: btype == 1 ? "project" : "learningpath",
|
request(EvaluationToLearn, {
|
||||||
chapterId: chapterOrStageId,
|
businessType: btype == 1 ? "project" : "learningpath",
|
||||||
courseId: evaluationId,
|
chapterId: chapterOrStageId,
|
||||||
quizKid: data.value.evaluationTypeId,
|
courseId: evaluationId,
|
||||||
routerOrProjectId: infoId,
|
quizKid: data.value.evaluationTypeId,
|
||||||
studentId: userInfo.value.id,
|
routerOrProjectId: infoId,
|
||||||
studentName: userInfo.value.realName,
|
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) => {
|
.then((res) => {
|
||||||
console.log(err);
|
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(
|
// window.open(
|
||||||
// evaType == 0
|
// evaType == 0
|
||||||
// ? window.location.protocol +
|
// ? window.location.protocol +
|
||||||
|
|||||||
@@ -314,7 +314,7 @@
|
|||||||
name="third"
|
name="third"
|
||||||
:disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))"
|
:disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))"
|
||||||
>
|
>
|
||||||
<div class="work" v-if="data.examinationDto?.examinationTestName">
|
<div class="work" v-if="data.examinationDto">
|
||||||
<div class="question">
|
<div class="question">
|
||||||
{{ data.examinationDto?.examinationName }}
|
{{ data.examinationDto?.examinationName }}
|
||||||
</div>
|
</div>
|
||||||
@@ -559,9 +559,9 @@ function toWork() {
|
|||||||
router.push({
|
router.push({
|
||||||
path: "/homeworkpage",
|
path: "/homeworkpage",
|
||||||
query: {
|
query: {
|
||||||
courseId: data.value.workDto.workId,
|
courseId: data.value.planDto.homeWorkId,
|
||||||
id: taskId,
|
id: taskId,
|
||||||
infoId: data.value.offcourseDto.offcourseId,
|
infoId: data.value.planDto.id,
|
||||||
chapterOrStageId: 0,
|
chapterOrStageId: 0,
|
||||||
type,
|
type,
|
||||||
pName: "面授课",
|
pName: "面授课",
|
||||||
@@ -579,14 +579,23 @@ function toExamItem(obj) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("obj", obj.examinationTestId);
|
console.log("obj", obj);
|
||||||
window.open(
|
if (obj.examType === 2) {
|
||||||
window.location.protocol +
|
router.push({
|
||||||
import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
|
path: "/externalexam",
|
||||||
"/mobile/pages/exam/exam?id=" +
|
query: {
|
||||||
obj.examinationTestId,
|
courseId: obj.id,
|
||||||
"_top"
|
},
|
||||||
); //测评
|
});
|
||||||
|
} 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 });
|
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2023-01-13 11:42:48
|
* @Date: 2023-01-13 11:42:48
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @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
|
* @FilePath: /stu_h5/src/views/filestorag/fileStorag.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @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) {
|
function downloadFile(url) {
|
||||||
window.open(url);
|
window.open(import.meta.env.VITE_FILE_PATH + url);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ function toFinish(d) {
|
|||||||
targetId: d.targetId,
|
targetId: d.targetId,
|
||||||
evaType: d.evaType,
|
evaType: d.evaType,
|
||||||
btype: 2,
|
btype: 2,
|
||||||
|
quizTaskId: d.quizTaskId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
: "";
|
: "";
|
||||||
|
|||||||
Reference in New Issue
Block a user