| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ref, unref } from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { GetCoursewareContent_View } from '@/api/course'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Message } from 'element-ui'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const categoryList = ['OC', 'AILP', 'NPC', 'NNPE', 'RLC']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -7,10 +8,10 @@ const categoryList = ['OC', 'AILP', 'NPC', 'NNPE', 'RLC']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 显示课件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * @param {String} courseId 互动课件 id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * @param {String} groupId 分组id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param {String} previewType 预览类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export function useShowCourseware(courseId, groupId = '[]', previewType = 'previewCheck') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let context = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let ui_type = ref(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let category = ref(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let themeColor = ref(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let bookFontSize = ref(''); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -25,21 +26,8 @@ export function useShowCourseware(courseId, groupId = '[]', previewType = 'previ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         category.value = ca; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (category.value === categoryList[0] || category.value.length === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          context.value = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            id: unref(courseId), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ui_type: JSON.parse(content).question.ui_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            content: JSON.parse(content) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (category.value === categoryList[1]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          const contents = JSON.parse(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (contents.question && contents.question.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            context.value = JSON.parse(contents.question); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ui_type.value = contents.ui_type ? contents.ui_type : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (category.value === categoryList[0] || category.value.length === 0 || category.value === categoryList[1]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return Message.warning('该课件类型已被废弃'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (category.value === categoryList[2]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           themeColor.value = book_theme_color; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -72,13 +60,8 @@ export function useShowCourseware(courseId, groupId = '[]', previewType = 'previ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  function handleBookUserAnswer(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    exam_answer.value = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     context, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ui_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     category, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     themeColor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     bookFontSize, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,7 +69,6 @@ export function useShowCourseware(courseId, groupId = '[]', previewType = 'previ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     previewGroupId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     exam_answer, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     saveNPCAnswer, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleBookUserAnswer, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getCoursewareContent_View 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |