Merge branch 'manage-release' of http://gitlab.dongwu-inc.com:10080/BOE/fe-stu into release

# Conflicts:
#	vite.config.js
This commit is contained in:
dongruihua
2022-12-25 19:50:06 +08:00
31 changed files with 3609 additions and 2978 deletions

1
.env
View File

@@ -9,6 +9,7 @@ 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_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_PATH_DETAIL_URL=http://u-pre.boe.com/pc/forward?to=/fe-student
VITE_BOE_API_URL=https://u-pre.boe.com VITE_BOE_API_URL=https://u-pre.boe.com

View File

@@ -7,5 +7,6 @@ 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_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_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_EXAM_DETAIL_URL=https://u.boe.com/pc-release/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=http://u.boe.com/pc/forward?to=/fe-student-release
VITE_BOE_API_URL=https://u.boe.com VITE_BOE_API_URL=https://u.boe.com

View File

@@ -7,17 +7,10 @@
* @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
v-for="item in routes" v-for="item in routes"
@@ -43,7 +36,7 @@ import {useStore} from "vuex";
import {onMounted} from "vue"; import {onMounted} from "vue";
import router from "@/router"; import router from "@/router";
console.log("版本1.0.1------------"); console.log("版本1.0.5------------");
const store = useStore(); const store = useStore();
onMounted(() => { onMounted(() => {
getUserInfo(); getUserInfo();

View File

@@ -58,3 +58,5 @@ export const ACTIVITY = '/activity'
export const STUDY_RECORD = '/stu/task/thirdTask/submit post' export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
export const PROJECT_LIST = '/stu/project/list post' export const PROJECT_LIST = '/stu/project/list post'
export const FACETEACH_SIGNUP = `/stu/project/stuFaceTeachSignUp`

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 818 B

View File

@@ -1,7 +1,6 @@
<template> <template>
<img class="file" <img class="file" :style="style"
:style="style" :src="{ pdf, doc: word, ppt, zip, excel, xlsx: excel, xls: excel, rar, book, md, docx: word, png }[filePath.split('.').slice(-1)] || book" />
:src="{pdf,doc:word,ppt,zip,excel,xlsx:excel,xls:excel,rar,book,md,docx:word}[filePath.split('.').slice(-1)] || book"/>
</template> </template>
<script setup> <script setup>
import rar from '@/assets/image/file/rar.png' import rar from '@/assets/image/file/rar.png'
@@ -14,7 +13,7 @@ import zip from '@/assets/image/file/zip.png'
import book from '@/assets/image/file/book.png' import book from '@/assets/image/file/book.png'
import { defineProps, ref } from "vue"; import { defineProps, ref } from "vue";
const {modelValue = [], style} = defineProps({ const { modelValue = "", style } = defineProps({
modelValue: String, modelValue: String,
style: { style: {
type: Object, type: Object,

View File

@@ -0,0 +1,82 @@
<template>
<div class="pathDetail" v-if="visiable" :style="{background:`url('${back}') no-repeat`}">
<div v-for="(item,i) in detail.chapterDtoList" :key="i" class="cha"
:style="{top:`${imgAttr.positions[i]?.top - (current===i?5:0)}px`,left:`${imgAttr.positions[i]?.left - (current===i?10:0)}px`}">
<div @click="toDetail(i)"
:style="{background: `url('${current===i?currentBack:nameBack}')`,backgroundSize:'100%',width:`${current===i?139:123}px`,height:`${current===i?60:53}px`,textAlign:'center',lineHeight:'45px',fontsize:'12px',color:'#FFF'}">
{{ item.name }}
</div>
</div>
</div>
</template>
<script setup>
import {computed, defineProps, ref, watch} from "vue";
import back from '@/assets/image/pathdetails/组 21.png'
import nameBack from '@/assets/image/pathdetails/组 23.png'
import currentBack from '@/assets/image/pathdetails/组 23(1).png'
import {useRouter} from "vue-router/dist/vue-router";
const props = defineProps({
value: String,
img: String,
detail: {
type: Object,
default: {}
}
})
const router = useRouter();
const visiable = ref(true)
const imageAttrs = {
'路径图背景-1671015331292.png': {
width: 1437,
height: 594,
positions: [
{left: 84, top: 518},
{left: 307, top: 370},
{left: 848, top: 275},
{left: 617, top: 69},
{left: 1047, top: 42},
]
}
}
const imgAttr = computed(() => imageAttrs[Object.keys(imageAttrs).find(e => props.img.includes(e))] || {})
const current = computed(() => props.detail.chapterDtoList.findIndex(e => e.chapterId === props.detail.currentStageId))
function show() {
visiable.value = true
}
function toDetail(i) {
if (current.value !== i) {
return
}
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: {routerId: props.detail.routerId, routerName: props.detail.routerName},
})
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails&params=${encodeURIComponent(
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
)}`
);
}
function close() {
visiable.value = false
}
</script>
<style lang="scss">
.pathDetail {
width: 100%;
height: 1011px;
position: relative;
}
.cha {
position: absolute;
cursor: pointer;
}
</style>

View File

@@ -17,11 +17,7 @@
--> -->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -16,11 +16,7 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -30,11 +30,7 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -31,11 +31,7 @@
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -30,11 +30,7 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,18 +1,17 @@
<template> <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="faceteach" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
<div>课程列表</div> <div>课程列表</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">课程详情</div> <div style="font-weight: 700">课程详情</div>
<div v-if="pName != ''" class="return"> <div v-if="pName != ''" class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;"
class="img2" src="../../assets/image/return.png" />返回</el-button>
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>
@@ -23,56 +22,30 @@
<div style="margin-left: 46px"> <div style="margin-left: 46px">
<div class="title">面授课{{ data.planDto?.name }}</div> <div class="title">面授课{{ data.planDto?.name }}</div>
<div class="time" style="margin-top: 26px"> <div class="time" style="margin-top: 26px">
<img <img style="width: 15px; height: 17px" src="../../assets/image/time.png" />
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px"> <div style="margin-left: 8px">
{{ data.planDto?.beginTime + "至" + data.planDto?.endTime }} {{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + " 至 " +
dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM')
}}
</div> </div>
</div> </div>
<div class="time" style="margin-top: 23px"> <div v-if="data.planDto?.address" class="time" style="margin-top: 23px">
<img <img style="width: 16px; height: 18px" src="../../assets/image/position.png" />
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data.planDto?.address }}</div> <div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div> </div>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<botton
v-if="!isAllowSign" <botton class="btn" style="margin-right: 20px" :style="{
class="btn"
style="margin-right: 20px; background: #999"
@click="signClick"
>签到
</botton>
<botton
v-if="isAllowSign"
class="btn"
style="margin-right: 20px"
:style="{
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)', background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
}" }" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<botton <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
style="background: #999"
class="btn"
@click="toSurvery"
v-if="data.planDto?.evalFlag == 0"
>
评估 评估
</botton> </botton>
<botton <botton :style="{
:style="{
background: `${new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`, background: `${new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" }" class="btn" @click="toSurvery" v-else>{{ data.isSurvery ? "已评估" : "评估" }}
class="btn"
@click="toSurvery"
v-if="data.planDto?.evalFlag && data.planDto?.evalFlag == 1"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton> </botton>
</div> </div>
</div> </div>
@@ -84,97 +57,52 @@
<div class="detailT"> <div class="detailT">
<div class="" style="margin-left: 48px; margin-right: 48px"> <div class="" style="margin-left: 48px; margin-right: 48px">
<div class="title"> <div class="title">
<img <img style="width: 20px; height: 20px" src="../../assets/image/course.png" />
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
/>
<div class="text">课程详情</div> <div class="text">课程详情</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<div class="content" v-html="data.planDto?.description"></div> <div class="content" v-html="data.offcourseDto?.intro"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="detailB"> <div class="detailB">
<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 <div v-if="data.planDto?.attach === ''"
v-if="data.planDto?.attach === '[]'" style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无附件 此课程无附件
</div> </div>
<div <div v-else>
v-for="(el, index) in JSON.parse(data.planDto?.attach)" <div v-for="(el, index) in formateArr(data.planDto?.attach)" :key="index" class="enclosure"
:key="index" :style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
v-if="data.planDto"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL"> <div class="enclosureL">
<FileTypeImg <FileTypeImg :v-model="el.slice(el.indexOf('-') + 1)" :style="{
v-model="el.name"
:style="{
width: '22px', width: '22px',
height: '26px', height: '26px',
marginLeft: '10px', marginLeft: '10px',
}" }"></FileTypeImg>
></FileTypeImg> <div style="margin-left: 20px">{{ el.slice(el.indexOf('-') + 1) }}</div>
<div style="margin-left: 20px">{{ el.name }}</div>
</div> </div>
<div <div v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" class="download">
v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" <img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
class="download"> <div style="margin-left: 5px;color:#999;" @click="downloads(el)">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px;color:#999;"
@click="downloads(el.response.data)"
>
下载 下载
</div> </div>
</div> </div>
<div <div v-else class="download">
v-else <img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
class="download"> <div style="margin-left: 5px" @click="download(el)">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px"
@click="download(el.response.data)"
>
下载 下载
</div> </div>
</div> </div>
</div> </div>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="课程作业" name="second"> <el-tab-pane label="课程作业" name="second">
<div
v-if="data.planDto?.attach === '[]'" <div class="work" v-if="data.workDto">
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无作业
</div>
<div class="work" v-if="data.workDto?.workName">
<div> <div>
<div class="question">{{ data.workDto?.workName }}</div> <div class="question">{{ data.workDto?.workName }}</div>
<div style="margin-top: 16px; display: flex"> <div style="margin-top: 16px; display: flex">
@@ -183,66 +111,57 @@
</div> </div>
</div> </div>
<div v-if="isEndSubMitWork()" class="submit" style="background: #999">
已结束
</div>
<div <div
:style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}" :style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
v-else class="submit" @click="toWork" v-if="data.workDto?.workId"> class="submit" @click="toWork" >
交作业 交作业
</div> </div>
</div> </div>
</el-tab-pane> <div v-else
<el-tab-pane label="课程考试" name="third"> style=" font-size: 14px; font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px;margin-top: 20px; ">
<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>
</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="work" v-if="data.examinationDto?.examinationTestName">
<div> <div>
<div class="question"> <div class="question">
{{ data.examinationDto?.examinationTestName }} {{ data.examinationDto?.examinationTestName }}
</div> </div>
<div style="margin-top: 16px; display: flex"> <div style="margin-top: 16px; display: flex">
<div <div class="tag1" v-if="data.examinationDto?.examinationFlag">
class="tag1"
v-if="data.examinationDto?.examinationFlag"
>
必修 必修
</div> </div>
<div class="tag3" style="margin-left: 11px">考试</div> <div class="tag3" style="margin-left: 11px">考试</div>
</div> </div>
</div> </div>
<div :style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}" class="submit" @click="toExamItem(data.examinationDto)">
<div
:style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toExamItem(data.examinationDto)">
去考试 去考试
</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>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
<div class="teacher"> <div class="teacher">
<div class="title"> <div class="title">
<img <img style="width: 21px; height: 23px" src="../../assets/image/livelecturer.png" />
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<div class="text">面授课讲师</div> <div class="text">面授课讲师</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<!-- todo #面授课接口 讲师缺少img和介绍--> <!-- todo #面授课接口 讲师缺少img和介绍-->
<div class="teacheritem"> <div class="teacheritem">
<img class="peopleimg" :src="teacherInfo.avatar" /> <img class="peopleimg" :src="teacherInfo.avatar" />
<div style="margin-left: 17px; width: 190px"> <div class="nameSpan">
<div class="teacherName" style="margin-right: 5px"> <div class="teacherName" style="margin-right: 5px">
{{ data.planDto?.teacher }} {{ data.planDto?.teacher }}
</div> </div>
@@ -269,6 +188,7 @@ import {
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils"; import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus"; import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
@@ -290,14 +210,21 @@ const state = reactive({
}); });
const { activeName, enclosure, isAllowSign } = toRefs(state); const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log(tab, event); console.log("附件", tab, event);
}; };
const download = (url) => { const download = (url) => {
window.open(url); window.open(url);
}; };
const downloads = (url) => { const downloads = (url) => {
ElMessage.info("面授课未开始"); ElMessage.warning("未到开始时间,请耐心等待!");
}; };
function formateArr(strs) {
let arrs = strs.split(',')
console.log('112233', arrs)
return arrs
}
let timer = null; let timer = null;
//判断能否签到 //判断能否签到
function isSignClick() { function isSignClick() {
@@ -356,22 +283,22 @@ const signClick = () => {
// state.isAllowSign, // state.isAllowSign,
// !state.isAllowSign // !state.isAllowSign
// ); // );
if(data.value.planDto.beginTime){ //if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() // let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() // let date2 = new Date().getTime()
if(date1>date2){ // if (date1 > date2) {
ElMessage.info("面授课未开始"); // ElMessage.info("未到开始时间,请耐心等待!");
return; // return;
} // }
} //}
if (!state.isAllowSign) { if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign); // console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.info("未在签到范围内"); ElMessage.warning("未在允许签到时间范围内");
return; return;
} }
2;
data.value.signFlag = 1; data.value.signFlag = 1;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
if (taskId) { if (taskId) {
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type }); request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
@@ -382,18 +309,14 @@ const signClick = () => {
function toSurvery() { function toSurvery() {
if (data.value.isSurvery) { if (data.value.isSurvery) {
return; // return;
} }
if(data.value.planDto.beginTime){ if (data.value.planDto.beginTime && dayjs().isBefore(data.value.planDto.beginTime)) {
let date1 = new Date(data.value.planDto.beginTime).getTime() ElMessage.warning("课程未开始,请耐心等待!");
let date2 = new Date().getTime()
if(date1>date2){
ElMessage.info("面授课未开始");
return; return;
} }
}
if (data.value.planDto.evalFlag == 0) { if (data.value.planDto.evalFlag == 0) {
ElMessage.info("此课程无评估"); ElMessage.warning("此课程无评估");
return; return;
} }
router.push({ router.push({
@@ -401,31 +324,24 @@ function toSurvery() {
query: { query: {
courseId: data.value.planDto.evaluateId, courseId: data.value.planDto.evaluateId,
pName: "面授课", pName: "面授课",
taskId: data.value.planDto.offcoursePlanId,
taskIds: data.value.planDto.offcoursePlanId,
chapterOrStageId: 0,
sName: data.value.planDto.name, sName: data.value.planDto.name,
type: 3
}, },
}); });
} }
function isEndSubMitWork() {
if(data.value.workDto.submitEndTime){
let date1 = new Date(data.value.workDto.submitEndTime).getTime();
let date2 = new Date().getTime();
console.log(date1, date2, date1>date2, data.value.workDto.submitEndTime)
if(date1<date2){
return true;
}
}else{
return false;
}
}
function toWork() { function toWork() {
if (data.value.planDto.beginTime) { if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("面授课未开始"); ElMessage.warning("未到开始时间,请耐心等待!");
return;
} }
} }
router.push({ router.push({
@@ -433,6 +349,9 @@ function toWork() {
query: { query: {
courseId: data.value.workDto.workId, courseId: data.value.workDto.workId,
id: taskId, id: taskId,
taskId: taskId,
taskIds: taskId,
chapterOrStageId: 0,
type, type,
pName: "面授课", pName: "面授课",
sName: data.value.planDto.name, sName: data.value.planDto.name,
@@ -445,8 +364,8 @@ function toExamItem(obj) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("面授课未开始"); ElMessage.warning("未到开始时间,请耐心等待!");
return;
} }
} }
console.log("obj", obj.examinationTestId); console.log("obj", obj.examinationTestId);
@@ -514,9 +433,11 @@ onUnmounted(() => {
align-items: center; align-items: center;
} }
} }
.return { .return {
position: absolute; position: absolute;
right: 10%; right: 10%;
.text { .text {
text-align: center; text-align: center;
display: flex; display: flex;
@@ -524,6 +445,7 @@ onUnmounted(() => {
align-items: center; align-items: center;
} }
} }
.detailinfo { .detailinfo {
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
@@ -580,6 +502,12 @@ onUnmounted(() => {
border-radius: 8px; border-radius: 8px;
margin-top: 20px; margin-top: 20px;
.wenxintishi {
display: flex;
justify-content: stretch;
padding: 72px;
}
.el-tabs__item { .el-tabs__item {
height: 69px; height: 69px;
padding: 25px 7px 0px 52px; padding: 25px 7px 0px 52px;
@@ -689,9 +617,11 @@ onUnmounted(() => {
margin-left: 48px; margin-left: 48px;
margin-right: 48px; margin-right: 48px;
// min-height: 115px; // min-height: 115px;
margin-top: 20px;
padding: 25px 0px; padding: 25px 0px;
display: flex; display: flex;
position: relative; position: relative;
// align-items: center; // align-items: center;
} }
@@ -701,13 +631,42 @@ onUnmounted(() => {
border-radius: 30px; border-radius: 30px;
} }
.teacheritem .teacherName { .teacheritem {
.nameSpan {
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: #394145; color: #394145;
display: flex; display: flex;
align-items: center; 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 { .teacheritem .introduce {
font-size: 14px; font-size: 14px;
@@ -734,6 +693,8 @@ onUnmounted(() => {
cursor: pointer; cursor: pointer;
} }
} }
} }
} }
</style> </style>

View File

@@ -0,0 +1,504 @@
<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;" @click="onLineSignUp">立即报名
</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.offcourseDto?.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.offcourseDto.attach)" :key="index" class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
<div class="enclosureL">
<FileTypeImg :v-model="el.slice(el.indexOf('-') + 1)" :style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"></FileTypeImg>
<div style="margin-left: 20px">{{ el.slice(el.indexOf('-') + 1) }}</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,
TASK_OFFCOURSE_NOTASK_SIGN,
TASK_OFFCOURSE_SIGN,
TASK_BROADCAST_SIGN,
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, id: taskId },
} = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
console.log("datadatadatadatadatadatadata", data);
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() {
request(FACETEACH_SIGNUP, { courseId }).then(res => {
console.log(res)
if (res.code == 200) {
ElMessage.success("报名成功");
}
}).catch(err => {
console.log(err)
});
}
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

@@ -1,4 +1,5 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="homework" style="padding: 30px"> <div class="homework" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
@@ -14,11 +15,9 @@
<span class="content" style="margin-left: 31px">下一个</span> <span class="content" style="margin-left: 31px">下一个</span>
<button class="btn btn02" style="margin-left: 6px"></button> <button class="btn btn02" style="margin-left: 6px"></button>
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img class="img2" style="margin-right: 22px;cursor: pointer;" src="../../assets/image/return.png" /> <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
<div style="cursor: pointer;" class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>
@@ -48,11 +47,12 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<UploadImg v-model:value="fileList" ref="uploadRef"> <UploadImg v-model:value="fileList" ref="uploadRef">
<button class="shangchuan" style="cursor: pointer"> <button class="shangchuan" style="cursor: pointer">
上传 上传
</button> </button>
</UploadImg> </UploadImg></div>
<div class="uploadDetail" <div class="uploadDetail"
:style="{ display: showFileList && fileList && fileList.length > 0 ? 'block' : 'none' }" :style="{ display: showFileList && fileList && fileList.length > 0 ? 'block' : 'none' }"
@mousemove="showFileList = 1" @mouseout="showFileList = 0" style="padding-top: 60px"> @mousemove="showFileList = 1" @mouseout="showFileList = 0" style="padding-top: 60px">
@@ -108,16 +108,22 @@
<div class="text">作业内容</div> <div class="text">作业内容</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<div class="join">
<el-input v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none" <el-input v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
type="textarea" /> type="textarea" />
</div> </div>
<div v-else class="join">
<el-input disabled v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
type="textarea" />
</div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : "" <button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : ""
}}提交</button> }}提交</button>
</div> </div>
</div>
@@ -149,9 +155,7 @@
</div> </div>
</div> </div>
<div class="content3"> <div class="content3">
<div> <div><span style="margin-left: 10px">
<span style="margin-left: 10px">
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{ <el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{
value.workUploadAddress?.split(',')[0].split('/').at(-1) || value.workUploadAddress?.split(',')[0].split('/').at(-1) ||
'' ''
@@ -172,23 +176,12 @@
</div> </div>
<div class="timebox clearfix"> <div class="timebox clearfix">
<div class="innertime"> <div class="innertime">
{{ {{data?.submitStartTime}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{data?.submitEndTime}}
data?.submitStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
data?.submitEndTime
}}
</div> </div>
<div class="endtime clearfix"> <div class="endtime clearfix">
<div class="endtimetext"> <div v-if="dayjs(data?.submitEndTime).isBefore(dayjs())" class="endtimetext">改任务已结束</div>
距离结束还有&nbsp;&nbsp; <div v-else class="endtimetext">距离结束还有&nbsp;&nbsp;<span class="te">{{parseInt(dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60)}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;
<span class="te">{{ <span class="te">{{dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60}}</span>&nbsp;&nbsp;分钟</div>
parseInt(
dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60
)
}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60
}}</span>&nbsp;&nbsp;分钟
</div>
</div> </div>
</div> </div>
<div class="righttitle"> <div class="righttitle">
@@ -271,6 +264,7 @@ const showFileList = computed(() => {
return fileList.value.length return fileList.value.length
}) })
const handleClick = () => { const handleClick = () => {
console.log(fileList.value, uploadRef.value) console.log(fileList.value, uploadRef.value)
if (!sbValue.value.content) { if (!sbValue.value.content) {

View File

@@ -1,11 +1,12 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="moreactive" style="padding: 30px"> <div class="moreactive" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
<div>{{ pName }}</div> <div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div> <div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div v-if="sName" style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">直播详情</div> <div style="font-weight: 700; font-size: 16px">直播详情</div>
<!-- <!--
<div class="preNext"> <div class="preNext">
@@ -17,12 +18,8 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;"
class="img2" src="../../assets/image/return.png" />返回</el-button>
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>
@@ -33,10 +30,7 @@
<div style="margin-left: 46px"> <div style="margin-left: 46px">
<div class="title">直播{{ data?.liveName }}</div> <div class="title">直播{{ data?.liveName }}</div>
<div class="time" style="margin-top: 26px"> <div class="time" style="margin-top: 26px">
<img <img style="width: 15px; height: 17px" src="../../assets/image/time.png" />
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px"> <div style="margin-left: 8px">
{{ data?.liveStartTime + " 至 " + data?.liveEndTime }} {{ data?.liveStartTime + " 至 " + data?.liveEndTime }}
</div> </div>
@@ -52,37 +46,22 @@
</div> --> </div> -->
</div> </div>
<div class="threeBtn"> <div class="threeBtn">
<botton <botton class="btn" :style="{
class="btn" background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
style="background: rgb(59, 191, 252)" }" @click="showClick">观看
@click="showClick"
>观看
</botton> </botton>
<botton
class="btn" <botton class="btn" :style="{
:style="{ background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`, }" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<botton <botton style="background: #999" class="btn" @click="commitClick" v-if="data.isEvaluate == 0 ">
style="background: #999"
class="btn"
@click="commitClick"
v-if="data.isEvaluate == 0"
>
评估 评估
</botton> </botton>
<botton <botton :style="{
:style="{ background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
background: `${data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`, }" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{ data.isSurvery ? "已评估": "评估"}}
}"
class="btn"
@click="commitClick"
v-if="data.isEvaluate && data.isEvaluate == 1"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton> </botton>
</div> </div>
</div> </div>
@@ -94,10 +73,7 @@
<div class="detailT"> <div class="detailT">
<div class="" style="margin-left: 48px; margin-right: 48px"> <div class="" style="margin-left: 48px; margin-right: 48px">
<div class="title"> <div class="title">
<img <img style="width: 20px; height: 20px" src="../../assets/image/course.png" />
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
/>
<div class="text">直播说明</div> <div class="text">直播说明</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -131,10 +107,7 @@
<div> <div>
<div class="tell"> <div class="tell">
<div class="title"> <div class="title">
<img <img style="width: 21px; height: 23px" src="../../assets/image/tv.png" />
style="width: 21px; height: 23px"
src="../../assets/image/tv.png"
/>
<div class="text">直播公告</div> <div class="text">直播公告</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -142,18 +115,12 @@
</div> </div>
<div class="teacher"> <div class="teacher">
<div class="title"> <div class="title">
<img <img style="width: 21px; height: 23px" src="../../assets/image/livelecturer.png" />
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<!-- todo #直播详情 没有直播讲师--> <!-- todo #直播详情 没有直播讲师-->
<div class="text">直播讲师</div> <div class="text">直播讲师</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div <div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
>
<img class="peopleimg" :src="teacherInfo.avatar" /> <img class="peopleimg" :src="teacherInfo.avatar" />
<div style="margin-left: 17px; width: 190px"> <div style="margin-left: 17px; width: 190px">
<div class="teacherName" style="margin-right: 5px"> <div class="teacherName" style="margin-right: 5px">
@@ -171,7 +138,7 @@
</template> </template>
<script setup> <script setup>
import { computed, reactive, toRefs } from "vue"; import { computed, reactive, toRefs,onUnmounted } from "vue";
import img from "@/assets/image/uploadimg.png"; import img from "@/assets/image/uploadimg.png";
import { request, useRequest } from "@/api/request"; import { request, useRequest } from "@/api/request";
import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api"; import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
@@ -179,6 +146,7 @@ import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils"; import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import dayjs from "dayjs";
const { const {
query: { courseId: liveId, id: taskId, type, pName, sName }, query: { courseId: liveId, id: taskId, type, pName, sName },
@@ -189,7 +157,7 @@ const returnclick = () => {
}; };
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId }); const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId });
console.log('直播信息', data)
const teacherInfo = useUserInfo( const teacherInfo = useUserInfo(
computed(() => data.value.userInfoBo?.userId) computed(() => data.value.userInfoBo?.userId)
); );
@@ -208,35 +176,120 @@ const state = reactive({
}); });
const { activeName, teacher } = toRefs(state); const { activeName, teacher } = toRefs(state);
const signClick = () => { const signClick = () => {
if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.warning("未在允许签到时间范围内");
return;
}
if (data.value.signFlag) { if (data.value.signFlag) {
return; return;
} }
data.value.signFlag = 1; data.value.signFlag = 1;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type }); request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type });
}; };
let timer = null;
//判断能否签到
function isSignClick() {
timer = setInterval(() => {
let beginTime = new Date(data.value.liveStartTime).getTime();
let endTime = !data.value.afterSignIn
? new Date(data.value.liveEndTime).getTime()
: new Date(data.value.liveStartTime).getTime();
let nowTime = new Date().getTime();
if (data.value.beforeSignIn && data.value.afterSignIn) {
//有开始前有开始后
beginTime = beginTime - data.value.beforeSignIn * 60 * 1000;
endTime = endTime + data.value.afterSignIn * 60 * 1000;
console.log("1111");
} else if (
data.value.beforeSignIn &&
!data.value.afterSignIn
) {
//只有开始前无开始后
beginTime = beginTime - data.value.beforeSignIn * 60 * 1000;
console.log("11112222");
} else if (
!data.value.beforeSignIn &&
data.value.afterSignIn
) {
//无开始前有开始后
endTime = endTime + data.value.afterSignIn * 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 commitClick = () => { const commitClick = () => {
if (data.value.isSurvery) { if (data.value.liveStartTime) {
let date1 = new Date(data.value.liveStartTime).getTime()
let date2 = new Date().getTime()
if (date1 > date2) {
ElMessage.warning("未到时间,请耐心等待!");
return; return;
} }
}
if (data.value.isSurvery) {
// return;
}
if (data.value.isEvaluate == 0) { if (data.value.isEvaluate == 0) {
ElMessage.info("此直播无评估"); ElMessage.warning("此直播无评估");
return; return;
} }
console.log({
courseId: data.value.assessmentId,
taskIds: taskId,
chapterOrStageId: 0,
pName: "直播",
sName: data.value.liveName,
type: 4
})
router.push({ router.push({
path: "/surveydetail", path: "/surveydetail",
query: { query: {
courseId: data.value.assessmentId, courseId: data.value.assessmentId,
taskId: data.value.liveId,
taskIds: data.value.liveId,
chapterOrStageId: 0,
pName: "直播", pName: "直播",
sName: data.value.liveName, sName: data.value.liveName,
type: 4
}, },
}); });
}; };
function showClick() { function showClick() {
if (data.value.liveStartTime) {
let date1 = new Date(data.value.liveStartTime).getTime()
let date2 = new Date().getTime()
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
}
window.open(data.value.liveLink); window.open(data.value.liveLink);
} }
onUnmounted(() => {
if (timer) {
clearInterval(timer);
}
});
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
@@ -249,9 +302,11 @@ function showClick() {
line-height: 24px; line-height: 24px;
position: relative; position: relative;
} }
.return { .return {
position: absolute; position: absolute;
right: 10%; right: 10%;
.text { .text {
text-align: center; text-align: center;
display: flex; display: flex;
@@ -259,6 +314,7 @@ function showClick() {
align-items: center; align-items: center;
} }
} }
.preNext { .preNext {
position: absolute; position: absolute;
right: 0px; right: 0px;
@@ -333,6 +389,7 @@ function showClick() {
} }
@media screen and (max-width: 1030px) { @media screen and (max-width: 1030px) {
// .threeBtn { // .threeBtn {
// margin-right: 30px; // margin-right: 30px;
// } // }
@@ -340,6 +397,7 @@ function showClick() {
margin-bottom: -24px; margin-bottom: -24px;
} }
} }
// @media screen and(max-width:) { // @media screen and(max-width:) {
// } // }
.time { .time {
@@ -530,11 +588,9 @@ function showClick() {
// min-height: 557px; // min-height: 557px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
border-radius: 8px; border-radius: 8px;
background: linear-gradient( background: linear-gradient(180deg,
180deg,
rgba(36, 120, 255, 0.15) 0%, rgba(36, 120, 255, 0.15) 0%,
rgba(255, 255, 255) 50% rgba(255, 255, 255) 50%);
);
.title { .title {
display: flex; display: flex;

View File

@@ -1,4 +1,5 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="moreactive" style="padding: 30px"> <div class="moreactive" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
@@ -16,12 +17,7 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
class="img2"
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div> </div>
</div> </div>
</div> </div>
@@ -49,13 +45,7 @@
<div style="margin-left: 8px">{{ data?.activityAddress }}</div> <div style="margin-left: 8px">{{ data?.activityAddress }}</div>
</div> </div>
</div> </div>
<botton <botton class="btn" :style="{background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`, }" @click="signClick" >{{ data.signFlag ? "已签到" : "签到" }}
class="btn"
:style="{
background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->
@@ -151,6 +141,7 @@ import { request, useRequest } from "@/api/request";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useRoute } from "vue-router/dist/vue-router"; import { useRoute } from "vue-router/dist/vue-router";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { reactive, onUnmounted } from "vue";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
@@ -158,20 +149,74 @@ const returnclick = () => {
const { const {
query: { courseId: activityId, id: taskId, type, pName, sName }, query: { courseId: activityId, id: taskId, type, pName, sName },
} = useRoute(); } = useRoute();
const state = reactive({
isAllowSign: false,
});
const { data } = useRequest(ACTIVITY, { activityId }); const { data } = useRequest(ACTIVITY, { activityId });
const signClick = (tab, event) => { const signClick = (tab, event) => {
if (data.value.signFlag) { if (data.value.signFlag) {
return; return;
} }
data.value.signFlag = true; data.value.signFlag = true;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
request(TASK_ACTIVITY_SIGN, { request(TASK_ACTIVITY_SIGN, {
courseId: activityId, courseId: activityId,
taskId, taskId,
type, type,
}); });
}; };
let timer = null;
//判断能否签到
function isSignClick() {
timer = setInterval(() => {
let beginTime = new Date(data.activityStartTime).getTime();
let endTime = !data.afterSignIn
? new Date(data.activityEndTime).getTime()
: new Date(data.activityStartTime).getTime();
let nowTime = new Date().getTime();
if (data.beforeSignIn && data.afterSignIn) {
//有开始前有开始后
beginTime = beginTime - data.beforeSignIn * 60 * 1000;
endTime = endTime + data.afterSignIn * 60 * 1000;
console.log("1111");
} else if (
data.beforeSignIn &&
!data.afterSignIn
) {
//只有开始前无开始后
beginTime = beginTime - data.beforeSignIn * 60 * 1000;
console.log("11112222");
} else if (
!data.beforeSignIn &&
data.afterSignIn
) {
//无开始前有开始后
endTime = endTime + data.afterSignIn * 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();
onUnmounted(() => {
if (timer) {
clearInterval(timer);
}
});
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->

View File

@@ -1,17 +1,26 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="pathdetails" style="padding: 30px"> <div class="pathdetails" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
<div>{{ data.name }}</div> <div>{{ data.name }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">项目详情</div> <div style="font-weight: 700">项目详情</div>
<!--
<div 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>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="pdname"> <div class="pdname">
{{ userInfo.bandDesc }} {{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介 <el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<span style="position: relative;top:1px;left:-3px;cursor: pointer;">></span> <template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</span> </el-popover>
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
@@ -37,11 +46,20 @@
(e) => !whiteTypes(e.type) (e) => !whiteTypes(e.type)
)" :key="index"> )" :key="index">
<div style="width: 70%"> <div style="width: 70%">
<div class="coursename" :title="value.name">{{ value.name }}</div> <div v-if="value.name.length > 50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference></template>
</el-popover>
</div>
<div v-else class="coursename" :title="value.name">{{ value.name }}</div>
<div class="coursetag"> <div class="coursetag">
<div class="tag1" style="margin-right: 11px; margin-top: 16px"> <div v-if="value.flag" class="tag1" style="margin-right: 11px; margin-top: 16px">
必修 必修
</div> </div>
<div v-else class="tag2" style="margin-right: 11px; margin-top: 16px">
选修
</div>
<div class="tag3" style="margin-right: 11px; margin-top: 16px"> <div class="tag3" style="margin-right: 11px; margin-top: 16px">
{{ types.typeName[value.type] || "" }} {{ types.typeName[value.type] || "" }}
</div> </div>
@@ -75,7 +93,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="goclass" @click="toFinish(value, i.name, i.stageId)"> <div class="goclass" @click="toFinish(value, i.stageName, i.stageId)">
{{ {{
value.status === 1 value.status === 1
? "已完成" ? "已完成"
@@ -109,7 +127,7 @@
<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.notice || "暂无公告" }}
</div> </div>
</el-tab-pane> </el-tab-pane>
<!-- <!--
@@ -231,11 +249,7 @@
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
<!-- 弹框提示信息 --> <!-- 弹框提示信息 -->
<el-dialog <el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
title=""
top="347px"
v-model="dialogVisible"
:show-close="false"
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;" style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px"> width="502px">
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div> <div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
@@ -272,9 +286,7 @@ const {
query: { courseId, projectId }, query: { courseId, projectId },
} = useRoute(); } = useRoute();
const router = useRouter(); const router = useRouter();
const returnclick = () => {
router.back();
};
const { data } = useRequest(PROJECT_PROCESS, { const { data } = useRequest(PROJECT_PROCESS, {
projectId: projectId || courseId, projectId: projectId || courseId,
}); });
@@ -363,17 +375,9 @@ const types = ref({
const dialogVisible = ref(false); const dialogVisible = ref(false);
const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行替换!'); const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行替换!');
// function dialogVisible(){
// return true;
// }
function introductionPro() { function toFinish(d, sName, chapterOrStageId) {
dialogVisibleTip.value =data.value.remark; console.log("dddddd", d, sName, chapterOrStageId);
dialogVisible.value = true;
}
function toFinish(d, sName, chapterId) {
console.log("dddddd", d);
// 作业过期判断 // 作业过期判断
if (d.type == 4) { if (d.type == 4) {
let date1 = new Date(d.endTime).getTime(); let date1 = new Date(d.endTime).getTime();
@@ -381,7 +385,7 @@ function toFinish(d, sName, chapterId) {
if (date1 < date2) { if (date1 < date2) {
dialogVisibleTip.value = '当前作业已结束'; dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true; dialogVisible.value = true;
// ElMessage.error("当前作业已结束")
return return
} }
} }
@@ -466,9 +470,12 @@ function toFinish(d, sName, chapterId) {
query: { query: {
id: d.projectTaskId, id: d.projectTaskId,
type: 2, type: 2,
taskId: data.value.projectId,
taskIds: data.value.projectId,
courseId: d.courseId, courseId: d.courseId,
pName: data.value.name, pName: data.value.name,
sName, sName,
chapterOrStageId
}, },
}); });
} else if (typeof types.value.path[d.type] === "function") { } else if (typeof types.value.path[d.type] === "function") {
@@ -481,15 +488,31 @@ function whiteTypes(type) {
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss"> <style lang="scss">
.example-showcase .el-loading-mask {
z-index: 9;
}
.pathdetails { .pathdetails {
.el-dialog__header { .el-dialog__header {
display: none; display: none;
} }
.crumb { .crumb {
color: #fff; color: #fff;
display: flex; display: flex;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
} }
.pdname { .pdname {

View File

@@ -31,37 +31,22 @@
<el-input v-model="projectname" placeholder="请输入项目名称" /> <el-input v-model="projectname" placeholder="请输入项目名称" />
</div> </div>
<div style="width: 420px"> <div style="width: 420px">
<el-date-picker <el-date-picker v-model="searchTime" type="daterange" range-separator="To" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" @change="selectTime"/>
v-model="searchTime"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
@change="selectTime"
/>
</div> </div>
<button <button class="searchBtn" @click="searchClick" style="margin-left: 20px">
class="searchBtn"
@click="searchClick"
style="margin-left: 20px"
>
搜索 搜索
</button> </button>
<button class="searchBtn" @click="resetClick">重置</button> <button class="searchBtn" @click="resetClick">重置</button>
</div> </div>
<div class="projectList" v-if="projectList.length==0" style="display:flex;color:#909399;"> <div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
<img <img class="img2" style="margin-left:359px;margin-top:100px;width:148px;height:220px;"
class="img2" src="../../assets/image/notask.png" />
style="margin-left: 675px;margin-top: 165px;width:148px;height:220px;"
src="../../assets/image/notask.png"
/>
</div> </div>
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k"> <div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
<div style="display: flex"> <div style="display: flex">
<img <img style="width: 253px; height: 144px; border-radius: 4px" :src="i.picUrl" />
style="width: 253px; height: 144px; border-radius: 4px"
:src="i.picUrl"
/>
<div style="margin-left: 29px"> <div style="margin-left: 29px">
<div class="projectName" :title="i.name"> <div class="projectName" :title="i.name">
{{ i.name }} {{ i.name }}
@@ -69,29 +54,19 @@
<div class="progress"> <div class="progress">
<div class="progressNow">当前进度</div> <div class="progressNow">当前进度</div>
<div style="width: 115px"> <div style="width: 115px">
<el-progress <el-progress :percentage="parseInt(i.finishTaskNum / i.totalTaskNum * 100)" :show-text="false"
:percentage="parseInt(i.finishTaskNum / i.totalTaskNum) * 100" :stroke-width="8" color="rgba(255, 160, 80, 1)" />
:show-text="false"
:stroke-width="8"
color="rgba(255, 160, 80, 1)"
/>
</div> </div>
<div class="progressNum"> <div class="progressNum">
{{ {{
i.finishTaskNum && i.totalTaskNum (i.finishTaskNum && i.totalTaskNum) ? parseInt(i.finishTaskNum / i.totalTaskNum * 100) : 0
? parseInt(i.finishTaskNum / i.totalTaskNum) * 100
: 0
}}% }}%
</div> </div>
</div> </div>
<div class="studyNew">最新一次学习时间{{ i.lastStudyTime }}</div> <div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间{{ i.lastStudyTime }}</div>
</div> </div>
</div> </div>
<div <div class="tobestarted" v-if="i.status == 2" @click="goProjectDetails(i)">
class="tobestarted"
v-if="i.status == 2"
@click="goProjectDetails(i)"
>
待开始 待开始
</div> </div>
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)"> <div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
@@ -100,11 +75,7 @@
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)"> <div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
已完成 已完成
</div> </div>
<div <div class="tobestarted" v-if="i.status == 3" @click="goProjectDetails(i)">
class="tobestarted"
v-if="i.status == 3"
@click="goProjectDetails(i)"
>
已结束 已结束
</div> </div>
</div> </div>
@@ -208,10 +179,16 @@ const resetClick = () => {
//搜索--------------end----------------------------------------- //搜索--------------end-----------------------------------------
const router = useRouter(); const router = useRouter();
const goProjectDetails = (value) => { const goProjectDetails = (value) => {
router.push({ import.meta.env.MODE === "development"
? router.push({
path: "/projectdetails", path: "/projectdetails",
query: { projectId: value.projectId }, query: { projectId: value.projectId },
}); })
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails&params=${encodeURIComponent(
`projectId=${value.projectId}`
)}`
);
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@@ -221,22 +198,26 @@ const goProjectDetails = (value) => {
//border-radius: 8px; //border-radius: 8px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
display: flex; display: flex;
// background-color: #ccc; // background-color: #ccc;
.content { .content {
width: 100%; width: 100%;
// flex: 1; // flex: 1;
margin-top: 50px; margin-top: 50px;
margin-left: 81px; margin-left: 81px;
.title { .title {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
} }
.search { .search {
margin-top: 31px; margin-top: 31px;
display: flex; display: flex;
align-items: center; align-items: center;
.searchBtn { .searchBtn {
width: 100px; width: 100px;
height: 35px; height: 35px;
@@ -251,12 +232,14 @@ const goProjectDetails = (value) => {
margin-left: 10px; margin-left: 10px;
} }
} }
.projectList { .projectList {
margin-top: 40px; margin-top: 40px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
overflow-x: auto; overflow-x: auto;
.projectName { .projectName {
width: 270px; width: 270px;
margin-top: 12px; margin-top: 12px;
@@ -269,12 +252,15 @@ const goProjectDetails = (value) => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.progress { .progress {
display: flex; display: flex;
align-items: center; align-items: center;
.el-progress-bar__outer { .el-progress-bar__outer {
background-color: rgba(255, 160, 80, 0.19); background-color: rgba(255, 160, 80, 0.19);
} }
.progressNow { .progressNow {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -282,6 +268,7 @@ const goProjectDetails = (value) => {
line-height: 20px; line-height: 20px;
margin-right: 20px; margin-right: 20px;
} }
.progressNum { .progressNum {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
@@ -290,6 +277,7 @@ const goProjectDetails = (value) => {
margin-left: 26px; margin-left: 26px;
} }
} }
.studyNew { .studyNew {
margin-top: 16px; margin-top: 16px;
font-size: 14px; font-size: 14px;
@@ -297,6 +285,7 @@ const goProjectDetails = (value) => {
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
} }
.tobestarted { .tobestarted {
width: 140px; width: 140px;
height: 40px; height: 40px;
@@ -312,6 +301,7 @@ const goProjectDetails = (value) => {
cursor: pointer; cursor: pointer;
margin-right: 120px; margin-right: 120px;
} }
.gostudy { .gostudy {
width: 140px; width: 140px;
height: 40px; height: 40px;
@@ -328,6 +318,7 @@ const goProjectDetails = (value) => {
margin-right: 120px; margin-right: 120px;
cursor: pointer; cursor: pointer;
} }
.finish { .finish {
width: 140px; width: 140px;
height: 40px; height: 40px;

View File

@@ -64,7 +64,8 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="name" label="路径名称"/> <el-table-column align="center" prop="name" label="路径名称"/>
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope"> <el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="bottom-start" :width="400" title="路径介绍" trigger="hover" :content="scope.row.remark"> <el-popover placement="bottom-start" :width="400" title="路径介绍" trigger="hover"
:content="scope.row.remark">
<template #reference> <template #reference>
<div>{{ scope.row.remark }}</div> <div>{{ scope.row.remark }}</div>
</template> </template>
@@ -86,41 +87,32 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"--> <!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"-->
<!-- 路径列表--> <!-- 路径列表-->
<!-- 路径详情图 --> <!-- 路径详情图 -->
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail"> <div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail">
<div v-for="(item, i) in detail?.rows" :key="i"> <PathDetailImage img="https://u-pre.boe.com/upload/路径图背景-1671015331292.png" :detail="detail"></PathDetailImage>
<img :src="useImage(`222_0${i + 2}.png`)" />
</div>
<!-- <div class="modal"-->
<!-- style="width: calc(100% - 168px); height: 525px;background-image: url('../../src/assets/image/mapdetail.png');background-size: 100%;background-repeat: no-repeat;">-->
<!-- </div>-->
</div> </div>
<!-- 路径详情图 --> <!-- 路径详情图 -->
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { reactive, toRefs, ref, onMounted, computed } from "vue"; import {computed, ref} from "vue";
import nostarted from "../../assets/image/nostarted.png"; import nostarted from "../../assets/image/nostarted.png";
import completed from "../../assets/image/completed.png"; import completed from "../../assets/image/completed.png";
import ongoing from "../../assets/image/ongoing.png"; import ongoing from "../../assets/image/ongoing.png";
import { boeRequest, request, usePage, useRequest } from "@/api/request"; import {usePage} from "@/api/request";
import { import {ROUTER_LIST,} from "@/api/api";
ROUTER_CHAPTER_LIST,
ROUTER_LIST,
ROUTER_UNCOMPLETE_LIST,
} from "@/api/api";
import { useImage } from "@/api/utils";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import store from "@/store"; import store from "@/store";
import PathDetailImage from "@/components/PathDetailImage.vue";
const detail = ref(); const detail = ref();
const showmapdetail = ref(false);
const currentStageId = ref();
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const {data} = usePage(ROUTER_LIST, {pageSize: 60}); const {data} = usePage(ROUTER_LIST, {pageSize: 60});
console.log("datadata", data);
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
@@ -128,40 +120,25 @@ const returnclick = () => {
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {}); // const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
const state = reactive({
showmapdetail: false,
});
const { showmapdetail } = toRefs(state);
const returnfun = () => { const returnfun = () => {
state.showmapdetail = false; showmapdetail.value = false;
}; };
async function gofun({ routerId, name: routerName }) { async function gofun(e) {
// console.log(routerId) detail.value = e
// const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}}) showmapdetail.value = true;
// detail.value = data.data }
// state.showmapdetail = true;
// router.push({path: "/pathdetails", query: {routerId}}); function toUnTask() {
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: { routerId, routerName },
})
: window.open(
`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
`routerId=${routerId}&routerName=${routerName}`
)}`
);
} }
function toUnTask() { }
</script> </script>
<style lang="scss"> <style lang="scss">
#app div:nth-child(1) { #app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important; // background: rgba(0, 0, 0, 0) !important;
} }
.modal {} .modal {
}
.modal:after { .modal:after {
content: ""; content: "";
@@ -178,7 +155,7 @@ function toUnTask() { }
width: 100%; width: 100%;
// flex: 1; // flex: 1;
margin-top: 43px; margin-top: 43px;
position: relative;
// background-color: pink; // background-color: pink;
.title { .title {
display: flex; display: flex;
@@ -266,7 +243,7 @@ function toUnTask() { }
.mapdetail { .mapdetail {
width: calc(100% - 107px); width: calc(100% - 107px);
height: 577px; min-height: 577px;
background: rgba(242, 245, 247, 0.6); background: rgba(242, 245, 247, 0.6);
margin-top: 26px; margin-top: 26px;
border-radius: 8px; border-radius: 8px;
@@ -315,6 +292,7 @@ function toUnTask() { }
margin-left: 28px; margin-left: 28px;
cursor: pointer; cursor: pointer;
} }
.box-item { .box-item {
width: 200px; width: 200px;
margin-top: 10px; margin-top: 10px;

View File

@@ -1,18 +1,30 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="pathdetails" style="padding: 30px"> <div class="pathdetails" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
<div>{{ routerName }}</div> <div>{{ data.name }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">路径图详情</div> <div style="font-weight: 700">路径图详情</div>
<!--
<div 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>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="pdname"> <div class="pdname">
{{ userInfo.bandDesc }} {{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介 <el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<span style="position: relative;top:1px;left:-3px;cursor: pointer;">></span> <template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</span> </el-popover>
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
<div class="detailinfo"> <div class="detailinfo">
<div class="detailL"> <div class="detailL">
@@ -35,7 +47,15 @@
:key="index" :key="index"
> >
<div style="width: 70%"> <div style="width: 70%">
<div class="coursename" :title="value.name">{{ value.name }}</div> <div v-if="value.name.length >50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference>{{ value.name }}</template>
</el-popover>
</div>
<div v-else class="coursename" :title="value.name">
{{ value.name }}
</div>
<div class="coursetag"> <div class="coursetag">
<div <div
class="tag1" class="tag1"
@@ -64,18 +84,11 @@
<!-- {{ item.name }}--> <!-- {{ item.name }}-->
<!-- </div>--> <!-- </div>-->
</div> </div>
<div <div v-if="value.type === 1" class="progressBox">
class="progressBox"
:style="{ display: value.type === 1 ? 'block' : 'none' }"
>
<div>当前进度</div> <div>当前进度</div>
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress :percentage="value.currentRatio * 100" :show-text="false" :stroke-width="8" :color="
:percentage="value.currentRatio"
:show-text="false"
:stroke-width="8"
:color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -83,17 +96,10 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)] }[parseInt(value.currentRatio * 100 / 20)]
" " />
/>
</div> </div>
<div <div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;"
style="
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
"
:style="{ :style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
@@ -102,28 +108,17 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)], }[parseInt(value.currentRatio * 100 / 20)],
}" }">
> {{ value.currentRatio * 100 }}%
{{ value.currentRatio }}%
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div <div class="goclass" :style="{
class="goclass"
:style="{
background: `${types.path[value.type] ? '#2478ff' : '#999'}`, background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}" }" @click="toFinish(value)">
@click="toFinish(value)" {{ value.currentRatio === 1 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放" }}
>
{{
value.status === 1
? "已完成"
: types.path[value.type]
? types.toName[value.type]
: "未开放"
}}
</div> </div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">--> <!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div--> <!-- <div-->
@@ -184,18 +179,12 @@
<div class="detailRB"> <div class="detailRB">
<div class="info"> <div class="info">
<div class="title"> <div class="title">
<img <img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png" />
style="width: 21px; height: 20px"
src="../../assets/image/pathdetails/info.png"
/>
<div class="text" style="margin-left: 7px">个人信息</div> <div class="text" style="margin-left: 7px">个人信息</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<!-- todo #路径详情 个人信息缺少img和介绍--> <!-- todo #路径详情 个人信息缺少img和介绍-->
<div <div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
>
<img class="peopleimg" :src="userInfo.avatar" /> <img class="peopleimg" :src="userInfo.avatar" />
<div style="margin-left: 17px"> <div style="margin-left: 17px">
<div class="teacherName"> <div class="teacherName">
@@ -212,10 +201,7 @@
</div> </div>
<div class="info" style="padding-top: 20px"> <div class="info" style="padding-top: 20px">
<div class="title"> <div class="title">
<img <img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png" />
style="width: 18px; height: 17px"
src="../../assets/image/pathdetails/study.png"
/>
<div class="text" style="margin-left: 9px">学习进度</div> <div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -229,11 +215,8 @@
<div>总进度</div> <div>总进度</div>
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress :percentage="parseInt(data.currentChapterCnt / data.totalChapterCnt * 100)"
:percentage="parseInt(data.currentChapterCnt/data.totalChapterCnt * 100)" :show-text="false" :stroke-width="8" :color="
:show-text="false"
:stroke-width="8"
:color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -242,12 +225,9 @@
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[(parseInt(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20] }[(parseInt(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20]
" " />
/>
</div> </div>
<div <div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
style="font-size: 14px; font-weight: 500; margin-left: 10px"
:style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -256,8 +236,7 @@
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)], }[parseInt((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)],
}" }">
>
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}% {{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
</div> </div>
</div> </div>
@@ -268,11 +247,8 @@
<div>必修进度</div> <div>必修进度</div>
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress :percentage="parseInt(data.currentReqCnt / data.totalReqCnt * 100)" :show-text="false"
:percentage="parseInt(data.currentReqCnt/data.totalReqCnt * 100)" :stroke-width="8" :color="
:show-text="false"
:stroke-width="8"
:color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -281,17 +257,14 @@
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)] }[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)]
" " />
/>
</div> </div>
<div <div style="
style="
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #277aff; color: #277aff;
margin-left: 10px; margin-left: 10px;
" " :style="{
:style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -300,8 +273,7 @@
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)], }[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)],
}" }">
>
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}% {{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}%
</div> </div>
</div> </div>
@@ -314,11 +286,7 @@
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
<!-- 弹框提示信息 --> <!-- 弹框提示信息 -->
<el-dialog <el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
title=""
top="347px"
v-model="dialogVisible"
:show-close="false"
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;" style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px"> width="502px">
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div> <div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
@@ -349,7 +317,7 @@ const returnclick = () => {
}; };
const { data } = useRequest(ROUTER_PROCESS, { routerId }); const { data } = useRequest(ROUTER_PROCESS, { routerId });
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
console.log('lalalallala', data)
const activeName = ref("first"); const activeName = ref("first");
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
@@ -360,10 +328,7 @@ const path = {1: "path"};
const dialogVisible = ref(false); const dialogVisible = ref(false);
const dialogVisibleTip = ref(''); const dialogVisibleTip = ref('');
function introductionPro() {
dialogVisibleTip.value =data.value.remark;
dialogVisible.value = true;
}
const types = ref({ const types = ref({
typeName: { typeName: {
@@ -422,10 +387,78 @@ const types = ref({
}); });
function toFinish(d) { function toFinish(d) {
console.log(d)
console.log(data.value.currentStageId, routerId)
if (!types.value.path[d.type]) { if (!types.value.path[d.type]) {
ElMessage.error("暂时未开放"); ElMessage.error("暂时未开放");
return; 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
}
}
// 考试 停用
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
}
// 评估 停用
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
}
// 其他活动 结束时间
if (d.type == 9) {
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;
return
}
}
// 面授课 停用
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
}
if (d.type === 3 || d.type === 7) { if (d.type === 3 || d.type === 7) {
request(STUDY_RECORD, { request(STUDY_RECORD, {
studentId: userInfo.value.id, studentId: userInfo.value.id,
@@ -444,11 +477,15 @@ function toFinish(d) {
router.push({ router.push({
path: types.value.path[d.type], path: types.value.path[d.type],
query: { query: {
id: d.routerTaskId, // id: d.routerTaskId,
id: routerId,
type: 1, type: 1,
taskId: routerId,
taskIds: routerId,
courseId: d.courseId, courseId: d.courseId,
pName: data.value.name, pName: data.value.name,
sName:data.currentStageName, sName: data.value.currentStageName,
chapterOrStageId: data.value.currentStageId
}, },
}); });
} else if (typeof types.value.path[d.type] === "function") { } else if (typeof types.value.path[d.type] === "function") {
@@ -484,7 +521,7 @@ function whiteTypes(type) {
width: 100%; width: 100%;
margin-top: 24px; margin-top: 24px;
display: flex; display: flex;
z-index: 2;
.detailL { .detailL {
flex: 1; flex: 1;
margin-right: 20px; margin-right: 20px;

View File

@@ -1,14 +1,13 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="surveydetail" style="padding: 30px"> <div class="surveydetail" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div <div style="display: flex; align-items: center; justify-content: space-between">
style="display: flex; align-items: center; justify-content: space-between"
>
<div class="crumb"> <div class="crumb">
<div>{{ pName }}</div> <div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div> <div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div> <div v-if="sName" style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">评估详情</div> <div style="font-weight: 700; font-size: 16px">评估详情</div>
</div> </div>
<!-- <!--
@@ -29,12 +28,8 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<img <el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;"
class="img2" src="../../assets/image/return.png" />返回</el-button>
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text" style="color: #fff">返回</div>
</div> </div>
</div> </div>
</div> </div>
@@ -49,33 +44,21 @@
return a[0].orderNumber - b[0].orderNumber return a[0].orderNumber - b[0].orderNumber
}) }} --> }) }} -->
<div <div class="question" v-for="
class="question" (value, index) in formateArr([data.assessmentEssayQuestionDtoList, data.assessmentMultipleChoiceDtoList, data.assessmentScoringQuestionDtoList, data.assessmentSingleChoiceDtoList]).sort((a, b) => {
v-for="(value, index) in [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
return a[0].orderNumber - b[0].orderNumber return a[0].orderNumber - b[0].orderNumber
}) " }) " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
:key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
>
<div v-if="value[0].questionType == '4'"> <div v-if="value[0].questionType == '4'">
<div <div class="question" v-for="(value, index) in data.assessmentScoringQuestionDtoList" :key="index"
class="question" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
:key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
>
<div class="text">{{ value.assessmentScTitle }}</div> <div class="text">{{ value.assessmentScTitle }}</div>
<div class="answer"> <div class="answer">
<div class="answerL">完全没用</div> <div class="answerL">完全没用</div>
<div class="answerC"> <div class="answerC">
<div <div class="answerCitem" v-for="(item, key) in Array.from(
class="answerCitem"
v-for="(item, key) in Array.from(
{ length: value.assessmentMaxScore }, { length: value.assessmentMaxScore },
(k, i) => i (k, i) => i
)" )" :key="key" :style="{
:key="key"
:style="{
'margin-left': key === 0 ? '15px' : '10px', 'margin-left': key === 0 ? '15px' : '10px',
background: background:
value.selectAnswer === item value.selectAnswer === item
@@ -85,16 +68,14 @@
value.selectAnswer === item value.selectAnswer === item
? '#fff' ? '#fff'
: 'rgba(86, 163, 249, 1)', : 'rgba(86, 163, 249, 1)',
}" }" @click="
@click="
() => { () => {
if (data.isSubmit) { if (data.isSubmit) {
return; return;
} }
value.selectAnswer = item; value.selectAnswer = item;
} }
" ">
>
<div>{{ item + 1 }}</div> <div>{{ item + 1 }}</div>
</div> </div>
</div> </div>
@@ -104,26 +85,18 @@
</div> </div>
<div v-else-if="value[0].questionType == '1'"> <div v-else-if="value[0].questionType == '1'">
<div <div class="question" style="margin-top: 41px" v-if="
class="question"
style="margin-top: 41px"
v-if="
data.assessmentSingleChoiceDtoList && data.assessmentSingleChoiceDtoList &&
data.assessmentSingleChoiceDtoList.length data.assessmentSingleChoiceDtoList.length
" ">
>
<div class="text"> <div class="text">
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }} {{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
</div> </div>
<div <div v-for="(value, index) in data.assessmentSingleChoiceDtoList" :key="index"
v-for="(value, index) in data.assessmentSingleChoiceDtoList" style="display: flex; align-items: center" :style="{
:key="index"
style="display: flex; align-items: center"
:style="{
'margin-top': index === 0 ? '29px' : '22px', 'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer', cursor: 'pointer',
}" }" @click="
@click="
() => { () => {
if (data.isSubmit) { if (data.isSubmit) {
return; return;
@@ -133,72 +106,46 @@
}); });
value.select = true; value.select = true;
} }
" ">
> <img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
<img
style="width: 19px; height: 18px; cursor: pointer"
:src="value.select ? checkbox : checkbox2"
/>
<div class="people">{{ value.singleOptionName }}</div> <div class="people">{{ value.singleOptionName }}</div>
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="value[0].questionType == '2'"> <div v-else-if="value[0].questionType == '2'">
<div <div class="question" style="margin-top: 41px" v-if="
class="question"
style="margin-top: 41px"
v-if="
data.assessmentMultipleChoiceDtoList && data.assessmentMultipleChoiceDtoList &&
data.assessmentMultipleChoiceDtoList.length data.assessmentMultipleChoiceDtoList.length
" ">
>
<div class="text"> <div class="text">
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }} {{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
</div> </div>
<div <div v-for="(value, index) in data.assessmentMultipleChoiceDtoList" :key="index"
v-for="(value, index) in data.assessmentMultipleChoiceDtoList" style="display: flex; align-items: center" :style="{
:key="index"
style="display: flex; align-items: center"
:style="{
'margin-top': index === 0 ? '29px' : '22px', 'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer', cursor: 'pointer',
}" }" @click="
@click="
() => { () => {
if (data.isSubmit) { if (data.isSubmit) {
return; return;
} }
value.select = !value.select; value.select = !value.select;
} }
" ">
> <img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
<img
style="width: 19px; height: 18px; cursor: pointer"
:src="value.select ? checkbox : checkbox2"
/>
<div class="people">{{ value.multipleOptionName }}</div> <div class="people">{{ value.multipleOptionName }}</div>
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="value[0].questionType == '3'"> <div v-else-if="value[0].questionType == '3'">
<div <div class="question" style="margin-top: 41px" v-for="(item, i) in data.assessmentEssayQuestionDtoList"
class="question" :key="i">
style="margin-top: 41px"
v-for="(item, i) in data.assessmentEssayQuestionDtoList"
:key="i"
>
<div class="text">{{ item.assessmentQaTitle }}</div> <div class="text">{{ item.assessmentQaTitle }}</div>
<div style="width: 713px; margin-top: 31px; position: relative"> <div style="width: 713px; margin-top: 31px; position: relative">
<el-input <el-input v-model="item.content" :autosize="{ minRows: 5, maxRows: 5 }" resize="none" maxlength="200"
v-model="item.content" type="textarea" :readonly="!!data.isSubmit" />
:autosize="{ minRows: 5, maxRows: 5 }"
resize="none"
maxlength="200"
type="textarea"
:readonly="!!data.isSubmit"
/>
<div class="words">{{ item.content?.length || 0 }}/200</div> <div class="words">{{ item.content?.length || 0 }}/200</div>
</div> </div>
</div> </div>
@@ -344,20 +291,13 @@
</div> </div>
</div> --> </div> -->
<div <div style="display: flex; justify-content: center" v-if="
style="display: flex; justify-content: center"
v-if="
data.assessmentEssayQuestionDtoList?.length || data.assessmentEssayQuestionDtoList?.length ||
data.assessmentMultipleChoiceDtoList?.length || data.assessmentMultipleChoiceDtoList?.length ||
data.assessmentSingleChoiceDtoList?.length || data.assessmentSingleChoiceDtoList?.length ||
data.assessmentScoringQuestionDtoList?.length data.assessmentScoringQuestionDtoList?.length
" ">
> <div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
<div
class="submit"
@click="submit"
:style="{ background: data.isSubmit ? '#999' : '#2478ff' }"
>
提交 提交
</div> </div>
</div> </div>
@@ -372,8 +312,12 @@
</span></div> </span></div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button class="cancel" style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;" @click="centerDialogVisible = false">取消</el-button> <el-button class="cancel"
<el-button class="back" style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;" type="primary" @click="returnclick"> style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;"
@click="centerDialogVisible = false">取消</el-button>
<el-button class="back"
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
type="primary" @click="returnclick">
返回 返回
</el-button> </el-button>
</span> </span>
@@ -390,21 +334,49 @@ import { ElMessage } from "element-plus";
import { ref } from "vue"; import { ref } from "vue";
const { const {
query: { courseId, id: taskId, type, pName, sName }, query: { courseId, id: taskId, taskIds, type, pName, sName, chapterOrStageId },
} = useRoute(); } = useRoute();
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
}; };
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId }); // 数组去空对象
function formateArr(arr1) {
console.log(arr1, arr1[0], arr1[0].length)
let newarr = []
for (let i = 0; i < arr1.length; i++) {
if (arr1[i].length !== 0) {
newarr.push(arr1[i])
}
}
return newarr
}
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: taskIds ? taskIds : 0 });
console.log('我是查询评估的参数', { id: courseId, type, chapterOrStageId, targetId: taskIds ? taskIds : 0 })
console.log('我是需要排序得题目', data) console.log('我是需要排序得题目', data)
function goHome() {
}
const centerDialogVisible = ref(false); const centerDialogVisible = ref(false);
const open = () => { const open = () => {
centerDialogVisible.value = true centerDialogVisible.value = true
}; };
function submit() { function submit() {
if (1 > 0) {
console.log(data)
console.log('我是提交的数据', {
targetId: taskId ? taskId : taskIds ? taskIds : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId: taskId ? taskId : taskIds ? taskIds : 0,
type,
result: JSON.stringify(data.value),
})
}
if (data.value.isSubmit) { if (data.value.isSubmit) {
return; return;
} }
@@ -449,10 +421,13 @@ function submit() {
return ElMessage.warning("您有未填写的评估题干"); return ElMessage.warning("您有未填写的评估题干");
} }
} }
data.value.isSubmit = !data.value.isSubmit; data.value.isSubmit = !data.value.isSubmit;
request(ASSESSMENT_SUBMIT, { request(ASSESSMENT_SUBMIT, {
targetId: taskIds ? taskIds : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId, assessmentId: courseId,
taskId, taskId: taskIds ? taskIds : 0,
type, type,
result: JSON.stringify(data.value), result: JSON.stringify(data.value),
}).then(() => { }).then(() => {
@@ -469,9 +444,11 @@ function submit() {
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
} }
.return { .return {
position: absolute; position: absolute;
right: 10%; right: 10%;
.text { .text {
text-align: center; text-align: center;
display: flex; display: flex;
@@ -479,6 +456,7 @@ function submit() {
align-items: center; align-items: center;
} }
} }
.prevnext { .prevnext {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -536,6 +514,7 @@ function submit() {
align-items: center; align-items: center;
margin-left: 11px; margin-left: 11px;
margin-right: 11px; margin-right: 11px;
// justify-content: center; // justify-content: center;
.answerCitem { .answerCitem {
width: 40px; width: 40px;

View File

@@ -10,11 +10,10 @@ import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import topLevelAwait from "vite-plugin-top-level-await"; import topLevelAwait from "vite-plugin-top-level-await";
const path = require('path') const path = require('path')
// const url = 'http://localhost:30001'
const url = 'https://u.boe.com/manageApi-release' export default defineConfig(({ command, mode }) =>
export default defineConfig(({ command }) =>
({ ({
base: '/fe-student-release/', base: loadEnv(mode, process.cwd()).VITE_BASE,
plugins: [ plugins: [
vue(), vue(),
// legacy({ // legacy({
@@ -36,57 +35,63 @@ export default defineConfig(({ command }) =>
server: { server: {
proxy: { proxy: {
'/file/upload': { '/file/upload': {
target: 'https://u.boe.com/manageApi-release', target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/stu': { '/stu': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/queryVoteSubmitDetailById': { '/queryVoteSubmitDetailById': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/work': { '/work': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/discuss': { '/discuss': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/discussSubmit': { '/discussSubmit': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/comment': { '/comment': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/vote': { '/vote': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
'/admin': { '/admin': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/activity': { }, '/activity': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/liveBroadcast': { }, '/liveBroadcast': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/examination': { }, '/examination': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/assessment': { }, '/assessment': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/workSubmit': { }, '/workSubmit': {
target: url, target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, '/userbasic': { }, '/userbasic': {
target: 'https://u.boe.com', target: 'https://u-pre.boe.com',
changeOrigin: true,
}, '/link': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
}, '/onlineClasses/queryOnlineClassesStudyDetail': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true, changeOrigin: true,
}, },
} }