Browse Source

Merge branch 'feature-tianyong' into gym-online

TIANYONG 3 weeks ago
parent
commit
c809106439

+ 2 - 2
src/constant/instruments.ts

@@ -436,7 +436,7 @@ export let instruments: any = {}
 
 /** 获取分轨名称 */
 export const getInstrumentName = (name = '') => {
-	name = name.toLocaleLowerCase().replace(/[0-9\s]/g, '')
+	name = name.toLocaleLowerCase().replace(/ /g, '')
 	if (!name) return ''
 	// 全匹配声轨名称
 	for(let key in instruments){
@@ -448,7 +448,7 @@ export const getInstrumentName = (name = '') => {
 	// 用返回的code模糊匹配传入的xml声轨名称name
 	for(let key in instruments){
 	  const _key = key.toLocaleLowerCase().replace(/ /g, '')
-	  if (_key.includes(name)){
+	  if (name.includes(_key)){
 		return instruments[key]
 	  }
 	}

+ 6 - 3
src/page-instrument/evaluat-model/evaluat-result/index.tsx

@@ -98,9 +98,9 @@ export default defineComponent({
 
     const isHuaWeiPad = navigator?.userAgent?.includes("UAWEIVRD-W09") ? true : false
     onMounted(() => {
-      if (!evaluatingData.isErrorState) {
-        handleAddRecord();
-      }
+      // if (!evaluatingData.isErrorState) {
+      //   handleAddRecord();
+      // }
       // console.log('评测等级',evaluatingData.resultData.leve)
     });
 
@@ -115,6 +115,9 @@ export default defineComponent({
             }
           }, 0);
         }
+      },
+      {
+        immediate: true
       }
     );
     return () => (

+ 12 - 8
src/page-instrument/evaluat-model/index.tsx

@@ -631,14 +631,18 @@ export default defineComponent({
         </Popup>
 
         {/* 评测作业,非完整评测不显示评测结果弹窗 */}
-        {evaluatingData.hideResultModal ? (
-          <EvaluatResult onClose={handleEvaluatResult} />
-        ) : (
-          <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={evaluatingData.resulstMode}>
-            <EvaluatResult onClose={handleEvaluatResult} />
-          </Popup>
-        )}
-
+        {
+          evaluatingData.resulstMode && 
+          <>
+            {evaluatingData.hideResultModal ? (
+              <EvaluatResult onClose={handleEvaluatResult} />
+            ) : (
+              <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={evaluatingData.resulstMode}>
+                <EvaluatResult onClose={handleEvaluatResult} />
+              </Popup>
+            )}   
+          </>       
+        }
         <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={evaluatModel.evaluatUpdateAudio}>
           <EvaluatAudio onClose={hanldeUpdateVideoAndAudio} />
         </Popup>