feat:修改跳转等问题

This commit is contained in:
lixg
2023-02-19 15:41:58 +08:00
31 changed files with 2526 additions and 318 deletions

18
.env
View File

@@ -1,17 +1,19 @@
VITE_BASE=/fe-student-h5
VITE_BASE_API=
VITE_OUTPUT_DIR=./dist
VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web?returnUrl=
VITE_BASE_LOGIN_URL=//u-pre.boe.com/web?returnUrl=
VITE_PROXY_URL=http://43.143.139.204/manageApi
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
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_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=https://u-pre.boe.com/pc/forward?to=/student-h5
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id=
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=//u-pre.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=//u-pre.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id=
VITE_BOE_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/student-h5
VITE_BOE_API_URL=https://u-pre.boe.com
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
# boe域名
VUE_APP_BOE_API_URL=//u-pre.boe.com

View File

@@ -1,10 +1,11 @@
VITE_BASE=/student-h5
VITE_BASE_API=/manageApi
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
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_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id=
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=//u-pre.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=//u-pre.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id=
VITE_BOE_API_URL=https://u-pre.boe.com
VITE_BOE_API_URL=https://u-pre.boe.com
VUE_APP_BOE_API_URL=//u-pre.boe.com

View File

@@ -1,15 +1,16 @@
VITE_BASE=/student-h5
VITE_BASE_API=/manageApi
VITE_BASE_LOGIN_URL=https://u.boe.com/web?returnUrl=
VITE_BASE_LOGIN_URL=//u.boe.com/web?returnUrl=
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc/forward?to=/student-h5
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/mobile/pages/study/courseStudy?id=
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/mobile/pages/exam/exam?id=
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/student-h5
VITE_BOE_API_URL=https://u.boe.com
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
VUE_APP_BOE_API_URL=//u.boe.com

View File

@@ -1,12 +1,13 @@
VITE_BASE=/student-h5-release
VITE_BASE_API=/manageApi-release
VITE_BASE_LOGIN_URL=https://u.boe.com/web?returnUrl=
VITE_BASE_LOGIN_URL=//u.boe.com/web?returnUrl=
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc-release/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc-release/forward?to=/student-h5-release
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc-release/mobile/pages/study/courseStudy?id=
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc-release/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc-release/mobile/pages/exam/exam?id=
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc-release/forward?to=/student-h5-release
VITE_BOE_API_URL=https://u.boe.com
VITE_BOE_API_URL=https://u.boe.com
VUE_APP_BOE_API_URL=//u.boe.com

View File

