|
@@ -232,21 +232,14 @@ const modeSelectFn = useThrottleFn((mode: number, flag: number = 0) => {
|
|
|
})
|
|
|
|
|
|
const startTask = useThrottleFn(() => {
|
|
|
- let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
|
|
|
-
|
|
|
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
|
|
|
- console.log(tempIndex, 'tempIndex241')
|
|
|
- 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
|
|
|
}
|
|
|
taskBegin.value = true
|
|
|
if (!isMainWin.value) {
|
|
|
- console.log(tempIndex, 'tempIndex248')
|
|
|
localStorage.setItem('two-win-auditory-task-begin', 'YES')
|
|
|
}
|
|
|
})
|
|
@@ -297,7 +290,7 @@ const countDownEnd = () => {
|
|
|
countDownBegin.value = false
|
|
|
showCountDown.value = false
|
|
|
if (!isMainWin.value) {
|
|
|
- VoiceImpRef.value.videoPlay('Speech-Auditory', 'static/voice/cognitiveAbility/SpeechTraining/Auditory/1.mp3')
|
|
|
+ // VoiceImpRef.value.videoPlay('Speech-Auditory', 'static/voice/cognitiveAbility/SpeechTraining/Auditory/1.mp3')
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -339,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 {
|