|
@@ -23,6 +23,7 @@
|
|
v-model="configForm.adConvertId"
|
|
v-model="configForm.adConvertId"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
:filter-option="filterOption"
|
|
:filter-option="filterOption"
|
|
|
|
+ allowClear
|
|
>
|
|
>
|
|
<a-select-option
|
|
<a-select-option
|
|
v-for="(item, index) in optimizationOption"
|
|
v-for="(item, index) in optimizationOption"
|
|
@@ -264,6 +265,7 @@
|
|
v-model="projectModelValue"
|
|
v-model="projectModelValue"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
:filter-option="filterOption"
|
|
:filter-option="filterOption"
|
|
|
|
+ allowClear
|
|
>
|
|
>
|
|
<a-select-option
|
|
<a-select-option
|
|
v-for="(item, index) in optimizationOption"
|
|
v-for="(item, index) in optimizationOption"
|
|
@@ -608,8 +610,8 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.handleGetCurrencyList();
|
|
this.handleGetCurrencyList();
|
|
- this.hendleMaterialInfo();
|
|
|
|
this.handleGetProjectList();
|
|
this.handleGetProjectList();
|
|
|
|
+ this.handleGetCreativeWord();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
@@ -641,7 +643,7 @@ export default {
|
|
},
|
|
},
|
|
hendleMaterialInfo() {
|
|
hendleMaterialInfo() {
|
|
const paramsData = {
|
|
const paramsData = {
|
|
- peojectId: this.projectModelValue,
|
|
|
|
|
|
+ projectId: this.projectModelValue,
|
|
startDate: this.masterTimes[0],
|
|
startDate: this.masterTimes[0],
|
|
endDate: this.masterTimes[1],
|
|
endDate: this.masterTimes[1],
|
|
pageNo: this.masterPag.page,
|
|
pageNo: this.masterPag.page,
|
|
@@ -695,6 +697,8 @@ export default {
|
|
this.currencyTotalAll = result.result.total;
|
|
this.currencyTotalAll = result.result.total;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
|
|
+ this.currencyData = [];
|
|
|
|
+ this.currencyTotalAll = 0;
|
|
this.$message.error(result.message);
|
|
this.$message.error(result.message);
|
|
}
|
|
}
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
@@ -717,6 +721,8 @@ export default {
|
|
this.appointTotalAll = result.result.total;
|
|
this.appointTotalAll = result.result.total;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
|
|
+ this.appointData = [];
|
|
|
|
+ this.appointTotalAll = [];
|
|
this.$message.error(result.message);
|
|
this.$message.error(result.message);
|
|
}
|
|
}
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
@@ -724,6 +730,11 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleChange(info) {
|
|
handleChange(info) {
|
|
|
|
+ const isZip = info.file.name.indexOf('xlsx') !== -1 || info.file.name.indexOf('xls') !== -1;
|
|
|
|
+ if (!isZip) {
|
|
|
|
+ this.$message.error('上传模板只能是 xls、xlsx格式!');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.fileList = info.fileList;
|
|
this.fileList = info.fileList;
|
|
},
|
|
},
|
|
handleSearchMaster() {
|
|
handleSearchMaster() {
|
|
@@ -743,10 +754,12 @@ export default {
|
|
this.hendleMaterialInfo();
|
|
this.hendleMaterialInfo();
|
|
},
|
|
},
|
|
handleSelectMaterial() {
|
|
handleSelectMaterial() {
|
|
|
|
+ this.hendleMaterialInfo();
|
|
this.visibleMatemal = true;
|
|
this.visibleMatemal = true;
|
|
},
|
|
},
|
|
// 选择素材的取消按钮
|
|
// 选择素材的取消按钮
|
|
handleCancelAll() {
|
|
handleCancelAll() {
|
|
|
|
+ this.projectModelValue = '';
|
|
this.masterTimes = [];
|
|
this.masterTimes = [];
|
|
this.viedoCheckValue = [];
|
|
this.viedoCheckValue = [];
|
|
this.visibleMatemal = false;
|
|
this.visibleMatemal = false;
|
|
@@ -755,11 +768,18 @@ export default {
|
|
handleOkShow() {
|
|
handleOkShow() {
|
|
const defaultList = this.viedoDefaultList;
|
|
const defaultList = this.viedoDefaultList;
|
|
const defaultCheckValue = this.viedoCheckValue;
|
|
const defaultCheckValue = this.viedoCheckValue;
|
|
- this.modalSelectMaterial = defaultList.filter(item => {
|
|
|
|
|
|
+ let finallyIds = new Set();
|
|
|
|
+ let changeSelectMaterData = defaultList.filter(item => {
|
|
if (defaultCheckValue.includes(item.id)) {
|
|
if (defaultCheckValue.includes(item.id)) {
|
|
return item;
|
|
return item;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ finallyIds = this.modalSelectMaterial.concat(changeSelectMaterData).map(item => item.id);
|
|
|
|
+ this.modalSelectMaterial = defaultList.filter(item => {
|
|
|
|
+ if (finallyIds.includes(item.id)) {
|
|
|
|
+ return item;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.handleCancelAll();
|
|
this.handleCancelAll();
|
|
},
|
|
},
|
|
handleFormLayoutChange(e) {
|
|
handleFormLayoutChange(e) {
|
|
@@ -768,24 +788,23 @@ export default {
|
|
if (defaultValue === 'horizontal') {
|
|
if (defaultValue === 'horizontal') {
|
|
this.modalSelectMaterial = [];
|
|
this.modalSelectMaterial = [];
|
|
this.defaultFormList = [];
|
|
this.defaultFormList = [];
|
|
- this.$nextTick(() => {
|
|
|
|
- for (let i = 0; i < 3; i++) {
|
|
|
|
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
|
|
|
|
- this.defaultFormList.push({
|
|
|
|
- id: randomNum,
|
|
|
|
- name: 'username' + randomNum,
|
|
|
|
- value: '',
|
|
|
|
- lenSize: 0,
|
|
|
|
- tabStatus: 'alone',
|
|
|
|
- defaultTagsList: this.adNameTags,
|
|
|
|
- updateTagsList: this.adNameTags.slice(0, 4)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
else if (defaultValue === 'vertical') {
|
|
else if (defaultValue === 'vertical') {
|
|
- this.advertisingAccount = '';
|
|
|
|
|
|
+ this.advertisingAccount = [];
|
|
this.fileList = [];
|
|
this.fileList = [];
|
|
|
|
+ const defaultList = this.adNameTags;
|
|
|
|
+ for (let i = 0; i < 3; i++) {
|
|
|
|
+ const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
|
|
|
|
+ this.defaultFormList.push({
|
|
|
|
+ id: randomNum,
|
|
|
|
+ name: 'username' + randomNum,
|
|
|
|
+ value: '',
|
|
|
|
+ lenSize: 0,
|
|
|
|
+ tabStatus: 'alone',
|
|
|
|
+ defaultTagsList: defaultList,
|
|
|
|
+ updateTagsList: defaultList.slice(0, 4)
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleFormInputChang(e, field, formId) {
|
|
handleFormInputChang(e, field, formId) {
|
|
@@ -948,6 +967,14 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleUploadWxecl() {
|
|
handleUploadWxecl() {
|
|
|
|
+ if (!this.advertisingAccount.length) {
|
|
|
|
+ this.$message.error('请选择账户');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!this.fileList.length) {
|
|
|
|
+ this.$message.error('请上传文件');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
let paramsData = new FormData()
|
|
let paramsData = new FormData()
|
|
paramsData.append('accountId', this.advertisingAccount);
|
|
paramsData.append('accountId', this.advertisingAccount);
|
|
paramsData.append('excelFile', this.fileList[0].originFileObj);
|
|
paramsData.append('excelFile', this.fileList[0].originFileObj);
|
|
@@ -970,6 +997,10 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleVerticalAdd() {
|
|
handleVerticalAdd() {
|
|
|
|
+ if (!this.modalSelectMaterial.length) {
|
|
|
|
+ this.$message.error('请选择素材');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (this.defaultFormList && this.defaultFormList.length < 3) {
|
|
if (this.defaultFormList && this.defaultFormList.length < 3) {
|
|
this.$message.error('请至少输入3条标题');
|
|
this.$message.error('请至少输入3条标题');
|
|
return;
|
|
return;
|
|
@@ -1012,7 +1043,7 @@ export default {
|
|
},
|
|
},
|
|
handleCauseCancel() {
|
|
handleCauseCancel() {
|
|
this.copywrittypeName = 'horizontal';
|
|
this.copywrittypeName = 'horizontal';
|
|
- this.advertisingAccount = '';
|
|
|
|
|
|
+ this.advertisingAccount = [];
|
|
this.fileList = [];
|
|
this.fileList = [];
|
|
this.causeVisible = false;
|
|
this.causeVisible = false;
|
|
this.defaultFormList = [];
|
|
this.defaultFormList = [];
|
|
@@ -1022,18 +1053,6 @@ export default {
|
|
getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
|
|
getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
|
|
if (result.code === 0) {
|
|
if (result.code === 0) {
|
|
this.adNameTags = result.result.records;
|
|
this.adNameTags = result.result.records;
|
|
- for (let i = 0; i < 3; i++) {
|
|
|
|
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
|
|
|
|
- this.defaultFormList.push({
|
|
|
|
- id: randomNum,
|
|
|
|
- name: 'username' + randomNum,
|
|
|
|
- value: '',
|
|
|
|
- lenSize: 0,
|
|
|
|
- tabStatus: 'alone',
|
|
|
|
- defaultTagsList: this.adNameTags,
|
|
|
|
- updateTagsList: this.adNameTags.slice(0, 4)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
this.$message.error(result.message);
|
|
this.$message.error(result.message);
|
|
@@ -1059,7 +1078,6 @@ export default {
|
|
this.defaultFormList = formData.filter(item => list.id !== item.id);
|
|
this.defaultFormList = formData.filter(item => list.id !== item.id);
|
|
},
|
|
},
|
|
handleAddAccountConfig() {
|
|
handleAddAccountConfig() {
|
|
- this.handleGetCreativeWord();
|
|
|
|
this.causeVisible = true;
|
|
this.causeVisible = true;
|
|
},
|
|
},
|
|
handleLaunchData(date, dateString) {
|
|
handleLaunchData(date, dateString) {
|