|
@@ -14,7 +14,7 @@
|
|
v-if="isMainWin"
|
|
v-if="isMainWin"
|
|
src="/static/image/cognitiveAbility/SpeechTraining/Auditory/play.png"
|
|
src="/static/image/cognitiveAbility/SpeechTraining/Auditory/play.png"
|
|
fit="contain"
|
|
fit="contain"
|
|
- class="w-[300px] h-[160px] mb-40px cursor-pointer hover:scale-101"
|
|
|
|
|
|
+ class="w-[140px] h-[140px] mb-40px cursor-pointer hover:scale-101"
|
|
@click="handlePlay"
|
|
@click="handlePlay"
|
|
/>
|
|
/>
|
|
<div class="w-full flex flex-row justify-around">
|
|
<div class="w-full flex flex-row justify-around">
|
|
@@ -29,7 +29,7 @@
|
|
<el-image
|
|
<el-image
|
|
:src="`/static/image/cognitiveAbility/SpeechTraining/${useClickIndex === index || item === TopicsVal[currentIndex].userAnswer ? 'Options-right' : 'Options-Blank'}.png`"
|
|
:src="`/static/image/cognitiveAbility/SpeechTraining/${useClickIndex === index || item === TopicsVal[currentIndex].userAnswer ? 'Options-right' : 'Options-Blank'}.png`"
|
|
fit="contain"
|
|
fit="contain"
|
|
- class="w-[100px] h-[100px] mt-30px"
|
|
|
|
|
|
+ class="w-[60px] h-[60px] mt-30px"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -46,13 +46,46 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <el-image
|
|
|
|
- v-if="showNextBtn"
|
|
|
|
- src="/static/image/cognitiveAbility/SpeechTraining/next.png"
|
|
|
|
- fit="contain"
|
|
|
|
- class="!absolute bottom-[24px] right-[140px] w-[300px] h-[140px] cursor-pointer hover:scale-101"
|
|
|
|
- @click="handleNext()"
|
|
|
|
- />
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="isMainWin"
|
|
|
|
+ class="absolute bottom-[24px] left-10% w-80% h-140px flex flex-row items-center justify-between"
|
|
|
|
+ >
|
|
|
|
+ <div class="flex flex-row items-center">
|
|
|
|
+ <template v-if="showScoreArea">
|
|
|
|
+ <span class="text-[#0F308C] text-[42px]">请评分:</span>
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in [0, 1, 2]"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="w-[140px] flex flex-row items-center cursor-pointer"
|
|
|
|
+ @click="handleScore(item)"
|
|
|
|
+ >
|
|
|
|
+ <el-image
|
|
|
|
+ :src="`/static/image/cognitiveAbility/SpeechTraining/${
|
|
|
|
+ index === scoreIndex ? 'Options-right' : 'Options-Blank'
|
|
|
|
+ }.png`"
|
|
|
|
+ fit="contain"
|
|
|
|
+ class="w-[40px] h-[40px] cursor-pointer"
|
|
|
|
+ />
|
|
|
|
+ <span class="text-[36px] text-[#0F308C] ml-12px">{{ item }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ <el-image
|
|
|
|
+ v-if="showNextBtn"
|
|
|
|
+ src="/static/image/cognitiveAbility/SpeechTraining/next.png"
|
|
|
|
+ fit="contain"
|
|
|
|
+ class="w-[300px] h-[140px] cursor-pointer hover:scale-101"
|
|
|
|
+ @click="handleNext()"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="!isMainWin && showScoreArea"
|
|
|
|
+ class="absolute bottom-[44px] left-10% w-240px h-140px flex flex-row items-end justify-between"
|
|
|
|
+ >
|
|
|
|
+ <span class="text-[#0F308C] text-[42px] mb-12px">得分:</span>
|
|
|
|
+ <span class="text-[#b1b1b1] text-[72px] score-text">{{ TopicsVal[currentIndex].score }}</span>
|
|
|
|
+ <span class="text-[#0F308C] text-[42px] mb-12px">分</span>
|
|
|
|
+ </div>
|
|
|
|
|
|
<VoiceImp ref="VoiceImpRef" />
|
|
<VoiceImp ref="VoiceImpRef" />
|
|
</section>
|
|
</section>
|
|
@@ -79,6 +112,7 @@ interface TopicsType {
|
|
choices: string[]
|
|
choices: string[]
|
|
correct: string
|
|
correct: string
|
|
userAnswer: string
|
|
userAnswer: string
|
|
|
|
+ score: string
|
|
}
|
|
}
|
|
|
|
|
|
const props = defineProps({})
|
|
const props = defineProps({})
|
|
@@ -86,15 +120,26 @@ const emits = defineEmits(['gameOver'])
|
|
|
|
|
|
const isMainWin = ref(false)
|
|
const isMainWin = ref(false)
|
|
const showNextBtn = ref(false) // 主屏 - 显示下一题按钮标识
|
|
const showNextBtn = ref(false) // 主屏 - 显示下一题按钮标识
|
|
|
|
+const showScoreArea = ref(false) // 主屏 - 显示评分标识
|
|
const showSubmitBtn = ref(false) // 副屏 - 显示确定按钮标识
|
|
const showSubmitBtn = ref(false) // 副屏 - 显示确定按钮标识
|
|
let isSubmitting = false // 是否正在提交标识
|
|
let isSubmitting = false // 是否正在提交标识
|
|
const showTopics = ref(false) // 显示题目选项标识
|
|
const showTopics = ref(false) // 显示题目选项标识
|
|
const VoiceImpRef = ref()
|
|
const VoiceImpRef = ref()
|
|
const currentIndex = ref(0) // 当前题目索引
|
|
const currentIndex = ref(0) // 当前题目索引
|
|
const TopicsVal = ref<TopicsType[]>([])
|
|
const TopicsVal = ref<TopicsType[]>([])
|
|
-const useClickIndex = ref(-1) // 副屏 - 用户点击的选项索引
|
|
|
|
|
|
+const useClickIndex = ref(-1) // 副屏 - 患者点击的选项索引
|
|
|
|
+const scoreIndex = ref(-1) // 主屏 - 医生评分选项索引
|
|
let taskBeginTime = 0 // 任务开始时间
|
|
let taskBeginTime = 0 // 任务开始时间
|
|
|
|
|
|
|
|
+const handleScore = (index: number) => {
|
|
|
|
+ TopicsVal.value[currentIndex.value].score = index + ''
|
|
|
|
+ showNextBtn.value = true
|
|
|
|
+ if (isMainWin.value) {
|
|
|
|
+ scoreIndex.value = index
|
|
|
|
+ localStorage.setItem('tow-win-auditory-word-img-matching-score', index + '')
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
const handleNext = () => {
|
|
const handleNext = () => {
|
|
if (TopicsVal.value[currentIndex.value].userAnswer === '') {
|
|
if (TopicsVal.value[currentIndex.value].userAnswer === '') {
|
|
showTopics.value = true
|
|
showTopics.value = true
|
|
@@ -107,6 +152,8 @@ const handleNext = () => {
|
|
localStorage.setItem('tow-win-auditory-word-img-matching-isSubmitting', 'YES')
|
|
localStorage.setItem('tow-win-auditory-word-img-matching-isSubmitting', 'YES')
|
|
} else {
|
|
} else {
|
|
currentIndex.value++
|
|
currentIndex.value++
|
|
|
|
+ showScoreArea.value = false
|
|
|
|
+ scoreIndex.value = -1
|
|
handleNext()
|
|
handleNext()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -175,7 +222,8 @@ onMounted(() => {
|
|
}
|
|
}
|
|
|
|
|
|
if (val.key === 'two-win-auditory-word-img-matching-try-over') {
|
|
if (val.key === 'two-win-auditory-word-img-matching-try-over') {
|
|
- showNextBtn.value = true
|
|
|
|
|
|
+ // showNextBtn.value = true
|
|
|
|
+ showScoreArea.value = true
|
|
localStorage.removeItem('two-win-auditory-word-img-matching-try-over')
|
|
localStorage.removeItem('two-win-auditory-word-img-matching-try-over')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -188,17 +236,29 @@ onMounted(() => {
|
|
showTopics.value = true
|
|
showTopics.value = true
|
|
currentIndex.value = Number(val.newValue!)
|
|
currentIndex.value = Number(val.newValue!)
|
|
useClickIndex.value = -1
|
|
useClickIndex.value = -1
|
|
|
|
+ showScoreArea.value = false
|
|
|
|
+ scoreIndex.value = -1
|
|
|
|
+ VoiceImpRef.value.videoPlay(
|
|
|
|
+ 'Speech-Auditory',
|
|
|
|
+ `static/voice/cognitiveAbility/SpeechTraining/Auditory/WordImgMatching/${TopicsVal.value[currentIndex.value].correct}.mp3`
|
|
|
|
+ )
|
|
localStorage.removeItem('tow-win-auditory-word-img-matching-show-topics')
|
|
localStorage.removeItem('tow-win-auditory-word-img-matching-show-topics')
|
|
}
|
|
}
|
|
|
|
|
|
if (val.key === 'two-win-auditory-word-img-matching-item-check') {
|
|
if (val.key === 'two-win-auditory-word-img-matching-item-check') {
|
|
VoiceImpRef.value.videoPlay(
|
|
VoiceImpRef.value.videoPlay(
|
|
'Speech-Auditory',
|
|
'Speech-Auditory',
|
|
- `static/voice/cognitiveAbility/SpeechTraining/Auditory/WordImgMatching/${val.newValue}.mp3`
|
|
|
|
|
|
+ `static/voice/cognitiveAbility/SpeechTraining/Auditory/WordImgMatching/${val.newValue}-tips.mp3`
|
|
)
|
|
)
|
|
localStorage.removeItem('two-win-auditory-word-img-matching-item-check')
|
|
localStorage.removeItem('two-win-auditory-word-img-matching-item-check')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (val.key === 'tow-win-auditory-word-img-matching-score') {
|
|
|
|
+ showScoreArea.value = true
|
|
|
|
+ handleScore(Number(val.newValue))
|
|
|
|
+ localStorage.removeItem('tow-win-auditory-word-img-matching-score')
|
|
|
|
+ }
|
|
|
|
+
|
|
if (val.key === 'tow-win-auditory-word-img-matching-isSubmitting' && val.newValue === 'YES') {
|
|
if (val.key === 'tow-win-auditory-word-img-matching-isSubmitting' && val.newValue === 'YES') {
|
|
isSubmitting = true
|
|
isSubmitting = true
|
|
emits('gameOver', {
|
|
emits('gameOver', {
|
|
@@ -216,4 +276,12 @@ onMounted(() => {
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss"></style>
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+.score-text {
|
|
|
|
+ text-shadow:
|
|
|
|
+ 0 3px 0 #b2a98f,
|
|
|
|
+ 0 10px 16px rgba(0, 0, 0, 0.15),
|
|
|
|
+ 0 10px 2px rgba(0, 0, 0, 0.1),
|
|
|
|
+ 0 10px 20px rgba(0, 0, 0, 0.1);
|
|
|
|
+}
|
|
|
|
+</style>
|