src/utils/statusFormatter.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/devmanage/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/doctor/components/DevInstallPanel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/doctor/components/DevReadyPanel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/doctor/components/RoutinePanel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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 '未定义'; } 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 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[]>([]) // 列表的数据 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 } 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 }