From f34a29b71de6b3acfa6f939997675f95da9a6e7d Mon Sep 17 00:00:00 2001 From: panyuyi Date: Wed, 27 Mar 2024 09:33:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/maintenanceRecords/index.vue | 20 +++++++++++++---- .../maintenance/maintenanceRecords/index.vue | 22 +++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/views/dike/runManage/maintenance/maintenanceRecords/index.vue b/src/views/dike/runManage/maintenance/maintenanceRecords/index.vue index 21c8443..05e38c1 100644 --- a/src/views/dike/runManage/maintenance/maintenanceRecords/index.vue +++ b/src/views/dike/runManage/maintenance/maintenanceRecords/index.vue @@ -151,6 +151,15 @@ export default { }); }, resetForm() { + this.planData = { + name: "", + planTime: "", + nationalSupplement: "", + selfSupplement: "", + budget: "", + location: "", + content: "", + }; this.$refs.ruleForm.resetFields(); this.dialogVisible = false; }, @@ -166,7 +175,6 @@ export default { }; user.push(a); }); - console.log("🚀user🚀", user); this.ruleForm.operators = user; if (confirm) { this.ruleForm.status = "1"; @@ -180,11 +188,11 @@ export default { ...this.ruleForm, }).then(() => { this.getTableData(); - this.dialogVisible = false; this.$message({ message: confirm ? "确认成功" : "保存成功", type: "success", }); + this.resetForm(); }); } else { postDFMaintenanceRecords({ @@ -192,11 +200,11 @@ export default { ...this.ruleForm, }).then(() => { this.getTableData(); - this.dialogVisible = false; this.$message({ message: confirm ? "确认成功" : "保存成功", type: "success", }); + this.resetForm(); }); } } else { @@ -260,6 +268,7 @@ export default { // 关闭dialog closeDialog(ruleForm = "ruleForm") { console.log("触发关闭dialog", ruleForm); + this.resetForm(); this.$refs[ruleForm].resetFields(); this.ruleForm = { name: "", @@ -600,6 +609,7 @@ export default { @@ -608,6 +618,7 @@ export default { @@ -616,6 +627,7 @@ export default { @@ -712,7 +724,7 @@ export default { .table-box { width: 100%; - height: calc(100% - 50px - 24px); + height: calc(100% - 18px); margin-top: 24px; padding: 16px; background-color: white; diff --git a/src/views/sluice/runManage/maintenance/maintenanceRecords/index.vue b/src/views/sluice/runManage/maintenance/maintenanceRecords/index.vue index c0ae2aa..8c87d31 100644 --- a/src/views/sluice/runManage/maintenance/maintenanceRecords/index.vue +++ b/src/views/sluice/runManage/maintenance/maintenanceRecords/index.vue @@ -143,6 +143,15 @@ export default { }); }, resetForm() { + this.planData = { + wagaCode: "", + planTime: "", + nationalSupplement: "", + selfSupplement: "", + budget: "", + location: "", + content: "", + }; this.$refs.ruleForm.resetFields(); this.dialogVisible = false; }, @@ -158,7 +167,6 @@ export default { }; user.push(a); }); - console.log("🚀user🚀", user); this.ruleForm.operators = user; if (confirm) { this.ruleForm.status = 1; @@ -172,11 +180,11 @@ export default { ...this.ruleForm, }).then(() => { this.getTableData(); - this.dialogVisible = false; this.$message({ message: confirm ? "确认成功" : "保存成功", type: "success", }); + this.resetForm(); }); } else { postSluiceYhRecord({ @@ -184,11 +192,11 @@ export default { ...this.ruleForm, }).then(() => { this.getTableData(); - this.dialogVisible = false; this.$message({ message: confirm ? "确认成功" : "保存成功", type: "success", }); + this.resetForm(); }); } } else { @@ -250,6 +258,7 @@ export default { // 关闭dialog closeDialog(ruleForm = "ruleForm") { console.log("触发关闭dialog", ruleForm); + this.resetForm(); this.$refs[ruleForm].resetFields(); this.ruleForm = { name: "", @@ -328,6 +337,7 @@ export default { class="w-360" type="daterange" range-separator="至" + value-format="yyyy-MM-dd 00:00:00" start-placeholder="开始日期" end-placeholder="结束日期" > @@ -338,6 +348,7 @@ export default { type="daterange" class="w-360" range-separator="至" + value-format="yyyy-MM-dd 00:00:00" start-placeholder="开始日期" end-placeholder="结束日期" > @@ -588,6 +599,7 @@ export default { @@ -596,6 +608,7 @@ export default { @@ -604,6 +617,7 @@ export default { @@ -700,7 +714,7 @@ export default { .table-box { width: 100%; - height: calc(100% - 50px - 24px); + height: calc(100% - 18px); margin-top: 24px; padding: 16px; background-color: white;