123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805 |
- <template>
- <div class="configLaunchInfo">
- <a-spin :spinning="spinning">
- <a-form :form="form">
- <!-- 投放范围 -->
- <div class="moduler">
- <div class="moduler-title">选择账户</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">
- <Treeselect :appId.sync="accountId" :multiple="false" request="2,4" ref="treeSelect" style="margin-bottom:8px;width:600px " />
- <!-- <Treeselect :appId.sync="accountId" :multiple="false" request="2" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px;width:580px " /> -->
- </div>
- </div>
- </div>
- </div>
-
- <!-- 推广目的 -->
- <div class="moduler">
- <div class="moduler-title">请选择营销目标</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="['campaignType',{initialValue:2 }]" @change="campaignTypeChange">
- <a-radio-button :value="2">提升应用安装</a-radio-button>
- <a-radio-button :value="3" :disabled='true'>获取电商下单</a-radio-button>
- <a-radio-button :value="4" :disabled='true'>推广品牌活动</a-radio-button>
- <a-radio-button :value="5" :disabled='true'>收集销售线索</a-radio-button>
- <a-radio-button :value="7" :disabled='true'>提高应用活跃</a-radio-button>
- </a-radio-group>
- </a-form-item>
- </div>
- </div>
-
- </div>
-
- <!-- 基础信息 -->
- <div class="moduler">
- <div class="moduler-title">请设置基本信息</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-input v-model="strategyName" allow-clear />
- </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-input v-decorator="['campaignName',{ rules: [{ required: true, message: '请填写计划的命名规则' }] }]" allow-clear />
- </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-input v-decorator="['groupName',{ rules: [{ required: true, message: '请填写组的命名规则' }] }]" allow-clear />
- </a-form-item>
- </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-decorator="['singleAppid', {initialValue:1 }]" @change="singleAppidChange">
- <a-radio-button :value="1">是</a-radio-button>
- <a-radio-button :value="0">否</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 >
- <a-radio-group v-model="sysType" @change="sysTypeChange">
- <a-radio-button :value="1">安卓</a-radio-button>
- <a-radio-button :value="2">IOS</a-radio-button>
- </a-radio-group>
- </a-form-item>
-
- </div>
- </div>
- <div class="row-item" v-if="getFormData('campaignType')==2||getFormData('campaignType')==7">
- <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-select v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
- placeholder="选择应用目标" optionFilterProp="children" style="width: 500px"
- :filterOption="filterOption" @change="appIdChange" :mode="getFormData('singleAppid')==1?'defalut':'multiple'" :maxTagCount='1'>
- <a-select-option v-if="getFormData('singleAppid')==0" :value='0' @click="selectAllAppId">选择以下全部</a-select-option>
- <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
- {{ appModel.appName }}    {{ appModel.appVersion }}   {{
- appModel.platform | platform
- }}
- </a-select-option>
- </a-select>
- <a-button type="primary" @click="addApplication" style="margin-left:10px" :loading="tongbuLoading">刷新应用</a-button>
- </a-form-item>
-
- </div>
- </div>
- <div class="row-item" v-if="getFormData('campaignType') == 3">
- <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 buttonStyle="solid"
- v-decorator="['urlType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '1' }]">
- <a-radio-button value="1">淘宝商品</a-radio-button>
- <a-radio-button value="2">淘客商品</a-radio-button>
- </a-radio-group>
- </a-form-item>
-
- </div>
- </div>
- <div class="row-item" v-if="getFormData('campaignType') == 3||getFormData('campaignType') == 4||getFormData('campaignType') == 5">
- <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 v-if="getFormData('campaignType') != 2" :class="{ 'else-label': getFormData('campaignType') == 3 }">
- <a-input placeholder="请填写链接" v-decorator="['url', { rules: [{ required: true,message:'链接不能为空'}] }]" />
- </a-form-item>
-
- </div>
- </div>
- <div class="row-item" v-if="getFormData('campaignType') == 2||getFormData('campaignType') == 4||getFormData('campaignType') == 5">
- <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 >
- <span v-if="convertId&&!convert" style="display:block;font-size:16px">已选择转化目标: {{convertId.label}}</span>
- <a-button type="primary" @click="showConvert">{{convertId?'更换转化目标':'选择转化目标'}}</a-button>
- </a-form-item>
- <div style="margin-top:10px">
- <a-form-item v-if="sysType==1" >
- <a-checkbox v-decorator="[
- 'useAppMarket',
- {
- valuePropName: 'checked',
- initialValue: false,
- },
- ]">
- 优先从系统应用商店下载
- </a-checkbox>
- </a-form-item>
- <a-form-item v-if="sysType==1&&getData('useAppMarket')">
- 请勾选投放应用已上架的应用商店(默认全选)
- <a-checkbox-group v-model="appStore">
- <a-checkbox value="huawei">华为</a-checkbox>
- <a-checkbox value="oppo">OPPO</a-checkbox>
- <a-checkbox value="vivo">VIVO</a-checkbox>
- <a-checkbox value="xiaomi">小米</a-checkbox>
- <a-checkbox value="meizu">魅族</a-checkbox>
- <a-checkbox value="smartisan">锤子</a-checkbox>
- </a-checkbox-group>
- </a-form-item>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- <div class="moduler">
- <div class="moduler-title">用户定向
- <div style="margin-left:30px;position:relative;top:-2px">
- <a-radio-group v-model="useDirectional" @change="useDirectionalChange">
- <a-radio :value="1">
- 不使用定向
- </a-radio>
- <!-- <a-radio :value="0">
- 使用定向包
- </a-radio> -->
- </a-radio-group>
- </div>
- </div>
- <div class="ad-range" v-if="useDirectional==1">
- <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" style="margin-top:20px" v-show="district!='NONE'">
- <!-- 省市 -->
- <div class="provincyCity" v-if="district=='CITY'">
- <linkMultiSelect title='省份' :listArr='regionList' :maxLayers='2' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCityArr'/>
- </div>
- <!-- 区县 -->
- <div class="district" v-else-if="district=='COUNTY'">
- <linkMultiSelect title='省份' :listArr='regionList' :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:0 }]" >
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="2">男</a-radio-button>
- <a-radio-button :value="1">女</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-decorator="['platformOs', {initialValue:1 }]" @change="platformOsChange">
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="1">Android</a-radio-button>
- <a-radio-button :value="2">IOS</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <!-- <div style="margin-top:24px" v-if="getFormData('platformOs')!=0">
- <div v-if="getFormData('platformOs')==1">
- <a-form-item>
- <a-radio-group v-decorator="['androidOsv',{initialValue: 3,}]">
- <a-radio :value="3">不限</a-radio>
- <a-radio :value="4">4X+</a-radio>
- <a-radio :value="5">5x+</a-radio>
- <a-radio :value="6">6x+</a-radio>
- <a-radio :value="7">7x+</a-radio>
- </a-radio-group>
- </a-form-item>
- </div>
- <div v-if="getFormData('platformOs')==2">
- <a-form-item>
- <a-radio-group v-decorator="['iosOsv',{initialValue: 6,}]">
- <a-radio :value="6">不限</a-radio>
- <a-radio :value="7">7X+</a-radio>
- <a-radio :value="8">8x+</a-radio>
- <a-radio :value="9">9x+</a-radio>
- <a-radio :value="10">10x+</a-radio>
- </a-radio-group>
- </a-form-item>
- </div>
-
- </div> -->
- </div>
- </div>
- <!-- <div class="row-item" v-if="getFormData('platformOs')!=2">
- <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="deviceBrand">
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="1">选择品牌</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <div style="width: 400px; margin-top: 24px;" class="inventoryTypes" v-if="deviceBrand==1">
- <div class="inventory-tags-lists-header" style="padding-left:15px">
-
- <div class="inventory-tags-lists-name"><strong>品牌名称</strong></div>
- </div>
- <div class="inventory-tags-lists-container" >
- <a-checkbox-group
- v-decorator="['deviceBrand', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
- >
- <a-checkbox :value="1" style="margin-bottom: 8px">OPPO</a-checkbox>
- <a-checkbox :value="2" style="margin-bottom: 8px">VIVO</a-checkbox>
- <a-checkbox :value="3" style="margin-bottom: 8px">华为</a-checkbox>
- <a-checkbox :value="4" style="margin-bottom: 8px">小米</a-checkbox>
- <a-checkbox :value="5" style="margin-bottom: 8px">荣耀</a-checkbox>
- <a-checkbox :value="6" style="margin-bottom: 8px">三星</a-checkbox>
- <a-checkbox :value="7" style="margin-bottom: 8px">金立</a-checkbox>
- <a-checkbox :value="8" style="margin: 0 0 8px 0">魅族</a-checkbox>
- <a-checkbox :value="9" style="margin-bottom: 8px">乐视</a-checkbox>
- <a-checkbox :value="10" style="margin-bottom: 8px">其他</a-checkbox>
- <a-checkbox :value="11" v-if="getFormData('platformOs') == 0" style="margin-bottom: 8px">苹果</a-checkbox>
- </a-checkbox-group>
- </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="['customCrowd', {initialValue:'0' }]" @change="customCrowdChange">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">定向</a-radio-button>
- <a-radio-button value="2">排除</a-radio-button>
- <a-radio-button value="3">同时定向排除</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <div class="dingxiang_paichu" v-if="getFormData('customCrowd')&&getFormData('customCrowd')!='0'" style="width:60%">
- <a-tabs v-model="tabKey" @change="retargetTabChange" >
- <a-tab-pane key="1" tab="定向池" v-if="getFormData('customCrowd')!='2'">
- <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>
- <template slot="populationType" slot-scope="populationType"> {{ populationType | customCrowdHandler}} </template>
- </a-table>
- </a-tab-pane>
- <a-tab-pane key="2" tab="排除池" v-if="getFormData('customCrowd')!='1'">
- <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>
- <template slot="populationType" slot-scope="populationType"> {{ populationType |customCrowdHandler}} </template>
- </a-table>
- </a-tab-pane>
- <a-button slot="tabBarExtraContent" type='primary' @click="refreshPopulation" :loading='refreshPopulationLoading'>刷新人群包</a-button>
- </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-decorator="['filterConvertedLevel', { initialValue: 0 }]">
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="1">广告组</a-radio-button>
- <a-radio-button :value="2">广告计划</a-radio-button>
- <a-radio-button :value="3">本账户</a-radio-button>
- <a-radio-button :value="4">公司主体</a-radio-button>
- <a-radio-button :value="5">APP</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>
- <a-radio-group v-decorator="['isOpen', { initialValue: 0 }]" @change="isOpenChange">
- <a-radio-button :value='0'>关闭</a-radio-button>
- <a-radio-button :value="1">开启</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <div style="width: 400px; margin-top: 24px;" class="inventoryTypes" v-show="getFormData('isOpen')==1">
- <div class="inventory-tags-lists-container">
- <a-checkbox v-model="noAgeBreak">不可突破年龄</a-checkbox>
- <a-checkbox v-model="noGenderBreak">不可突破性别</a-checkbox>
- <a-checkbox v-model="noAreaBreak">不可突破地域</a-checkbox>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ad-range2" v-if="useDirectional==0">
- <div style="position:relative" class="ad-range2-title">
- <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
- <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
- <span>点击全选</span>
- </a-checkbox>
- </div>
-
- <a-spin :spinning="directionalSpinning">
- <div class="title-list">
-
- <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
- <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
- <label>
- <a-checkbox :value='item.id'>
- {{item.templateName+'_('+item.id+')'}}
- </a-checkbox>
- </label>
- </div>
- </a-checkbox-group>
- </div>
- </a-spin>
- </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-decorator="['scheduleType', { initialValue:'SCHEDULE_FROM_NOW' }]" @change="scheduleTypeChange">
- <a-radio-button value="SCHEDULE_FROM_NOW">从今天起长期投放</a-radio-button>
- <a-radio-button value="SCHEDULE_START_END">设置开始和结束时间</a-radio-button>
- </a-radio-group>
- <p style="margin-top:15px">
- <a-range-picker
- @change="dateChange"
- v-model="dateRange"
- :disabled-date="disabledDate"
- v-if="getFormData('scheduleType')=='SCHEDULE_START_END'"
- />
- </p>
- </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-decorator="['scheduleTimes', { initialValue:'' }]" >
- <a-radio-button value=''>不限</a-radio-button>
- <a-radio-button value="SpecifiedTImePeriod">指定时间段</a-radio-button>
- </a-radio-group>
- <div
- v-show="getFormData('scheduleTimes')=='SpecifiedTImePeriod'"
- style="margin-top:15px"
- >
- <scheduleTime
- style="width:100%"
- :scheduleTime.sync="scheduleTimeData"
- ref="selectCheck"
- />
- </div>
- </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-decorator="['strategyBudget', { initialValue:'' }]" >
- <a-radio-button value=''>不限</a-radio-button>
- <a-radio-button value="unifiedBudget">统一预算</a-radio-button>
- </a-radio-group>
- <a-input-group compact v-if="getFormData('strategyBudget')=='unifiedBudget'" style="margin-top:20px">
- <a-select :disabled="true" v-decorator="['budgetMode', { initialValue:'TOTAL' }]">
- <a-select-option value="TOTAL" >总预算</a-select-option>
- <a-select-option
- value="TOTAL"
- v-if="getFormData('smartBidType')=='SMART_BID_CUSTOM'"
- >总预算</a-select-option>
- </a-select>
- <a-input style="width: 25%" v-decorator="['budget', { initialValue:300 }]" />
- </a-input-group>
- <span class="tip" v-if="getFormData('budget')<300">请输入预算,不少于300元,不超过9999999.99元</span>
- </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-decorator="['bidType', { initialValue:10 }]" @change="bidTypeChange">
- <!-- <a-radio-button :value="2">封面点击数</a-radio-button> -->
- <a-radio-button :value="10">转化数</a-radio-button>
- </a-radio-group>
-
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="getFormData('bidType')==10">
- <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-select size="default" v-decorator="['ocpxActionType']" style="width: 200px" @change="handleChange">
-
- <a-select-option :value="2">行为数</a-select-option>
- <!-- v-if="getFormData('campaignType') == 2 && groupTypeData.isActivate == 1 -->
- <a-select-option :value="180" >激活</a-select-option>
- <a-select-option :value="53" v-if="
- groupTypeData.isFormSubmit == '1'
- ">表单提交</a-select-option>
- <a-select-option :value="394" v-if="
- groupTypeData.isOrderSubmit == '1'
- ">订单提交</a-select-option>
- <a-select-option :value="348" v-if="
- groupTypeData.isValidClue == '1'
- ">使用有效线索</a-select-option>
- <a-select-option :value="383" v-if="
- groupTypeData.isCreditGrant == '1'
- ">授信出价</a-select-option>
- <a-select-option :value="384" v-if="
- groupTypeData.isWanJian == '1'
- ">完件出价</a-select-option>
- <a-select-option :value="190" v-if="
- groupTypeData.isPurchase == '1'
- ">付费出价</a-select-option>
- <a-select-option :value="191" v-if="
- groupTypeData.isFirstdayRoi == '1'
- ">首日ROI</a-select-option>
- <a-select-option :value="396" v-if="
- groupTypeData.isRegister == '1'
- ">注册优化目标</a-select-option>
- </a-select>
-
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) && groupTypeData.deepConversionTypes && groupTypeData.deepConversionTypes.length > 0 ">
- <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-select v-decorator="['deepConversionType']" allowClear style="width: 200px">
- <a-select-option v-for="(items, index) of groupTypeData.deepConversionTypes" :key="index" :value='items.deepConversionType'>
- {{ items.desc }}</a-select-option>
- </a-select>
- </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="chargeMethods">
- <a-radio-button v-if="getFormData('bidType')==2" value="CPC">点击计费(CPC)</a-radio-button>
- <a-radio-button v-if="getFormData('bidType')==10" value="OCPM">按展示付费(oCPM)</a-radio-button>
- </a-radio-group>
-
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="getFormData('bidType')==2">
- <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-input-number
- style="width:200px"
- :max="10000"
- :step="0.1"
- v-decorator="['bid', {rules:validationRules.bid} ]"
- />
- <span style="margin-left:5px">元</span>
- <!-- <span style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
- </a-form-item>
- <span
- class="tip"
- v-if="getFormData('bid')<0.1"
- >请输入点击出价,不少于0.1元,不超过10000元</span>
- </div>
- </div>
-
- <div class="row-item" v-if="getFormData('bidType')==10">
- <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-input-number
- style="width:200px"
- :max="10000"
- :step="0.1"
- v-decorator="['cpaBid', {rules:validationRules.bid} ]"
- />
- <span style="margin-left:5px">元</span>
-
- </a-form-item>
- <span
- class="tip"
- v-if="getFormData('cpaBid')<0.1"
- >请输入点击出价,不少于0.1元,不超过10000元</span>
- </div>
- </div>
-
- <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) && groupTypeData.deepConversionTypes && groupTypeData.deepConversionTypes.length > 0 ">
- <div class="hint-item">
- </div>
- <div class="label-item">
- <div class="text-item">深度转化目标出价</div>
- <!-- <div class="required-item"></div> -->
- <!-- {{getFormData('deepConversionBid')}} -->
- </div>
- <div class="input-item">
- <a-form-item>
- <a-input-number
- style="width:200px"
- :max="10000"
- :step="0.1"
- v-decorator="['deepConversionBid' ]"
- />
- <span style="margin-left:5px">元</span>
- <!-- <span style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
- </a-form-item>
- <!-- <span
- class="tip"
- v-if="getFormData('deepConversionBid')<0.1"
- >请输入点击出价,不少于0.1元,不超过10000元</span> -->
- </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="adposition" @change="adpositionChange">
- <a-radio-button :value='1'>优选广告位</a-radio-button>
- <a-radio-button value="inventoryTypes">按媒体指定位置</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>
- </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="['openProgramCreate', { initialValue:2 }]">
- <a-radio-button :value='2'>不限</a-radio-button>
- <a-radio-button :value="0">自定义</a-radio-button>
- <a-radio-button :value="1">程序化</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>
- <a-radio-group v-decorator="['channelType', { initialValue:2 }]">
- <a-radio-button :value='2'>不限</a-radio-button>
- <a-radio-button :value="0">内部</a-radio-button>
- <a-radio-button :value="1">素造</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>
- <a-radio-group v-decorator="['assetMining', { initialValue:0 }]">
- <a-radio-button :value='1'>是</a-radio-button>
- <a-radio-button :value="0">否</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>
- <a-radio-group v-decorator="['smartCover', { initialValue:0 }]">
- <a-radio-button :value='1'>是</a-radio-button>
- <a-radio-button :value="0">否</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>
- <a-select
- v-decorator="['siteId']"
- showSearch
- allowClear
- placeholder="选择应用下载详情页"
- optionFilterProp="children"
- :filterOption="filterOption"
- style="width:400px"
- >
- <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
- {{ appModel.name }}
- </a-select-option>
-
- </a-select>
- </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-decorator="['generalTrack', { initialValue: 1 }]">
- <a-radio-button :value="1">通用</a-radio-button>
- <a-radio-button :value="0">非通用</a-radio-button>
- </a-radio-group>
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="getFormData('generalTrack')==1">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">点击监测链接</div>
- </div>
- <div class="input-item">
- <a-form-item>
- <a-input v-decorator="['clickTrackUrl']" @focus="clickTrackUrlFocus" @blur="clickTrackUrlBlur"/>
- <span v-show="clickTrackUrlTip" style="font-size:14px;color:red;">填写点击检测连接的话,开始播放链接必须填写</span>
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="getFormData('generalTrack')==1">
- <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-input v-decorator="['impressionUrl']" />
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="getFormData('generalTrack')==1">
- <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-input v-decorator="['actionbarClickUrl']" />
- </a-form-item>
- </div>
- </div>
- <!-- <div class="row-item" v-if="whiteList.actionbar_click_url_switch&&getFormData('generalTrack')==1">
- <div class="hint-item"></div>
- <div class="label-item">
- <div class="text-item">第三方ActionBar点击监控链接</div>
- <div class="required-item"></div>
- </div>
- <div class="input-item">
- <a-form-item >
- <a-input
- v-decorator="[
- 'actionbarClickUrl',
- {
- rules: [{ message: '请输入第三方点击监控链接' }],
- },
- ]"
- placeholder="请输入第三方点击监控链接"
- >
- </a-input>
- <span style="color: red; position: relative; top: -10px">仅加白使用</span>
- </a-form-item>
- </div>
- </div> -->
- <div class="row-item" v-if="whiteList.creative_category_switch==1">
- <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-cascader
- :options="createOptions"
- v-decorator="['creativeCategory',{ initialValue:[],rules: [{ required: whiteList.creative_category_switch==1, message: '创意分类必填' }] }]"
- :fieldNames="fieldNames"
- placeholder="请选择创意分类"
-
- />
- </a-form-item>
- </div>
- </div>
- <div class="row-item" v-if="whiteList.creative_category_switch==1">
- <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-select
- mode="tags"
- style="width: 100%"
- placeholder="按回车生成标签"
- v-decorator="['creativeTag',{initialValue:[],rules: [ {required: whiteList.creative_category_switch==1, validator: creativeTagValid }]}]"
- dropdownClassName="display-none-selset"
- :token-separators="[',', ' ', ',']"
- >
- </a-select>
- <span v-if="getData('creativeTag')&&getData('creativeTag').length > 10" style="color:red">创意标签最多填写10个,请删减</span>
- </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-select
- v-decorator="['actionBarText', { rules: [{ required: true, message: '请选择行动号召按钮文案' }] }]"
- showSearch
- allowClear
- placeholder="选择行动号召按钮文案"
- optionFilterProp="children"
- :filterOption="filterOption"
- >
- <a-select-option v-for="appModel in actionBarTextList" :key="appModel.id" :value="appModel.actionBarText">
- {{ appModel.actionBarText }}
- </a-select-option>
- </a-select>
- </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-input-number
- style="width:200px"
- :max="15"
- :step="1"
- :min='1'
- v-decorator="['imageCnt',{ initialValue:1, rules: [{ required: true, message: '请填写关联封面数' }] } ]"
- />
- </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>
- <div style="position:relative">
- <a-textarea
- class="rending"
- placeholder="请输入广告语"
- @change="descriptionchange"
- v-decorator="['description',{rules: [ { required: true, message: '请填写广告语' }] } ]"
- :autosize="{ minRows: 2, maxRows: 6 }"
- :max-length="30"
- ></a-textarea>
- <p
- style="
- font-size: 12px;
- color: #b6bbc7;
- letter-spacing: 0.3px;
- text-align: right;
- line-height: 30px;
- position: absolute;
- bottom: 0;
- right: 6px;
- width: 100%;
- margin-bottom: 0;
- "
- >
- {{ description.length }}/30
- <!-- {{ getFormData('description').length }}/30 -->
- </p>
- </div>
- </a-form-item>
- </div>
- </div>
- </div>
-
- </div>
- <!-- <div class="moduler">
- <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="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>
- </a-form>
- <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>
- <a-modal v-model="convert" title="选择转化目标">
- <template slot="footer">
- <a-button key="back" @click="convert=false">取消</a-button>
- <a-button key="submit" type="primary" @click="convert=false">
- 确定
- </a-button>
- </template>
- <a-form-item label="追踪方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
- <a-radio-group buttonStyle="solid" v-model="convertType" @change="convertChange">
- <a-radio-button value="1" v-show="getFormData('campaignType') == 4||getFormData('campaignType') == 5">JS布玛</a-radio-button>
- <a-radio-button value="2" v-show="getFormData('campaignType') == 4||getFormData('campaignType') == 5">Xpath</a-radio-button>
- <a-radio-button value="3"
- v-show="getFormData('campaignType') == 2">应用-SDK
- </a-radio-button>
- <a-radio-button value="7" v-show="getFormData('campaignType') == 2">应用-API</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item label="选择转化" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
- <a-select allowClear labelInValue style="width:100%" v-model="convertId" @focus="getConvertList">
- <a-select-option :value="item.convert_id" v-for="item in convertList" :key="item.convert_id">
- {{item.convert_name}}</a-select-option>
- </a-select>
- </a-form-item>
- </a-modal>
- <a-modal v-model="useDirectionalVisible" title="选择定向包" @ok="selectDirectionalOk" width='600px' height='500px'>
- <div style="position:relative">
- <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
- <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
- <span>点击全选</span>
- </a-checkbox>
- </div>
-
- <a-spin :spinning="directionalSpinning">
- <div class="title-list">
-
- <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
- <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
- <label>
- <a-checkbox :value='item.id'>
- {{item.templateName+'_('+item.id+')'}}
- </a-checkbox>
- </label>
- </div>
- </a-checkbox-group>
- </div>
- </a-spin>
- </a-modal>
- </a-spin>
- </div>
- </template>
- <script>
- import moment from 'moment'
- import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
- import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
- import { TreeSelect } from 'ant-design-vue';
- import qs from 'qs'
- const SHOW_PARENT = TreeSelect.SHOW_PARENT;
- // import selectCheckAll from './toutiaoTime'
- import radioCheck from './components/radioCheck';
- import linkMultiSelect from './components/linkMultiSelect'
- import singleLayersSelecte from './components/singleLayerSelecte'
- import scheduleTime from '@/components/formComponents/toutiaoTime'
- import $ from "jquery"
- // import { filter } from 'vue/types/umd';
- var str = ""
- for (let i = 0; i < 7*24; i++) {
- str+='0'
-
- }
- let ageArr=[
- {
- value:'',
- title:'不限',
- checked:false,
-
- },
- {
- value:18,
- title:' 18-23岁',
- checked:false,
- },
- {
- value:24,
- title:'24-30岁',
- checked:false,
- },
- {
- value:31,
- title:'31-40岁',
- checked:false,
- },
- {
- value:41,
- title:'41-49岁',
- checked:false,
- },
- {
- value: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: 'populationType',
- scopedSlots: {
- customRender: 'populationType'
- },
- width: 200
- },
- {
- title: '所属账号',
- dataIndex: 'accountId',
- sorter: true,
- width: '40%',
- scopedSlots: { customRender: 'accountId' },
- },
-
- ]
- const plainOptions = [
- {
- value: 6,
- label: '上下滑大屏广告'
- },
- {
- value: 7,
- label: '信息流广告'
- },
- {
- value: 3,
- label: '视频播放页广告'
- },
- {
- value: 5,
- label: '联盟广告'
- },
- ];
- export default {
- components: {
- // selectCheckAll,
- // newDirectedPackage,
- Treeselect,
- radioCheck,
- linkMultiSelect,
- singleLayersSelecte,
- scheduleTime
- },
- data() {
- return {
- clickTrackUrlTip:false,
- deviceBrand:0,
- tongbuLoading:false,
- refreshPopulationLoading:false,
- noAreaBreak:false,
- noGenderBreak:false,
- noAgeBreak:false,
- regionList:[],
- editRecordId:'',
- spinning:false,
- description:'',
- whiteList:{},
- actionBarTextList:[],
- treeData:[],
- accountId:undefined,
- strategyName: '',
- form: this.$form.createForm(this),
- goNextloading:false,
- goPlanShowloading:false,
-
-
- dateRange: [moment(), moment()],
- visible:false,
- errorInfo:[],
- fieldNames: {
- label: 'category_name',
- value: 'category_id',
- children: 'child',
- },
- createOptions: [],
- appStore: ["huawei", "oppo", "vivo", "xiaomi", "meizu", "smartisan"],
- sysType:1,
- indeterminateDirectional:false,
- checkAllDirectional:false,
- directionalList:[],
- directionalSpinning:false,
- directionalCheckedList:[],
- useDirectional:1,
- siteList:[],
- tabKey:'1',
- adposition:1,
- groupTypeData:{},
- convert: false,
- convertId: "",
- convertList: [],
- convertType: '1',
- strategyInfo:{},
- accountInfo:{},
- appList: [],
- appListAll:[],
- dateRange: [moment(), moment()],
- scheduleTime: '',
- scheduleTimeData:str,
- projectInfo:[],
-
- chargeMethods:'CPC',
-
- unionVideoType:'REWARDED_VIDEO',
- district:'NONE',
- sceneInventory:'',
- checkedList: [],
- indeterminate: false,
- checkAll: false,
- plainOptions,
- // 定向的参数
- regionValue:'NONE',
- ageArr,//受众年龄
- region:[],
- agesRange:[],
- regionCityListUrl:'/kuaishou/batch/getRegion',
- regionCountyListUrl:'/kuaishou/batch/getRegion',
- // 自定义人群
- // 自定义人群参数
- 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,
- }],
- },
- useDirectionalVisible:false,
-
-
- }
- },
- watch: {
- accountId(newValue,oldValue){
- setTimeout(()=>{
- this.form.setFieldsValue({
- appId:undefined,
- ocpxActionType:undefined
- })
- },0)
- if(newValue){
- // this.treeData.forEach(item=>{
- // if(item.children){
- // item.children.forEach(ele=>{
- // if(ele.value==newValue){
- // this.$parent.accountInfo=ele
- // }
- // })
- // }
- // })
- this.getAppList()
- getAction('/kuaishou/batch/getIsActivate', {
- accountId: this.accountId
- }).then(res => {
- if (res.success) {
- this.groupTypeData = res.result
-
- }
- })
-
- getAction('/kuaishou/batch/getCreativeCategory', {
- accountId:this.accountId,
- }).then((res) => {
- if (res.success) {
- console.log(res)
- this.createOptions = res.result
- }
- })
- this.getWhiteList()
- this.getpopulationlist()
- }else{
- }
- },
-
- },
- 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,
- defaultChecked:this.incluedSelectedRowKeys.indexOf(record.key)>-1
- },
- }),
- };
- },
- 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,
- defaultChecked:this.excludeSelectedRowKeys.indexOf(record.key)>-1
- },
- }),
- };
- },
- },
- methods: {
- platformOsChange(e){
- console.log(e);
- this.deviceBrand=0;
- this.sysType=e.target.value;
- this.sysTypeChange(e)
- },
- refreshPopulation(){
- if(this.accountId){
- this.refreshPopulationLoading = true
- // this.$refs.application.showApplication()
- getAction('/kuaishou/batch/pullPopulationList', {
- accountId: this.accountId
- }).then(res => {
- if (res.success) {
- this.refreshPopulationLoading = false
- this.$message.success(res.message)
- this.retargetTabChange()
- } else {
- this.refreshPopulationLoading = false
- this.$message.error(res.message)
- }
- })
- }else{
- this.$message.error('请先选择账户')
- }
- },
- addApplication() {
- if(this.accountId){
- this.tongbuLoading = true
- // this.$refs.application.showApplication()
- getAction('/kuaishou/batch/syncAppList', {
- accountId: this.accountId
- }).then(res => {
- if (res.success) {
- this.tongbuLoading = false
- this.$message.success(res.message)
- this.getAppList()
- } else {
- this.tongbuLoading = false
- this.$message.error(res.message)
- }
- })
- }else{
- this.$message.error('请先选择账户')
- }
-
- },
- getIsActivate(val){
- let params={};
- params.accountId=this.accountId;
- params.campaignType=this.getFormData('campaignType');
- params.appId=val
-
- getAction('/kuaishou/batch/getIsActivate',params).then(res => {
- if (res.success) {
- this.groupTypeData = res.result
- }
- })
- },
- isOpenChange(e){
- this.noAreaBreak=false;
- this.noGenderBreak=false;
- this.noAgeBreak=false;
- },
- selectAllAppId(){
-
- console.log(this.getFormData('appId'))
- },
- singleAppidChange(e){
- // console.log(e.target.value,this.getFormData('appId'));
- this.form.setFieldsValue({
- appId:undefined
- })
- },
- descriptionchange(e){
- this.description=e.target.value
- },
- //获取表单的某一个属性值
- 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'),
- })
- },
-
- //推广目的改变
- campaignTypeChange(e){
- console.log(e.target)
- let strategyNamepart=this.campaignTypeHandle(e.target.value);
- this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
- this.getActionBarText()
- },
-
-
-
- goBack() {
- this.$router.replace('/autoLaunch/configLaunchList')
- this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
- this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
-
- },
-
-
- //请求项目和账户内容
- accountHttp(){
- this.treeData=[];
- this.accountIds=[];
- getAction('/ctop/projectMember/getProjectAccountByUserId?mediaType=2', {}).then(res => {
- if(res.success){
- // console.log(res);
- if(res.result){
- res.result.forEach((element,index) => {
- if(element){
- this.treeData.push({});
- this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
- this.treeData[index].value='project'+element.project.projectId;
- this.treeData[index].key=element.project.projectId;
- this.treeData[index].mediaId=element.project.mediaId;
- this.treeData[index].children=[];
-
- if(element.account.length){
- element.account.forEach((ele,i)=>{
- this.treeData[index].children.push({});
- this.treeData[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
- this.treeData[index].children[i].value=ele.accountId;
- this.treeData[index].children[i].key=ele.accountId;
- })
-
- }
- }
- });
- // console.log(this.treeData)
-
- }
- }
- })
- },
- campaignTypeHandle(val){
- let str='';
- switch (val) {
- case '2':
- str='应用安装'
- break;
- case '3':
- str='电商下单'
- break;
- case '4':
- str='推广品牌'
- break;
- case '5':
- str='营销线索'
- break;
- case '7':
- str='应用活跃'
- break;
-
- default:
- str='转化错误'
- break;
- }
- return str
- },
- creativeTagValid(rule, value, callback) {
- console.log(rule, value, callback)
- if(value.length == 0 || value==undefined){
- // console.log(1)
- callback('创意标签必须填写')
-
- }else if (value.length > 10) {
- callback('创意标签最多填写10个,请删减')
- }else{
- // console.log(2)
- callback()
- }
- },
- directionalChange(checkedList) {
- // console.log(checkedList)
- this.indeterminateDirectional = !!checkedList.length && checkedList.length < this.directionalList.length;
- this.checkAllDirectional = checkedList.length === this.directionalList.length;
- },
- onCheckAllDirectionalChange(e) {
- console.log(e)
- let valueOption=[];
- valueOption=this.directionalList.map(item=>{
- return item.id
- })
- Object.assign(this, {
- directionalCheckedList: e.target.checked ? valueOption : [],
- indeterminateDirectional: false,
- checkAllDirectional: e.target.checked,
- });
- },
- selectDirectionalOk(e){
- this.useDirectionalVisible=false
- },
- useDirectionalChange(e){
- console.log(e);
- if(e.target.value==0){
- // this.useDirectionalVisible=true;
- this.getUserDirectional()
- }
- },
- // 获取定向包
- getUserDirectional(){
- getAction('/kuaishou/batch/getDirectionalTemplate',{
- accountId:this.accountId
- }).then(res=>{
- console.log(res);
- this.directionalList=res.result
- })
- },
- appIdChange(val){
- console.log(val)
- this.siteList=[]
-
- // this.getPageList(val)
- if(this.getFormData('singleAppid')==0){
- if(val&&val.indexOf(0)>-1){
- let appidArr=this.appList.map(item=>{
- return item.appId
- })
- // setTimeout(()=>{
-
- // this.form.setFieldsValue({
- // appId:appidArr
- // })
- // },0)
- this.$nextTick(()=>{
- this.form.setFieldsValue({
- appId:appidArr
- })
- })
-
- }
- }
-
- if(val!=undefined || (val&&val.length>0) ){
- if(this.getFormData('campaignType')==2){
-
- if(this.getFormData('singleAppid')==1){
- this.getIsActivate(val)
- }else{
- this.getIsActivate(val[0])
- }
-
- }
-
- }
- },
- disabledDate(current) {
-
- return current && current < moment().subtract(1, 'day')
- },
- bidTypeChange(e){
- console.log(e);
- this.chargeMethods=e.target.value==10?"OCPM":'CPC'
- },
- getData(className) {
- return this.form.getFieldValue(className)
- },
- handleChange(val){
- console.log(val)
- },
- // 投放日期改变
- scheduleTypeChange(val){
- console.log(val)
- if(val=='SCHEDULE_FROM_NOW'){
- this.dateRange=[moment(),moment().add(10,'years')]
-
- }else{
- this.dateRange=[moment(),moment().add(10,'days')]
- }
- },
- filterOption(input, option) {
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- adpositionChange(){
- if(this.adposition!='inventoryTypes'){
- this.checkedList=[];
- this.indeterminate=false;
- this.checkAll=false;
- }
- },
- cityChange(){
- this.region=[];
- },
- 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,
- });
- },
- customCrowdChange(e){
- console.log(e);
- if(e.target.value=='1' || e.target.value=='2'){
- this.retargetTabChange();
- this.tabKey=e.target.value
- }else if(e.target.value=='3'){
- this.retargetTabChange();
- this.tabKey='1'
- }
- },
- // 自定义人群的--同时定向排除tab切换事件
- retargetTabChange(){
- console.log()
- this.retargetDataAll=[];
- this.loading=true;
-
- getAction('/kuaishou/batch/getPopulationList',{
- accountId:this.accountId
- }).then((res)=>{
- // console.log(res)
- this.loading=false;
- if(res.success){
- res.result.forEach((ele)=>{
- ele.key=ele.orientationId
- ele.id= ele.orientationId
- ele.name=ele.orientationName+"("+ele.orientationId+")"
- // ele.accountName=this.accountInfo.title
- ele.accountId=this.accountId
- })
- // this.retargetData=res.data;
- this.retargetDataAll=[...this.retargetDataAll,...res.result];
-
- }
- })
- },
- onSelectChange(selectedRowKeys) {
- // console.log('selectedRowKeys changed: ', selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- },
- // 自定义人群的改变
- retargetTableChange(pagination, filters, sorter){
- // console.log(pagination);
- },
- //获取选中的城市
- getSelectedCityArr(val){
- console.log(val);
- this.region=[];
- this.region=val;
- },
- // 获取选中的区县
- getSelectedCountyArr(val){
- // console.log(val)
- this.region=[];
- this.region=val;
- },
- //获取选中的年龄段
- getAgeSelect(val){
- // console.log(val)
- if(val.length==1&&val[0]==""){
- this.agesRange=[]
- }else{
- this.agesRange=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('beginTime')
- this.form.getFieldDecorator('endTime')
- this.form.setFieldsValue({
- beginTime: 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('出价必须填写')
- }
- },
-
-
-
-
- // 保存并新建创意
- goNext() {
- this.$nextTick(()=>{
-
- this.form.validateFields((err, values) => {
- console.log(values)
- if (!err) {
- this.goNextloading=true;
- if(this.district!='NONE'){
- values.district=this.district
- }
- console.log(this.excludeSelectedKeys,this.incluedSelectedKeys)
-
- // 设置广告位值
- if(this.adposition!='inventoryTypes'){
- this.checkedList=[];
- values.sceneId=JSON.stringify([this.adposition])
- }else{
- values.sceneId=JSON.stringify(this.checkedList)
- }
- // 时间段值
- // if(this.getFormData('scheduleTime')!=''){
- // values.scheduleTime=this.scheduleTimeData
- // }else{
- // values.scheduleTime=''
- // }
- // 投放时间的值
- // if(this.getFormData('scheduleType')=='SCHEDULE_FROM_NOW'){
- // values.beginTime=this.dateRange[0].format('YYYY-MM-DD');
- // values.endTime= this.dateRange[1].add(10,"years").format('YYYY-MM-DD');
-
- // }else{
- // values.beginTime=this.dateRange[0].format('YYYY-MM-DD');
- // values.endTime= this.dateRange[1].format('YYYY-MM-DD');
- // }
- values.appIdArray=values.appId instanceof Array?JSON.stringify(values.appId):JSON.stringify([values.appId])
- values.appId=undefined;
- values.agesRange=JSON.stringify(this.agesRange)
- values.region=JSON.stringify(this.region);
-
- values.convertId=this.convertId==''?undefined:this.convertId;
- let excludePopulation=this.excludeSelectedKeys.map(item=>{
- return item.id
- })
- let population=this.incluedSelectedKeys.map(item=>{
- return item.id
- })
- values.excludePopulation=excludePopulation.length>0?JSON.stringify(excludePopulation):undefined;
- values.population=population.length>0?JSON.stringify(population):undefined;
-
-
- values.useAppMarket=values.useAppMarket?'1':'0'
-
-
- // if(this.useDirectional==0){
- // values.templateId=this.directionalCheckedList
- // }
- if(this.sysType==1&&this.getData('useAppMarket')){
- values.appStore=JSON.stringify(this.appStore)
- }else if(this.sysType==1&&!this.getData('useAppMarket')){
- values.appStore="[]"
- }
- if(values.cpaBid){
- values.cpaBid=parseInt(values.cpaBid*1000)
- }
- if(values.deepConversionBid){
- values.deepConversionBid=parseInt(values.deepConversionBid*1000)
- }
-
- if(values.creativeCategory&&values.creativeCategory.length>0){
-
- values.creativeCategory=values.creativeCategory[values.creativeCategory.length-1]
- }else{
- values.creativeCategory=undefined
- }
-
- if(this.deviceBrand==0){
-
- }
- values.deviceBrand=this.deviceBrand==0?'[0]':JSON.stringify(values.deviceBrand)
- values.accountId = this.accountId
-
- values.creativeTag=values.creativeTag?JSON.stringify(values.creativeTag):undefined
- values.noAreaBreak=this.noAreaBreak?1:0
- values.noGenderBreak=this.noGenderBreak?1:0
- values.noAgeBreak=this.noAgeBreak?1:0
- console.log('Received values of form: ', values)
- let url=''
- if(this.editRecordId){
- url='/ctop/aiKuaishouAdvertiserStrategy/edit';
- values.id=this.editRecordId
- }else{
- url='/ctop/aiKuaishouAdvertiserStrategy/add'
- }
- postAction(url,values).then(res=>{
- console.log(res)
- this.goNextloading=false
- if(res.success){
-
- this.$router.replace('/autoLaunch/configLaunchList')
- this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
- this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
- }else{
- this.$message.error(res.message)
-
- // this.$router.replace('/autoLaunch/configLaunchList')
- // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
- // this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
- }
- })
- // $.ajax({
- // url:'http://192.168.1.193:31012/add_advertiser_strategy',
- // type:"POST",
- // data:JSON.stringify(values),
- // crossDomain:true,
- // contentType:"application/json; charset=utf-8;",
- // dataType:'json',
- // success:(res)=>{
- // this.goNextloading=false
- // console.log(res)
- // let result=JSON.parse(res)
- // if(result.code==0){
- // this.$router.replace('/autoLaunch/configLaunchList')
- // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
- // }else{
- // this.$message.error(result.message)
- // this.$router.replace('/autoLaunch/configLaunchList')
- // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
- // }
- // },
- // error:(res)=>{
- // console.log(res)
- // }
- // })
-
- }else{
- this.$message.error('请正确填写必填项目')
- }
- })
-
- })
-
- },
-
- // 获取applist
- getAppList() {
- let params = {}
- params.accountId = this.accountId
- getAction('/kuaishou/batch/getAppList', params).then(res => {
- if (res.success) {
- this.appListAll = res.result.map((item, index) => {
- return {
- ...item,
- key: index
- }
- })
- if(this.sysType==1){
- this.appList=this.appListAll.filter(item=>{
- return item.platform==1||item.platform==2
- })
- }else if(this.sysType==2){
- this.appList=this.appListAll.filter(item=>{
- return item.platform==3||item.platform==4
- })
- }
- }
- })
- },
- convertChange() {
- this.convertId = ""
- },
- getConvertList() {
- var params = {}
- params.accountId = this.accountId
- params.type = this.convertType
- getAction('/kuaishou/batch/getConvertList', params).then(res => {
- console.log(res)
- if (res.success) {
- this.convertList = res.result.map(item => {
- return {
- ...item,
- convert_id: item.convert_id + ''
- }
- })
- }
- })
- },
- sysTypeChange(e){
- console.log(e.target.value);
- this.form.setFieldsValue({
- appId:undefined,
- platformOs:e.target.value
- })
- // if(this.getFormData('campaignType')==2 || this.getFormData('campaignType')==7){
- // this.appIdChange(this.getFormData('appId'))
- // }
-
- if(this.sysType==1){
- this.appList=this.appListAll.filter(item=>{
- return (item.platform==1 || item.platform==2)
- })
- }else if(this.sysType==2){
- this.appList=this.appListAll.filter(item=>{
- return (item.platform==3||item.platform==4)
- })
- }
-
- },
- getPlatForm(appId) {
- if (appId) {
- var data = this.appList.filter(item => {
- return item.appId == appId
- })
- return data[0].platform
- }
- },
- showConvert() {
- this.convertChange()
- if (this.getFormData('campaignType') == 2) {
- if (this.getData('appId')) {
- this.convert = true;
- let appIdvalue=this.getData('appId');
-
- if (this.getPlatForm(appIdvalue instanceof Array?appIdvalue[0]:appIdvalue) == 1 || this.getPlatForm(appIdvalue instanceof Array?appIdvalue[0]:appIdvalue) == 2) {
- this.convertType = '3'
- } else {
- this.convertType = '7'
- }
- } else {
- this.$message.error('请选择应用')
- }
- } else {
- this.convert = true
- this.convertType = '1'
- }
- this.getConvertList()
- },
- getPageList(appId) {
-
- getAction('/kuaishou/batch/getPageList', {
- accountId: this.accountId,
- appId: appId,
- viewComp: 7,
- }).then((res) => {
- if (res.success) {
- this.siteList = res.result
- }
- })
-
- },
- // 获取行动号召按钮
- getActionBarText(){
- this.actionBarTextList=[]
- getAction('/kuaishou/batch/getActionBarTextByType', {
- type:this.getFormData('campaignType')
- }).then((res) => {
- if (res.success) {
- this.actionBarTextList = res.result
- }
- })
- },
- // 获取创意分类创意标签白名单
- getWhiteList(){
- this.whiteList={}
- getAction('/kuaishou/batch/getWhiteList', {
- accountId: this.accountId,
- }).then((res) => {
- if (res.success) {
- // console.log(res)
- if (res.result) {
- this.whiteList=res.result
- }
- }
- })
- },
- editEchoPage(){
- this.spinning=true;
- if(this.editRecordId){
- getAction('/ctop/aiKuaishouAdvertiserStrategy/queryById',{
- id:this.editRecordId
- }).then(res=>{
- console.log(res);
-
- this.accountId=res.result.accountId;
- this.description=res.result.description
-
- // res.result.creativeTag=res.result.creativeTag?res.result.creativeTag:[]
- this.sysType=res.result.platformOs
- let fngetIsActivate=new Promise((resolve,reject)=>{
- getAction('/kuaishou/batch/getIsActivate', {
- accountId: this.accountId
- }).then(res => {
- if (res.success) {
- this.groupTypeData = res.result
- resolve()
- }
- })
- })
- let fngetWhite=new Promise((resolve,reject)=>{
- getAction('/kuaishou/batch/getIsActivate', {
- accountId: this.accountId
- }).then(res => {
- if (res.success) {
- this.groupTypeData = res.result
- resolve()
- }
- })
- })
- Promise.all([fngetIsActivate,fngetWhite]).then(r=>{
-
- // this.form.setFieldsValue({
- // ...res.result,
- // creativeTag:res.result.creativeTag?JSON.parse(res.result.creativeTag):[],
- // useAppMarket:res.result.useAppMarket==1?true:false,
- // isOpen:res.result.isOpen?res.result.isOpen:0,
- // cpaBid:res.result.cpaBid/1000,
- // appId:res.singleAppid?JSON.parse(res.result.appIdArray)[0]:JSON.parse(res.result.appIdArray)
- // })
-
- if(res.result.creativeCategory){
- // let arr=[];
- if(res.result.creativeCategory>10000){
- res.result.creativeCategory=res.result.creativeCategory?[parseInt(res.result.creativeCategory/10000),parseInt(res.result.creativeCategory/100),res.result.creativeCategory]:[];
- }else if(res.result.creativeCategory>100){
- res.result.creativeCategory=res.result.creativeCategory?[parseInt(res.result.creativeCategory/100),res.result.creativeCategory]:[];
- }else{
- res.result.creativeCategory=res.result.creativeCategory?[res.result.creativeCategory]:[];
- }
- }
-
- if(res.result.deviceBrand){
-
- this.deviceBrand=res.result.deviceBrand.indexOf(0)>-1?0:1;
- }
- setTimeout(()=>{
- this.form.setFieldsValue({
- ...res.result,
- creativeTag:res.result.creativeTag?JSON.parse(res.result.creativeTag):[],
- useAppMarket:res.result.useAppMarket==1?true:false,
- isOpen:res.result.isOpen?res.result.isOpen:0,
- cpaBid:res.result.cpaBid/1000,
- appId:res.singleAppid?JSON.parse(res.result.appIdArray)[0]:JSON.parse(res.result.appIdArray),
- deviceBrand:res.result.deviceBrand?JSON.parse(res.result.deviceBrand):[],
- })
- },0)
- if((res.result.ocpxActionType == 180 || res.result.ocpxActionType == 53) && this.groupTypeData.deepConversionTypes&&this.groupTypeData.deepConversionTypes.length > 0){
- // console.log(1)
- setTimeout(()=>{
- this.form.setFieldsValue({
- deepConversionType:res.result.deepConversionType,
- })
- if(res.result.deepConversionBid!=null){
- this.form.setFieldsValue({
- deepConversionBid:res.result.deepConversionBid/1000,
- })
- }
- },0)
- }
-
- // console.log(this.getFormData('deepConversionBid'))
- this.noAreaBreak=res.result.noAreaBreak?true:false
- this.noGenderBreak=res.result.noGenderBreak?true:false
- this.noAgeBreak=res.result.noAgeBreak?true:false
- this.appStore=res.result.appStore?JSON.parse(res.result.appStore):[]
- this.ageArr=[];
- this.ageArr=JSON.parse(JSON.stringify(ageArr))
-
- let agesRange=res.result.agesRange?JSON.parse(res.result.agesRange):[]
- if(agesRange.length>0){
- agesRange.forEach((item,index)=>{
- this.ageArr.forEach((ele)=>{
- if(ele.value==item){
- ele.checked=true;
- }
- })
- });
- }
- let sceneId=res.result.sceneId?JSON.parse(res.result.sceneId):[]
- if(sceneId.length==1&&sceneId[0]==1){
- this.adposition=1
- }else{
- this.adposition='inventoryTypes';
- this.checkedList=sceneId
- }
-
-
- if(res.result.population&&res.result.excludePopulation){
- this.form.setFieldsValue({
- customCrowd:'3'
- })
- }else if(res.result.population&&!res.result.excludePopulation){
- this.form.setFieldsValue({
- customCrowd:'1'
- })
- }else if(!res.result.population&&!res.result.excludePopulation){
- this.form.setFieldsValue({
- customCrowd:'0'
- })
- }else{
- this.form.setFieldsValue({
- customCrowd:'2'
- })
- }
-
-
-
- this.incluedSelectedRowKeys=res.result.population?JSON.parse(res.result.population):[]
- this.excludeSelectedRowKeys=res.result.excludePopulation?JSON.parse(res.result.excludePopulation):[]
-
- let region=res.result.region?JSON.parse(res.result.region):[]
- if(region.length==0){
- this.district='NONE'
- }else{
- this.district='CITY';
- this.regionList=region
- }
- if(this.getFormData('customCrowd')=='1' || this.getFormData('customCrowd')=='2'){
-
- this.tabKey=this.getFormData('customCrowd')
- }else if(this.getFormData('customCrowd')=='3'){
-
- this.tabKey='1'
- }
-
-
- this.spinning=false;
-
-
- })
- })
- }
- },
- getpopulationlist(){
- this.retargetDataAll=[]
- getAction('/kuaishou/batch/getPopulationList',{
- accountId:this.accountId
- }).then((res)=>{
- // console.log(res)
- this.loading=false;
- if(res.success){
- res.result.forEach((ele)=>{
- ele.key=ele.orientationId
- ele.id= ele.orientationId
- ele.name=ele.orientationName+"("+ele.orientationId+")"
- ele.accountName=this.accountInfo.title
- ele.accountId=this.accountId
- })
- // this.retargetData=res.data;
- // this.retargetDataAll=[...this.retargetDataAll,...res.result];
- this.retargetDataAll=[...res.result];
-
- }
- })
- },
- clickTrackUrlFocus(){
- // console.log('focus')
- this.clickTrackUrlTip=true;
- },
- clickTrackUrlBlur(){
- // console.log('blur')
- this.clickTrackUrlTip=false;
- }
- },
- created() {
- if(this.$route){
- let editRecordId=this.$route.query.id;
- if(editRecordId){
- this.$nextTick(()=>{
- this.editRecordId=editRecordId;
- this.editEchoPage()
- })
-
- }
- }
- },
- mounted() {
- this.accountHttp()
-
- // this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
- let strategyNamepart=this.campaignTypeHandle(this.getFormData('campaignType'));
-
-
- this.strategyName ='[预设]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
- this.getActionBarText()
-
-
- },
- filters: {
- getDate(value) {
- let date = new Date(value)
- let y = date.getFullYear()
- let MM = date.getMonth() + 1
- MM = MM < 10 ? '0' + MM : MM
- let d = date.getDate()
- d = d < 10 ? '0' + d : d
- return y + '-' + MM + '-' + d
- },
- platform(str) {
- var data = {
- 1: 'Android应用下载',
- 2: 'Android网页游戏',
- 3: 'iOS应用下载',
- 4: 'iOS网页游戏'
- }
- return data[str]
- },
- customCrowdHandler(val){
- let str=''
- switch (val) {
- case 1:
- str='上传人群'
- break;
- case 2:
- str='广告人群'
- break;
- case 3:
- str='主题专区'
- break;
- case 4:
- str='逻辑规则'
- break;
- case 5:
- str='人群扩展'
- break;
- case 6:
- str='平台定制'
- break;
- case 7:
- str='定制付费'
- break;
- case 8:
- str='网红粉丝类别'
- break;
- case 9:
- str='内容付费行为'
- break;
- case 10:
- str='移动应用安装'
- break;
- case 11:
- str='快手使用活跃度'
- break;
- case 12:
- str='行业分类'
- break;
- case 13:
- str='商业兴趣'
- break;
- case 14:
- str='固化标签'
- break;
- case 15:
- str='行业偏好'
- break;
- case 16:
- str='第三方标签'
- break;
- case 17:
- str='产品关键词'
- break;
-
- default:
- break;
- }
- return str
- }
- },
- }
- </script>
- <style lang="scss">
- .configLaunchInfo{
- .display-none-selset {
- display: none !important;
- }
- .ant-btn-danger {
- background-color: #ff4d4f !important;
- }
- }
- .ant-tooltip-inner,
- .ant-tooltip-arrow::before {
- background-color: #fff;
- color: #333;
- }
- .ant-tooltip-inner {
- span {
- display: block;
- }
- }
- .ant-tooltip {
- max-width: 450px;
- }
- .configLaunchInfo {
- .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;
- }
- }
- .inventoryTypes{
- .ant-checkbox-wrapper,
- .ant-checkbox-group-item {
- display: block;
- padding: 5px 15px;
- }
- .ant-checkbox-wrapper:first-child {
- padding: 0 15px 5px;
- }
- .ant-checkbox-wrapper + .ant-checkbox-wrapper {
- margin-left: 0px;
- }
- }
- }
- </style>
- <style lang="scss" scoped>
- .configLaunchInfo {
- .region{
- width: 100%;
- }
- 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);
- .ad-range2{
- width: 680px;
- padding: 5px 32px;
- .ad-range2-title{
- background: #f9f9f9;
- // line-height: 32px;
- // height: 32px;
- padding: 15px 15px;
- border: 1px solid #eaeaea;
- border-bottom: 0;
- }
- .quanxuanDirectional{
- // padding: 0 8px;
- position: absolute;
- right: 10px;
- top: 15px;
- color: #1890ff;
- }
- .title-list {
- // width: calc(100% + 48px);
- width: 100%;
- margin: 0;
- margin-bottom: 0;
- padding: 0;
- background: #fff;
- height: 363px;
- border: 1px solid #eaeaea;
- overflow: scroll;
- overflow-x: hidden;
- // margin-top: 10px;
- }
- .title-list .title-item{
- padding: 10px 30px;
- width: 100%;
- // height: 32px;
- // line-height: 32px;
- // border-bottom: 1px solid #eaeaea;
- }
- }
- .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: 120px;
- // min-width: 80px;
- .text-item {
- font-size: 14px;
- width: 100px;
- }
- }
- .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: 480px;
- 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;
- }
- }
- }
- .opt {
- text-align: right;
- }
- }
- </style>
|