From 9125541bf113a2d07ad84e7ed9fb1506dbde813f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 24 十月 2024 16:57:48 +0800
Subject: [PATCH] update
---
src/utils/statusFormatter.ts | 11 +++--
src/views/ecg/doctor/components/RoutinePanel.vue | 14 ++++--
src/views/ecg/devmanage/index.vue | 9 ++--
src/views/ecg/doctor/components/DevInstallPanel.vue | 29 ++++----------
src/views/ecg/doctor/components/DevReadyPanel.vue | 7 ++-
5 files changed, 34 insertions(+), 36 deletions(-)
diff --git a/src/utils/statusFormatter.ts b/src/utils/statusFormatter.ts
index 64ebebc..f1cb570 100644
--- a/src/utils/statusFormatter.ts
+++ b/src/utils/statusFormatter.ts
@@ -1,5 +1,7 @@
-
-const DevStateOptions = [
+/**
+ * 鍙彿灞忎娇鐢�
+ */
+export const DevStateOptions = [
{label: "绌洪棽", value: 0},
{label: "宸查鐢�", value: 5},
{label: "宸茶鏈�", value: 10},
@@ -14,6 +16,9 @@
return undefined !== stateOption ? stateOption.label : ''
}
+/**
+ * 鍙彿灞忎娇鐢�
+ */
export const queueStatusConvert = (status: number) => {
if (5 === status)
return '宸茶繃鍙�';
@@ -39,5 +44,3 @@
return '鏈畾涔�';
}
-
-
diff --git a/src/views/ecg/devmanage/index.vue b/src/views/ecg/devmanage/index.vue
index d6a483c..18cdb06 100644
--- a/src/views/ecg/devmanage/index.vue
+++ b/src/views/ecg/devmanage/index.vue
@@ -31,12 +31,13 @@
<el-form-item label="鐘舵��" prop="state">
<el-select
v-model="queryParams.state"
+ multiple
placeholder="璇烽�夋嫨鐘舵��"
clearable
class="!w-240px"
>
<el-option
- v-for="dict in stateOptions"
+ v-for="dict in DevStateOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -189,9 +190,9 @@
</template>
<script setup lang="ts">
-import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict'
+import {getStrDictOptions, DICT_TYPE, DictDataType, getIntDictOptions} from '@/utils/dict'
import {dateFormatter2} from '@/utils/formatTime'
-import {tranlateDevState} from "@/utils/statusFormatter";
+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'
@@ -211,7 +212,7 @@
purchaseDate: [],
createTime: [],
devId: undefined,
- state: undefined,
+ state: [],
category: undefined,
brand: undefined,
model: undefined
diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 9aafa5f..b620d7d 100644
--- a/src/views/ecg/doctor/components/DevInstallPanel.vue
+++ b/src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -132,8 +132,10 @@
const emit = defineEmits(['event_dev_install']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
const setPatient = (queueVO: QueueVO | undefined) => {
+ resetForm()
formData.value.patId = queueVO?.patId
- getRentInfoByPatId()
+ formData.value.patName = queueVO?.patName
+ getReadyRentInfo()
}
defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
@@ -214,18 +216,6 @@
formData.value.model = data === null ? "" : data.model
}
-/*
-const getRentInfoByDevId = () => {
- const tempDevId = formData.value.devId;
- resetForm()
- if (isStringEmpty(tempDevId))
- return
-
- formData.value.devId = tempDevId;
- getRentInfo()
-}
-*/
-
const getRentInfoByPatId = () => {
const tempPatId = formData.value.patId;
resetForm()
@@ -233,19 +223,18 @@
return
formData.value.patId = tempPatId;
- getRentInfo()
+ getReadyRentInfo(formData.value)
}
-const getRentInfo = async () => {
- const data = await DevRentApi.getReadyRent(formData.value)
+const getReadyRentInfo = async (devRentVO) => {
+ const data = await DevRentApi.getReadyRent(devRentVO)
if (null === data)
return
- formData.value = data
- if (data.returnTime === null)
- data.returnTime = new Date().getTime()
+ // formData.value = data //涓嶈兘鏁翠釜璧嬪�硷紝 榛樿瑁呮満鏃堕棿琚竻绌�
+ formData.value.id = data.id;
+ formData.value.patDetails = data.patDetails
}
-
const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
const list = ref<JobRecordVO[]>([]) // 鍒楄〃鐨勬暟鎹�
diff --git a/src/views/ecg/doctor/components/DevReadyPanel.vue b/src/views/ecg/doctor/components/DevReadyPanel.vue
index d7771ed..e273b17 100644
--- a/src/views/ecg/doctor/components/DevReadyPanel.vue
+++ b/src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -27,12 +27,12 @@
<el-form-item label="璁惧鎻忚堪" prop="">
{{deviceInfo.brand + " " + deviceInfo.model + " " + deviceInfo.state}}
</el-form-item>
- <el-form-item label="瑁呮満鏃堕棿" prop="rentTime">
+ <el-form-item label="棰嗙敤鏃堕棿" prop="rentTime">
<el-date-picker
v-model="formData.rentTime"
type="date"
value-format="x"
- placeholder="閫夋嫨瑁呮満鏃堕棿"
+ placeholder="閫夋嫨棰嗙敤鏃堕棿"
/>
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
@@ -209,7 +209,8 @@
return
// formDate 瀵瑰簲 DevRent
- // formData.value = data //涓嶈兘鏁翠釜璧嬪�硷紝1.浼氬鑷� rent_id 鍑虹幇浠庤�屽奖鍝嶅悗绔�昏緫澶勭悊锛�2. 榛樿瑁呮満鏃堕棿琚竻绌�
+ // formData.value = data //涓嶈兘鏁翠釜璧嬪�硷紝 榛樿棰嗙敤鏃堕棿琚竻绌�
+ formData.value.id = data.id;
formData.value.patDetails = data.patDetails
}
diff --git a/src/views/ecg/doctor/components/RoutinePanel.vue b/src/views/ecg/doctor/components/RoutinePanel.vue
index 26d038d..9023179 100644
--- a/src/views/ecg/doctor/components/RoutinePanel.vue
+++ b/src/views/ecg/doctor/components/RoutinePanel.vue
@@ -126,8 +126,10 @@
const emit = defineEmits(['event_routine']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
const setPatient = (queueVO: QueueVO | undefined) => {
+ resetForm()
formData.value.patId = queueVO?.patId
- getRentInfoByPatId()
+ formData.value.patName = queueVO?.patName
+ getFreeRentInfo(formData.value)
}
defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
@@ -200,16 +202,18 @@
return
formData.value.patId = tempPatId;
- getFreeRentInfo()
+ getFreeRentInfo(formData.value)
}
-const getFreeRentInfo = async () => {
- const data = await DevRentApi.getFreeRent(formData.value)
+const getFreeRentInfo = async (devRentVO) => {
+ const data = await DevRentApi.getFreeRent(devRentVO)
if (null === data)
return
// formDate 瀵瑰簲 DevRent
- formData.value = data
+ // formData.value = data //涓嶈兘鏁翠釜璧嬪�硷紝 榛樿棰嗙敤鏃堕棿琚竻绌�
+ formData.value.id = data.id;
+ formData.value.patDetails = data.patDetails
}
--
Gitblit v1.9.3