mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
init
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div
|
||||
class="course"
|
||||
v-for="(value, index) in i.taskProcessList"
|
||||
v-for="(value, index) in i.taskProcessList.filter(e=>!whiteTypes(e.type))"
|
||||
:key="index"
|
||||
>
|
||||
<div>
|
||||
@@ -311,6 +311,7 @@ import {useRequest, request} from "@/api/request";
|
||||
import {PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import store from "@/store";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const {
|
||||
query: {courseId, projectId},
|
||||
@@ -364,16 +365,13 @@ const types = ref({
|
||||
4: "/homeworkpage",
|
||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
6: "/livebroadcast",
|
||||
7: " ",
|
||||
7: ({courseId}) => request(LINK_DETAILS(courseId), {}).then(({data: {linkAddress}}) => window.open(linkAddress)),//外联
|
||||
8: "/discusspage",
|
||||
9: "/moreactive",
|
||||
10: [
|
||||
import.meta.env.VITE_BOE_TEST_DETAIL_URL,
|
||||
import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL,
|
||||
], //测评
|
||||
10: ({evaTyp, targetId}) => window.open((evaTyp === 1 ? import.meta.env.VITE_BOE_TEST_DETAIL_URL : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId), //测评
|
||||
11: "/surveydetail",
|
||||
12: "/ballotpage",
|
||||
13: "去完成",
|
||||
13: "/projectdetails",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -382,46 +380,19 @@ function toFinish(d) {
|
||||
ElMessage.error("暂时未开放");
|
||||
return;
|
||||
}
|
||||
if (d.type == 10) {
|
||||
let url = "";
|
||||
if (d.evaTyp == 1) {
|
||||
url = types.value.path[d.type][1] + d.targetId;
|
||||
} else {
|
||||
url = types.value.path[d.type][0] + d.targetId;
|
||||
}
|
||||
// import.meta.env.DEV
|
||||
// ? (window.location.href = url)
|
||||
// : (window.parent.location.href = url);
|
||||
window.open(url)
|
||||
return;
|
||||
|
||||
if (typeof types.value.path[d.type] === 'string') {
|
||||
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId)
|
||||
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({
|
||||
path: types.value.path[d.type],
|
||||
query: {id: d.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName},
|
||||
})
|
||||
} else if (typeof types.value.path[d.type] === 'function') {
|
||||
types.value.path[d.type](d)
|
||||
}
|
||||
if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) {
|
||||
//配置文件
|
||||
const url = types.value.path[d.type] + d.targetId;
|
||||
// import.meta.env.DEV
|
||||
// ? (window.location.href = url)
|
||||
// : (window.parent.location.href = url);
|
||||
window.open(url)
|
||||
return;
|
||||
}
|
||||
if (d.type === 7) {
|
||||
// console.log("url", d, url);
|
||||
request(LINK_DETAILS(d.courseId), {}).then((res) => {
|
||||
console.log("resssss", res);
|
||||
if (res.code === 200) {
|
||||
const url = res.data.linkAddress;
|
||||
// import.meta.env.DEV
|
||||
// ? (window.location.href = url)
|
||||
// : (window.parent.location.href = url);
|
||||
window.open(url)
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: types.value.path[d.type],
|
||||
query: {id: d.projectTaskId, type: 2, courseId: d.courseId},
|
||||
});
|
||||
}
|
||||
function whiteTypes(type){
|
||||
return import.meta.env.VITE_TASK_WHITE_TYPE.includes(type+'')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user