From 5f5054c9dfa9e6cc8dfd89a35b54b689c6ef7a77 Mon Sep 17 00:00:00 2001 From: shidongli Date: Tue, 26 Sep 2023 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/Scheduling/index.vue | 46 ++++++++++++++------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/views/system/Scheduling/index.vue b/src/views/system/Scheduling/index.vue index 18705f9..44da0c8 100644 --- a/src/views/system/Scheduling/index.vue +++ b/src/views/system/Scheduling/index.vue @@ -362,12 +362,6 @@ export default { loading: true, // 选中数组 ids: [], - hospitalqueryParams: { - pageNum: 1, - pageSize: 10, - hospitalCode: "", - hospitalName: "", - }, hospitalList: [],// 查询医院信息 hospitalNamelist: [],//医院名称 hospitalDepartmentist: [],//科室 @@ -567,11 +561,13 @@ export default { // 医院名称点击事件 hospitalNamechange(value) { this.hospitalId = value - this.form.hospitalName = this.hospitalNamelist.find((f) => f.id == this.hospitalId)?.hospitalName; - - hospitalDepartment(this.hospitalId).then(response => { - this.hospitalDepartmentist = response.data; - }); + // this.form.hospitalName = this.hospitalNamelist.find((f) => f.id == this.hospitalId)?.hospitalName; + this.queryParams.departmentId = "", + this.queryParams.doctorId = "", + this.personNamelist=[], + hospitalDepartment(this.hospitalId).then(response => { + this.hospitalDepartmentist = response.data; + }); }, // 科室名称 hospitalName() { @@ -588,6 +584,7 @@ export default { this.form.departmentId = "", this.form.doctorId = "", this.form.scheduleId = "", + this.personNamelist=[], // this.$refs.departmentId.clear() // 科室名称 hospitalDepartment(this.hospitalId).then(response => { @@ -602,6 +599,8 @@ export default { departmentNameadd(value) { this.departmentId = value this.form.departmentName = this.hospitalDepartmentist.find((f) => f.id == this.departmentId)?.departmentName; + this.form.doctorId = "", + this.queryParams.doctorId = "", hospitalPerson(this.departmentId, this.hospitalId).then(response => { this.personNamelist = response.data; }); @@ -650,10 +649,15 @@ export default { this.queryParams = { pageNum: 1, pageSize: 10, - hospitalName: "", - departmentCode: "", + departmentId: "", departmentName: "", + doctorId: "", + doctorName: "", + hospitalId: "", + hospitalName: "", }; + this.personNamelist=[], + this.hospitalDepartmentist=[], this.handleQuery(); }, // 多选框选中数据 @@ -671,12 +675,10 @@ export default { }, /** mi按钮操作 */ handleUpdate(row) { - console.log(row) this.reset(); this.open = true; this.title = "查看明细"; const schedulePlanId = row.id || this.ids; - // this.form.hospitalId = row.id; plandetail(schedulePlanId).then((response) => { this.hospitalDepartmentList = response.data; this.open = true; @@ -688,13 +690,13 @@ export default { console.log(this.form) this.$refs["form"].validate((valid) => { if (valid) { - add(this.form).then((response) => { - if (response.code == 200) { - this.$modal.msgSuccess("新增成功"); - this.addopen = false; - this.getList(); - } - }); + add(this.form).then((response) => { + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.addopen = false; + this.getList(); + } + }); } }); },