diff --git a/src/api/CONST.js b/src/api/CONST.js
index 01c1bd3..80a15b5 100644
--- a/src/api/CONST.js
+++ b/src/api/CONST.js
@@ -42,7 +42,7 @@ export const TASK_TYPES = {
},
path: {
1: ({ courseId }) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线
- 2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
+ 2: ({ targetId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${targetId}`, '_top'),
3: ({ courseId }) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
4: "/homeworkpage",
5: ({ examType }) => examType === 2 ? '/externalexam' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
diff --git a/src/views/pathmap/PathmapPage.vue b/src/views/pathmap/PathmapPage.vue
index ab7bf0f..03bd1bc 100644
--- a/src/views/pathmap/PathmapPage.vue
+++ b/src/views/pathmap/PathmapPage.vue
@@ -137,25 +137,17 @@
-
- {{
- el.statusName ||
- (data.unlockMode === 1
- ? TASK_TYPES.toName[el.type]
- : "未解锁")
- }}
-
+
+
+ {{el.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[el.type] : "未解锁")}}
+
+
+
+ {{ name }}
+
+
+
@@ -241,11 +233,11 @@ const types = ref({
},
path: {
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
- 2: ({ courseId }) =>
+ 2: ({ targetId }) =>
window.open(
`${location.protocol}//${location.host}${
import.meta.env.VITE_BASE_API
- }/stu/project/redirectDetail?courseId=${courseId}`,
+ }/stu/project/redirectDetail?courseId=${targetId}`,
"_top"
),
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
@@ -316,12 +308,18 @@ function judgeTaskIsEnd(type, endTimes, status) {
return isEnd;
}
function toFinish(d) {
- console.log(d);
- console.log(data.value.currentStageId, routerId);
if (data.value.unlockMode !== 1 && !d.statusName) {
ElMessage.warning("当前未解锁");
return;
}
+ if (d.type === 2) {
+ if(!d.targetId){
+ return ElMessage.error("还未添加开课,请联系管理员!")
+ }
+ if(d.targetId.split(',').length>1){
+ return
+ }
+ }
if (
data.value.endTime &&
judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)
@@ -504,6 +502,9 @@ function toFinish(d) {
// // console.log("types.value.path[d.type](d)", d);
// }
}
+function toOffcoursePlanPage(id){
+ window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${id}`, '_top')
+}
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}
diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue
index be1c598..108d2bd 100644
--- a/src/views/projectdetails/projectDetails.vue
+++ b/src/views/projectdetails/projectDetails.vue
@@ -159,24 +159,19 @@
-
- {{
- el.statusName ||
- (data.unlockMode === 1
- ? TASK_TYPES.toName[el.type]
- : "未解锁")
- }}
-
+
+
+
+ {{el.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[el.type] : "未解锁")}}
+
+
+
+ {{ name }}
+
+
+
+
+
@@ -332,13 +327,7 @@ const types = ref({
},
path: {
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
- 2: ({ courseId }) =>
- window.open(
- `${location.protocol}//${location.host}${
- import.meta.env.VITE_BASE_API
- }/stu/project/redirectDetail?courseId=${courseId}`,
- "_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, //考试
@@ -419,8 +408,14 @@ function toFinish(d, sName, chapterOrStageId) {
ElMessage.warning("当前未解锁");
return;
}
- console.log("dddddd", data, d, sName, chapterOrStageId);
-
+ if (d.type === 2) {
+ if(!d.targetId){
+ return ElMessage.error("还未添加开课,请联系管理员!")
+ }
+ if(d.targetId.split(',').length>1){
+ return
+ }
+ }
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
ElMessage.error("当前任务已结束");
return;
@@ -588,6 +583,11 @@ function toFinish(d, sName, chapterOrStageId) {
// types.value.path[d.type](d);
// }
}
+
+function toOffcoursePlanPage(id){
+ window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${id}`, '_top')
+}
+
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}