修改BUG

This commit is contained in:
Flow 2025-06-25 16:17:29 +08:00
parent ccb74c1dec
commit 71b8d6fc50
3 changed files with 26 additions and 17 deletions

View File

@ -67,7 +67,7 @@
</el-form-item>
<el-form-item label="当前机构" prop="hospitalNo">
<el-select
v-model="queryParams.hospitalNo"
v-model="hospitalNo"
placeholder="请选择当前机构"
clearable
class="!w-200px"
@ -205,12 +205,12 @@ import sdk from '@/components/IDCardReader/sdk'
import download from '@/utils/download' //
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' })
const hospitalNo = ref(undefined as string | undefined)
const message = useMessage() //
const loading = ref(true) //
const importLoading = ref(false) // Excel
@ -228,7 +228,6 @@ const queryParams = reactive({
domicileaddress: undefined as string | undefined,
isprint: undefined as string | undefined,
printTimeRange: undefined as [string, string] | undefined,
hospitalNo: undefined as string | undefined
})
const queryFormRef = ref() //
const fileInputRef = ref<HTMLInputElement | null>(null) //
@ -322,23 +321,15 @@ const handlePrint = async (row: PatientVO) => {
}
const userInfo = await getUserProfile()
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId)
if (queryParams.hospitalNo) {
const selectedHospital = hospitals.find((h) => h.code === queryParams.hospitalNo)
if (hospitalNo.value) {
const selectedHospital = hospitals.find((h) => h.code === hospitalNo.value)
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,
hospitalNo.value,
shortid
)
} else {

View File

@ -409,7 +409,7 @@ const handleDetail = async (row) => {
stadate: time.value[0],
enddate: time.value[1],
addname: row.districtname,
examhosname: parentNode ? parentNode.orgname : row.orgname,
orgname: parentNode ? parentNode.orgname : row.orgname,
//orgid: userInfo.value.deptId
hospitalNo: selectedHospital.value
}

View File

@ -38,6 +38,22 @@
class="!w-320px"
/>
</el-form-item>
<el-form-item label="当前机构" prop="hospitalNo">
<el-select
v-model="queryParams.hospitalNo"
placeholder="请选择当前机构"
clearable
class="!w-200px"
>
<el-option
v-for="hospital in hospitals"
:key="hospital.code"
:label="hospital.name"
:value="hospital.code"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> 查询
@ -123,12 +139,12 @@ import { PatientApi, type PatientVO } from '@/api/inspect/inspectpatient'
// 使
import ReportPreview from './components/ReportPreview.vue'
import dayjs from 'dayjs'
import { hospitals } from '@/config/hospitals'
defineOptions({ name: 'ReportPrint' })
//
const printDialogVisible = ref(false)
const currentReportData = ref({})
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
@ -139,6 +155,7 @@ const queryParams = reactive({
pageSize: 10,
medicalSn: undefined as string | undefined,
pname: undefined as string | undefined,
hospitalNo: undefined as string | undefined,
medicalDateTime: [
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
@ -157,7 +174,8 @@ const getList = async () => {
medicalSn: queryParams.medicalSn,
pName: queryParams.pname?.trim() || undefined,
medicalDateTime: queryParams.medicalDateTime,
status: queryParams.status
status: queryParams.status,
hospitalNo: queryParams.hospitalNo
})
list.value = data.list
total.value = data.total