From 2e3fc03db4a7ee3a3f3333ca4cafb6ee90df1077 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 27 Sep 2023 18:14:12 +0800 Subject: [PATCH] photo --- .../patientRegister/PatientRegisterEdit.vue | 14 +++++++++----- .../patientRegister/PatientRegisterItem.vue | 13 ++++++++++++- .../patientRegister/PatientRegisterList.vue | 4 ++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 425f9b2..43385c4 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -621,16 +621,20 @@ export default { url += `4&PatientName=${this.query.patientName}` break; default: - break; + return; } console.log(url) getapi(url) .then((res) => { - if (res.code != -1) { - console.log('按条码号查个人数据', res.data) + console.log('按条码号查个人数据', res) + if (res.code == 1) { objCopy(res.data, this.form) - } + this.patientRegister.photo = res.data.photo + }else if(res.code == 0){ + this.$message.info("未找到相关信息") + } + }); }, @@ -1225,7 +1229,7 @@ export default { //拍照触发 "patientRegister.photo"(newVal, oldVal) { //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal) - if (newVal && newVal != oldVal) { + if (newVal != oldVal) { this.getPeoplePhoto(newVal) } }, diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index f99ee9a..5a20441 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -175,7 +175,11 @@ export default { ...mapState(["window", "dict", "customerOrg", "patientRegister", "personnelUnit"]), }, - mounted() { }, + mounted() { + if(this.patientRegisterForm.id){ + this.getPatientRegisterAbs(this.patientRegisterForm.id) + } + }, methods: { ...mapActions(['getCustomerOrgGroup', 'getPatientRegisterAbs']), @@ -783,6 +787,7 @@ export default { //监听事件 watch: { + //分组改变,查出当前分组下对应的组合项目 "patientRegister.customerOrgGroupChange"(newVal, oldVal) { console.log("watch patientRegister.customerOrgGroupChange newVal:", newVal, " oldVal:", oldVal); @@ -821,6 +826,12 @@ export default { } }, + "patientRegisterForm.id"(newVal, oldVal) { + if (newVal && newVal != oldVal) { + this.getPatientRegisterAbs(newVal) + } + }, + //按钮更新支付方式 "payTypeFlag"(newVal, oldVal) { if (newVal != oldVal && newVal != '') { diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 55c2fda..582d098 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -460,14 +460,14 @@ export default { this.patientRegister.photo = ""; //清除照片缓存 this.patientRegister.patientRegisterId = row.id; - this.patientRegister.photo = row.photo; + this.patientRegister.photo = row.photo||'/pic/Photo.jpg'; this.patientRegister.patientRegisterRd = row; this.patientRegister.query.customerOrgParentId = row.customerOrgParentId; this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 this.getCustomerOrgGroup(row.customerOrgParentId); this.dict.asbItem = [...this.dict.asbItemAll] - this.getPatientRegisterAbs(row.id); + //this.getPatientRegisterAbs(row.id); }, //体检次数 相关操作