From 1b145b5655fa023032c8713bb2375bccdf0fc314 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 24 十月 2024 11:13:40 +0800
Subject: [PATCH] 领用完成后 立即刷新 患者列表

---
 src/views/ecg/queue/index.vue |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/views/ecg/queue/index.vue b/src/views/ecg/queue/index.vue
index c226d11..32f3639 100644
--- a/src/views/ecg/queue/index.vue
+++ b/src/views/ecg/queue/index.vue
@@ -49,7 +49,7 @@
           class="!w-240px"
         >
           <el-option
-            v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)"
+            v-for="dict in checkTypeStore.getCheckTypeOptions()"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
@@ -129,6 +129,7 @@
       <el-table-column label="鎮h�呯紪鍙�" align="center" prop="patId" />
       <el-table-column label="鎮h�呭鍚�" align="center" prop="patName" />
       <el-table-column label="鎮h�呮�у埆" align="center" prop="patGender" />
+      <el-table-column label="鎮h�呰鎯�" align="center" prop="patDetails" />
       <el-table-column label="棰勭害鏃舵" align="center" prop="bookTimeslot" >
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.ECG_BOOK_TIMESLOT" :value="scope.row.bookTimeslot" />
@@ -136,7 +137,7 @@
       </el-table-column>
       <el-table-column label="妫�鏌ョ被鍨�" align="center" prop="bookCheckType" >
         <template #default="scope">
-          <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="scope.row.bookCheckType" />
+          {{checkTypeStore.getCheckTypeName(scope.row.bookCheckType)}}
         </template>
       </el-table-column>
         <el-table-column label="鎺掗槦搴忓彿" align="center" prop="seqNum" />
@@ -184,6 +185,15 @@
           >
             {{scope.row.jumpFlag === 0? "鎻掗槦" : "鍙栨秷鎻掗槦"}}
           </el-button>
+          <el-button
+            link
+            type="danger"
+            @click="recall(scope.row)"
+            v-if="scope.row.status === 5"
+            v-hasPermi="['ecg:queue:recall']"
+          >
+            鍙洖
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -206,12 +216,16 @@
 import { QueueApi, QueueVO } from '@/api/ecg/queue'
 import queueForm from './QueueForm.vue'
 import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
+import {DoctorApi, PatientVO} from "@/api/ecg/doctor";
+import {useCheckTypeStore} from "@/store/modules/checkType";
 
 /** 鎺掗槦 鍒楄〃 */
 defineOptions({ name: 'queue' })
 
 const message = useMessage() // 娑堟伅寮圭獥
 const { t } = useI18n() // 鍥介檯鍖�
+
+const checkTypeStore = useCheckTypeStore();
 
 const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
 const list = ref<QueueVO[]>([]) // 鍒楄〃鐨勬暟鎹�
@@ -222,6 +236,7 @@
   patId: undefined,
   patName: undefined,
   patGender: undefined,
+  patDetails: undefined,
   bookTimeslot: undefined,
   bookCheckType: undefined,
   seqNum: undefined,
@@ -292,6 +307,20 @@
   } catch {}
 }
 
+const recall = async (item: QueueVO) => {
+  const patientVO: PatientVO = {
+    roomId: item.roomId,
+    bedNo: item.bedNo,
+    patId: item.patId,
+    jumpFlag: 0
+  }
+
+  const data = await DoctorApi.recallPatient(patientVO);
+  message.info(data)
+  // 鍒锋柊鍒楄〃
+  await getList()
+}
+
 /** 瀵煎嚭鎸夐挳鎿嶄綔 */
 const handleExport = async () => {
   try {

--
Gitblit v1.9.3