|
@@ -184,6 +184,7 @@
|
|
|
placeholder="请选择"
|
|
|
allow-clear
|
|
|
>
|
|
|
+ <a-select-option :value="2">不限</a-select-option>
|
|
|
<a-select-option :value="1">推送成功</a-select-option>
|
|
|
<a-select-option :value="0">推送失败</a-select-option>
|
|
|
</a-select>
|
|
@@ -238,7 +239,7 @@
|
|
|
@ok="handleAddPopulation"
|
|
|
dialog-class="relax-modal"
|
|
|
@cancel="handleCancelPerson"
|
|
|
- :loading="personLoading"
|
|
|
+ :confirm-loading="personLoading"
|
|
|
rowKey="index">
|
|
|
<a-form
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
@@ -280,6 +281,7 @@
|
|
|
:scroll="{ y: 250 }"
|
|
|
:row-selection="rowSelection"
|
|
|
bordered
|
|
|
+ v-if="people!='0'"
|
|
|
>
|
|
|
<template slot="name" slot-scope="name"> {{ name }} </template>
|
|
|
<template slot="populationType" slot-scope="populationType"> {{ populationType | customCrowdHandler}} </template>
|
|
@@ -297,6 +299,7 @@
|
|
|
:scroll="{ y: 250 }"
|
|
|
:row-selection="rowSelection2"
|
|
|
bordered
|
|
|
+ v-if="people!='1'"
|
|
|
>
|
|
|
<template slot="name" slot-scope="name"> {{ name }} </template>
|
|
|
<template slot="populationType" slot-scope="populationType"> {{ populationType | customCrowdHandler}} </template>
|
|
@@ -372,7 +375,7 @@ export default {
|
|
|
excludeSelectedKeys: [],
|
|
|
excludeSelectedRowKeys: [],
|
|
|
//自定义人群参数结束
|
|
|
- resultHistory: null,
|
|
|
+ resultHistory: 2,
|
|
|
unitAccountId: "",
|
|
|
activeKey: "",
|
|
|
setPersonVisible: false,
|
|
@@ -430,7 +433,7 @@ export default {
|
|
|
// 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
this.ipagination.current = current;
|
|
|
this.ipagination.pageSize= pageSize;
|
|
|
- this.handleGetTableList()
|
|
|
+ this.handleGetTableList({})
|
|
|
}
|
|
|
},
|
|
|
accountIpagination: {
|
|
@@ -545,11 +548,12 @@ export default {
|
|
|
this.incluedSelectedRowKeys = selectedRowKeys;
|
|
|
this.incluedSelectedKeys = selectedRows
|
|
|
},
|
|
|
+ selectedRowKeys: this.incluedSelectedRowKeys,
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
|
- disabled: this.excludeSelectedRowKeys.indexOf(record.key)>-1,
|
|
|
+ disabled: this.excludeSelectedRowKeys?this.excludeSelectedRowKeys.indexOf(record.key)>-1:undefined,
|
|
|
name: record.name,
|
|
|
- defaultChecked:this.incluedSelectedRowKeys.indexOf(record.key)>-1
|
|
|
+ defaultChecked:this.incluedSelectedRowKeys?this.incluedSelectedRowKeys.indexOf(record.key)>-1:undefined,
|
|
|
},
|
|
|
}),
|
|
|
};
|
|
@@ -560,11 +564,12 @@ export default {
|
|
|
this.excludeSelectedRowKeys = selectedRowKeys;
|
|
|
this.excludeSelectedKeys = selectedRows;
|
|
|
},
|
|
|
+ selectedRowKeys: this.excludeSelectedRowKeys,
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
|
- disabled: this.incluedSelectedRowKeys.indexOf(record.key)>-1,
|
|
|
+ disabled: this.incluedSelectedRowKeys?this.incluedSelectedRowKeys.indexOf(record.key)>-1:undefined,
|
|
|
name: record.name,
|
|
|
- defaultChecked:this.excludeSelectedRowKeys.indexOf(record.key)>-1
|
|
|
+ defaultChecked:this.excludeSelectedRowKeys?this.excludeSelectedRowKeys.indexOf(record.key)>-1:undefined
|
|
|
},
|
|
|
}),
|
|
|
};
|
|
@@ -576,6 +581,7 @@ export default {
|
|
|
this.finallyRightTree[index].incluedSelectedRowKeys = selectedRowKeys;
|
|
|
this.finallyRightTree[index].incluedSelectedKeys = selectedRows;
|
|
|
},
|
|
|
+ selectedRowKeys:this.finallyRightTree[this.finallyRightTree.findIndex(item => item.key === this.activeKey)].incluedSelectedRowKeys,
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
|
disabled: this.finallyRightTree[this.finallyRightTree.findIndex(item => item.key === this.activeKey)].excludeSelectedRowKeys.indexOf(record.key)>-1,
|
|
@@ -592,6 +598,7 @@ export default {
|
|
|
this.finallyRightTree[index].excludeSelectedRowKeys = selectedRowKeys;
|
|
|
this.finallyRightTree[index].excludeSelectedKeys = selectedRows;
|
|
|
},
|
|
|
+ selectedRowKeys:this.finallyRightTree[this.finallyRightTree.findIndex(item => item.key === this.activeKey)].excludeSelectedRowKeys,
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
|
disabled: this.finallyRightTree[this.finallyRightTree.findIndex(item => item.key === this.activeKey)].incluedSelectedRowKeys.indexOf(record.key)>-1,
|
|
@@ -667,28 +674,25 @@ export default {
|
|
|
},
|
|
|
customCrowdChange(e){
|
|
|
//console.log(e);
|
|
|
-
|
|
|
-
|
|
|
+ this.incluedSelectedRowKeys = [];
|
|
|
+ this.incluedSelectedKeys = [];
|
|
|
+ this.excludeSelectedKeys = [];
|
|
|
+ this.excludeSelectedRowKeys = [];
|
|
|
if(e.target.value=='1' || e.target.value=='2'){
|
|
|
this.retargetTabChange();
|
|
|
this.tabKey=e.target.value
|
|
|
}else if(e.target.value=='3'){
|
|
|
this.retargetTabChange();
|
|
|
- this.tabKey='1'
|
|
|
+ this.tabKey = '1';
|
|
|
}
|
|
|
- this.$nextTick(() => {
|
|
|
- this.incluedSelectedRowKeys = [];
|
|
|
- this.incluedSelectedKeys = [];
|
|
|
- this.excludeSelectedKeys = [];
|
|
|
- this.excludeSelectedRowKeys = [];
|
|
|
- })
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
// 自定义人群的--同时定向排除tab切换事件
|
|
|
retargetTabChange(){
|
|
|
//console.log()
|
|
|
this.retargetDataAll=[];
|
|
|
this.loading=true;
|
|
|
-
|
|
|
+
|
|
|
getAction('/kuaishou/batch/getPopulationList',{
|
|
|
accountId:this.personDetail.accountId
|
|
|
}).then((res)=>{
|
|
@@ -738,6 +742,7 @@ export default {
|
|
|
let params = {};
|
|
|
params.accountId = val.accountId;
|
|
|
params.templateId = val.templateId;
|
|
|
+ this.retargetTabChange()
|
|
|
getAction('/kuaishouDirectionalPackage/queryPopulationById' ,params).then(res => {
|
|
|
if(res.success) {
|
|
|
this.retargetAccountId(val.accountId);
|
|
@@ -756,23 +761,35 @@ export default {
|
|
|
}
|
|
|
this.incluedSelectedRowKeys = res.result.population ? res.result.population : [];
|
|
|
this.excludeSelectedRowKeys = res.result.excludePopulation ? res.result.excludePopulation : [];
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
handleAddPopulation() {
|
|
|
this.personLoading = true;
|
|
|
let params = {};
|
|
|
+ params.id = this.personDetail.id;
|
|
|
params.accountId = this.personDetail.accountId;
|
|
|
+ params.templateId = this.personDetail.templateId;
|
|
|
+ params.templateName = this.personDetail.templateName;
|
|
|
if(this.people == '0') {
|
|
|
-
|
|
|
+ params.population = [];
|
|
|
+ params.excludePopulation = [];
|
|
|
}
|
|
|
else if(this.people == '1') {
|
|
|
params.population = this.incluedSelectedRowKeys;
|
|
|
+ params.excludePopulation = [];
|
|
|
}
|
|
|
else if(this.people == '2') {
|
|
|
params.excludePopulation = this.excludeSelectedRowKeys;
|
|
|
+ params.population = [];
|
|
|
}
|
|
|
else {
|
|
|
+ if(this.incluedSelectedRowKeys.length === 0 || this.excludeSelectedRowKeys.length === 0){
|
|
|
+ this.$message.error("同时定向排除需要定向池与排除池都选择");
|
|
|
+ this.personLoading = false;
|
|
|
+ return
|
|
|
+ }
|
|
|
params.population = this.incluedSelectedRowKeys;
|
|
|
params.excludePopulation = this.excludeSelectedRowKeys;
|
|
|
}
|
|
@@ -886,7 +903,7 @@ export default {
|
|
|
id: id,
|
|
|
pageNo: this.causePag.page,
|
|
|
pageSize: this.causePag.size,
|
|
|
- status: this.resultHistory
|
|
|
+ status: this.resultHistory !== 2 ? this.resultHistory : null
|
|
|
};
|
|
|
postAction('/kuaishouDirectionalPackage/queryPushResults', paramsData).then(result => {
|
|
|
if (result.code === 200) {
|
|
@@ -928,6 +945,7 @@ export default {
|
|
|
this.pushVisible = true;
|
|
|
},
|
|
|
handleCauseCancel() {
|
|
|
+ this.resultHistory = 2;
|
|
|
this.causeVisible = false;
|
|
|
},
|
|
|
handleAgian(val) {
|
|
@@ -943,6 +961,7 @@ export default {
|
|
|
tabKey: '1'
|
|
|
});
|
|
|
this.causeVisible = false;
|
|
|
+ this.resultHistory = 2;
|
|
|
this.handlePushSure();
|
|
|
},
|
|
|
handleSetPerson() {
|