|
@@ -67,13 +67,16 @@ import rightIconMetronome from './image/right_icon5.png';
|
|
|
import rightIconTuner from './image/right_icon6.png';
|
|
|
import rightIconTimer from './image/right_icon7.png';
|
|
|
import rightIconCall from './image/right_icon10.png';
|
|
|
-import rightIconPackUp from './image/right_icon8.png';
|
|
|
+import rightIconPackUp from './image/right_icon11.png';
|
|
|
+import leftIconPackUp from './image/right_icon8.png';
|
|
|
import rightIconMusic from './image/right_icon9.png';
|
|
|
import bottomIconSwitch from './image/bottom_icon1.png';
|
|
|
import bottomIconResource from './image/bottom_icon2.png';
|
|
|
import bottomIconPre from './image/bottom_icon3.png';
|
|
|
import bottomIconNext from './image/bottom_icon4.png';
|
|
|
+import rightIconTool from './image/right_icon12.png';
|
|
|
import rightHideIcon from './image/right_hide_icon.png';
|
|
|
+import leftHideIcon from './image/left_hide_icon.png';
|
|
|
import SelectResources from '../prepare-lessons/model/select-resources';
|
|
|
import { getStudentAfterWork, getStudentList } from '../studentList/api';
|
|
|
import TheNoticeBar from '/src/components/TheNoticeBar';
|
|
@@ -350,7 +353,16 @@ export default defineComponent({
|
|
|
getDetail();
|
|
|
getLessonCoursewareDetail();
|
|
|
if (data.type === 'preview') {
|
|
|
- rightList.splice(6, 1);
|
|
|
+ // 预览隐藏点名和布置作业
|
|
|
+ const hideListIds = [2, 10];
|
|
|
+ let index = rightList.length - 1;
|
|
|
+ while (index >= 0) {
|
|
|
+ if (hideListIds.includes(rightList[index].id)) {
|
|
|
+ console.log(index);
|
|
|
+ rightList.splice(index, 1);
|
|
|
+ }
|
|
|
+ index--;
|
|
|
+ }
|
|
|
}
|
|
|
rollCallStudentList();
|
|
|
});
|
|
@@ -398,7 +410,6 @@ export default defineComponent({
|
|
|
}, 200);
|
|
|
}
|
|
|
);
|
|
|
-
|
|
|
const formatParentId = (id: any, list: any, ids = [] as any) => {
|
|
|
for (const item of list) {
|
|
|
if (item.knowledgeList && item.knowledgeList.length > 0) {
|
|
@@ -1165,36 +1176,30 @@ export default defineComponent({
|
|
|
// 右侧菜单栏
|
|
|
const rightList = reactive([
|
|
|
{
|
|
|
- name: '曲目资源',
|
|
|
- name2: '曲目资源',
|
|
|
- icon: rightIconMusic,
|
|
|
- id: 9
|
|
|
+ name: '上一张',
|
|
|
+ icon: bottomIconPre,
|
|
|
+ id: 11
|
|
|
},
|
|
|
{
|
|
|
- name: '批注',
|
|
|
- icon: rightIconPostil,
|
|
|
- id: 3
|
|
|
+ name: '下一张',
|
|
|
+ icon: bottomIconNext,
|
|
|
+ id: 12
|
|
|
},
|
|
|
{
|
|
|
- name: '白板',
|
|
|
- icon: rightIconWhiteboard,
|
|
|
- id: 4
|
|
|
+ name: '切换章节',
|
|
|
+ icon: bottomIconSwitch,
|
|
|
+ id: 13
|
|
|
},
|
|
|
{
|
|
|
- name: '节拍器',
|
|
|
- icon: rightIconMetronome,
|
|
|
- id: 5
|
|
|
+ name: '资源列表',
|
|
|
+ icon: bottomIconResource,
|
|
|
+ id: 14
|
|
|
},
|
|
|
{
|
|
|
- name: '计时器',
|
|
|
- icon: rightIconTimer,
|
|
|
- id: 7
|
|
|
+ name: '曲目资源',
|
|
|
+ icon: rightIconMusic,
|
|
|
+ id: 9
|
|
|
},
|
|
|
- // {
|
|
|
- // name: '调音器',
|
|
|
- // icon: rightIconTuner,
|
|
|
- // id: 6
|
|
|
- // },
|
|
|
{
|
|
|
name: '点名',
|
|
|
icon: rightIconCall,
|
|
@@ -1206,6 +1211,11 @@ export default defineComponent({
|
|
|
id: 2
|
|
|
},
|
|
|
{
|
|
|
+ name: '工具箱',
|
|
|
+ icon: rightIconTool,
|
|
|
+ id: 15
|
|
|
+ },
|
|
|
+ {
|
|
|
name: '结束课程',
|
|
|
name2: '结束预览',
|
|
|
icon: rightIconEnd,
|
|
@@ -1213,40 +1223,55 @@ export default defineComponent({
|
|
|
},
|
|
|
{
|
|
|
name: '收起',
|
|
|
- icon: rightIconPackUp,
|
|
|
+ icon: leftIconPackUp,
|
|
|
id: 8
|
|
|
}
|
|
|
]);
|
|
|
-
|
|
|
- // 底部菜单栏
|
|
|
- const bottomList = reactive([
|
|
|
+ const tooltipList = [
|
|
|
{
|
|
|
- name: '切换章节',
|
|
|
- icon: bottomIconSwitch,
|
|
|
- id: 1
|
|
|
+ name: '节拍器',
|
|
|
+ icon: rightIconMetronome,
|
|
|
+ id: 5
|
|
|
},
|
|
|
{
|
|
|
- name: '资源列表',
|
|
|
- icon: bottomIconResource,
|
|
|
- id: 2
|
|
|
+ name: '计时器',
|
|
|
+ icon: rightIconTimer,
|
|
|
+ id: 7
|
|
|
},
|
|
|
{
|
|
|
- name: '上一张',
|
|
|
- icon: bottomIconPre,
|
|
|
+ name: '批注',
|
|
|
+ icon: rightIconPostil,
|
|
|
id: 3
|
|
|
},
|
|
|
{
|
|
|
- name: '下一张',
|
|
|
- icon: bottomIconNext,
|
|
|
+ name: '白板',
|
|
|
+ icon: rightIconWhiteboard,
|
|
|
id: 4
|
|
|
}
|
|
|
- ]);
|
|
|
+ // {
|
|
|
+ // name: '调音器',
|
|
|
+ // icon: rightIconTuner,
|
|
|
+ // id: 6
|
|
|
+ // }
|
|
|
+ ];
|
|
|
// 默认收起菜单
|
|
|
- const rightColumnShow = ref(false);
|
|
|
-
|
|
|
+ const columnShow = ref(true);
|
|
|
+ // 菜单位置
|
|
|
+ const columnPos = ref<'left' | 'right'>('left');
|
|
|
+ watch(columnPos, () => {
|
|
|
+ for (let i = 0; i < data.itemList.length; i++) {
|
|
|
+ const activeItem = data.itemList[i];
|
|
|
+ if (activeItem.type === 'RHYTHM') {
|
|
|
+ activeItem.iframeRef?.contentWindow?.postMessage(
|
|
|
+ { api: 'imagePos', data: columnPos.value },
|
|
|
+ '*'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
// 右边栏操作
|
|
|
const operateRightBtn = async (id: number) => {
|
|
|
- if (id !== 8) {
|
|
|
+ if (![8, 11, 12, 13, 14].includes(id)) {
|
|
|
handleStop(false);
|
|
|
}
|
|
|
|
|
@@ -1327,7 +1352,7 @@ export default defineComponent({
|
|
|
startShowModal('setTimeIcon');
|
|
|
break;
|
|
|
case 8:
|
|
|
- rightColumnShow.value = false;
|
|
|
+ columnShow.value = false;
|
|
|
break;
|
|
|
case 9:
|
|
|
// 选择曲目时需要暂停所有播放
|
|
@@ -1346,6 +1371,23 @@ export default defineComponent({
|
|
|
return;
|
|
|
}
|
|
|
break;
|
|
|
+ case 11:
|
|
|
+ if (!isUpArrow.value) return;
|
|
|
+ handlePreAndNext('up');
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
+ if (!isDownArrow.value) return;
|
|
|
+ handlePreAndNext('down');
|
|
|
+ break;
|
|
|
+ case 13:
|
|
|
+ popupData.chapterOpen = true;
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ popupData.open = true;
|
|
|
+ nextTick(() => {
|
|
|
+ scrollResourceSection();
|
|
|
+ });
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -1377,31 +1419,6 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- // 底部悬浮按钮操作
|
|
|
- const operateBottomBtn = (id: number) => {
|
|
|
- switch (id) {
|
|
|
- case 1:
|
|
|
- popupData.chapterOpen = true;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- popupData.open = true;
|
|
|
- nextTick(() => {
|
|
|
- scrollResourceSection();
|
|
|
- });
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- if (!isUpArrow.value) return;
|
|
|
- handlePreAndNext('up');
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- if (!isDownArrow.value) return;
|
|
|
- handlePreAndNext('down');
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
// 滚动到某个元素的位置
|
|
|
const scrollResourceSection = () => {
|
|
|
const drawerCardItemRefs =
|
|
@@ -1456,6 +1473,7 @@ export default defineComponent({
|
|
|
}
|
|
|
class={styles.itemDiv}>
|
|
|
<VideoPlay
|
|
|
+ imagePos={columnPos.value}
|
|
|
ref={(el: any) => (data.videoItemRef = el)}
|
|
|
item={activeVideoItem.value}
|
|
|
showModel={activeData.model}
|
|
@@ -1585,6 +1603,7 @@ export default defineComponent({
|
|
|
<img src={m.content} />
|
|
|
) : m.type === 'SONG' ? (
|
|
|
<AudioPay
|
|
|
+ imagePos={columnPos.value}
|
|
|
item={m}
|
|
|
activeStatus={popupData.activeIndex === mIndex}
|
|
|
ref={(v: any) => (data.audioRefs[mIndex] = v)}
|
|
@@ -1628,6 +1647,7 @@ export default defineComponent({
|
|
|
<RhythmModal
|
|
|
item={m}
|
|
|
activeStatus={popupData.activeIndex === mIndex}
|
|
|
+ imagePos={columnPos.value}
|
|
|
onSetIframe={(el: any) => {
|
|
|
m.iframeRef = el;
|
|
|
}}
|
|
@@ -1689,71 +1709,130 @@ export default defineComponent({
|
|
|
<div
|
|
|
class={[
|
|
|
styles.rightColumn,
|
|
|
- !rightColumnShow.value ? styles.rightColumnHide : '',
|
|
|
- studyData.type !== 'init' &&
|
|
|
- (studyData.penShow || studyData.whiteboardShow)
|
|
|
- ? styles.rightColumnZ
|
|
|
- : ''
|
|
|
+ columnShow.value && columnPos.value === 'right'
|
|
|
+ ? ''
|
|
|
+ : styles.rightColumnHide
|
|
|
]}>
|
|
|
- {rightList.map((item: any, index: number) => (
|
|
|
- <div
|
|
|
- class={[
|
|
|
- styles.rightItem,
|
|
|
- (item.id === 2 && data.preStudentNum <= 0) ||
|
|
|
- (item.id === 10 && studyData.callStudentList.length <= 0)
|
|
|
- ? styles.itemDisabled
|
|
|
- : '',
|
|
|
- item.id === 10 && !data.classId ? styles.itemHide : ''
|
|
|
- ]}
|
|
|
- onClick={() => operateRightBtn(item.id)}>
|
|
|
- <NTooltip showArrow={false} placement="left">
|
|
|
- {{
|
|
|
- trigger: () => <img src={item.icon} />,
|
|
|
- default: (
|
|
|
- <>
|
|
|
- {index === rightList.length - 2 && data.type === 'preview'
|
|
|
- ? item.name2
|
|
|
- : item.name}
|
|
|
- </>
|
|
|
- )
|
|
|
- }}
|
|
|
- </NTooltip>
|
|
|
+ {rightList.map((item: any) => (
|
|
|
+ <div class={styles.columnItemBox}>
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles.columnItem,
|
|
|
+ (item.id === 2 && data.preStudentNum <= 0) ||
|
|
|
+ (item.id === 10 && studyData.callStudentList.length <= 0) ||
|
|
|
+ (item.id === 11 && !isUpArrow.value) ||
|
|
|
+ (item.id === 12 && !isDownArrow.value)
|
|
|
+ ? styles.itemDisabled
|
|
|
+ : ''
|
|
|
+ ]}
|
|
|
+ onClick={() => operateRightBtn(item.id)}>
|
|
|
+ <NTooltip
|
|
|
+ showArrow={false}
|
|
|
+ placement="left"
|
|
|
+ class={[
|
|
|
+ item.id === 15
|
|
|
+ ? 'columnItemTooltip rightColumnItemTooltip'
|
|
|
+ : ''
|
|
|
+ ]}>
|
|
|
+ {{
|
|
|
+ trigger: () => (
|
|
|
+ <img src={item.id === 8 ? rightIconPackUp : item.icon} />
|
|
|
+ ),
|
|
|
+ default: () =>
|
|
|
+ item.id === 15 ? (
|
|
|
+ <div class="tools">
|
|
|
+ {tooltipList.map(i => (
|
|
|
+ <div onClick={() => operateRightBtn(i.id)}>
|
|
|
+ <img src={i.icon} />
|
|
|
+ <div class="tit">{i.name}</div>
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
+ ) : item.id === 1 && data.type === 'preview' ? (
|
|
|
+ item.name2
|
|
|
+ ) : (
|
|
|
+ item.name
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </NTooltip>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
))}
|
|
|
</div>
|
|
|
- {!rightColumnShow.value && (
|
|
|
- <img
|
|
|
- class={[
|
|
|
- styles.rightHideIcon,
|
|
|
- !rightColumnShow.value ? styles.rightIconShow : ''
|
|
|
- ]}
|
|
|
- src={rightHideIcon}
|
|
|
- onClick={() => (rightColumnShow.value = true)}
|
|
|
- />
|
|
|
- )}
|
|
|
- {/* 右下角悬浮按钮 */}
|
|
|
- <div class={styles.bottomColumn}>
|
|
|
- {bottomList.map((item: any, index: number) => (
|
|
|
- <div
|
|
|
- class={[
|
|
|
- styles.bottomItem,
|
|
|
- (item.id === 3 && !isUpArrow.value) ||
|
|
|
- (item.id === 4 && !isDownArrow.value)
|
|
|
- ? styles.itemDisabled
|
|
|
- : ''
|
|
|
- ]}
|
|
|
- onClick={() => operateBottomBtn(item.id)}>
|
|
|
- <NTooltip showArrow={false} placement="top">
|
|
|
- {{
|
|
|
- trigger: () => <img src={item.icon} />,
|
|
|
- default: <>{item.name}</>
|
|
|
- }}
|
|
|
- </NTooltip>
|
|
|
- {/* <img src={item.icon} />
|
|
|
- <div class={styles.bottomTips}>{item.name}</div> */}
|
|
|
+ <img
|
|
|
+ class={[
|
|
|
+ styles.rightHideIcon,
|
|
|
+ !(columnShow.value && columnPos.value === 'right')
|
|
|
+ ? styles.rightIconShow
|
|
|
+ : ''
|
|
|
+ ]}
|
|
|
+ src={rightHideIcon}
|
|
|
+ onClick={() => {
|
|
|
+ columnPos.value = 'right';
|
|
|
+ columnShow.value = true;
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ {/* 左边操作栏 */}
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles.leftColumn,
|
|
|
+ columnShow.value && columnPos.value === 'left'
|
|
|
+ ? ''
|
|
|
+ : styles.leftColumnHide
|
|
|
+ ]}>
|
|
|
+ {rightList.map((item: any) => (
|
|
|
+ <div class={styles.columnItemBox}>
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles.columnItem,
|
|
|
+ (item.id === 2 && data.preStudentNum <= 0) ||
|
|
|
+ (item.id === 10 && studyData.callStudentList.length <= 0) ||
|
|
|
+ (item.id === 11 && !isUpArrow.value) ||
|
|
|
+ (item.id === 12 && !isDownArrow.value)
|
|
|
+ ? styles.itemDisabled
|
|
|
+ : ''
|
|
|
+ ]}
|
|
|
+ onClick={() => operateRightBtn(item.id)}>
|
|
|
+ <NTooltip
|
|
|
+ showArrow={false}
|
|
|
+ placement="right"
|
|
|
+ class={[item.id === 15 ? 'columnItemTooltip' : '']}>
|
|
|
+ {{
|
|
|
+ trigger: () => <img src={item.icon} />,
|
|
|
+ default: () =>
|
|
|
+ item.id === 15 ? (
|
|
|
+ <div class="tools">
|
|
|
+ {tooltipList.map(i => (
|
|
|
+ <div onClick={() => operateRightBtn(i.id)}>
|
|
|
+ <img src={i.icon} />
|
|
|
+ <div class="tit">{i.name}</div>
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
+ ) : item.id === 1 && data.type === 'preview' ? (
|
|
|
+ item.name2
|
|
|
+ ) : (
|
|
|
+ item.name
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </NTooltip>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
))}
|
|
|
</div>
|
|
|
+ <img
|
|
|
+ class={[
|
|
|
+ styles.leftHideIcon,
|
|
|
+ !(columnShow.value && columnPos.value === 'left')
|
|
|
+ ? styles.leftIconShow
|
|
|
+ : ''
|
|
|
+ ]}
|
|
|
+ src={leftHideIcon}
|
|
|
+ onClick={() => {
|
|
|
+ columnPos.value = 'left';
|
|
|
+ columnShow.value = true;
|
|
|
+ }}
|
|
|
+ />
|
|
|
|
|
|
{/* 显示列表 */}
|
|
|
<NDrawer
|
|
@@ -1826,6 +1905,7 @@ export default defineComponent({
|
|
|
|
|
|
{studyData.callShow && (
|
|
|
<Pen
|
|
|
+ imagePos={columnPos.value}
|
|
|
callStudents={studyData.callStudentList}
|
|
|
show={studyData.type === 'call'}
|
|
|
type={studyData.type}
|