Browse Source

fix: 修复bug

sy-water-data-board-ui
panyuyi 1 year ago
parent
commit
f34a29b71d
  1. 20
      src/views/dike/runManage/maintenance/maintenanceRecords/index.vue
  2. 22
      src/views/sluice/runManage/maintenance/maintenanceRecords/index.vue

20
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 {
<el-input
v-model="ruleForm.before"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -608,6 +618,7 @@ export default {
<el-input
v-model="ruleForm.middle"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -616,6 +627,7 @@ export default {
<el-input
v-model="ruleForm.after"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -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;

22
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="结束日期"
></el-date-picker>
@ -588,6 +599,7 @@ export default {
<el-input
v-model="ruleForm.before"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -596,6 +608,7 @@ export default {
<el-input
v-model="ruleForm.middle"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -604,6 +617,7 @@ export default {
<el-input
v-model="ruleForm.after"
placeholder="请输入"
maxLength="100"
style="width: 202px"
:disabled="prohibitEditing"
/>
@ -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;

Loading…
Cancel
Save