|
@@ -104,7 +104,11 @@
|
|
|
@change="handleChange"
|
|
|
:filterOption="filterOption"
|
|
|
>
|
|
|
- <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
|
|
|
+ <a-select-option
|
|
|
+ v-for="appModel in appList"
|
|
|
+ :key="appModel.appId + 'campaignList'"
|
|
|
+ :value="appModel.appId"
|
|
|
+ >
|
|
|
{{ appModel.appName }}   
|
|
|
{{ appModel.appVersion }}   {{ appModel.platform | platform }}
|
|
|
</a-select-option>
|
|
@@ -452,7 +456,11 @@
|
|
|
@change="handleChange"
|
|
|
:filterOption="filterOption"
|
|
|
>
|
|
|
- <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
|
|
|
+ <a-select-option
|
|
|
+ v-for="appModel in appList"
|
|
|
+ :key="appModel.appId + 'unitIdentical'"
|
|
|
+ :value="appModel.appId"
|
|
|
+ >
|
|
|
{{ appModel.appName }}    {{ appModel.appVersion }}   {{
|
|
|
appModel.platform | platform
|
|
|
}}
|
|
@@ -791,7 +799,11 @@
|
|
|
@change="handleChange"
|
|
|
:filterOption="filterOption"
|
|
|
>
|
|
|
- <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
|
|
|
+ <a-select-option
|
|
|
+ v-for="appModel in appList"
|
|
|
+ :key="appModel.appId + 'campaignOne'"
|
|
|
+ :value="appModel.appId"
|
|
|
+ >
|
|
|
{{ appModel.appName }}    {{ appModel.appVersion }}   {{
|
|
|
appModel.platform | platform
|
|
|
}}
|
|
@@ -1143,18 +1155,18 @@
|
|
|
<a-modal v-model="showCreate" title="创建失败条数">
|
|
|
<template slot="footer">
|
|
|
<a-button key="back" @click="showCreate = false">取消</a-button>
|
|
|
- <a-button key="submit" type="primary" @click="showCreate = false"> 确定 </a-button>
|
|
|
+ <a-button key="submit" type="primary" @click="tiaozhuan"> 确定 </a-button>
|
|
|
</template>
|
|
|
<ul v-if="createUnitList.length > 0">
|
|
|
<li v-for="(item, index) in createUnitList">
|
|
|
<p v-if="item.code == -1">
|
|
|
- 组名称:{{ item.unitName }},创建失败 <br><span style="margin-left:10px">失败原因:{{ item.message }}</span>
|
|
|
+ 组名称:{{ item.unitName }},创建失败 <br /><span style="margin-left: 10px"
|
|
|
+ >失败原因:{{ item.message }}</span
|
|
|
+ >
|
|
|
</p>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <div v-else style="width:100%;height:200px;text-align:center;line-height:200px">
|
|
|
- 无创建失败条数
|
|
|
- </div>
|
|
|
+ <div v-else style="width: 100%; height: 200px; text-align: center; line-height: 200px">无创建失败条数</div>
|
|
|
</a-modal>
|
|
|
</a-card>
|
|
|
</div>
|
|
@@ -1178,6 +1190,7 @@ export default {
|
|
|
return {
|
|
|
groupTypeData: {},
|
|
|
appList: [],
|
|
|
+ allAppList: [],
|
|
|
templateList: [],
|
|
|
labelCol: { span: 7 },
|
|
|
wrapperCol: { span: 17 },
|
|
@@ -1192,112 +1205,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
form: {
|
|
|
- accountArr: [
|
|
|
- {
|
|
|
- accountId: 23212,
|
|
|
- accountName: '环球黑卡',
|
|
|
- campaignAgreement: 0, //判断是否计划相同 0为相同取值campaignOne 1不同取值campaignList
|
|
|
- unitCount: 1,
|
|
|
- allianceAccount: true,
|
|
|
- campaignType: 2,
|
|
|
- //多个计划分开创建
|
|
|
- campaignList: [
|
|
|
- {
|
|
|
- campaignId: 26702554,
|
|
|
- campaignName: '测试',
|
|
|
- check: '1', //判断计划下组是否相同 1为相同取值 unitIdentical 2为不同 取值unit
|
|
|
- unit: [
|
|
|
- {
|
|
|
- useAppMarket: false,
|
|
|
- appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
- convertId: '',
|
|
|
- name: '',
|
|
|
- allianceAccount: '1',
|
|
|
- appId: '',
|
|
|
- urlType: '1',
|
|
|
- url: '',
|
|
|
- templateId: '',
|
|
|
- dayBudget: null,
|
|
|
- dayBudgetType: '0',
|
|
|
- speed: '1',
|
|
|
- time: '1',
|
|
|
- timeRange: [],
|
|
|
- scheduleTimeData: '1',
|
|
|
- scheduleTime:
|
|
|
- '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
- showMode: '2',
|
|
|
- sceneId: [1],
|
|
|
- ocpxActionType: 2,
|
|
|
- bidType: 10,
|
|
|
- deepConversionType: null,
|
|
|
- bid: null,
|
|
|
- cpaBid: null,
|
|
|
- deepConversionBid: null,
|
|
|
- unitType: '4',
|
|
|
- },
|
|
|
- ],
|
|
|
- unitIdentical: {
|
|
|
- useAppMarket: false,
|
|
|
- appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
- convertId: '',
|
|
|
- unitName: [{ name: '' }],
|
|
|
- allianceAccount: '1',
|
|
|
- appId: '',
|
|
|
- urlType: '1',
|
|
|
- url: '',
|
|
|
- templateId: '',
|
|
|
- dayBudget: null,
|
|
|
- dayBudgetType: '0',
|
|
|
- speed: '1',
|
|
|
- time: '1',
|
|
|
- timeRange: [],
|
|
|
- scheduleTimeData: '1',
|
|
|
- scheduleTime:
|
|
|
- '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
- showMode: '2',
|
|
|
- sceneId: [1],
|
|
|
- ocpxActionType: 2,
|
|
|
- bidType: 10,
|
|
|
- deepConversionType: null,
|
|
|
- bid: null,
|
|
|
- cpaBid: null,
|
|
|
- deepConversionBid: null,
|
|
|
- unitType: '4',
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- //所有计划创建一样
|
|
|
- campaignOne: {
|
|
|
- useAppMarket: false,
|
|
|
- appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
- convertId: '',
|
|
|
- campaignIds: [26702554],
|
|
|
- unitNames: [{ value: '' }],
|
|
|
- allianceAccount: '1',
|
|
|
- appId: '',
|
|
|
- urlType: '1',
|
|
|
- url: '',
|
|
|
- templateId: '',
|
|
|
- dayBudget: null,
|
|
|
- dayBudgetType: '0',
|
|
|
- speed: '1',
|
|
|
- time: '1',
|
|
|
- timeRange: [],
|
|
|
- scheduleTimeData: '1',
|
|
|
- scheduleTime:
|
|
|
- '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
- showMode: '2',
|
|
|
- sceneId: [1],
|
|
|
- ocpxActionType: 2,
|
|
|
- bidType: 10,
|
|
|
- deepConversionType: null,
|
|
|
- bid: null,
|
|
|
- cpaBid: null,
|
|
|
- deepConversionBid: null,
|
|
|
- unitType: '4',
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ accountArr: [],
|
|
|
},
|
|
|
tabList: [
|
|
|
{
|
|
@@ -1338,7 +1246,6 @@ export default {
|
|
|
campaignName: '',
|
|
|
campaignBudget: 'UNLIMITED',
|
|
|
dayBudget: 0,
|
|
|
- appId: '0', //应用目标
|
|
|
showApp: true,
|
|
|
redirectUrl: '', // 链接地址
|
|
|
showRedirect: false,
|
|
@@ -1361,14 +1268,21 @@ export default {
|
|
|
submitFormLoading: false,
|
|
|
showCreate: false,
|
|
|
createUnitList: [],
|
|
|
+ createUnitSuccess: [],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ tiaozhuan() {
|
|
|
+ this.showCreate = false
|
|
|
+ localStorage.setItem('crossAccountUnit', JSON.stringify(this.createUnitSuccess))
|
|
|
+ this.$router.replace({ path: '/crossAccount/createCreative' })
|
|
|
+ },
|
|
|
getPlatForm(appId) {
|
|
|
if (appId) {
|
|
|
- var data = this.appList.filter((item) => {
|
|
|
+ var data = this.allAppList.filter((item) => {
|
|
|
return item.appId == appId
|
|
|
})
|
|
|
+
|
|
|
return data[0].platform
|
|
|
}
|
|
|
},
|
|
@@ -1495,6 +1409,7 @@ export default {
|
|
|
key: index,
|
|
|
}
|
|
|
})
|
|
|
+ this.allAppList.push(...this.appList)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1681,9 +1596,12 @@ export default {
|
|
|
postAction('/kuaishou/crossAccount/crossAccountUnitCreate', { accountArr: params }).then((res) => {
|
|
|
console.log(res)
|
|
|
if (res.success) {
|
|
|
- this.createUnitList = res.result.filter(item=>{
|
|
|
+ this.createUnitList = res.result.filter((item) => {
|
|
|
return item.code != 0
|
|
|
})
|
|
|
+ this.createUnitSuccess = res.result.filter((item) => {
|
|
|
+ return item.code == 0
|
|
|
+ })
|
|
|
this.submitFormLoading = false
|
|
|
this.showCreate = true
|
|
|
} else {
|
|
@@ -2041,12 +1959,122 @@ export default {
|
|
|
mounted: function () {
|
|
|
this.$nextTick(() => {
|
|
|
// this.changeCreateTotal()
|
|
|
- this.activeIndex = this.tabList.findIndex((item) => this.key == item.key)
|
|
|
+ if (localStorage.getItem('crossAccountCampaign')) {
|
|
|
+ var data = JSON.parse(localStorage.getItem('crossAccountCampaign'))
|
|
|
+ this.form.accountArr = data.map((item) => {
|
|
|
+ return {
|
|
|
+ accountId: item.accountId,
|
|
|
+ accountName: item.accountId,
|
|
|
+ campaignAgreement: 0, //判断是否计划相同 0为相同取值campaignOne 1不同取值campaignList
|
|
|
+ unitCount: 1,
|
|
|
+ allianceAccount: true,
|
|
|
+ campaignType: item.createDetail[0].type,
|
|
|
+ //多个计划分开创建
|
|
|
+ campaignList: item.createDetail.map((c) => {
|
|
|
+ return {
|
|
|
+ campaignId: c.campaignId,
|
|
|
+ campaignName: c.campaignName,
|
|
|
+ check: '1', //判断计划下组是否相同 1为相同取值 unitIdentical 2为不同 取值unit
|
|
|
+ unit: [
|
|
|
+ {
|
|
|
+ useAppMarket: false,
|
|
|
+ appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
+ convertId: '',
|
|
|
+ name: '',
|
|
|
+ allianceAccount: '1',
|
|
|
+ appId: '',
|
|
|
+ urlType: '1',
|
|
|
+ url: '',
|
|
|
+ templateId: '',
|
|
|
+ dayBudget: null,
|
|
|
+ dayBudgetType: '0',
|
|
|
+ speed: '1',
|
|
|
+ time: '1',
|
|
|
+ timeRange: [],
|
|
|
+ scheduleTimeData: '1',
|
|
|
+ scheduleTime:
|
|
|
+ '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
+ showMode: '2',
|
|
|
+ sceneId: [1],
|
|
|
+ ocpxActionType: 2,
|
|
|
+ bidType: 10,
|
|
|
+ deepConversionType: null,
|
|
|
+ bid: null,
|
|
|
+ cpaBid: null,
|
|
|
+ deepConversionBid: null,
|
|
|
+ unitType: '4',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ unitIdentical: {
|
|
|
+ useAppMarket: false,
|
|
|
+ appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
+ convertId: '',
|
|
|
+ unitName: [{ name: '' }],
|
|
|
+ allianceAccount: '1',
|
|
|
+ appId: '',
|
|
|
+ urlType: '1',
|
|
|
+ url: '',
|
|
|
+ templateId: '',
|
|
|
+ dayBudget: null,
|
|
|
+ dayBudgetType: '0',
|
|
|
+ speed: '1',
|
|
|
+ time: '1',
|
|
|
+ timeRange: [],
|
|
|
+ scheduleTimeData: '1',
|
|
|
+ scheduleTime:
|
|
|
+ '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
+ showMode: '2',
|
|
|
+ sceneId: [1],
|
|
|
+ ocpxActionType: 2,
|
|
|
+ bidType: 10,
|
|
|
+ deepConversionType: null,
|
|
|
+ bid: null,
|
|
|
+ cpaBid: null,
|
|
|
+ deepConversionBid: null,
|
|
|
+ unitType: '4',
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ //所有计划创建一样
|
|
|
+ campaignOne: {
|
|
|
+ useAppMarket: false,
|
|
|
+ appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
|
|
|
+ convertId: '',
|
|
|
+ campaignIds: item.createDetail.map((c) => {
|
|
|
+ return c.campaignId
|
|
|
+ }),
|
|
|
+ unitNames: [{ value: '' }],
|
|
|
+ allianceAccount: '1',
|
|
|
+ appId: '',
|
|
|
+ urlType: '1',
|
|
|
+ url: '',
|
|
|
+ templateId: '',
|
|
|
+ dayBudget: null,
|
|
|
+ dayBudgetType: '0',
|
|
|
+ speed: '1',
|
|
|
+ time: '1',
|
|
|
+ timeRange: [],
|
|
|
+ scheduleTimeData: '1',
|
|
|
+ scheduleTime:
|
|
|
+ '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
+ showMode: '2',
|
|
|
+ sceneId: [1],
|
|
|
+ ocpxActionType: 2,
|
|
|
+ bidType: 10,
|
|
|
+ deepConversionType: null,
|
|
|
+ bid: null,
|
|
|
+ cpaBid: null,
|
|
|
+ deepConversionBid: null,
|
|
|
+ unitType: '4',
|
|
|
+ },
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.getAppList(this.form.accountArr[0].accountId)
|
|
|
- this.getIsActivate(this.form.accountArr[0].accountId)
|
|
|
- this.getTemplate(this.form.accountArr[0].accountId)
|
|
|
- this.getTemplateList(this.form.accountArr[0].accountId)
|
|
|
+ this.getAppList(this.form.accountArr[0].accountId)
|
|
|
+ this.getIsActivate(this.form.accountArr[0].accountId)
|
|
|
+ this.getTemplate(this.form.accountArr[0].accountId)
|
|
|
+ this.getTemplateList(this.form.accountArr[0].accountId)
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
}
|