diff --git a/src/views/system/hospitalPerson/index.vue b/src/views/system/hospitalPerson/index.vue index d3eb763..fc47671 100644 --- a/src/views/system/hospitalPerson/index.vue +++ b/src/views/system/hospitalPerson/index.vue @@ -181,6 +181,7 @@ :title="title" :visible.sync="addopen" width="1200px" + :before-close="cancel" append-to-body > { this.hospitalDepartmentList = response.rows; this.total3 = response.total; @@ -1136,10 +1152,11 @@ export default { if (this.deletupdata.length > 0) { updatePicture({ pictureUrlList: this.deletupdata }).then( (res) => { - } ); } + this.form.hospitalId = null; + this.departmentId = null; this.imgsurl = { pictureUrlList: [] }; this.addopen = false; this.reset(); @@ -1148,8 +1165,6 @@ export default { reset() { this.form = { id: null, - hospitalId: null, - departmentId: null, personCode: null, personName: null, personPhone: null, @@ -1170,16 +1185,16 @@ export default { departmentName: "请选择所属科室", hospitalPersonCertificateList: [ { - certificateName: "", - certificateSort: "", - certificateUrl: "", + certificateName: null, + certificateSort: null, + certificateUrl: null, }, ], }; this.deletUploadImages = []; this.deletupdata = []; - // this.resetForm("form"); + this.resetForm("form"); }, /** 搜索按钮操作 */ handleQuery() { @@ -1198,7 +1213,7 @@ export default { pageNum: 1, pageSize: 10, }; - // this.resetForm("queryForm"); + this.resetForm("queryForm"); this.handleQuery(); }, // 多选框选中数据 @@ -1209,17 +1224,18 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.form = { - hospitalPersonCertificateList: [ - { - certificateSort: "", - certificateName: "", - certificateUrl: "", + // this.form = { + // hospitalPersonCertificateList: [ + // { + // certificateSort: "", + // certificateName: "", + // certificateUrl: "", - idd: this.idd, - }, - ], - }; + // idd: this.idd, + // }, + // ], + // }; + this.departmentId=""; this.reset(); this.addopen = true; this.title = "添加科室人员信息"; @@ -1229,8 +1245,13 @@ export default { this.reset(); const id = row.id || this.ids; getHospitalPerson(id).then((response) => { + console.log(response) this.form = response.data; + this.departmentId = response.data.departmentId; + this.hospitalId = response.data.hospitalId; this.imgone = this.form.certificateUrl; + + this.addopen = true; this.title = "修改科室人员信息"; });