|
@@ -604,7 +604,7 @@ export default {
|
|
|
watch:{
|
|
|
'form.applyAccount'(n,o){
|
|
|
this.campaignList=[];
|
|
|
- this.form.campaignid=''
|
|
|
+ this.form.campaignId=''
|
|
|
if(n){
|
|
|
this.spinning=true;
|
|
|
if(this.form.eventRuleLevel=='CAMPAIGN'){
|
|
@@ -870,36 +870,42 @@ export default {
|
|
|
...this.form
|
|
|
}
|
|
|
console.log(params)
|
|
|
- if(this.currentRuleId){
|
|
|
- postAction('/alarm/alarmEventRule/edit',params).then(res=>{
|
|
|
- console.log(res);
|
|
|
- this.saveLoading=false;
|
|
|
- if(res.success){
|
|
|
+ if(params.appStatus||params.rel.length>0){
|
|
|
+ if(this.currentRuleId){
|
|
|
+ postAction('/alarm/alarmEventRule/edit',params).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.saveLoading=false;
|
|
|
+ if(res.success){
|
|
|
+
|
|
|
+ this.$router.push('/autoRules')
|
|
|
+ this.$bus.$emit('remove', '/newBlankRule')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- this.$router.push('/autoRules')
|
|
|
- this.$bus.$emit('remove', '/newBlankRule')
|
|
|
+ })
|
|
|
}else{
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
+ postAction('/alarm/alarmEventRule/add',params).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.saveLoading=false;
|
|
|
+ if(res.success){
|
|
|
+
|
|
|
+ this.$router.push('/autoRules')
|
|
|
+ this.$bus.$emit('remove', '/newBlankRule')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
-
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
- postAction('/alarm/alarmEventRule/add',params).then(res=>{
|
|
|
- console.log(res);
|
|
|
this.saveLoading=false;
|
|
|
- if(res.success){
|
|
|
-
|
|
|
- this.$router.push('/autoRules')
|
|
|
- this.$bus.$emit('remove', '/newBlankRule')
|
|
|
- }else{
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
+ this.$message.error('指定情况下必须选择具体计划或者组')
|
|
|
}
|
|
|
|
|
|
+
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
this.$message.error('请按提示填写必填项目!')
|
|
@@ -1070,6 +1076,13 @@ export default {
|
|
|
this.form.applyRange='ACCORDINGTO_STATUS'
|
|
|
}
|
|
|
console.log(this.form)
|
|
|
+ if(this.form.eventRuleLevel=='ACCOUNT'){
|
|
|
+ this.rulesFieldList=this.accountFieldList
|
|
|
+ }else if(this.form.eventRuleLevel=='CAMPAIGN'){
|
|
|
+ this.rulesFieldList=this.campaignFieldList
|
|
|
+ }else if(this.form.eventRuleLevel=='UNIT'){
|
|
|
+ this.rulesFieldList=this.unitFieldList
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
})
|