Преглед на файлове

言语功能训练认知任务 10%

JutarryWu преди 2 седмици
родител
ревизия
c296009fdc

+ 1 - 0
src/api/tester/evaluation/scale.ts

@@ -97,6 +97,7 @@ export interface EvaluationScaleVO {
   /** 参考文献 */
   reference?: string
   /** 评定-量表创建时间 */
+  type?: string
   ctime?: string
   cuser?: string
   note?: string

+ 6 - 6
src/utils/websoket.ts

@@ -43,25 +43,25 @@ class Socket {
   }
   //打开
   onOpen(event: Event) {
-    console.log('WebSocket opened:', event)
+    // console.log('WebSocket opened:', event)
     this.reconnectAttempts = 0
     this.startHeartbeat()
     this.emit('open', event)
   }
   //收到的WebSocket消息
   onMessage(event: MessageEvent) {
-    console.log('WebSocket message received:', event.data)
+    // console.log('WebSocket message received:', event.data)
     this.emit('message', event.data)
   }
   //错误
   onError(event: Event) {
-    console.error('WebSocket error:', event)
+    // console.error('WebSocket error:', event)
     this.emit('error', event)
   }
   //重连逻辑中,在连接失败后自动重新连接
   onClose(event: CloseEvent) {
-    console.log('WebSocket closed:', event)
-    this.stopHeartbeat()
+    // console.log('WebSocket closed:', event)
+    // this.stopHeartbeat()
     this.emit('close', event)
     // 重连逻辑中,在连接失败后自动重新连接,但会限制重连的次数和每次重连之间的间隔时间
     if (this.opts.maxReconnectAttempts !== 0 && this.reconnectAttempts < this.opts.maxReconnectAttempts!) {
@@ -117,7 +117,7 @@ class Socket {
 }
 
 export function useSocket(url: string = import.meta.env.VITE_WEBSOCKET_SERVER, opts?: SocketOptions) {
-  console.log('websocket-url: ', url)
+  // console.log('websocket-url: ', url)
   const socket = new Socket(url, opts)
 
   onUnmounted(() => {

+ 6 - 1
src/views/gameCenter/components/Introduction/index.vue

@@ -26,7 +26,12 @@
       </div>
 
       <div class="w-full flex-center mt-[200px]">
-        <el-button type="primary" @click="beginGame()" size="large" class="text-[24px] p-x-[48px] p-y-[24px]">
+        <el-button
+          type="primary"
+          @click="beginGame()"
+          size="large"
+          class="text-[24px] p-x-[48px] p-y-[2px] flex-center"
+        >
           开始游戏
         </el-button>
       </div>

+ 10 - 3
src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationLogDetail/index.vue

@@ -10,7 +10,11 @@
           :key="`scale-${index}`"
           class="d-list-item m-[12px] rounded-[8px] flex flex-row"
         >
-          <el-image :src="`static/image/cover/icon-item-${parseInt(<string>item.id) % 9}.png`" fit="fill" class="w-[190px] h-full" />
+          <el-image
+            :src="`static/image/cover/icon-item-${parseInt(<string>item.id) % 9}.png`"
+            fit="fill"
+            class="w-[190px] h-full"
+          />
           <div class="flex-1 p-[16px] pos-relative">
             <div class="text-[20px] font-600 line-height-[24px]">{{ item.sname }}</div>
             <div class="text-[15px] text-[#666] mt-[8px] text-2-ellipsis">{{ item.info?.intro }}</div>
@@ -80,6 +84,7 @@
         :parent-id="targetItem.parentId"
         :id="targetItem.id"
         :name="targetItem.name"
+        :mode="targetItem.mode"
         @close="showInfoDetail = false"
       />
     </right-to-left-div>
@@ -119,7 +124,8 @@ const targetItem = ref({
   type: 0,
   parentId: '',
   id: '',
-  name: ''
+  name: '',
+  mode: -1
 })
 
 /**
@@ -141,7 +147,8 @@ const beginTest = (item: EvaluationScaleSubjectVO | EvaluationCognitionSubjectVO
       type: type,
       parentId: item.id!, // 康复评定中评定任务的关联ID
       id: type === 0 ? item.subjectId! : item.taskId!, // 评定任务的真实ID
-      name: type === 0 ? item.sname! : item.tname!
+      name: type === 0 ? item.sname! : item.tname!,
+      mode: type === 0 ? 2 : Number(item.info!.type) // 0:双人模式 1:单人模式 2:量表无模式
     }
     showInfoDetail.value = true
 

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

@@ -85,6 +85,10 @@ const props = defineProps({
   name: {
     type: String,
     default: ''
+  },
+  mode: {
+    type: Number,
+    default: -1
   }
 })
 
@@ -125,7 +129,7 @@ function optTestPage() {
   }
 
   // 如果是副窗口 则通知Electron打开住窗口 并启动显示主副标识程序
-  if (!window.location.href.includes('win=main')) {
+  if (props.mode === 0 && !window.location.href.includes('win=main')) {
     // 设置主副窗口标识: instance用来通知当前窗口显示主副标识  localStorage用来通知其他窗口显示主副标识
     instance?.proxy?.$Bus.emit('tow-win-show-is-main-win', 'YES')
     localStorage.setItem('tow-win-show-is-main-win', 'YES')

+ 6 - 1
src/views/tester/components/RehabilitationEvaluation/RehabilitationEvaluationMgr/components/RehabilitationEvaluationMgrCognition/index.vue

@@ -37,7 +37,12 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" min-width="1" align="center" :reserve-selection="true" />
-        <el-table-column prop="name" label="认知任务名称" min-width="5" />
+        <el-table-column prop="name" label="认知任务名称" min-width="5">
+          <template #default="scope">
+            <span class="inline-block mr-12px">{{ scope.row.name }}</span>
+            <el-tag v-if="scope.row.type === '0'" type="primary" size="small">双人模式</el-tag>
+          </template>
+        </el-table-column>
         <el-table-column prop="intro" label="简介" show-overflow-tooltip min-width="19" />
       </el-table>