|
@@ -9,16 +9,17 @@
|
|
|
:label-col="labelCol"
|
|
|
:wrapper-col="wrapperCol"
|
|
|
>
|
|
|
+ <p class="separate-title-header">{{ modalTitle === 'add' ? '新增' : '编辑'}}配置信息</p>
|
|
|
<div class="separate-module-con">
|
|
|
<a-form-model-item label="广告账户">
|
|
|
- <acount-search :disabled="title === 'edit'" class="acount-search-class" :appId.sync="configForm.acountId" :multiple="false"></acount-search>
|
|
|
+ <acount-search :disabled="modalTitle === 'edit'" class="acount-search-class" :appId.sync="configForm.accountId" :multiple="false" request="1,3"></acount-search>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
|
|
|
- <a-input class="common-input" :disabled="title === 'edit'" v-model="configForm.dpLinkStartIndex" placeholder="请输入"/>
|
|
|
+ <a-input class="common-input" :disabled="modalTitle === 'edit'" v-model="configForm.dpLinkStartIndex" placeholder="请输入" allow-clear/>
|
|
|
<span>~</span>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="" class="dp-link-end" prop="dpLinkEndIndex">
|
|
|
- <a-input class="common-input" :disabled="title === 'edit'" v-model="configForm.dpLinkEndIndex" placeholder="请输入"/>
|
|
|
+ <a-input class="common-input" :disabled="modalTitle === 'edit'" v-model="configForm.dpLinkEndIndex" placeholder="请输入" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="预算方式">
|
|
|
<a-radio-group v-model="configForm.accountBudgetMode" button-style="solid">
|
|
@@ -33,14 +34,14 @@
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">广告组信息</p>
|
|
|
<a-form-model-item label="推广目标">
|
|
|
- <a-radio-group :disabled="title === 'edit'" v-model="configForm.campaignLandingType" button-style="solid">
|
|
|
+ <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.campaignLandingType" button-style="solid">
|
|
|
<a-radio-button value="APP">应用</a-radio-button>
|
|
|
<a-radio-button value="LINK" disabled>销售线索收集</a-radio-button>
|
|
|
<a-radio-button value="SHOP" disabled>电商店铺推广</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="广告类型">
|
|
|
- <a-radio-group :disabled="title === 'edit'" v-model="configForm.advertisingType" button-style="solid">
|
|
|
+ <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.advertisingType" button-style="solid">
|
|
|
<a-radio-button value="1">信息流广告</a-radio-button>
|
|
|
<a-radio-button value="2">搜索广告</a-radio-button>
|
|
|
</a-radio-group>
|
|
@@ -49,10 +50,10 @@
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">基础信息</p>
|
|
|
<a-form-model-item label="广告组名称" prop="campaignName">
|
|
|
- <a-input class="common-input-long" v-model="configForm.campaignName" placeholder="请输入广告组名称"/>
|
|
|
+ <a-input class="common-input-long" v-model="configForm.campaignName" allow-clear placeholder="请输入广告组名称"/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="广告计划名称" prop="adName">
|
|
|
- <a-input class="common-input-long" id="groupName" v-model="configForm.adName" placeholder="请输入广告计划名称"/>
|
|
|
+ <a-input class="common-input-long" id="groupName" v-model="configForm.adName" allow-clear placeholder="请输入广告计划名称"/>
|
|
|
<div>
|
|
|
<a-tag v-for="item in adNameTags" :key="item" color="#1890ff" @click="handleGetChangeAll(item, 'groupName')">+ {{ item }}</a-tag>
|
|
|
</div>
|
|
@@ -68,41 +69,41 @@
|
|
|
</a-tooltip>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="广告计划数量" class="campaign-ad-class" prop="campaignAdCnt">
|
|
|
- <a-input-number v-model="configForm.campaignAdCnt" :min="1" :max="10"/>
|
|
|
+ <a-input-number v-model="configForm.campaignAdCnt" :min="1"/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">投放内容</p>
|
|
|
<a-form-model-item label="投放目标">
|
|
|
- <a-radio-group :disabled="title === 'edit'" v-model="configForm.launchTarget" button-style="solid">
|
|
|
+ <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.launchTarget" button-style="solid">
|
|
|
<a-radio-button value="OCPM">转量化</a-radio-button>
|
|
|
<a-radio-button value="CPC" disabled>点击量</a-radio-button>
|
|
|
<a-radio-button value="CPM" disabled>展示量</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item :disabled="title === 'edit'" label="下载方式">
|
|
|
+ <a-form-model-item :disabled="modalTitle === 'edit'" label="下载方式">
|
|
|
<a-radio-group v-model="configForm.adDownloadType" button-style="solid">
|
|
|
<a-radio-button value="DOWNLOAD_URL">下载链接</a-radio-button>
|
|
|
<a-radio-button value="EXTERNAL_URL">落地页</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="落地页链接">
|
|
|
- <a-input class="common-input-long" :disabled="title === 'edit'" v-model="configForm.adExternalUrl" placeholder="请输入落地页链接"/>
|
|
|
+ <a-input class="common-input-long" :disabled="modalTitle === 'edit'" v-model="configForm.adExternalUrl" placeholder="请输入落地页链接" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="直达链接内容">
|
|
|
- <a-input class="common-input-long" v-model="configForm.adOpenUrl" placeholder="请输入直达链接内容"/>
|
|
|
+ <a-input class="common-input-long" v-model="configForm.adOpenUrl" placeholder="请输入直达链接内容" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="下载链接">
|
|
|
- <a-input class="common-input-long" :disabled="title === 'edit'" v-model="configForm.adDownloadUrl" placeholder="请输入下载链接" @change="handleDownloadLink"/>
|
|
|
+ <a-input class="common-input-long" :disabled="modalTitle === 'edit'" v-model="configForm.adDownloadUrl" placeholder="请输入下载链接" allow-clear @change="handleDownloadLink"/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="应用包名">
|
|
|
- <a-input class="common-input-long" :disabled="title === 'edit'" v-model="configForm.adPackage" placeholder="请输入应用包名"/>
|
|
|
+ <a-input class="common-input-long" :disabled="modalTitle === 'edit'" v-model="configForm.adPackage" placeholder="请输入应用包名" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">优化目标</p>
|
|
|
<a-form-model-item label="转化跟踪方式">
|
|
|
- <a-select class="common-input-long" :disabled="title === 'edit'" v-model="configForm.adConvertType" placeholder="请选择" @change="handleConvertTypeChange">
|
|
|
+ <a-select class="common-input-long" :disabled="modalTitle === 'edit'" v-model="configForm.adConvertType" placeholder="请选择" @change="handleConvertTypeChange">
|
|
|
<a-select-option value="AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD">应用下载API</a-select-option>
|
|
|
<a-select-option value="AD_CONVERT_SOURCE_TYPE_SDK">应用下载SDK</a-select-option>
|
|
|
<a-select-option value="AD_CONVERT_SOURCE_TYPE_OPEN_URL">应用直达API(应用直达链接)</a-select-option>
|
|
@@ -110,7 +111,7 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="优化目标">
|
|
|
- <a-select class="common-input-long" :disabled="title === 'edit'" v-model="configForm.adConvertId" placeholder="请选择">
|
|
|
+ <a-select class="common-input-long" :disabled="modalTitle === 'edit'" v-model="configForm.adConvertId" placeholder="请选择" @change="handleConvertChange">
|
|
|
<a-select-option
|
|
|
v-for="(item, index) in optimizationOption"
|
|
|
:key="index"
|
|
@@ -124,7 +125,7 @@
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">设置投放位置</p>
|
|
|
<a-form-model-item label="广告位置">
|
|
|
- <a-radio-group :disabled="title === 'edit'" v-model="configForm.adverPosition" button-style="solid">
|
|
|
+ <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.adverPosition" button-style="solid">
|
|
|
<a-radio-button value="a">系统优选广告位</a-radio-button>
|
|
|
<a-radio-button value="b">按媒体指定位置</a-radio-button>
|
|
|
<a-radio-button value="c">按场景指定位置</a-radio-button>
|
|
@@ -254,17 +255,17 @@
|
|
|
<p class="rock-title">预算与出价</p>
|
|
|
<a-form-model-item label="投放场景">
|
|
|
<a-radio-group v-model="configForm.adSmartBidType" button-style="solid">
|
|
|
- <a-radio-button value="SMART_BID_CUSTOM" :disabled="title === 'edit'">常规投放</a-radio-button>
|
|
|
+ <a-radio-button value="SMART_BID_CUSTOM" :disabled="modalTitle === 'edit'">常规投放</a-radio-button>
|
|
|
<a-radio-button value="SMART_BID_CONSERVATIVE" disabled>放量投放</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="预算">
|
|
|
<a-input-group compact>
|
|
|
- <a-select :disabled="title === 'edit'" v-model="configForm.adBudgetMode" @change="handleBudgetMode">
|
|
|
+ <a-select :disabled="modalTitle === 'edit'" v-model="configForm.adBudgetMode" @change="handleBudgetMode">
|
|
|
<a-select-option value="BUDGET_MODE_DAY">日预算</a-select-option>
|
|
|
<a-select-option value="BUDGET_MODE_TOTAL">总预算</a-select-option>
|
|
|
</a-select>
|
|
|
- <a-input-number class="common-input" v-model="configForm.adBudget" :min="1" :max="10" :step="0.01"/>
|
|
|
+ <a-input-number class="common-input" v-model="configForm.adBudget" :min="1" :step="0.01"/>
|
|
|
</a-input-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="投放时间">
|
|
@@ -275,7 +276,7 @@
|
|
|
</a-form-model-item>
|
|
|
<div class="adver-position-radio">
|
|
|
<div v-if="configForm.adScheduleType === 'SCHEDULE_START_END'" class="position-radio-change">
|
|
|
- <a-range-picker format="YYYY-MM-DD" @change="handleLaunchData"/>
|
|
|
+ <a-range-picker v-model="configForm.launchDateRange" format="YYYY-MM-DD" @change="handleLaunchData"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-form-model-item label="投放时段">
|
|
@@ -295,7 +296,7 @@
|
|
|
</div>
|
|
|
<a-form-model-item label="付费方式">
|
|
|
<a-radio-group v-model="configForm.adPricing" button-style="solid">
|
|
|
- <a-radio-button value="PRICING_OCPM" :disabled="title === 'edit'">按展示付费(oCPM)</a-radio-button>
|
|
|
+ <a-radio-button value="PRICING_OCPM" :disabled="modalTitle === 'edit'">按展示付费(oCPM)</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="目标转化出价">
|
|
@@ -305,15 +306,15 @@
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">第三方检测链接</p>
|
|
|
<a-form-model-item label="点击监测">
|
|
|
- <a-input class="common-input-long" placeholder="请输入链接地址" v-model="configForm.creativeActionTrackUrl"/>
|
|
|
+ <a-input class="common-input-long" placeholder="请输入链接地址" v-model="configForm.creativeActionTrackUrl" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">创意信息</p>
|
|
|
<a-form-model-item label="创意方式">
|
|
|
<a-radio-group v-model="configForm.creativeMaterialMode" button-style="solid">
|
|
|
- <a-radio-button value="STATIC_ASSEMBLE" :disabled="title === 'edit'">程序化创意</a-radio-button>
|
|
|
- <a-radio-button value="NONE" :disabled="title === 'edit'">自定义创意</a-radio-button>
|
|
|
+ <a-radio-button value="STATIC_ASSEMBLE" :disabled="modalTitle === 'edit'">程序化创意</a-radio-button>
|
|
|
+ <a-radio-button value="NONE" :disabled="modalTitle === 'edit'">自定义创意</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="创意内容">
|
|
@@ -338,9 +339,10 @@
|
|
|
<div class="img-flex-url">
|
|
|
<img :src="imageUrl" alt="avatar"/>
|
|
|
</div>
|
|
|
- <div v-if="isCoverImgDiv" class="cover-img-div" @mouseleave="handleRemoveActive">
|
|
|
+ <!-- TODO 划过图片显示覆盖层 -->
|
|
|
+ <!-- <div v-if="isCoverImgDiv" class="cover-img-div" @mouseleave="handleRemoveActive">
|
|
|
<a-icon class="delete-icon-class" type="delete" @click.stop="handleDeleteImg"/>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
<div v-if="!imageUrl && !isCoverImgDiv">
|
|
|
<a-icon type="plus" style="margin-top: 10px;"/>
|
|
@@ -349,7 +351,7 @@
|
|
|
</a-upload>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="卡片标题" prop="creativeProductDescription">
|
|
|
- <a-input class="common-input-long" placeholder="请输入卡片标题" v-model="configForm.creativeProductDescription"/>
|
|
|
+ <a-input class="common-input-long" placeholder="请输入卡片标题" v-model="configForm.creativeProductDescription" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="推广卖点">
|
|
|
<a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />推广卖点</a-button>
|
|
@@ -365,7 +367,7 @@
|
|
|
{min: 1, max: 10, message: '长度位6-9字符', trigger: 'blur'}
|
|
|
]"
|
|
|
>
|
|
|
- <a-input class="common-input-long" v-model="item.value" placeholder="请输入"/>
|
|
|
+ <a-input class="common-input-long" v-model="item.value" placeholder="请输入" allow-clear/>
|
|
|
<a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
@@ -377,18 +379,18 @@
|
|
|
</a-form-model-item>
|
|
|
<div class="adver-position-radio">
|
|
|
<a-form-model-item label="">
|
|
|
- <a-input class="common-input-long" placeholder="请输入" v-model="configForm.creativeCallToAction"/>
|
|
|
+ <a-input class="common-input-long" placeholder="请输入" v-model="configForm.creativeCallToAction" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
<a-form-model-item label="来源">
|
|
|
- <a-input class="common-input-long" placeholder="请输入来源" v-model="configForm.creativeSource"/>
|
|
|
+ <a-input class="common-input-long" placeholder="请输入来源" v-model="configForm.creativeSource" allow-clear/>
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
|
<div class="separate-module-con">
|
|
|
<p class="rock-title">创意分类</p>
|
|
|
- <a-form-model-item label="创意分类">
|
|
|
+ <a-form-model-item label="创意分类" prop="creativeThirdIndustryIds">
|
|
|
<a-cascader
|
|
|
- v-model="configForm.creativeThirdIndustryId"
|
|
|
+ v-model="configForm.creativeThirdIndustryIds"
|
|
|
class="common-input-long"
|
|
|
:options="createOptions"
|
|
|
:fieldNames="fieldNames"
|
|
@@ -439,7 +441,8 @@ import SelectCheckAll from '../../BatchCreate/toutiaoTime';
|
|
|
import moment from 'moment';
|
|
|
import BMF from 'browser-md5-file';
|
|
|
|
|
|
-import {getAction, postAction} from '@/api/manage';
|
|
|
+import {getAction, postAction, putAction} from '@/api/manage';
|
|
|
+import {mapGetters} from 'vuex';
|
|
|
|
|
|
let COS = require('cos-js-sdk-v5');
|
|
|
let cos = new COS({
|
|
@@ -456,10 +459,6 @@ export default {
|
|
|
visible: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- },
|
|
|
- title: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -468,6 +467,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ detailData: {},
|
|
|
+ modalTitle: '',
|
|
|
toolConvertList: [],
|
|
|
optimizationOption: [],
|
|
|
md5Result: '',
|
|
@@ -475,9 +476,9 @@ export default {
|
|
|
createOptions: [],
|
|
|
adNameTags: ['出价方式', '素材名称', '日期', 'dp链接标识', '创意方式'],
|
|
|
fieldNames: {
|
|
|
- label: 'category_name',
|
|
|
- value: 'category_id',
|
|
|
- children: 'child'
|
|
|
+ label: 'industryName',
|
|
|
+ value: 'industryId',
|
|
|
+ children: 'children'
|
|
|
},
|
|
|
fileList: [],
|
|
|
isCoverImgDiv: false,
|
|
@@ -518,7 +519,8 @@ export default {
|
|
|
creativeProductDescription: [
|
|
|
{required: true, message: '请输入', trigger: 'blur'},
|
|
|
{min: 1, max: 7, message: '长度位1-7字符', trigger: 'blur'}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
|
|
|
},
|
|
|
configForm: {
|
|
|
defaultFormList: [],
|
|
@@ -526,7 +528,7 @@ export default {
|
|
|
adBudgetMode: 'BUDGET_MODE_DAY', // 预算类型
|
|
|
adDownloadUrl: '', // 下载链接
|
|
|
accountBudget: '', // 账户日预算
|
|
|
- acountId: undefined, // 账户
|
|
|
+ accountId: undefined, // 账户
|
|
|
dpLinkStartIndex: '',
|
|
|
dpLinkEndIndex: '',
|
|
|
accountBudgetMode: '1', // 预算方式
|
|
@@ -561,7 +563,7 @@ export default {
|
|
|
adSmartBidType: 'SMART_BID_CUSTOM', // 投放场景
|
|
|
adBudget: '', // 预算
|
|
|
adScheduleType: 'SCHEDULE_FROM_NOW', // 投放时间
|
|
|
- launchDateRange: '', // 设置开始和结束时间
|
|
|
+ launchDateRange: [], // 设置开始和结束时间
|
|
|
launchTimeInterval: 'buxian', // 投放时段
|
|
|
scheduleTimeData: str, // 指定时段选择
|
|
|
adPricing: 'PRICING_OCPM', // 付费方式
|
|
@@ -572,7 +574,8 @@ export default {
|
|
|
creativeProductDescription: '', // 卡片标题
|
|
|
creativeEnablePersonalAction: true, // 智能优选
|
|
|
creativeSource: '', // 来源
|
|
|
- creativeThirdIndustryId: [1], // 创意分类
|
|
|
+ creativeThirdIndustryId: '', // 创意分类
|
|
|
+ creativeThirdIndustryIds: [], // 创意分类
|
|
|
adKeywords: [], // 创意标签
|
|
|
creativeCallToAction: '', // 行动号召
|
|
|
creativeLabel: undefined // 倡议标签
|
|
@@ -581,15 +584,15 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
NewAountId() {
|
|
|
- return this.configForm.acountId;
|
|
|
+ return this.configForm.accountId;
|
|
|
},
|
|
|
NewAdPackage() {
|
|
|
return this.configForm.adPackage;
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
NewAdPackage(newVal, oldVal) {
|
|
|
- if (newVal && this.configForm.acountId) {
|
|
|
+ if (newVal && this.configForm.accountId) {
|
|
|
this.handleGetOptimizationObjective();
|
|
|
}
|
|
|
},
|
|
@@ -597,21 +600,143 @@ export default {
|
|
|
if (newVal && this.configForm.adPackage) {
|
|
|
this.handleGetOptimizationObjective();
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ this.handleGetCreativeClassification();
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
- const routeQuery = this.$route.query;
|
|
|
- this.handleGetCreativeClassification();
|
|
|
- console.log(routeQuery, 'routeQuery--routeQuery--routeQuery');
|
|
|
+ const routeQuery = JSON.parse(localStorage.getItem('queryList'));
|
|
|
if (routeQuery.accountModal === 'edit') {
|
|
|
- console.log('edit---edit----route');
|
|
|
+ this.modalTitle = 'edit';
|
|
|
+ this.handleGetDetailList();
|
|
|
}
|
|
|
else if (routeQuery.accountModal === 'add') {
|
|
|
- console.log('add---add----route');
|
|
|
+ this.modalTitle = 'add';
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
moment,
|
|
|
+ handleConvertChange(e) {
|
|
|
+ const convertTitle = this.optimizationOption.filter(item => item.convert_id === e);
|
|
|
+ this.configForm.creativeActionTrackUrl = convertTitle[0].action_track_url;
|
|
|
+ },
|
|
|
+ handleGetDetailList() {
|
|
|
+ const routeQuery = JSON.parse(localStorage.getItem('queryList'));
|
|
|
+ getAction('http://192.168.1.43:8080/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id}).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ const detailData = result.result;
|
|
|
+ this.configForm.accountId = detailData.accountId || '';
|
|
|
+ this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex || '';
|
|
|
+ this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex || '';
|
|
|
+ this.configForm.accountBudgetMode = detailData.accountBudgetMode || '';
|
|
|
+ this.configForm.accountBudget = detailData.accountBudget || '';
|
|
|
+ this.configForm.campaignLandingType = detailData.campaignLandingType || '';
|
|
|
+ this.configForm.advertisingType = detailData.advertisingType || '1';
|
|
|
+ this.configForm.campaignName = detailData.campaignName || '';
|
|
|
+ this.configForm.adName = detailData.adName || '';
|
|
|
+ this.configForm.campaignCnt = detailData.campaignCnt || '';
|
|
|
+ this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
|
|
|
+ this.configForm.launchTarget = detailData.launchTarget || 'OCPM';
|
|
|
+ this.configForm.adDownloadType = detailData.adDownloadType || 'DOWNLOAD_URL';
|
|
|
+ this.configForm.adExternalUrl = detailData.adExternalUrl || '';
|
|
|
+ this.configForm.adOpenUrl = detailData.adOpenUrl || '';
|
|
|
+ this.configForm.adDownloadUrl = detailData.adDownloadUrl || '';
|
|
|
+ this.configForm.adPackage = detailData.adPackage || '';
|
|
|
+ this.configForm.adConvertType = detailData.adConvertType || '';
|
|
|
+ this.configForm.adConvertId = detailData.adConvertId || '';
|
|
|
+ this.configForm.adDistrict = detailData.adDistrict || 'NONE';
|
|
|
+ this.configForm.adGender = detailData.adGender || 'NONE';
|
|
|
+ this.configForm.adAge = detailData.adAge || 'NONE';
|
|
|
+ this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
|
|
|
+ this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
|
|
|
+ this.configForm.adPlatform = detailData.adPlatform;
|
|
|
+ this.configForm.adAndroidOsv = detailData.adAndroidOsv;
|
|
|
+ this.configForm.adAc = detailData.adAc;
|
|
|
+ this.configForm.adHideIfExists = String(detailData.adHideIfExists);
|
|
|
+ this.configForm.adHideIfConverted = detailData.adHideIfConverted;
|
|
|
+ this.configForm.adAutoExtendEnabled = detailData.adAutoExtendEnabled;
|
|
|
+ this.configForm.adSmartBidType = detailData.adSmartBidType;
|
|
|
+ this.configForm.adBudgetMode = detailData.adBudgetMode;
|
|
|
+ this.configForm.adBudget = detailData.adBudget;
|
|
|
+ this.configForm.adScheduleType = detailData.adScheduleType;
|
|
|
+ this.configForm.launchDateRange[0] = detailData.adStartTime;
|
|
|
+ this.configForm.launchDateRange[1] = detailData.adEndTime;
|
|
|
+ this.configForm.adPricing = detailData.adPricing;
|
|
|
+ this.configForm.adCpaBid = detailData.adCpaBid;
|
|
|
+ this.configForm.creativeActionTrackUrl = detailData.creativeActionTrackUrl;
|
|
|
+ this.configForm.creativeMaterialMode = detailData.creativeMaterialMode;
|
|
|
+ this.configForm.creativeImageMode = detailData.creativeImageMode;
|
|
|
+ this.configForm.creativeProductDescription = detailData.creativeProductDescription;
|
|
|
+ this.configForm.creativeEnablePersonalAction = detailData.creativeEnablePersonalAction;
|
|
|
+ this.configForm.creativeCallToAction = detailData.creativeCallToAction;
|
|
|
+ this.configForm.creativeSource = detailData.creativeSource;
|
|
|
+ this.configForm.creativeThirdIndustryIds[0] = detailData.creativeThirdIndustryId.substr(0, 4);
|
|
|
+ this.configForm.creativeThirdIndustryIds[1] = detailData.creativeThirdIndustryId.substr(0, 6);
|
|
|
+ this.configForm.creativeThirdIndustryIds[2] = detailData.creativeThirdIndustryId;
|
|
|
+ this.imageUrl = detailData.imageUrl;
|
|
|
+ this.md5Result = detailData.creativeProductImageCode;
|
|
|
+ if (detailData.productSellingPoints) {
|
|
|
+ let productPointsList = [];
|
|
|
+ const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
|
|
|
+ detailData.productSellingPoints.forEach((item, index) => {
|
|
|
+ productPointsList.push({
|
|
|
+ id: randomNum + index,
|
|
|
+ value: item
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.configForm.defaultFormList = productPointsList;
|
|
|
+ }
|
|
|
+ if (detailData.adScheduleTime.indexOf(1) !== -1) {
|
|
|
+ this.configForm.launchTimeInterval = 'a';
|
|
|
+ this.configForm.scheduleTimeData = detailData.adScheduleTime;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.configForm.launchTimeInterval = 'buxian';
|
|
|
+ }
|
|
|
+ if (detailData.creativeSceneInventory) {
|
|
|
+ this.configForm.adverPosition = 'c';
|
|
|
+ this.radioChangeValue = detailData.creativeSceneInventory;
|
|
|
+ }
|
|
|
+ else if (detailData.creativeInventoryType) {
|
|
|
+ this.configForm.adverPosition = 'b';
|
|
|
+ this.configForm.checkboxChangeValue = detailData.creativeInventoryType.split(',');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.configForm.adverPosition = 'a';
|
|
|
+ }
|
|
|
+ if (detailData.adKeywords) {
|
|
|
+ this.creativeTag = detailData.adKeywords;
|
|
|
+ }
|
|
|
+ const paramsData = {
|
|
|
+ advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
|
|
|
+ advertiserId: this.configForm.accountId,
|
|
|
+ appType: 'APP_ANDROID',
|
|
|
+ deliveryRange: 'DEFAULT',
|
|
|
+ externalUrl: this.configForm.adExternalUrl,
|
|
|
+ landingType: this.configForm.campaignLandingType,
|
|
|
+ packageName: this.configForm.adPackage,
|
|
|
+ promotionContent: this.configForm.adDownloadType
|
|
|
+ };
|
|
|
+ postAction('http://192.168.1.43:8080/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ const updateResult = result.result.filter(item => item.external_actions.length > 0);
|
|
|
+ this.configForm.adConvertType = updateResult[0].convert_type;
|
|
|
+ this.optimizationOption = updateResult[0].external_actions;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
handleConvertTypeChange(e) {
|
|
|
this.toolConvertList.forEach(item => {
|
|
|
if (item.convert_type === e) {
|
|
@@ -623,8 +748,7 @@ export default {
|
|
|
handleGetOptimizationObjective() {
|
|
|
const paramsData = {
|
|
|
advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
|
|
|
- // advertiserId: this.configForm.acountId,
|
|
|
- advertiserId: '1649600126891015',
|
|
|
+ advertiserId: this.configForm.accountId,
|
|
|
appType: 'APP_ANDROID',
|
|
|
deliveryRange: 'DEFAULT',
|
|
|
externalUrl: this.configForm.adExternalUrl,
|
|
@@ -638,7 +762,6 @@ export default {
|
|
|
if (this.configForm.adConvertType) {
|
|
|
this.handleConvertTypeChange(this.configForm.adConvertType);
|
|
|
}
|
|
|
- console.log(result, 'result--result');
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(result.message);
|
|
@@ -649,12 +772,25 @@ export default {
|
|
|
},
|
|
|
// 创意分类接口
|
|
|
handleGetCreativeClassification() {
|
|
|
- this.createOptions = [];
|
|
|
+ const paramsData = {
|
|
|
+ accountId: this.configForm.accountId
|
|
|
+ };
|
|
|
+ getAction('http://192.168.1.43:8080/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getIndustryList', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ this.createOptions = result.result;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
},
|
|
|
handleAddList(data) {
|
|
|
postAction('http://192.168.1.43:8080/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/addBytedanceStrategy', data).then(result => {
|
|
|
- if (result.code === 200) {
|
|
|
+ if (result.code === 0) {
|
|
|
console.log(result, 'result--result');
|
|
|
+ this.$message.success('创建成功');
|
|
|
this.$router.replace('/account-config/account-config');
|
|
|
this.$bus.$emit('remove', '/account-config/components/configuration-modal');
|
|
|
}
|
|
@@ -698,7 +834,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleDownloadLink(e) {
|
|
|
- this.configForm.adPlatform = e.target.value ? 'b' : 'buxian';
|
|
|
+ this.configForm.adPlatform = e.target.value ? 'ANDROID' : 'NONE';
|
|
|
},
|
|
|
handleDeleteImg() {
|
|
|
this.imageUrl = '';
|
|
@@ -796,12 +932,11 @@ export default {
|
|
|
},
|
|
|
handleRelaxSure() {
|
|
|
let paramsFormData = this.configForm;
|
|
|
- console.log(this.configForm.defaultFormList, 'defaultFormList-defaultFormList-defaultFormList');
|
|
|
if (paramsFormData.adverPosition === 'a') {
|
|
|
paramsFormData.creativeSmartInventory = 0;
|
|
|
}
|
|
|
else if (paramsFormData.adverPosition === 'b') {
|
|
|
- paramsFormData.creativeInventoryType = paramsFormData.checkboxChangeValue;
|
|
|
+ paramsFormData.creativeInventoryTypes = paramsFormData.checkboxChangeValue;
|
|
|
}
|
|
|
else if (paramsFormData.adverPosition === 'c') {
|
|
|
paramsFormData.creativeSceneInventory = paramsFormData.radioChangeValue;
|
|
@@ -827,14 +962,18 @@ export default {
|
|
|
paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
|
|
|
}
|
|
|
paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
|
|
|
- paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryId[paramsFormData.creativeThirdIndustryId.lngth - 1]
|
|
|
+ paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
|
|
|
paramsFormData.creativeProductImageCode = this.md5Result;
|
|
|
paramsFormData.imageUrl = this.urlResult;
|
|
|
paramsFormData.adKeywords = this.creativeTag;
|
|
|
- console.log(paramsFormData, 'paramsFormData-paramsFormData');
|
|
|
- console.log(paramsFormData.launchDateRange, 'paramsFormData.launchDateRange');
|
|
|
+ paramsFormData.userId = this.userInfo().id;
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
- this.handleAddList(paramsFormData);
|
|
|
+ if (this.modalTitle === 'add') {
|
|
|
+ this.handleAddList(paramsFormData);
|
|
|
+ }
|
|
|
+ else if (this.modalTitle === 'edit') {
|
|
|
+ this.handleEditList(paramsFormData);
|
|
|
+ }
|
|
|
// if (valid) {
|
|
|
// this.handleAddList(paramsFormData);
|
|
|
// }
|
|
@@ -844,6 +983,23 @@ export default {
|
|
|
// }
|
|
|
});
|
|
|
},
|
|
|
+ handleEditList(data) {
|
|
|
+ const queryData = data;
|
|
|
+ const routeQuery = JSON.parse(localStorage.getItem('queryList'));
|
|
|
+ queryData.id = routeQuery.id;
|
|
|
+ putAction('http://192.168.1.43:8080/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/edit', queryData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ this.$message.success(result.message);
|
|
|
+ this.$router.replace('/account-config/account-config');
|
|
|
+ this.$bus.$emit('remove', '/account-config/components/configuration-modal');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
handleRelaxCancel() {
|
|
|
this.$emit('relaxCancel');
|
|
|
},
|