1
0

2 Ревизии a0cce53923 ... c0042ec67d

Автор SHA1 Съобщение Дата
  JutarryWu c0042ec67d Merge remote-tracking branch 'origin/20240604-dev' into 20240604-dev преди 1 седмица
  JutarryWu bda4a02ad8 言语康复训练跳转下一个游戏BUG修复 преди 1 седмица

+ 3 - 5
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/index.vue

@@ -235,12 +235,8 @@ const startTask = useThrottleFn(() => {
   if (modeSelect.value === 0) {
     checkItems.value[modeCurrentIndex].isTraining = true
   } else {
-    // let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    // checkItems.value[tempIndex].isTraining = true
     let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    checkItems.value.forEach((item, index) => {
-      item.isTraining = tempIndex === index
-    })
+    checkItems.value[tempIndex].isTraining = true
   }
   taskBegin.value = true
   if (!isMainWin.value) {
@@ -337,6 +333,8 @@ onMounted(() => {
 
       if (val.key === 'tow-win-auditory-change-status') {
         checkItems.value[modeCurrentIndex].isFinish = true
+        modeCurrentIndex++
+        startTask()
         localStorage.removeItem('tow-win-auditory-change-status')
       }
     } else {

+ 3 - 6
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskOralExpression/index.vue

@@ -222,11 +222,7 @@ const startTask = useThrottleFn(() => {
     checkItems.value[modeCurrentIndex].isTraining = true
   } else {
     let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    checkItems.value.forEach((item, index) => {
-      item.isTraining = tempIndex === index
-    })
-    // let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    // checkItems.value[tempIndex].isTraining = true
+    checkItems.value[tempIndex].isTraining = true
   }
   taskBegin.value = true
   if (!isMainWin.value) {
@@ -323,7 +319,8 @@ onMounted(() => {
 
       if (val.key === 'tow-win-auditory-change-status') {
         checkItems.value[modeCurrentIndex].isFinish = true
-        childTaskOver(JSON.parse(val.newValue!))
+        modeCurrentIndex++
+        startTask()
         localStorage.removeItem('tow-win-auditory-change-status')
       }
     } else {

+ 3 - 7
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskVisualTraining/index.vue

@@ -235,13 +235,8 @@ const startTask = useThrottleFn(() => {
   if (modeSelect.value === 0) {
     checkItems.value[modeCurrentIndex].isTraining = true
   } else {
-    // let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    // checkItems.value[tempIndex].isTraining = true
     let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
-    console.log(tempIndex, 'tempIndex241')
-    checkItems.value.forEach((item, index) => {
-      item.isTraining = tempIndex === index
-    })
+    checkItems.value[tempIndex].isTraining = true
   }
   taskBegin.value = true
   if (!isMainWin.value) {
@@ -337,7 +332,8 @@ onMounted(() => {
 
       if (val.key === 'tow-win-auditory-change-status') {
         checkItems.value[modeCurrentIndex].isFinish = true
-        childTaskOver(JSON.parse(val.newValue!))
+        modeCurrentIndex++
+        startTask()
         localStorage.removeItem('tow-win-auditory-change-status')
       }
     } else {