|
@@ -199,6 +199,7 @@ export default defineComponent({
|
|
|
selectClassStatus: false, // 选择课件
|
|
|
homeworkStatus: true, // 布置作业完成时
|
|
|
removeVisiable: false,
|
|
|
+ nextEndShow: false,
|
|
|
removeTitle: '',
|
|
|
removeContent: '',
|
|
|
removeCourseStatus: false, // 是否布置作业
|
|
@@ -827,74 +828,76 @@ export default defineComponent({
|
|
|
handleSwipeChange(popupData.activeIndex + 1);
|
|
|
return;
|
|
|
}
|
|
|
+ data.nextEndShow = true;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ // 当前课件结束之后选择下一个课件
|
|
|
+ function handleNextEnd() {
|
|
|
+ // 获取当前是哪个章节
|
|
|
+ let detailIndex = popupData.chapterDetails.findIndex(
|
|
|
+ (item: any) => item.id == data.lessonCoursewareDetailId
|
|
|
+ );
|
|
|
+ const detailItem =
|
|
|
+ popupData.chapterDetails[detailIndex]?.knowledgeList || [];
|
|
|
+ let lessonIndex = detailItem.findIndex(
|
|
|
+ (item: any) => item.id == data.detailId
|
|
|
+ );
|
|
|
|
|
|
- // 获取当前是哪个章节
|
|
|
- let detailIndex = popupData.chapterDetails.findIndex(
|
|
|
- (item: any) => item.id == data.lessonCoursewareDetailId
|
|
|
- );
|
|
|
- const detailItem =
|
|
|
- popupData.chapterDetails[detailIndex]?.knowledgeList || [];
|
|
|
- let lessonIndex = detailItem.findIndex(
|
|
|
- (item: any) => item.id == data.detailId
|
|
|
- );
|
|
|
-
|
|
|
- let lessonStatus = false; // 当前章节下面是否有内容
|
|
|
- let lessonCoursewareDetailId = '';
|
|
|
- let coursewareDetailKnowledgeId = '';
|
|
|
- while (lessonIndex < detailItem.length - 1) {
|
|
|
- lessonIndex++;
|
|
|
- if (lessonIndex >= 0) {
|
|
|
- if (detailItem[lessonIndex].coursewareNum > 0) {
|
|
|
- lessonStatus = true;
|
|
|
- lessonCoursewareDetailId =
|
|
|
- detailItem[lessonIndex].lessonCoursewareDetailId;
|
|
|
- coursewareDetailKnowledgeId = detailItem[lessonIndex].id;
|
|
|
- }
|
|
|
- }
|
|
|
- if (lessonStatus) {
|
|
|
- break;
|
|
|
+ let lessonStatus = false; // 当前章节下面是否有内容
|
|
|
+ let lessonCoursewareDetailId = '';
|
|
|
+ let coursewareDetailKnowledgeId = '';
|
|
|
+ while (lessonIndex < detailItem.length - 1) {
|
|
|
+ lessonIndex++;
|
|
|
+ if (lessonIndex >= 0) {
|
|
|
+ if (detailItem[lessonIndex].coursewareNum > 0) {
|
|
|
+ lessonStatus = true;
|
|
|
+ lessonCoursewareDetailId =
|
|
|
+ detailItem[lessonIndex].lessonCoursewareDetailId;
|
|
|
+ coursewareDetailKnowledgeId = detailItem[lessonIndex].id;
|
|
|
}
|
|
|
}
|
|
|
- // 判断当前章节下面课程是否有内容,否则往下一个章节走
|
|
|
if (lessonStatus) {
|
|
|
- popupData.courseId = coursewareDetailKnowledgeId;
|
|
|
- data.selectClassStatus = true;
|
|
|
- return;
|
|
|
+ break;
|
|
|
}
|
|
|
+ }
|
|
|
+ // 判断当前章节下面课程是否有内容,否则往下一个章节走
|
|
|
+ if (lessonStatus) {
|
|
|
+ popupData.courseId = coursewareDetailKnowledgeId;
|
|
|
+ data.selectClassStatus = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- let nextLessonStatus = false;
|
|
|
- while (detailIndex <= popupData.chapterDetails.length - 1) {
|
|
|
- detailIndex++;
|
|
|
- const tempDetail =
|
|
|
- popupData.chapterDetails[detailIndex]?.knowledgeList || [];
|
|
|
- let tempLessonLength = 0;
|
|
|
- while (tempLessonLength <= tempDetail.length - 1) {
|
|
|
- if (tempDetail[tempLessonLength].coursewareNum > 0) {
|
|
|
- nextLessonStatus = true;
|
|
|
- lessonCoursewareDetailId =
|
|
|
- tempDetail[tempLessonLength].lessonCoursewareDetailId;
|
|
|
- coursewareDetailKnowledgeId = tempDetail[tempLessonLength].id;
|
|
|
- }
|
|
|
- tempLessonLength++;
|
|
|
- if (nextLessonStatus) {
|
|
|
- break;
|
|
|
- }
|
|
|
+ let nextLessonStatus = false;
|
|
|
+ while (detailIndex <= popupData.chapterDetails.length - 1) {
|
|
|
+ detailIndex++;
|
|
|
+ const tempDetail =
|
|
|
+ popupData.chapterDetails[detailIndex]?.knowledgeList || [];
|
|
|
+ let tempLessonLength = 0;
|
|
|
+ while (tempLessonLength <= tempDetail.length - 1) {
|
|
|
+ if (tempDetail[tempLessonLength].coursewareNum > 0) {
|
|
|
+ nextLessonStatus = true;
|
|
|
+ lessonCoursewareDetailId =
|
|
|
+ tempDetail[tempLessonLength].lessonCoursewareDetailId;
|
|
|
+ coursewareDetailKnowledgeId = tempDetail[tempLessonLength].id;
|
|
|
}
|
|
|
-
|
|
|
+ tempLessonLength++;
|
|
|
if (nextLessonStatus) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 判断当前章节下面课程是否有内容,否则往上一个章节走
|
|
|
if (nextLessonStatus) {
|
|
|
- popupData.courseId = coursewareDetailKnowledgeId;
|
|
|
- data.selectClassStatus = true;
|
|
|
- return;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- };
|
|
|
|
|
|
+ // 判断当前章节下面课程是否有内容,否则往上一个章节走
|
|
|
+ if (nextLessonStatus) {
|
|
|
+ popupData.courseId = coursewareDetailKnowledgeId;
|
|
|
+ data.selectClassStatus = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
/** 弹窗关闭 */
|
|
|
const handleClosePopup = () => {
|
|
|
const item = data.itemList[popupData.activeIndex];
|
|
@@ -907,11 +910,11 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
document.body.addEventListener('keyup', (e: KeyboardEvent) => {
|
|
|
- if (e.code === 'ArrowLeft') {
|
|
|
+ if (e.code === 'ArrowUp') {
|
|
|
// if (popupData.activeIndex === 0) return;
|
|
|
setModalOpen();
|
|
|
handlePreAndNext('up');
|
|
|
- } else if (e.code === 'ArrowRight') {
|
|
|
+ } else if (e.code === 'ArrowDown') {
|
|
|
// if (popupData.activeIndex === data.itemList.length - 1) return;
|
|
|
setModalOpen();
|
|
|
handlePreAndNext('down');
|
|
@@ -1465,6 +1468,47 @@ export default defineComponent({
|
|
|
toRef(data, 'selectResourceStatus'),
|
|
|
users.info.id
|
|
|
);
|
|
|
+ // 结束预览 结束课程确认弹窗
|
|
|
+ const removeResourBoxClass = 'removeResourBoxClass_drag';
|
|
|
+ const removeResourDragData = useDrag(
|
|
|
+ [
|
|
|
+ `${removeResourBoxClass}>.n-card-header`,
|
|
|
+ `${removeResourBoxClass} .bom_drag`
|
|
|
+ ],
|
|
|
+ removeResourBoxClass,
|
|
|
+ toRef(data, 'removeVisiable'),
|
|
|
+ users.info.id
|
|
|
+ );
|
|
|
+ // 章节next弹窗
|
|
|
+ const nextEndBoxClass = 'nextEndBoxClass_drag';
|
|
|
+ const nextEndBoxDragData = useDrag(
|
|
|
+ [`${nextEndBoxClass}>.n-card-header`, `${nextEndBoxClass} .bom_drag`],
|
|
|
+ nextEndBoxClass,
|
|
|
+ toRef(data, 'nextEndShow'),
|
|
|
+ users.info.id
|
|
|
+ );
|
|
|
+ // 章节切换弹窗
|
|
|
+ const chapterConBoxClass = 'chapterConBoxClass_drag';
|
|
|
+ const chapterConBoxDragData = useDrag(
|
|
|
+ [
|
|
|
+ `${chapterConBoxClass}>.n-card-header`,
|
|
|
+ `${chapterConBoxClass} .bom_drag`
|
|
|
+ ],
|
|
|
+ chapterConBoxClass,
|
|
|
+ toRef(popupData, 'chapterOpen'),
|
|
|
+ users.info.id
|
|
|
+ );
|
|
|
+ // 资源列表弹窗
|
|
|
+ const resourcesConBoxClass = 'resourcesConBoxClass_drag';
|
|
|
+ const resourcesConDragData = useDrag(
|
|
|
+ [
|
|
|
+ `${resourcesConBoxClass}>.n-card-header`,
|
|
|
+ `${resourcesConBoxClass} .bom_drag`
|
|
|
+ ],
|
|
|
+ resourcesConBoxClass,
|
|
|
+ toRef(popupData, 'open'),
|
|
|
+ users.info.id
|
|
|
+ );
|
|
|
return () => (
|
|
|
<div id="playContent" class={[styles.playContent, 'wrap']}>
|
|
|
<div
|
|
@@ -1858,7 +1902,7 @@ export default defineComponent({
|
|
|
/>
|
|
|
|
|
|
{/* 显示列表 */}
|
|
|
- <NDrawer
|
|
|
+ {/* <NDrawer
|
|
|
v-model:show={popupData.open}
|
|
|
class={[styles.drawerContainer, styles.drawerContainerSource]}
|
|
|
onAfterLeave={handleClosePopup}
|
|
@@ -1884,10 +1928,32 @@ export default defineComponent({
|
|
|
)
|
|
|
}}
|
|
|
</NDrawerContent>
|
|
|
- </NDrawer>
|
|
|
-
|
|
|
- {/* 显示列表 */}
|
|
|
- <NDrawer
|
|
|
+ </NDrawer> */}
|
|
|
+ <NModal
|
|
|
+ transformOrigin="center"
|
|
|
+ v-model:show={popupData.open}
|
|
|
+ preset="card"
|
|
|
+ class={[
|
|
|
+ 'modalTitle background',
|
|
|
+ styles.drawerContainer,
|
|
|
+ resourcesConBoxClass
|
|
|
+ ]}
|
|
|
+ style={resourcesConDragData.styleDrag.value}
|
|
|
+ title={activeName.value || '资源列表'}>
|
|
|
+ <SourceList
|
|
|
+ teacherChapterName={data.teacherChapterName}
|
|
|
+ knowledgePointList={data.knowledgePointList}
|
|
|
+ courseActiveIndex={popupData.courseActiveIndex}
|
|
|
+ activeItem={data.itemList[popupData.activeIndex]}
|
|
|
+ onConfirm={(item: any) => {
|
|
|
+ popupData.open = false;
|
|
|
+ toggleMaterial(item.id);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Dragbom></Dragbom>
|
|
|
+ </NModal>
|
|
|
+ {/* 章节切换 */}
|
|
|
+ {/* <NDrawer
|
|
|
v-model:show={popupData.chapterOpen}
|
|
|
class={styles.drawerContainer}
|
|
|
onAfterLeave={handleClosePopup}
|
|
@@ -1907,11 +1973,34 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
</NDrawerContent>
|
|
|
- </NDrawer>
|
|
|
-
|
|
|
+ </NDrawer> */}
|
|
|
+ <NModal
|
|
|
+ transformOrigin="center"
|
|
|
+ v-model:show={popupData.chapterOpen}
|
|
|
+ preset="card"
|
|
|
+ class={[
|
|
|
+ 'modalTitle background',
|
|
|
+ styles.drawerContainer,
|
|
|
+ chapterConBoxClass
|
|
|
+ ]}
|
|
|
+ style={chapterConBoxDragData.styleDrag.value}
|
|
|
+ title={'切换章节'}>
|
|
|
+ <Chapter
|
|
|
+ treeList={popupData.chapterDetails}
|
|
|
+ itemActive={data.detailId as any}
|
|
|
+ onHandleSelect={async (val: any) => {
|
|
|
+ // itemActive: child.id,
|
|
|
+ // itemName: child.name
|
|
|
+ popupData.courseId = val.itemActive;
|
|
|
+ data.selectClassStatus = true;
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Dragbom></Dragbom>
|
|
|
+ </NModal>
|
|
|
{/* 批注 */}
|
|
|
{studyData.penShow && (
|
|
|
<Pen
|
|
|
+ isDrag={true}
|
|
|
show={studyData.type === 'pen'}
|
|
|
type={studyData.type}
|
|
|
close={() => closeStudyTool()}
|
|
@@ -1920,6 +2009,7 @@ export default defineComponent({
|
|
|
|
|
|
{studyData.whiteboardShow && (
|
|
|
<Pen
|
|
|
+ isDrag={true}
|
|
|
show={studyData.type === 'whiteboard'}
|
|
|
type={studyData.type}
|
|
|
close={() => closeStudyTool()}
|
|
@@ -1928,6 +2018,7 @@ export default defineComponent({
|
|
|
|
|
|
{studyData.callShow && (
|
|
|
<Pen
|
|
|
+ isDrag={true}
|
|
|
imagePos={columnPos.value}
|
|
|
callStudents={studyData.callStudentList}
|
|
|
show={studyData.type === 'call'}
|
|
@@ -2118,7 +2209,8 @@ export default defineComponent({
|
|
|
transformOrigin="center"
|
|
|
v-model:show={data.removeVisiable}
|
|
|
preset="card"
|
|
|
- class={['modalTitle', styles.removeVisiable]}
|
|
|
+ class={['modalTitle', styles.removeVisiable, removeResourBoxClass]}
|
|
|
+ style={removeResourDragData.styleDrag.value}
|
|
|
title={data.removeTitle}>
|
|
|
<div class={styles.studentRemove}>
|
|
|
<p>{data.removeContent}</p>
|
|
@@ -2185,6 +2277,39 @@ export default defineComponent({
|
|
|
{data.removeCourseStatus ? '布置作业' : '确定'}
|
|
|
</NButton>
|
|
|
</NSpace>
|
|
|
+ <Dragbom></Dragbom>
|
|
|
+ </div>
|
|
|
+ </NModal>
|
|
|
+ <NModal
|
|
|
+ style={nextEndBoxDragData.styleDrag.value}
|
|
|
+ z-index={3000}
|
|
|
+ transformOrigin="center"
|
|
|
+ v-model:show={data.nextEndShow}
|
|
|
+ preset="card"
|
|
|
+ title={'提示'}
|
|
|
+ class={['modalTitle', styles.removeVisiable, nextEndBoxClass]}>
|
|
|
+ <div class={styles.studentRemove}>
|
|
|
+ <p>当前课件已结束,是否进入下一章节</p>
|
|
|
+ <NSpace class={styles.btnGroupModal} justify="center">
|
|
|
+ <NButton
|
|
|
+ type="default"
|
|
|
+ round
|
|
|
+ onClick={() => {
|
|
|
+ data.nextEndShow = false;
|
|
|
+ }}>
|
|
|
+ 取消
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ type="primary"
|
|
|
+ round
|
|
|
+ onClick={() => {
|
|
|
+ data.nextEndShow = false;
|
|
|
+ handleNextEnd();
|
|
|
+ }}>
|
|
|
+ 确认
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ <Dragbom></Dragbom>
|
|
|
</div>
|
|
|
</NModal>
|
|
|
</div>
|