From 2a6f81454ea2e8bb11793e33f5399d3a0a77423a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Wed, 21 Feb 2024 10:42:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Ddetection=E6=96=B0?= =?UTF-8?q?=E5=A2=9Epolicy=E6=97=B6=EF=BC=8C=E7=AC=AC=E4=B8=89=E6=AD=A5?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=B6=E9=97=B4=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detections/detectionPolicies/PolicyForm.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/detections/detectionPolicies/PolicyForm.vue b/src/views/detections/detectionPolicies/PolicyForm.vue index dade6f5d..c19d3a66 100644 --- a/src/views/detections/detectionPolicies/PolicyForm.vue +++ b/src/views/detections/detectionPolicies/PolicyForm.vue @@ -170,7 +170,7 @@ export default { data () { const intervalValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.intervalVal) - if (!obj.flag && obj.msg) { + if (obj && !obj.flag && obj.msg) { callback(new Error(obj.msg)) } else { callback() @@ -178,7 +178,7 @@ export default { } const intervalValValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, this.triggerObj.intervalVal, value) - if (!obj.flag && obj.msg) { + if (obj && !obj.flag && obj.msg) { this.$refs.form3.validateField('interval') callback() } else { @@ -187,7 +187,7 @@ export default { } const resetIntervalValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.resetIntervalVal) - if (!obj.flag && obj.msg) { + if (obj && !obj.flag && obj.msg) { callback(new Error(obj.msg)) } else { callback() @@ -195,7 +195,7 @@ export default { } const resetIntervalValValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, this.triggerObj.resetIntervalVal, value) - if (!obj.flag && obj.msg) { + if (obj && !obj.flag && obj.msg) { this.$refs.form3.validateField('resetInterval') callback() } else {