魏志佳 4 anni fa
parent
commit
9c135a5ce1
1 ha cambiato i file con 40 aggiunte e 41 eliminazioni
  1. 40 41
      src/views/modules/autoRules/newBlankRule.vue

+ 40 - 41
src/views/modules/autoRules/newBlankRule.vue

@@ -20,8 +20,8 @@
                              <a-form-model-item ref="eventRuleLevel"  prop="eventRuleLevel">
                                 <a-radio-group v-model="form.eventRuleLevel" @change="applyObjChange">
                                     <a-radio-button value="ACCOUNT">账户</a-radio-button>
-                                    <!-- <a-radio-button value="CAMPAIGN">计划</a-radio-button>
-                                    <a-radio-button value="UNIT">组</a-radio-button> -->
+                                    <a-radio-button value="CAMPAIGN">计划</a-radio-button>
+                                    <a-radio-button value="UNIT">组</a-radio-button>
                                     <!-- <a-radio-button value="CREATE">创意</a-radio-button> -->
                                 </a-radio-group>
                             </a-form-model-item>
@@ -99,9 +99,9 @@
                         <div class="input-item" > 
                             <a-form-model-item ref="status"  prop="status">
                                 <div class="selectedExist">
-                                    <a-input v-model="selectedCampaignValue" class="input" placeholder='请输入名称' @change="selectedCampaign">
+                                    <!-- <a-input v-model="selectedCampaignValue" class="input" placeholder='请输入名称' @change="selectedCampaign">
                                         <a-icon slot="addonAfter" type="search" />
-                                    </a-input>
+                                    </a-input> -->
                                     <div style="width: 500px; margin-top: 4px;" >
                                         <div class="inventory-tags-lists-header">
                                             <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
@@ -634,7 +634,7 @@ export default {
             this.checkAll=false;
             this.indeterminate=false;
             if(e.target.value=='ACCORDINGTO_STATUS'){
-                this.form.appStatus=1;
+                this.form.appStatus='1';
             }else{
                 this.form.appStatus=null;
             }
@@ -985,48 +985,47 @@ export default {
     },
 
     mounted(){
+        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
+        // }).then(res=>{
+        //     console.log(res);
+        //     if(res.success){              
+        //         this.rulesFieldList=res.result
+        //     }            
+        // })
+
         getAction('/alarm/alarmMetricValue/queryParentChildList',{
+            metricValueLevel:1
         }).then(res=>{
             console.log(res);
             if(res.success){
-               
-                this.rulesFieldList=res.result
- 
+                this.accountFieldList=res.result;
+                if(this.form.eventRuleLevel=='ACCOUNT'){
+                    this.rulesFieldList=this.accountFieldList
+                }   
+            }            
+        })
+        getAction('/alarm/alarmMetricValue/queryParentChildList',{
+            metricValueLevel:2
+        }).then(res=>{
+            console.log(res);
+            if(res.success){
+                this.campaignFieldList=res.result;
+                if(this.form.eventRuleLevel=='CAMPAIGN'){
+                    this.rulesFieldList=this.campaignFieldList
+                }   
+            }            
+        })
+        getAction('/alarm/alarmMetricValue/queryParentChildList',{
+            metricValueLevel:3
+        }).then(res=>{
+            console.log(res);
+            if(res.success){
+                this.unitFieldList=res.result;
+                if(this.form.eventRuleLevel=='UNIT'){
+                    this.rulesFieldList=this.unitFieldList
+                }   
             }            
         })
-        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
-        //     metricValueLevel:1
-        // }).then(res=>{
-        //     console.log(res);
-        //     if(res.success){
-        //         this.accountFieldList=res.result;
-        //         if(this.form.eventRuleLevel=='ACCOUNT'){
-        //             this.rulesFieldList=this.accountFieldList
-        //         }   
-        //     }            
-        // })
-        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
-        //     metricValueLevel:2
-        // }).then(res=>{
-        //     console.log(res);
-        //     if(res.success){
-        //         this.campaignFieldList=res.result;
-        //         if(this.form.eventRuleLevel=='CAMPAIGN'){
-        //             this.rulesFieldList=this.campaignFieldList
-        //         }   
-        //     }            
-        // })
-        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
-        //     metricValueLevel:3
-        // }).then(res=>{
-        //     console.log(res);
-        //     if(res.success){
-        //         this.unitFieldList=res.result;
-        //         if(this.form.eventRuleLevel=='UNIT'){
-        //             this.rulesFieldList=this.unitFieldList
-        //         }   
-        //     }            
-        // })
 
         // console.log(this.$route.query);
         this.currentRuleId=this.$route.query.id