From af72b425a0d3bc15e983eaf93ed2457538b2b80f Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Thu, 11 Jul 2024 09:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E6=95=B4=E6=94=B9=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/ehs/ehsHiddenDanger/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ruoyi-ui/src/views/ehs/ehsHiddenDanger/index.vue b/ruoyi-ui/src/views/ehs/ehsHiddenDanger/index.vue index 476e176..d1ca340 100644 --- a/ruoyi-ui/src/views/ehs/ehsHiddenDanger/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsHiddenDanger/index.vue @@ -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;