| | |
| | | <el-form-item label="诊室IP" prop="bedNo"> |
| | | <el-input v-model="formData.ip" placeholder="请输入诊室IP" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="检查类型" prop="checkTypes"> |
| | | <el-checkbox-group v-model="formData.checkTypes"> |
| | | <el-checkbox v-for="checkType in checkTypeDict" :value="checkType.value" :key="checkType.value">{{checkType.label}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> |
| | |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; |
| | | |
| | | /** 诊室和诊疗床 表单 */ |
| | | defineOptions({ name: 'RoomForm' }) |
| | |
| | | roomId: undefined, |
| | | roomName: undefined, |
| | | bedNo: undefined, |
| | | ip: undefined |
| | | ip: undefined, |
| | | checkTypes: undefined |
| | | }) |
| | | const formRules = reactive({ |
| | | roomId: [{ required: true, message: '诊室编号不能为空', trigger: 'blur' }], |
| | |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | | const roomListRef = ref<RoomVO[]>([]) // 列表的数据 |
| | | |
| | | const checkTypeDict = ref() |
| | | |
| | | /** 打开弹窗 */ |
| | | const open = async (type: string, id?: number) => { |
| | |
| | | return roomListRef.value.find( e => e.roomId === id)!.roomName |
| | | } |
| | | |
| | | const getCheckTypeList = () => { |
| | | const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE) |
| | | console.info( data ) |
| | | checkTypeDict.value = data |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(() => { |
| | | getSimpleRoomList() |
| | | getSimpleRoomList() |
| | | getCheckTypeList() |
| | | }) |
| | | |
| | | </script> |