From 7d16f8200ccbc493fe9e4fe45d0f691e46035aaf Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 29 八月 2024 16:19:28 +0800
Subject: [PATCH] update

---
 src/views/ecg/queue/index.vue |   47 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/src/views/ecg/queue/index.vue b/src/views/ecg/queue/index.vue
index 1108742..eb58137 100644
--- a/src/views/ecg/queue/index.vue
+++ b/src/views/ecg/queue/index.vue
@@ -80,18 +80,18 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="璇婂缂栧彿" prop="roomNum">
+      <el-form-item label="璇婂缂栧彿" prop="roomId">
         <el-input
-          v-model="queryParams.roomNum"
+          v-model="queryParams.roomId"
           placeholder="璇疯緭鍏ヨ瘖瀹ょ紪鍙�"
           clearable
           @keyup.enter="handleQuery"
           class="!w-240px"
         />
       </el-form-item>
-      <el-form-item label="璇婄枟搴婂彿" prop="bedNum">
+      <el-form-item label="璇婄枟搴婂彿" prop="bedNo">
         <el-input
-          v-model="queryParams.bedNum"
+          v-model="queryParams.bedNo"
           placeholder="璇疯緭鍏ヨ瘖鐤楀簥鍙�"
           clearable
           @keyup.enter="handleQuery"
@@ -158,8 +158,9 @@
       </el-table-column>
       <el-table-column label="杩囧彿鏍囪" align="center" prop="passed" />
       <el-table-column label="杩囨湡鏍囪" align="center" prop="expired" />
-      <el-table-column label="璇婂缂栧彿" align="center" prop="roomNum" />
-      <el-table-column label="璇婄枟搴婂彿" align="center" prop="bedNum" />
+      <el-table-column label="璇婂缂栧彿" align="center" prop="roomId" />
+      <el-table-column label="璇婂鍚嶇О" align="center" prop="roomName" />
+      <el-table-column label="璇婄枟搴婂彿" align="center" prop="bedNo" />
       <el-table-column
         label="鍒涘缓鏃堕棿"
         align="center"
@@ -185,6 +186,15 @@
           >
             鍒犻櫎
           </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>
         </template>
       </el-table-column>
     </el-table>
@@ -204,8 +214,8 @@
 <script setup lang="ts">
 import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
-import { queueApi, queueVO } from '@/api/ecg/queue'
-import queueForm from './queueForm.vue'
+import { queueApi, QueueVO } from '@/api/ecg/queue'
+import queueForm from './QueueForm.vue'
 import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
 
 /** 鎺掗槦 鍒楄〃 */
@@ -215,7 +225,7 @@
 const { t } = useI18n() // 鍥介檯鍖�
 
 const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
-const list = ref<queueVO[]>([]) // 鍒楄〃鐨勬暟鎹�
+const list = ref<QueueVO[]>([]) // 鍒楄〃鐨勬暟鎹�
 const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
 const queryParams = reactive({
   pageNo: 1,
@@ -229,8 +239,8 @@
   status: undefined,
   passed: undefined,
   expired: undefined,
-  roomNum: undefined,
-  bedNum: undefined,
+  roomId: undefined,
+  bedNo: undefined,
   createTime: []
 })
 const queryFormRef = ref() // 鎼滅储鐨勮〃鍗�
@@ -279,6 +289,21 @@
   } catch {}
 }
 
+/** 鎻掗槦鎸夐挳鎿嶄綔 */
+const handleJump = async (item: QueueVO ) => {
+  try {
+    if (item.jumpFlag === 0)
+      item.jumpFlag = 1
+    else
+      item.jumpFlag = 0
+
+    const data = await queueApi.jumpQueue(item)
+    message.success(data)
+    // 鍒锋柊鍒楄〃
+    await getList()
+  } catch {}
+}
+
 /** 瀵煎嚭鎸夐挳鎿嶄綔 */
 const handleExport = async () => {
   try {

--
Gitblit v1.9.3