浏览代码

更新字段

lex-xin 7 月之前
父节点
当前提交
5b00ff6542

+ 8 - 8
src/views/prepare-lessons/components/lesson-main/courseware/addCourseware.tsx

@@ -149,8 +149,8 @@ export default defineComponent({
                 title: sub.bizInfo.name,
                 dataJson: sub.dataJson,
                 instrumentIds: sub.instrumentIds, // 素材编号
-                isAllSubject: sub.isAllSubject,
-                isError: checkCurrentIsInstrument(sub.instrumentIds, sub.type, sub.isAllSubject), // 是否异常 当前素材是否在选中的乐器里面
+                hasCheck: sub.hasCheck,
+                isError: checkCurrentIsInstrument(sub.instrumentIds, sub.type, sub.hasCheck), // 是否异常 当前素材是否在选中的乐器里面
                 // isCollect: !!sub.favoriteFlag,
                 isSelected: sub.source === 'PLATFORM' ? true : false,
                 audioPlayTypeArray: sub.audioPlayTypes
@@ -193,7 +193,7 @@ export default defineComponent({
     };
 
     /** 检测当前素材是否包含所选声部 */
-    const checkCurrentIsInstrument = (instruments: string, type: string, isAllSubject = false) => {
+    const checkCurrentIsInstrument = (instruments: string, type: string, hasCheck = false) => {
       // 当前素材是否在选中的乐器里面
       let isError = false 
       if(forms.subjects.length <= 0) {
@@ -205,7 +205,7 @@ export default defineComponent({
         return false
       }
       forms.subjects.forEach((item: any) => {
-        if(!instruments?.includes(item) && !isAllSubject) {
+        if(!instruments?.includes(item) && !hasCheck) {
           isError = true
         }
       })
@@ -631,7 +631,7 @@ export default defineComponent({
         eventGlobal.emit('checkCoursewareForm', 'subject')
         return
       }
-      item.isError = checkCurrentIsInstrument(item.instrumentIds, item.type, item.isAllSubject) // 是否异常
+      item.isError = checkCurrentIsInstrument(item.instrumentIds, item.type, item.hasCheck) // 是否异常
       if (forms.coursewareList.length <= 0) {
         // 添加到临时对象
         forms.addCoursewareItem = item;
@@ -748,7 +748,7 @@ export default defineComponent({
       forms.coursewareList.forEach((item: any) => {
         const childList = item.list || []
         childList.forEach((child: any) => {
-          child.isError = checkCurrentIsInstrument(child.instrumentIds, child.type, child.isAllSubject)
+          child.isError = checkCurrentIsInstrument(child.instrumentIds, child.type, child.hasCheck)
           if(child.isError) {
             isTips = true
           }
@@ -910,8 +910,8 @@ export default defineComponent({
                             refFlag: dropItem.refFlag,
                             isCollect: dropItem.isCollect,
                             isSelected: dropItem.isSelected,
-                            isAllSubject: dropItem.isAllSubject,
-                            isError: checkCurrentIsInstrument(dropItem.instrumentIds, dropItem.type, dropItem.isAllSubject), // 是否异常
+                            hasCheck: dropItem.hasCheck,
+                            isError: checkCurrentIsInstrument(dropItem.instrumentIds, dropItem.type, dropItem.hasCheck), // 是否异常
                             content: dropItem.content,
                             audioPlayTypeArray: dropItem.audioPlayTypeArray,
                             removeFlag: false,

+ 2 - 2
src/views/prepare-lessons/components/resource-main/components/resource-item/index.tsx

@@ -99,7 +99,7 @@ export default defineComponent({
             containAccompaniment: row.containAccompaniment,
             content: row.content,
             instrumentIds: row.instrumentIds,
-            isAllSubject: row.isAllSubject,
+            hasCheck: row.hasCheck,
             sourceForm: 'resource-item',
             audioPlayTypeArray: row.audioPlayTypes
               ? row.audioPlayTypes.split(',')
@@ -160,7 +160,7 @@ export default defineComponent({
           isSelected: item.isSelected,
           audioPlayTypeArray: item.audioPlayTypeArray,
           instrumentIds: item.instrumentIds,
-          isAllSubject: item.isAllSubject,
+          hasCheck: item.hasCheck,
           content: item.content,
           removeFlag: false
         });

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

@@ -112,7 +112,7 @@ export default defineComponent({
             isSelected: row.sourceFrom === 'PLATFORM' ? true : false,
             refFlag: row.refFlag,
             instrumentIds: row.instrumentIds,
-            isAllSubject: row.isAllSubject,
+            hasCheck: row.hasCheck,
             audioPlayTypeArray: row.audioPlayTypes
               ? row.audioPlayTypes.split(',')
               : [],
@@ -156,7 +156,7 @@ export default defineComponent({
           isSelected: item.isSelected,
           audioPlayTypeArray: item.audioPlayTypeArray,
           instrumentIds: item.instrumentIds,
-          isAllSubject: item.isAllSubject,
+          hasCheck: item.hasCheck,
           content: item.content,
           removeFlag: false
         });