From ca91f4cc8922979ebb8505e8fec60df50e6d2fb3 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 25 十月 2024 17:36:38 +0800
Subject: [PATCH] update

---
 src/views/ecg/devmanage/index.vue |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/views/ecg/devmanage/index.vue b/src/views/ecg/devmanage/index.vue
index 18cdb06..a16379f 100644
--- a/src/views/ecg/devmanage/index.vue
+++ b/src/views/ecg/devmanage/index.vue
@@ -152,6 +152,15 @@
           <el-button
               link
               type="primary"
+              @click="showPatient(scope.row.rentId)"
+              v-hasPermi="['ecg:device:update']"
+              v-if= scope.row.rentId
+          >
+            鏌ユ偅鑰�
+          </el-button>
+          <el-button
+              link
+              type="primary"
               @click="openForm('update', scope.row.id)"
               v-hasPermi="['ecg:device:update']"
           >
@@ -163,7 +172,7 @@
               @click="openForm('devState', scope.row.id)"
               v-hasPermi="['ecg:device:update']"
           >
-            璁惧鐘舵��
+            鏀圭姸鎬�
           </el-button>
           <el-button
               link
@@ -190,12 +199,14 @@
 </template>
 
 <script setup lang="ts">
-import {getStrDictOptions, DICT_TYPE, DictDataType, getIntDictOptions} from '@/utils/dict'
+import { ElMessageBox } from 'element-plus'
+import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict'
 import {dateFormatter2} from '@/utils/formatTime'
 import {DevStateOptions, tranlateDevState} from "@/utils/statusFormatter";
 import download from '@/utils/download'
 import {DeviceApi, DeviceVO, DevModelApi, OptionsVO} from '@/api/ecg/devmanage'
 import DeviceForm from './DeviceForm.vue'
+import {DevRentApi} from "@/api/ecg/devrent";
 
 /** 璁惧 鍒楄〃 */
 defineOptions({ name: 'Device' })
@@ -248,6 +259,13 @@
   handleQuery()
 }
 
+const showPatient = async (rentId: number) => {
+  if (!rentId) return
+
+  const devRent = await DevRentApi.getDevRent(rentId)
+  ElMessageBox.alert(devRent.patDetails, '鎮h�呬俊鎭�');
+}
+
 /** 娣诲姞/淇敼鎿嶄綔 */
 const formRef = ref()
 const openForm = (type: string, id?: number) => {

--
Gitblit v1.9.3