|
@@ -148,6 +148,7 @@
|
|
<div class="acount-title-right">
|
|
<div class="acount-title-right">
|
|
<a-radio-group default-value="a" button-style="solid">
|
|
<a-radio-group default-value="a" button-style="solid">
|
|
<a-radio-button value="a">效果</a-radio-button>
|
|
<a-radio-button value="a">效果</a-radio-button>
|
|
|
|
+ <a-radio-button value="b" disabled>品牌</a-radio-button>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -242,117 +243,14 @@ export default {
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
mateTypeTasks: AppMarketService.setMateTypeTasks(), // 匹配类型
|
|
mateTypeTasks: AppMarketService.setMateTypeTasks(), // 匹配类型
|
|
populationTypeTasks: AppMarketService.setPopulationTypeTasks(), // 人群包类型
|
|
populationTypeTasks: AppMarketService.setPopulationTypeTasks(), // 人群包类型
|
|
- statusTasks: [ // 状态
|
|
|
|
- {
|
|
|
|
- label: 0,
|
|
|
|
- value: '计算中'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 1,
|
|
|
|
- value: '已生效'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 2,
|
|
|
|
- value: '已删除'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 3,
|
|
|
|
- value: '推送中'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 4,
|
|
|
|
- value: '已推送'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 5,
|
|
|
|
- value: '计算失败'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 6,
|
|
|
|
- value: '推送失败'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: 7,
|
|
|
|
- value: '已失效'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- acountTasks: [ // 账户列表
|
|
|
|
- {
|
|
|
|
- label: '123',
|
|
|
|
- value: '123'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: '444',
|
|
|
|
- value: 'frfr'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ statusTasks: AppMarketService.setStatusTasks(), // 状态枚举
|
|
relaxStatus: '',
|
|
relaxStatus: '',
|
|
causeData: [], // 原因的table列表数据,
|
|
causeData: [], // 原因的table列表数据,
|
|
- depData: [ // 相关项目的table列表数据
|
|
|
|
- {
|
|
|
|
- name: '1111',
|
|
|
|
- age: '222',
|
|
|
|
- address: '33333'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- acountData: [ // 相关账户的table列表数据
|
|
|
|
- {
|
|
|
|
- name: '1111',
|
|
|
|
- age: '222',
|
|
|
|
- address: '33333'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- acountColumns: [ // 相关账户的table列表
|
|
|
|
- {
|
|
|
|
- title: '项目名称',
|
|
|
|
- dataIndex: 'name',
|
|
|
|
- width: '25%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '所属项目',
|
|
|
|
- dataIndex: 'age',
|
|
|
|
- width: '15%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '人群包数量',
|
|
|
|
- dataIndex: 'address',
|
|
|
|
- width: '40%'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- depColumns: [ // 相关项目的table列表
|
|
|
|
- {
|
|
|
|
- title: '项目名称',
|
|
|
|
- dataIndex: 'name',
|
|
|
|
- width: '25%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '账户数量',
|
|
|
|
- dataIndex: 'age',
|
|
|
|
- width: '15%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '人群包数量',
|
|
|
|
- dataIndex: 'address',
|
|
|
|
- width: '40%'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- causeColumns: [ // 原因的table列表
|
|
|
|
- {
|
|
|
|
- title: '项目名称',
|
|
|
|
- dataIndex: 'projectName',
|
|
|
|
- width: '30%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '账户名称',
|
|
|
|
- dataIndex: 'accountName',
|
|
|
|
- width: '30%'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '原因',
|
|
|
|
- dataIndex: 'message',
|
|
|
|
- width: '40%'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ depData: [], // 相关项目的table列表数据,
|
|
|
|
+ acountData: [], // 相关账户的table列表数据,
|
|
|
|
+ acountColumns: AppMarketService.setAcountColumns(), // 相关账户的table列表
|
|
|
|
+ depColumns: AppMarketService.setDepColumns(), // 相关项目的table列表
|
|
|
|
+ causeColumns: AppMarketService.setCauseColumns(), // 原因的table列表
|
|
dataSource: [],
|
|
dataSource: [],
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
@@ -427,15 +325,7 @@ export default {
|
|
name: '',
|
|
name: '',
|
|
resource: ''
|
|
resource: ''
|
|
},
|
|
},
|
|
- personRules: {
|
|
|
|
- name: [
|
|
|
|
- {required: true, message: '人群包名称不能为空', trigger: 'blur'},
|
|
|
|
- {min: 1, max: 20, message: '人群包名称不能超过20个字符', trigger: 'blur'}
|
|
|
|
- ],
|
|
|
|
- resource: [
|
|
|
|
- {required: true, message: '请选择匹配类型', trigger: 'change'}
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
|
|
+ personRules: AppMarketService.setPersonRules(), // 上传人群包表单校验规则
|
|
tablePag: {
|
|
tablePag: {
|
|
page: 1,
|
|
page: 1,
|
|
size: 10
|
|
size: 10
|
|
@@ -457,12 +347,12 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
onShowSizeChange(current, pageSize) {
|
|
onShowSizeChange(current, pageSize) {
|
|
- const params = this.form.getFieldsValue();
|
|
|
|
|
|
+ const paramsData = this.form.getFieldsValue();
|
|
this.tablePag = {
|
|
this.tablePag = {
|
|
page: current,
|
|
page: current,
|
|
size: pageSize
|
|
size: pageSize
|
|
};
|
|
};
|
|
- this.handleGetTableList(params);
|
|
|
|
|
|
+ this.handleGetTableList(paramsData);
|
|
},
|
|
},
|
|
handleCauseSizeChange(current, pageSize) {
|
|
handleCauseSizeChange(current, pageSize) {
|
|
this.causePag = {
|
|
this.causePag = {
|
|
@@ -472,14 +362,14 @@ export default {
|
|
this.handleCauseTableData();
|
|
this.handleCauseTableData();
|
|
},
|
|
},
|
|
handleGetTableList(data) {
|
|
handleGetTableList(data) {
|
|
- const params = {
|
|
|
|
|
|
+ const paramsData = {
|
|
orientationName: data.name,
|
|
orientationName: data.name,
|
|
accountName: this.acountId,
|
|
accountName: this.acountId,
|
|
status: data.status,
|
|
status: data.status,
|
|
pageNo: this.tablePag.page,
|
|
pageNo: this.tablePag.page,
|
|
pageSize: this.tablePag.size
|
|
pageSize: this.tablePag.size
|
|
};
|
|
};
|
|
- getAction('/kuaishouCrowdPack/queryPageList', params).then(result => {
|
|
|
|
|
|
+ getAction('/kuaishouCrowdPack/queryPageList', paramsData).then(result => {
|
|
if (result.code === 200) {
|
|
if (result.code === 200) {
|
|
this.dataSource = result.result.list || [];
|
|
this.dataSource = result.result.list || [];
|
|
this.totalAll = result.result.total || 0;
|
|
this.totalAll = result.result.total || 0;
|
|
@@ -504,20 +394,20 @@ export default {
|
|
onCancel() {}
|
|
onCancel() {}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleAcountRelaxTable(txt) {
|
|
|
|
- const params = {
|
|
|
|
- orientationId: this.acountRelaxDetail.orientationId,
|
|
|
|
|
|
+ handleAcountRelaxTable() {
|
|
|
|
+ const paramsData = {
|
|
|
|
+ signature: this.acountRelaxDetail.signature,
|
|
accountId: this.acountRelaxDetail.accountId,
|
|
accountId: this.acountRelaxDetail.accountId,
|
|
- type: txt === 'dep' ? 1 : 2
|
|
|
|
|
|
+ type: this.relaxStatus === 'dep' ? 1 : 2
|
|
};
|
|
};
|
|
- getAction('/kuaishouCrowdPack/queryRel', params).then(result => {
|
|
|
|
|
|
+ getAction('/kuaishouCrowdPack/queryRel', paramsData).then(result => {
|
|
if (result.code === 200) {
|
|
if (result.code === 200) {
|
|
console.log(result, 'result----relax');
|
|
console.log(result, 'result----relax');
|
|
- if (txt === 'dep') {
|
|
|
|
- this.depData = result.result;
|
|
|
|
|
|
+ if (this.relaxStatus === 'dep') {
|
|
|
|
+ this.depData = result.result.list;
|
|
}
|
|
}
|
|
- else if (txt === 'acount') {
|
|
|
|
- this.acountData = result.result;
|
|
|
|
|
|
+ else if (this.relaxStatus === 'acount') {
|
|
|
|
+ this.acountData = result.result.list;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
@@ -532,7 +422,7 @@ export default {
|
|
this.relaxStatus = 'acount';
|
|
this.relaxStatus = 'acount';
|
|
}
|
|
}
|
|
this.acountRelaxDetail = recd;
|
|
this.acountRelaxDetail = recd;
|
|
- this.handleAcountRelaxTable(txt);
|
|
|
|
|
|
+ this.handleAcountRelaxTable();
|
|
this.relaxVisible = true;
|
|
this.relaxVisible = true;
|
|
},
|
|
},
|
|
handleRelaxCancel() {
|
|
handleRelaxCancel() {
|
|
@@ -545,7 +435,7 @@ export default {
|
|
},
|
|
},
|
|
handleCauseTableData() {
|
|
handleCauseTableData() {
|
|
const paramsData = {
|
|
const paramsData = {
|
|
- accountId: this.causeDetailData.accountId,
|
|
|
|
|
|
+ orientationId: this.causeDetailData.orientationId,
|
|
pageNo: this.causePag.page,
|
|
pageNo: this.causePag.page,
|
|
pageSize: this.causePag.size
|
|
pageSize: this.causePag.size
|
|
};
|
|
};
|
|
@@ -588,12 +478,12 @@ export default {
|
|
},
|
|
},
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
const isZip = file.type.includes('zip') || file.type.includes('text');
|
|
const isZip = file.type.includes('zip') || file.type.includes('text');
|
|
|
|
+ const fileOvesize = file.size > (1024 * 1024 * 1024);
|
|
if (!isZip) {
|
|
if (!isZip) {
|
|
this.fileList = [];
|
|
this.fileList = [];
|
|
this.$message.error('只能上传zip格式的文件或者txt文件');
|
|
this.$message.error('只能上传zip格式的文件或者txt文件');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- const fileOvesize = file.size > (1024 * 1024 * 1024);
|
|
|
|
if (fileOvesize) {
|
|
if (fileOvesize) {
|
|
this.$message.error('文件大小不能超过1G');
|
|
this.$message.error('文件大小不能超过1G');
|
|
return;
|
|
return;
|
|
@@ -601,23 +491,24 @@ export default {
|
|
this.cosUpload(file);
|
|
this.cosUpload(file);
|
|
},
|
|
},
|
|
cosUpload(file) {
|
|
cosUpload(file) {
|
|
- var that = this;
|
|
|
|
|
|
+ let that = this;
|
|
let date = new Date();
|
|
let date = new Date();
|
|
let y = date.getFullYear();
|
|
let y = date.getFullYear();
|
|
let MM = date.getMonth() + 1;
|
|
let MM = date.getMonth() + 1;
|
|
- MM = MM < 10 ? '0' + MM : MM
|
|
|
|
|
|
+ MM = MM < 10 ? '0' + MM : MM;
|
|
let d = date.getDate();
|
|
let d = date.getDate();
|
|
- d = d < 10 ? '0' + d : d
|
|
|
|
- var timeElse = new Date().getTime();
|
|
|
|
- var arr = file.name.split('.');
|
|
|
|
- var str = '';
|
|
|
|
|
|
+ d = d < 10 ? '0' + d : d;
|
|
|
|
+ let timeElse = new Date().getTime();
|
|
|
|
+ let arr = file.name.split('.');
|
|
|
|
+ let str = '';
|
|
for (let i = 0; i < arr.length; i++) {
|
|
for (let i = 0; i < arr.length; i++) {
|
|
- if (i == arr.length - 1) {
|
|
|
|
|
|
+ if (i === arr.length - 1) {
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- if (i == arr.length - 2) {
|
|
|
|
|
|
+ if (i === arr.length - 2) {
|
|
str += arr[i];
|
|
str += arr[i];
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
str += arr[i] + '.';
|
|
str += arr[i] + '.';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -625,32 +516,29 @@ export default {
|
|
cos.putObject(
|
|
cos.putObject(
|
|
{
|
|
{
|
|
Bucket: 'media-1301855440',
|
|
Bucket: 'media-1301855440',
|
|
- /* 必须 */
|
|
|
|
Region: 'ap-chongqing',
|
|
Region: 'ap-chongqing',
|
|
- /* 存储桶所在地域,必须字段 */
|
|
|
|
|
|
+ // 存储桶所在地域,必须字段
|
|
Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
|
|
Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
|
|
- /* 必须 */
|
|
|
|
StorageClass: 'STANDARD',
|
|
StorageClass: 'STANDARD',
|
|
Body: file // 上传文件对象
|
|
Body: file // 上传文件对象
|
|
},
|
|
},
|
|
function (err, data) {
|
|
function (err, data) {
|
|
if (err) {
|
|
if (err) {
|
|
that.$message.error('上传失败!!!' + err);
|
|
that.$message.error('上传失败!!!' + err);
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
that.loadingElse = false;
|
|
that.loadingElse = false;
|
|
- that.fileList.push({
|
|
|
|
- uid: file.name,
|
|
|
|
- name: file.name,
|
|
|
|
- status: 'done',
|
|
|
|
- url: '//' + data.Location,
|
|
|
|
- });
|
|
|
|
|
|
+ that.fileList.push({
|
|
|
|
+ uid: file.name,
|
|
|
|
+ name: file.name,
|
|
|
|
+ status: 'done',
|
|
|
|
+ url: '//' + data.Location
|
|
|
|
+ });
|
|
if (that.fileList.length > 1) {
|
|
if (that.fileList.length > 1) {
|
|
that.fileList = that.fileList.slice(-1);
|
|
that.fileList = that.fileList.slice(-1);
|
|
}
|
|
}
|
|
- console.log(that.fileList, '8888888---最终的输出结果');
|
|
|
|
}
|
|
}
|
|
- )
|
|
|
|
|
|
+ );
|
|
},
|
|
},
|
|
handleQueryList(event) {
|
|
handleQueryList(event) {
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
@@ -679,7 +567,6 @@ export default {
|
|
this.handleUploadRuleForm();
|
|
this.handleUploadRuleForm();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- console.log('error submit!!');
|
|
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -693,7 +580,6 @@ export default {
|
|
};
|
|
};
|
|
postAction('/kuaishouCrowdPack/uploadCrowdPack', paramsData).then(result => {
|
|
postAction('/kuaishouCrowdPack/uploadCrowdPack', paramsData).then(result => {
|
|
if (result.code === 200) {
|
|
if (result.code === 200) {
|
|
- console.log(result, 'resuylt---upload');
|
|
|
|
this.personVisible = false;
|
|
this.personVisible = false;
|
|
this.handleGetTableList({});
|
|
this.handleGetTableList({});
|
|
}
|
|
}
|