Bläddra i källkod

言语康复训练 - 听 - 80%

JutarryWu 1 vecka sedan
förälder
incheckning
0303de3f94
18 ändrade filer med 350 tillägg och 51 borttagningar
  1. 1 1
      .env.development
  2. 2 0
      .eslintignore
  3. BIN
      public/static/image/cognitiveAbility/SpeechTraining/Auditory/play.png
  4. 2 0
      src/api/tester/evaluation/logCognition.ts
  5. 2 0
      src/api/tester/evaluation/logScale.ts
  6. 3 1
      src/api/tester/evaluation/speechTraining.ts
  7. 1 1
      src/api/tester/evaluation/stRecord.ts
  8. 1 0
      src/types/components.d.ts
  9. 48 22
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingRecognition/index.vue
  10. 165 0
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingWordImgMatching/index.vue
  11. 9 0
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingWordImgMatching/topics.json
  12. 80 23
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/index.vue
  13. 8 0
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskOralExpression/index.vue
  14. 8 0
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskVisualTraining/index.vue
  15. 10 0
      src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/index.vue
  16. 5 2
      src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationLogDetail/index.vue
  17. 5 0
      src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationLogIntro/index.vue
  18. 0 1
      src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationResultDetail/index.vue

+ 1 - 1
.env.development

@@ -12,7 +12,7 @@ VITE_APP_BASE_API = '/dev-api'
 # VITE_APP_API_URL = 'http://192.168.1.8:8001'
 
 # 公司本地
-VITE_APP_API_URL = 'http://192.168.1.4:8107'
+VITE_APP_API_URL = 'http://192.168.1.9:8107'
 
 # 家里本地
 # VITE_APP_API_URL = 'http://192.168.1.11:8107'

+ 2 - 0
.eslintignore

@@ -12,3 +12,5 @@ src/assets
 .eslintrc.cjs
 .prettierrc.cjs
 .stylelintrc.cjs
+
+.env.*

BIN
public/static/image/cognitiveAbility/SpeechTraining/Auditory/play.png


+ 2 - 0
src/api/tester/evaluation/logCognition.ts

