Pārlūkot izejas kodu

'改通知规则'

魏志佳 4 gadi atpakaļ
vecāks
revīzija
945e96da29

+ 7 - 3
src/views/modules/Statistics/imageStatics/imageCostReport.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="vsummary">
+  <div class="imageCostReport">
       <div class="tabspane">
         <a-tabs v-model="tabKeys" @change="tabChange">
             <a-tab-pane :key="1" tab="头条">           
@@ -1039,18 +1039,22 @@ export default {
 // .ant-table .ant-table-fixed-left .ant-table-thead {
 //   height: 108px !important ;
 // }
-.vsummary{
+.imageCostReport{
   .ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
     // display:block;
     white-space: normal;
     word-break: break-all;
   }
+  
+  .ant-table-tbody .ant-table-row-level-0:first-child{
+    background: #e8e9ea;
+  }
 }
 
 </style>
 
 <style lang="scss" scoped>
-.vsummary {
+.imageCostReport {
   width: 100%;
   height: 100%;
   background:  #fff;

+ 34 - 28
src/views/modules/earlyWarningRules/configRules.vue

@@ -254,9 +254,9 @@
                                                     <div class="rules-list-item">
                                                         <div class="rules-list-item-subject" >
                                                             <a-form-model-item ref="processMethod"  prop="processMethod">
-                                                                <a-select   v-model="item.processMethod" :disabled="!!item.groupId">
+                                                                <a-select   v-model="item.operate" :disabled="!!item.groupId">
                                                                     <a-select-option  value='SEND'>仅发送通知</a-select-option>
-                                                                    <a-select-option  value='PAUSE' >关停</a-select-option>
+                                                                    <a-select-option  value='PAUSE' >关停并发送通知</a-select-option>
                                                                     
                                                                 </a-select>
                                                             </a-form-model-item>
@@ -264,10 +264,10 @@
                                                         <div class="rules-list-item-subject" >
                                                             <a-form-model-item ref="processMethod"  prop="processMethod">
                                                                 <a-select   v-model="item.sendType" :disabled="!!item.groupId">
-                                                                    <a-select-option  value='message' >短信</a-select-option>
-                                                                    <a-select-option  value='enterpriseWechat'>企业微信</a-select-option>
-                                                                    <a-select-option  value='email'>邮箱</a-select-option>
-                                                                    <a-select-option  value='phone'>电话</a-select-option>
+                                                                    <!-- <a-select-option  value='message' >短信</a-select-option> -->
+                                                                    <a-select-option  value='Wechat'>企业微信</a-select-option>
+                                                                    <a-select-option  value='EMAIL'>邮箱</a-select-option>
+                                                                    <!-- <a-select-option  value='phone'>电话</a-select-option> -->
                                                                 </a-select>
                                                             </a-form-model-item>
                                                         </div>
@@ -361,8 +361,8 @@ export default {
                                 isUnlimited:1,
                             },
                         ],
-                        processMethod:'SEND',//预警方式
-                        sendType:'enterpriseWechat',//通知方式
+                        operate:'SEND',//预警方式
+                        sendType:'Wechat',//通知方式
                     },
                 ],
             },
@@ -396,32 +396,38 @@ export default {
     methods: {
         blurTemplateName(){
             console.log(this.form)
-            if(this.templateNameTrue){
-                if(this.form.templateName!=''){
-                    putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+            if(this.currentRuleId){
+                if(this.templateNameTrue){
+                    if(this.form.templateName!=''){
+                        putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+                            if(res.success){
+
+                            }else{
+                            this.$message.error(res.message) 
+                            }
+                        })
+                    }else{
+                        this.$message.error('模板名称不可以为空!!!')
+                    }
+                }
+            }
+            
+        },
+        blurGroupName(item){
+            if(this.currentRuleId){
+                if(item.groupName!=''&&item.remark!=''){
+                    putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
                         if(res.success){
 
                         }else{
-                           this.$message.error(res.message) 
+                        this.$message.error(res.message)  
                         }
                     })
                 }else{
-                    this.$message.error('模板名称不可以为空!!!')
+                    this.$message.error('规则名称和规则描述不可以为空!!!')
                 }
             }
-        },
-        blurGroupName(item){
-            if(item.groupName!=''&&item.remark!=''){
-                putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
-                    if(res.success){
-
-                    }else{
-                       this.$message.error(res.message)  
-                    }
-                })
-            }else{
-                this.$message.error('规则名称和规则描述不可以为空!!!')
-            }
+            
         },
         ruleTypeChange(item){
             console.log(item)
@@ -530,8 +536,8 @@ export default {
                     ruleRelationship:"and",
                     ruleType:'base',
                     remark:'',
-                    processMethod:'SEND',//预警方式
-                    sendType:'enterpriseWechat',//通知方式
+                    operate:'SEND',//预警方式
+                    sendType:'Wechat',//通知方式
                     isRequired:1,
                     isCopy:0,
                     ruleDetail:[