修改BUG
This commit is contained in:
parent
ccb74c1dec
commit
71b8d6fc50
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user