From ca0fdc71abca0635a7ba0bc905fa93a05384cb5d Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 20 九月 2024 16:08:30 +0800
Subject: [PATCH] 装机界面 显示设备详情
---
src/views/ecg/doctor/components/DevInstallPanel.vue | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 8661eee..d6bfecb 100644
--- a/src/views/ecg/doctor/components/DevInstallPanel.vue
+++ b/src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -8,7 +8,10 @@
v-loading="formLoading"
>
<el-form-item label="璁惧缂栧彿" prop="devId">
- <el-input v-model="formData.devId" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" />
+ <el-input v-model="formData.devId" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" @input="getDevInfo"/>
+ </el-form-item>
+ <el-form-item label="璁惧鎻忚堪" prop="">
+ {{deviceInfo.brand + " " + deviceInfo.model}}
</el-form-item>
<el-form-item label="瑁呮満鏃堕棿" prop="rentTime">
<el-date-picker
@@ -28,13 +31,13 @@
<el-button @click="cancelInstall" :disabled="formLoading">鏀惧純瑁呮満</el-button>
- <!-- 鍖荤敓鎷嗘満鍒楄〃 -->
+ <!-- 鍖荤敓瑁呮満鍒楄〃 -->
<ContentWrap>
- <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @current-change="onCurChange" >
+ <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="onRowClick" >
<el-table-column label="id" align="center" prop="id" />
- <el-table-column label="--" align="center" prop="cancelled" >
+ <el-table-column label="瑁呮満鎯呭喌" align="center" prop="cancelled" >
<template #default="scope">
- {{scope.row.cancelled == 1 ? "鏀惧純" : ""}}
+ {{scope.row.cancelled == 1 ? "鏀惧純" : "瀹屾垚"}}
</template>
</el-table-column>
<!-- <el-table-column label="浣滀笟绫诲瀷" align="center" prop="jobType" />-->
@@ -47,7 +50,8 @@
label="浣滀笟鏃堕棿"
align="center"
prop="jobTime"
- :formatter="timeFormatter"
+ :formatter="dateFormatter"
+ width="180px"
/>
<!-- <el-table-column label="浣滀笟姒傝" align="center" prop="summary" />-->
<el-table-column label="澶囨敞" align="center" prop="remark" />
@@ -100,6 +104,7 @@
import {isStringEmpty} from "@/utils/stringUtil";
import {dateFormatter, timeFormatter} from "@/utils/formatTime";
import {JobRecordApi, JobRecordVO} from "@/api/ecg/jobrecord";
+import {DeviceApi, DeviceVO} from "@/api/ecg/devmanage";
/** 瑁呮満鎷嗘満 琛ㄥ崟 */
defineComponent({ name: 'DevInstallPanel' })
@@ -138,6 +143,16 @@
patName: [{ required: true, message: '鐩墠娌℃湁鎮h��', trigger: 'blur' }]
})
const formRef = ref() // 琛ㄥ崟 Ref
+
+const deviceInfo = ref<DeviceVO> ({
+ id: 0,
+ devId: '',
+ category: '',
+ brand: '',
+ model: '',
+ purchaseDate: 0,
+ lost: 0,
+})
/** 鎻愪氦琛ㄥ崟 */
const submitForm = async () => {
@@ -234,7 +249,7 @@
}
}
-const onCurChange = (cur) => {
+const onRowClick = (cur) => {
if (cur !== null)
getSelectedRent( cur.rentId )
}
@@ -251,6 +266,19 @@
})
}
+const getDevInfo = async () => {
+ deviceInfo.value.category = ''
+ deviceInfo.value.brand = ''
+ deviceInfo.value.model = ''
+ if (isStringEmpty(formData.value.devId))
+ return
+
+ const data = await DeviceApi.getDeviceByDevId(formData.value.devId!)
+ console.info( data )
+ if ( null !== data)
+ deviceInfo.value = data
+}
+
/** 鍒濆鍖� **/
onMounted(() => {
getList()
--
Gitblit v1.9.3