From d0c98269795e8f5656eb5c509e3d9d286206ac19 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 28 十一月 2024 18:06:08 +0800
Subject: [PATCH] 排队中 允许 过号操作

---
 src/views/ecg/queue/index.vue |  113 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 68 insertions(+), 45 deletions(-)

diff --git a/src/views/ecg/queue/index.vue b/src/views/ecg/queue/index.vue
index 175be25..669df7d 100644
--- a/src/views/ecg/queue/index.vue
+++ b/src/views/ecg/queue/index.vue
@@ -130,6 +130,55 @@
   <!-- 鍒楄〃 -->
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
+      <el-table-column label="鎿嶄綔" align="center" min-width="120px">
+        <template #default="scope">
+<!--          <el-button
+              link
+              type="primary"
+              @click="openAppointmentForm('preview', scope.row.patId, scope.row.bookCheckType)"
+              v-hasPermi="['ecg:appointment:preview']"
+          >
+            鏌ョ湅
+          </el-button>-->
+          <!--
+                    <el-button
+                      link
+                      type="danger"
+                      @click="handleDelete(scope.row.id)"
+                      v-hasPermi="['ecg:queue:delete']"
+                    >
+                      鍒犻櫎
+                    </el-button>
+          -->
+          <el-button
+              link
+              type="danger"
+              @click="handleJump(scope.row)"
+              v-if="scope.row.status === 10"
+              v-hasPermi="['ecg:queue:jump']"
+          >
+            {{scope.row.jumpFlag === 0? "鍔犳��" : "鍙栨秷鍔犳��"}}
+          </el-button>
+          <el-button
+              link
+              type="danger"
+              @click="recall(scope.row)"
+              v-if="scope.row.status === 3 || scope.row.status === 5 || scope.row.status === 7"
+              v-hasPermi="['ecg:queue:recall']"
+          >
+            鍙洖
+          </el-button>
+          <el-button
+              link
+              type="danger"
+              @click="passWaitingPatient(scope.row)"
+              v-if="scope.row.status === 10"
+              v-hasPermi="['ecg:queue:pass']"
+          >
+            杩囧彿
+          </el-button>
+        </template>
+      </el-table-column>
 <!--      <el-table-column label="id" align="center" prop="id" />-->
       <el-table-column label="灏辫瘖娴佹按鍙�" align="center" prop="episodeId" min-width="150px"/>
       <el-table-column label="鎮h�呯紪鍙�" align="center" prop="patId" />
@@ -148,19 +197,19 @@
           <span>{{scope.row.patDetails?.mobile}} {{scope.row.patDetails?.wardDesc}} {{scope.row.patDetails?.bedNo}}</span>
         </template>
       </el-table-column>
-      <el-table-column label="棰勭害鏃舵" align="center" prop="bookTimeslot" >
+      <el-table-column label="棰勭害鏃舵" align="center" prop="bookTimeslot" min-width="100px">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.ECG_BOOK_TIMESLOT" :value="scope.row.bookTimeslot" />
         </template>
       </el-table-column>
-      <el-table-column label="棰勭害鍙�" align="center" prop="bookSeqNum" />
-      <el-table-column label="鎺掗槦鍙�" align="center" prop="seqNum" />
-      <el-table-column label="VIP" align="center" prop="isVip" />
       <el-table-column label="鐘舵��" align="center" prop="status" >
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
+      <el-table-column label="棰勭害鍙�" align="center" prop="bookSeqNum" />
+      <el-table-column label="鎺掗槦鍙�" align="center" prop="seqNum" />
+      <el-table-column label="VIP" align="center" prop="isVip" />
       <el-table-column label="杩囧彿鏍囪" align="center" prop="passed" />
       <el-table-column label="杩囨湡鏍囪" align="center" prop="expired" />
       <el-table-column label="璇婂缂栧彿" align="center" prop="roomId" />
@@ -173,46 +222,6 @@
         :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="鎿嶄綔" align="center" min-width="120px">
-        <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            @click="openAppointmentForm('preview', scope.row.patId, scope.row.bookCheckType)"
-            v-hasPermi="['ecg:appointment:preview']"
-          >
-            鏌ョ湅
-          </el-button>
-<!--
-          <el-button
-            link
-            type="danger"
-            @click="handleDelete(scope.row.id)"
-            v-hasPermi="['ecg:queue:delete']"
-          >
-            鍒犻櫎
-          </el-button>
--->
-          <el-button
-            link
-            type="danger"
-            @click="handleJump(scope.row)"
-            v-if="scope.row.status === 10"
-            v-hasPermi="['ecg:queue:jump']"
-          >
-            {{scope.row.jumpFlag === 0? "鍔犳��" : "鍙栨秷鍔犳��"}}
-          </el-button>
-          <el-button
-            link
-            type="danger"
-            @click="recall(scope.row)"
-            v-if="scope.row.status === 5 || scope.row.status === 7"
-            v-hasPermi="['ecg:queue:recall']"
-          >
-            鍙洖
-          </el-button>
-        </template>
-      </el-table-column>
     </el-table>
     <!-- 鍒嗛〉 -->
     <Pagination
@@ -331,6 +340,18 @@
   } catch {}
 }
 
+const passWaitingPatient = async (item: QueueVO) => {
+  const patientVO: PatientVO = {
+    patId: item.patId,
+    checkType: item.bookCheckType,
+  }
+
+  const data = await DoctorApi.passWaitingPatient(patientVO);
+  message.info(data)
+  // 鍒锋柊鍒楄〃
+  await getList()
+}
+
 const recall = async (item: QueueVO) => {
   const patientVO: PatientVO = {
     roomId: item.roomId,
@@ -343,7 +364,9 @@
   }
 
   let data = ""
-  if (item.status === 5) // 甯歌銆侀鐢� 杩囧彿
+  if (item.status === 3) // 鎺掗槦涓� 鎮h�� 杩囧彿
+    data = await DoctorApi.recallPassWaitingPatient(patientVO);
+  else if (item.status === 5) // 甯歌銆侀鐢� 杩囧彿
     data = await DoctorApi.recallPatient(patientVO);
   else if (item.status === 7)
     data = await DoctorApi.recallInstallPatient(patientVO);

--
Gitblit v1.9.3