|
|
@@ -29,7 +29,9 @@
|
|
|
<div class="box">
|
|
|
<p>检查内容</p>
|
|
|
<div style="margin-bottom: 10px">
|
|
|
- <el-button type="primary" @click="onEdit(-1)">新增检查内容</el-button>
|
|
|
+ <el-button type="primary" @click="onEdit(-1)"
|
|
|
+ >新增检查内容</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<el-table :data="formData.pointDtoList" border style="width: 100%">
|
|
|
<el-table-column prop="name" label="检查内容"> </el-table-column>
|
|
|
@@ -115,11 +117,19 @@ export default {
|
|
|
},
|
|
|
async onSubmit() {
|
|
|
this.formData.ruleId = this.rule.id;
|
|
|
- await update(this.formData).then((v) => {
|
|
|
- console.log(v);
|
|
|
- this.formData = this.reset();
|
|
|
- this.dialogVisible = false;
|
|
|
- this.$emit("success");
|
|
|
+ this.$refs.form.validate((isValidate) => {
|
|
|
+ if (!isValidate) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.formData.pointDtoList || this.formData.pointDtoList.length==0){
|
|
|
+ this.$message.warning("检查内容不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ update(this.formData).then((v) => {
|
|
|
+ this.formData = this.reset();
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit("success");
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
onclose() {
|