|
@@ -16,17 +16,20 @@ import { usePrepareStore } from '/src/store/modules/prepareLessons';
|
|
|
import { useCatchStore } from '/src/store/modules/catchData';
|
|
|
import TheEmpty from '/src/components/TheEmpty';
|
|
|
import {
|
|
|
+ courseScheduleStart,
|
|
|
queryCourseware,
|
|
|
saveCourseware,
|
|
|
teacherKnowledgeMaterialDelete
|
|
|
} from '../../../api';
|
|
|
import Draggable from 'vuedraggable';
|
|
|
import iconDelete from '../../../images/icon-delete.png';
|
|
|
-import { useRoute, useRouter } from 'vue-router';
|
|
|
+import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router';
|
|
|
import deepClone from '/src/helpers/deep-clone';
|
|
|
import CardPreview from '/src/components/card-preview';
|
|
|
import PreviewWindow from '/src/views/preview-window';
|
|
|
import { state } from '/src/state';
|
|
|
+import SubjectSync from '../../../model/subject-sync';
|
|
|
+import { eventGlobal } from '/src/utils';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'courseware-modal',
|
|
@@ -38,14 +41,20 @@ export default defineComponent({
|
|
|
const dialog = useDialog();
|
|
|
const message = useMessage();
|
|
|
const forms = reactive({
|
|
|
+ className: route.query.name as any,
|
|
|
+ classGroupId: route.query.classGroupId,
|
|
|
subjectId: route.query.subjectId ? Number(route.query.subjectId) : null,
|
|
|
coursewareList: [] as any,
|
|
|
loadingStatus: false,
|
|
|
showAttendClass: false,
|
|
|
+ attendClassType: 'change', //
|
|
|
removeIds: [] as any, // 临时删除的编号
|
|
|
drag: false,
|
|
|
+ isEdit: false, // 是否更新数据
|
|
|
+ editSubjectIds: '', // 声部编号
|
|
|
removeVisiable: false,
|
|
|
removeVisiable1: false,
|
|
|
+ subjectSyncVisiable: false, // 同步声部
|
|
|
show: false,
|
|
|
item: {} as any,
|
|
|
previewModal: false,
|
|
@@ -105,6 +114,7 @@ export default defineComponent({
|
|
|
() => prepareStore.getSelectKey,
|
|
|
() => {
|
|
|
forms.drag = false;
|
|
|
+ prepareStore.setIsEditResource(false);
|
|
|
getList();
|
|
|
}
|
|
|
);
|
|
@@ -124,6 +134,18 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+ // 监听列表变化,如果变化了,则弹选择声部的
|
|
|
+ watch(
|
|
|
+ () => forms.coursewareList,
|
|
|
+ () => {
|
|
|
+ if (forms.drag) {
|
|
|
+ forms.isEdit = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
// 删除
|
|
|
const onDelete = (item: any) => {
|
|
@@ -133,18 +155,13 @@ export default defineComponent({
|
|
|
(c: any) => c.id === item.id
|
|
|
);
|
|
|
forms.coursewareList.splice(index, 1);
|
|
|
+ forms.isEdit = true;
|
|
|
// prepareStore.setCoursewareList(forms.coursewareList);
|
|
|
// console.log(prepareStore.getCoursewareList, 'getCourseware');
|
|
|
};
|
|
|
|
|
|
// 完成编辑
|
|
|
const onOverEdit = async () => {
|
|
|
- // dialog.warning({
|
|
|
- // title: '提示',
|
|
|
- // content: `是否完成编辑?`,
|
|
|
- // positiveText: '确定',
|
|
|
- // negativeText: '取消',
|
|
|
- // onPositiveClick: async () => {
|
|
|
try {
|
|
|
const temp: any = [];
|
|
|
forms.coursewareList.forEach((item: any) => {
|
|
@@ -156,26 +173,27 @@ export default defineComponent({
|
|
|
});
|
|
|
});
|
|
|
// 保存课件
|
|
|
+ // 判断是否编辑,如果编辑则取选择的声部
|
|
|
await saveCourseware({
|
|
|
coursewareDetailKnowledgeId: prepareStore.getSelectKey,
|
|
|
lessonCoursewareId: prepareStore.getLessonCoursewareId,
|
|
|
lessonCoursewareDetailId: prepareStore.getLessonCoursewareDetailId,
|
|
|
- subjectId: prepareStore.getSubjectId,
|
|
|
+ subjectId: forms.isEdit
|
|
|
+ ? forms.editSubjectIds
|
|
|
+ : prepareStore.getSubjectId,
|
|
|
materialList: [...temp]
|
|
|
});
|
|
|
|
|
|
forms.drag = false;
|
|
|
message.success('编辑成功');
|
|
|
forms.removeVisiable = false;
|
|
|
- prepareStore.setCoursewareList(deepClone(forms.coursewareList));
|
|
|
prepareStore.setIsEditResource(false);
|
|
|
// 重置临时删除编号
|
|
|
forms.removeIds = [];
|
|
|
+ await getList();
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
|
- // }
|
|
|
- // });
|
|
|
};
|
|
|
|
|
|
// 预览上课
|
|
@@ -193,38 +211,44 @@ export default defineComponent({
|
|
|
}
|
|
|
// 判断是否在应用里面
|
|
|
if (window.matchMedia('(display-mode: standalone)').matches) {
|
|
|
- state.application = window.matchMedia('(display-mode: standalone)').matches
|
|
|
+ state.application = window.matchMedia(
|
|
|
+ '(display-mode: standalone)'
|
|
|
+ ).matches;
|
|
|
forms.previewModal = true;
|
|
|
- fscreen()
|
|
|
+ fscreen();
|
|
|
forms.previewParams = {
|
|
|
type: 'preview',
|
|
|
subjectId: prepareStore.getSubjectId,
|
|
|
- detailId: prepareStore.getSelectKey
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
};
|
|
|
-
|
|
|
-
|
|
|
} else {
|
|
|
const { href } = router.resolve({
|
|
|
path: '/attend-class',
|
|
|
query: {
|
|
|
type: 'preview',
|
|
|
subjectId: prepareStore.getSubjectId,
|
|
|
- detailId: prepareStore.getSelectKey
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
}
|
|
|
});
|
|
|
window.open(href, +new Date() + '');
|
|
|
}
|
|
|
};
|
|
|
- const fscreen=()=> {
|
|
|
- const el = document.documentElement
|
|
|
- const isFullscreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen
|
|
|
+ const fscreen = () => {
|
|
|
+ const el = document.documentElement;
|
|
|
+ const isFullscreen =
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
if (!isFullscreen) {
|
|
|
//进入全屏
|
|
|
(el.requestFullscreen && el.requestFullscreen()) ||
|
|
|
- (el.mozRequestFullScreen && el.mozRequestFullScreen()) ||
|
|
|
- (el.webkitRequestFullscreen && el.webkitRequestFullscreen()) ||
|
|
|
- (el.msRequestFullscreen && el.msRequestFullscreen())
|
|
|
- } }
|
|
|
+ (el.mozRequestFullScreen && el.mozRequestFullScreen()) ||
|
|
|
+ (el.webkitRequestFullscreen && el.webkitRequestFullscreen()) ||
|
|
|
+ (el.msRequestFullscreen && el.msRequestFullscreen());
|
|
|
+ }
|
|
|
+ };
|
|
|
// 单个删除
|
|
|
const onRemove = async (item: any) => {
|
|
|
try {
|
|
@@ -245,24 +269,62 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- onMounted(async () => {
|
|
|
- // 获取教材分类列表
|
|
|
- await catchStore.getSubjects();
|
|
|
+ watch(
|
|
|
+ () => prepareStore.getSubjectList,
|
|
|
+ () => {
|
|
|
+ checkSubjectIds();
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ const checkSubjectIds = () => {
|
|
|
+ const subjectList = prepareStore.getSubjectList;
|
|
|
|
|
|
- const subjectList = catchStore.getSubjectList;
|
|
|
// 并且没有声部时才会更新
|
|
|
- console.log(forms.subjectId, subjectList, 'forms.subjectId');
|
|
|
if (subjectList.length > 0) {
|
|
|
// 判断浏览器上面是否有
|
|
|
- if (forms.subjectId) {
|
|
|
+ const index = subjectList.findIndex(
|
|
|
+ (subject: any) => subject.id == forms.subjectId
|
|
|
+ );
|
|
|
+
|
|
|
+ // 并且声部在列表中
|
|
|
+ if (forms.subjectId && index >= 0) {
|
|
|
prepareStore.setSubjectId(forms.subjectId);
|
|
|
- } else if (!prepareStore.getSubjectId) {
|
|
|
+ } else {
|
|
|
// 判断是否有缓存
|
|
|
prepareStore.setSubjectId(subjectList[0].id);
|
|
|
}
|
|
|
+
|
|
|
+ // console.log(prepareStore.getSubjectId, 'getSubjectId');
|
|
|
}
|
|
|
+ };
|
|
|
+
|
|
|
+ watch(
|
|
|
+ () => route.query,
|
|
|
+ async () => {
|
|
|
+ forms.className = route.query.name as any;
|
|
|
+ forms.classGroupId = route.query.classGroupId as any;
|
|
|
+ forms.subjectId = route.query.subjectId
|
|
|
+ ? Number(route.query.subjectId)
|
|
|
+ : null;
|
|
|
+
|
|
|
+ checkSubjectIds();
|
|
|
+ await getList();
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ onMounted(async () => {
|
|
|
+ // 获取教材分类列表
|
|
|
+ checkSubjectIds();
|
|
|
|
|
|
await getList();
|
|
|
+
|
|
|
+ // 动态添加数据
|
|
|
+ eventGlobal.on('onPrepareAddItem', (item: any) => {
|
|
|
+ forms.coursewareList.push(item);
|
|
|
+ prepareStore.setCoursewareList(forms.coursewareList);
|
|
|
+
|
|
|
+ forms.isEdit = true;
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
return () => (
|
|
@@ -270,82 +332,103 @@ export default defineComponent({
|
|
|
<div class={styles.btnGroup}>
|
|
|
{forms.drag ? (
|
|
|
<NSpace>
|
|
|
+ <span class={styles.tips}>拖动可将资源进行排序哦~</span>
|
|
|
+ </NSpace>
|
|
|
+ ) : (
|
|
|
+ <NSpace>
|
|
|
+ {forms.classGroupId && (
|
|
|
+ <div class={styles.btnItem}>
|
|
|
+ <span class={styles.btnTitle}>上课班级:</span>
|
|
|
+ <div
|
|
|
+ onClick={() => {
|
|
|
+ forms.showAttendClass = true;
|
|
|
+ forms.attendClassType = 'change';
|
|
|
+ }}>
|
|
|
+ <NSelect
|
|
|
+ placeholder="选择声部"
|
|
|
+ labelField="name"
|
|
|
+ valueField="id"
|
|
|
+ class={styles.btnClassList}
|
|
|
+ value={forms.className}
|
|
|
+ disabled
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+
|
|
|
+ <div class={styles.btnItem}>
|
|
|
+ <span class={styles.btnTitle}>声部:</span>
|
|
|
+ <NSelect
|
|
|
+ placeholder="选择声部"
|
|
|
+ class={styles.btnSubjectList}
|
|
|
+ options={prepareStore.getSubjectList}
|
|
|
+ labelField="name"
|
|
|
+ valueField="id"
|
|
|
+ value={prepareStore.getSubjectId}
|
|
|
+ onUpdate:value={(val: any) => {
|
|
|
+ prepareStore.setSubjectId(val);
|
|
|
+ getList();
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </NSpace>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* 编辑 */}
|
|
|
+ {!forms.drag ? (
|
|
|
+ <NSpace>
|
|
|
<NButton
|
|
|
type="default"
|
|
|
onClick={() => {
|
|
|
- forms.removeVisiable = true;
|
|
|
+ forms.drag = true;
|
|
|
+ prepareStore.setIsEditResource(true);
|
|
|
+
|
|
|
+ // forms.subjectSyncVisiable = true;
|
|
|
}}>
|
|
|
- 完成编辑
|
|
|
+ 编辑
|
|
|
</NButton>
|
|
|
+ </NSpace>
|
|
|
+ ) : (
|
|
|
+ <NSpace>
|
|
|
<NButton
|
|
|
type="error"
|
|
|
onClick={() => {
|
|
|
- forms.drag = false;
|
|
|
- prepareStore.setIsEditResource(false);
|
|
|
- forms.removeIds = [];
|
|
|
- getList();
|
|
|
+ forms.removeVisiable1 = true;
|
|
|
}}>
|
|
|
- 取消编辑
|
|
|
+ 清空资源
|
|
|
</NButton>
|
|
|
<NButton
|
|
|
type="error"
|
|
|
onClick={() => {
|
|
|
- forms.removeVisiable1 = true;
|
|
|
+ forms.drag = false;
|
|
|
+ forms.isEdit = false;
|
|
|
+ prepareStore.setIsEditResource(false);
|
|
|
+ forms.removeIds = [];
|
|
|
+ getList();
|
|
|
}}>
|
|
|
- 清空资源
|
|
|
+ 取消编辑
|
|
|
</NButton>
|
|
|
- <span class={styles.tips}>拖动可将资源进行排序</span>
|
|
|
- </NSpace>
|
|
|
- ) : (
|
|
|
- <NSpace>
|
|
|
- <NSelect
|
|
|
- placeholder="选择声部"
|
|
|
- options={catchStore.getSubjectList}
|
|
|
- labelField="name"
|
|
|
- valueField="id"
|
|
|
- value={prepareStore.getSubjectId}
|
|
|
- onUpdate:value={(val: any) => {
|
|
|
- prepareStore.setSubjectId(val);
|
|
|
- getList();
|
|
|
- }}
|
|
|
- />
|
|
|
<NButton
|
|
|
type="default"
|
|
|
onClick={() => {
|
|
|
- forms.drag = true;
|
|
|
- prepareStore.setIsEditResource(true);
|
|
|
+ if (forms.isEdit) {
|
|
|
+ forms.subjectSyncVisiable = true;
|
|
|
+ } else {
|
|
|
+ forms.removeVisiable = true;
|
|
|
+ }
|
|
|
}}>
|
|
|
- 编辑
|
|
|
+ 完成编辑
|
|
|
</NButton>
|
|
|
</NSpace>
|
|
|
)}
|
|
|
-
|
|
|
- <NSpace>
|
|
|
- <NButton type="default" onClick={onPreviewAttend}>
|
|
|
- 预览
|
|
|
- </NButton>
|
|
|
- <NButton
|
|
|
- {...{ id: 'lessons-3' }}
|
|
|
- type="primary"
|
|
|
- onClick={() => {
|
|
|
- let count = 0;
|
|
|
- forms.coursewareList.forEach((item: any) => {
|
|
|
- if (!item.removeFlag) {
|
|
|
- count++;
|
|
|
- }
|
|
|
- });
|
|
|
- if (count <= 0) {
|
|
|
- message.error('课件不能为空');
|
|
|
- return;
|
|
|
- }
|
|
|
- forms.showAttendClass = true;
|
|
|
- }}>
|
|
|
- 开始上课
|
|
|
- </NButton>
|
|
|
- </NSpace>
|
|
|
</div>
|
|
|
|
|
|
- <NScrollbar class={styles.listContainer} {...{ id: 'lessons-2' }}>
|
|
|
+ <NScrollbar
|
|
|
+ class={[
|
|
|
+ styles.listContainer,
|
|
|
+ forms.drag ? styles.listContainerDrag : ''
|
|
|
+ ]}
|
|
|
+ {...{ id: 'lessons-2' }}>
|
|
|
<NSpin show={forms.loadingStatus}>
|
|
|
<div
|
|
|
class={[
|
|
@@ -399,7 +482,7 @@ export default defineComponent({
|
|
|
</Draggable>
|
|
|
) : (
|
|
|
<div class={styles.list}>
|
|
|
- {forms.coursewareList.map((item: any, index: number) => (
|
|
|
+ {forms.coursewareList.map((item: any) => (
|
|
|
<CardType
|
|
|
class={[styles.itemContent, 'handle']}
|
|
|
isShowCollect={false}
|
|
@@ -426,6 +509,77 @@ export default defineComponent({
|
|
|
</NSpin>
|
|
|
</NScrollbar>
|
|
|
|
|
|
+ {!forms.drag ? (
|
|
|
+ <div class={styles.btnGroup} style={{ justifyContent: 'flex-end' }}>
|
|
|
+ <NSpace justify="end">
|
|
|
+ <NButton type="primary" onClick={onPreviewAttend}>
|
|
|
+ 预览课件
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ {...{ id: 'lessons-3' }}
|
|
|
+ type="error"
|
|
|
+ class={styles.btnClassStart}
|
|
|
+ onClick={async () => {
|
|
|
+ let count = 0;
|
|
|
+ forms.coursewareList.forEach((item: any) => {
|
|
|
+ if (!item.removeFlag) {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (count <= 0) {
|
|
|
+ message.error('课件不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (forms.classGroupId) {
|
|
|
+ // 开始上课
|
|
|
+ const res = await courseScheduleStart({
|
|
|
+ lessonCoursewareKnowledgeDetailId: prepareStore.selectKey,
|
|
|
+ classGroupId: forms.classGroupId
|
|
|
+ });
|
|
|
+ if (
|
|
|
+ window.matchMedia('(display-mode: standalone)').matches
|
|
|
+ ) {
|
|
|
+ state.application = window.matchMedia(
|
|
|
+ '(display-mode: standalone)'
|
|
|
+ ).matches;
|
|
|
+ forms.previewModal = true;
|
|
|
+ fscreen();
|
|
|
+ forms.previewParams = {
|
|
|
+ type: 'class',
|
|
|
+ classGroupId: forms.classGroupId,
|
|
|
+ subjectId: prepareStore.getSubjectId,
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ classId: res.data,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ const { href } = router.resolve({
|
|
|
+ path: '/attend-class',
|
|
|
+ query: {
|
|
|
+ type: 'class',
|
|
|
+ classGroupId: forms.classGroupId,
|
|
|
+ subjectId: prepareStore.getSubjectId,
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ classId: res.data,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.open(href, +new Date() + '');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ forms.showAttendClass = true;
|
|
|
+ forms.attendClassType = 'change';
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ 开始上课
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
<NModal
|
|
|
v-model:show={forms.showAttendClass}
|
|
|
preset="card"
|
|
@@ -435,9 +589,12 @@ export default defineComponent({
|
|
|
blockScroll={false}>
|
|
|
<AttendClass
|
|
|
onClose={() => (forms.showAttendClass = false)}
|
|
|
+ type={forms.attendClassType}
|
|
|
onPreview={(item: any) => {
|
|
|
if (window.matchMedia('(display-mode: standalone)').matches) {
|
|
|
- state.application = window.matchMedia('(display-mode: standalone)').matches
|
|
|
+ state.application = window.matchMedia(
|
|
|
+ '(display-mode: standalone)'
|
|
|
+ ).matches;
|
|
|
forms.previewModal = true;
|
|
|
forms.previewParams = {
|
|
|
...item
|
|
@@ -452,6 +609,57 @@ export default defineComponent({
|
|
|
window.open(href, +new Date() + '');
|
|
|
}
|
|
|
}}
|
|
|
+ onConfirm={async (item: any) => {
|
|
|
+ if (forms.classGroupId) {
|
|
|
+ forms.className = item.name;
|
|
|
+ forms.classGroupId = item.classGroupId;
|
|
|
+ forms.subjectId = item.subjectId;
|
|
|
+ forms.showAttendClass = false;
|
|
|
+
|
|
|
+ checkSubjectIds();
|
|
|
+ // 声部切换时
|
|
|
+ eventGlobal.emit('onChangeClass', {
|
|
|
+ lastUseCoursewareId: item.lastUseCoursewareId,
|
|
|
+ unit: item.unit
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const res = await courseScheduleStart({
|
|
|
+ lessonCoursewareKnowledgeDetailId: prepareStore.selectKey,
|
|
|
+ classGroupId: item.classGroupId
|
|
|
+ });
|
|
|
+ forms.showAttendClass = false;
|
|
|
+ if (window.matchMedia('(display-mode: standalone)').matches) {
|
|
|
+ state.application = window.matchMedia(
|
|
|
+ '(display-mode: standalone)'
|
|
|
+ ).matches;
|
|
|
+ forms.previewModal = true;
|
|
|
+ forms.previewParams = {
|
|
|
+ type: 'class',
|
|
|
+ classId: res.data, // 上课编号
|
|
|
+ classGroupId: item.classGroupId,
|
|
|
+ subjectId: prepareStore.getSubjectId,
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
+ };
|
|
|
+ setTimeout(() => {
|
|
|
+ fscreen();
|
|
|
+ }, 200);
|
|
|
+ } else {
|
|
|
+ const { href } = router.resolve({
|
|
|
+ path: '/attend-class',
|
|
|
+ query: {
|
|
|
+ type: 'class',
|
|
|
+ classId: res.data, // 上课编号
|
|
|
+ classGroupId: item.classGroupId,
|
|
|
+ subjectId: prepareStore.getSubjectId,
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.open(href, +new Date() + '');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }}
|
|
|
/>
|
|
|
</NModal>
|
|
|
|
|
@@ -498,6 +706,7 @@ export default defineComponent({
|
|
|
});
|
|
|
forms.coursewareList = [];
|
|
|
forms.removeVisiable1 = false;
|
|
|
+ forms.isEdit = true;
|
|
|
// prepareStore.setCoursewareList([]);
|
|
|
|
|
|
console.log(prepareStore.getCoursewareList, 'getCourseware1');
|
|
@@ -516,6 +725,28 @@ export default defineComponent({
|
|
|
type="attend"
|
|
|
params={forms.previewParams}
|
|
|
/>
|
|
|
+
|
|
|
+ {/* 完成编辑时,选择声部 */}
|
|
|
+ <NModal
|
|
|
+ v-model:show={forms.subjectSyncVisiable}
|
|
|
+ preset="card"
|
|
|
+ class={['modalTitle background', styles.subjectSyncModal]}
|
|
|
+ title={'同步声部'}>
|
|
|
+ <SubjectSync
|
|
|
+ subjectId={prepareStore.getSubjectId as any}
|
|
|
+ onClose={() => (forms.subjectSyncVisiable = false)}
|
|
|
+ onConfirm={async (subjectIds: any) => {
|
|
|
+ //
|
|
|
+ try {
|
|
|
+ forms.editSubjectIds = subjectIds.join(',');
|
|
|
+ await onOverEdit();
|
|
|
+ forms.subjectSyncVisiable = false;
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </NModal>
|
|
|
</div>
|
|
|
);
|
|
|
}
|