123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068 |
- <template>
- <div class="setProjectDirectional">
-
- <div class="moduler">
- <div v-if="projectInfo.length>0">
- <span style="margin-right:8px"> 项目:<strong>{{projectInfo[0].name||''}}</strong></span>
- <span style="margin-right:8px"> 推广目的:<strong>{{projectInfo[0].landingType=='APP'?'应用推广':'销售线索收集'||''}}</strong></span>
- <span style="margin-right:8px"> 投放媒体:<strong>{{projectInfo[0].deliveryRange=="DEFAULT"?'默认':'穿山甲'||''}}</strong></span>
- <span style="margin-right:8px"> 投放方式:
- <strong v-if="projectInfo[0].adTarget=='CPA'">优先成本</strong>
- <strong v-if="projectInfo[0].adTarget=='COST'">优先跑量</strong>
- <strong v-if="projectInfo[0].adTarget=='PUSH'">激进抢量</strong>
- </span>
-
- </div>
- </div>
-
- <a-form :form="form">
- <div class="moduler">
- <div class="moduler-title">广告位置</div>
- <div class="ad-range">
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">广告位置</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-model="adposition" @change="adpositionChange">
- <a-radio-button value="smartInventorys" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='DEFAULT'">优选广告位</a-radio-button>
- <a-radio-button value="inventoryTypes" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='DEFAULT'">按媒体指定位置</a-radio-button>
- <a-radio-button :value="900000000" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='UNION'">穿山甲</a-radio-button>
- <!-- <a-radio-button value="sceneInventorys">按场景指定位置</a-radio-button> -->
- </a-radio-group>
- </a-form-item>
- <div style="width: 400px; margin-top: 24px;" class="inventoryTypes" v-show="adposition=='inventoryTypes'">
- <div class="inventory-tags-lists-header">
- <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
- </a-checkbox>
- <div class="inventory-tags-lists-name"><strong>APP名称</strong></div>
- </div>
- <div class="inventory-tags-lists-container">
- <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
- </div>
- </div>
- <div style="width: 400px; margin-top: 24px;" v-show="adposition=='sceneInventorys'">
- <div class="inventory-tags-lists-header">
- <div class="inventory-tags-lists-name" style="padding-left:15px"><strong>位置选择</strong></div>
- </div>
- <div class="inventory-tags-lists-container">
- <a-radio-group v-model=sceneInventory>
- <a-radio :style="radioStyle" value="VIDEO_SCENE">沉浸式竖版视频场景广告位</a-radio>
- <a-radio :style="radioStyle" value="FEED_SCENE">信息流场景广告位</a-radio>
- <a-radio :style="radioStyle" value="TAIL_SCENE">视频后贴和尾帧场景广告位</a-radio>
- </a-radio-group>
- </div>
- </div>
- </div>
- </div>
- <div class="row-item" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='UNION'">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">投放形式</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-model="unionVideoType">
- <a-radio-button value="REWARDED_VIDEO">
- 激励视频
- <a-tooltip>
- <template slot="title">特定场景下用户通过观看视频广告以换取游戏/应用内虚拟奖励的广告</template>
- <a-icon type="question-circle" />
- </a-tooltip>
- </a-radio-button>
- <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
- </a-radio-group>
- </a-form-item>
-
- </div>
- </div>
- </div>
-
- </div>
- <div class="moduler">
- <div class="moduler-title">用户定向</div>
- <div class="ad-range">
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">地域</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-model="district" @change="cityChange">
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="CITY">按省市</a-radio-button>
- <a-radio-button value="COUNTY">按区县</a-radio-button>
-
- </a-radio-group>
- </a-form-item>
- <div class="region" v-show="district!='NONE'">
- <!-- 省市 -->
- <div class="provincyCity" v-if="district=='CITY'">
-
- <linkMultiSelect title='省份' :listArr='[]' :maxLayers='2' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCityArr'/>
- </div>
- <!-- 区县 -->
- <div class="district" v-else-if="district=='COUNTY'">
-
- <linkMultiSelect title='省份' :listArr='[]' :maxLayers='3' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCountyArr'/>
- </div>
- </div>
- </div>
- </div>
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">性别</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-decorator="['gender', {initialValue:'NONE' }]" >
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="GENDER_MALE">男</a-radio-button>
- <a-radio-button value="GENDER_FEMALE">女</a-radio-button>
- </a-radio-group>
- </a-form-item>
- </div>
- </div>
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">年龄</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <radioCheck :checkArr='ageArr' @getSonValue='getAgeSelect' />
- </a-form-item>
- </div>
- </div>
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">自定义人群</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-model="customCrowd" >
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="CUSTOMt_CROWED">自定义人群</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <div class="dingxiang_paichu" v-if="customCrowd=='CUSTOMt_CROWED'" style="width:60%">
- <a-tabs default-active-key="1" @change="retargetTabChange" >
- <a-tab-pane key="1" tab="定向池" >
- <a-table
- :columns="retargetColumns"
- :row-key="record => record.key"
- :data-source="retargetDataAll"
- :loading="loading"
- style="width:100%;margin:15px 0"
- :pagination='false'
- @change="retargetTableChange"
- :scroll="{ y: 250 }"
- :row-selection="rowSelection"
- bordered
- >
- <template slot="name" slot-scope="name"> {{ name }} </template>
- </a-table>
- </a-tab-pane>
- <a-tab-pane key="2" tab="排除池" >
- <a-table
- :columns="retargetColumns"
- :row-key="record => record.key"
- :data-source="retargetDataAll"
- :loading="loading"
- style="width:100%;margin:15px 0"
- :pagination='false'
- @change="retargetTableChange"
- :scroll="{ y: 250 }"
- :row-selection="rowSelection2"
- bordered
- >
- <template slot="name" slot-scope="name"> {{ name }} </template>
- </a-table>
- </a-tab-pane>
-
- </a-tabs>
-
- </div>
- </div>
- </div>
- <div class="row-item">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">智能放量</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-model="autoExtendEnabled" >
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
-
- </a-form-item>
- <!-- <span class="tishi"><a-icon type="exclamation-circle" class="tubiao" />智能放量不支持受众预估</span> -->
- <div v-if="autoExtendEnabled==1" class="deviceBrand">
- <singleLayersSelecte title='可放开定向' :listArr='autoExtendOptions' :checked='autoExtendTargetsChecked' @getCheckedList='getAutoExtendEnabled'/>
- </div>
- </div>
- </div>
- <div class="row-item" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='UNION'">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">精选流量</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-radio-group v-decorator="['superiorPopularityType', { initialValue:'NONE'}]">
- <a-radio-button value="NONE">不限</a-radio-button>
- <!-- <a-radio-button value="APP " :disabled='getFormData("deliveryRange")!="UNION"'>应用软件精选</a-radio-button> -->
- <a-radio-button value="GAME" >游戏精选</a-radio-button>
- </a-radio-group>
- </a-form-item>
- </div>
- </div>
- </div>
- </div>
- </a-form>
- <!-- 当前账户 -->
- <div class="moduler">
- <div class="adName">
- <span>当前账户:</span>
- <div class="nameList">
- <strong v-for="item in LHKaccountInfo" :key="item.value" class="item">{{item.title+'('+item.value+')'}}</strong>
- </div>
- </div>
- </div>
- <!-- 操作 -->
- <div class="moduler">
- <!-- <div class="moduler-title">计划名称</div> -->
- <div class="opt">
- <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
-
- <a-button type="primary" @click="goNext" :loading="goNextloading">下一步</a-button>
- </div>
- </div>
-
- <!-- 投放链接 -->
-
- <div class="infoModal">
- <a-modal v-model="visible" title="提示" @ok="handleOk" :keyboard='false' :maskClosable='false'>
- <ul>
- <li v-for="(item,index) in errorInfo" :key="index">
- <span>账户{{LHKaccountInfo[index].title}}:</span>{{item.message || '定向设置成功'}}
- </li>
- </ul>
- <template slot="footer">
- <a-button key="back" @click="handleCancel">
- 返回本页
- </a-button>
- <a-button key="submit" type="primary" @click="handleOk">
- 下一步
- </a-button>
- </template>
- </a-modal>
- </div>
- </div>
- </template>
- <script>
- import moment from 'moment'
- import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
- import radioCheck from './radioCheck';
- import linkMultiSelect from '../BatchCreate/linkMultiSelect'
- import singleLayersSelecte from '../BatchCreate/singleLayerSelecte'
- import qs from 'qs'
- var str = ""
- for (let i = 0; i < 7*48; i++) {
- str+='0'
-
- }
- let ageArr=[
- {
- value:'',
- title:'不限',
- checked:false,
-
- },
- {
- value:'AGE_BETWEEN_18_23',
- title:' 18-23岁',
- checked:false,
- },
- {
- value:'AGE_BETWEEN_24_30',
- title:'24-30岁',
- checked:false,
- },
- {
- value:'AGE_BETWEEN_31_40',
- title:'31-40岁',
- checked:false,
- },
- {
- value:'AGE_BETWEEN_41_49',
- title:'41-49岁',
- checked:false,
- },
- {
- value:'AGE_ABOVE_50',
- title:'大于等于50岁',
- checked:false,
- },
- ]
- let autoExtendOptions=[
- {
- label:'地域',
- value:'REGION',
-
- },
- {
- label:'性别',
- value:'GENDER',
-
- },
- {
- label:'年龄',
- value:'AGE',
-
- },
- {
- label:'行为兴趣',
- value:'INTEREST_ACTION',
-
- },
- {
- label:'自定义人群',
- value:'CUSTOM_AUDIENCE',
-
- },
- ]
- let retargetColumns=[
- {
- title: '人群包',
- dataIndex: 'name',
- sorter: true,
- width: '40%',
- scopedSlots: { customRender: 'name' },
- },
- {
- title: '属性',
- dataIndex: 'tag',
- // filters: [
- // { text: '自定义', value: 'male' },
- // { text: '系统推荐', value: 'female' },
- // { text: '第三方', value: 'femal' },
- // ],
- width: '20%',
- },
- {
- title: '所属账号',
- dataIndex: 'accountName',
- sorter: true,
- width: '40%',
- scopedSlots: { customRender: 'accountName' },
- },
-
- ]
- const plainOptions = [{
- value: 1,
- label: '今日头条'
- },
- {
- value: 10001,
- label: '西瓜视频'
- },
- {
- value: 40001,
- label: '抖音'
- },
- {
- value: 30001,
- label: '抖音火山版'
- },
- {
- value: 900000000,
- label: '穿山甲'
- },
- ];
- export default {
- components: {
- radioCheck,
- linkMultiSelect,
- singleLayersSelecte
- },
- data() {
- return {
- projectInfo:[],
- LHKaccountInfo:[],
-
- form: this.$form.createForm(this),
- adposition:'smartInventorys',
- unionVideoType:'REWARDED_VIDEO',
- district:'NONE',
- sceneInventory:'',
- checkedList: [],
- indeterminate: false,
- checkAll: false,
- plainOptions,
- // 定向的参数
- regionValue:'NONE',
- ageArr,//受众年龄
- city:[],
- age:[],
- regionCityListUrl:'ctop/bytedanceAreaInfo/list',
- regionCountyListUrl:'ctop/bytedanceAreaInfo/list',
- // 自定义人群
- // 自定义人群参数
- retargetColumns,
- retargetData:[],
- retargetDataAll:[],
- loading:false,
- customCrowd:'NONE',//自定义人群 选择的值
- selectedRowKeys:[],
- incluedSelectedRowKeys:[],
- incluedSelectedKeys:[],
- excludeSelectedKeys:[],
- excludeSelectedRowKeys:[],
-
- autoExtendEnabled:0,//智能放量是否开启
- autoExtendOptions,//智能投放可选定向数组
- autoExtendTargets:[],//智能放量开启后的选择数据----------需传递的参数
- autoExtendTargetsChecked:[],
- radioStyle: {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- padding: '0 15px'
- },
-
- goNextloading:false,
- goPlanShowloading:false,
-
-
- dateRange: [moment(), moment()],
- visible:false,
- errorInfo:[],
-
- validationRules: {
- url: [
- {
- required: true,
- validator: this.validateURL,
- },
- ],
- name:[{
- required: true,
- validator: this.validateName,
- }],
- bid:[{
- required: true,
- message:'出价信息必须填写',
- // validator: this.validateBid,
- }],
- roi:[{
- required: true,
- message:'ROI系数必须填写',
- // validator: this.validateBid,
- }],
- },
- currentConvertTypes:[],
- convertIds:[],
- }
- },
- watch: {
-
- },
- computed: {
-
- hasSelected() {
- return this.selectedRowKeys.length > 0;
- },
- rowSelection() {
- return {
- // selectedRowKeys: this.incluedSelectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
- this.incluedSelectedRowKeys = selectedRowKeys;
- this.incluedSelectedKeys=selectedRows
- },
- getCheckboxProps: record => ({
- props: {
- disabled: this.excludeSelectedRowKeys.indexOf(record.key)>-1, // Column configuration not to be checked
- name: record.name,
- },
- }),
- };
- },
- rowSelection2() {
- return {
- // selectedRowKeys: this.excludeSelectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
- // this.selectedRowKeys = selectedRowKeys;
- this.excludeSelectedRowKeys = selectedRowKeys;
- this.excludeSelectedKeys=selectedRows
- },
- getCheckboxProps: record => ({
- props: {
- disabled: this.incluedSelectedRowKeys.indexOf(record.key)>-1, // Column configuration not to be checked
- name: record.name,
- },
- }),
- };
- },
- },
- methods: {
- adpositionChange(){
- if(this.adposition!='inventoryTypes'){
- this.checkedList=[];
- this.indeterminate=false;
- this.checkAll=false;
- }
- },
- cityChange(){
- this.city=[];
- },
- onChange(checkedList) {
- this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length;
- this.checkAll = checkedList.length === plainOptions.length;
- },
- onCheckAllChange(e) {
- let valueOption = [];
- this.plainOptions.forEach((item) => {
- valueOption.push(item.value)
- })
- Object.assign(this, {
- checkedList: e.target.checked ? valueOption : [],
- indeterminate: false,
- checkAll: e.target.checked,
- });
- },
- // 自定义人群的--同时定向排除tab切换事件
- retargetTabChange(tabkey){
- console.log(tabkey)
- this.retargetDataAll=[];
- this.loading=true;
-
- this.LHKaccountInfo.forEach(item=>{
- getAction('/ctop/audience/list',{
- accountId:item.value
- }).then((res)=>{
- // console.log(res)
- this.loading=false;
- if(res.success){
- res.data.forEach((ele)=>{
- ele.key=item.value+'_'+ele.custom_audience_id
- ele.id= ele.custom_audience_id
- ele.accountName=item.title
- ele.accountId=item.value
- })
- // this.retargetData=res.data;
- this.retargetDataAll=[...this.retargetDataAll,...res.data];
-
- }
- })
- })
- },
- onSelectChange(selectedRowKeys) {
- // console.log('selectedRowKeys changed: ', selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- },
- // 自定义人群的改变
- retargetTableChange(pagination, filters, sorter){
- // console.log(pagination);
- },
- //获取选中的城市
- getSelectedCityArr(val){
- // console.log(val);
- this.city=[];
- this.city=val;
- },
- // 获取选中的区县
- getSelectedCountyArr(val){
- // console.log(val)
- this.city=[];
- this.city=val;
- },
- //获取选中的年龄段
- getAgeSelect(val){
- // console.log(val)
- if(val.length==1&&val[0]==""){
- this.age=[]
- }else{
- this.age=val;
- }
-
- },
- //获取智能放量定向的值
- getAutoExtendEnabled(val){
- // console.log(val)
- this.autoExtendTargets=[];
- this.autoExtendTargets.push(...val)
- },
- callback(val) {
- console.log(val);
- },
-
-
- handleOk(e) {
- this.visible=false;
- this.$router.push({path:'/LaunchHousekeeper/setProjectCreate'})
-
-
- },
- handleCancel(e) {
- this.visible = false;
- },
- // 直达链接是否启用
- useOpenUrlChange(){
- this.form.setFieldsValue({
- openUrl:''
- })
- },
-
- //获取表单的某一个属性值
- getFormData(className) {
- return this.form.getFieldValue(className)
- },
- dateChange(date, dateString) {
- // console.log(date,dateString)
- this.form.getFieldDecorator('startTime')
- this.form.getFieldDecorator('endTime')
- this.form.setFieldsValue({
- startTime: date[0].format('YYYY-MM-DD HH:mm'),
- endTime: date[1].format('YYYY-MM-DD HH:mm'),
- })
- },
-
-
-
-
- // 验证网址
- IsURL(res) {
- // var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
- var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
- var re = new RegExp(strRegex)
- // console.log(re.test(res))
- if (re.test(res)) {
- return true
- } else {
- return false
- }
- },
- validateURL(rule, value, callback) {
- // console.log(rule, value, callback);
- if (this.IsURL(value)) {
- callback()
- } else if (value && !this.IsURL(value)) {
- callback('链接地址无法访问,请正确输入')
- } else {
- callback('链接必须填写')
- }
- },
- validateName(rule, value, callback){
- // console.log(rule, value, callback);
- if (value) {
- callback()
- } else {
- callback('应用包名称必须填写')
- }
- },
- validateBid(rule, value, callback){
- // console.log(rule, value, callback);
- if (value) {
- callback()
- } else {
- callback('出价必须填写')
- }
- },
-
-
- goBack() {
- this.$router.replace('/modules/LaunchHousekeeper/LaunchHousekeeperList')
- this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectDirectional')
- },
-
- // 保存并新建创意
- goNext() {
- this.$nextTick(()=>{
-
- this.form.validateFields((err, values) => {
- if (!err) {
- console.log('Received values of form: ', values)
- if(this.district!='NONE'){
- values.district=this.district
- }
-
- console.log(this.excludeSelectedKeys,this.incluedSelectedKeys)
- this.goNextloading=true;
- if(this.adposition!='inventoryTypes'){
- this.checkedList=[];
- }
- if(this.projectInfo.length>0&&this.projectInfo[0].deliveryRange=='UNION'){
- this.checkedList=[];
- this.checkedList.push(900000000)
- }
- let params=[];
-
- params=this.projectInfo.map((item,index)=>{
- item.retargetingTagsExclude=[];
- item.retargetingTagsInclude=[];
- this.excludeSelectedKeys.forEach(ele=>{
- if(ele.accountId==item.accountId){
- item.retargetingTagsExclude.push(ele.id)
- }
- })
- this.incluedSelectedKeys.forEach(ele=>{
- if(ele.accountId==item.accountId){
- item.retargetingTagsInclude.push(ele.id)
- }
- })
- let city=this.city.map(item=>{
- return item*1
- })
- return {
- ...item,
- unionVideoType:this.unionVideoType,
- inventoryType:this.checkedList,
- audience:{
- age:this.age,
- city,
- ...values,
- retargetingTagsExclude:item.retargetingTagsExclude,
- retargetingTagsInclude:item.retargetingTagsInclude,
- autoExtendEnabled:this.autoExtendEnabled,
- autoExtendTargets:this.autoExtendTargets,
- inventoryType:this.checkedList,
- district:this.district=='NONE'?'':this.district,
-
- }
- }
- })
- console.log(params)
- postAction('/adlab/Project/setAudience', params).then((res) => {
- console.log(res)
- if (res.success) {
- this.goNextloading=false;
-
- if(res.result){
- this.errorInfo=res.result;
- this.visible=true;
- let projectInfo=[]
- res.result.forEach(item=>{
- if(item.code==0){
- projectInfo.push(item)
- }
- })
- sessionStorage.setItem('projectInfo',JSON.stringify(projectInfo))
- }
-
- } else {
- this.goNextloading=false;
- this.$message.error('网络开小差了,等会再试试')
- }
- })
- }else{
- this.$message.error('请正确填写必填项目')
- }
- })
-
- })
-
- },
-
-
- },
-
- mounted() {
- this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectConvert')
- let projectInfo=sessionStorage.getItem('projectInfo');
- if(projectInfo){
- this.projectInfo=JSON.parse(projectInfo)
- }
- let LHKaccountInfo=sessionStorage.getItem('LHKaccountInfo');
- if(LHKaccountInfo){
- this.LHKaccountInfo=JSON.parse(LHKaccountInfo)
- }
-
- this.LHKaccountInfo.forEach(item=>{
- getAction('/ctop/audience/list',{
- accountId:item.value
- }).then((res)=>{
- // console.log(res)
- this.loading=false;
- if(res.success){
- res.data.forEach((ele)=>{
- ele.key=item.value+'_'+ele.custom_audience_id
- ele.id= ele.custom_audience_id
- ele.accountName=item.title
- ele.accountId=item.value
- })
- // this.retargetData=res.data;
- this.retargetDataAll=[...this.retargetDataAll,...res.data];
-
- }
- })
- })
- if(this.projectInfo.length>0&&this.projectInfo[0].deliveryRange=='UNION'){
- this.checkedList=[];
- this.checkedList.push(900000000)
- this.adposition=900000000
- }
- },
- }
- </script>
- <style lang="scss">
- .setProjectDirectional{
- .ant-btn-danger {
- background-color: #ff4d4f !important;
- }
- }
- .ant-tooltip-inner,
- .ant-tooltip,
- .ant-tooltip-arrow::before {
- background-color: #fff;
- color: #333;
- }
- .ant-tooltip-inner {
- span {
- display: block;
- }
- }
- .ant-tooltip {
- max-width: 450px;
- }
- .setProjectDirectional {
- .ant-radio-button-wrapper {
- min-width: 80px;
- text-align: center;
- }
- .ant-form-item {
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- color: rgba(0, 0, 0, 0.65);
- font-size: 14px;
- font-variant: tabular-nums;
- line-height: 1.5;
- list-style: none;
- -webkit-font-feature-settings: 'tnum';
- font-feature-settings: 'tnum';
- vertical-align: top;
- }
- .directedBody {
- .ant-form-item {
- margin-bottom: 20px;
- }
- }
- .ant-checkbox-group-item {
- display: block;
- padding: 5px 15px;
- }
-
- .inventoryTypes{
- .ant-checkbox-wrapper,
- .ant-checkbox-group-item {
- display: block;
- padding: 5px 15px;
- }
- .ant-checkbox-wrapper:first-child {
- padding: 0 15px 5px;
- }
- }
- .singleLayersSelecte .selectBox .selectBox1 .selectLists{
- padding: 5px 15px;
- }
- .singleLayersSelecte .selectBox .title{
- background-color: #F8F9FA;
-
- height: 36px;
- line-height: 33px;
- border-radius: 4px 4px 0 0;
- font-weight: bold;
- display: -webkit-box;
- }
- .singleLayersSelecte .selectBox .title .clearAllBtn[data-v-ce06bf4a] {
- position: absolute;
- top: 1px;
- right: 0;
- }
- .singleLayersSelecte .selectBox .selectRight[data-v-ce06bf4a] {
- width: 35%;
- border: 1px solid #ddd;
- border-radius: 5px;
- }
- .singleLayersSelecte .selectBox .selectLeft[data-v-ce06bf4a] {
- width: 65%;
- margin-right: 2%;
- border: 1px solid #ddd;
- border-radius: 5px;
- }
- .linkMultiSel[data-v-dc40dba0] {
- width: 100%;
- height: 310px;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- margin-top: 15px;
- }
- }
- </style>
- <style lang="scss" scoped>
- .setProjectDirectional {
- font-family: PingFangSC-Regular, tahoma, arial, 'Hiragino Sans GB', 'Microsoft yahei', sans-serif;
- color: #333;
- ul,
- li {
- margin: 0;
- padding: 0;
- }
- .moduler {
- background: #fff;
- margin-bottom: 16px;
- position: relative;
- padding: 32px 24px 48px 32px;
- border-radius: 4px;
- box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
- .moduler-title {
- display: flex;
- align-items: center;
- font-size: 22px;
- margin-bottom: 20px;
- }
- .row-item {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-bottom: 32px;
- }
- .row-item:last-of-type {
- margin-bottom: 0;
- }
- .row-item .hint-item {
- width: 24px;
- min-width: 24px;
- align-self: flex-start;
- line-height: 20px;
- height: 20px;
- margin-top: 9px;
- }
- .row-item .label-item {
- position: relative;
- align-items: flex-start;
- align-self: flex-start;
- line-height: 20px;
- height: 20px;
- margin-top: 10px;
- width: 80px;
- min-width: 80px;
- .text-item {
- font-size: 14px;
- width: 60px;
- }
- }
- .row-item .required-item {
- width: 4px;
- height: 4px;
- border-radius: 2px;
- background: #f45858;
- position: absolute;
- right: 10px;
- top: 50%;
- transform: translateY(-50%);
- }
- .row-item .input-item {
- min-width: 670px;
- position: relative;
- // height: 35px;
- .tip {
- font-size: 12px;
- color: tomato;
- }
- .inventory-tags-lists-header {
- background-color: #F8F9FA;
- border: 1px solid #E4E9ED;
- height: 36px;
- line-height: 33px;
- border-radius: 4px 4px 0 0;
- font-weight: bold;
- display: flex;
- }
- .inventory-tags-lists-container {
- border: 1px solid #E4E9ED;
- margin-top: -1px;
- height: 100%;
- padding: 4px 0px;
- border-radius: 0 0 4px 4px;
- }
- .inventory-tags-lists-item {
- width: 100%;
- height: 37px;
- line-height: 37px;
- padding-left: 12px;
- padding-right: 12px;
- display: flex;
- font-size: 14px;
- color: #333;
- }
- }
- .adName{
- display: flex;
- .nameList{
- width: 90%;
- }
- .item{
- display: inline-block;
- width: 30%;
- margin-left: 15px;
- margin-bottom: 10px;
- }
- }
- }
- .opt {
- text-align: right;
- }
- }
- </style>
|