-
-
{{ item }}
-
+
+
+ {{ item }}
+
+
去上课
+ style="
+ width: 60px;
+ height: 30px;
+ text-align: center;
+ line-height: 30px;
+ background: #0078fc;
+ border-radius: 5px;
+ color: #fff;
+ cursor: pointer;
+ "
+ >
+ 去上课
+
@@ -237,7 +324,7 @@ import {
UPDATE_CURRENT_TASK,
checkStudentExist,
EvaluationToLearn,
- QueryEvaluationTaskStatusOne
+ QueryEvaluationTaskStatusOne,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
@@ -266,7 +353,10 @@ useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
- path: "/loseefficacy",
+ path: "/loseEfficacyProject",
+ query: {
+ msg: res.message,
+ },
});
} else {
if (res.code === 6) {
@@ -377,7 +467,13 @@ const types = ref({
},
path: {
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
- 2: ({ targetId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${targetId}`, "_top"),
+ 2: ({ targetId }) =>
+ window.open(
+ `${location.protocol}//${location.host}${
+ import.meta.env.VITE_BASE_API
+ }/stu/project/redirectDetail?courseId=${targetId}`,
+ "_top"
+ ),
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
4: "/homeworkpage",
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
@@ -453,24 +549,28 @@ function judgeTaskIsEnd(type, endTimes, status) {
return isEnd;
}
-function toFinish(d, sName, chapterOrStageId,studyModel) {
+function toFinish(d, sName, chapterOrStageId, studyModel) {
if (studyModel != 0 && !d.statusName) {
- ElMessage.warning("当前未解锁")
- return
+ ElMessage.warning("当前未解锁");
+ return;
}
- if(d.statusName == '未解锁'|| d.statusName == ''||!d.hasOwnProperty('statusName')){
- ElMessage.warning("当前未解锁")
- return
+ if (
+ d.statusName == "未解锁" ||
+ d.statusName == "" ||
+ !d.hasOwnProperty("statusName")
+ ) {
+ ElMessage.warning("当前未解锁");
+ return;
}
if (d.type === 2) {
- if(!d.targetId){
- return ElMessage.error("还未添加开课,请联系管理员!")
+ if (!d.targetId) {
+ return ElMessage.error("还未添加开课,请联系管理员!");
}
- if(d.targetId.split(',').length>1){
- openCourseList.value = d.targetName?.split(',');
- openCourseIdList.value = d.targetId?.split(',');
+ if (d.targetId.split(",").length > 1) {
+ openCourseList.value = d.targetName?.split(",");
+ openCourseIdList.value = d.targetId?.split(",");
openCourseVisible.value = true;
- return
+ return;
}
}
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
@@ -572,66 +672,72 @@ function toFinish(d, sName, chapterOrStageId,studyModel) {
// 肯定没有完成测评
// 调用接口 跳转页面
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)
+ businessType: "project",
+ chapterId: chapterOrStageId,
+ courseId: d.courseId,
+ quizKid: d.targetId,
+ routerOrProjectId: projectId,
+ studentId: userInfo.value.id,
+ studentName: userInfo.value.realName,
})
- return
+ .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
- })
+ 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)
+ quizTaskId: d.quizTaskId,
})
- return
+ .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;
}
}
@@ -708,8 +814,13 @@ function toFinish(d, sName, chapterOrStageId,studyModel) {
// }
}
-function toOffcoursePlanPage(id){
- window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${id}`, '_top')
+function toOffcoursePlanPage(id) {
+ window.open(
+ `${location.protocol}//${location.host}${
+ import.meta.env.VITE_BASE_API
+ }/stu/project/redirectDetail?courseId=${id}`,
+ "_top"
+ );
}
function whiteTypes(type) {
@@ -730,10 +841,10 @@ const queryAllStatus = (data) => {