diff --git a/openhis-ui-vue3/src/views/appoinmentmanage/index.vue b/openhis-ui-vue3/src/views/appoinmentmanage/index.vue
index 4c899ffd..84acf0c7 100644
--- a/openhis-ui-vue3/src/views/appoinmentmanage/index.vue
+++ b/openhis-ui-vue3/src/views/appoinmentmanage/index.vue
@@ -9,16 +9,12 @@
-
+
-
-
-
-
-
+
查询
@@ -131,6 +127,7 @@ import { ref, onMounted } from 'vue'
import { ElMessage, ElDialog, ElSelect, ElOption, ElInput, ElForm, ElFormItem } from 'element-plus'
import { EditPen, View, DocumentRemove } from '@element-plus/icons-vue'
import { listDept, searchDept } from '@/api/appoinmentmanage/dept'
+import { getLocationTree } from '@/views/charge/outpatientregistration/components/outpatientregistration'
// 查询参数
const queryParams = ref({
@@ -138,6 +135,9 @@ const queryParams = ref({
deptName: ''
})
+// 科室选项列表
+const departmentOptions = ref([])
+
// 科室列表
const deptList = ref([])
@@ -276,9 +276,44 @@ const handleCurrentChange = (current) => {
getDeptList()
}
+// 获取门诊挂号的就诊科室数据
+const getDepartmentOptions = async () => {
+ try {
+ const response = await getLocationTree()
+ if (response.code === 200) {
+ // 适配不同的后端数据结构
+ let actualData = response.data
+ // 处理嵌套data结构
+ if (actualData && actualData.code === 200 && actualData.msg) {
+ actualData = actualData.data
+ }
+
+ // 确保数据是数组格式
+ if (Array.isArray(actualData)) {
+ departmentOptions.value = actualData
+ } else if (actualData && actualData.records) {
+ departmentOptions.value = actualData.records
+ } else if (actualData && actualData.content) {
+ departmentOptions.value = actualData.content
+ } else if (actualData && actualData.list) {
+ departmentOptions.value = actualData.list
+ } else {
+ departmentOptions.value = []
+ }
+ } else {
+ console.error('获取科室列表失败:', response.msg)
+ departmentOptions.value = []
+ }
+ } catch (error) {
+ console.error('获取科室列表失败:', error)
+ departmentOptions.value = []
+ }
+}
+
// 页面加载时获取科室列表
onMounted(() => {
getDeptList()
+ getDepartmentOptions()
})