|
@@ -10,7 +10,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 设置投放位置 -->
|
|
|
<div class="moduler">
|
|
|
<div class="moduler-title">设置投放位置</div>
|
|
@@ -69,8 +69,8 @@
|
|
|
<div class="input-item">
|
|
|
<a-form-item>
|
|
|
<a-radio-group v-decorator="['creativeWay', { initialValue:'customCreativity' }]">
|
|
|
- <a-radio-button value="proceduralCreativity">程序化创意</a-radio-button>
|
|
|
- <a-radio-button value="customCreativity">自定义创意</a-radio-button>
|
|
|
+ <a-radio-button value="proceduralCreativity" :disabled="creativeWayDisable">程序化创意</a-radio-button>
|
|
|
+ <a-radio-button value="customCreativity" :disabled="creativeWayDisable">自定义创意</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
</div>
|
|
@@ -84,11 +84,11 @@
|
|
|
</div>
|
|
|
<div class="input-item">
|
|
|
<a-form-item>
|
|
|
- <a-radio-group v-decorator="['creativeWay', { initialValue:'DEFAULT' }]">
|
|
|
- <a-radio-button value="proceduralCreativity">自定义上传</a-radio-button>
|
|
|
+ <a-radio-group v-decorator="['materialAddType', { initialValue:'customUpload' }]">
|
|
|
+ <a-radio-button value="customUpload">自定义上传</a-radio-button>
|
|
|
<a-tooltip>
|
|
|
<template slot="title">暂未开启该功能</template>
|
|
|
- <a-radio-button value="customCreativity" :disabled="true">选择程序化创意包</a-radio-button>
|
|
|
+ <a-radio-button value="chooseProgramCreativePackage" :disabled="true">选择程序化创意包</a-radio-button>
|
|
|
</a-tooltip>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
@@ -164,7 +164,7 @@
|
|
|
<a-form-item>
|
|
|
<a-select v-decorator="[
|
|
|
'actionText', // 给表单赋值或拉取表单时,该input对应的key
|
|
|
- { rules: [{ required: true, message: '请选择剪辑!' }] }
|
|
|
+ { rules: [{ required: true, message: '该选项必须填写' }] }
|
|
|
]" showSearch style="width: 480px">
|
|
|
<a-select-option :value="item" v-for="(item,i) in actionTextList" :key="i">
|
|
|
{{item}}
|
|
@@ -246,8 +246,7 @@
|
|
|
</div>
|
|
|
<div class="input-item">
|
|
|
<a-form-item>
|
|
|
- <a-cascader :options="createOptions" :fieldNames="fieldNames"
|
|
|
- placeholder="请选择创意分类" @change="createChange" />
|
|
|
+ <a-cascader :options="createOptions" v-model="thirdIndustryIds" :fieldNames="fieldNames" placeholder="请选择创意分类" @change="createChange" />
|
|
|
</a-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -467,12 +466,16 @@
|
|
|
children: 'children'
|
|
|
},
|
|
|
thirdIndustryId:undefined,
|
|
|
+ thirdIndustryIds:undefined,
|
|
|
adposition:'smartInventorys',
|
|
|
sceneInventory:'VIDEO_SCENE',
|
|
|
|
|
|
errorInfo:[],
|
|
|
visible:false,
|
|
|
loading:false,
|
|
|
+
|
|
|
+ creativeWayDisable:false,//创意方式是否禁用
|
|
|
+ currentCreateData:{}, // 编辑当前的创意的数据
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -535,11 +538,7 @@
|
|
|
createChange(value){
|
|
|
console.log(value);
|
|
|
this.thirdIndustryId=value[2]
|
|
|
- // this.form.getFieldDecorator('thirdIndustryId')
|
|
|
-
|
|
|
- // this.form.setFieldsValue({
|
|
|
- // thirdIndustryId:value[2]
|
|
|
- // });
|
|
|
+
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
},
|
|
|
// //获取表单的某一个属性值
|
|
@@ -646,10 +645,18 @@
|
|
|
values.adKeywords=this.createTipList;
|
|
|
|
|
|
let adIds=[];
|
|
|
- this.planInfo.forEach(item=>{
|
|
|
+
|
|
|
+ let postUrl=''
|
|
|
+ if(this.currentCreateData.adId){
|
|
|
+ postUrl='/ctop/byteDanceCreative/updateCreative'
|
|
|
+ adIds[0]=this.planInfo[0].id
|
|
|
+ }else{
|
|
|
+ postUrl='/bytedance/batch/create/creative';
|
|
|
+ this.planInfo.forEach(item=>{
|
|
|
adIds.push(item.id)
|
|
|
- })
|
|
|
- postAction('/bytedance/batch/create/creative', {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ postAction(postUrl, {
|
|
|
accountId:this.accountInfo.value,
|
|
|
adIds,
|
|
|
...values,
|
|
@@ -692,9 +699,9 @@
|
|
|
},
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
- localStorage.removeItem('groupInfo');
|
|
|
- localStorage.removeItem('planInfo');
|
|
|
- localStorage.removeItem('accountInfo');
|
|
|
+ // localStorage.removeItem('groupInfo');
|
|
|
+ // localStorage.removeItem('planInfo');
|
|
|
+ // localStorage.removeItem('accountInfo');
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
@@ -708,19 +715,19 @@
|
|
|
this.$bus.$emit('remove', '/modules/BatchCreate/newPlan')
|
|
|
let planInfo = localStorage.getItem('planInfo')
|
|
|
|
|
|
- if (planInfo) {
|
|
|
+ if (planInfo!='') {
|
|
|
this.planInfo = JSON.parse(planInfo)
|
|
|
}
|
|
|
|
|
|
console.log(this.planInfo)
|
|
|
let groupInfo = localStorage.getItem('groupInfo')
|
|
|
|
|
|
- if (groupInfo) {
|
|
|
+ if (groupInfo!=null) {
|
|
|
this.groupInfo = JSON.parse(groupInfo)
|
|
|
}
|
|
|
let accountInfo = localStorage.getItem('accountInfo')
|
|
|
|
|
|
- if (accountInfo) {
|
|
|
+ if (accountInfo!=null) {
|
|
|
this.accountInfo = JSON.parse(accountInfo)
|
|
|
}
|
|
|
|
|
@@ -735,10 +742,95 @@
|
|
|
}
|
|
|
|
|
|
})
|
|
|
-
|
|
|
- if(this.accountInfo.value&&this.planInfo[0].id){
|
|
|
-
|
|
|
- }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+
|
|
|
+ if(this.accountInfo.value&&this.planInfo[0].id){
|
|
|
+ postAction('/ctop/byteDanceCreative/detail',qs.stringify({
|
|
|
+ planId:this.planInfo[0].id,
|
|
|
+ accountId:this.accountInfo.value
|
|
|
+ })).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ if(res.success){
|
|
|
+ if(res.data!=null){
|
|
|
+ this.creativeWayDisable=true;
|
|
|
+ // 编辑当前的创意的数据
|
|
|
+ this.currentCreateData=res.data
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ ...res.data
|
|
|
+ })
|
|
|
+ this.sceneInventory=res.data.sceneInventory;
|
|
|
+ if(res.data.smartInventory){
|
|
|
+ this.adposition='smartInventorys'
|
|
|
+ }else if(res.data.sceneInventory){
|
|
|
+ this.adposition='sceneInventorys';
|
|
|
+ this.sceneInventory=res.data.sceneInventory
|
|
|
+ }else if(res.data.inventoryType.length>0){
|
|
|
+ this.adposition='inventoryTypes';
|
|
|
+ this.checkedList=res.data.inventoryType;
|
|
|
+ this.onChange(this.checkedList)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.createTipList=res.data.adKeywords;
|
|
|
+ let thirdIndustryArr=[];
|
|
|
+ thirdIndustryArr[0]=(res.data.thirdIndustryId+'').substring(0,4);
|
|
|
+ thirdIndustryArr[1]=(res.data.thirdIndustryId+'').substring(0,6);
|
|
|
+ thirdIndustryArr[2]=(res.data.thirdIndustryId+'').substring(0,8);
|
|
|
+
|
|
|
+
|
|
|
+ thirdIndustryArr=thirdIndustryArr.map(item=>{
|
|
|
+ return item*1
|
|
|
+ })
|
|
|
+ console.log(thirdIndustryArr)
|
|
|
+ this.thirdIndustryId=res.data.thirdIndustryId;
|
|
|
+ this.thirdIndustryIds=thirdIndustryArr;
|
|
|
+
|
|
|
+ if(res.data.title_list){
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ creativeWay:'proceduralCreativity'
|
|
|
+ })
|
|
|
+ this.$refs.material.titleData=res.data.title_list
|
|
|
+ }else{
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ creativeWay:'customCreativity'
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ var dataCreatives = this.$refs.material.HorizontalLargeImageListBig.concat(
|
|
|
+ this.$refs.material.HorizontalLargeImageListHeng,
|
|
|
+ this.$refs.material.HorizontalLargeImageListShu,
|
|
|
+ this.$refs.material.HorizontalLargeImageListZu,
|
|
|
+ this.$refs.material.HorizontalLargeImageListSmall,
|
|
|
+ this.$refs.material.HorizontalLargeImageListBigShu
|
|
|
+ )
|
|
|
+ res.data.creatives.forEach(item=>{
|
|
|
+ if(item.imageMode=="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL"){
|
|
|
+ item.showElse=true;
|
|
|
+ item.many=5
|
|
|
+ this.$refs.material.HorizontalLargeImageListHeng.push(item)
|
|
|
+ }else if(item.imageMode=="CREATIVE_IMAGE_MODE_VIDEO"){
|
|
|
+ item.showElse=true;
|
|
|
+ item.many=5
|
|
|
+ this.$refs.material.HorizontalLargeImageListShu.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(this.$refs.material.HorizontalLargeImageListShu.length>0){
|
|
|
+ this.$refs.material.HorizontalLargeImageList=this.$refs.material.HorizontalLargeImageListShu;
|
|
|
+ this.$refs.material.materialType='CREATIVE_IMAGE_MODE_VIDEO'
|
|
|
+ }else if(this.$refs.material.HorizontalLargeImageListHeng.length>0){
|
|
|
+ this.$refs.material.HorizontalLargeImageList=this.$refs.material.HorizontalLargeImageListHeng;
|
|
|
+ this.$refs.material.materialType='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ console.log(this.$refs.material, this.$refs.material.titleData)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -760,7 +852,6 @@
|
|
|
.ant-tooltip-inner {
|
|
|
span {
|
|
|
display: block;
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|