隐患整改图片必填

main
15036302109 5 months ago
parent a4f40a9b96
commit af72b425a0

@ -796,6 +796,8 @@ export default {
status: [ { required: true,message: "整改进度必须选择", trigger: 'blur'}],
// rectifyMeasure: [ { type: 'string',required: true,message: "", trigger: 'blur'}],
// rectifyTime: [ { type: 'date',required: true,message: "", trigger: 'blur'}],
hiddenDangerImg: [{required:true,message: "隐患照片必填", trigger: 'blur'}],
rectifyImg: [{ validator: this.validateRectifyImg,message: "整改照片必填", trigger: 'blur'}],
hiddenDangerGrade: [ { type: 'string',required: true,message: "隐患级别必填", trigger: 'blur'}],
// hiddenDangerType: [ { type: 'string',required: true,message: "", trigger: 'blur'}],
rectifyMoney: [ {
@ -1013,6 +1015,14 @@ export default {
}
},
validateRectifyImg(rule, value, callback) {
if (this.form.status == 10 && !value) {
callback(new Error('整改照片是必填项'));
this.$message.warning('整改照片不能为空!');
} else {
callback();
}
},
/** 删除按钮操作 */
handleDelete(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;

Loading…
Cancel
Save