|
@@ -22,40 +22,47 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="leftTools posTools">
|
|
|
- <div v-if="activeCoursewareIndex > 0" class="posBtn" @click="handleChangeCourseware(-1)">
|
|
|
- <img src="@/img/coursewarePlay/shang.png" />
|
|
|
- <div>上一个</div>
|
|
|
+ <div class="posBtn" @click="drawerMenuShow = true">
|
|
|
+ <img src="@/img/coursewarePlay/menu.png" />
|
|
|
+ <!-- <div>课程类型</div> -->
|
|
|
</div>
|
|
|
- <div v-if="activeCoursewareIndex < flattenCoursewareList.length - 1" class="posBtn" @click="handleChangeCourseware(1)">
|
|
|
- <img src="@/img/coursewarePlay/xia.png" />
|
|
|
- <div>下一个</div>
|
|
|
+ <div class="posBtn" @click="drawerShow = true">
|
|
|
+ <img src="@/img/coursewarePlay/zhishidian.png" />
|
|
|
+ <!-- <div>知识点</div> -->
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="rightTools posTools">
|
|
|
<div
|
|
|
- class="posBtn"
|
|
|
+ :class="['posBtn', activeCoursewareIndex > 0 ? '' : 'disabled']"
|
|
|
@click="
|
|
|
() => {
|
|
|
- handleVideoPause()
|
|
|
- whitePenShow = true
|
|
|
+ if (activeCoursewareIndex > 0) {
|
|
|
+ handleChangeCourseware(-1)
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
|
- <img src="@/img/coursewarePlay/baiban.png" />
|
|
|
- <div>白板</div>
|
|
|
+ <img src="@/img/coursewarePlay/shang.png" />
|
|
|
+ <!-- <div>上一个</div> -->
|
|
|
</div>
|
|
|
<div
|
|
|
- class="posBtn"
|
|
|
+ :class="['posBtn', activeCoursewareIndex < flattenCoursewareList.length - 1 ? '' : 'disabled']"
|
|
|
@click="
|
|
|
() => {
|
|
|
- handleVideoPause()
|
|
|
- penShow = true
|
|
|
+ if (activeCoursewareIndex < flattenCoursewareList.length - 1) {
|
|
|
+ handleChangeCourseware(1)
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
|
- <img src="@/img/coursewarePlay/pizhu.png" />
|
|
|
- <div>批注</div>
|
|
|
+ <img src="@/img/coursewarePlay/xia.png" />
|
|
|
+ <!-- <div>下一个</div> -->
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- <div class="posBtn" @click="handleCoursewareEnd">
|
|
|
+ <img src="@/img/coursewarePlay/jieshu.png" />
|
|
|
+ <div>结束</div>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ <!-- <div class="rightTools posTools">
|
|
|
<div class="posBtn" @click="drawerShow = true">
|
|
|
<img src="@/img/coursewarePlay/zhishidian.png" />
|
|
|
<div>知识点</div>
|
|
@@ -64,7 +71,7 @@
|
|
|
<img src="@/img/coursewarePlay/jieshu.png" />
|
|
|
<div>结束</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div
|
|
|
v-if="activeCoursewareResourceId"
|
|
|
@click="
|
|
@@ -78,14 +85,28 @@
|
|
|
<div class="topTools">
|
|
|
<div class="leftMenu">
|
|
|
<img @click="handleGoBack" class="backImg" src="@/img/coursewarePlay/back.png" />
|
|
|
+
|
|
|
+ <div class="title-section">
|
|
|
+ <div class="title">{{ activeCourseware?.parentData.name || "" }}</div>
|
|
|
+ <div class="content">
|
|
|
+ {{ activeCourseware?.name || "" }}
|
|
|
+ <span v-if="!activeCourseware?.phaseGoals" @click="onTitleTip('phaseGoals', activeCourseware?.phaseGoals)">阶段目标</span>
|
|
|
+ <span v-if="!activeCourseware?.checkItem" @click="onTitleTip('checkItem', activeCourseware?.checkItem)">检查事项</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="midMenu">
|
|
|
<playRecordTime
|
|
|
v-if="route.query.modeId && coursewareTotalTime && userStoreHook.roles === 'GYT'"
|
|
|
:modeId="route.query.modeId as string"
|
|
|
:coursewareTotalTime="coursewareTotalTime"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="midMenu">{{ activeCourseware?.parentData.name || "" }}</div>
|
|
|
- <div class="rightMenu"></div>
|
|
|
+ <div class="rightMenu">
|
|
|
+ <div class="posCloseBtn" @click="handleCoursewareEnd">
|
|
|
+ <img src="@/img/coursewarePlay/jieshu.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<el-drawer class="elDrawer" v-model="drawerShow" :show-close="false">
|
|
|
<template #header="{ close }">
|
|
@@ -97,23 +118,16 @@
|
|
|
<courseCollapse :activeCollapse="activeCourseware" :courseList="coursewareList" @handleClick="handleCourseClick" />
|
|
|
</ElScrollbar>
|
|
|
</el-drawer>
|
|
|
- <pen
|
|
|
- :close="
|
|
|
- () => {
|
|
|
- penShow = false
|
|
|
- }
|
|
|
- "
|
|
|
- v-model="penShow"
|
|
|
- />
|
|
|
- <pen
|
|
|
- :is-white="true"
|
|
|
- :close="
|
|
|
- () => {
|
|
|
- whitePenShow = false
|
|
|
- }
|
|
|
- "
|
|
|
- v-model="whitePenShow"
|
|
|
- />
|
|
|
+ <el-drawer class="elDrawer elCourseMenu" v-model="drawerMenuShow" :show-close="false">
|
|
|
+ <template #header="{ close }">
|
|
|
+ <img class="directory" src="@/img/coursewarePlay/menuActive.png" />
|
|
|
+ <div class="tit">课程目录</div>
|
|
|
+ <img class="close" @click="close" src="@/img/coursewarePlay/close.png" />
|
|
|
+ </template>
|
|
|
+ <ElScrollbar class="elScrollbar">
|
|
|
+ <courseMenuCollapse :courseMenuList="coursewareMenuList" @handleClick="handleCourseMenuClick" />
|
|
|
+ </ElScrollbar>
|
|
|
+ </el-drawer>
|
|
|
<practiceForm v-model="isPracticeShow" :practiceUrl="practiceUrl" @close="handlePracticeClose" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -121,31 +135,28 @@
|
|
|
<script setup lang="ts">
|
|
|
import videoPlay from "./videoPlay"
|
|
|
import { getLessonCourseDetail_gym, getLessonCoursewareDetail_gyt, getLessonCourseDetail_klx } from "@/api/cloudTextbooks.api"
|
|
|
-import { checkWebCourse_gyt } from "@/api/coursewarePlay.api"
|
|
|
+import { checkWebCourse_gyt, refLevel_gyt } from "@/api/coursewarePlay.api"
|
|
|
import { httpAjaxErrMsg, httpAjaxLoadingErrMsg } from "@/plugin/httpAjax"
|
|
|
import userStore from "@/store/modules/user"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { shallowRef, ref, computed, onUnmounted, onMounted, watch, nextTick } from "vue"
|
|
|
import { ElMessageBox } from "element-plus"
|
|
|
import courseCollapse from "./components/courseCollapse"
|
|
|
-import pen from "./components/pen"
|
|
|
+import courseMenuCollapse from "./components/courseMenuCollapse"
|
|
|
import playRecordTime from "./components/playRecordTime"
|
|
|
import practiceForm from "@/businessComponents/practiceForm"
|
|
|
-import useDialogConfirm from "@/hooks/useDialogConfirm"
|
|
|
import { getRecentCourseSchedule_gym } from "@/api/homePage.api"
|
|
|
import { getToken } from "@/libs/auth"
|
|
|
import { URL_TEACH_GYT, URL_TEACH_GYM, URL_TEACH_KLX } from "@/config"
|
|
|
import { handleFullscreen } from "@/libs/fullscreen"
|
|
|
+import useCoursewarePlayTip from "./components/useCoursewarePlayTip"
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const userStoreHook = userStore()
|
|
|
-// 批注
|
|
|
-const penShow = ref(false)
|
|
|
-// 白板
|
|
|
-const whitePenShow = ref(false)
|
|
|
/* 获取资源 */
|
|
|
const videoPlayDom = ref<InstanceType<typeof videoPlay>>()
|
|
|
+const coursewareMenuList = shallowRef<any[]>([]) // 课程类型
|
|
|
const coursewareList = shallowRef<any[]>([]) // 知识点
|
|
|
const flattenCoursewareList = shallowRef<any[]>([]) // 扁平化coursewareList
|
|
|
// 选中的知识点
|
|
@@ -174,6 +185,7 @@ const songPlaySrc = computed<string>(() => {
|
|
|
})
|
|
|
const activeCoursewareIndex = ref(0)
|
|
|
const drawerShow = ref(false)
|
|
|
+const drawerMenuShow = ref(false)
|
|
|
// 课程总时间
|
|
|
const coursewareTotalTime = ref(0)
|
|
|
// 监控播放
|
|
@@ -230,6 +242,51 @@ function getCoursewareList() {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+// getCoursewareMenuList()
|
|
|
+function getCoursewareMenuList() {
|
|
|
+ // GYM,GYT,KLX 区分 查询接口
|
|
|
+ const LessonCoursewareMenuDetailApi = {
|
|
|
+ GYT: refLevel_gyt,
|
|
|
+ GYM: getLessonCourseDetail_gym,
|
|
|
+ KLX: getLessonCourseDetail_klx
|
|
|
+ }
|
|
|
+ httpAjaxErrMsg(LessonCoursewareMenuDetailApi[userStoreHook.roles!], {
|
|
|
+ lessonCoursewareDetailId: "1689564396456579073",
|
|
|
+ courseScheduleId: "1844948199117283329"
|
|
|
+ } as any).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ const { lockFlag, knowledgePointList } = res.data || {}
|
|
|
+ if (lockFlag) {
|
|
|
+ ElMessageBox.alert("课件已锁定", "温馨提示", {
|
|
|
+ confirmButtonText: "退出",
|
|
|
+ type: "error"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ handleGoBack()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ handleGoBack()
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if ((knowledgePointList || []).length < 1) {
|
|
|
+ ElMessageBox.alert("没有找到课件", "温馨提示", {
|
|
|
+ confirmButtonText: "退出",
|
|
|
+ type: "error"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ handleGoBack()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ handleGoBack()
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 处理返回的数据
|
|
|
+ handlePointList(knowledgePointList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
let flattenCoursewareListData: any = [] // 临时扁平化数据
|
|
|
function handlePointList(pointList: any[]) {
|
|
|
coursewareList.value = filterPointList(pointList)
|
|
@@ -276,6 +333,11 @@ function handleCourseClick(value: any) {
|
|
|
return value.id === item.id && value.knowledgePointId === item.knowledgePointId
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+function handleCourseMenuClick(value: any) {
|
|
|
+ console.log(value, "value")
|
|
|
+}
|
|
|
+
|
|
|
/* 播放器相关 */
|
|
|
// 视频播放或者暂停
|
|
|
function handleVideoPlay() {
|
|
@@ -424,6 +486,14 @@ function handlePracticeClose() {
|
|
|
isPracticeShow.value = false
|
|
|
practiceUrl.value = ""
|
|
|
}
|
|
|
+
|
|
|
+function onTitleTip(type: "phaseGoals" | "checkItem", text: string) {
|
|
|
+ useCoursewarePlayTip({
|
|
|
+ headImg: require(`@/img/coursewarePlay/${type ? "ts3" : "ts4"}.png`),
|
|
|
+ text,
|
|
|
+ btnShow: [false, false]
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -492,31 +562,65 @@ function handlePracticeClose() {
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
width: 100%;
|
|
|
- background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
|
|
|
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
|
|
transition: all 0.5s;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
+ align-items: flex-start;
|
|
|
justify-content: space-between;
|
|
|
- padding: 20px 30px;
|
|
|
+ padding: 20px 30px 40px;
|
|
|
.leftMenu {
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
+ align-items: flex-start;
|
|
|
.backImg {
|
|
|
cursor: pointer;
|
|
|
width: 22px;
|
|
|
+ padding-top: 5px;
|
|
|
&:hover {
|
|
|
opacity: $opacity-hover;
|
|
|
}
|
|
|
}
|
|
|
+ .title-section {
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 22px;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 30px;
|
|
|
+ padding-left: 20px;
|
|
|
+ .content {
|
|
|
+ padding-top: 6px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 26px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ background: rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 11px;
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.7);
|
|
|
+ font-size: 14px;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 22px;
|
|
|
+ padding: 1px 8px;
|
|
|
+ margin-left: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.midMenu {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
- top: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- font-weight: 500;
|
|
|
- font-size: 20px;
|
|
|
- color: #ffffff;
|
|
|
+ top: 23px;
|
|
|
+ // transform: translate(-50%, -50%);
|
|
|
+ transform: translateX(-50%);
|
|
|
+ }
|
|
|
+ .rightMenu {
|
|
|
+ .posCloseBtn {
|
|
|
+ cursor: pointer;
|
|
|
+ img {
|
|
|
+ width: 34px;
|
|
|
+ height: 34px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.posTools {
|
|
@@ -525,15 +629,17 @@ function handlePracticeClose() {
|
|
|
transform: translateY(-50%);
|
|
|
transition: all 0.5s;
|
|
|
&.leftTools {
|
|
|
- left: 12px;
|
|
|
+ background: rgba(0, 0, 0, 0.4);
|
|
|
+ border-radius: 8px;
|
|
|
+ left: 32px;
|
|
|
}
|
|
|
&.rightTools {
|
|
|
right: 12px;
|
|
|
}
|
|
|
.posBtn {
|
|
|
- background: rgba(0, 0, 0, 0.3);
|
|
|
- border-radius: 8px;
|
|
|
- padding: 12px 6px;
|
|
|
+ // background: rgba(0, 0, 0, 0.3);
|
|
|
+ // border-radius: 8px;
|
|
|
+ padding: 20px 12px;
|
|
|
font-weight: 500;
|
|
|
font-size: 16px;
|
|
|
color: #ffffff;
|
|
@@ -541,15 +647,13 @@ function handlePracticeClose() {
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
cursor: pointer;
|
|
|
- margin-bottom: 12px;
|
|
|
&:hover {
|
|
|
opacity: $opacity-hover;
|
|
|
}
|
|
|
- &:last-child {
|
|
|
- margin-bottom: 0;
|
|
|
+ &.disabled {
|
|
|
+ opacity: $opacity-disabled;
|
|
|
}
|
|
|
> img {
|
|
|
- margin-bottom: 5px;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
}
|
|
@@ -570,7 +674,7 @@ function handlePracticeClose() {
|
|
|
}
|
|
|
}
|
|
|
&:deep(.elDrawer.el-drawer) {
|
|
|
- width: 346px !important;
|
|
|
+ width: 348px !important;
|
|
|
.el-drawer__header {
|
|
|
height: 54px;
|
|
|
background: #ededed;
|
|
@@ -612,5 +716,16 @@ function handlePracticeClose() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ &:deep(.elCourseMenu.el-drawer) {
|
|
|
+ width: 363px !important;
|
|
|
+ .el-drawer__body {
|
|
|
+ & > .elScrollbar {
|
|
|
+ .el-scrollbar__view {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|