| 
					
				 | 
			
			
				@@ -15,7 +15,7 @@ import './jquery.min.1.7.js'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import './turn.js'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import MEmpty from '@/components/m-empty'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import deepClone from '@/helpers/deep-clone'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { browser, chunkArray } from '@/helpers/utils'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { browser, chunkArray, getRandomKey } from '@/helpers/utils'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export const BOOK_DATA = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   grades: [ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -65,6 +65,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       details: [] as any[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       bookData: {} as any, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       bookLessonId: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      showBookLock: false, // 打开书本锁 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       showBook: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       book: {} as DOMRect 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -113,17 +114,20 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const res = await api_lessonCoursewareStudentPage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ...more, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         bookVersionId: bookVersionId == -1 ? null : bookVersionId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        customFlag: bookVersionId == -1 ? true : null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         currentGradeNum: currentGradeNum ? currentGradeNum : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (res?.code === 200 && Array.isArray(res?.data?.rows)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 只有在第一页的时候才会赋值上次上课记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res?.data?.current == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           data.courseRecord = res?.data?.extra; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          data.courseRecord.id && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            (data.courseRecord.key = getRandomKey() + data.courseRecord.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const result = res.data.rows.map((item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           item.load = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          item.key = Date.now() + item.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          item.key = getRandomKey() + item.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return item; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -165,15 +169,16 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         data.bookLessonId = item.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      handleCreateContainer(item.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      handleCreateContainer(item.key); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       handleRender(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         data.showBook = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        data.showBookLock = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const handleCreateContainer = (id: string) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const box = document.querySelector( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        `[data-id="${id}"]` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        `[data-key="${id}"]` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ) as unknown as HTMLElement; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (!box) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const rect = box.getBoundingClientRect(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -187,6 +192,8 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const handleOpen = async (item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (data.showBookLock) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      data.showBookLock = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       await getDetail(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -195,6 +202,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class={styles.head} style={{ opacity: data.showBook ? 0 : '' }}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class={styles.back} onClick={goback}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <img src={icon_back} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span>全部教材</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <Button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             class={[ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -263,6 +271,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   <img src={useTime} class={styles.useTime} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   <Image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     data-id={data.courseRecord.id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    data-key={data.courseRecord.key} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     class={[ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       styles.cover, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       data.courseRecord.load ? styles.loaded : '' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -315,6 +324,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             <div class={styles.item}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               <Image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 data-id={item.id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                data-key={item.key} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 class={[ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                   styles.cover, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                   item.load ? styles.loaded : '' 
			 |