From 90de3fa97572d645e9da576f751257c913736e82 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 24 十月 2024 11:10:10 +0800
Subject: [PATCH] bug fix
---
src/views/ecg/room/RoomForm.vue | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/views/ecg/room/RoomForm.vue b/src/views/ecg/room/RoomForm.vue
index def39ed..1dfcfa8 100644
--- a/src/views/ecg/room/RoomForm.vue
+++ b/src/views/ecg/room/RoomForm.vue
@@ -26,7 +26,7 @@
<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 v-for="checkType in checkTypeStore.getCheckTypeOptions()" :value="checkType.value" :key="checkType.value">{{checkType.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
@@ -48,12 +48,15 @@
<script setup lang="ts">
import { RoomApi, RoomVO } from '@/api/ecg/room'
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
+import {CheckTypeApi} from "@/api/ecg/checktype";
/** 璇婂鍜岃瘖鐤楀簥 琛ㄥ崟 */
defineOptions({ name: 'RoomForm' })
const { t } = useI18n() // 鍥介檯鍖�
const message = useMessage() // 娑堟伅寮圭獥
+
+const checkTypeStore = useCheckTypeStore();
const dialogVisible = ref(false) // 寮圭獥鐨勬槸鍚﹀睍绀�
const dialogTitle = ref('') // 寮圭獥鐨勬爣棰�
@@ -74,8 +77,6 @@
})
const formRef = ref() // 琛ㄥ崟 Ref
const roomListRef = ref<RoomVO[]>([]) // 鍒楄〃鐨勬暟鎹�
-
-const checkTypeDict = ref()
/** 鎵撳紑寮圭獥 */
const open = async (type: string, id?: number) => {
@@ -141,16 +142,9 @@
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()
- getCheckTypeList()
})
</script>
--
Gitblit v1.9.3