移除调用字典接口功能

This commit is contained in:
wangjian963
2026-01-22 09:20:35 +08:00
parent 34dd969cb4
commit 19ada4ace9

View File

@@ -419,40 +419,10 @@ import {ElMessage, ElMessageBox} from 'element-plus'
import {deleteInspectionApplication, getInspectionApplicationList, saveInspectionApplication} from '../api' import {deleteInspectionApplication, getInspectionApplicationList, saveInspectionApplication} from '../api'
import useUserStore from '@/store/modules/user.js' import useUserStore from '@/store/modules/user.js'
import {storeToRefs} from 'pinia' import {storeToRefs} from 'pinia'
import {listType} from "@/api/system/dict/type.js";
// const getCurrentDeptCode = async () => {
// // try {
// const res = await listType({ dictType: 'dept' }); // 按字典类型查询科室
// console.log('【检验】获取科室字典数据:', res.data)
// deptOptions.value = res.data;
// console.log('【检验】科室字典数据:',deptOptions.value)
// // 获取当前科室名称(来自患者信息)
// const currentDeptName = props.patientInfo?.organizationName;
// console.log('【检验】当前科室名称:', currentDeptName)
//
// // 根据当前科室名称查找对应的编码
// const deptItem = res.data.find(item => item.dictLabel === currentDeptName);
// console.log('【检验】找到的科室名称:', deptItem)
// if (deptItem) {
// return deptItem.dictValue; // 返回科室编码
// } else {
// console.warn(`未找到科室名称为 ${currentDeptName} 的对应编码`);
// return currentDeptName || ''; // 使用原始名称作为默认值,符合防御性编程原则
// }
// } catch (error) {
// console.error('获取科室字典数据失败:', error);
// return '';
// }
// }
// 在 onMounted 中调用初始化函数 // 在 onMounted 中调用初始化函数
onMounted(async () => { onMounted(async () => {
await initData(); await initData();
// 设置当前科室编码
// const currentDeptCode = await getCurrentDeptCode();
// formData.applyDeptCode = currentDeptCode || '';
}) })
// Props // Props
@@ -474,7 +444,6 @@ const showForm = ref(false)
const loading = ref(false) const loading = ref(false)
const total = ref(0) const total = ref(0)
const leftActiveTab = ref('application') const leftActiveTab = ref('application')
const deptOptions = ref([])
// 用户信息store // 用户信息store
const userStore = useUserStore() const userStore = useUserStore()