lex 1 rok pred
rodič
commit
d11218f47a
26 zmenil súbory, kde vykonal 256 pridanie a 78 odobranie
  1. 25 0
      src/components/TheMessageDialog/index.module.less
  2. 43 0
      src/components/TheMessageDialog/index.tsx
  3. 2 2
      src/components/card-type/index.module.less
  4. 11 7
      src/styles/index.less
  5. 0 1
      src/views/attend-class/component/audio-pay.tsx
  6. 5 0
      src/views/attend-class/component/video-play.tsx
  7. 5 20
      src/views/attend-class/index.tsx
  8. 6 1
      src/views/attend-class/model/class-work/index.module.less
  9. 9 1
      src/views/attend-class/model/class-work/index.tsx
  10. 18 5
      src/views/classList/index.module.less
  11. 1 1
      src/views/classList/index.tsx
  12. 4 2
      src/views/homework-record/detail/index.module.less
  13. 17 2
      src/views/homework-record/detail/index.tsx
  14. 2 4
      src/views/homework-record/index.module.less
  15. 2 2
      src/views/homework-record/index.tsx
  16. 1 1
      src/views/prepare-lessons/components/lesson-main/courseware/index.module.less
  17. 1 1
      src/views/prepare-lessons/components/lesson-main/train-presets/index.module.less
  18. 10 10
      src/views/prepare-lessons/components/lesson-main/train/assign-homework.tsx
  19. 6 0
      src/views/prepare-lessons/components/lesson-main/train/assign-student/index.module.less
  20. 2 3
      src/views/prepare-lessons/components/lesson-main/train/assign-student/index.tsx
  21. 6 2
      src/views/prepare-lessons/components/lesson-main/train/index.module.less
  22. 22 3
      src/views/prepare-lessons/components/lesson-main/train/index.tsx
  23. 21 6
      src/views/prepare-lessons/components/resource-main/components/select-music/index.tsx
  24. 24 2
      src/views/prepare-lessons/model/select-music/select-item/index.tsx
  25. 11 0
      src/views/studentList/modals/comment-work/index.module.less
  26. 2 2
      src/views/studentList/modals/comment-work/index.tsx

+ 25 - 0
src/components/TheMessageDialog/index.module.less

@@ -0,0 +1,25 @@
+.studentRemove {
+  padding: 20px 40px 0;
+
+  p {
+    font-size: max(18px, 14Px);
+    color: #777777;
+    line-height: 30px;
+    text-align: center;
+
+    span {
+      color: #EA4132;
+    }
+  }
+}
+
+.btnGroupModal {
+  padding: 32px 0;
+
+  :global {
+    .n-button {
+      height: 47px;
+      min-width: 156px;
+    }
+  }
+}

+ 43 - 0
src/components/TheMessageDialog/index.tsx

@@ -0,0 +1,43 @@
+import { NButton, NSpace } from 'naive-ui';
+import { PropType, defineComponent } from 'vue';
+import styles from './index.module.less';
+
+export default defineComponent({
+  name: 'the-message-dialog',
+  props: {
+    cancelButtonText: {
+      type: String,
+      default: '取消'
+    },
+    confirmButtonText: {
+      type: String,
+      default: '确定'
+    },
+    content: {
+      type: String,
+      default: ''
+    }
+  },
+  emits: ['close', 'confirm'],
+  setup(props, { emit }) {
+    return () => (
+      <div class={styles.studentRemove}>
+        <p v-html={props.content}></p>
+
+        <NSpace class={styles.btnGroupModal} justify="center">
+          <NButton round onClick={() => emit('close')}>
+            {props.cancelButtonText}
+          </NButton>
+          <NButton
+            round
+            type="primary"
+            onClick={() => {
+              emit('confirm');
+            }}>
+            {props.confirmButtonText}
+          </NButton>
+        </NSpace>
+      </div>
+    );
+  }
+});

+ 2 - 2
src/components/card-type/index.module.less

