diff --git a/src/components/table/detection/GeneralSettings.vue b/src/components/table/detection/GeneralSettings.vue
index 351daafd..1d37d834 100644
--- a/src/components/table/detection/GeneralSettings.vue
+++ b/src/components/table/detection/GeneralSettings.vue
@@ -197,6 +197,8 @@ export default {
if (this.settingObj.ruleType && this.settingObj.category && this.settingObj.eventType && this.settingObj.name) {
this.settingObj.settingNoContinue = true
this.onContinue()
+ } else {
+ this.$emit('setSettingForm', this.settingObj)
}
},
/** 点击继续,进行第二步 */
diff --git a/src/components/table/detection/RuleDefinition.vue b/src/components/table/detection/RuleDefinition.vue
index d4010f98..f21ff90f 100644
--- a/src/components/table/detection/RuleDefinition.vue
+++ b/src/components/table/detection/RuleDefinition.vue
@@ -507,6 +507,8 @@ export default {
this.$refs.form2.validate(valid2 => {
if (valid2) {
this.getConditions()
+ this.indicatorRuleObj.editFlag = false
+ this.indicatorRuleObj.saveFlag = true
this.$emit('setRuleObj', this.thresholdRuleObj)
}
})
@@ -534,6 +536,9 @@ export default {
if (this.indicatorRuleObj.dataSource && this.indicatorRuleObj.knowledgeId && this.indicatorRuleObj.level) {
this.indicatorRuleObj.ruleNoContinue = true
this.onContinue()
+ } else {
+ this.indicatorRuleObj.editFlag = true
+ this.$emit('setRuleObj', this.indicatorRuleObj)
}
}
}
diff --git a/src/views/detections/detectionPolicies/PolicyForm.vue b/src/views/detections/detectionPolicies/PolicyForm.vue
index d41c9007..733392b1 100644
--- a/src/views/detections/detectionPolicies/PolicyForm.vue
+++ b/src/views/detections/detectionPolicies/PolicyForm.vue
@@ -18,7 +18,7 @@
-
+
@@ -35,7 +35,7 @@
-
+
@@ -57,16 +57,16 @@
At least
-
+
times within
-
+
-
+
With the counter resetting after no activity for
-
+
-
+
在
-
+
-
+
内至少发生
-
+
次
@@ -121,10 +121,10 @@
若连续
-
+
-
+
{
- if (this.settingObj.settingNoContinue || this.ruleObj.settingNoContinue || !valid) {
- this.$confirm(this.$t('tip.leavePage'), {
- confirmButtonText: this.$t('tip.confirm'),
- cancelButtonText: this.$t('overall.cancel'),
- message: this.$t('tip.leavePageTips'),
- title: this.$t('tip.leavePage'),
- type: 'warning',
- iconClass: 'width:0px;height:0px;',
- customClass: 'del-model'
- }).then(() => {
- this.$router.push({
- path: '/detection/policy',
- query: queryInfo
- })
- }).catch(() => {})
- } else {
- this.$router.push({
- path: '/detection/policy',
- query: queryInfo
+
+ if (this.settingObj.editFlag || this.ruleObj.editFlag || this.triggerObj.editFlag) {
+ // if (this.settingObj.editFlag) {
+ // this.isCompleteSetting = false
+ // this.handleFormError('1')
+ // }
+ // if (this.ruleObj.editFlag) {
+ // this.isCompleteRule = false
+ // this.handleFormError('2')
+ // }
+ if (this.triggerObj.editFlag) {
+ this.$refs.form3.validate(valid => {
+ if (!valid) {
+ this.confirmMessage(queryInfo)
+ } else {
+ this.$router.push({
+ path: '/detection/policy',
+ query: queryInfo
+ })
+ }
})
+ } else {
+ this.confirmMessage(queryInfo)
}
- })
+ } else {
+ this.$router.push({
+ path: '/detection/policy',
+ query: queryInfo
+ })
+ }
+ },
+ confirmMessage (queryInfo) {
+ this.$confirm(this.$t('tip.leavePage'), {
+ confirmButtonText: this.$t('tip.confirm'),
+ cancelButtonText: this.$t('overall.cancel'),
+ message: this.$t('tip.leavePageTips'),
+ title: this.$t('tip.leavePage'),
+ type: 'warning',
+ iconClass: 'width:0px;height:0px;',
+ customClass: 'del-model'
+ }).then(() => {
+ this.$router.push({
+ path: '/detection/policy',
+ query: queryInfo
+ })
+ }).catch(() => {})
+ },
+ resetEditFlag () {
+ this.triggerObj.editFlag = true
}
}
}