@@ -2,4 +2,5 @@ VITE_BASE=/student-h5
VITE_BASE_API=/manageApi
VITE_OUTPUT_DIR=./docker/dist
VITE_BOE_API_URL=https://u-pre.boe.com
VITE_BOE_API_URL=//u-pre.boe.com
VUE_APP_BOE_API_URL=//u-pre.boe.com

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-13 11:42:48
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-13 18:13:43
* @LastEditTime: 2023-02-19 12:16:32
* @FilePath: /stu_h5/src/api/api.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -37,7 +37,7 @@ export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById`
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/uploadFile'
export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/stuUploadAnnex'
export const ROUTER_DETAILS = '/admin/router/detail'
export const TASK_LIST = '/stu/tasks'
export const ONLINE_PROCESS = '/onlineClasses/queryOnlineClassesStudyDetail post'
@@ -63,3 +63,10 @@ export const EXTERNALEXAM = `/external/exam/queryExternalExam`
export const ROUTERTASK_LIST = '/stu/router/chapterList post'
//获取项目详情
export const PROJECT_DETAIL = '/admin/project/detail'
export const FACETEACH_SIGNUP = `/stu/project/stuFaceTeachSignUp`
// 外部考试点击去完成调用
export const SubmitExternalExam = `/stu/externalExam/submitExternalExam post`
export const UPDATE_CURRENT_TASK = `/admin/student/updateCurrentTask post`
// 测评任务去学习
export const EvaluationToLearn = '/evaluation/evaluationToLearn post'

View File

@@ -98,7 +98,7 @@ export async function request(_url, params) {
}).then(resp => resp.data).then(response => {
if (response.code !== 200 && response.code !== 0) {
if (response.code === 1000) {
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL, '_top')
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login' }) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL, '_top')
}
if (response.code === 2001) {
router.push({ path: '/FaceTeachSignUp', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -1,5 +1,5 @@
<template>
<div class="pathDetail" :style="{ backgroundImage: `url('${back}')` }">
<div class="pathDetail pathDetailback">
<div
v-for="(item, i) in data"
:key="i"
@@ -11,13 +11,12 @@
>
<div
@click="toDetail(i)"
class="nameClass"
:class="current === i ? 'nameClass currentBack' : 'nameClass nameBack'"
:title="item.name"
:style="{
background: `url('${current === i ? currentBack : nameBack}')`,
backgroundSize: '100%',
width: `${current === i ? 139 : 123}px`,
height: `${current === i ? 60 : 60}px`,
width: `${current === i ? 100 : 100}px`,
height: `${current === i ? 75 : 75}px`,
lineHeight: '50px',
color: '#FFF',
}"
@@ -29,9 +28,6 @@
</template>
<script setup>
import { computed, defineProps, ref, watch } from "vue";
import back from "@/assets/image/pathdetails/pathDetailBack.png";
import nameBack from "@/assets/image/pathdetails/pathDetailImg.png";
import currentBack from "@/assets/image/pathdetails/pathDetailImgSelect.png";
import { useRouter } from "vue-router/dist/vue-router";
import { ElLoading } from "element-plus";
import { ROUTERTASK_LIST } from "@/api/api";
@@ -48,17 +44,19 @@ const props = defineProps({
});
const router = useRouter();
const visiable = ref(true);
// const back = ref("require('@/assets/images/pathdetails/pathDetailBack.png')");
const imageAttrs = {
"路径图背景-1671015331292.png": {
width: 1437,
height: 594,
positions: [
{ left: -28, top: 435 },
{ left: 170, top: 360 },
{ left: 20, top: 260 },
{ left: 200, top: 183 },
{ left: 160, top: 66 },
{ left: 260, top: -30 },
{ left: -21, top: 433 },
{ left: 170, top: 324 },
{ left: 28, top: 256 },
{ left: 200, top: 166 },
{ left: 160, top: 30 },
{ left: 297, top: -63 },
],
},
};
@@ -80,9 +78,30 @@ openLoading();
const closeLoading = () => {
loading.value.close();
};
// const data = ref([
// {
// name: "关卡一",
// },
// {
// name: "关卡二",
// },
// {
// name: "关卡三",
// },
// {
// name: "关卡四",
// },
// {
// name: "关卡五",
// },
// {
// name: "关卡六",
// },
// ]);
// closeLoading();
const { data } = usePage(ROUTERTASK_LIST, { routerId: props.routerId }, (e) => {
console.log("我请求成功了吗", e);
e.data.rows.reverse();
closeLoading();
});
const current = computed(() =>
@@ -96,9 +115,9 @@ function show() {
function toDetail(i) {
// console.log("import.meta.env.MODE", import.meta.env.MODE);
if (current.value !== i) {
return;
}
// if (current.value !== i) {
// return;
// }
import.meta.env.MODE === "development" || import.meta.env.MODE === "test"
? router.push({
path: "/pathmappage",
@@ -122,6 +141,9 @@ function close() {
}
</script>
<style lang="scss">
.pathDetailback {
background-image: url(@/assets/image/pathdetails/pathDetailBack.png);
}
.pathDetail {
width: 410px;
height: 500px;
@@ -130,7 +152,8 @@ function close() {
background-repeat: no-repeat;
// background-position: center;
// overflow-x: scroll;
margin: 20px;
margin: 30px;
margin-top: 100px;
.cha {
position: absolute;
cursor: pointer;
@@ -143,5 +166,12 @@ function close() {
padding: 0 20px 0 50px;
font-size: 12px;
}
.nameBack {
background-image: url(@/assets/image/pathdetails/pathDetailImg.png);
}
.currentBack {
background-image: url(@/assets/image/pathdetails/pathDetailImgSelect.png);
}
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-16 17:26:39
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-06 17:58:35
* @LastEditTime: 2023-02-18 15:16:34
* @FilePath: /stu_h5/src/components/ReturnHead.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -68,6 +68,10 @@ export default {
type: Number,
default: null,
},
type: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const router = useRouter();
@@ -82,6 +86,7 @@ export default {
path: "/fileStorag",
query: {
courseId: props.courseId,
type: props.type,
},
});
};

View File

@@ -1,3 +1,11 @@
/*
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-08 09:50:10
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-19 10:36:48
* @FilePath: /stu_h5/src/router/index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
import routesConfig from './config';
import { getCookie } from "@/api/utils";
@@ -19,7 +27,7 @@ router.beforeEach((to, from, next) => {
if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") {
to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: to.fullPath } })
} else {
window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE + to.fullPath
window.location.href = window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE + to.fullPath
}
}
next()

View File

@@ -79,11 +79,19 @@ import { ElMessage } from "element-plus";
import dayjs from "dayjs";
const {
query: { courseId: evaluationId, evaType, targetId },
query: {
courseId: evaluationId,
evaType,
targetId,
chapterOrStageId,
infoId,
btype,
},
} = useRoute();
const router = useRouter();
const { data } = useRequest(EVALUATION_DETAIL(evaluationId));
console.log("测评信息222", data);
const userInfo = computed(() => store.state.userInfo);
//作业倒计时
let hour = ref(0);
let minute = ref(0);
@@ -112,14 +120,37 @@ onUnmounted(() => {
clearInterval(timer);
});
const goOuterChain = () => {
window.open(
evaType == 0
? import.meta.env.VITE_BOE_TEST_DETAIL_URL + targetId
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL +
targetId +
`&quizTaskKid=${routerId}&channelCode=learningpath`,
"_top"
); //测评
request(EvaluationToLearn, {
businessType: btype == 1 ? "project" : "learningpath",
chapterId: chapterOrStageId,
courseId: courseId,
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);
});
// window.open(
// evaType == 0
// ? window.location.protocol +
// import.meta.env.VITE_BOE_TEST_DETAIL_URL +
// targetId
// : window.location.protocol +
// import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL +
// targetId +
// `&quizTaskKid=${routerId}&channelCode=learningpath`,
// "_top"
// ); //测评
};
</script>

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-06 18:26:23
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-06 18:51:05
* @LastEditTime: 2023-02-19 12:03:20
* @FilePath: /stu_h5/src/views/examination/ExternalExam.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -58,7 +58,7 @@ request(EXTERNALEXAM, { externalId: courseId })
console.log(err);
});
</script>
<style lang="scss" scoped>
<style lang="scss">
.externalexam {
width: 100%;
background-color: #f2f5f7;
@@ -92,7 +92,7 @@ request(EXTERNALEXAM, { externalId: courseId })
}
.btnbox {
width: 100%;
width: 90%;
height: 50px;
border-bottom: 1px solid #f1f2f3;
display: flex;

View File

@@ -425,11 +425,12 @@ const downloads = (url) => {
};
function formateArr(strs) {
console.log("strs", strs);
let newArr = [];
try {
newArr = JSON.parse(strs);
} catch {
newArr = strs.split(",");
newArr = strs ? strs.split(",") : [];
}
console.log("112233", newArr);
return newArr;
@@ -580,7 +581,10 @@ function toExamItem(obj) {
}
console.log("obj", obj.examinationTestId);
window.open(
import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,
window.location.protocol +
import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
"/mobile/pages/exam/exam?id=" +
obj.examinationTestId,
"_top"
); //测评
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });

View File

@@ -0,0 +1,565 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-18 17:47:50
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-18 18:06:29
* @FilePath: /stu_h5/src/views/faceteach/FaceTeachNoCommon.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div
style="
background: #0078fc;
height: 150px;
width: 100%;
position: absolute;
top: 0;
z-index: -9999;
"
></div>
<div class="faceteach" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>课程列表</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">课程报名</div>
<div v-if="pName != ''" class="return">
<div style="display: flex" @click="returnclick">
<el-button style="color: #0073fb"
><img
class="img2"
style="margin-right: 11px; cursor: pointer"
src="../../assets/image/return.png"
/>返回
</el-button>
</div>
</div>
</div>
<!-- 面包屑导航 -->
<!-- 基本信息 -->
<div class="bascinfo">
<div style="display: flex">
<img
style="
width: 405px;
height: 230px;
margin-left: 48px;
border-radius: 8px;
margin-top: 40px;
"
:src="data.offcourseDto.picUrl"
alt=""
/>
<div style="margin-left: 40px; margin-top: 56px">
<div class="title">面授课{{ data.planDto?.name }}</div>
<div class="time" style="margin-top: 30px">
<img
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px">
{{
dayjs(data.planDto?.beginTime).format("YYYY-MM-DD HH:MM") +
" 至 " +
dayjs(data.planDto?.endTime).format("YYYY-MM-DD HH:MM")
}}
</div>
</div>
<div
v-if="data.planDto.address"
class="time"
style="margin-top: 10px"
>
<img
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div>
<!-- <div class="time" style="margin-top: 37px">-->
<!-- <botton class="btn" style="margin-right: 20px;width: 160px;height: 46px;" v-if="data.planDto.applyFlag" @click="onLineSignUp" :style="{ background: data.isSignUp ? '#999' : 'rgb(57, 146, 249)'}">{{data.isSignUp?'已报名':'立即报名'}}</botton>-->
<!-- </div>-->
</div>
</div>
<div style="display: flex"></div>
</div>
<!-- 基本信息 -->
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detail">
<div class="detailB">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程介绍" name="first">
<div class="notice" style="padding: 20px; font-size: 14px">
{{ data.offcourseDto?.intro || "暂无课程介绍" }}
</div>
</el-tab-pane>
<el-tab-pane label="课程大纲" name="second">
<div style="display: flex; align-items: center">
<div
style="padding: 20px"
class="content"
v-html="data.offcourseDto?.outline"
></div>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="课程评论" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
</el-tab-pane> -->
<el-tab-pane
label="材料下载"
name="third"
:disabed="dayjs().isBefore(dayjs(data.planDto.beginTime))"
>
<div
v-if="!data.planDto?.attach"
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无附件
</div>
<div v-else>
<div
v-for="(el, index) in formateArr(data.planDto.attach)"
:key="index"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL">
<FileTypeImg
:v-model="
el.slice(el.lastIndexOf('/') + 1, el.indexOf('-')) +
el.slice(el.lastIndexOf('.'))
"
:style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"
></FileTypeImg>
<div style="margin-left: 20px">
{{
el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf("."))
}}
</div>
</div>
<!-- <div class="download">-->
<!-- <img style="width: 16px; height: 15px" src="../../assets/image/download.png"/>-->
<!-- <div style="margin-left: 5px;color:#999;">-->
<!-- 下载-->
<!-- </div>-->
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">
下载
</div> -->
<!-- </div>-->
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="teacher">
<div class="title">
<img
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<div class="text">面授课讲师</div>
<div class="box"></div>
</div>
<!-- todo #面授课接口 讲师缺少img和介绍-->
<div class="teacheritem">
<img class="peopleimg" :src="teacherInfo.avatar" />
<div class="nameSpan">
<div class="teacherName" style="margin-right: 5px">
{{ data.planDto?.teacher }}
</div>
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
</div>
<!-- <div class="follow">+ 关注</div>-->
</div>
</div>
</div>
<!-- 详细信息 -->
</div>
</template>
<script setup>
import { computed, reactive, toRefs, watch, onUnmounted } from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request";
import { STU_OFFCOURSE_DETAIL, FACETEACH_SIGNUP } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs";
const router = useRouter();
const returnclick = () => {
router.back();
};
const {
query: { courseId, type },
} = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
window.open(url);
};
const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!");
};
let timer = null;
// 报名
function onLineSignUp() {
if (data.value.isSignUp) {
return;
}
request(FACETEACH_SIGNUP, { courseId });
data.value.isSignUp = true;
ElMessage.success("报名成功");
}
function formateArr(strs) {
let arrs = strs.split(",");
console.log("112233", arrs);
return arrs;
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.faceteach {
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
}
.bascinfo {
width: 100%;
height: 310px;
border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
margin-top: 37px;
display: flex;
justify-content: space-between;
align-items: center;
.btn {
width: 146px;
height: 46px;
background: #2478ff;
border-radius: 4px;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
font-weight: 800;
line-height: 24px;
cursor: pointer;
margin-right: 96px;
}
.title {
font-size: 20px;
font-weight: 800;
color: #333333;
line-height: 24px;
margin-left: -9px;
}
.time {
font-size: 14px;
color: #6e7b84;
line-height: 24px;
display: flex;
align-items: center;
}
}
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.detailinfo {
width: 100%;
margin-top: 20px;
display: flex;
align-items: flex-start;
.detail {
flex: 1;
margin-right: 20px;
.detailT {
min-height: 263px;
background: #ffffff;
border-radius: 8px;
color: rgba(51, 51, 51, 1);
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.content {
margin-left: 8px;
font-size: 14px;
color: rgba(51, 51, 48, 1);
font-weight: 500;
line-height: 35px;
margin-top: 30px;
padding-bottom: 30px;
}
}
.detailB {
min-height: 363px;
background: #ffffff;
border-radius: 8px;
margin-top: 20px;
.wenxintishi {
display: flex;
justify-content: stretch;
padding: 72px;
}
.el-tabs__item {
height: 69px;
padding: 25px 7px 0px 52px;
font-size: 14px;
font-weight: 500;
}
.el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2);
}
.enclosure {
height: 89px;
margin-left: 51px;
margin-right: 40px;
// border-bottom: 1px solid rgba(56, 125, 247, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
.enclosureL {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: #677d86;
line-height: 24px;
}
.download {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: #2478ff;
line-height: 24px;
cursor: pointer;
}
}
.work {
margin-left: 51px;
margin-right: 40px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 37px;
}
.work .question {
font-size: 14px;
font-weight: 500;
color: #333330;
line-height: 18px;
}
.work .submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
.teacher {
width: 434px;
min-height: 500px;
// height: 10%;
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
margin-left: 48px;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.teacheritem {
margin-left: 48px;
margin-right: 48px;
// min-height: 115px;
margin-top: 20px;
padding: 25px 0px;
display: flex;
position: relative;
// align-items: center;
}
.teacheritem .peopleimg {
width: 60px;
height: 60px;
border-radius: 30px;
}
.teacheritem {
.nameSpan {
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
}
.teacheritem {
.nameSpan {
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
}
.teacheritem .introduce {
font-size: 14px;
font-weight: 500;
color: #394145;
margin-top: 14px;
}
.teacheritem .follow {
width: 80px;
height: 30px;
background: #387df7;
border-radius: 4px;
margin-top: 28px;
position: absolute;
right: -25px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
</style>

View File

@@ -0,0 +1,570 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-18 17:48:03
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-18 18:06:42
* @FilePath: /stu_h5/src/views/faceteach/FaceTeachNoCourse.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div
style="
background: #0078fc;
height: 150px;
width: 100%;
position: absolute;
top: 0;
z-index: -9999;
"
></div>
<div class="faceteach" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>课程列表</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">课程报名</div>
<div v-if="pName != ''" class="return">
<div style="display: flex" @click="returnclick">
<el-button style="color: #0073fb"
><img
class="img2"
style="margin-right: 11px; cursor: pointer"
src="../../assets/image/return.png"
/>返回
</el-button>
</div>
</div>
</div>
<!-- 面包屑导航 -->
<!-- 基本信息 -->
<div class="bascinfo">
<div style="display: flex">
<img
style="
width: 405px;
height: 230px;
margin-left: 48px;
border-radius: 8px;
margin-top: 40px;
"
:src="data.offcourseDto.picUrl"
alt=""
/>
<div style="margin-left: 40px; margin-top: 56px">
<div class="title">面授课{{ data.planDto?.name }}</div>
<div class="time" style="margin-top: 30px">
<img
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px">
{{
dayjs(data.planDto?.beginTime).format("YYYY-MM-DD HH:MM") +
" 至 " +
dayjs(data.planDto?.endTime).format("YYYY-MM-DD HH:MM")
}}
</div>
</div>
<div
v-if="data.planDto.address"
class="time"
style="margin-top: 10px"
>
<img
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div>
<div class="time" style="margin-top: 37px">
<botton
class="btn"
style="margin-right: 20px; width: 260px; height: 46px"
:style="{ background: '#999' }"
>当前任务暂未开放请联系管理员</botton
>
</div>
</div>
</div>
<div style="display: flex"></div>
</div>
<!-- 基本信息 -->
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detail">
<div class="detailB">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程介绍" name="first">
<div class="notice" style="padding: 20px; font-size: 14px">
{{ data.offcourseDto?.intro || "暂无课程介绍" }}
</div>
</el-tab-pane>
<el-tab-pane label="课程大纲" name="second">
<div style="display: flex; align-items: center">
<div
style="padding: 20px"
class="content"
v-html="data.offcourseDto?.outline"
></div>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="课程评论" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
</el-tab-pane> -->
<el-tab-pane
label="材料下载"
name="third"
:disabed="dayjs().isBefore(dayjs(data.planDto.beginTime))"
>
<div
v-if="!data.planDto?.attach"
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无附件
</div>
<div v-else>
<div
v-for="(el, index) in formateArr(data.planDto.attach)"
:key="index"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL">
<FileTypeImg
:v-model="
el.slice(el.lastIndexOf('/') + 1, el.indexOf('-')) +
el.slice(el.lastIndexOf('.'))
"
:style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"
></FileTypeImg>
<div style="margin-left: 20px">
{{
el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf("."))
}}
</div>
</div>
<!-- <div class="download">-->
<!-- <img style="width: 16px; height: 15px" src="../../assets/image/download.png"/>-->
<!-- <div style="margin-left: 5px;color:#999;">-->
<!-- 下载-->
<!-- </div>-->
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">
下载
</div> -->
<!-- </div>-->
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="teacher">
<div class="title">
<img
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<div class="text">面授课讲师</div>
<div class="box"></div>
</div>
<!-- todo #面授课接口 讲师缺少img和介绍-->
<div class="teacheritem">
<img class="peopleimg" :src="teacherInfo.avatar" />
<div class="nameSpan">
<div class="teacherName" style="margin-right: 5px">
{{ data.planDto?.teacher }}
</div>
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
</div>
<!-- <div class="follow">+ 关注</div>-->
</div>
</div>
</div>
<!-- 详细信息 -->
</div>
</template>
<script setup>
import { computed, reactive, toRefs, watch, onUnmounted } from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request";
import { STU_OFFCOURSE_DETAIL, FACETEACH_SIGNUP } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs";
const router = useRouter();
const returnclick = () => {
router.back();
};
const {
query: { courseId, type },
} = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
window.open(url);
};
const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!");
};
let timer = null;
// 报名
function onLineSignUp() {
if (data.value.isSignUp) {
return;
}
request(FACETEACH_SIGNUP, { courseId });
data.value.isSignUp = true;
ElMessage.success("报名成功");
}
function formateArr(strs) {
let arrs = strs.split(",");
console.log("112233", arrs);
return arrs;
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.faceteach {
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
}
.bascinfo {
width: 100%;
height: 310px;
border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
margin-top: 37px;
display: flex;
justify-content: space-between;
align-items: center;
.btn {
width: 146px;
height: 46px;
background: #2478ff;
border-radius: 4px;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
font-weight: 800;
line-height: 24px;
cursor: pointer;
margin-right: 96px;
}
.title {
font-size: 20px;
font-weight: 800;
color: #333333;
line-height: 24px;
margin-left: -9px;
}
.time {
font-size: 14px;
color: #6e7b84;
line-height: 24px;
display: flex;
align-items: center;
}
}
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.detailinfo {
width: 100%;
margin-top: 20px;
display: flex;
align-items: flex-start;
.detail {
flex: 1;
margin-right: 20px;
.detailT {
min-height: 263px;
background: #ffffff;
border-radius: 8px;
color: rgba(51, 51, 51, 1);
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.content {
margin-left: 8px;
font-size: 14px;
color: rgba(51, 51, 48, 1);
font-weight: 500;
line-height: 35px;
margin-top: 30px;
padding-bottom: 30px;
}
}
.detailB {
min-height: 363px;
background: #ffffff;
border-radius: 8px;
margin-top: 20px;
.wenxintishi {
display: flex;
justify-content: stretch;
padding: 72px;
}
.el-tabs__item {
height: 69px;
padding: 25px 7px 0px 52px;
font-size: 14px;
font-weight: 500;
}
.el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2);
}
.enclosure {
height: 89px;
margin-left: 51px;
margin-right: 40px;
// border-bottom: 1px solid rgba(56, 125, 247, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
.enclosureL {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: #677d86;
line-height: 24px;
}
.download {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: #2478ff;
line-height: 24px;
cursor: pointer;
}
}
.work {
margin-left: 51px;
margin-right: 40px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 37px;
}
.work .question {
font-size: 14px;
font-weight: 500;
color: #333330;
line-height: 18px;
}
.work .submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
.teacher {
width: 434px;
min-height: 500px;
// height: 10%;
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
margin-left: 48px;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.teacheritem {
margin-left: 48px;
margin-right: 48px;
// min-height: 115px;
margin-top: 20px;
padding: 25px 0px;
display: flex;
position: relative;
// align-items: center;
}
.teacheritem .peopleimg {
width: 60px;
height: 60px;
border-radius: 30px;
}
.teacheritem {
.nameSpan {
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
}
.teacheritem {
.nameSpan {
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
}
.teacheritem .introduce {
font-size: 14px;
font-weight: 500;
color: #394145;
margin-top: 14px;
}
.teacheritem .follow {
width: 80px;
height: 30px;
background: #387df7;
border-radius: 4px;
margin-top: 28px;
position: absolute;
right: -25px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
</style>

View File

@@ -0,0 +1,831 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-18 17:48:19
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-19 10:41:00
* @FilePath: /stu_h5/src/views/faceteach/FaceTeachSignUp.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="faceteach">
<ReturnHead text="课程详情"></ReturnHead>
<TitleHead :text="'【面授课】' + data.planDto?.name"></TitleHead>
<div class="main">
<div class="title">
<div class="titlemain">
<div class="timeposition">
<div class="time">
<img
style="width: 13px; height: 14.5px; margin-right: 5.5px"
src="../../assets/image/faceteach/time.png"
/>
<div style="font-size: 12px; color: rgba(110, 123, 132, 1)">
{{
dayjs(data.planDto?.beginTime).format("YYYY-MM-DD HH:mm") +
" 至 " +
dayjs(data.planDto?.endTime).format("YYYY-MM-DD HH:mm")
}}
</div>
</div>
<div class="time" style="margin-top: 9px">
<img
style="width: 13px; height: 15px; margin-right: 5.5px"
src="../../assets/image/faceteach/position.png"
/>
<div style="font-size: 12px; color: rgba(110, 123, 132, 1)">
{{ data.planDto?.address }}
</div>
</div>
</div>
<!-- <div class="titlebtn">评估</div> -->
<div v-if="projectStatus && projectEndTime">
<div
v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
style="display: flex"
>
<botton
class="titlebtn"
style="margin-right: 20px"
:style="{
background: isAllowSign
? data.signFlag
? '#999'
: 'rgb(57, 146, 249)'
: '#999',
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton> -->
<botton
v-if="data.planDto?.evalFlag !== 0"
:style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="titlebtn"
@click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
</div>
<div v-else>
<div style="display: flex">
<botton
class="titlebtn"
style="margin-right: 20px"
:style="{
background: isAllowSign
? data.signFlag
? '#999'
: 'rgb(57, 146, 249)'
: '#999',
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton> -->
<botton
v-if="data.planDto?.evalFlag !== 0"
:style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="titlebtn"
@click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
</div>
<!-- <button
v-if="data.planDto?.evalFlag !== 0"
:style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="titlebtn"
@click="toSurvery"
>
{{ data.isSurvery ? "已评估" : "评估" }}
</button> -->
</div>
</div>
<div class="teacher">
<div style="width: 90%">
<div class="teachertitle" style="width: 100px">
<img
style="width: 17px; height: 17px"
src="../../assets/image/faceteach/livelecturer.png"
/>
<div class="talk">面授课讲师</div>
<div class="box" style="width: 80px; right: 0px"></div>
</div>
<div class="teachermain">
<img class="teacherAvatar" :src="teacherInfo.avatar" />
<div style="flex: 1; margin-left: 11px; margin-right: 13px">
<div class="teacherName">{{ data.planDto?.teacher }}</div>
<div class="teacherIntro">
{{ data.planDto?.bandDesc }}
</div>
</div>
<!-- <div class="teacherFollow">+ 关注</div> -->
</div>
</div>
</div>
<div class="detail">
<div style="width: 90%">
<div class="teachertitle">
<img
style="width: 17px; height: 17px"
src="../../assets/image/faceteach/livelecturer.png"
/>
<div class="talk">课程详情</div>
<div class="box"></div>
</div>
<div class="detailMain">
{{ data.planDto?.description }}
</div>
</div>
</div>
<div class="course">
<div style="width: 100%">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程附件" name="first">
<div
v-if="data.planDto?.attach === ''"
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
margin-bottom: 20px;
"
>
此课程无附件
</div>
<div v-else>
<div
v-for="(el, index) in formateArr(data.planDto?.attach)"
:key="index"
class="enclosure"
:style="{
borderBottom: '1px solid rgba(56, 125, 247, 0.2)',
}"
>
<div class="enclosureL">
<FileTypeImg
:v-model="
el.name
? el.name
: el.slice(el.lastIndexOf('/') + 1, el.indexOf('-')) +
el.slice(el.lastIndexOf('.'))
"
:style="{
width: '19.5px',
height: '22px',
marginLeft: '10px',
}"
></FileTypeImg>
<div style="margin-left: 15px">
{{
el.name
? el.name
: el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf("."))
}}
</div>
<!-- <img style="width: 19.5px; height: 22px" :src="el.img" />
<div style="margin-left: 15px">{{ el.name }}</div> -->
</div>
<div>
<div
v-if="
new Date(data.planDto.beginTime).getTime() >
new Date().getTime()
"
class="download"
>
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px; color: #999"
@click="downloads(el)"
>
下载
</div>
</div>
<div v-else class="download">
<img
style="width: 16px; height: 15px; color: #2478ff"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px"
@click="download(el.name ? el.response.data : el)"
>
下载
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="课程作业" name="second">
<div class="work">
<div v-if="data.workDto">
<div>
<div class="question">{{ data.workDto?.workName }}</div>
<div style="display: flex; justify-content: space-between">
<div
style="
margin-top: 16px;
flex: 1;
display: flex;
flex-wrap: wrap;
"
>
<div
class="tag1"
v-if="data.workDto?.workFlag"
style="margin: 0px 10px 10px 0px"
>
必修
</div>
<div class="tag3" style="margin: 0px 10px 10px 0px">
作业
</div>
</div>
<div
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toWork"
>
交作业
</div>
</div>
</div>
</div>
<div
v-else
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无作业
</div>
</div>
</el-tab-pane>
<el-tab-pane
label="课程考试"
name="third"
:disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))"
>
<div class="work" v-if="data.examinationDto?.examinationTestName">
<div class="question">
{{ data.examinationDto?.examinationName }}
</div>
<div style="display: flex; justify-content: space-between">
<div>
<div
style="
margin-top: 16px;
flex: 1;
display: flex;
flex-wrap: wrap;
"
>
<div
class="tag1"
style="margin: 0px 10px 10px 0px"
v-if="data.examinationDto?.examinationFlag"
>
必修
</div>
<div class="tag3" style="margin: 0px 10px 10px 0px">
考试
</div>
</div>
</div>
<div
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toExamItem(data.examinationDto)"
>
去考试
</div>
</div>
</div>
<div
v-else
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
margin-bottom: 20px;
"
>
此课程无考试
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</div>
</template>
<script setup>
import TitleHead from "@/components/TitleHead.vue";
import ReturnHead from "@/components/ReturnHead.vue";
import { computed, reactive, toRefs, watch, onUnmounted } from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request";
import {
STU_OFFCOURSE_DETAIL,
TASK_OFFCOURSE_NOTASK_SIGN,
TASK_OFFCOURSE_SIGN,
TASK_BROADCAST_SIGN,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs";
const router = useRouter();
const returnclick = () => {
router.back();
};
const {
query: { courseId, type, projectStatus, projectEndTime },
} = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
console.log("datadatadatadatadatadatadata", data);
// console.log("项目状态字段传递", projectStatus, projectEndTime);
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
window.open(url);
};
const downloads = (url) => {
ElMessage.warning("未到开始时间,请耐心等待!");
};
function formateArr(strs) {
console.log("strs", strs);
let newArr = [];
try {
newArr = JSON.parse(strs);
} catch {
newArr = strs ? strs.split(",") : [];
}
console.log("112233", newArr);
return newArr;
}
let timer = null;
//判断能否签到
function isSignClick() {
timer = setInterval(() => {
let beginTime = new Date(data.value.planDto?.beginTime).getTime();
let endTime = !data.value.planDto?.afterStart
? new Date(data.value.planDto?.endTime).getTime()
: new Date(data.value.planDto?.beginTime).getTime();
let nowTime = new Date().getTime();
if (data.value.planDto?.beforeStart && data.value.planDto?.afterStart) {
//有开始前有开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111");
} else if (
data.value.planDto?.beforeStart &&
!data.value.planDto?.afterStart
) {
//只有开始前无开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
console.log("11112222");
} else if (
!data.value.planDto?.beforeStart &&
data.value.planDto?.afterStart
) {
//无开始前有开始后
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111333");
}
if (nowTime < endTime && nowTime > beginTime) {
state.isAllowSign = true;
} else {
state.isAllowSign = false;
}
// console.log(
// "isAllowSign",
// state.isAllowSign,
// nowTime,
// endTime,
// beginTime,
// nowTime < endTime,
// nowTime > beginTime
// );
}, 1000);
}
isSignClick();
//签到
const signClick = () => {
if (data.value.signFlag) {
return;
}
// console.log(
// "data.signFlag",
// data.value.signFlag,
// state.isAllowSign,
// !state.isAllowSign
// );
//if (data.value.planDto.beginTime) {
// let date1 = new Date(data.value.planDto.beginTime).getTime()
// let date2 = new Date().getTime()
// if (date1 > date2) {
// ElMessage.info("未到开始时间,请耐心等待!");
// return;
// }
//}
if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.warning("未在允许签到时间范围内");
return;
}
data.value.signFlag = 1;
ElMessage.warning("签到成功");
if (taskId) {
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
} else {
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
}
};
function toSurvery() {
if (data.value.isSurvery) {
// return;
}
if (
data.value.planDto.beginTime &&
dayjs().isBefore(data.value.planDto.beginTime)
) {
ElMessage.warning("课程未开始,请耐心等待!");
return;
}
if (data.value.planDto.evalFlag == 0) {
ElMessage.warning("此课程无评估");
return;
}
router.push({
path: "/investigatpage",
query: {
id: taskId,
courseId: data.value.planDto.evaluateId,
pName: "面授课",
infoId: data.value.planDto.offcoursePlanId,
chapterOrStageId: 0,
sName: data.value.planDto.name,
type,
},
});
}
function toWork() {
if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime();
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
}
router.push({
path: "/homeworkpage",
query: {
courseId: data.value.workDto.workId,
id: taskId,
infoId: data.value.offcourseDto.offcourseId,
chapterOrStageId: 0,
type,
pName: "面授课",
sName: data.value.planDto.name,
},
});
}
function toExamItem(obj) {
if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime();
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
}
console.log("obj", obj.examinationTestId);
window.open(
window.location.protocol +
import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
obj.examinationTestId,
"_top"
); //测评
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
}
onUnmounted(() => {
if (timer) {
clearInterval(timer);
}
});
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.faceteach {
width: 100%;
padding-bottom: 20px;
.main {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: -14.5px;
.title {
width: 90%;
height: 74px;
border-radius: 4px;
background-color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
.titlemain {
width: 90%;
display: flex;
justify-content: space-between;
align-items: center;
.timeposition {
.time {
display: flex;
align-items: center;
}
}
.titlebtn {
width: 83px;
height: 33px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 12px;
cursor: pointer;
}
}
}
.teachertitle {
width: 90px;
position: relative;
display: flex;
align-items: center;
margin-top: 21px;
.talk {
font-size: 14px;
font-weight: bold;
color: #333333;
line-height: 12px;
margin-left: 7.5px;
}
.box {
position: absolute;
width: 62.5px;
height: 10px;
right: 6px;
bottom: -4px;
background: rgba(36, 120, 255, 0.15);
}
}
.teacher {
width: 90%;
padding-bottom: 15px;
border-radius: 4px;
background-color: rgba(255, 255, 255, 1);
display: flex;
flex-direction: column;
align-items: center;
margin-top: 10px;
.teachermain {
margin-top: 24px;
display: flex;
justify-content: space-between;
.teacherAvatar {
width: 50px;
height: 50px;
border-radius: 25px;
margin-left: 4px;
}
.teacherName {
font-size: 14px;
font-weight: 600;
color: #394145;
line-height: 21px;
}
.teacherIntro {
font-size: 13px;
font-weight: 400;
color: #394145;
line-height: 21px;
margin-top: 12px;
}
.teacherFollow {
width: 73px;
height: 28px;
background: #2478ff;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 400;
color: #ffffff;
line-height: 12px;
color: #fff;
margin-top: 13px;
}
}
}
.detail {
width: 90%;
padding-bottom: 25px;
background: #ffffff;
border-radius: 4px;
margin-top: 10px;
display: flex;
flex-direction: column;
align-items: center;
.detailMain {
margin-top: 22px;
font-size: 13px;
font-weight: 400;
color: #333330;
line-height: 24px;
}
}
.course {
width: 90%;
// padding-bottom: 15px;
border-radius: 4px;
background: #ffffff;
margin-top: 10px;
display: flex;
flex-direction: column;
align-items: center;
.el-tabs__nav {
width: 90%;
margin-left: 5%;
display: flex;
justify-content: space-between;
}
.el-tabs__item {
height: 50px;
padding: 0px;
font-size: 14px;
font-weight: 500;
line-height: 21px;
padding-top: 15px;
}
.el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2);
}
.el-tabs__header {
margin: 0;
}
.enclosure {
width: 90%;
margin-left: 5%;
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
.enclosureL {
display: flex;
align-items: center;
font-size: 13px;
font-weight: 400;
color: #677d86;
line-height: 19px;
}
.download {
display: flex;
align-items: center;
font-size: 13px;
font-weight: 400;
color: #2478ff;
line-height: 19px;
}
}
.work {
// margin-left: 51px;
// margin-right: 40px;
padding-bottom: 20px;
width: 90%;
margin-left: 5%;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-top: 17.5px;
}
.work .question {
font-size: 13px;
font-weight: 500;
color: #333330;
line-height: 21.5px;
}
.work .submit {
width: 73px;
height: 28px;
margin-top: 16px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 2px;
font-size: 13px;
font-weight: 400;
color: #ffffff;
line-height: 12px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-13 11:42:48
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-01-31 17:56:36
* @LastEditTime: 2023-02-18 15:27:53
* @FilePath: /stu_h5/src/views/filestorag/fileStorag.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -12,7 +12,11 @@
<div class="notice">
<div class="noticebox">
<div class="main" v-if="fileList">
<div class="filebox" v-for="(item, index) in fileList" :key="index">
<div
class="filebox"
v-for="(item, index) in JSON.parse(fileList ? fileList : [])"
:key="index"
>
<img
v-if="
item.name.indexOf('jpg') !== -1 ||
@@ -63,6 +67,17 @@
</div>
</div>
<span class="filename" :title="item.name">{{ item.name }}</span>
<div
class="download"
style="display: flex; align-items: center"
@click="downloadFile(item.response.data)"
>
<img
src="../../assets/image/download.png"
style="width: 16px; height: 15px"
/>
<div style="margin-left: 2px; color: #2478ff">下载</div>
</div>
</div>
</div>
</div>
@@ -75,17 +90,26 @@ import { reactive, toRefs, computed } from "vue";
import Images from "../../assets/image/index";
import ReturnHead from "@/components/ReturnHead.vue";
import { useRoute, useRouter } from "vue-router";
import { ROUTER_DETAILS } from "@/api/api";
import { ROUTER_DETAILS, PROJECT_DETAIL } from "@/api/api";
import { useRequest } from "@/api/request";
const {
query: { courseId },
query: { courseId, type },
} = useRoute();
console.log("courseId", courseId);
//获取共享文档
const { data } = useRequest(ROUTER_DETAILS, { routerId: courseId });
const { data } =
type == 1
? useRequest(PROJECT_DETAIL, { projectId: courseId })
: useRequest(ROUTER_DETAILS, { routerId: courseId });
// state.t_items = data.value.routerInfo.attach;
console.log("data", data, data.value.routerInfo);
const fileList = computed(() => data.value?.routerInfo?.attach);
const fileList = computed(() =>
type == 1 ? data.value?.projectInfo?.attach : data.value?.routerInfo?.attach
);
//下载
function downloadFile(url) {
window.open(url);
}
</script>
<style lang="scss" scoped>
.filestorag {
@@ -116,7 +140,7 @@ const fileList = computed(() => data.value?.routerInfo?.attach);
}
}
.filename {
width: calc(100% - 50px);
width: calc(100% - 100px);
font-size: 13px;
display: block;
overflow: hidden;

View File

@@ -46,7 +46,8 @@ import ReturnHead from "@/components/ReturnHead.vue";
import { request, useRequest } from "@/api/request";
import { TASK_WORK_COMMIT } from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
import { ElMessage, ElLoading } from "element-plus";
import UploadImg from "@/components/img/UploadImg.vue";
export default {
name: "UploadWork",
@@ -55,6 +56,7 @@ export default {
UploadImg,
},
setup() {
const router = useRouter();
const state = reactive({
text: "",
screenHeight: document.body.clientHeight, // 屏幕高度
@@ -64,6 +66,19 @@ export default {
} = useRoute();
const textarea = ref("");
const fileList = ref([]);
// 使用
const loading = ref(false); // loading
const openLoading = () => {
loading.value = ElLoading.service({
lock: true,
text: "Loading",
background: "rgba(0, 0, 0, 0.7)",
});
};
const closeLoading = () => {
loading.value.close();
};
//发布作业
const publishWork = () => {
console.log("点击了发布", workId, type, taskId);
@@ -72,6 +87,7 @@ export default {
return ElMessage.warning("请输入作业内容");
}
}
openLoading();
let obj = {
projectOrRouterLogo: type,
workUploadContent: textarea.value,
@@ -81,15 +97,18 @@ export default {
taskId: taskId || infoId,
};
console.log("obj", obj, fileList.value);
// request(TASK_WORK_COMMIT, obj).then((res) => {
// console.log("上传作业", res);
// // submitList.value.unshift(res.data);
// // open();
// textarea.value = "";
// fileList.value = [];
// // remove(0);
// // clearFiles();
// });
request(TASK_WORK_COMMIT, obj).then((res) => {
console.log("上传作业", res);
// submitList.value.unshift(res.data);
// open();
ElMessage.success("作业发布成功");
closeLoading();
textarea.value = "";
fileList.value = [];
router.back();
// remove(0);
// clearFiles();
});
};
const deleteAll = () => {
console.log("点击");

View File

@@ -268,8 +268,8 @@ const questionList = ref([]);
const timers = setInterval(() => {
console.log(data);
console.log(data.value.assessmentId);
if (data.value.assessmentId) {
console.log(data.value.id);
if (data.value.id) {
clearInterval(timers);
console.log([
data.value.essayQuestionVoList,

View File

@@ -63,7 +63,7 @@ import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus";
import dayjs from "dayjs";
import store from "@/store";
const {
query: {
courseId: linkId,
@@ -80,6 +80,7 @@ const { data } = useRequest(LINK_DETAILS(linkId));
console.log("外链信息", data);
const userInfo = computed(() => store.state.userInfo);
const goOuterChain = () => {
console.log("userInfo", userInfo);
status != 1 &&
request(STUDY_RECORD, {
studentId: userInfo.value.id,

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-19 14:59:34
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-14 20:57:56
* @LastEditTime: 2023-02-18 13:49:14
* @FilePath: /stu_h5/src/views/pathmap/LevelList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

View File

@@ -1,13 +1,19 @@
<template>
<div class="pathmap">
<ReturnHead
text="路径详情"
:showfile="true"
:courseId="routerId"
:type="2"
></ReturnHead>
<div class="main">
<div class="up">
<div class="notice">
<!-- <div class="notice">
<span class="text"
>请各位选课的同学提前阅读本课程的教学大纲与计划请各位选课的同学提前阅读本课程的教学大纲与计划</span
>
<span class="close"></span>
</div>
</div> -->
<div class="content">
<div class="title">{{ data?.name }}</div>
<div class="text2">
@@ -18,48 +24,30 @@
<div class="down">
<div class="project_title">学习路径内容</div>
<!-- <div
class="project_first"
>
<div class="course1_first">
<div class="text8">管理者如何持续找到发力点</div>
<div class="course1_right">
<div class="circular"></div>
<div class="text9">进行中</div>
<div class="btn1"></div>
</div>
</div>
<div class="course_content">
<div class="study1">
<div class="firstclass"></div>
<div class="firstprogress">
<span class="firsttext">BOE端到端体系 - 第七章</span>
<span class="secondtext">70%</span>
<div class="progressbox">
<div class="progressboxpart"></div>
</div>
</div>
</div>
<div class="study2">
<div class="secondclass"></div>
<div class="secondprogress">
<span class="firsttext">中级产品经理项目 - 产品经理</span>
<span class="secondtext">52%</span>
<div class="progressbox">
<div class="progressboxpart"></div>
</div>
</div>
</div>
</div>
</div> -->
<div class="project_second">
<div class="course1_first">
<div class="text8">{{ data?.currentStageName }}</div>
<div class="course1_right">
<div class="circular"></div>
<div class="text9">进行中</div>
<div class="btn1"></div>
<div
class="circular"
:style="
(stageStatusName === '未开始' ||
stageStatusName === '已结束') &&
'border: 1px solid #999;'
"
></div>
<!-- <div class="text9">进行中</div> -->
<div
class="text9"
:style="
(stageStatusName === '未开始' ||
stageStatusName === '已结束') &&
'color:#999'
"
>
{{ stageStatusName }}
</div>
<!-- <div class="btn1"></div> -->
</div>
</div>
<div class="secondcontent">
@@ -67,11 +55,63 @@
class="question"
v-for="(el, index) in data?.taskBoList"
:key="index"
:style="{
height: el.type === 1 ? '90px' : '72px',
}"
>
<div style="width: calc(100% - 80px)">
<div class="issue">
{{ el.name }}
</div>
<div v-if="el.type === 1" class="progressBox">
<!-- <div>当前进度</div> -->
<div
class="progress"
style="
display: flex;
align-items: center;
margin-bottom: 3px;
"
>
<div style="width: 200px">
<el-progress
:percentage="parseInt(el.currentRatio)"
:show-text="false"
:stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(el.currentRatio) / 20)]
"
/>
</div>
<div
style="
font-size: 12px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(el.currentRatio) / 20)],
}"
>
{{ parseInt(el.currentRatio) }}%
</div>
</div>
</div>
<div class="coursetag">
<div
class="tag1"
@@ -120,12 +160,18 @@ import { computed, reactive, ref, watch } from "vue";
// import circle from "../../assets/image/pathdetails/circle.png";
// import circle2 from "../../assets/image/pathdetails/circle2.png";
import { boeRequest, useRequest, request } from "@/api/request";
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD } from "@/api/api";
import {
ROUTER_PROCESS,
LINK_DETAILS,
STUDY_RECORD,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import store from "@/store";
import { ROUTER } from "@/api/CONST";
import ReturnHead from "@/components/ReturnHead.vue";
const {
query: { routerId, routerName },
} = useRoute();
@@ -134,6 +180,21 @@ const returnclick = () => {
router.back();
};
const { data } = useRequest(ROUTER_PROCESS, { routerId: routerId });
const stageStatusName = computed(() => {
if (data.value.status !== 1) {
return "已结束";
}
if (!data.value.taskBoList?.filter((t) => t.status === 1)?.length) {
return "未开始";
}
if (
data.value.taskBoList.filter((t) => t.status === 1).length ===
data.value.taskBoList.length
) {
return "已完成";
}
return "进行中";
});
const userInfo = computed(() => store.state.userInfo);
console.log("lalalallala", data, userInfo);
const activeName = ref("first");
@@ -178,11 +239,17 @@ const types = ref({
13: "去完成",
},
path: {
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
2: "/faceteach",
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
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"
),
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
4: "/homeworkpage",
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
// 5: "/externalexam",
6: "/liveboradcast",
7: "/outerchain", //外联
@@ -212,46 +279,60 @@ function toFinish(d) {
ElMessage.error("暂时未开放");
return;
}
// 在线课 停用 -- 暂时没有在线课停用标记
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.warning("该任务无法学习,请联系管理员进行替换!");
return;
}
}
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.warning("该任务无法学习,请联系管理员进行替换!");
return;
}
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前面授课已结束";
dialogVisible.value = true;
//return
ElMessage.warning("当前面授课已结束");
return;
}
}
if (d.type === 3) {
ElMessage.warning("请在pc端查看");
return;
}
if (d.type == 4) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前作业已结束";
dialogVisible.value = true;
//return
}
}
// 直播结束时间
if (d.type == 6) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前直播已结束";
dialogVisible.value = true;
//return
ElMessage.warning("当前作业已结束");
return;
}
}
// 考试 停用
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换");
return;
}
// 此处判断外部考试跳转
if (d.startTime == null || d.endTime == null) {
// 点击即更新状态 进行中
request(SubmitExternalExam, {
chapterId: data.value.currentStageId,
externalId: d.courseId,
externalName: d.name,
targetId: routerId,
studentNo: userInfo.value.userNo,
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
router.push({
path: "/externalexam",
query: {
@@ -261,12 +342,12 @@ function toFinish(d) {
return;
}
}
// 评估 停用
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
// 直播结束时间
if (d.type == 6) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
ElMessage.warning("当前直播已结束");
return;
}
}
@@ -275,41 +356,33 @@ function toFinish(d) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前活动已结束";
dialogVisible.value = true;
//return
}
}
// 在线课 停用 -- 暂时没有在线课停用标记
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("当前活动已结束");
return;
}
}
// 面授课 停用
if (d.type == 2) {
// 评估 停用
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换");
return;
}
}
if (d.type === 3) {
d.status !== 1 &&
request(STUDY_RECORD, {
studentId: userInfo.value.id,
targetId: data.value.routerId,
logo: ROUTER,
stageOrChapterId: data.value.currentStageId,
taskId: d.routerTaskId,
});
}
console.log("点击跳转", d);
console.log("点击跳转", d, d.id);
//更新学员当前任务
request(UPDATE_CURRENT_TASK, {
id: d.id,
type: ROUTER,
pid: routerId,
name: d.name,
});
if (typeof types.value.path[d.type] === "string") {
// console.log(
// "types.value.path[d.type]",
// types.value.path[d.type],
// import.meta.env.VITE_BOE_EXAM_DETAIL_URL,
// import.meta.env.VITE_BOE_ONLINE_CLASS_URL
// );
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&
window.open(types.value.path[d.type] + d.targetId, "_top");
@@ -318,7 +391,7 @@ function toFinish(d) {
router.push({
path: types.value.path[d.type],
query: {
id: d.routerTaskId,
id: d.id,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
@@ -351,6 +424,7 @@ function toFinish(d) {
display: flex;
flex-direction: column;
//justify-content: center;
margin-top: 10px;
.up {
width: 100%;
height: 162px;
@@ -700,11 +774,12 @@ function toFinish(d) {
.issue {
width: 100%;
font-size: 13px;
line-height: 30.29px;
// line-height: 30.29px;
color: rgba(110, 123, 132, 1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 2px;
}
.coursetag {
display: flex;

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-19 11:28:11
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-14 21:01:08
* @LastEditTime: 2023-02-19 13:54:34
* @FilePath: /stu_h5/src/views/projectdetails/ProjectPath.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -179,14 +179,18 @@ const handleClick = (tab, event) => {
console.log("selectTab", selectTab.value);
};
const goDetails = () => {
// router.push({
// path: "/pathdetails",
// query: { routerId: 339 },
// });
router.push({
path: "/projectdetails",
query: { projectId: 517 },
path: "/pathdetails",
query: { routerId: 397 },
});
// router.push({
// path: "/projectdetails",
// query: { projectId: 591 },
// });
// router.push({
// path: "/faceteach",
// query: { type: 3, courseId: 290 },
// });
};
</script>

View File

@@ -4,6 +4,7 @@
text="项目详情"
:showfile="true"
:courseId="projectId || courseId"
:type="1"
></ReturnHead>
<div class="main">
<div class="up">
@@ -14,53 +15,22 @@
<span class="close"></span>
</div> -->
<div class="content">
<div class="title">{{ data?.projectInfo?.name }}</div>
<div class="title">{{ data?.name }}</div>
<div class="text2">
{{ data?.projectInfo?.remark ? data?.projectInfo?.remark : "-" }}
{{ data?.remark ? data?.remark : "-" }}
</div>
</div>
</div>
<div class="down">
<div class="project_title">项目内容</div>
<!-- <div class="project_first">
<div class="course1_first">
<div class="text8">管理者如何持续找到发力点</div>
<div class="course1_right">
<div class="circular"></div>
<div class="text9">进行中</div>
<div class="btn1"></div>
</div>
</div>
<div class="course_content">
<div class="study1">
<div class="firstclass"></div>
<div class="firstprogress">
<span class="firsttext">BOE端到端体系 - 第七章</span>
<span class="secondtext">70%</span>
<div class="progressbox">
<div class="progressboxpart"></div>
</div>
</div>
</div>
<div class="study2">
<div class="secondclass"></div>
<div class="secondprogress">
<span class="firsttext">中级产品经理项目 - 产品经理</span>
<span class="secondtext">52%</span>
<div class="progressbox">
<div class="progressboxpart"></div>
</div>
</div>
</div>
</div>
</div> -->
<div
class="project_second"
v-for="(item, key) in data?.stageList"
v-for="(item, key) in data?.stageProcessList"
:key="key"
>
<div v-if="item.id == '0' && item.taskList.length == 0"></div>
<div
v-if="item.stageId == '0' && item.taskProcessList.length == 0"
></div>
<div
v-else
style="
@@ -71,17 +41,39 @@
"
>
<div class="course1_first">
<div class="text8">{{ item.name }}</div>
<div class="course1_right">
<div class="circular"></div>
<div class="text9">进行中</div>
<div class="btn1"></div>
<div class="text8">{{ item.stageName }}</div>
<!-- 当前任务已结束的时候显示下面 -->
<div class="course1_right" :style="{ display: 'flex' }">
<div
style="
width: 8px;
height: 8px;
border-radius: 8px;
border: 2px solid #999;
"
:style="
(item.stageStatusName === '未开始' ||
item.stageStatusName === '已结束') &&
'border: 1px solid #999;'
"
></div>
<div
class="text9"
:style="
(item.stageStatusName === '未开始' ||
item.stageStatusName === '已结束') &&
'color:#999'
"
>
{{ item.stageStatusName }}
</div>
</div>
</div>
<div class="secondcontent">
<div
class="question"
v-for="(el, index) in item.taskList"
v-for="(el, index) in item.taskProcessList"
:key="index"
>
<div style="width: calc(100% - 80px)">
@@ -153,17 +145,22 @@
</template>
<script setup>
import { computed, reactive, ref } from "vue";
import { computed, reactive, ref, watch } from "vue";
import { ElLoading } from "element-plus";
import { useRequest, request } from "@/api/request";
import { PROJECT_PROCESS, STUDY_RECORD, PROJECT_DETAIL } from "@/api/api";
import {
PROJECT_PROCESS,
STUDY_RECORD,
PROJECT_DETAIL,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
import ReturnHead from "@/components/ReturnHead.vue";
import { PROJECT } from "@/api/CONST";
import dayjs from "dayjs";
const {
query: { courseId, projectId },
} = useRoute();
@@ -172,7 +169,38 @@ const router = useRouter();
const { data } = useRequest(PROJECT_PROCESS, {
projectId: projectId || courseId,
});
watch(
() => data.value.stageProcessList,
() => {
data.value.stageProcessList.forEach((t) => {
t.stageStatusName = getTaskStatus(t);
});
console.log("改变data", data);
},
{ deep: true }
);
function getTaskStatus(d) {
if (data.value.status !== 3) {
return "已结束";
}
if (
dayjs().isBefore(dayjs(d.beginTime)) ||
!d.taskProcessList?.filter((t) => t.status === 1)?.length
) {
return "未开始";
}
if (dayjs().isAfter(dayjs(data.value.endTime))) {
return "已结束";
}
if (
d.taskProcessList?.filter((t) => t.status === 1)?.length ===
d.taskProcessList?.length
) {
return "已完成";
}
return "进行中";
}
console.log("datadata", data);
const userInfo = computed(() => store.state.userInfo);
@@ -213,7 +241,7 @@ const types = ref({
13: "去完成",
},
path: {
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
2: ({ courseId }) =>
window.open(
`${location.protocol}//${location.host}${
@@ -221,9 +249,9 @@ const types = ref({
}/stu/project/redirectDetail?courseId=${courseId}`,
"_top"
),
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
4: "/homeworkpage",
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
// 5: "/externalexam",
6: "/livebroadcast",
7: "/outerchain", //外联
@@ -306,9 +334,8 @@ function toFinish(d, sName, chapterOrStageId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前面授课已结束";
dialogVisible.value = true;
ElMessage.warning("当前面授课已结束");
return;
//return
}
}
@@ -317,10 +344,8 @@ function toFinish(d, sName, chapterOrStageId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前作业已结束";
dialogVisible.value = true;
//return
ElMessage.warning("当前作业已结束");
return;
}
}
// 直播结束时间
@@ -328,21 +353,33 @@ function toFinish(d, sName, chapterOrStageId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前直播已结束";
dialogVisible.value = true;
//return
ElMessage.warning("当前直播已结束");
return;
}
}
// 考试 停用
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换!");
return;
}
// 此处判断外部考试跳转
if (d.startTime == null || d.endTime == null) {
// 点击即更新状态 进行中
request(SubmitExternalExam, {
chapterId: data.value.currentStageId,
externalId: d.courseId,
externalName: d.name,
targetId: routerId,
studentNo: userInfo.value.userNo,
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
router.push({
path: "/externalexam",
query: {
@@ -355,9 +392,7 @@ function toFinish(d, sName, chapterOrStageId) {
// 评估 停用
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换");
return;
}
}
@@ -366,26 +401,21 @@ function toFinish(d, sName, chapterOrStageId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = "当前活动已结束";
dialogVisible.value = true;
//return
ElMessage.warning("当前活动已结束");
return;
}
}
// 在线课 停用 -- 暂时没有在线课停用标记
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换");
return;
}
}
// 面授课 停用
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = "该任务无法学习,请联系管理员进行替换!";
dialogVisible.value = true;
ElMessage.warning("该任务无法学习,请联系管理员进行替换");
return;
}
}
@@ -394,17 +424,14 @@ function toFinish(d, sName, chapterOrStageId) {
ElMessage.error("暂时未开放");
return;
}
if (d.type == 3) {
d.status !== 1 &&
request(STUDY_RECORD, {
studentId: data.value.userInfoBo.userId,
targetId: data.value.routerId,
logo: PROJECT,
stageOrChapterId: chapterOrStageId,
taskId: d.projectTaskId,
});
}
if (d.type === 3) return ElMessage.warning("请在pc端查看");
//更新学员当前任务
request(UPDATE_CURRENT_TASK, {
id: d.id,
type: ROUTER,
pid: routerId,
name: d.name,
});
if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&
@@ -414,7 +441,7 @@ function toFinish(d, sName, chapterOrStageId) {
router.push({
path: types.value.path[d.type],
query: {
id: d.projectTaskId,
id: d.id,
type: PROJECT,
infoId: data.value.projectId,
courseId: d.courseId,
@@ -459,6 +486,7 @@ const queryAllStatus = (data) => {
display: flex;
flex-direction: column;
//justify-content: center;
margin-top: 10px;
.up {
width: 100%;
height: 162px;
@@ -750,7 +778,7 @@ const queryAllStatus = (data) => {
.course1_right {
display: flex;
position: relative;
width: 60px;
width: 80px;
height: 13.5px;
margin-top: 15px;
// margin-right: 10.5px;

View File

@@ -1,17 +1,12 @@
<template>
<el-result
icon="success"
title="签到异常"
sub-title="请联系管理员"
>
<el-result icon="success" title="签到异常" sub-title="请联系管理员">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</template>
<script setup>
function toIndex(){
window.location.href = import.meta.env.VITE_BOE_API_URL
function toIndex() {
window.location.href = import.meta.env.VITE_BOE_API_URL;
}
</script>

View File

@@ -1,17 +1,20 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-17 19:47:07
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-19 10:45:22
* @FilePath: /stu_h5/src/views/sign/signResult.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-result
icon="success"
title="签到成功"
sub-title="您已经签到成功"
>
<el-result icon="success" title="签到成功" sub-title="您已经签到成功">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</template>
<script setup>
function toIndex(){
window.location.href = import.meta.env.VITE_BOE_API_URL
function toIndex() {
window.location.href = import.meta.env.VITE_BOE_API_URL;
}
</script>

View File

@@ -1,17 +1,12 @@
<template>
<el-result
icon="success"
title="签到异常"
sub-title="您不在此课程中"
>
<el-result icon="success" title="签到异常" sub-title="您不在此课程中">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</template>
<script setup>
function toIndex(){
window.location.href = import.meta.env.VITE_BOE_API_URL
function toIndex() {
window.location.href = import.meta.env.VITE_BOE_API_URL;
}
</script>

View File

@@ -1,17 +1,20 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-17 19:47:07
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-19 10:45:30
* @FilePath: /stu_h5/src/views/sign/signSuccessResult.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-result
icon="success"
title="签到成功"
sub-title="您已经签到成功"
>
<el-result icon="success" title="签到成功" sub-title="您已经签到成功">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</template>
<script setup>
function toIndex(){
window.location.href = import.meta.env.VITE_BOE_API_URL
function toIndex() {
window.location.href = import.meta.env.VITE_BOE_API_URL;
}
</script>

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-13 11:42:48
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-06 18:39:40
* @LastEditTime: 2023-02-19 12:16:34
* @FilePath: /stu_h5/vite.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -109,6 +109,10 @@ export default defineConfig(({ command, mode }) =>
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},
'/evaluation/evaluationToLearn': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},
}
}