修改头像&机构相关
This commit is contained in:
parent
8fffc24768
commit
d0aef05643
BIN
public/头像.png
Normal file
BIN
public/头像.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
@ -128,8 +128,8 @@ export const PatientApi = {
|
|||||||
return await request.get({ url: `/inspect/patient/createPatientitem?medicalSn=` + medicalSn })
|
return await request.get({ url: `/inspect/patient/createPatientitem?medicalSn=` + medicalSn })
|
||||||
},
|
},
|
||||||
//根据体检编号&姓名&身份证号获取患者信息
|
//根据体检编号&姓名&身份证号获取患者信息
|
||||||
getPatientInfoByMedicalSn: async (searchKey: string) => {
|
getPatientInfoByMedicalSn: async (searchKey: string,examhoscode: string,status: string) => {
|
||||||
return await request.get({ url: `/inspect/patient/PatientBySearchKey?searchKey=` + searchKey })
|
return await request.get({ url: `/inspect/patient/PatientBySearchKey?searchKey=` + searchKey + `&examhoscode=` + examhoscode + `&status=` + status})
|
||||||
},
|
},
|
||||||
//获取公卫患者信息
|
//获取公卫患者信息
|
||||||
getGwPatientInfo: async (idCard: string) => {
|
getGwPatientInfo: async (idCard: string) => {
|
||||||
|
@ -609,7 +609,7 @@ const handleLocalSearch = async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 获取搜索结果
|
// 获取搜索结果
|
||||||
const res = await PatientApi.getPatientInfoByMedicalSn(searchQuery.value)
|
const res = await PatientApi.getPatientInfoByMedicalSn(searchQuery.value,user.value.deptId,statusFilter.value)
|
||||||
|
|
||||||
// 检查返回的数据
|
// 检查返回的数据
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -2771,7 +2771,8 @@ const getDoctorList = async () => {
|
|||||||
try {
|
try {
|
||||||
const res = await DoctorApi.getDoctorPage({
|
const res = await DoctorApi.getDoctorPage({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100 // 设置较大的数值以获取所有医生
|
pageSize: 100, // 设置较大的数值以获取所有医生
|
||||||
|
orgid: user.value?.deptId
|
||||||
})
|
})
|
||||||
if (res && res.list && res.list.length > 0) {
|
if (res && res.list && res.list.length > 0) {
|
||||||
// 保存原始医生列表数据
|
// 保存原始医生列表数据
|
||||||
|
@ -302,6 +302,21 @@ onMounted(() => {
|
|||||||
/** 打印报告按钮操作 */
|
/** 打印报告按钮操作 */
|
||||||
const handlePrint = async (row: PatientVO) => {
|
const handlePrint = async (row: PatientVO) => {
|
||||||
try {
|
try {
|
||||||
|
const patientInfo = await PatientApi.getPatientInfo(row.medicalSn)
|
||||||
|
if (patientInfo.status == 1 && patientInfo.medicalDateTime) {
|
||||||
|
const lastMedicalDate = new Date(patientInfo.medicalDateTime)
|
||||||
|
const currentDate = new Date()
|
||||||
|
// 计算日期之间的差距(毫秒)
|
||||||
|
const timeDiff = currentDate.getTime() - lastMedicalDate.getTime()
|
||||||
|
// 转换为天数
|
||||||
|
const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24))
|
||||||
|
// 如果不到365天(一年)
|
||||||
|
if (daysDiff < 365) {
|
||||||
|
// 显示警告消息
|
||||||
|
message.error(`该患者上次体检距今不满一年`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
const userInfo = await getUserProfile()
|
const userInfo = await getUserProfile()
|
||||||
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId)
|
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId)
|
||||||
await PatientApi.updatePatientOrg(row.medicalSn,deptInfo.orgid,deptInfo.orgName)
|
await PatientApi.updatePatientOrg(row.medicalSn,deptInfo.orgid,deptInfo.orgName)
|
||||||
@ -355,8 +370,20 @@ const handlePrintBarcode = async (row: PatientVO) => {
|
|||||||
try {
|
try {
|
||||||
// 获取最新的患者信息
|
// 获取最新的患者信息
|
||||||
const patientInfo = await PatientApi.getPatientInfo(row.medicalSn)
|
const patientInfo = await PatientApi.getPatientInfo(row.medicalSn)
|
||||||
console.log('患者信息:', patientInfo)
|
if (patientInfo.status == 1 && patientInfo.medicalDateTime) {
|
||||||
|
const lastMedicalDate = new Date(patientInfo.medicalDateTime)
|
||||||
|
const currentDate = new Date()
|
||||||
|
// 计算日期之间的差距(毫秒)
|
||||||
|
const timeDiff = currentDate.getTime() - lastMedicalDate.getTime()
|
||||||
|
// 转换为天数
|
||||||
|
const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24))
|
||||||
|
// 如果不到365天(一年)
|
||||||
|
if (daysDiff < 365) {
|
||||||
|
// 显示警告消息
|
||||||
|
message.error(`该患者上次体检距今不满一年`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
// 检查是否存在条形码打印时间
|
// 检查是否存在条形码打印时间
|
||||||
if(patientInfo.barcodetime){
|
if(patientInfo.barcodetime){
|
||||||
// 格式化上次打印时间,显示中文年月日格式
|
// 格式化上次打印时间,显示中文年月日格式
|
||||||
|
@ -9,17 +9,20 @@
|
|||||||
>
|
>
|
||||||
<el-row gutter="20">
|
<el-row gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
<el-form-item label="机构ID" prop="orgid">
|
||||||
|
<el-input v-model="formData.orgid" placeholder="请输入机构ID" disabled />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="机构名称" prop="orgName">
|
<el-form-item label="机构名称" prop="orgName">
|
||||||
<el-input v-model="formData.orgName" placeholder="请输入机构名称" />
|
<el-input v-model="formData.orgName" placeholder="请输入机构名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="机构地址" prop="address">
|
<el-form-item label="机构地址" prop="address">
|
||||||
<el-input v-model="formData.address" placeholder="请输入机构地址" />
|
<el-input v-model="formData.address" placeholder="请输入机构地址" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="机构编号" prop="orgSN">
|
<el-form-item label="机构短号" prop="orgSN">
|
||||||
<el-input v-model="formData.orgSN" placeholder="请输入机构编号" />
|
<el-input v-model="formData.orgSN" placeholder="请输入机构短号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="机构码" prop="inHisCode">
|
<el-form-item label="机构码" prop="inHisCode">
|
||||||
<el-input v-model="formData.inHisCode" placeholder="请输入机构码" />
|
<el-input v-model="formData.inHisCode" placeholder="his系统中的机构码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -82,11 +85,9 @@ const formData = ref({
|
|||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
highLevelOrgID: [{ required: true, message: '请选择上级机构', trigger: 'change' }],
|
highLevelOrgID: [{ required: true, message: '请选择上级机构', trigger: 'change' }],
|
||||||
orgSN: [{ required: true, message: '请输入机构编号', trigger: 'change' }],
|
|
||||||
orgType: [{ required: true, message: '请选择医院机构类型', trigger: 'change' }],
|
orgType: [{ required: true, message: '请选择医院机构类型', trigger: 'change' }],
|
||||||
orgName: [{ required: true, message: '请输入机构名称', trigger: 'change' }],
|
orgName: [{ required: true, message: '请输入机构名称', trigger: 'change' }],
|
||||||
contactPerson: [{ required: true, message: '请输入联系人姓名', trigger: 'change' }],
|
contactPerson: [{ required: true, message: '请输入联系人姓名', trigger: 'change' }],
|
||||||
inHisCode: [{ required: true, message: '请输入机构码', trigger: 'change' }],
|
|
||||||
contactTel: [
|
contactTel: [
|
||||||
{ required: true, message: '请填入正确的手机号', trigger: 'blur' },
|
{ required: true, message: '请填入正确的手机号', trigger: 'blur' },
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="机构码" align="center" prop="inHisCode" />
|
<el-table-column label="机构ID" align="center" prop="orgid" />
|
||||||
<el-table-column label="机构名称" align="center" prop="orgName" />
|
<el-table-column label="机构名称" align="center" prop="orgName" />
|
||||||
<el-table-column label="机构地址" align="center" prop="address" />
|
<el-table-column label="机构地址" align="center" prop="address" />
|
||||||
<el-table-column label="联系电话" align="center" prop="contactTel" />
|
<el-table-column label="联系电话" align="center" prop="contactTel" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="iframe-container">
|
<div class="iframe-container">
|
||||||
<iframe
|
<iframe
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
src="/inspect/templates/report-template.html"
|
src="/templates/report-template.html"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
style="width: 100%; height: 100%; border: none"
|
style="width: 100%; height: 100%; border: none"
|
||||||
@load="handleIframeLoad"
|
@load="handleIframeLoad"
|
||||||
@ -126,7 +126,12 @@ const handleIframeLoad = async () => {
|
|||||||
// 更新头像
|
// 更新头像
|
||||||
const avatarImg = doc.getElementById('avatar-image')
|
const avatarImg = doc.getElementById('avatar-image')
|
||||||
if (avatarImg) {
|
if (avatarImg) {
|
||||||
avatarImg.src = 'data:image/jpeg;base64,' + reportData.headPicUrl
|
if (reportData.headPicUrl) {
|
||||||
|
avatarImg.src = 'data:image/jpeg;base64,' + reportData.headPicUrl
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
avatarImg.src = '/头像.png'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 更新主检医生签名
|
// 更新主检医生签名
|
||||||
const summaryDoctorImage = doc.getElementById('summary-doctor-image')
|
const summaryDoctorImage = doc.getElementById('summary-doctor-image')
|
||||||
|
Loading…
Reference in New Issue
Block a user