|
@@ -317,37 +317,7 @@ export default defineComponent({
|
|
|
<div class={styles.btnGroup}>
|
|
|
{forms.drag ? (
|
|
|
<NSpace>
|
|
|
- <NButton
|
|
|
- type="default"
|
|
|
- onClick={() => {
|
|
|
- if (forms.isEdit) {
|
|
|
- forms.subjectSyncVisiable = true;
|
|
|
- } else {
|
|
|
- forms.removeVisiable = true;
|
|
|
- }
|
|
|
- }}>
|
|
|
- 完成编辑
|
|
|
- </NButton>
|
|
|
- <NButton
|
|
|
- type="error"
|
|
|
- onClick={() => {
|
|
|
- forms.drag = false;
|
|
|
- forms.isEdit = false;
|
|
|
- prepareStore.setIsEditResource(false);
|
|
|
- forms.removeIds = [];
|
|
|
- getList();
|
|
|
- }}>
|
|
|
- 取消编辑
|
|
|
- </NButton>
|
|
|
- <NButton
|
|
|
- type="error"
|
|
|
- onClick={() => {
|
|
|
- forms.removeVisiable1 = true;
|
|
|
- forms.isEdit = true;
|
|
|
- }}>
|
|
|
- 清空资源
|
|
|
- </NButton>
|
|
|
- <span class={styles.tips}>拖动可将资源进行排序</span>
|
|
|
+ <span class={styles.tips}>拖动可将资源进行排序哦~</span>
|
|
|
</NSpace>
|
|
|
) : (
|
|
|
<NSpace>
|
|
@@ -390,7 +360,7 @@ export default defineComponent({
|
|
|
)}
|
|
|
|
|
|
{/* 编辑 */}
|
|
|
- {!forms.drag && (
|
|
|
+ {!forms.drag ? (
|
|
|
<NSpace>
|
|
|
<NButton
|
|
|
type="default"
|
|
@@ -403,10 +373,48 @@ export default defineComponent({
|
|
|
编辑
|
|
|
</NButton>
|
|
|
</NSpace>
|
|
|
+ ) : (
|
|
|
+ <NSpace>
|
|
|
+ <NButton
|
|
|
+ type="error"
|
|
|
+ onClick={() => {
|
|
|
+ forms.removeVisiable1 = true;
|
|
|
+ forms.isEdit = true;
|
|
|
+ }}>
|
|
|
+ 清空资源
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ type="error"
|
|
|
+ onClick={() => {
|
|
|
+ forms.drag = false;
|
|
|
+ forms.isEdit = false;
|
|
|
+ prepareStore.setIsEditResource(false);
|
|
|
+ forms.removeIds = [];
|
|
|
+ getList();
|
|
|
+ }}>
|
|
|
+ 取消编辑
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ type="default"
|
|
|
+ onClick={() => {
|
|
|
+ if (forms.isEdit) {
|
|
|
+ forms.subjectSyncVisiable = true;
|
|
|
+ } else {
|
|
|
+ forms.removeVisiable = 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={[
|
|
@@ -487,70 +495,76 @@ export default defineComponent({
|
|
|
</NSpin>
|
|
|
</NScrollbar>
|
|
|
|
|
|
- <div class={styles.btnGroup} style={{ justifyContent: 'flex-end' }}>
|
|
|
- <NSpace justify="end">
|
|
|
- <NButton type="primary" onClick={onPreviewAttend}>
|
|
|
- 预览课件
|
|
|
- </NButton>
|
|
|
- <NButton
|
|
|
- {...{ id: 'lessons-3' }}
|
|
|
- type="primary"
|
|
|
- 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
|
|
|
+ {!forms.drag ? (
|
|
|
+ <div class={styles.btnGroup} style={{ justifyContent: 'flex-end' }}>
|
|
|
+ <NSpace justify="end">
|
|
|
+ <NButton type="primary" onClick={onPreviewAttend}>
|
|
|
+ 预览课件
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ {...{ id: 'lessons-3' }}
|
|
|
+ type="primary"
|
|
|
+ class={styles.btnClassStart}
|
|
|
+ onClick={async () => {
|
|
|
+ let count = 0;
|
|
|
+ forms.coursewareList.forEach((item: any) => {
|
|
|
+ if (!item.removeFlag) {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
});
|
|
|
- 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: {
|
|
|
+ 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
|
|
|
- }
|
|
|
- });
|
|
|
- window.open(href, +new Date() + '');
|
|
|
+ };
|
|
|
+ } 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 = 'select';
|
|
|
}
|
|
|
- } else {
|
|
|
- forms.showAttendClass = true;
|
|
|
- forms.attendClassType = 'select';
|
|
|
- }
|
|
|
- }}>
|
|
|
- 开始上课
|
|
|
- </NButton>
|
|
|
- </NSpace>
|
|
|
- </div>
|
|
|
+ }}>
|
|
|
+ 开始上课
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
|
|
|
<NModal
|
|
|
v-model:show={forms.showAttendClass}
|