添加医院配置文件
This commit is contained in:
parent
9ae0f2fbcf
commit
a0f4b802a3
22
src/config/hospitals.ts
Normal file
22
src/config/hospitals.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export interface Hospital {
|
||||
name: string
|
||||
code: string
|
||||
shortCode: string
|
||||
}
|
||||
|
||||
export const hospitals: Hospital[] = [
|
||||
{ name: '乌兰察布第四医院', code: '121526004609160793', shortCode: '1001' },
|
||||
{ name: '乌兰察布第四医院实验室', code: '221526004609160793', shortCode: '2001' },
|
||||
{ name: '卓资县卓资山镇第二社区卫生服务中心', code: '150921353066575', shortCode: '4001' },
|
||||
{ name: '卓资县卓资山镇社区卫生服务中心', code: '150921353066574', shortCode: '4002' },
|
||||
{ name: '旗下营镇中心卫生院', code: '15092146096496X', shortCode: '4003' },
|
||||
{ name: '十八台镇八苏木卫生院', code: '15092168001259X', shortCode: '4004' },
|
||||
{ name: '十八台镇梅力盖图卫生院', code: '150921680043070', shortCode: '4005' },
|
||||
{ name: '十八台镇中心卫生院', code: '150921460965305', shortCode: '4006' },
|
||||
{ name: '巴音锡勒镇中心卫生院', code: '150921793646900', shortCode: '4007' },
|
||||
{ name: '大榆树乡卫生院', code: '150921680012530', shortCode: '4008' },
|
||||
{ name: '复兴乡卫生院', code: '150921680043679', shortCode: '4009' },
|
||||
{ name: '梨花镇卫生院', code: '15092168001267X', shortCode: '4010' },
|
||||
{ name: '卓资山镇马盖图卫生院', code: '15092168004337X', shortCode: '4011' },
|
||||
{ name: '红召乡中心卫生院', code: '150921460965380', shortCode: '4012' }
|
||||
]
|
@ -72,8 +72,12 @@
|
||||
clearable
|
||||
class="!w-200px"
|
||||
>
|
||||
<el-option label="乌兰察布第四医院" value="121526004609160793" />
|
||||
<el-option label="乌兰察布第四医院实验室" value="221526004609160793" />
|
||||
<el-option
|
||||
v-for="hospital in hospitals"
|
||||
:key="hospital.code"
|
||||
:label="hospital.name"
|
||||
:value="hospital.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -203,6 +207,7 @@ import { ElMessageBox } from 'element-plus' // 添加 ElMessageBox 导入
|
||||
import { InspectOrgApi, InspectOrgVO } from '@/api/inspect/inspectorg/index'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import { getUserProfile } from '@/api/system/user/profile'
|
||||
import { hospitals } from '@/config/hospitals'
|
||||
|
||||
defineOptions({ name: 'Department' })
|
||||
|
||||
@ -228,7 +233,6 @@ const queryParams = reactive({
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const fileInputRef = ref<HTMLInputElement | null>(null) // 文件输入引用
|
||||
const idCardReading = ref(false) // 身份证读取状态
|
||||
const shortid = ref('')
|
||||
// 新增对话框相关变量
|
||||
const dialogVisible = ref(false)
|
||||
const addFormRef = ref()
|
||||
@ -319,13 +323,31 @@ const handlePrint = async (row: PatientVO) => {
|
||||
const userInfo = await getUserProfile()
|
||||
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId)
|
||||
if (queryParams.hospitalNo) {
|
||||
if (queryParams.hospitalNo == '121526004609160793') {
|
||||
shortid.value = '1001'
|
||||
await PatientApi.updatePatientOrg(row.medicalSn, deptInfo.orgid, deptInfo.orgName, queryParams.hospitalNo, shortid.value)
|
||||
}
|
||||
if (queryParams.hospitalNo == '221526004609160793') {
|
||||
shortid.value = '2001'
|
||||
await PatientApi.updatePatientOrg(row.medicalSn, deptInfo.orgid, deptInfo.orgName, queryParams.hospitalNo, shortid.value)
|
||||
const selectedHospital = hospitals.find((h) => h.code === queryParams.hospitalNo)
|
||||
if (selectedHospital) {
|
||||
const shortid = selectedHospital.shortCode
|
||||
await PatientApi.updatePatientOrg(
|
||||
row.medicalSn,
|
||||
deptInfo.orgid,
|
||||
deptInfo.orgName,
|
||||
queryParams.hospitalNo,
|
||||
shortid
|
||||
)
|
||||
console.log(
|
||||
'updatePatientOrg',
|
||||
row.medicalSn,
|
||||
deptInfo.orgid,
|
||||
deptInfo.orgName,
|
||||
queryParams.hospitalNo,
|
||||
shortid
|
||||
)
|
||||
} else {
|
||||
// This case should ideally not happen if the dropdown is populated correctly
|
||||
ElMessageBox.alert('选择的机构无效', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
} else {
|
||||
ElMessageBox.alert('请选择当前机构', '提示', {
|
||||
|
Loading…
Reference in New Issue
Block a user