lex 1 anno fa
parent
commit
5f5386d044

BIN
src/components/layout/images/icon_1_1.png


BIN
src/components/layout/images/icon_1_2.png


BIN
src/components/layout/images/palyIcon.png


BIN
src/components/layout/images/palyNormal.png


+ 1 - 0
src/views/attend-class/index.tsx

@@ -1739,6 +1739,7 @@ export default defineComponent({
             detailId={data.detailId}
             subjectId={data.subjectId}
             courseScheduleId={data.classId}
+            activeName={activeName.value}
             classGroupId={data.classGroupId}
             onClose={() => (data.modelTrainStatus = false)}
           />

+ 17 - 6
src/views/attend-class/model/class-work/index.tsx

@@ -23,6 +23,7 @@ import Train from '/src/views/prepare-lessons/components/lesson-main/train';
 import ResourceMain from '/src/views/prepare-lessons/components/resource-main';
 import dayjs from 'dayjs';
 import { useResizeObserver } from '@vueuse/core';
+import TheEmpty from '/src/components/TheEmpty';
 
 export default defineComponent({
   name: 'class-work',
@@ -46,6 +47,10 @@ export default defineComponent({
     courseScheduleId: {
       type: String,
       default: ''
+    },
+    activeName: {
+      type: String,
+      default: ''
     }
   },
   emits: ['close'],
@@ -87,13 +92,13 @@ export default defineComponent({
           lessonPreTrainingDetails.forEach((child: any) => {
             if (child.trainingType === 'PRACTICE' && child.musicName) {
               tList.pTitle += tList.pTitle
-                ? '、' + child.musicName
-                : child.musicName;
+                ? '、' + child.musicName + '》'
+                : '练习曲目《' + child.musicName + '》';
             }
             if (child.trainingType === 'EVALUATION' && child.musicName) {
               tList.eTitle += tList.eTitle
-                ? '、' + child.musicName
-                : child.musicName;
+                ? '、' + child.musicName + '》'
+                : '评测曲目《' + child.musicName + '》';
             }
           });
 
@@ -181,7 +186,7 @@ export default defineComponent({
 
         <NScrollbar style={{ height: '60vh' }} class={[styles.listContainer]}>
           <NSpin show={forms.loadingStatus}>
-            <div class={styles.listSection} style={{ minHeight: '60vh' }}>
+            <div class={styles.listSection} style={{ minHeight: '55vh' }}>
               <NSpace vertical>
                 {forms.tableList.map((item: any) => (
                   <WorkSection
@@ -213,6 +218,10 @@ export default defineComponent({
                   />
                 ))}
               </NSpace>
+
+              {!forms.loadingStatus && forms.tableList.length <= 0 && (
+                <TheEmpty description="暂无作业" />
+              )}
             </div>
           </NSpin>
         </NScrollbar>
@@ -277,7 +286,9 @@ export default defineComponent({
                 classGroupId={props.classGroupId}
                 courseScheduleId={props.courseScheduleId}
                 lessonPreTraining={{
-                  title: dayjs().format('YYYY年MM月DD日') + '-课堂作业',
+                  title:
+                    (props.activeName || dayjs().format('YYYY年MM月DD日')) +
+                    '-课堂作业',
                   id: forms.selectItem.id
                 }}
                 // cardType={'homeworkRecord'}

+ 4 - 4
src/views/attend-class/model/train-type/index.module.less

@@ -215,7 +215,7 @@
 }
 
 .trainInfo {
-  max-width: 55%;
+  max-width: 60%;
 
   .trainName {
     display: flex;
@@ -232,11 +232,11 @@
     display: inline-block;
     background-color: #ccc;
     border-radius: 5px;
-    font-size: max(12px, 12Px);
+    font-size: max(12px, 11Px);
     font-weight: 600;
     color: #FFFFFF;
-    height: 20Px;
-    line-height: 20Px;
+    height: 18Px;
+    line-height: 18Px;
     margin-right: 7px;
     flex-shrink: 0;
   }

+ 2 - 1
src/views/attend-class/model/train-type/index.tsx

@@ -285,7 +285,8 @@ export default defineComponent({
                 onClick={(e: MouseEvent) => {
                   e.stopPropagation();
                   // onDelete();
-                  removeVisiable.value = true;
+                  // removeVisiable.value = true;
+                  emit('delete', props.item);
                 }}>
                 <NTooltip showArrow={false}>
                   {{

+ 2 - 2
src/views/homework-record/detail/index.tsx

@@ -42,7 +42,7 @@ export default defineComponent({
     const TrainingDetailsRef = ref();
     const routerList = ref([
       { name: '作业记录', path: '/homework-record' },
-      { name: route.query.name, path: '/classDetail' }
+      { name: route.query.name, path: '/homework-record-detail' }
     ] as any);
 
     const search = () => {
@@ -352,7 +352,7 @@ export default defineComponent({
               v-model:pageSize={state.pagination.rows}
               v-model:pageTotal={state.pagination.pageTotal}
               onList={getList}
-              sync
+              // sync
             />
           </div>
         </div>

+ 15 - 5
src/views/prepare-lessons/components/lesson-main/train-presets/index.tsx

@@ -22,6 +22,7 @@ import {
 } from '../../../api';
 import { storeToRefs } from 'pinia';
 import AssignHomework from '../train/assign-homework';
+import TheEmpty from '/src/components/TheEmpty';
 
 export default defineComponent({
   name: 'train-presets',
@@ -66,13 +67,13 @@ export default defineComponent({
           lessonPreTrainingDetails.forEach((child: any) => {
             if (child.trainingType === 'PRACTICE' && child.musicName) {
               tList.pTitle += tList.pTitle
-                ? '、' + child.musicName
-                : child.musicName;
+                ? '、' + child.musicName + '》'
+                : '练习曲目《' + child.musicName + '》';
             }
             if (child.trainingType === 'EVALUATION' && child.musicName) {
               tList.eTitle += tList.eTitle
-                ? '、' + child.musicName
-                : child.musicName;
+                ? '、' + child.musicName + '》'
+                : '评测曲目《' + child.musicName + '》';
             }
           });
 
@@ -166,7 +167,13 @@ export default defineComponent({
 
         <NScrollbar class={[styles.listContainer]}>
           <NSpin show={forms.loadingStatus}>
-            <div class={styles.listSection}>
+            <div
+              class={[
+                styles.listSection,
+                !forms.loadingStatus && forms.tableList.length <= 0
+                  ? styles.emptySection
+                  : ''
+              ]}>
               <div class={[styles.list]}>
                 {forms.tableList.map((item: any) => (
                   <WorkSection
@@ -213,6 +220,9 @@ export default defineComponent({
                   />
                 ))}
               </div>
+              {!forms.loadingStatus && forms.tableList.length <= 0 && (
+                <TheEmpty description="暂无作业" />
+              )}
             </div>
           </NSpin>
         </NScrollbar>

+ 3 - 19
src/views/prepare-lessons/components/resource-main/components/select-music/index.tsx

@@ -104,25 +104,9 @@ export default defineComponent({
         const tempRows = data.rows || [];
         const temp: any = [];
 
-        // tempRows.forEach((row: any) => {
-        //   const index = prepareStore.getTrainList.findIndex(
-        //     (course: any) => course.musicId === row.id
-        //   );
-        //   temp.push({
-        //     id: row.id,
-        //     coverImg: row.musicSvg,
-        //     type: 'MUSIC',
-        //     title: row.musicSheetName,
-        //     isCollect: false,
-        //     isSelected: true,
-        //     content: row.id,
-        //     xmlFileUrl: row.xmlFileUrl,
-        //     exist: index !== -1 ? true : false // 是否存在
-        //   });
-        // });
         tempRows.forEach((row: any) => {
-          const index = prepareStore.getCoursewareList.findIndex(
-            (course: any) => course.materialId === row.id
+          const index = prepareStore.getTrainList.findIndex(
+            (course: any) => course.musicId === row.id
           );
           temp.push({
             id: row.id,
@@ -213,7 +197,6 @@ export default defineComponent({
       getList();
 
       eventGlobal.on('onTrainDragItem', (item: any, point?: any) => {
-        console.log('onTrainDragItem', Date.now());
         onAdd(item);
       });
     });
@@ -296,6 +279,7 @@ export default defineComponent({
                 typeList: tList
               };
 
+              console.log(train, '111');
               eventGlobal.emit('onTrainAddItem', train);
             }}
           />

+ 12 - 0
src/views/prepare-lessons/model/select-music/select-item/index.tsx

@@ -9,6 +9,16 @@ import { usePrepareStore } from '/src/store/modules/prepareLessons';
 import { musicSheetPage } from '../../../api';
 import CardPreview from '/src/components/card-preview';
 
+const formatType = (type: string) => {
+  if (type === 'shareResources') {
+    return 2;
+  } else if (type === 'myResources') {
+    return 3;
+  } else if (type === 'myCollect') {
+    return 4;
+  }
+};
+
 export default defineComponent({
   name: 'select-music',
   props: {
@@ -30,7 +40,9 @@ export default defineComponent({
       },
       searchGroup: {
         name: '',
+        type: 'MUSIC', //
         musicSheetCategoriesId: '',
+        sourceType: formatType(props.type),
         status: 1,
         versionFlag: false,
         subjectId: null

+ 2 - 1
src/views/prepare-lessons/model/work-section/index.module.less

@@ -32,7 +32,7 @@
     align-items: center;
 
     span {
-      max-width: 200px;
+      max-width: 300px;
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
@@ -40,6 +40,7 @@
   }
 
   .iconEdit {
+    cursor: pointer;
     display: inline-block;
     margin-left: 8px;
     width: 18px;

+ 6 - 1
src/views/studentList/modals/comment-work/index.tsx

@@ -146,7 +146,12 @@ export default defineComponent({
             </div>
 
             <NSpace class={styles.btnGroupModal} justify="center">
-              <NButton round onClick={() => (state.removeVisiable1 = false)}>
+              <NButton
+                round
+                onClick={() => {
+                  state.removeVisiable1 = false;
+                  state.commentRemind = true;
+                }}>
                 取消
               </NButton>
               <NButton round type="primary" onClick={onSure}>