From d0c98269795e8f5656eb5c509e3d9d286206ac19 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 28 十一月 2024 18:06:08 +0800
Subject: [PATCH] 排队中 允许 过号操作
---
src/utils/statusFormatter.ts | 4 +
src/api/ecg/doctor/index.ts | 10 +++
src/views/ecg/queue/index.vue | 113 ++++++++++++++++++++++---------------
3 files changed, 81 insertions(+), 46 deletions(-)
diff --git a/src/api/ecg/doctor/index.ts b/src/api/ecg/doctor/index.ts
index 0cdf94e..fd515d5 100644
--- a/src/api/ecg/doctor/index.ts
+++ b/src/api/ecg/doctor/index.ts
@@ -114,6 +114,16 @@
return await request.get({ url: `/ecg/doctor/get-dev-install-statistic`, params })
},
+ // 杩囧彿 [鎺掗槦涓璢 鎮h��
+ passWaitingPatient: async (params: PatientVO) => {
+ return await request.get({ url: `/ecg/doctor/pass-waiting-patient`, params })
+ },
+
+ // 鍙洖 [杩囧彿-鎺掗槦涓璢 鎮h��
+ recallPassWaitingPatient: async (params: PatientVO) => {
+ return await request.get({ url: `/ecg/doctor/recall-pass-waiting-patient`, params })
+ },
+
// 鍙洖杩囧彿鎮h��
recallPatient: async (params: PatientVO) => {
return await request.get({ url: `/ecg/doctor/recall-patient`, params })
diff --git a/src/utils/statusFormatter.ts b/src/utils/statusFormatter.ts
index 60441a8..7b3ac10 100644
--- a/src/utils/statusFormatter.ts
+++ b/src/utils/statusFormatter.ts
@@ -20,7 +20,9 @@
* 鍙彿灞忎娇鐢�
*/
export const queueStatusConvert = (status: number) => {
- if (5 === status)
+ if (3 === status)
+ return '宸茶繃鍙�-鎺掗槦';
+ else if (5 === status)
return '宸茶繃鍙�';
else if (7 === status)
return '宸茶繃鍙�-瀹夎';
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