|
@@ -17,12 +17,12 @@
|
|
|
<div class="required-item"></div>
|
|
|
</div>
|
|
|
<div class="input-item">
|
|
|
- <a-form-model-item ref="applyObject" prop="applyObject">
|
|
|
- <a-radio-group v-model="form.applyObject" @change="applyObjChange">
|
|
|
+ <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="CAMPAIGN">计划</a-radio-button>
|
|
|
<a-radio-button value="UNIT">组</a-radio-button>
|
|
|
- <a-radio-button value="CREATE">创意</a-radio-button> -->
|
|
|
+ <!-- <a-radio-button value="CREATE">创意</a-radio-button> -->
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
@@ -30,58 +30,58 @@
|
|
|
<div class="row-item" >
|
|
|
<div class="hint-item"></div>
|
|
|
<div class="label-item">
|
|
|
- <div class="text-item">应用范围</div>
|
|
|
+ <div class="text-item">应用账户</div>
|
|
|
<div class="required-item"></div>
|
|
|
</div>
|
|
|
<div class="input-item" >
|
|
|
- <a-form-model-item ref="applyRange" prop="applyRange" v-if="form.applyObject!='ACCOUNT'">
|
|
|
- <a-radio-group v-model="form.applyRange">
|
|
|
- <a-radio-button value="ACCORDINGTO_STATUS">按状态筛选</a-radio-button>
|
|
|
- <a-radio-button value="APPOINT">指定</a-radio-button>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-model-item>
|
|
|
|
|
|
- <a-form-model-item ref="applyAccount" prop="applyAccount" v-if="form.applyObject=='ACCOUNT'">
|
|
|
+ <a-form-model-item ref="applyAccount" prop="applyAccount" >
|
|
|
<Treeselect :appId.sync="form.applyAccount" :multiple="false" request="2,4" ref="treeSelect" />
|
|
|
-
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="row-item">
|
|
|
+ <div class="row-item" v-if="form.eventRuleLevel=='UNIT'">
|
|
|
<div class="hint-item"></div>
|
|
|
<div class="label-item">
|
|
|
- <div class="text-item">规则字段</div>
|
|
|
+ <div class="text-item">应用计划</div>
|
|
|
<div class="required-item"></div>
|
|
|
</div>
|
|
|
<div class="input-item" >
|
|
|
- <a-form-model-item ref="metricValueCode" prop="metricValueCode">
|
|
|
- <a-select
|
|
|
- v-model="form.metricValueCode"
|
|
|
- show-search
|
|
|
- placeholder="选择规则字段"
|
|
|
- option-filter-prop="children"
|
|
|
- style="width: 200px"
|
|
|
- :filter-option="filterOption"
|
|
|
- @change="handleChange"
|
|
|
- >
|
|
|
- <a-select-option v-for="item in rulesFieldList" :key="item.id" :value='item.metricValueCode'>
|
|
|
- {{item.metricValueName}}
|
|
|
+
|
|
|
+ <a-form-model-item ref="campaignId" prop="campaignId" >
|
|
|
+ <a-select style="width: 500px" v-model="form.campaignId" allowClear placeholder="选择具体的计划">
|
|
|
+ <a-select-option v-for="item in campaignList" :key='item.id' :value='item.campaignId'>
|
|
|
+ {{item.campaignName}}
|
|
|
</a-select-option>
|
|
|
-
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="row-item" v-if="form.applyRange=='ACCORDINGTO_STATUS'&&form.applyObject!='ACCOUNT'">
|
|
|
+ <div class="row-item" v-if="form.eventRuleLevel!='ACCOUNT'">
|
|
|
+ <div class="hint-item"></div>
|
|
|
+ <div class="label-item">
|
|
|
+ <div class="text-item">应用方式</div>
|
|
|
+ <div class="required-item"></div>
|
|
|
+ </div>
|
|
|
+ <div class="input-item" >
|
|
|
+ <a-form-model-item ref="applyRange" prop="applyRange" >
|
|
|
+ <a-radio-group v-model="form.applyRange" @change="applyRangeChange">
|
|
|
+ <a-radio-button value="ACCORDINGTO_STATUS">按状态筛选</a-radio-button>
|
|
|
+ <a-radio-button value="APPOINT">指定</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row-item" v-if="form.applyRange=='ACCORDINGTO_STATUS'&&form.eventRuleLevel!='ACCOUNT'">
|
|
|
<div class="hint-item"></div>
|
|
|
<div class="label-item">
|
|
|
<div class="text-item">选择状态</div>
|
|
|
<div class="required-item"></div>
|
|
|
</div>
|
|
|
<div class="input-item" >
|
|
|
- <a-form-model-item ref="status" prop="status">
|
|
|
- <a-select style="width: 300px" v-model="form.status">
|
|
|
+ <a-form-model-item ref=" appStatus" prop=" appStatus">
|
|
|
+ <a-select style="width: 300px" v-model="form. appStatus" >
|
|
|
<a-select-option v-for="item in statusList" :key="item.id" :value='item.value'>
|
|
|
{{item.title}}
|
|
|
</a-select-option>
|
|
@@ -90,10 +90,10 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="row-item" v-if="form.applyRange=='APPOINT'&&form.applyObject!='ACCOUNT'">
|
|
|
+ <div class="row-item" v-if="form.applyRange=='APPOINT'&&form.eventRuleLevel!='ACCOUNT'">
|
|
|
<div class="hint-item"></div>
|
|
|
<div class="label-item">
|
|
|
- <div class="text-item">具体{{form.applyObject | handlerApplyObj}}</div>
|
|
|
+ <div class="text-item">具体{{form.eventRuleLevel | handlerApplyObj}}</div>
|
|
|
<div class="required-item"></div>
|
|
|
</div>
|
|
|
<div class="input-item" >
|
|
@@ -108,10 +108,16 @@
|
|
|
</a-checkbox>
|
|
|
<div class="inventory-tags-lists-name"><strong>列表</strong></div>
|
|
|
</div>
|
|
|
- <div class="inventory-tags-lists-container">
|
|
|
- <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" >
|
|
|
- <span></span>
|
|
|
- </a-checkbox-group>
|
|
|
+ <div class="inventory-tags-lists-container" v-if="form.applyAccount">
|
|
|
+ <a-spin :spinning="spinning">
|
|
|
+ <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" v-show='plainOptions.length'></a-checkbox-group>
|
|
|
+ <div style="text-align: center;padding-top:30px" v-show="!plainOptions.length">
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
+ </a-spin>
|
|
|
+ </div>
|
|
|
+ <div class="inventory-tags-lists-container" style="text-align: center;padding-top:30px" v-else>
|
|
|
+ 选择具体账户后,可查看
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fenye" v-if="totalPage">
|
|
@@ -122,6 +128,32 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="row-item">
|
|
|
+ <div class="hint-item"></div>
|
|
|
+ <div class="label-item">
|
|
|
+ <div class="text-item">规则字段</div>
|
|
|
+ <div class="required-item"></div>
|
|
|
+ </div>
|
|
|
+ <div class="input-item" >
|
|
|
+ <a-form-model-item ref="metricValueCode" prop="metricValueCode">
|
|
|
+ <a-select
|
|
|
+ v-model="form.metricValueCode"
|
|
|
+ show-search
|
|
|
+ placeholder="选择规则字段"
|
|
|
+ option-filter-prop="children"
|
|
|
+ style="width: 200px"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ @change="handleChange"
|
|
|
+ >
|
|
|
+ <a-select-option v-for="item in rulesFieldList" :key="item.id" :value='item.metricValueCode'>
|
|
|
+ {{item.metricValueName}}
|
|
|
+ </a-select-option>
|
|
|
+
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="row-item" >
|
|
|
<div class="hint-item">
|
|
|
<a-tooltip>
|
|
@@ -164,6 +196,7 @@
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
+ <template v-if="form.metricValueCode!='campaignStatus'&&form.metricValueCode!='unitStatus'">
|
|
|
<div class="rules-list-item-subject" >
|
|
|
<a-select v-model="item.dataRange">
|
|
|
<a-select-option value='CURRENT_DAY_DATA'>当天数据</a-select-option>
|
|
@@ -197,7 +230,7 @@
|
|
|
<a-input-number :min="0" style="width:100%" :max="9999999.99" :step="1" v-model="item.threshold" placeholder="请输入" />
|
|
|
<span style="margin-left:8px;line-height:32px">{{item.metricValueCode | handlerDANWEI }}</span>
|
|
|
</div>
|
|
|
-
|
|
|
+ </template>
|
|
|
|
|
|
<!-- <div class="rules-list-item-subject" v-if="item.judgeType=='DAY_BUDGET'&&item.judgeMethod!='BETWEEN'">
|
|
|
<a-select v-model="item.budgetMultiple">
|
|
@@ -234,6 +267,31 @@
|
|
|
<!-- <div class="rules-list-item-delete" @click="deleteRulesListItem(item,index)">
|
|
|
<a-icon type="delete" style="font-size:16px;position: relative;top: 4px;" />
|
|
|
</div> -->
|
|
|
+ <div class="rules-list-item-subject" v-if="form.metricValueCode=='campaignStatus'">
|
|
|
+ <a-select v-model="item.campaignStatus" placeholder="请输入具体状态">
|
|
|
+ <a-select-option value='-1'>不限</a-select-option>
|
|
|
+ <a-select-option value='1'>已暂停</a-select-option>
|
|
|
+ <a-select-option value='3'>计划超预算</a-select-option>
|
|
|
+ <a-select-option value='4'>有效</a-select-option>
|
|
|
+ <a-select-option value='5'>已删除</a-select-option>
|
|
|
+ <a-select-option value='6'>余额不足</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ <div class="rules-list-item-subject" v-if="form.metricValueCode=='unitStatus'">
|
|
|
+ <a-select v-model="item.unitStatus" placeholder="请输入具体状态">
|
|
|
+ <a-select-option value='-1'>不限</a-select-option>
|
|
|
+ <a-select-option value='1'>计划已暂停</a-select-option>
|
|
|
+ <a-select-option value='3'>计划超预算</a-select-option>
|
|
|
+ <a-select-option value='6'>余额不足</a-select-option>
|
|
|
+ <a-select-option value='11'>审核中</a-select-option>
|
|
|
+ <a-select-option value='12'>审核未通过</a-select-option>
|
|
|
+ <a-select-option value='14'>已结束</a-select-option>
|
|
|
+ <a-select-option value='15'>已暂停</a-select-option>
|
|
|
+ <a-select-option value='17'>组超预算</a-select-option>
|
|
|
+ <a-select-option value='19'>未达投放时间</a-select-option>
|
|
|
+ <a-select-option value='20'>有效</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
|
|
|
@@ -348,36 +406,37 @@ import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
|
|
|
import { Switch } from 'ant-design-vue';
|
|
|
import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
|
|
|
let statusList=[
|
|
|
- {
|
|
|
- id:1,
|
|
|
- value:'STATUS_ALL',
|
|
|
- title:'所有',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // id:1,
|
|
|
+ // value:'STATUS_ALL',
|
|
|
+ // title:'所有',
|
|
|
+ // },
|
|
|
+ // STATUS_DELIVERY_OK
|
|
|
{
|
|
|
id:2,
|
|
|
- value:'STATUS_DELIVERY_OK',
|
|
|
+ value:"1",
|
|
|
title:'所有投放中',
|
|
|
},
|
|
|
- {
|
|
|
- id:3,
|
|
|
- value:'STATUS_CREATE',
|
|
|
- title:'所有新建',
|
|
|
- },
|
|
|
- {
|
|
|
- id:4,
|
|
|
- value:'STATUS_DISABLE',
|
|
|
- title:'所有已暂停',
|
|
|
- },
|
|
|
- {
|
|
|
- id:5,
|
|
|
- value:'STATUS_AUDIT',
|
|
|
- title:'所有新建审核',
|
|
|
- },
|
|
|
- {
|
|
|
- id:6,
|
|
|
- value:'STATUS_DONE',
|
|
|
- title:'所有已完成',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // id:3,
|
|
|
+ // value:'STATUS_CREATE',
|
|
|
+ // title:'所有新建',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:4,
|
|
|
+ // value:'STATUS_DISABLE',
|
|
|
+ // title:'所有已暂停',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:5,
|
|
|
+ // value:'STATUS_AUDIT',
|
|
|
+ // title:'所有新建审核',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:6,
|
|
|
+ // value:'STATUS_DONE',
|
|
|
+ // title:'所有已完成',
|
|
|
+ // },
|
|
|
]
|
|
|
|
|
|
|
|
@@ -469,6 +528,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ campaignList:[],
|
|
|
currentRuleId:'',
|
|
|
rulesFieldList:[],
|
|
|
accountID:undefined,
|
|
@@ -490,10 +550,11 @@ export default {
|
|
|
accountList:[],
|
|
|
form: {
|
|
|
eventRuleName: `空白规则_${moment().format('YYYY_MM_DD_hh:mm:ss')}`,
|
|
|
- applyObject:'ACCOUNT',
|
|
|
+ eventRuleLevel:'ACCOUNT',
|
|
|
applyAccount:'',
|
|
|
+ campaignId:undefined,
|
|
|
applyRange:'ACCORDINGTO_STATUS',
|
|
|
- status:'STATUS_DELIVERY_OK',
|
|
|
+ appStatus:'1',
|
|
|
sendMessage:1,
|
|
|
checkFrequency:'HOUR',
|
|
|
causalCondition:'MEET_ALL', //因果条件 满足所有/满足任意
|
|
@@ -524,6 +585,8 @@ export default {
|
|
|
judgeType:'MONEY',
|
|
|
threshold:0,
|
|
|
minThreshold:0,
|
|
|
+ campaignStatus:undefined,
|
|
|
+ unitStatus:undefined,
|
|
|
// budgetMultiple:0.5,
|
|
|
// budgetMultipleMin:0.5,
|
|
|
// budgetMultipleMax:0.8,
|
|
@@ -534,7 +597,94 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'form.applyAccount'(n,o){
|
|
|
+ this.campaignList=[];
|
|
|
+ this.form.campaignid=''
|
|
|
+ if(n){
|
|
|
+ this.spinning=true;
|
|
|
+ if(this.form.eventRuleLevel=='CAMPAIGN'){
|
|
|
+ this.getCampaignList()
|
|
|
+ }else if(this.form.eventRuleLevel=='UNIT'){
|
|
|
+ this.getCampaignList()
|
|
|
+ this.getUnitList()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else if(!n){
|
|
|
+ this.plainOptions=[];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 'form.campaignId'(n,o){
|
|
|
+
|
|
|
+ this.spinning=true;
|
|
|
+ this.getUnitList()
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 应用方式改变
|
|
|
+ applyRangeChange(e){
|
|
|
+ console.log(e.target.value)
|
|
|
+ this.checkedList=[];
|
|
|
+ this.checkAll=false;
|
|
|
+ this.indeterminate=false;
|
|
|
+ if(e.target.value=='ACCORDINGTO_STATUS'){
|
|
|
+ this.form.appStatus=1;
|
|
|
+ }else{
|
|
|
+ this.form.appStatus=null;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ // 获取计划列表
|
|
|
+ getCampaignList(){
|
|
|
+ getAction('/kuaishou/batch/getCampaignList',{
|
|
|
+ accountId:this.form.applyAccount,
|
|
|
+ putStatus:1,
|
|
|
+ pageNo:1,
|
|
|
+ pageSize:100000,
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.plainOptions=[];
|
|
|
+ this.spinning=false;
|
|
|
+ if(res.success){
|
|
|
+ if(this.form.eventRuleLevel=='CAMPAIGN'){
|
|
|
+ this.plainOptions=res.result.records.map(item=>{
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label:item.campaignName,
|
|
|
+ value:item.campaignId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.campaignList=res.result.records
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取计划列表
|
|
|
+ getUnitList(){
|
|
|
+ getAction('/kuaishou/batch/getUnitList',{
|
|
|
+ accountId:this.form.applyAccount,
|
|
|
+ campaignId:this.form.campaignId,
|
|
|
+ pageNo:1,
|
|
|
+ pageSize:100000,
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.plainOptions=[];
|
|
|
+ this.spinning=false;
|
|
|
+ if(res.success){
|
|
|
+ this.plainOptions=res.result.records.map(item=>{
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label:item.unitName+'_('+item.reviewDetail+')',
|
|
|
+ value:item.unitId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
inputCheck(val){
|
|
|
console.log(val)
|
|
|
},
|
|
@@ -568,6 +718,8 @@ export default {
|
|
|
judgeType:'MONEY',
|
|
|
threshold:undefined,
|
|
|
minThreshold:undefined,
|
|
|
+ campaignStatus:undefined,
|
|
|
+ unitStatus:undefined,
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -601,7 +753,8 @@ export default {
|
|
|
budgetMultiple:0.5,
|
|
|
budgetMultipleMin:0.5,
|
|
|
budgetMultipleMax:0.8,
|
|
|
-
|
|
|
+ campaignStatus:undefined,
|
|
|
+ unitStatus:undefined,
|
|
|
threshold:0,
|
|
|
maxNumber:0,
|
|
|
})
|
|
@@ -627,12 +780,30 @@ export default {
|
|
|
item.specificMoneyMax=undefined;
|
|
|
item.threshold=undefined;
|
|
|
item.maxNumber=undefined;
|
|
|
+ item.campaignStatus=undefined;
|
|
|
+ item.unitStatus=undefined;
|
|
|
},
|
|
|
|
|
|
applyObjChange(e){
|
|
|
+ // console.log(e.target.value)
|
|
|
+ this.plainOptions=[]
|
|
|
+ this.checkedList=[];
|
|
|
+ this.checkAll=false;
|
|
|
+ this.indeterminate=false;
|
|
|
if(e.target.value=='ACCOUNT'){
|
|
|
this.form.processMethod='SEND'
|
|
|
}
|
|
|
+ if(this.form.applyAccount){
|
|
|
+ if(e.target.value=='CAMPAIGN'){
|
|
|
+ this.spinning=true;
|
|
|
+ this.getCampaignList()
|
|
|
+ }else if(e.target.value=='UNIT'){
|
|
|
+ this.spinning=true;
|
|
|
+ this.getCampaignList()
|
|
|
+ this.getUnitList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
saveHandler(){
|
|
@@ -642,7 +813,53 @@ export default {
|
|
|
console.log(valid,this.form);
|
|
|
|
|
|
this.saveLoading=true;
|
|
|
- let params ={accountId:this.form.applyAccount,alarmEventMetric:this.rulesList,...this.form}
|
|
|
+ let rel=[]
|
|
|
+ if(this.form.eventRuleLevel=='CAMPAIGN'){
|
|
|
+
|
|
|
+ rel=this.checkedList.map(item=>{
|
|
|
+ return {
|
|
|
+ campaignId:item,
|
|
|
+ unitId:'',
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }else if(this.form.eventRuleLevel=='UNIT'){
|
|
|
+ let checkedList=[];
|
|
|
+ this.checkedList.forEach(item=>{
|
|
|
+ this.plainOptions.forEach(ele=>{
|
|
|
+ if(ele.unitId==item){
|
|
|
+ checkedList.push({
|
|
|
+ campaignId:ele.campaignId|| '',
|
|
|
+ unitId:item
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // console.log(checkedList)
|
|
|
+ rel=this.checkedList.map(item=>{
|
|
|
+ return {
|
|
|
+ campaignId:this.form.campaignId|| '',
|
|
|
+ unitId:item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // console.log(rel)
|
|
|
+ if(this.form.metricValueCode=='unitStatus'){
|
|
|
+ // console.log(1)
|
|
|
+ this.rulesList[0].threshold=this.rulesList[0].unitStatus;
|
|
|
+ this.rulesList[0].judgeMethod='EQ'
|
|
|
+ }else if(this.form.metricValueCode=='campaignStatus'){
|
|
|
+ this.rulesList[0].threshold=this.rulesList[0].campaignStatus
|
|
|
+ this.rulesList[0].judgeMethod='EQ'
|
|
|
+ }
|
|
|
+
|
|
|
+ let params ={
|
|
|
+ accountId:this.form.applyAccount,
|
|
|
+ alarmEventMetric:this.rulesList,
|
|
|
+ rel,
|
|
|
+ ...this.form
|
|
|
+ }
|
|
|
+ console.log(params)
|
|
|
if(this.currentRuleId){
|
|
|
postAction('/alarm/alarmEventRule/edit',params).then(res=>{
|
|
|
console.log(res);
|
|
@@ -695,8 +912,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
onChange(checkedList) {
|
|
|
- this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length;
|
|
|
- this.checkAll = checkedList.length === plainOptions.length;
|
|
|
+ this.indeterminate = !!checkedList.length && checkedList.length < this.plainOptions.length;
|
|
|
+ this.checkAll = checkedList.length === this.plainOptions.length;
|
|
|
},
|
|
|
onCheckAllChange(e) {
|
|
|
let valueOption = [];
|
|
@@ -741,7 +958,7 @@ export default {
|
|
|
return showVal
|
|
|
},
|
|
|
handlerDANWEI(val){
|
|
|
- console.log(val.indexOf("RATE") != -1)
|
|
|
+ // console.log(val.indexOf("RATE") != -1)
|
|
|
|
|
|
let returnVal='';
|
|
|
|
|
@@ -776,12 +993,42 @@ export default {
|
|
|
console.log(res);
|
|
|
if(res.success){
|
|
|
this.form={
|
|
|
- applyObject:'ACCOUNT',
|
|
|
causalCondition:'MEET_ALL', //因果条件 满足所有/满足任意
|
|
|
applyAccount:res.result.accountId,
|
|
|
...res.result
|
|
|
}
|
|
|
- this.rulesList=res.result.alarmEventMetrics
|
|
|
+ this.rulesList=res.result.alarmEventMetrics.map(item=>{
|
|
|
+ if(item.metricValueCode=='unitStatus_value'){
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ unitStatus:item.threshold
|
|
|
+ }
|
|
|
+ }else if(item.metricValueCode=='campaignStatus_value'){
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ campaignStatus:item.threshold
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ if(res.result.rel){
|
|
|
+ this.form.applyRange='APPOINT'
|
|
|
+ this.checkedList=res.result.rel.map(item=>{
|
|
|
+ if(item.eventRuleLevel=='CAMPAIGN'){
|
|
|
+ return item.campaignId
|
|
|
+ }else if (item.eventRuleLevel=='UNIT'){
|
|
|
+ return item.unitId
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ this.onChange(this.checkedList)
|
|
|
+ }else{
|
|
|
+ this.form.applyRange='ACCORDINGTO_STATUS'
|
|
|
+ }
|
|
|
console.log(this.form)
|
|
|
}
|
|
|
|
|
@@ -1007,6 +1254,9 @@ export default {
|
|
|
height: 100%;
|
|
|
padding: 4px 0px;
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
+ height: 300px;
|
|
|
+ overflow: auto;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.inventory-tags-lists-item {
|