| 
					
				 | 
			
			
				@@ -1,4 +1,4 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { Transition, defineComponent, onMounted, reactive, watch, defineAsyncComponent, computed } from "vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Transition, defineComponent, onMounted, reactive, watch, defineAsyncComponent, computed, onUnmounted } from "vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, handleStartEvaluat, handleViewReport, startCheckDelay, checkUseEarphone, handleCancelEvaluat } from "/src/view/evaluating"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import Earphone from "./earphone"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import styles from "./index.module.less"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,6 +38,7 @@ type TCriteria = "frequency" | "amplitude" | "decibels"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let actualBeatLength = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let calculateInfo: any = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let checkErjiTimer: any = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: "evaluat-model", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -133,9 +134,15 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         evaluatingData.earphoneMode = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         evaluatingData.earPhoneType = res?.content?.type || ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (evaluatingData.earPhoneType === "有线耳机") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          clearTimeout(checkErjiTimer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             evaluatingData.earphoneMode = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }, 3000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // 如果没有佩戴有限耳机,需要持续检测耳机状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          checkErjiTimer = setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            checkEarphoneStatus(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }, 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log("检测结束,生成数据", evaluatingData.websocketState, evaluatingData.startBegin, evaluatingData.checkEnd); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -431,6 +438,11 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       api_finishDelayCheck(handleFinishDelayCheck); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       api_retryEvaluating(handRetryEvaluating); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    onUnmounted(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			clearTimeout(checkErjiTimer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return () => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class={styles.operatingBtn}> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -471,6 +483,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <Earphone 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             earphoneType={evaluatingData.earPhoneType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             onClose={() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              clearTimeout(checkErjiTimer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               evaluatingData.earphoneMode = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               // handlePerformDetection(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               checkEarphoneStatus("start"); 
			 |