This commit is contained in:
Your Name
2026-03-18 14:53:09 +08:00
parent 338b104d50
commit 7832514f28
315 changed files with 7071 additions and 1136 deletions
+11 -2
View File
@@ -108,7 +108,9 @@
<!-- 所属科室 -->
<el-form-item label="所属科室" prop="department">
<el-input v-model="formData.department" placeholder="如:中医科、内科" clearable />
<el-select v-model="formData.department" placeholder="请选择所属科室" clearable class="flex-1">
<el-option v-for="item in departmentOptions" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
</el-form-item>
<!-- 擅长领域 -->
@@ -209,6 +211,7 @@ import type { FormInstance } from 'element-plus'
import { adminAdd, adminDetail, adminEdit } from '@/api/perms/admin'
import { deptAll } from '@/api/org/department'
import { jobsAll } from '@/api/org/post'
import { getDictData } from '@/api/app'
import { useDictOptions } from '@/hooks/useDictOptions'
import feedback from '@/utils/feedback'
@@ -218,6 +221,12 @@ const visible = ref(false)
const mode = ref('add')
const loading = ref(false)
const departmentOptions = ref<any[]>([])
const fetchDepartmentOptions = async () => {
const data = await getDictData({ type: 'department' })
departmentOptions.value = data?.department || []
}
const drawerTitle = computed(() => {
return mode.value == 'edit' ? '编辑医助' : '新增医助'
})
@@ -345,7 +354,7 @@ const handleSubmit = async () => {
const open = (type = 'add') => {
mode.value = type
visible.value = true
fetchDepartmentOptions()
// 重置表单
if (type === 'add') {
Object.assign(formData, {