|
@@ -47,7 +47,7 @@ export default defineComponent({
|
|
|
coursewareList: [] as any,
|
|
|
loadingStatus: false,
|
|
|
showAttendClass: false,
|
|
|
- attendClassType: 'select', //
|
|
|
+ attendClassType: 'change', //
|
|
|
removeIds: [] as any, // 临时删除的编号
|
|
|
drag: false,
|
|
|
isEdit: false, // 是否更新数据
|
|
@@ -503,7 +503,7 @@ export default defineComponent({
|
|
|
</NButton>
|
|
|
<NButton
|
|
|
{...{ id: 'lessons-3' }}
|
|
|
- type="primary"
|
|
|
+ type="error"
|
|
|
class={styles.btnClassStart}
|
|
|
onClick={async () => {
|
|
|
let count = 0;
|
|
@@ -555,7 +555,7 @@ export default defineComponent({
|
|
|
}
|
|
|
} else {
|
|
|
forms.showAttendClass = true;
|
|
|
- forms.attendClassType = 'select';
|
|
|
+ forms.attendClassType = 'change';
|
|
|
}
|
|
|
}}>
|
|
|
开始上课
|
|
@@ -595,19 +595,55 @@ export default defineComponent({
|
|
|
window.open(href, +new Date() + '');
|
|
|
}
|
|
|
}}
|
|
|
- onConfirm={(item: any) => {
|
|
|
- console.log(item, 'confirm');
|
|
|
- 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
|
|
|
- });
|
|
|
+ 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
|
|
|
+ });
|
|
|
+ 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.id,
|
|
|
+ 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.id,
|
|
|
+ subjectId: prepareStore.getSubjectId,
|
|
|
+ detailId: prepareStore.getSelectKey,
|
|
|
+ lessonCourseId: prepareStore.getBaseCourseware.id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.open(href, +new Date() + '');
|
|
|
+ }
|
|
|
+ }
|
|
|
}}
|
|
|
/>
|
|
|
</NModal>
|