From 00e73adadbf904564a2db3c3eaca0c7606736472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 30 Oct 2023 16:05:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dpolicy=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E7=82=B9=E5=87=BBsave=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 815af776aae3657131c819d6381227eb716d6814) --- .../detections/detectionPolicies/PolicyForm.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/detections/detectionPolicies/PolicyForm.vue b/src/views/detections/detectionPolicies/PolicyForm.vue index b950a640..0730134d 100644 --- a/src/views/detections/detectionPolicies/PolicyForm.vue +++ b/src/views/detections/detectionPolicies/PolicyForm.vue @@ -169,24 +169,34 @@ export default { const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.intervalVal) if (!obj.flag && obj.msg) { callback(new Error(obj.msg)) + } else { + callback() } } - const intervalValValidator = (rule, value) => { + const intervalValValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, this.triggerObj.intervalVal, value) if (!obj.flag && obj.msg) { this.$refs.form3.validateField('interval') + callback() + } else { + callback() } } const resetIntervalValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.resetIntervalVal) if (!obj.flag && obj.msg) { callback(new Error(obj.msg)) + } else { + callback() } } - const resetIntervalValValidator = (rule, value) => { + const resetIntervalValValidator = (rule, value, callback) => { const obj = this.handleIntervalByDateType(rule, this.triggerObj.resetIntervalVal, value) if (!obj.flag && obj.msg) { this.$refs.form3.validateField('resetInterval') + callback() + } else { + callback() } } return { @@ -408,6 +418,7 @@ export default { this.myLoading = false }) } else { + console.log('进来') this.myLoading = true axios.put(api.detection.create.create, formObj).then(response => { if (response.status === 200) {