mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 12:26:49 +08:00
init
This commit is contained in:
4
.env
4
.env
@@ -10,4 +10,6 @@ VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
|||||||
VITE_BOE_TEST_OUT_DETAIL_URL=https://u-pre.boe.com/api/b1/tale/do-quiz?quizKid=
|
VITE_BOE_TEST_OUT_DETAIL_URL=https://u-pre.boe.com/api/b1/tale/do-quiz?quizKid=
|
||||||
VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
|
VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
|
||||||
|
VITE_TASK_WHITE_TYPE=8,12
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
* @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
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
<div style="background: #0078FC;height: 150px;width:100%;position: absolute;top:0;z-index: 1"></div>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<!-- <div id="nav">
|
<!-- <div id="nav">
|
||||||
<router-link
|
<router-link
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div> -->
|
</div> -->
|
||||||
<main>
|
<main style="z-index: 2;">
|
||||||
<router-view />
|
<router-view />
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="course"
|
class="course"
|
||||||
v-for="(value, index) in i.taskProcessList"
|
v-for="(value, index) in i.taskProcessList.filter(e=>!whiteTypes(e.type))"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@@ -311,6 +311,7 @@ import {useRequest, request} from "@/api/request";
|
|||||||
import {PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS} from "@/api/api";
|
import {PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: {courseId, projectId},
|
query: {courseId, projectId},
|
||||||
@@ -364,16 +365,13 @@ const types = ref({
|
|||||||
4: "/homeworkpage",
|
4: "/homeworkpage",
|
||||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||||
6: "/livebroadcast",
|
6: "/livebroadcast",
|
||||||
7: " ",
|
7: ({courseId}) => request(LINK_DETAILS(courseId), {}).then(({data: {linkAddress}}) => window.open(linkAddress)),//外联
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
9: "/moreactive",
|
9: "/moreactive",
|
||||||
10: [
|
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), //测评
|
||||||
import.meta.env.VITE_BOE_TEST_DETAIL_URL,
|
|
||||||
import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL,
|
|
||||||
], //测评
|
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
13: "去完成",
|
13: "/projectdetails",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -382,46 +380,19 @@ function toFinish(d) {
|
|||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (d.type == 10) {
|
|
||||||
let url = "";
|
if (typeof types.value.path[d.type] === 'string') {
|
||||||
if (d.evaTyp == 1) {
|
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId)
|
||||||
url = types.value.path[d.type][1] + d.targetId;
|
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({
|
||||||
} else {
|
path: types.value.path[d.type],
|
||||||
url = types.value.path[d.type][0] + d.targetId;
|
query: {id: d.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName},
|
||||||
}
|
})
|
||||||
// import.meta.env.DEV
|
} else if (typeof types.value.path[d.type] === 'function') {
|
||||||
// ? (window.location.href = url)
|
types.value.path[d.type](d)
|
||||||
// : (window.parent.location.href = url);
|
|
||||||
window.open(url)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) {
|
}
|
||||||
//配置文件
|
function whiteTypes(type){
|
||||||
const url = types.value.path[d.type] + d.targetId;
|
return import.meta.env.VITE_TASK_WHITE_TYPE.includes(type+'')
|
||||||
// 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},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="course"
|
class="course"
|
||||||
v-for="(value, index) in i.taskProcessList"
|
v-for="(value, index) in i.taskProcessList.filter(e=>!whiteTypes(e.type))"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@@ -149,31 +149,31 @@
|
|||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane label="课程公告" name="first">
|
<el-tab-pane label="课程公告" name="first">
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
{{data.remark || '暂无公告'}}
|
{{ data.remark || '暂无公告' }}
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="共享文档" name="second">
|
<el-tab-pane label="共享文档" name="second">
|
||||||
<!-- <div style="padding: 19px 30px 17px 28px">-->
|
<!-- <div style="padding: 19px 30px 17px 28px">-->
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
<!-- v-for="(value, index) in sharedoc"-->
|
<!-- v-for="(value, index) in sharedoc"-->
|
||||||
<!-- :key="index"-->
|
<!-- :key="index"-->
|
||||||
<!-- style="-->
|
<!-- style="-->
|
||||||
<!-- display: flex;-->
|
<!-- display: flex;-->
|
||||||
<!-- align-items: center;-->
|
<!-- align-items: center;-->
|
||||||
<!-- margin-bottom: 15px;-->
|
<!-- margin-bottom: 15px;-->
|
||||||
<!-- "-->
|
<!-- "-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <img :src="value.img" style="width: 22px; height: 26px"/>-->
|
<!-- <img :src="value.img" style="width: 22px; height: 26px"/>-->
|
||||||
<!-- <div class="sharedocname">{{ value.name }}</div>-->
|
<!-- <div class="sharedocname">{{ value.name }}</div>-->
|
||||||
<!-- <div class="download">-->
|
<!-- <div class="download">-->
|
||||||
<!-- <img-->
|
<!-- <img-->
|
||||||
<!-- src="../../assets/image/download.png"-->
|
<!-- src="../../assets/image/download.png"-->
|
||||||
<!-- style="width: 16px; height: 15px"-->
|
<!-- style="width: 16px; height: 15px"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- <div style="margin-left: 7px">下载</div>-->
|
<!-- <div style="margin-left: 7px">下载</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -200,9 +200,9 @@
|
|||||||
<div style="margin-right: 5px">
|
<div style="margin-right: 5px">
|
||||||
{{ useInfo?.realName }}
|
{{ useInfo?.realName }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-for="(item, key) in data.userInfoBo?.medal" :key="key">-->
|
<!-- <div v-for="(item, key) in data.userInfoBo?.medal" :key="key">-->
|
||||||
<!-- <img class="teacherMedal" :src="item"/>-->
|
<!-- <img class="teacherMedal" :src="item"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ useInfo?.bandDesc }}</div>
|
<div class="introduce">{{ useInfo?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -350,7 +350,7 @@ import {useUserInfo} from "@/api/utils";
|
|||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: {routerId,routerName},
|
query: {routerId, routerName},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {data} = useRequest(ROUTER_PROCESS, {routerId});
|
const {data} = useRequest(ROUTER_PROCESS, {routerId});
|
||||||
@@ -402,13 +402,10 @@ const types = ref({
|
|||||||
4: "/homeworkpage",
|
4: "/homeworkpage",
|
||||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||||
6: "/livebroadcast",
|
6: "/livebroadcast",
|
||||||
7: "1",
|
7: ({courseId}) => request(LINK_DETAILS(courseId), {}).then(({data: {linkAddress}}) => window.open(linkAddress)),//外联
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
9: "/moreactive",
|
9: "/moreactive",
|
||||||
10: [
|
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), //测评
|
||||||
import.meta.env.VITE_BOE_TEST_DETAIL_URL,
|
|
||||||
import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL,
|
|
||||||
], //测评
|
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
13: "/projectdetails",
|
13: "/projectdetails",
|
||||||
@@ -416,51 +413,23 @@ const types = ref({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function toFinish(d, sName) {
|
function toFinish(d, sName) {
|
||||||
console.log("ddd", d);
|
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (d.type == 10) {
|
|
||||||
let url = "";
|
if (typeof types.value.path[d.type] === 'string') {
|
||||||
if (d.evaTyp == 1) {
|
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId)
|
||||||
url = types.value.path[d.type][1] + d.targetId;
|
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({
|
||||||
} else {
|
path: types.value.path[d.type],
|
||||||
url = types.value.path[d.type][0] + d.targetId;
|
query: {id: d.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName},
|
||||||
}
|
})
|
||||||
window.open(url)
|
} else if (typeof types.value.path[d.type] === 'function') {
|
||||||
// import.meta.env.DEV
|
types.value.path[d.type](d)
|
||||||
// ? (window.location.href = url)
|
|
||||||
// : (window.parent.location.href = url);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) {
|
}
|
||||||
//配置文件
|
function whiteTypes(type){
|
||||||
const url = types.value.path[d.type] + d.targetId;
|
return import.meta.env.VITE_TASK_WHITE_TYPE.includes(type+'')
|
||||||
// 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.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user