diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 2a5e29f..3e4181d 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -1299,12 +1299,12 @@ export default { if (res.code == 1) { //触发已选组合项目保存 this.prAsbOpraOpts.formId = res.data.id - this.dataTransOpts.tableS.patient_register.id = res.data.id + this.dataTransOpts.tableS.patient_register = deepCopy(res.data) let temp = Object.assign({}, res.data, { id: '' }) objCopy(temp, this.form) // 用于刷新登记的列表 - this.refreshRegister(Object.assign({}, res.data)) + // this.refreshRegister(Object.assign({}, res.data)) //一般读身份证照片时,会出现这种情况 if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index b73b8d5..2cfde6d 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -666,20 +666,21 @@ export default { if(!id) return this.dataTransOpts.tableS.patient_register.id = id - // let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - // if (res.code != 1) return - + let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) + if (res.code != 1) return + let currentRow = res.data + // this.tableData.forEach(e => { // e.choosed = false // }); let lfind = arrayExistObj(this.tableData, 'id', this.dataTransOpts.tableS.patient_register.id) if (lfind > -1) { - objCopy(this.tableDataCurrentRow,this.tableData[lfind]) + objCopy(currentRow,this.tableData[lfind]) } else { lfind = this.tableData.length - this.tableDataCurrentRow.index = lfind - this.tableDataCurrentRow.choosed = true - this.tableData.push(this.tableDataCurrentRow) + currentRow.index = lfind + currentRow.choosed = true + this.tableData.push(currentRow) } // 刷新 register_check_asbitem 表记录 @@ -744,9 +745,13 @@ export default { .then((res) => { if (res.code != -1) { console.log("操作成功"); - arrayReduce(this.tableData, this.multipleSelection, 'id=id') - this.setForm(this.patientRegister.patientRegisterRdInit) - this.getPatientRegisterAbs(); + this.dataTransOpts.tableS.patient_register.id = '' + setTimeout(() => { + this.dataTransOpts.refresh.register_check_asbitem.M++ + }, 10); + arrayReduce(this.tableData, this.multipleSelection, 'id=id') //清除列表记录 + // this.setForm(this.patientRegister.patientRegisterRdInit) + // this.getPatientRegisterAbs(); } }) .catch((err) => {