@@ -100,6 +100,8 @@ export interface EvaluationCognitionSubjectVO {
   taskId?: string
   /** 完成(0:未完成 1:完成) */
   finish?: string
+  /** 认知任务标识 */
+  tcode?: string
   subjectId?: string
   /** 描述文字信息 */
   infoList?: EvaluationCognitionVO[]

+ 2 - 0
src/api/tester/evaluation/logScale.ts

@@ -102,6 +102,8 @@ export interface EvaluationScaleSubjectVO {
   taskId?: string
   /** 完成(0:未完成 1:完成) */
   finish?: string
+  /** 量表标识 */
+  flag?: string
   /** 描述文字信息 */
   infoList?: EvaluationScaleVO[]
   info?: EvaluationScaleVO

+ 3 - 1
src/api/tester/evaluation/speechTraining.ts

@@ -36,7 +36,7 @@ class SpeechTrainingAPI {
    * @param data 常规训练子任务表单数据
    */
   static add(data: SpeechTrainingVO) {
-    return request({
+    return request<any, string>({
       url: `${SPEECH_TRAINING_BASE_URL}/save`,
       method: 'post',
       data: data
@@ -93,6 +93,8 @@ export interface SpeechTrainingVO {
   recordId?: string
   /** 状态:1-多项测试;0-单项测试 */
   type?: string
+  /** 成绩 */
+  score?: string
 }
 
 /**

+ 1 - 1
src/api/tester/evaluation/stRecord.ts

@@ -77,7 +77,7 @@ class EvaluationSTRecordInfoAPI {
    * @param data 量表和认知任务记录表单数据
    */
   static addCognition(data: EvaluationSTRecordInfoVO) {
-    return request({
+    return request<any, string>({
       url: `${EVALUATION_STRECORD_BASE_URL}/taskSave`,
       method: 'post',
       data: data

+ 1 - 0
src/types/components.d.ts

@@ -26,6 +26,7 @@ declare module 'vue' {
     CaseInformation: typeof import('./../views/tester/components/CaseInformation/index.vue')['default']
     CaseLog: typeof import('./../views/tester/components/CaseInformation/CaseLog/index.vue')['default']
     CATAuditoryTrainingRecognition: typeof import('./../views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingRecognition/index.vue')['default']
+    CATAuditoryTrainingWordImgMatching: typeof import('./../views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingWordImgMatching/index.vue')['default']
     CExercisesMainShow: typeof import('./../views/gameCenter/components/games/CalculationExercises/components/CExercisesMainShow/index.vue')['default']
     CharacterMemory: typeof import('./../views/gameCenter/components/games/CharacterMemory/index.vue')['default']
     CharacterMemoryChild: typeof import('./../views/gameCenter/components/games/CharacterMemory/components/CharacterMemoryChild/index.vue')['default']

+ 48 - 22
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingRecognition/index.vue

@@ -1,22 +1,35 @@
 <template>
   <section class="auditory-recognition-container flex-center flex-col wh-full relative">
     <water-title title="语音辨识" />
-    <div v-if="isMainWin" class="text-[42px]">接下来会给你听一些声音,请在这些声音中选择出屏幕中呈现的词语</div>
+    <div v-if="isMainWin" class="text-[42px] text-[#0F308C]">
+      接下来会给你听一些声音,请在这些声音中选择出屏幕中呈现的词语
+    </div>
 
-    <div v-if="!isMainWin && showTopics" class="flex-center flex-col text-100px text-[#15FAF2]">
+    <div v-if="!isMainWin && showTopics" class="flex-center flex-col text-100px text-[#0F308C]">
       {{ TopicsVal[currentIndex].correct }}
     </div>
-    <div class="w-80% h-60% my-20px flex-center flex-row justify-between">
+    <div class="w-80% h-60% my-20px flex-center flex-col">
       <template v-if="showTopics">
-        <div
-          v-for="(item, index) in TopicsVal[currentIndex].choices"
-          :key="index"
-          class="w-320px h-360px flex-center rounded-8px shadow-2xl text-140px cursor-pointer"
-          :class="{ 'bg-[#15FAF2] text-white': useClickIndex === index || item === TopicsVal[currentIndex].userAnswer }"
-          @click="handleItemClick(item, index)"
-        >
-          <div v-if="isMainWin">{{ item }}</div>
-          <div v-else>{{ index + 1 }}</div>
+        <el-image
+          v-if="isMainWin"
+          src="/static/image/cognitiveAbility/SpeechTraining/Auditory/play.png"
+          fit="contain"
+          class="w-[300px] h-[160px] my-60px cursor-pointer hover:scale-101"
+          @click="handlePlay"
+        />
+        <div class="w-full flex flex-row justify-between">
+          <div
+            v-for="(item, index) in TopicsVal[currentIndex].choices"
+            :key="index"
+            class="w-320px h-240px flex-center rounded-58px text-86px cursor-pointer bg-[#F9F9F9] border-[#E7E7E7] border-1px text-[#0F308C]"
+            :class="{
+              '!bg-[#0F308C] !text-white': useClickIndex === index || item === TopicsVal[currentIndex].userAnswer
+            }"
+            @click="handleItemClick(item, index)"
+          >
+            <div v-if="isMainWin">{{ item }}</div>
+            <div v-else>{{ index + 1 }}</div>
+          </div>
         </div>
       </template>
     </div>
@@ -51,7 +64,7 @@
  * 编写者: JutarryWu
  */
 
-import { isJSON } from '@/utils'
+import { formatSeconds, isJSON } from '@/utils'
 
 defineOptions({
   name: 'CATAuditoryTrainingRecognition',
@@ -76,9 +89,10 @@ const showSubmitBtn = ref(false) // 副屏 - 显示确定按钮标识
 let isSubmitting = false // 是否正在提交标识
 const showTopics = ref(false) // 显示题目选项标识
 const VoiceImpRef = ref()
-const currentIndex = ref(0)
+const currentIndex = ref(0) // 当前题目索引
 const TopicsVal = ref<TopicsType[]>([])
 const useClickIndex = ref(-1) // 副屏 - 用户点击的选项索引
+let taskBeginTime = 0 // 任务开始时间
 
 const handleNext = () => {
   if (TopicsVal.value[currentIndex.value].userAnswer === '') {
@@ -97,11 +111,13 @@ const handleNext = () => {
   }
 }
 
+const handlePlay = () => {
+  localStorage.setItem('two-win-auditory-recognition-item-check', TopicsVal.value[currentIndex.value].choices.join(','))
+}
+
 const handleItemClick = (item: string, index: number) => {
   if (isSubmitting) return // 如果再提交进程中,不响应点击事件
-  if (isMainWin.value) {
-    localStorage.setItem('two-win-auditory-recognition-item-check', item)
-  } else {
+  if (!isMainWin.value) {
     TopicsVal.value[currentIndex.value].userAnswer = item
     useClickIndex.value = index
     showSubmitBtn.value = true
@@ -133,6 +149,7 @@ async function exec() {
       showNextBtn.value = true
     }, 6600)
   } else {
+    taskBeginTime = Date.now()
     VoiceImpRef.value.videoPlay(
       'Speech-Auditory',
       'static/voice/cognitiveAbility/SpeechTraining/Auditory/Recognition/1.mp3'
@@ -166,16 +183,25 @@ onMounted(() => {
       }
 
       if (val.key === 'two-win-auditory-recognition-item-check') {
-        VoiceImpRef.value.videoPlay(
-          'Speech-Auditory',
-          `static/voice/cognitiveAbility/SpeechTraining/Auditory/Recognition/${val.newValue}.mp3`
-        )
+        let tempArr = val.newValue!.split(',')
+        tempArr.forEach((name, index) => {
+          setTimeout(() => {
+            VoiceImpRef.value.videoPlay(
+              'Speech-Auditory',
+              `static/voice/cognitiveAbility/SpeechTraining/Auditory/Recognition/${name}.mp3`
+            )
+          }, 1200 * index)
+        })
         localStorage.removeItem('two-win-auditory-recognition-item-check')
       }
 
       if (val.key === 'tow-win-auditory-recognition-isSubmitting' && val.newValue === 'YES') {
         isSubmitting = true
-        emits('gameOver', JSON.stringify(TopicsVal.value))
+        emits('gameOver', {
+          min: formatSeconds(Date.now() - taskBeginTime),
+          content: JSON.stringify(TopicsVal.value),
+          score: TopicsVal.value.filter((item) => item.userAnswer === item.correct).length + ''
+        })
         localStorage.removeItem('tow-win-auditory-recognition-isSubmitting')
       }
     }

+ 165 - 0
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingWordImgMatching/index.vue

@@ -0,0 +1,165 @@
+<template>
+  <section class="auditory-recognition-container flex-center flex-col wh-full relative">
+    <water-title title="词图匹配" />
+
+    <VoiceImp ref="VoiceImpRef" />
+  </section>
+</template>
+
+<script setup lang="ts">
+/*
+ * 组件名: CATAuditoryTrainingWordImgMatching
+ * 组件用途: 常规听康复训练 - 词图匹配
+ * 创建日期: 2024/11/14
+ * 编写者: JutarryWu
+ */
+
+import { formatSeconds, isJSON } from '@/utils'
+
+defineOptions({
+  name: 'CATAuditoryTrainingWordImgMatching',
+  inheritAttrs: false
+})
+
+import Topics from './topics.json'
+
+interface TopicsType {
+  question: string
+  choices: string[]
+  correct: string
+  userAnswer: string
+}
+
+const props = defineProps({})
+const emits = defineEmits(['gameOver'])
+
+const isMainWin = ref(false)
+const showNextBtn = ref(false) // 主屏 - 显示下一题按钮标识
+const showSubmitBtn = ref(false) // 副屏 - 显示确定按钮标识
+let isSubmitting = false // 是否正在提交标识
+const showTopics = ref(false) // 显示题目选项标识
+const VoiceImpRef = ref()
+const currentIndex = ref(0) // 当前题目索引
+const TopicsVal = ref<TopicsType[]>([])
+const useClickIndex = ref(-1) // 副屏 - 用户点击的选项索引
+let taskBeginTime = 0 // 任务开始时间
+
+const handleNext = () => {
+  if (TopicsVal.value[currentIndex.value].userAnswer === '') {
+    showTopics.value = true
+    showNextBtn.value = false
+    localStorage.setItem('tow-win-auditory-recognition-show-topics', 'YES')
+  } else {
+    let tempCount = TopicsVal.value.filter((item) => item.userAnswer !== '').length
+    if (tempCount === TopicsVal.value.length) {
+      isSubmitting = true
+      localStorage.setItem('tow-win-auditory-recognition-isSubmitting', 'YES')
+    } else {
+      currentIndex.value++
+      handleNext()
+    }
+  }
+}
+
+const handlePlay = () => {
+  localStorage.setItem('two-win-auditory-recognition-item-check', TopicsVal.value[currentIndex.value].choices.join(','))
+}
+
+const handleItemClick = (item: string, index: number) => {
+  if (isSubmitting) return // 如果再提交进程中,不响应点击事件
+  if (!isMainWin.value) {
+    TopicsVal.value[currentIndex.value].userAnswer = item
+    useClickIndex.value = index
+    showSubmitBtn.value = true
+    localStorage.setItem('two-win-auditory-recognition-submit-answer', TopicsVal.value[currentIndex.value].userAnswer)
+  }
+}
+
+const handleSubmit = () => {
+  if (TopicsVal.value[currentIndex.value].userAnswer === '') {
+    ElMessage.warning('请先完成当前题目!')
+    return
+  }
+  VoiceImpRef.value.videoPlay(
+    TopicsVal.value[currentIndex.value].userAnswer === TopicsVal.value[currentIndex.value].correct ? 'right' : 'error'
+  )
+  showSubmitBtn.value = false
+  localStorage.setItem('two-win-auditory-recognition-try-over', 'YES')
+}
+
+async function exec() {
+  isMainWin.value = window.location.href.includes('win=main')
+  if (isMainWin.value) {
+    // TopicsVal.value = Topics.map((item) => {
+    //   item.choices = item.choices.sort(() => Math.random() - 0.5)
+    //   return item
+    // })
+    // localStorage.setItem('two-win-auditory-recognition-init-data', JSON.stringify(TopicsVal.value))
+    // setTimeout(() => {
+    //   showNextBtn.value = true
+    // }, 6600)
+  } else {
+    taskBeginTime = Date.now()
+    // VoiceImpRef.value.videoPlay(
+    //   'Speech-Auditory',
+    //   'static/voice/cognitiveAbility/SpeechTraining/Auditory/Recognition/1.mp3'
+    // )
+  }
+}
+
+onMounted(() => {
+  exec()
+
+  window.addEventListener('storage', (val) => {
+    if (isMainWin.value) {
+      if (val.key === 'two-win-auditory-recognition-submit-answer') {
+        TopicsVal.value[currentIndex.value].userAnswer = val.newValue!
+        localStorage.removeItem('two-win-auditory-recognition-submit-answer')
+      }
+
+      if (val.key === 'two-win-auditory-recognition-try-over') {
+        showNextBtn.value = true
+        localStorage.removeItem('two-win-auditory-recognition-try-over')
+      }
+    } else {
+      if (val.key === 'two-win-auditory-recognition-init-data' && isJSON(val.newValue!)) {
+        TopicsVal.value = JSON.parse(val.newValue!) as TopicsType[]
+        localStorage.removeItem('two-win-auditory-recognition-init-data')
+      }
+
+      if (val.key === 'tow-win-auditory-recognition-show-topics' && val.newValue === 'YES') {
+        showTopics.value = true
+        localStorage.removeItem('tow-win-auditory-recognition-show-topics')
+      }
+
+      if (val.key === 'two-win-auditory-recognition-item-check') {
+        let tempArr = val.newValue!.split(',')
+        tempArr.forEach((name, index) => {
+          setTimeout(() => {
+            VoiceImpRef.value.videoPlay(
+              'Speech-Auditory',
+              `static/voice/cognitiveAbility/SpeechTraining/Auditory/Recognition/${name}.mp3`
+            )
+          }, 1200 * index)
+        })
+        localStorage.removeItem('two-win-auditory-recognition-item-check')
+      }
+
+      if (val.key === 'tow-win-auditory-recognition-isSubmitting' && val.newValue === 'YES') {
+        isSubmitting = true
+        emits('gameOver', {
+          min: formatSeconds(Date.now() - taskBeginTime),
+          content: JSON.stringify(TopicsVal.value),
+          score: TopicsVal.value.filter((item) => item.userAnswer === item.correct).length + ''
+        })
+        localStorage.removeItem('tow-win-auditory-recognition-isSubmitting')
+      }
+    }
+  })
+})
+</script>
+
+<style scoped lang="scss">
+.auditory-recognition-container {
+}
+</style>

+ 9 - 0
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/CATAuditoryTrainingWordImgMatching/topics.json

@@ -0,0 +1,9 @@
+[
+  {
+    "question": "接下来会给你听一些声音,请在这些声音中选择出屏幕中呈现的词语",
+    "choices": ["雷声", "狗叫", "葡萄"],
+    "correct": "葡萄",
+    "userAnswer": ""
+  }
+]
+

+ 80 - 23
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/index.vue

@@ -20,7 +20,13 @@
       <template v-if="taskBegin">
         <!-- 语音辨识 -->
         <c-a-t-auditory-training-recognition
-          v-if="checkItems[0].active && checkItems[0].isTraining"
+          v-if="checkItems[0].active && checkItems[0].isTraining && !checkItems[0].isFinish"
+          @game-over="childTaskOver"
+        />
+
+        <!-- 词图匹配 -->
+        <c-a-t-auditory-training-word-img-matching
+          v-if="checkItems[1].active && checkItems[1].isTraining && !checkItems[1].isFinish"
           @game-over="childTaskOver"
         />
       </template>
@@ -83,15 +89,16 @@
  * 创建日期: 2024/7/16
  * 编写者: JutarryWu
  */
-import EvaluationSTRecordInfoAPI from '@/api/tester/evaluation/stRecord'
+import SpeechTrainingAPI, { SpeechTrainingVO } from '@/api/tester/evaluation/speechTraining'
 import { useThrottleFn } from '@vueuse/core'
 import { useUserStore } from '@/store'
 import { isJSON } from '@/utils'
 interface CheckItem {
   key: number
   name: string
-  active: boolean
-  isTraining: boolean
+  active: boolean // 是否选中
+  isTraining: boolean // 是否为当前训练
+  isFinish: boolean // 是否完成
 }
 
 const isMainWin = ref(false)
@@ -102,9 +109,17 @@ defineOptions({
 })
 
 const props = defineProps({
+  taskId: {
+    type: String,
+    default: ''
+  },
   parentId: {
     type: String,
     default: ''
+  },
+  flag: {
+    type: String,
+    default: ''
   }
 })
 
@@ -119,16 +134,16 @@ const VoiceImpRef = ref()
 
 const modeSelect = ref(-1) // -1: 未选择,0: 单流程模式,1: 全流程模式
 const modeActive = ref(-1) // -1: 未选择,0: 单流程模式,1: 全流程模式
-let modeSingleIndex = -1 // 单流程模式下,选中的索引
+let modeCurrentIndex = -1 // 当前子任务索引
 
 const dialogVisible = ref(false) // 学历弹窗
 const checkItems = ref<CheckItem[]>([
-  { key: 1, name: '语音辨识', active: false, isTraining: false },
-  { key: 2, name: '词图匹配', active: false, isTraining: false },
-  { key: 3, name: '句图匹配', active: false, isTraining: false },
-  { key: 4, name: '是非反应', active: false, isTraining: false },
-  { key: 5, name: '执行指令', active: false, isTraining: false },
-  { key: 6, name: '听短文回答故事', active: false, isTraining: false }
+  { key: 1, name: '语音辨识', active: false, isTraining: false, isFinish: false },
+  { key: 2, name: '词图匹配', active: false, isTraining: false, isFinish: false },
+  { key: 3, name: '句图匹配', active: false, isTraining: false, isFinish: false },
+  { key: 4, name: '是非反应', active: false, isTraining: false, isFinish: false },
+  { key: 5, name: '执行指令', active: false, isTraining: false, isFinish: false },
+  { key: 6, name: '听短文回答故事', active: false, isTraining: false, isFinish: false }
 ])
 
 const closeDialog = () => {
@@ -156,9 +171,9 @@ const checkItemFn = useThrottleFn((item: CheckItem, flag: number = 0) => {
     let tempIndex = -1
     checkItems.value.forEach((item2, index) => {
       item2.active = false
-      if (item2.key === item.key) modeSingleIndex = index
+      if (item2.key === item.key) modeCurrentIndex = index
     })
-    checkItems.value[modeSingleIndex].active = true
+    checkItems.value[modeCurrentIndex].active = true
     if (!isMainWin.value) {
       VoiceImpRef.value.videoPlay()
       localStorage.setItem('two-win-auditory-item-check', JSON.stringify(item))
@@ -181,6 +196,7 @@ const modeSelectFn = useThrottleFn((mode: number, flag: number = 0) => {
   setTimeout(() => {
     modeSelect.value = mode
     if (mode === 1) {
+      modeCurrentIndex = 0
       checkItems.value.forEach((item) => {
         item.active = true
       })
@@ -190,9 +206,9 @@ const modeSelectFn = useThrottleFn((mode: number, flag: number = 0) => {
 
 const startTask = useThrottleFn(() => {
   if (modeSelect.value === 0) {
-    checkItems.value[modeSingleIndex].isTraining = true
+    checkItems.value[modeCurrentIndex].isTraining = true
   } else {
-    let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining)
+    let tempIndex = checkItems.value.findIndex((item: CheckItem) => item.active && !item.isTraining && !item.isFinish)
     checkItems.value[tempIndex].isTraining = true
   }
   taskBegin.value = true
@@ -201,14 +217,45 @@ const startTask = useThrottleFn(() => {
   }
 })
 
-const childTaskOver = (content: string) => {
-  console.log(content)
-  // TODO 提交本次结果 在提交成功的回调中再进行下面的逻辑
+let tempRecordId: string = '' // 第一个子任务提交的时候没有值,传'', 提交成功后的返回值既是recordId
+const childTaskOver = (taskData: SpeechTrainingVO) => {
   if (!isMainWin.value) {
-    if (modeSelect.value === 0) {
-      // TODO 结束本次任务
-    } else {
+    if (checkItems.value[modeCurrentIndex].isFinish) {
+      modeCurrentIndex++
       startTask()
+    } else {
+      SpeechTrainingAPI.add({
+        ...{
+          flag: props.flag,
+          taskId: props.taskId,
+          patId: userStore.user.id,
+          parentId: props.parentId,
+          questionName: checkItems.value[modeCurrentIndex].name,
+          questionNo: checkItems.value[modeCurrentIndex].key + '',
+          recordId: tempRecordId,
+          type: modeSelect.value + ''
+        },
+        ...taskData
+      }).then((data) => {
+        checkItems.value[modeCurrentIndex].isFinish = true
+        localStorage.setItem('tow-win-auditory-change-status', JSON.stringify(taskData))
+        if (modeSelect.value === 0) {
+          ElMessage.success('提交成功!')
+          emits('showResult', data)
+
+          localStorage.setItem('tow-win-auditory-show-result', data)
+        } else {
+          if (modeCurrentIndex === checkItems.value.length - 1) {
+            ElMessage.success('提交成功!')
+            emits('showResult', data)
+
+            localStorage.setItem('tow-win-auditory-show-result', data)
+          } else {
+            tempRecordId = data
+            childTaskOver(taskData)
+          }
+        }
+      })
     }
   }
 }
@@ -237,7 +284,6 @@ onMounted(() => {
 
   window.addEventListener('storage', (val) => {
     if (isMainWin.value) {
-      console.log(val.key)
       if (val.key === 'two-win-auditory-mode-select') {
         modeSelectFn(Number(val.newValue))
         localStorage.removeItem('two-win-auditory-mode-select')
@@ -251,8 +297,19 @@ onMounted(() => {
         startTask()
         localStorage.removeItem('two-win-auditory-task-begin')
       }
+
+      if (val.key === 'tow-win-auditory-show-result') {
+        ElMessage.success('提交成功!')
+        emits('showResult', val.newValue!)
+        localStorage.removeItem('tow-win-auditory-show-result')
+      }
+
+      if (val.key === 'tow-win-auditory-change-status') {
+        checkItems.value[modeCurrentIndex].isFinish = true
+        childTaskOver(JSON.parse(val.newValue!))
+      }
     } else {
-      console.log('')
+      // console.log('')
     }
   })
 })

+ 8 - 0
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskOralExpression/index.vue

@@ -92,9 +92,17 @@ defineOptions({
 })
 
 const props = defineProps({
+  taskId: {
+    type: String,
+    default: ''
+  },
   parentId: {
     type: String,
     default: ''
+  },
+  flag: {
+    type: String,
+    default: ''
   }
 })
 

+ 8 - 0
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskVisualTraining/index.vue

@@ -95,9 +95,17 @@ defineOptions({
 })
 
 const props = defineProps({
+  taskId: {
+    type: String,
+    default: ''
+  },
   parentId: {
     type: String,
     default: ''
+  },
+  flag: {
+    type: String,
+    default: ''
   }
 })
 

+ 10 - 0
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/index.vue

@@ -71,21 +71,27 @@
     <!-- 常规视康复训练 -->
     <cognitive-ability-task-visual-training
       v-if="props.cognitionId === '98' && taskBegin"
+      :task-id="props.cognitionId"
       :parent-id="props.parentId"
+      :flag="flag"
       @show-result="showResult"
       @close="handleClose"
     />
     <!-- 常规听康复训练 -->
     <cognitive-ability-task-auditory-training
       v-if="props.cognitionId === '99' && taskBegin"
+      :task-id="props.cognitionId"
       :parent-id="props.parentId"
+      :flag="flag"
       @show-result="showResult"
       @close="handleClose"
     />
     <!-- 口语表达 -->
     <cognitive-ability-task-oral-expression
       v-if="props.cognitionId === '100' && taskBegin"
+      :task-id="props.cognitionId"
       :parent-id="props.parentId"
+      :flag="flag"
       @show-result="showResult"
       @close="handleClose"
     />
@@ -125,6 +131,10 @@ const props = defineProps({
   mode: {
     type: Number,
     default: -1
+  },
+  flag: {
+    type: String,
+    default: ''
   }
 })
 const userStore = useUserStore()

+ 5 - 2
src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationLogDetail/index.vue

@@ -85,6 +85,7 @@
         :id="targetItem.id"
         :name="targetItem.name"
         :mode="targetItem.mode"
+        :flag="targetItem.flag"
         @close="showInfoDetail = false"
       />
     </right-to-left-div>
@@ -125,7 +126,8 @@ const targetItem = ref({
   parentId: '',
   id: '',
   name: '',
-  mode: -1
+  mode: -1,
+  flag: ''
 })
 
 /**
@@ -148,7 +150,8 @@ const beginTest = (item: EvaluationScaleSubjectVO | EvaluationCognitionSubjectVO
       parentId: item.id!, // 康复评定中评定任务的关联ID
       id: type === 0 ? item.subjectId! : item.taskId!, // 评定任务的真实ID
       name: type === 0 ? item.sname! : item.tname!,
-      mode: type === 0 ? 2 : Number(item.info!.type) // 0:双人模式 1:单人模式 2:量表无模式
+      mode: type === 0 ? 2 : Number(item.info!.type), // 0:双人模式 1:单人模式 2:量表无模式
+      flag: type === 0 ? item.flag : item.tcode // 量表标识或者认知任务标识
     }
     showInfoDetail.value = true
 

+ 5 - 0
src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationLogIntro/index.vue

@@ -52,6 +52,7 @@
       :parent-id="props.parentId"
       :mode="props.mode"
       :title="props.name"
+      :flag="props.flag"
       @close="cognitionVisible = false"
       @close-all="closeIntro"
     />
@@ -91,6 +92,10 @@ const props = defineProps({
   mode: {
     type: Number,
     default: -1
+  },
+  flag: {
+    type: String,
+    default: ''
   }
 })
 

+ 0 - 1
src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationResultDetail/index.vue

@@ -234,7 +234,6 @@ function handleQuery() {
         ...obj,
         tresult: JSON.parse(obj.tresult!)
       }
-      console.log('999999: ', data.value?.tresult)
     })
     .finally(() => {
       loading.value = false