@@ -1,9 +1,9 @@
 :global {
   .n-card--bordered {
-    border: 2px solid rgba(202, 228, 244, 1) !important;
+    border: 1Px solid rgba(202, 228, 244, 1) !important;
 
     &:hover {
-      border: 2px solid rgba(0, 122, 254, 1) !important;
+      border: 1Px solid rgba(0, 122, 254, 1) !important;
     }
   }
 }

+ 11 - 7
src/styles/index.less

@@ -407,12 +407,16 @@ body {
   font-size: max(15px, 13Px);
 }
 
-.n-date-panel-actions__suffix {
-  .n-button {
-    font-size: 12Px;
-    height: 32px !important;
-    line-height: 32px;
-    padding: 0 13px !important;
-    border-radius: 6px;
+.n-date-panel {
+
+  .n-date-panel-actions__suffix,
+  .n-time-picker-panel {
+    .n-button {
+      font-size: 12Px;
+      height: 32px !important;
+      line-height: 32px;
+      padding: 0 13px !important;
+      border-radius: 6px;
+    }
   }
 }

+ 0 - 1
src/views/attend-class/component/audio-pay.tsx

@@ -38,7 +38,6 @@ export default defineComponent({
 
     // 切换音频播放
     const onToggleAudio = (e?: any) => {
-      console.log(e, 'e', e);
       e?.stopPropagation();
       if (audio.value.paused) {
         onInit(audio.value, canvas.value);

+ 5 - 0
src/views/attend-class/component/video-play.tsx

@@ -177,6 +177,10 @@ export default defineComponent({
       videoItem.value.pause();
     };
 
+    const pause = () => {
+      videoItem.value.pause();
+    };
+
     onUnmounted(() => {
       if (videoItem.value) {
         videoItem.value.pause();
@@ -205,6 +209,7 @@ export default defineComponent({
     expose({
       onPlay,
       stop,
+      pause,
       // changePlayBtn,
       toggleHideControl
     });

+ 5 - 20
src/views/attend-class/index.tsx

@@ -411,20 +411,19 @@ export default defineComponent({
     });
 
     /**停止所有的播放 */
-    const handleStop = () => {
+    const handleStop = (isStop = true) => {
       for (let i = 0; i < data.itemList.length; i++) {
         const activeItem = data.itemList[i];
-        console.log(activeItem.videoEle, ' activeItem.videoEle');
         if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
-          console.log(activeItem.videoEle, ' activeItem.videoEle');
           try {
-            activeItem.videoEle?.currentTime(0);
+            if (isStop) {
+              activeItem.videoEle?.currentTime(0);
+            }
             activeItem.videoEle?.pause();
           } catch (e: any) {
             // console.log(e, 'e');
           }
         }
-
         if (activeItem.type === 'SONG' && activeItem.audioEle) {
           activeItem.audioEle?.stop();
         }
@@ -934,20 +933,6 @@ export default defineComponent({
 
     /** 打开教学工具 */
     const openStudyTool = (item: ToolItem) => {
-      // const activeItem = data.itemList[popupData.activeIndex];
-      // // 暂停视频和曲谱的播放
-      // if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
-      //   activeItem.videoEle?.pause();
-      // }
-      // if (activeItem.type === 'SONG' && activeItem.audioEle) {
-      //   activeItem.audioEle?.stop();
-      // }
-      // if (activeItem.type === 'MUSIC') {
-      //   activeItem.iframeRef?.contentWindow?.postMessage(
-      //     { api: 'setPlayState' },
-      //     '*'
-      //   );
-      // }
       handleStop();
       clearModel();
       popupData.toolOpen = false;
@@ -1279,7 +1264,7 @@ export default defineComponent({
           break;
         case 9:
           // 选择曲目时需要暂停所有播放
-          handleStop();
+          handleStop(false);
           data.selectResourceStatus = true;
           break;
         default:

+ 6 - 1
src/views/attend-class/model/class-work/index.module.less

@@ -112,7 +112,7 @@
 }
 
 .assignHomework {
-  width: 720px;
+  width: 660px;
 }
 
 .listContainer {
@@ -123,6 +123,11 @@
   padding: 0 40px;
 }
 
+.listSectionEmpty {
+  display: flex;
+  align-items: center;
+}
+
 .workVisiable {
   width: 1258px;
 }

+ 9 - 1
src/views/attend-class/model/class-work/index.tsx

@@ -186,7 +186,14 @@ export default defineComponent({
 
         <NScrollbar style={{ height: '60vh' }} class={[styles.listContainer]}>
           <NSpin show={forms.loadingStatus}>
-            <div class={styles.listSection} style={{ minHeight: '55vh' }}>
+            <div
+              class={[
+                styles.listSection,
+                !forms.loadingStatus &&
+                  forms.tableList.length <= 0 &&
+                  styles.listSectionEmpty
+              ]}
+              style={{ minHeight: '55vh' }}>
               <NSpace vertical>
                 {forms.tableList.map((item: any) => (
                   <WorkSection
@@ -268,6 +275,7 @@ export default defineComponent({
           blockScroll={false}>
           <AssignHomework
             classGroupId={props.classGroupId}
+            courseScheduleId={props.courseScheduleId}
             item={forms.selectItem}
             trainList={[]}
             onClose={() => (forms.assignHomeworkStatus = false)}

+ 18 - 5
src/views/classList/index.module.less

@@ -242,6 +242,12 @@
   flex-direction: row;
   align-items: center;
 
+  .listCore {
+    .searchInput {
+      --n-border: 0 !important;
+    }
+  }
+
   .studentLeft,
   .studentRight {
     padding: 14px 16px;
@@ -256,7 +262,7 @@
       align-items: center;
       padding-bottom: 14px;
       border-bottom: 1px solid rgba(0, 0, 0, 0.06);
-      font-size: 16px;
+      font-size: max(16px, 13Px);
       font-weight: 600;
       color: #131415;
       line-height: 22px;
@@ -264,18 +270,22 @@
       span {
         color: #777;
         font-weight: 400;
-        font-size: 12px;
+        font-size: max(12px, 12Px);
       }
     }
 
     .chioseCheckBox {
-      padding: 2px 2px;
+      padding: 4px 2px;
       font-size: 16px;
       font-weight: 400;
       color: #131415;
     }
   }
 
+  .studentLeft {
+    background-color: #F5F6FA;
+  }
+
   .chioseBox {
     width: 80px;
     height: 389px;
@@ -310,7 +320,7 @@
   }
 
   .bottom {
-    padding-top: 14px;
+    padding-top: max(12px, 12Px);
     border-top: 1px solid rgba(0, 0, 0, 0.06);
   }
 }
@@ -724,7 +734,10 @@
   }
 
   .allTotal {
-    font-size: 16px;
+    display: flex;
+    align-items: center;
+    height: 100%;
+    font-size: max(16px, 13Px);
     font-weight: 400;
     color: #8b8b8b;
   }

+ 1 - 1
src/views/classList/index.tsx

@@ -543,7 +543,7 @@ export default defineComponent({
           v-model:show={state.studentVisible}
           preset="card"
           class={['modalTitle background', styles.studentVisible]}
-          title={'学调整'}>
+          title={'学调整'}>
           <RestStudentBox
             activeRow={state.activeRow}
             onClose={() => (state.studentVisible = false)}

+ 4 - 2
src/views/homework-record/detail/index.module.less

@@ -1,8 +1,9 @@
 .listWrap {
-  min-height: 100%;
+  // min-height: 100%;
   padding: 32px;
   background-color: #fff;
   border-radius: 20px;
+  min-height: calc(100vh - 7.8125vw) !important
 }
 
 .teacherSection {
@@ -18,6 +19,7 @@
   }
 
   .infos {
+    margin-top: 8px;
     padding: 13px;
     background: #FFFFFF;
     border-radius: 10px;
@@ -27,7 +29,7 @@
       font-family: PingFangSC, PingFang SC;
       font-weight: 600;
       color: #000000;
-      padding-bottom: 5px;
+      padding-bottom: 8px;
     }
 
     .homeContent {

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

@@ -82,11 +82,22 @@ export default defineComponent({
           result.studentLessonTrainingDetails.length > 0
         ) {
           result.studentLessonTrainingDetails.forEach((child: any) => {
+            // if (child.trainingType === 'PRACTICE' && child.musicName) {
+            //   pTitle += pTitle ? '、' + child.musicName : child.musicName;
+            // }
+            // if (child.trainingType === 'EVALUATION' && child.musicName) {
+            //   eTitle += eTitle ? '、' + child.musicName : child.musicName;
+            // }
+
             if (child.trainingType === 'PRACTICE' && child.musicName) {
-              pTitle += pTitle ? '、' + child.musicName : child.musicName;
+              pTitle += pTitle
+                ? '、《' + child.musicName + '》'
+                : '练习曲目《' + child.musicName + '》';
             }
             if (child.trainingType === 'EVALUATION' && child.musicName) {
-              eTitle += eTitle ? '、' + child.musicName : child.musicName;
+              eTitle += eTitle
+                ? '、《' + child.musicName + '》'
+                : '评测曲目《' + child.musicName + '》';
             }
           });
         }
@@ -237,6 +248,7 @@ export default defineComponent({
                     // percentage={20}
                     offset-degree={180}
                     type="circle"
+                    strokeWidth={6}
                     rail-color={'EDEFFA'}
                     color={'#64A5FF'}>
                     <div class={styles.contentRect}>
@@ -252,6 +264,7 @@ export default defineComponent({
                   <NProgress
                     percentage={state.workInfo.trainingRate || 0}
                     offset-degree={180}
+                    strokeWidth={6}
                     type="circle"
                     rail-color={'EDEFFA'}
                     color={'#64A5FF'}>
@@ -265,6 +278,7 @@ export default defineComponent({
                   <NProgress
                     percentage={state.workInfo.standardNum || 0}
                     offset-degree={180}
+                    strokeWidth={6}
                     type="circle"
                     rail-color={'EDEFFA'}
                     color={'#40CEAE'}>
@@ -279,6 +293,7 @@ export default defineComponent({
                   <NProgress
                     percentage={state.workInfo.qualifiedRate || 0}
                     offset-degree={180}
+                    strokeWidth={6}
                     type="circle"
                     rail-color={'EDEFFA'}
                     color={'#40CEAE'}>

+ 2 - 4
src/views/homework-record/index.module.less

@@ -250,8 +250,6 @@
         white-space: nowrap;
         overflow: hidden;
         text-overflow: ellipsis;
-
-
       }
 
       .p1::before,
@@ -267,8 +265,8 @@
         transform: translateY(-3px);
       }
 
-      .p2 {
-        padding-top: 6px;
+      .p1 {
+        padding-bottom: 6px;
       }
 
       .p2::before {

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

@@ -379,8 +379,8 @@ export default defineComponent({
                         <p>
                           布置时间:
                           {dayjs(item.createTime).format('YYYY-MM-DD')}
-                          <span>|</span>
-                          <span>
+                          <span> | </span>
+                          <span style={{ color: '#EA4132' }}>
                             截止时间:
                             {dayjs(item.expireDate).format('YYYY-MM-DD')}
                           </span>

+ 1 - 1
src/views/prepare-lessons/components/lesson-main/courseware/index.module.less

@@ -359,7 +359,7 @@
   background: #F9FAFD;
   display: inline-flex;
   transition: all .3s ease-in-out;
-  border: 2px solid rgba(209, 216, 235, 1) !important;
+  border: 1Px solid rgba(209, 216, 235, 1) !important;
   cursor: pointer;
   display: flex;
   align-items: center;

+ 1 - 1
src/views/prepare-lessons/components/lesson-main/train-presets/index.module.less

@@ -156,5 +156,5 @@
 }
 
 .assignHomework {
-  width: 720px;
+  width: 660px;
 }

+ 10 - 10
src/views/prepare-lessons/components/lesson-main/train/assign-homework.tsx

@@ -63,7 +63,7 @@ export default defineComponent({
       gradeList: [] as any,
       classList: [] as any,
       currentGradeNum: null,
-      expireDate: dayjs().add(7, 'day').format('YYYY-MM-DD') as any, // 默认7天
+      expireDate: dayjs().add(7, 'day').format('YYYY-MM-DD HH:mm') as any, // 默认7天
       classGroupId: null as any,
       studentList: [] as any,
       selectIds: [] as any
@@ -145,14 +145,13 @@ export default defineComponent({
             homeworkObj: forms.homeworkObj,
             homeworkType: forms.homeworkType,
             lessonTrainingDetails: details,
-            expireDate: forms.expireDate + ' 23:59:59',
+            expireDate: dayjs(forms.expireDate).format('YYYY-MM-DD HH:mm:ss'),
             classGroupId: forms.classGroupId
               ? forms.classGroupId.join(',')
               : null,
             studentIds: null as any,
             courseScheduleId: forms.courseScheduleId
           };
-
           if (forms.homeworkObj === 'PERSON') {
             params.classGroupId = '';
             const ids: any[] = [];
@@ -321,16 +320,17 @@ export default defineComponent({
           )}
 
           <NFormItem
-            label="截止日期"
+            label="截止时间"
             path="expireDate"
             rule={[
-              { required: true, message: '请选择截止日期', trigger: 'change' }
+              { required: true, message: '请选择截止时间', trigger: 'change' }
             ]}>
             <NDatePicker
               v-model:formatted-value={forms.expireDate}
-              type="date"
+              type="datetime"
               clearable
-              valueFormat="yyyy-MM-dd"
+              // valueFormat="yyyy-MM-dd HH:mm"
+              format="yyyy-MM-dd HH:mm"
               style={{ width: '100%' }}
               isDateDisabled={(ts: number) => {
                 return ts < forms.currentTime;
@@ -340,7 +340,7 @@ export default defineComponent({
 
           <NSpace class={styles.updateBtnGroup}>
             <NButton strong type="default" round onClick={() => emit('close')}>
-              取消
+              取消布置
             </NButton>
             <NButton
               strong
@@ -349,7 +349,7 @@ export default defineComponent({
               disabled={forms.uploading}
               loading={forms.uploading}
               onClick={onSubmit}>
-              确认
+              确认布置
             </NButton>
           </NSpace>
         </NForm>
@@ -359,7 +359,7 @@ export default defineComponent({
           preset="card"
           showIcon={false}
           class={['modalTitle background']}
-          title={'布置作业'}
+          title={'选择学生'}
           style={{ width: '640px' }}
           blockScroll={false}>
           <AssignStudent

+ 6 - 0
src/views/prepare-lessons/components/lesson-main/train/assign-student/index.module.less

@@ -62,6 +62,12 @@
     display: flex;
     align-items: center;
 
+    :global {
+      .n-checkbox__label {
+        padding: 0;
+      }
+    }
+
     &:hover {
       background: #F5F6FA;
     }

+ 2 - 3
src/views/prepare-lessons/components/lesson-main/train/assign-student/index.tsx

@@ -267,8 +267,7 @@ export default defineComponent({
                 v-model:value={state.checkboxIds}
                 onUpdate:value={onCheckStudents}>
                 {state.tableList.map((item: any) => (
-                  <div class={[styles.studentItem]}>
-                    <NCheckbox value={item.id}></NCheckbox>
+                  <NCheckbox value={item.id} class={[styles.studentItem]}>
                     <div class={styles.studentInfo}>
                       <NAvatar
                         src={item.avatar || defultHeade}
@@ -287,7 +286,7 @@ export default defineComponent({
                         <div class={styles.phone}>{item.phone}</div>
                       </div>
                     </div>
-                  </div>
+                  </NCheckbox>
                 ))}
               </NCheckboxGroup>
               {state.tableList.length <= 0 && !state.loading && <TheEmpty />}

+ 6 - 2
src/views/prepare-lessons/components/lesson-main/train/index.module.less

@@ -112,6 +112,7 @@
   :global {
     .n-input {
       --n-height: 38px !important;
+      width: 280px;
     }
   }
 }
@@ -207,8 +208,11 @@
   }
 
   .selectStudentBtn {
-    padding-top: 9px;
+    // padding-top: 9px;
+    // padding-bottom: 4px;
     font-size: max(15px, 13Px);
+    height: max(40px, 36Px) !important;
+    line-height: max(40px, 36Px) !important;
     font-weight: 500;
     color: #1677FF;
     text-decoration: underline;
@@ -225,7 +229,7 @@
   }
 
   .studentList {
-    margin-top: 10px;
+    // margin-top: 10px;
     color: #333333;
     font-size: max(13px, 12Px);
     padding: 10px 6px;

+ 22 - 3
src/views/prepare-lessons/components/lesson-main/train/index.tsx

@@ -38,6 +38,7 @@ import Trainguide from '@/custom-plugins/guide-page/train-guide';
 import { eventGlobal } from '/src/utils';
 import iconTips from '../../../images/icon-tips.png';
 import { typeFormat } from '../../resource-main/components/select-music';
+import TheMessageDialog from '/src/components/TheMessageDialog';
 export default defineComponent({
   name: 'courseware-modal',
   props: {
@@ -84,7 +85,8 @@ export default defineComponent({
       editItem: {} as any,
       removeIds: [] as any, // 临时删除的编号
 
-      removeVisiable1: false
+      removeVisiable1: false,
+      preSaveVisiable: false
     });
     // const showGuide = ref(false);
     // 获取列表
@@ -289,8 +291,11 @@ export default defineComponent({
               <NButton
                 type="default"
                 disabled={forms.trainList.length <= 0}
-                onClick={onPreSave}
-                loading={forms.preBtnLoading}>
+                onClick={() => {
+                  forms.preSaveVisiable = true;
+                }}
+                // loading={forms.preBtnLoading}
+              >
                 保存预设
               </NButton>
             )}
@@ -535,6 +540,20 @@ export default defineComponent({
             </NSpace>
           </div>
         </NModal>
+
+        <NModal
+          v-model:show={forms.preSaveVisiable}
+          preset="card"
+          class={['modalTitle', styles.removeVisiable1]}
+          title={'保存预设'}>
+          <TheMessageDialog
+            content="是否保存当前页面编辑内容?"
+            cancelButtonText="不保存"
+            confirmButtonText="保存"
+            onClose={() => (forms.preSaveVisiable = false)}
+            onConfirm={() => onPreSave()}
+          />
+        </NModal>
       </div>
     );
   }

+ 21 - 6
src/views/prepare-lessons/components/resource-main/components/select-music/index.tsx

@@ -12,7 +12,7 @@ import requestOrigin from 'umi-request';
 import CardPreview from '/src/components/card-preview';
 import { evaluateDifficult } from '/src/utils/contants';
 import { eventGlobal } from '/src/utils';
-import { materialQueryPage } from '/src/views/natural-resources/api';
+import { favorite, materialQueryPage } from '/src/views/natural-resources/api';
 
 const formatType = (type: string) => {
   if (type === 'sahreMusic') {
@@ -110,12 +110,12 @@ export default defineComponent({
           );
           temp.push({
             id: row.id,
-            coverImg: row.coverImg,
-            type: row.type,
-            title: row.name,
+            coverImg: row.coverImg || row.musicSvg,
+            type: 'MUSIC',
+            title: row.musicSheetName,
             isCollect: !!row.favoriteFlag,
             isSelected: row.sourceFrom === 'PLATFORM' ? true : false,
-            content: row.content,
+            content: row.id,
             xmlFileUrl: row.xmlFileUrl,
             exist: index !== -1 ? true : false // 是否存在
           });
@@ -193,6 +193,20 @@ export default defineComponent({
       state.editStatus = true;
     };
 
+    // 收藏
+    const onCollect = async (item: any) => {
+      try {
+        await favorite({
+          materialId: item.id,
+          favoriteFlag: item.isCollect ? 0 : 1,
+          type: item.type
+        });
+        item.isCollect = !item.isCollect;
+      } catch {
+        //
+      }
+    };
+
     onMounted(() => {
       getList();
 
@@ -231,9 +245,9 @@ export default defineComponent({
                   {state.tableList.map((item: any) => (
                     <CardType
                       isShowAdd
-                      isShowCollect={false}
                       item={item}
                       draggable
+                      isShowCollect
                       // isShowAddDisabled={!prepareStore.getIsEditTrain}
                       disabledMouseHover={false}
                       onClick={() => {
@@ -242,6 +256,7 @@ export default defineComponent({
                         state.item = item;
                       }}
                       onAdd={(child: any) => onAdd(child)}
+                      onCollect={(item: any) => onCollect(item)}
                     />
                   ))}
                 </div>

+ 24 - 2
src/views/prepare-lessons/model/select-music/select-item/index.tsx

@@ -8,6 +8,7 @@ import { useDebounceFn, useThrottleFn, useResizeObserver } from '@vueuse/core';
 import { usePrepareStore } from '/src/store/modules/prepareLessons';
 import { musicSheetPage } from '../../../api';
 import CardPreview from '/src/components/card-preview';
+import { favorite, materialQueryPage } from '/src/views/natural-resources/api';
 
 const formatType = (type: string) => {
   if (type === 'shareResources') {
@@ -58,7 +59,13 @@ export default defineComponent({
         if (state.pagination.page === 1) {
           state.loading = true;
         }
-        const { data } = await musicSheetPage({
+        // material/queryPage
+        // const { data } = await musicSheetPage({
+        //   ...state.searchGroup,
+        //   ...state.pagination,
+        //   subjectId: prepareStore.getSubjectId
+        // });
+        const { data } = await materialQueryPage({
           ...state.searchGroup,
           ...state.pagination,
           subjectId: prepareStore.getSubjectId
@@ -98,6 +105,20 @@ export default defineComponent({
       getList();
     }, 500);
 
+    // 收藏
+    const onCollect = async (item: any) => {
+      try {
+        await favorite({
+          materialId: item.id,
+          favoriteFlag: item.isCollect ? 0 : 1,
+          type: item.type
+        });
+        item.isCollect = !item.isCollect;
+      } catch {
+        //
+      }
+    };
+
     onMounted(() => {
       useResizeObserver(
         document.querySelector('.' + className) as HTMLElement,
@@ -152,7 +173,7 @@ export default defineComponent({
                   {state.tableList.map((item: any) => (
                     <CardType
                       isShowAdd
-                      isShowCollect={false}
+                      isShowCollect
                       item={item}
                       // isShowAddDisabled={state.isShowAddDisabled}
                       onAdd={() => emit('add', item)}
@@ -162,6 +183,7 @@ export default defineComponent({
                         state.show = true;
                         state.item = item;
                       }}
+                      onCollect={(item: any) => onCollect(item)}
                     />
                   ))}
                 </div>

+ 11 - 0
src/views/studentList/modals/comment-work/index.module.less

@@ -100,6 +100,17 @@
     background-color: #F2F4F7 !important;
     border-radius: 10px;
     --n-border: 1px solid #F2F4F7 !important;
+
+    :global {
+      .n-input-wrapper {
+        padding-bottom: 32px;
+      }
+
+      .n-input__textarea-el {
+        font-weight: 500;
+        color: #131415;
+      }
+    }
   }
 
   :global {

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

@@ -86,7 +86,7 @@ export default defineComponent({
           }}
           alt=""
         />
-        <h2>点评作业</h2>
+        <h2>{props.workInfo.isLook ? '查看评语' : '点评作业'}</h2>
 
         <div class={styles.header}>
           <NAvatar
@@ -105,7 +105,7 @@ export default defineComponent({
         <NInput
           class={styles.textarea}
           type="textarea"
-          rows={10}
+          rows={12}
           maxlength={500}
           showCount
           autosize={false}