Przeglądaj źródła

部分代码优化

JutarryWu 2 tygodni temu
rodzic
commit
230b33beeb

+ 13 - 1
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskAuditoryTraining/index.vue

@@ -1,5 +1,12 @@
 <template>
   <section class="boston-container wh-full overflow-hidden relative">
+    <el-image
+      v-if="!isMainWin"
+      src="/static/image/cognitiveAbility/SpeechTraining/close.png"
+      fit="contain"
+      class="!absolute z-5999 top-[36px] right-[36px] w-[70px] h-[70px] cursor-pointer"
+      @click="handleClose"
+    />
     <div v-if="showCountDown" class="absolute top-[50%] left-[50%] translate-[-50%] w-[400px] h-[200px] flex-center">
       <div class="w-[120px] h-[120px] relative">
         <wu-count-down :begin="countDownBegin" :num="5" @count-down-end="countDownEnd" />
@@ -22,6 +29,7 @@
  */
 import EvaluationSTRecordInfoAPI from '@/api/tester/evaluation/stRecord'
 import { useUserStore } from '@/store'
+import { h } from 'vue'
 
 const isMainWin = ref(false)
 
@@ -55,6 +63,10 @@ const closeDialog = () => {
  */
 const handleSubmit = () => {}
 
+const handleClose = () => {
+  emits('close')
+}
+
 const countDownEnd = () => {
   countDownBegin.value = false
   showCountDown.value = false
@@ -89,7 +101,7 @@ onMounted(() => {
 
 <style scoped lang="scss">
 .boston-container {
-  background: url('/static/image/user/bg-evaluate.png') no-repeat 0 0 / 100% 100% border-box border-box fixed;
+  background: url('/static/image/cognitiveAbility/SpeechTraining/bg.png') no-repeat 0 0 / 100% 100% border-box fixed;
 
   .el-button + .el-button {
     margin-left: 0;

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

@@ -487,7 +487,6 @@ onUnmounted(() => {
  * @param optFlag 0:不清空画布  1:清空画布
  */
 function canvasToBase64ToStorage(optFlag: number) {
-  console.log(paintCanvas.value?.toDataURL('image/png') ?? '')
   localStorage.setItem(
     'tow-win-draw-clock-img-data',
     JSON.stringify({

+ 2 - 1
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskOralExpression/index.vue

@@ -89,7 +89,8 @@ onMounted(() => {
 
 <style scoped lang="scss">
 .boston-container {
-  background: url('/static/image/user/bg-evaluate.png') no-repeat 0 0 / 100% 100% border-box border-box fixed;
+  background: url('/static/image/cognitiveAbility/SpeechTraining/bg.png') no-repeat 0 0 / 100% 100% border-box
+    border-box fixed;
 
   .el-button + .el-button {
     margin-left: 0;

+ 15 - 9
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/index.vue

@@ -121,6 +121,10 @@ const props = defineProps({
     // 康复评定中评定任务的关联ID
     type: String,
     default: ''
+  },
+  mode: {
+    type: Number,
+    default: -1
   }
 })
 const userStore = useUserStore()
@@ -141,16 +145,18 @@ const resultId = ref()
 const handleClose = (closeFlag: number = 0) => {
   taskBegin.value = false
 
-  // 移除主副窗口标识
-  instance?.proxy?.$Bus.emit('tow-win-show-is-main-win')
-  localStorage.removeItem('tow-win-show-is-main-win')
+  if (props.mode === 0) {
+    // 移除主副窗口标识
+    instance?.proxy?.$Bus.emit('tow-win-show-is-main-win')
+    localStorage.removeItem('tow-win-show-is-main-win')
 
-  wsSend(
-    JSON.stringify({
-      dataSource: 'RehabilitationEvaluationLogIntro',
-      msg: 'close-other-win'
-    })
-  )
+    wsSend(
+      JSON.stringify({
+        dataSource: 'RehabilitationEvaluationLogIntro',
+        msg: 'close-other-win'
+      })
+    )
+  }
 
   if (closeFlag === 0) {
     emits('close')

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

@@ -50,7 +50,9 @@
       v-if="cognitionVisible"
       :cognition-id="props.id"
       :parent-id="props.parentId"
+      :mode="props.mode"
       :title="props.name"
+      @close="cognitionVisible = false"
       @close-all="closeIntro"
     />
   </div>