|
@@ -33,7 +33,8 @@ import {
|
|
NSpace,
|
|
NSpace,
|
|
NButton,
|
|
NButton,
|
|
NCollapse,
|
|
NCollapse,
|
|
- NCollapseItem
|
|
|
|
|
|
+ NCollapseItem,
|
|
|
|
+ NTooltip
|
|
} from 'naive-ui';
|
|
} from 'naive-ui';
|
|
import CardType from '@/components/card-type';
|
|
import CardType from '@/components/card-type';
|
|
import Pen from './component/tools/pen';
|
|
import Pen from './component/tools/pen';
|
|
@@ -79,6 +80,8 @@ import TheNoticeBar from '/src/components/TheNoticeBar';
|
|
import ClassWork from './model/class-work';
|
|
import ClassWork from './model/class-work';
|
|
import SelectClass from './model/select-class';
|
|
import SelectClass from './model/select-class';
|
|
import SourceList from './model/source-list';
|
|
import SourceList from './model/source-list';
|
|
|
|
+import RhythmModal from './component/rhythm-modal';
|
|
|
|
+import InstruemntDetail from '/src/views/prepare-lessons/model/source-instrument/detail';
|
|
|
|
|
|
export type ToolType = 'init' | 'pen' | 'whiteboard' | 'call';
|
|
export type ToolType = 'init' | 'pen' | 'whiteboard' | 'call';
|
|
export type ToolItem = {
|
|
export type ToolItem = {
|
|
@@ -221,12 +224,14 @@ export default defineComponent({
|
|
const childList: any[] = [];
|
|
const childList: any[] = [];
|
|
row.chapterKnowledgeMaterialList.forEach((child: any) => {
|
|
row.chapterKnowledgeMaterialList.forEach((child: any) => {
|
|
if (!child.removeFlag) {
|
|
if (!child.removeFlag) {
|
|
|
|
+ const dataJson = child.dataJson ? JSON.parse(child.dataJson) : {};
|
|
childList.push({
|
|
childList.push({
|
|
id: child.id,
|
|
id: child.id,
|
|
materialId: child.bizId,
|
|
materialId: child.bizId,
|
|
coverImg: child.bizInfo.coverImg,
|
|
coverImg: child.bizInfo.coverImg,
|
|
type: child.type,
|
|
type: child.type,
|
|
title: child.bizInfo.name,
|
|
title: child.bizInfo.name,
|
|
|
|
+ dataJson: dataJson.setting ? dataJson.setting : {},
|
|
isCollect: !!child.favoriteFlag,
|
|
isCollect: !!child.favoriteFlag,
|
|
isSelected: child.source === 'PLATFORM' ? true : false,
|
|
isSelected: child.source === 'PLATFORM' ? true : false,
|
|
content: child.bizInfo.content,
|
|
content: child.bizInfo.content,
|
|
@@ -241,6 +246,7 @@ export default defineComponent({
|
|
allItem.push(...childList);
|
|
allItem.push(...childList);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ console.log(allItem, 'temp');
|
|
data.knowledgePointList = temp;
|
|
data.knowledgePointList = temp;
|
|
data.itemList = allItem?.map((m: any) => {
|
|
data.itemList = allItem?.map((m: any) => {
|
|
return {
|
|
return {
|
|
@@ -449,6 +455,17 @@ export default defineComponent({
|
|
'*'
|
|
'*'
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (activeItem.type === 'INSTRUMENT') {
|
|
|
|
+ activeItem.iframeRef?.handleChangeAudio('pause');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (activeItem.type === 'RHYTHM') {
|
|
|
|
+ activeItem.iframeRef?.contentWindow?.postMessage(
|
|
|
|
+ { api: 'setPlayState', data: false },
|
|
|
|
+ '*'
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// 切换素材
|
|
// 切换素材
|
|
@@ -1534,6 +1551,20 @@ export default defineComponent({
|
|
width="100%"
|
|
width="100%"
|
|
height="100%"
|
|
height="100%"
|
|
frameborder="1"></iframe>
|
|
frameborder="1"></iframe>
|
|
|
|
+ ) : m.type === 'RHYTHM' ? (
|
|
|
|
+ <RhythmModal
|
|
|
|
+ item={m}
|
|
|
|
+ onSetIframe={(el: any) => {
|
|
|
|
+ m.iframeRef = el;
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ ) : m.type === 'INSTRUMENT' ? (
|
|
|
|
+ <InstruemntDetail
|
|
|
|
+ type="preview"
|
|
|
|
+ id={m.content}
|
|
|
|
+ activeStatus={popupData.activeIndex === mIndex}
|
|
|
|
+ ref={(el: any) => (m.iframeRef = el)}
|
|
|
|
+ />
|
|
) : (
|
|
) : (
|
|
<MusicScore
|
|
<MusicScore
|
|
activeModel={activeData.model}
|
|
activeModel={activeData.model}
|
|
@@ -1576,12 +1607,24 @@ export default defineComponent({
|
|
item.id === 10 && !data.classId ? styles.itemHide : ''
|
|
item.id === 10 && !data.classId ? styles.itemHide : ''
|
|
]}
|
|
]}
|
|
onClick={() => operateRightBtn(item.id)}>
|
|
onClick={() => operateRightBtn(item.id)}>
|
|
- <img src={item.icon} />
|
|
|
|
- <div class={styles.rightTips}>
|
|
|
|
|
|
+ <NTooltip showArrow={false} placement="left">
|
|
|
|
+ {{
|
|
|
|
+ trigger: () => <img src={item.icon} />,
|
|
|
|
+ default: (
|
|
|
|
+ <>
|
|
|
|
+ {index === 0 && data.type === 'preview'
|
|
|
|
+ ? item.name2
|
|
|
|
+ : item.name}
|
|
|
|
+ </>
|
|
|
|
+ )
|
|
|
|
+ }}
|
|
|
|
+ </NTooltip>
|
|
|
|
+
|
|
|
|
+ {/* <div class={styles.rightTips}>
|
|
{index === 0 && data.type === 'preview'
|
|
{index === 0 && data.type === 'preview'
|
|
? item.name2
|
|
? item.name2
|
|
: item.name}
|
|
: item.name}
|
|
- </div>
|
|
|
|
|
|
+ </div> */}
|
|
</div>
|
|
</div>
|
|
))}
|
|
))}
|
|
</div>
|
|
</div>
|
|
@@ -1607,8 +1650,14 @@ export default defineComponent({
|
|
: ''
|
|
: ''
|
|
]}
|
|
]}
|
|
onClick={() => operateBottomBtn(item.id)}>
|
|
onClick={() => operateBottomBtn(item.id)}>
|
|
- <img src={item.icon} />
|
|
|
|
- <div class={styles.bottomTips}>{item.name}</div>
|
|
|
|
|
|
+ <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> */}
|
|
</div>
|
|
</div>
|
|
))}
|
|
))}
|
|
</div>
|
|
</div>
|