1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811 |
- <template>
- <div class="configuration-modal">
- <div>
- <a-form-model
- ref="ruleForm"
- class="config-form-modal"
- :model="configForm"
- :rules="rules"
- :label-col="labelCol"
- :wrapper-col="wrapperCol"
- >
- <a-spin :spinning="spinning">
- <p class="separate-title-header">{{ modalTitle === 'add' ? '新增' : modalTitle === 'edit' ?'编辑':'复制'}}配置信息</p>
- <div class="separate-module-con">
- <a-form-model-item label="广告账户">
- <acount-search
- class="acount-search-class"
- :disabled="modalTitle === 'edit'"
- :appId.sync="configForm.accountId"
- :multiple="false"
- request="1,3"
- @select-value="handleSelectValue"
- >
- </acount-search>
- </a-form-model-item>
- <a-form-model-item label="dp链接">
- <a-radio-group
- :disabled="modalTitle === 'edit'"
- v-model="configForm.dpLinkIndexUsed"
- button-style="solid"
- @change="handleDpLinkIndexUsed"
- >
- <a-radio-button :value="0">关闭</a-radio-button>
- <a-radio-button :value="1">开启</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="configForm.dpLinkIndexUsed === 1">
- <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
- <a-input-number
- class="common-input"
- v-model="configForm.dpLinkStartIndex"
- :disabled="modalTitle === 'edit'"
- :min="1"
- placeholder="请输入"
- @change="handleDplinkStart"
- />
- <span>~</span>
- </a-form-model-item>
- <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
- <a-input-number
- class="common-input"
- v-model="configForm.dpLinkEndIndex"
- :disabled="modalTitle === 'edit'"
- :min="getEndIndex"
- placeholder="请输入"
- @change="handleDplinkEnd"
- />
- </a-form-model-item>
- </div>
- <a-form-model-item label="预算方式">
- <a-radio-group
- v-model="configForm.accountBudgetMode"
- button-style="solid"
- @change="handleAccountMode"
- >
- <a-radio-button value="1">不限预算</a-radio-button>
- <a-radio-button value="2">指定预算</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.accountBudgetMode === '2'" label="账户日预算" prop="accountBudget">
- <a-input-number
- v-model="configForm.accountBudget"
- :min="1000"
- :max="9999999.99"
- :step="0.01"
- @blur="handleAccountBudget"
- /> 元
- </a-form-model-item>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">广告组信息</p>
- <a-form-model-item label="营销链路">
- <a-radio-group v-model="configForm.marketingPurpose" button-style="solid">
- <a-radio-button value="ACKNOWLEDGE" disabled>品牌认知</a-radio-button>
- <a-radio-button value="INTENTION" disabled>用户意向</a-radio-button>
- <a-radio-button value="CONVERSION">行动转化</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="推广目标">
- <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.campaignLandingType" button-style="solid">
- <a-radio-button value="APP">应用</a-radio-button>
- <a-radio-button value="LINK" disabled>销售线索收集</a-radio-button>
- <a-radio-button value="SHOP" disabled>电商店铺推广</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="广告类型">
- <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.campaignType" button-style="solid">
- <a-radio-button value="FEED">信息流广告</a-radio-button>
- <a-radio-button value="SEARCH" disabled>搜索广告</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">基础信息</p>
- <a-form-model-item label="广告组名称" prop="campaignName">
- <a-input
- class="common-input-long"
- id="campaignName"
- v-model="configForm.campaignName"
- allow-clear
- placeholder="请输入广告组名称"
- />
- <div>
- <a-tag
- v-for="item in campaignTags"
- :key="item"
- color="#1890ff"
- @click="handleGetChangeAll(item, 'campaignName', 'campaignName')"
- >
- + {{ item }}
- </a-tag>
- </div>
- </a-form-model-item>
- <a-form-model-item label="广告计划名称" prop="adName">
- <a-input
- class="common-input-long"
- id="groupName"
- v-model="configForm.adName"
- allow-clear
- placeholder="请输入广告计划名称"
- />
- <div>
- <a-tag
- v-for="item in adNameTags"
- :key="item"
- color="#1890ff"
- @click="handleGetChangeAll(item, 'groupName', 'adName')"
- >
- + {{ item }}
- </a-tag>
- </div>
- </a-form-model-item>
- <a-form-model-item label="创建数量: 广告组数量" class="campaign-cnt-class" prop="campaignCnt">
- <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt" :disabled="configForm.dpLinkIndexUsed === 0"/>
- <a-tooltip placement="top">
- <template slot="title">
- <span>输入的数量为每天所创建的广告组数量</span>
- <span>以及每个广告组创建的广告计划数量</span>
- </template>
- <a-icon class="form-itrm-icon" type="question-circle"/>
- </a-tooltip>
- <div v-if="campaignStatus" style="width: 500px;color: #f00;">单账号每天创建计划上限500个</div>
- </a-form-model-item>
- <a-form-model-item label="广告计划数量" class="campaign-ad-class" prop="campaignAdCnt">
- <a-input-number v-model="configForm.campaignAdCnt" :min="1" @change="handleCampaignAdCnt"/>
- </a-form-model-item>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">投放内容</p>
- <a-form-model-item label="投放目标">
- <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.launchTarget" button-style="solid">
- <a-radio-button value="OCPM">转化量</a-radio-button>
- <a-radio-button value="CPC" disabled>点击量</a-radio-button>
- <a-radio-button value="CPM" disabled>展示量</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="下载链接" prop="adDownloadUrl">
- <a-input
- class="common-input-long"
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adDownloadUrl"
- placeholder="请输入下载链接"
- allow-clear
- @change="handleDownloadLink"
- />
- </a-form-model-item>
- <a-form-model-item label="应用包名" prop="adPackage">
- <a-input
- class="common-input-long"
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adPackage"
- placeholder="请输入应用包名"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="下载方式">
- <a-radio-group
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adDownloadType"
- button-style="solid"
- @change="handleAdDownLoadType"
- >
- <a-radio-button value="DOWNLOAD_URL">下载链接</a-radio-button>
- <a-radio-button value="EXTERNAL_URL" :disabled="platformLoadingType == 'APP_IOS'">落地页</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="configForm.adDownloadType === 'EXTERNAL_URL'">
- <a-form-model-item label="落地页链接" prop="adExternalUrl" key="arr">
- <a-input
- class="common-input-long"
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adExternalUrl"
- placeholder="请输入落地页链接"
- allow-clear
- />
- </a-form-model-item>
- </div>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&platformLoadingType != 'APP_IOS'" label="优先应用商店下载">
- <a-radio-group
- v-model="configForm.adDownloadMode"
- button-style="solid"
- >
- <a-radio-button value="DEFAULT">不启用</a-radio-button>
- <a-radio-button value="APP_STORE_DELIVERY">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="直达链接内容">
- <a-input
- class="common-input-long"
- v-model="configForm.adOpenUrl"
- placeholder="请输入直达链接内容"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="platformLoadingType === 'APP_ANDROID' && configForm.adDownloadType === 'DOWNLOAD_URL'" label="应用下载详情页" prop="creativeWebUrl">
- <a-input
- class="common-input-long"
- v-model="configForm.creativeWebUrl"
- placeholder="请输入应用下载详情页"
- :disabled="modalTitle === 'edit'"
- allow-clear
- @change="handleCreativeWebUrl"
- />
- <span style="margin-left: 10px;"><a :disabled="modalTitle === 'edit'" @click="handleHaveWebUrl">使用已有</a></span>
- </a-form-model-item>
- <div v-if="platformLoadingType === 'APP_ANDROID' && configForm.adDownloadType === 'DOWNLOAD_URL'" class="adver-position-radio">
- <div class="create-web-url-class">
- <div class="web-url-img">
- <img v-if="landingPageShowData.thumbnail" :src="landingPageShowData.thumbnail"/>
- <img v-else src="@/assets/noImg.png"/>
- </div>
- <div class="web-url-content">
- <div class="url-content-name"><a>{{ landingPageShowData.name }}</a></div>
- <div class="url-content-id">ID:{{ landingPageShowData.siteId || '暂无' }}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">优化目标</p>
- <a-form-model-item label="转化跟踪方式" :prop="configForm.launchTarget === 'OCPM' ? 'adConvertType' : ''">
- <a-select
- class="common-input-long"
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adConvertType"
- placeholder="请选择"
- @change="handleConvertTypeChange"
- >
- <a-select-option value="AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD">应用下载API</a-select-option>
- <a-select-option value="AD_CONVERT_SOURCE_TYPE_SDK">应用下载SDK</a-select-option>
- <a-select-option value="AD_CONVERT_SOURCE_TYPE_OPEN_URL">应用直达API(应用直达链接)</a-select-option>
- <a-select-option value="AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD">普通应用下载</a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="优化目标" :prop="configForm.launchTarget === 'OCPM' ? 'adConvertId' : ''">
- <a-select
- class="common-input-long"
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adConvertId"
- placeholder="请选择"
- @change="handleConvertChange"
- >
- <a-select-option
- v-for="(item, index) in optimizationOption"
- :key="index"
- :value="item.convert_id"
- >
- {{ item.external_name }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">设置投放位置</p>
- <a-form-model-item label="广告位置">
- <a-radio-group
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adverPosition"
- button-style="solid"
- @change="handleAdverPosition"
- >
- <a-radio-button value="a">系统优选广告位</a-radio-button>
- <a-radio-button value="b">首选媒体</a-radio-button>
- <!-- <a-radio-button value="c">按场景指定位置</a-radio-button> -->
- <!-- <a-radio-button value="d">通投智选</a-radio-button> -->
- </a-radio-group>
- </a-form-model-item>
- <div class="adver-position-radio">
- <p v-if="configForm.adverPosition === 'a'">
- 系统将根据您设置的定向,选择预估效果最好的广告位进行投放,并触达尽可能多的目标用户
- </p>
- <div v-if="configForm.adverPosition === 'c'" class="position-radio-change">
- <p>位置选择</p>
- <a-radio-group v-model="configForm.radioChangeValue">
- <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 v-if="configForm.adverPosition === 'b'" class="position-radio-change">
- <p>位置选择</p>
- <a-checkbox-group v-model="configForm.checkboxChangeValue" @change="NewCheckboxChangeValue">
- <a-checkbox :style="radioStyle" value="INVENTORY_FEED">今日头条</a-checkbox>
- <a-checkbox :style="radioStyle" value="INVENTORY_VIDEO_FEED">西瓜视频</a-checkbox>
- <a-checkbox :style="radioStyle" value="INVENTORY_HOTSOON_FEED">抖音火山版</a-checkbox>
- <a-checkbox :style="radioStyle" value="INVENTORY_AWEME_FEED">抖音短视频</a-checkbox>
- <a-checkbox :style="radioStyle" value="INVENTORY_UNION_SLOT">穿山甲</a-checkbox>
- <a-checkbox :style="radioStyle" value="UNION_BOUTIQUE_GAME">ohayoo精品游戏</a-checkbox>
- <a-checkbox :style="radioStyle" value="INVENTORY_TOMATO_NOVEL">番茄小说</a-checkbox>
- </a-checkbox-group>
- </div>
- </div>
- <a-form-model-item v-if="
- (configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT')
- " label="投放形式">
- <a-radio-group
- v-model="configForm.adUnionVideoType"
- button-style="solid"
- @change="handleAdUnionVideoType"
- >
- <a-radio-button value="REWARDED_VIDEO">
- 激励视频
- <a-tooltip placement="top">
- <template slot="title">
- <span>特定场景下用户通过观看视频广告以换取游戏/应用内虚拟奖励的广告</span>
- </template>
- <a-icon type="question-circle"/>
- </a-tooltip>
- </a-radio-button>
- <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
- <a-radio-button value="SPLASH_VIDEO">开屏</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- </div>
- <div class="separate-module-con">
- <a-tabs v-model="configForm.adDirectionalFlag" @change="changeAdDirection">
- <a-tab-pane key="add" tab="新建定向">
- <p class="rock-title">用户定向</p>
- <a-form-model-item label="地域">
- <a-radio-group
- v-model="configForm.adDistrict"
- button-style="solid"
- @change="handleAdDistrict"
- >
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="CITY">按省市</a-radio-button>
- <a-radio-button value="COUNTY" disabled>按区县</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="configForm.adDistrict === 'CITY'" class="adver-position-radio selected-city-arr">
- <link-multi-select
- title="省份"
- :listArr="listArr"
- :maxLayers="2"
- :listUrl="regionCityListUrl"
- @getSelectedArr="getSelectedCityArr"
- @checkedShowList="handleCheckedShowList"
- >
- </link-multi-select>
- <a-radio-group class="city-arr-radio-group" v-model="configForm.adLocationType">
- <a-radio value="HOME">居住在该地区的用户</a-radio>
- <a-radio value="TRAVEL"> 到该地区旅行的用户</a-radio>
- <a-radio value="ALL">该地区内的所有用户</a-radio>
- <a-radio value="CURRENT">正在该地区的用户</a-radio>
- </a-radio-group>
- </div>
- <a-form-model-item label="性别">
- <a-radio-group v-model="configForm.adGender" button-style="solid">
- <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-model-item>
- <a-form-model-item label="年龄">
- <radio-check v-model="configForm.adSelectAge" :options="ageArr" @change="getAgeSelect"></radio-check>
- </a-form-model-item>
- <a-form-model-item label="行为兴趣">
- <a-radio-group
- v-model="configForm.adInterestActionMode"
- button-style="solid"
- >
- <a-radio-button value="UNLIMITED">不限</a-radio-button>
- <a-radio-button value="RECOMMEND">
- 系统推荐
- <a-tooltip placement="top">
- <template slot="title">
- <span>若与自定义人群包同时使用,选择定向人群时系统推荐定向不生效</span>
- </template>
- <a-icon type="question-circle" />
- </a-tooltip>
- </a-radio-button>
- <a-radio-button value="CUSTOM" disabled>自定义</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="自定义人群">
- <a-radio-group
- v-model="configForm.customPerson"
- button-style="solid"
- @change="handleCustomPerson"
- >
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="a">自定义人群</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
- <a-radio-group
- v-model="configForm.adRetargetingTagsType"
- button-style="solid"
- @change="handleDirectionalLogic"
- >
- <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-model-item>
- <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
- <div style="width: 60%;">
- <directional-logic
- ref="direct"
- packtype="directional"
- multitype="alone"
- :defaultlist="directionalData"
- :valueids="configForm.adRetargetingTagsType"
- :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"
- @clearlist="handleClearlist"
- @clear-table-alone="handleClearTableAlone"
- >
- </directional-logic>
- </div>
- </div>
- <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
- <div style="width: 60%;">
- <directional-logic
- ref="exclude"
- packtype="exclude"
- multitype="alone"
- :defaultlist="directionalData"
- :valueids="configForm.adRetargetingTagsType"
- :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"
- @clearlist="handleClearlist"
- @clear-table-alone="handleClearTableLogic"
- >
- </directional-logic>
- </div>
- </div>
- <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
- <div style="width: 60%;">
- <directional-logic
- ref="twoway"
- packtype="twoway"
- multitype="all"
- :defaultlist="directionalData"
- :valueids="configForm.adRetargetingTagsType"
- :updatelistinclude="configForm.updateGetingInclude"
- :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent"
- @selection-exclude-event="handleExcludeEvent"
- @clearlist="handleClearlist"
- @clear-table-direct="handleClearTableAlone"
- @clear-table-exclude="handleClearTableLogic"
- >
- </directional-logic>
- </div>
- </div>
- <a-form-model-item label="媒体定向">
- <a-radio-group v-model="configForm.adSuperiorPopularityType" button-style="solid">
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="GAME" disabled>游戏优质媒体</a-radio-button>
- <a-radio-button value="b" disabled>自定义</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="平台">
- <!-- <check-more-plat
- v-model="configForm.updateAdPlatform"
- :options="adPlatformOption"
- @change="handlePlateSelect"
- >
- </check-more-plat> -->
- <a-radio-group v-model="configForm.adPlatform" button-style="solid">
- <a-radio-button value="NONE" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">不限</a-radio-button>
- <a-radio-button value="IOS" :disabled="platformLoadingType === 'APP_ANDROID'">IOS</a-radio-button>
- <a-radio-button value="ANDROID" :disabled="platformLoadingType === 'APP_IOS'">Andriod</a-radio-button>
- <a-radio-button value="PC" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">PC</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="设备类型">
- <radio-check
- v-model="configForm.adDeviceSelectType"
- :options="deviceTypeList"
- @change="getAgeSelect"
- >
- </radio-check>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadUrl&&configForm.adPlatform == 'ANDROID'" label="安卓版本">
- <a-radio-group v-model="configForm.adAndroidVersion" button-style="solid" @change="handleAndroidVersion">
- <a-radio-button value="NONE">不限</a-radio-button>
- <a-radio-button value="a">自定义</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div class="adver-position-radio">
- <div v-if="configForm.adDownloadUrl && configForm.adAndroidVersion === 'a'" class="position-radio-change">
- <p>安卓版本</p>
- <a-radio-group v-model="configForm.androidChangeValue">
- <a-radio :style="radioStyle" value="9.0">Andriod 9.0及以上</a-radio>
- <a-radio :style="radioStyle" value="8.1">Andriod 8.1及以上</a-radio>
- <a-radio :style="radioStyle" value="8.0">Andriod 8.0及以上</a-radio>
- <a-radio :style="radioStyle" value="7.1">Andriod 7.1及以上</a-radio>
- <a-radio :style="radioStyle" value="7.0">Andriod 7.0及以上</a-radio>
- <a-radio :style="radioStyle" value="6.0">Andriod 6.0及以上</a-radio>
- <a-radio :style="radioStyle" value="5.1">Andriod 5.1及以上</a-radio>
- </a-radio-group>
- </div>
- </div>
- <a-form-model-item label="网络">
- <radio-check v-model="configForm.adSelectAc" :options="adAcList" @change="getAgeSelect"></radio-check>
- </a-form-model-item>
- <a-form-model-item label="已安装用户">
- <a-radio-group v-model="configForm.adHideIfExists" button-style="solid">
- <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-group>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adConvertType" label="过滤已转化用户">
- <a-radio-group v-model="configForm.adHideIfConverted" button-style="solid" @change="handleAdhideConver">
- <a-radio-button
- v-for="item in adHideIfConvertedDataOption"
- :key="item.id"
- :value="item.id"
- >
- {{ item.name }}
- </a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adHideIfConverted === 'CUSTOMER' || configForm.adHideIfConverted === 'APP'" label="过滤时间">
- <a-radio-group v-model="configForm.adConvertedTimeDuration" button-style="solid">
- <a-radio-button value="ONE_MONTH">1个月</a-radio-button>
- <a-radio-button value="THREE_MONTH">3个月</a-radio-button>
- <a-radio-button value="SIX_MONTH">6个月</a-radio-button>
- <a-radio-button value="TWELVE_MONTH">12个月</a-radio-button>
- </a-radio-group>
- <a-tooltip placement="top">
- <template slot="title">
- <span>对已转化过的用户避免再次投放的时间</span>
- </template>
- <a-icon class="form-itrm-icon" style="left: -90px;" type="question-circle"/>
- </a-tooltip>
- </a-form-model-item>
- <a-form-model-item label="智能放量">
- <a-radio-group
- :disabled="!adAutoExtendList.length"
- v-model="configForm.adAutoExtendEnabled"
- button-style="solid"
- @change="handleAdAutoExtend"
- >
- <a-radio-button value="0">不开启</a-radio-button>
- <a-radio-button value="1">开启</a-radio-button>
- </a-radio-group>
- <a-tooltip placement="top">
- <template slot="title">
- <span>智能放量可以帮您逐步探索已选定向人群之外的目标人群,提升跑量。已选择定向建议放开</span>
- </template>
- <a-icon class="form-itrm-icon" style="left: -90px;" type="question-circle"/>
- </a-tooltip>
- </a-form-model-item>
- <div v-if="configForm.adAutoExtendEnabled === '1'" class="adver-position-radio" style="width: 70%;">
- <auto-select
- :defaultlist="adAutoExtendList"
- :editdata="AutoExtendEditSelect"
- @select-finally-result="handleSelectTxtend"
- >
- </auto-select>
- </div>
- </a-tab-pane>
- <a-tab-pane key="choice" tab="选择定向包">
- <a-form-model-item class="select-orientation-class" label="选择已有定向包" :prop="configForm.adDirectionalFlag === 'choice' ? 'adAudiencePackageId' : ''">
- <a-select
- class="common-input-long"
- style="width: 320px;"
- v-model="configForm.adAudiencePackageId"
- allow-clear
- placeholder="请选择已有定向包名称"
- :disabled="selectOrientPlaceholder !== 'able'"
- @change="handleSelectiveOrientation"
- >
- <a-select-option
- v-for="(item, index) in selectiveList"
- :key="index"
- :value="item.audience_package_id"
- >
- <div class="orient-list">
- <span class="orient-option-left" style="display: inline-block;width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span>
- <span class="orient-option-right" style="display: inline-block;width: 150px;text-align:right;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.changeName }}</span>
- </div>
- </a-select-option>
- </a-select>
- <span style="margin-left: 20px;">
- <a-button :disabled="selectOrientPlaceholder !== 'able'" type="primary" @click="handleAsyncPackage">同步定向包</a-button>
- </span>
- <a-tooltip placement="top">
- <template slot="title">
- <span>已有定向包只展示当前推广目的和投放范围下,定向功能升级后仍可用的定向包</span>
- </template>
- <a-icon class="form-itrm-icon orientation-icon" type="question-circle"/>
- </a-tooltip>
- </a-form-model-item>
- <span v-if="selectOrientPlaceholder !== 'able'" style="color: #f00; margin-left: 198px;">{{ selectOrientPlaceholder }}</span>
- <div class="select-orientation-content">
- <p class="orientation-header-title">已选定向信息</p>
- <div v-if="packageMessageDetail.length" class="orientation-content-substance">
- <div class="content-substance-singal">
- <span class="singal-spn">定向人群包:</span>
- <span class="singal-content">{{ packageMessageDetail[0].description }}</span>
- </div>
- <div class="content-substance-singal">
- <span class="singal-spn">地域:</span>
- <span class="singal-content">{{ packageMessageDetail[0].replaceCitys }}</span>
- </div>
- <div class="content-substance-singal">
- <span class="singal-spn">性别:</span>
- <span class="singal-content">{{ packageMessageDetail[0].replaceSex }}</span>
- </div>
- <div class="content-substance-singal">
- <span class="singal-spn">年龄:</span>
- <span class="singal-content">{{ packageMessageDetail[0].replaceAge }}</span>
- </div>
- <div class="content-substance-singal">
- <span class="singal-spn">平台:</span>
- <span class="singal-content">{{ packageMessageDetail[0].replacePlate }}</span>
- </div>
- <div class="content-substance-singal">
- <span class="singal-spn">智能放量:</span>
- <span class="singal-content">{{ packageMessageDetail[0].replaceEnabled }}</span>
- </div>
- </div>
- <div v-else class="orientation-content-msg">
- <div class="icon"><a-icon type="container"/></div>
- <div>请在上方选择一个已有定向包</div>
- </div>
- </div>
- </a-tab-pane>
- </a-tabs>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">预算与出价</p>
- <a-form-model-item label="投放场景">
- <a-radio-group v-model="configForm.adSmartBidType" button-style="solid">
- <a-radio-button value="SMART_BID_CUSTOM" :disabled="modalTitle === 'edit'">常规投放</a-radio-button>
- <a-radio-button value="SMART_BID_CONSERVATIVE" disabled>放量投放</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="预算">
- <a-input-group compact>
- <a-select
- :disabled="modalTitle === 'edit'"
- v-model="configForm.adBudgetMode"
- @change="handleBudgetMode"
- >
- <a-select-option value="BUDGET_MODE_DAY">日预算</a-select-option>
- <a-select-option value="BUDGET_MODE_TOTAL">总预算</a-select-option>
- </a-select>
- <a-input-number
- class="common-input"
- v-model="configForm.adBudget"
- :min="adBudgetNum"
- :max="9999999.00"
- :step="0.01"
- @blur="handleAdBudgetBlur"
- />
- </a-input-group>
- </a-form-model-item>
- <a-form-model-item label="投放时间">
- <a-radio-group
- :disabled="modalTitle === 'edit' || configForm.adBudgetMode === 'BUDGET_MODE_TOTAL'"
- v-model="configForm.adScheduleType"
- button-style="solid"
- @change="handleAdScheduleType"
- >
- <a-radio-button value="SCHEDULE_FROM_NOW">从今天起长期投放</a-radio-button>
- <a-radio-button value="SCHEDULE_START_END">设置开始和结束日期</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div class="adver-position-radio">
- <div v-if="configForm.adScheduleType === 'SCHEDULE_START_END'" class="position-radio-change">
- <a-range-picker
- v-model="configForm.launchDateRange"
- :disabled="modalTitle === 'edit'"
- format="YYYY-MM-DD"
- @change="handleLaunchData"
- />
- </div>
- </div>
- <a-form-model-item label="投放时段">
- <a-radio-group v-model="configForm.launchTimeInterval" button-style="solid" @change="handleLaunchTimeInterval">
- <a-radio-button value="buxian">不限</a-radio-button>
- <a-radio-button value="a">指定时间段</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div class="adver-position-radio">
- <div v-if="configForm.launchTimeInterval === 'a'" class="position-radio-change">
- <selectCheckAll
- style="width:100%"
- :scheduleTime.sync="configForm.scheduleTimeData"
- ref="selectCheck"
- />
- </div>
- </div>
- <a-form-model-item label="付费方式">
- <a-radio-group v-model="configForm.adPricing" button-style="solid">
- <a-radio-button value="PRICING_OCPM" :disabled="modalTitle === 'edit'">按展示付费(oCPM)</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="出价方式">
- <a-radio-group v-model="configForm.adBidCreateType" button-style="solid" @change="handleBiddingMethod">
- <a-radio-button value="FIX">固定出价</a-radio-button>
- <a-radio-button value="RAND">随机出价</a-radio-button>
- <a-radio-button value="STEP">阶梯出价</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adBidCreateType === 'FIX'" label="目标转化出价" :prop="configForm.launchTarget === 'OCPM' ? 'adCpaBid' : ''">
- <a-input-number
- class="common-input"
- v-model="configForm.adCpaBid"
- :min="0.1"
- :step="0.01"
- @blur="handleAdCpaBidBlur"
- /> 元
- <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;">{{ adCpaBidBlurTxt }}</div>
- </a-form-model-item>
- <div v-if="configForm.adBidCreateType === 'RAND'">
- <a-form-model-item label="目标转化出价"
- class="dp-link-start" prop="adMinBid">
- <a-input-number
- class="common-input"
- v-model="configForm.adMinBid"
- :min="0.1"
- :max="10000"
- :step="0.01"
- placeholder="请输入"
- @blur="handleAdMinBidBlur"
- />
- <span>~</span>
- </a-form-model-item>
- <a-form-model-item class="dp-link-end" prop="adMaxBid">
- <a-input-number
- class="common-input"
- v-model="configForm.adMaxBid"
- :min="0.1"
- :max="10000"
- :step="0.01"
- placeholder="请输入"
- @blur="handleAdMaxBidBlur"
- /> 元
- </a-form-model-item>
- <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;margin-left: 140px;">{{ adCpaBidBlurTxt }}</div>
- </div>
- <div v-if="configForm.adBidCreateType === 'STEP'">
- <a-form-model-item label="目标转化出价" class="dp-link-start" prop="adMinBid">
- <a-input-number
- class="common-input"
- v-model="configForm.adMinBid"
- :min="0.1"
- :max="10000"
- :step="0.01"
- placeholder="请输入"
- @blur="handleAdMinBidBlur"
- />
- <span>~</span>
- </a-form-model-item>
- <a-form-model-item class="dp-link-end" prop="adMaxBid">
- <a-input-number
- class="common-input"
- v-model="configForm.adMaxBid"
- :min="0.1"
- :max="10000"
- :step="0.01"
- placeholder="请输入"
- @blur="handleAdMaxBidBlur"
- /> 元
- </a-form-model-item>
- <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;margin-left: 140px">{{ adCpaBidBlurTxt }}</div>
- <a-form-model-item label="浮动间隔" prop="adStepBid">
- <a-input-number
- class="common-input"
- v-model="configForm.adStepBid"
- :min="0"
- :step="0.01"
- placeholder="请输入"
- @blur="handleFloatingInterval"
- />
- <span>元</span>
- </a-form-model-item>
- </div>
- <div v-if="deepExternalShow">
- <a-form-model-item label="深度优化方式" prop="deepExternal">
- <a-radio-group @change="adDeepBidTypeChange" v-model="configForm.adDeepBidType" button-style="solid">
- <a-radio-button value="DEEP_BID_MIN" >自定义双出价</a-radio-button>
- <a-radio-button value="AUTO_MIN_SECOND_STAGE" >自动优化</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item v-if="adDeepCpabidShow" label="深度转化出价" prop="adDeepCpabid">
- <a-input-number
- class="common-input"
- v-model="configForm.adDeepCpabid"
- :min="0.1"
- :max="10000"
- :step="0.01"
- placeholder="请输入"
- /> 元
-
- </a-form-model-item>
- </div>
- </div>
- <!-- <div class="separate-module-con">
- <p class="rock-title">第三方检测链接</p>
- <a-form-model-item label="点击监测">
- <a-input
- class="common-input-long"
- placeholder="请输入链接地址"
- v-model="configForm.creativeActionTrackUrl"
- allow-clear
- />
- </a-form-model-item>
- </div> -->
- <div class="separate-module-con">
- <p class="rock-title">创意信息</p>
- <a-form-model-item v-if="!(configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_FEED')&&!configForm.adUnionVideoType" label="使用抖音号投放">
- <a-radio-group v-model="configForm.creativeIesCoreUserId" button-style="solid">
- <a-radio-button value="1">不使用</a-radio-button>
- <a-radio-button value="2" disabled>使用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="创意方式">
- <a-radio-group v-model="configForm.creativeMaterialMode" button-style="solid">
- <!-- :disabled="modalTitle === 'edit' || originalityStatus" -->
- <a-radio-button value="STATIC_ASSEMBLE" :disabled="modalTitle === 'edit'">程序化创意</a-radio-button>
- <a-radio-button value="NONE" disabled>自定义创意</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="configForm.adUnionVideoType === 'REWARDED_VIDEO'">
- <a-form-model-item label="创意内容">
- <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="行动号召" prop="creativeActionText" key="REWARDED_VIDEO">
- <a-select
- class="common-input-long"
- v-model="configForm.creativeActionText"
- >
- <a-select-option
- v-for="(item, index) in creativeOptions"
- :key="index + 1"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="来源" prop="creativeSource">
- <a-input
- class="common-input-long"
- placeholder="请输入来源"
- v-model="configForm.creativeSource"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName24">
- <a-input
- class="common-input-long"
- placeholder="请输入应用名"
- v-model="configForm.creativeAppName"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="搭配试玩">
- <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
- <a-radio-button value="a">不启用</a-radio-button>
- <a-radio-button value="b" disabled>启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="自动生成视频素材">
- <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="广告语数量">
- <a-input-number
- :max="10"
- :min="1"
- v-model="configForm.copywritingNumber"
- :precision="0"
- style="width: 150px"
- >
- </a-input-number>
- </a-form-model-item>
- <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
- <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item> -->
- </div>
- <div v-else-if="configForm.adUnionVideoType === 'ORIGINAL_VIDEO'||(configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_TOMATO_NOVEL')">
- <a-form-model-item label="创意内容">
- <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="行动号召" prop="creativeActionText" key="ORIGINAL_VIDEO">
- <a-select
- class="common-input-long"
- v-model="configForm.creativeActionText"
- >
- <a-select-option
- v-for="(item, index) in creativeOptions"
- :key="index + 1"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="来源" prop="creativeSource">
- <a-input
- class="common-input-long"
- placeholder="请输入来源"
- v-model="configForm.creativeSource"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName23">
- <a-input
- class="common-input-long"
- placeholder="请输入应用名"
- v-model="configForm.creativeAppName"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="自动生成视频素材">
- <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="广告语数量">
- <a-input-number
- :max="10"
- :min="1"
- v-model="configForm.copywritingNumber"
- :precision="0"
- style="width: 150px"
- >
- </a-input-number>
- </a-form-model-item>
- <a-form-model-item label="搭配试玩">
- <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
- <a-radio-button value="a">不启用</a-radio-button>
- <a-radio-button value="b" disabled>普通试玩</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
- <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item> -->
- </div>
- <div v-else-if="configForm.adUnionVideoType === 'SPLASH_VIDEO'">
- <a-form-model-item label="创意内容">
- <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
- <a-radio-button value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏图片</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO">
- <a-select
- class="common-input-long"
- v-model="configForm.creativeActionText"
- >
- <a-select-option
- v-for="(item, index) in creativeOptions"
- :key="index + 1"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="来源" prop="creativeSource">
- <a-input
- class="common-input-long"
- placeholder="请输入来源"
- v-model="configForm.creativeSource"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName25">
- <a-input
- class="common-input-long"
- placeholder="请输入应用名"
- v-model="configForm.creativeAppName"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="自动生成视频素材">
- <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <!-- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="最优创意衍生计划">
- <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item> -->
- <a-form-model-item label="广告语数量">
- <a-input-number
- :max="10"
- :min="1"
- v-model="configForm.copywritingNumber"
- :precision="0"
- style="width: 150px"
- >
- </a-input-number>
- </a-form-model-item>
- <a-form-model-item label="搭配试玩">
- <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
- <a-radio-button value="a">不启用</a-radio-button>
- <a-radio-button value="b" disabled>普通试玩</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="创意展现">
- <a-radio-group v-model="configForm.creativeDisplayMode" button-style="solid">
- <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
- <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_CTR'" class="adver-position-radio">
- 选择优选模式,系统会自动对效果好的创意进行展示量倾斜,创意效果越好展示量越高
- </div>
- <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_RANDOM'" class="adver-position-radio">
- 使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
- </div>
- </div>
- <div v-else-if="configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_AWEME_FEED'">
- <a-form-model-item label="创意内容">
- <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO" :disabled="pictureStatus">横版视频</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="创意组件" prop="componentId" key="componentIdkey"
- v-if="configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE'&&configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE_VERTICAL'&&configForm.adverPosition != 'a'">
- <a-input
- class="common-input-long"
- placeholder="请输入创意组件"
- v-model="configForm.componentId"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO_ONE">
- <a-select
- class="common-input-long"
- v-model="configForm.creativeActionText"
- >
- <a-select-option
- v-for="(item, index) in creativeOptions"
- :key="index + 1"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="来源" :prop="getSource">
- <a-input
- class="common-input-long"
- placeholder="请输入来源"
- v-model="configForm.creativeSource"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName26">
- <a-input
- class="common-input-long"
- placeholder="请输入应用名"
- v-model="configForm.creativeAppName"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL' && platformLoadingType === 'APP_ANDROID'" label="副标题">
- <a-input
- class="common-input-long"
- placeholder="请输入副标题"
- v-model="configForm.creativeSubTitle"
- allow-clear
- @blur="handleCreativeSubTitleBlur"
- />
- </a-form-model-item>
- <div v-if="subTitleMsgStatus" style="width: 500px;color: #f00;margin-left: 140px">{{ subTitleMsg }}</div>
- <a-form-model-item label="自动生成视频素材">
- <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
- <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item> -->
- <a-form-model-item label="广告评论">
- <a-radio-group v-model="configForm.creativeIsCommentDisable" button-style="solid">
- <a-radio-button :value="1">关闭</a-radio-button>
- <a-radio-button :value="0">开启</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="广告语数量">
- <a-input-number
- :max="10"
- :min="1"
- v-model="configForm.copywritingNumber"
- :precision="0"
- style="width: 150px"
- >
- </a-input-number>
- </a-form-model-item>
- <a-form-model-item label="客户端下载视频">
- <a-radio-group v-model="configForm.creativeDownloadStatus" button-style="solid">
- <a-radio-button :value="1">关闭</a-radio-button>
- <a-radio-button :value="0">开启</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- </div>
- <div v-else>
- <a-form-model-item label="创意内容">
- <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO" :disabled="pictureStatus">横版视频</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE" :disabled="pictureStatus">大图横图</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
- <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL" :disabled="pictureStatus">大图竖图</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <!-- <a-form-model-item label="创意内容" v-else="creativeImageShow">
- <radio-check v-model="configForm.creativeImageMode" :options="creativeImageModeArr"></radio-check>
- </a-form-model-item> -->
- <a-form-model-item label="创意组件" prop="componentId" key="componentIdkey"
- v-if="configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE'&&configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE_VERTICAL'&&configForm.adverPosition != 'a'">
- <a-input
- class="common-input-long"
- placeholder="请输入创意组件"
- v-model="configForm.componentId"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO_ONE">
- <a-select
- class="common-input-long"
- v-model="configForm.creativeActionText"
- >
- <a-select-option
- v-for="(item, index) in creativeOptions"
- :key="index + 1"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="来源" :prop="getSource">
- <a-input
- class="common-input-long"
- placeholder="请输入来源"
- v-model="configForm.creativeSource"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName26">
- <a-input
- class="common-input-long"
- placeholder="请输入应用名"
- v-model="configForm.creativeAppName"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL' && platformLoadingType === 'APP_ANDROID'" label="副标题">
- <a-input
- class="common-input-long"
- placeholder="请输入副标题"
- v-model="configForm.creativeSubTitle"
- allow-clear
- @blur="handleCreativeSubTitleBlur"
- />
- </a-form-model-item>
- <div v-if="subTitleMsgStatus" style="width: 500px;color: #f00;margin-left: 140px">{{ subTitleMsg }}</div>
- <a-form-model-item label="自动生成视频素材">
- <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
- <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
- <a-radio-button :value="0">不启用</a-radio-button>
- <a-radio-button :value="1">启用</a-radio-button>
- </a-radio-group>
- </a-form-model-item> -->
- <a-form-model-item label="广告评论">
- <a-radio-group v-model="configForm.creativeIsCommentDisable" button-style="solid">
- <a-radio-button :value="1">关闭</a-radio-button>
- <a-radio-button :value="0">开启</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="广告语数量">
- <a-input-number
- :max="10"
- :min="1"
- v-model="configForm.copywritingNumber"
- :precision="0"
- style="width: 150px"
- >
- </a-input-number>
- </a-form-model-item>
- <a-form-model-item label="客户端下载视频">
- <a-radio-group v-model="configForm.creativeDownloadStatus" button-style="solid">
- <a-radio-button :value="1">关闭</a-radio-button>
- <a-radio-button :value="0">开启</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- </div>
- </div>
- <div class="separate-module-con">
- <p class="rock-title">创意分类</p>
- <a-form-model-item label="创意分类">
- <a-cascader
- v-model="configForm.creativeThirdIndustryIds"
- class="common-input-long"
- :options="createOptions"
- :fieldNames="fieldNames"
- placeholder="请选择创意分类"
- />
- </a-form-model-item>
- <a-form-model-item label="创意标签">
- <a-select
- v-model="configForm.creativeLabel"
- :token-separators="[',', ' ', ',']"
- mode="tags"
- style="width: 320px"
- placeholder="按回车生成标签"
- dropdownClassName="display-none-selset"
- @change="handleEnterChang"
- >
- </a-select>
- </a-form-model-item>
- <div class="adver-position-radio">
- <div class="creative-label-content">
- <p>已选:{{ creativeTag.length || 0 }}</p>
- <div class="label-content-select-tag">
- <a-tag
- v-for="item in creativeTag"
- :key="item"
- :closable="true"
- class="tag-select-class"
- @close="handleTagsClose(item)"
- >
- {{ item }}
- </a-tag>
- </div>
- </div>
- </div>
- </div>
- <div class="separate-module-con btn-Unique-con">
- <a-button class="sure-btn" type="primary" :loading="sureLoading" @click="handleRelaxSure">确定</a-button>
- <a-button class="cancel-btn" @click="handleRelaxCancel">取消</a-button>
- </div>
- </a-spin>
- </a-form-model>
- </div>
- <a-modal
- v-if="isWebUrl"
- title="使用落地页"
- :visible="isWebUrl"
- dialog-class="web-url-modal"
- :footer="false"
- @cancel="handleCancelAll"
- >
- <div class="mater-viedo-content">
- <a-row class="viedo-serach-class" :gutter="24">
- <a-col :span="9">
- <a-form-item label="落地页名称" :labelCol="modalCol" :wrapperCol="modalWrapper">
- <a-input v-model="weburlModel" placeholder="请输入落地页名称关键字"/>
- </a-form-item>
- </a-col>
- <a-col :span="8">
- <a-button type="primary" style="position: relative;top: 4px;" @click="handleWebUrlSearch">搜索</a-button>
- <a-button type="primary" style="position: relative;top: 4px;margin-left: 15px;" @click="handleWebUrlUpdate">重置</a-button>
- </a-col>
- </a-row>
- <div class="viedo-content-class">
- <div v-if="viedoDefaultList.length" class="viedo-content-group">
- <li
- class="content-modal-li"
- v-for="(item, index) in viedoDefaultList"
- :key="index"
- @click="handleViedoListClick(item)"
- >
- <img v-if="item.thumbnail" :src="item.thumbnail"/>
- <img v-else src="@/assets/noImg.png"/>
- <div class="checkbox-select-show"><a>{{ item.name }}</a></div>
- <div class="checkbox-select-time">ID:{{ item.siteId }}</div>
- </li>
- </div>
- <div v-else class="no-data-group">
- 暂无数据
- </div>
- </div>
- </div>
- </a-modal>
- </div>
- </template>
- <script>
- import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
- import SelectCheckAll from '../../BatchCreate/toutiaoTime';
- import radioCheck from '@/components/formComponents/checkBoxGroup';
- import linkMultiSelect from '@/views/modules/BatchCreate/linkMultiSelect';
- import DirectionalLogic from './directional-logic/directional-logic';
- import AutoSelect from './tree-select/tree-select';
- import CheckMorePlat from './check-more-plat/check-more-plat';
- import moment from 'moment';
- import BMF from 'browser-md5-file';
- import {urlAcount} from '../account-config-server.js';
- import {getAction, postAction, putAction} from '@/api/manage';
- import {mapGetters} from 'vuex';
- let COS = require('cos-js-sdk-v5');
- let cos = new COS({
- SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
- SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
- });
- let str = '';
- for (let i = 0; i < 7 * 48; i++) {
- str += '0';
- }
- export default {
- name: 'configuration-modal',
- props: {
- visible: {
- type: Boolean,
- default: false
- }
- },
- components: {
- AcountSearch,
- SelectCheckAll,
- radioCheck,
- linkMultiSelect,
- DirectionalLogic,
- AutoSelect,
- CheckMorePlat
- },
- data() {
- let handleConfirmValue = (rule, value, callback) => {
- const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
- if (urlregex.test(value)) {
- callback();
- }
- else {
- callback('请输入正确的格式');
- }
- };
- let handleCharacterLen100 = (rule, value, callback) => {
- this.handleExportRules(value, 1, 100, callback);
- };
- let handleCharacterLen20 = (rule, value, callback) => {
- this.handleExportRules(value, 4, 20, callback);
- };
- let handleCharacterLenCreativeApp = (rule, value, callback) => {
- this.handleExportRules(value, 4, 20, callback);
- };
- let floatingIntervalValidator = (rule, value, callback) => {
- const finallyResult = Number(this.configForm.adMinBid) + Number(value);
- if (finallyResult < Number(this.configForm.adMaxBid)) {
- callback();
- }
- else {
- callback('最低出价+浮动间隔<最高出价');
- }
- };
- let adMinBidValidator = (rule, value, callback) => {
- const finallyResult = Number(this.configForm.adMaxBid);
- if (finallyResult && value && Number(value) < finallyResult) {
- this.$refs['ruleForm'].clearValidate(['adMaxBid']);
- callback();
- }
- else {
- callback('最低出价不能高于最高出价');
- }
- };
- let adMaxBidValidator = (rule, value, callback) => {
- const finallyResult = Number(this.configForm.adMinBid);
- if (finallyResult && value && Number(value) > finallyResult) {
- this.$refs['ruleForm'].clearValidate(['adMinBid']);
- callback();
- }
- else {
- callback('最高出价不能低于最低出价');
- }
- };
- let budgetValidator = (rule, value, callback) => {
- if (this.modalTitle === 'edit') {
- if(this.defaultAdBudget!=''){
- if (Number(value) > Number(this.defaultAdBudget) && Number(value) < (Number(this.defaultAdBudget) + 100)) {
- callback('单次修改预算幅度, 不能低于100.0元');
- }
- else if (Number(value) < Number(this.defaultAdBudget) && Number(value) > (Number(this.defaultAdBudget) - 100)) {
- callback('单次修改预算幅度, 不能低于100.0元');
- }
- else {
- callback();
- }
- }
- else {
- callback();
- }
-
- }
- else if (this.modalTitle === 'add') {
- callback();
- }
- else if (this.modalTitle === 'copy') {
- if(this.defaultAdBudget!=''){
- if (Number(value) > Number(this.defaultAdBudget) && Number(value) < (Number(this.defaultAdBudget) + 100)) {
- callback('单次修改预算幅度, 不能低于100.0元');
- }
- else if (Number(value) < Number(this.defaultAdBudget) && Number(value) > (Number(this.defaultAdBudget) - 100)) {
- callback('单次修改预算幅度, 不能低于100.0元');
- }
- else {
- callback();
- }
- }
- else {
- callback();
- }
- }
- };
- return {
- spinning: false,
- landingPageShowData: {},
- weburlModel: '',
- modalCol: {
- lg: {span: 6},
- sm: {span: 6},
- xs: {span: 6},
- md: {span: 6}
- },
- modalWrapper: {
- lg: {span: 18},
- sm: {span: 18},
- xs: {span: 14},
- md: {span: 14}
- },
- viedoDefaultList: [],
- viedoDefaultListUpdate: [],
- isWebUrl: false,
- sureLoading: false,
- subTitleMsgStatus: false,
- subTitleMsg: '',
- AutoExtendEditSelect: [],
- adPlatformOption: [
- {
- value: 'NONE',
- label: '不限'
- },
- {
- value: 'IOS',
- label: 'IOS'
- },
- {
- value: 'ANDROID',
- label: 'ANDROID'
- },
- {
- value: 'PC',
- label: 'PC'
- }
- ],
- adAutoExtendList: [],
- directionalData: [],
- platformLoadingType: '',
- deviceTypeList: [
- {
- value: 'NONE',
- label: '不限'
- },
- {
- value: 'MOBILE',
- label: '智能手机'
- },
- {
- value: 'PAD',
- label: '平板'
- }
- ],
- adAcList: [
- {
- value: 'NONE',
- label: '不限'
- },
- {
- value: 'WIFI',
- label: 'WI-FI'
- },
- {
- value: '2G',
- label: '2G'
- },
- {
- value: '3G',
- label: '3G'
- },
- {
- value: '4G',
- label: '4G'
- }
- ],
- adHideIfConvertedDataOption: [ // 过滤已转化用户option
- {
- id: 'NO_EXCLUDE',
- name: '不限'
- },
- {
- id: 'AD',
- name: '广告计划'
- },
- {
- id: 'CAMPAIGN',
- name: '广告组'
- },
- {
- id: 'ADVERTISER',
- name: '广告账户'
- },
- {
- id: 'CUSTOMER',
- name: '公司账户'
- },
- {
- id: 'APP',
- name: 'APP'
- }
- ],
- packageMessageDetail: [],
- selectiveList: [],
- isLadderBlur: false,
- ladderBlurTxt: '',
- isAdCpaBid11Blur: false,
- adCpaBid11BlurTxt: '',
- isAdCpaBidBlur: false,
- adCpaBidBlurTxt: '',
- listArr: [],
- regionCityListUrl: 'ctop/bytedanceAreaInfo/list',
- defaultAdBudget: '',
- adBudgetNum: 300,
- campaignStatus: false,
- detailData: {},
- modalTitle: '',
- toolConvertList: [],
- optimizationOption: [],
- md5Result: '',
- urlResult: '',
- createOptions: [],
- campaignTags: ['序号', '日期'],
- adNameTags: ['序号', '出价方式', '素材名称', '日期', '创意方式'],
- fieldNames: {
- label: 'industryName',
- value: 'industryId',
- children: 'children'
- },
- promotionTypeList: [
- {
- value: 'EXTERNAL',
- label: '落地页'
- },
- {
- value: 'ARTICLE',
- label: '文章推广'
- },
- {
- value: 'GOODS',
- label: '商品推广'
- },
- {
- value: 'DPA',
- label: '商品目录'
- },
- {
- value: 'STORE',
- label: '门店推广'
- },
- {
- value: 'AWEME',
- label: '抖音号推广'
- },
- {
- value: 'SHOP',
- label: '店铺直投'
- },
- {
- value: 'APP_ANDROID',
- label: '应用下载-安卓'
- },
- {
- value: 'APP_IOS',
- label: '应用下载-IOS'
- }
- ],
- ageArr: [
- {
- value: 'NONE',
- label: '不限'
- },
- {
- value: 'AGE_BETWEEN_18_23',
- label: '18-23岁'
- },
- {
- value: 'AGE_BETWEEN_24_30',
- label: '24-30岁'
- },
- {
- value: 'AGE_BETWEEN_31_40',
- label: '31-40岁'
- },
- {
- value: 'AGE_BETWEEN_41_49',
- label: '41-49岁'
- },
- {
- value: 'AGE_ABOVE_50',
- label: '50岁+'
- }
- ],
- creativeImageModeArr:[
- {
- value:"CREATIVE_IMAGE_MODE_VIDEO_VERTICAL",
- label:'竖版视频'
- },{
- value:"CREATIVE_IMAGE_MODE_VIDEO",
- label:'横版视频'
- },{
- value:"CREATIVE_IMAGE_MODE_LARGE",
- label:'大图横图'
- },{
- value:"CREATIVE_IMAGE_MODE_SMALL",
- label:'小图',
- disabled:true
- },{
- value:"CREATIVE_IMAGE_MODE_LARGE_VERTICAL",
- label:"大图竖图"
- }
- ],
- fileList: [],
- isCoverImgDiv: false,
- imageUrl: '',
- creativeTag: [],
- radioStyle: {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- marginLeft: 0
- },
- labelCol: {span: 4},
- wrapperCol: {span: 14},
- creativeOptions: [],
- rules: {
- componentId: [
- {required: true, message: '请输入创意组件', trigger: 'blur'}
- ],
- creativeAppName: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: handleCharacterLenCreativeApp, trigger: 'blur'}
- ],
- adExternalUrl: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: handleConfirmValue, trigger: 'blur'}
- ],
- adPackage: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- adDownloadUrl: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: handleConfirmValue, trigger: 'blur'}
- ],
- campaignCnt: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- campaignAdCnt: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- dpLinkStartIndex: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- dpLinkEndIndex: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- accountBudget: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: budgetValidator, trigger: 'blur'}
- ],
- campaignName: [
- {required: true, message: '请输入广告组名称', trigger: 'blur'},
- {validator: handleCharacterLen100, trigger: 'blur'}
- ],
- creativeSource: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: handleCharacterLen20, trigger: 'blur'}
- ],
- adCpaBid: [
- {required: true, message: '请输入', trigger: 'blur'}
- ],
- adStepBid: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: floatingIntervalValidator, trigger: 'blur'}
- ],
- adMinBid: [
- {required: true, message: '请输入最低出价', trigger: 'blur'},
- {validator: adMinBidValidator, trigger: 'blur'}
- ],
- adMaxBid: [
- {required: true, message: '请输入最高出价', trigger: 'blur'},
- {validator: adMaxBidValidator, trigger: 'blur'}
- ],
- adName: [
- {required: true, message: '请输入广告计划名称', trigger: 'blur'},
- {validator: handleCharacterLen100, trigger: 'blur'}
- ],
- creativeProductDescription: [
- {required: true, message: '请输入', trigger: 'blur'},
- {min: 1, max: 7, message: '请输入1-7个字', trigger: 'blur'}
- ],
- creativeWebUrl: [
- {required: true, message: '请输入', trigger: 'blur'},
- {validator: handleConfirmValue, trigger: 'blur'}
- ],
- adAudiencePackageId: [{required: true, message: '请选择', trigger: 'change'}],
- creativeCallToAction: [{required: true, message: '请选择', trigger: 'change'}],
- creativeActionText: [{required: true, message: '请选择', trigger: 'change'}],
- adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
- adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
- creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}],
- adDeepCpabid:[ {required: true, message: '请输入', trigger: 'blur'},]
- },
- configForm: {
- adDeepBidType:'DEEP_BID_MIN',
- adDeepCpabid:0.1,
- copywritingNumber: undefined,
- marketingPurpose: 'CONVERSION',
- componentId: '',
- creativeIesCoreUserId: '1',
- creativePlayableUrl: 'a',
- adUnionVideoType: '',
- creativeWebUrl: '',
- adAppType: '',
- adDirectionalFlag: 'add',
- adInterestActionMode: 'UNLIMITED',
- creativeDisplayMode: 'CREATIVE_DISPLAY_MODE_CTR',
- creativeAppName: undefined,
- creativeIsPresentedVideo: 0,
- // creativeGenerateDerivedAd: 0,
- creativeIsCommentDisable: 0,
- creativeDownloadStatus: 0,
- creativeSubTitle: '',
- adConvertedTimeDuration: 'THREE_MONTH',
- adDownloadMode: 'DEFAULT',
- dpLinkIndexUsed: 0,
- adRetargetingTagsType: '',
- adAudiencePackageId: undefined,
- adStepBid: 0,
- ladderOne: '',
- ladderTwo: '',
- adMinBid: '',
- adMaxBid: '',
- adBidCreateType: 'FIX',
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- adLocationType: '',
- adCity: '',
- adSelectCity: [],
- defaultFormList: [],
- productSellingPoints: [], // 商品买点
- adBudgetMode: 'BUDGET_MODE_DAY', // 预算类型
- adDownloadUrl: '', // 下载链接
- accountBudget: 0, // 账户日预算
- accountId: undefined, // 账户
- dpLinkStartIndex: 1,
- dpLinkEndIndex: 2,
- accountBudgetMode: '1', // 预算方式
- campaignLandingType: 'APP', // 推广目标
- campaignType: 'FEED', // 广告类型
- campaignName: '', // 广告组名称
- adName: '', // 广告计划名称
- campaignCnt: 1, // 广告组计划数量
- campaignAdCnt: 1, // 广告计划数量
- launchTarget: 'OCPM', // 投放目标
- adDownloadType: 'EXTERNAL_URL', // 下载方式
- adExternalUrl: '', // 落地页链接
- adOpenUrl: '', // 直达链接内容
- adPackage: '', // 应用包名
- adConvertType: '', // 转化跟踪方式
- adConvertId: '', // 优化目标 -- 走接口
- adverPosition: 'a', // 广告位置
- radioChangeValue: '', // 广告位置-按照场景指定位置
- checkboxChangeValue: [], // 广告位置-按照媒体指定位置
- adDistrict: 'NONE', // 定向-区域
- adGender: 'NONE', // 定向-性别
- adAge: '', // 定向-年龄
- adSelectAge: ['NONE'],
- customPerson: 'NONE', // 定向-自定义
- adSuperiorPopularityType: 'NONE', // 定向-媒体定向
- adPlatform: 'NONE', // 定向-平台
- updateAdPlatform: ['NONE'],
- adDeviceSelectType: ['NONE'],
- adSelectAc: ['NONE'],
- adAc: '', // 定向-网络
- adHideIfExists: '0', // 定向-已安装用户
- adHideIfConverted: 'NO_EXCLUDE', // 定向-已转化用户
- adAutoExtendEnabled: '0', // 定向-智能播放
- adAndroidVersion: 'NONE', // 定向-安卓版本
- androidChangeValue: '', // 安卓版本-自定义
- adSmartBidType: 'SMART_BID_CUSTOM', // 投放场景
- adBudget: 300, // 预算
- adScheduleType: 'SCHEDULE_FROM_NOW', // 投放时间
- launchDateRange: [], // 设置开始和结束时间
- launchTimeInterval: 'buxian', // 投放时段
- scheduleTimeData: str, // 指定时段选择
- adPricing: 'PRICING_OCPM', // 付费方式
- adCpaBid: 0.1, // 目标转化出价
- creativeActionTrackUrl: '', // 监测地址
- creativeMaterialMode: 'STATIC_ASSEMBLE', // 创意方式
- creativeImageMode: 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL', // 创意内容
- creativeProductDescription: '', // 卡片标题
- creativeEnablePersonalAction: true, // 智能优选
- creativeSource: '', // 来源
- creativeThirdIndustryId: '', // 创意分类
- creativeThirdIndustryIds: [], // 创意分类
- adKeywords: [], // 创意标签
- updateGetingInclude: [],
- updateGetingExclude: [],
- adRetargetingTagsInclude: '',
- adRetargetingTagsExclude: '',
- adAutoExtendTargets: '',
- adDeliveryRange: '',
- creativeCallToAction: undefined, // 行动号召
- creativeActionText: undefined,
- creativeLabel: undefined // 倡议标签
- },
- originalityStatus: true, // 创意状态
- pictureStatus: false,
- isTomatoStatus: false,
- isTAwemeStatus: true,
- creativeImageShow:true,
- deepExternalArr:[],
- deepExternalShow:false,
- adDeepCpabidShow:true
- };
- },
- computed: {
- selectOrientPlaceholder() {
- if (!this.configForm.accountId) {
- return '请选择账户';
- }
- else {
- return 'able';
- }
- },
- getEndIndex() {
- return Number(this.configForm.dpLinkStartIndex) + 1;
- },
- getSource() {
- if (this.configForm.campaignLandingType !== 'APP' || (this.configForm.campaignLandingType === 'APP' && this.configForm.adDownloadType === 'EXTERNAL_URL')) {
- return 'creativeSource';
- }
- },
- NewAountId() {
- return this.configForm.accountId;
- },
- NewAdPackage() {
- return this.configForm.adPackage;
- },
- NewAdExternalUrl() {
- return this.configForm.adExternalUrl;
- },
- NewPlatformLoadingType() {
- return this.platformLoadingType;
- },
- NewIsTAwemeStatus() {
- return this.isTAwemeStatus;
- },
- NewAdSelectAge() {
- return this.configForm.adSelectAge;
- },
- NewAdDistrict() {
- return this.configForm.adDistrict;
- },
- NewAdGender() {
- return this.configForm.adGender;
- },
- NewAdInterestActionMode() {
- return this.configForm.adInterestActionMode;
- },
- NewCustomPerson() {
- return this.configForm.customPerson;
- },
- NewAdAutoExtendList() {
- return this.adAutoExtendList;
- }
- },
- watch: {
- NewAdAutoExtendList(newVal) {
- if (!newVal.length) {
- this.configForm.adAutoExtendEnabled = '0';
- this.AutoExtendEditSelect = [];
- }
- },
- NewCustomPerson(newVal) {
- if (newVal !== 'NONE') {
- this.adAutoExtendList.push({
- value: 'CUSTOM_AUDIENCE',
- label: '自定人群-定向'
- });
- }
- else {
- this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'CUSTOM_AUDIENCE');
- }
-
- },
- NewAdInterestActionMode(newVal) {
- if (newVal !== 'UNLIMITED') {
- this.adAutoExtendList.push({
- value: 'INTEREST_ACTION',
- label: '行为兴趣'
- });
- }
- else {
- this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'INTEREST_ACTION');
- }
- },
- NewAdGender(newVal) {
- if (newVal !== 'NONE') {
- if (!this.adAutoExtendList.find(item => item.value === 'GENDER')) {
- this.adAutoExtendList.push({
- value: 'GENDER',
- label: '性别'
- });
- }
- }
- else {
- this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'GENDER');
- }
- },
- NewAdDistrict(newVal) {
- if (newVal !== 'NONE') {
- this.adAutoExtendList.push({
- value: 'REGION',
- label: '地域'
- });
- }
- else {
- this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'REGION');
- }
- },
- NewAdSelectAge(newVal) {
- if (newVal[0] !== 'NONE') {
- if (!this.adAutoExtendList.find(item => item.value === 'AGE')) {
- this.adAutoExtendList.push({
- value: 'AGE',
- label: '年龄'
- });
- }
- }
- else {
- this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'AGE');
- }
- },
- NewIsTAwemeStatus(newVal) {
- if (!newVal) {
- this.md5Result = '';
- this.urlResult = '';
- this.imageUrl = '';
- this.configForm.creativeProductDescription = '';
- this.configForm.defaultFormList = [];
- this.configForm.creativeEnablePersonalAction = '';
- this.configForm.creativeCallToAction = undefined;
- }
- else {
- this.configForm.creativeEnablePersonalAction = true;
- }
- },
- NewPlatformLoadingType(newVal, oldVal) {
- if (newVal) {
- this.configForm.adAppType = newVal;
- }
- if (newVal && this.configForm.accountId) {
- this.handleGetChengZiSite();
- }
- else {
- this.landingPageShowData = {};
- this.configForm.creativeWebUrl = '';
- }
- },
- NewAdExternalUrl(newVal, oldVal) {
- if (newVal && this.configForm.accountId) {
- const paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- promotionContent: this.configForm.adDownloadType
- };
- this.handleGetOptimizationObjective(paramsData);
- }
- },
- NewAdPackage(newVal, oldVal) {
- if (newVal && this.configForm.accountId) {
- const paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- appType: 'APP_ANDROID',
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- packageName: this.configForm.adPackage,
- promotionContent: this.configForm.adDownloadType
- };
- // this.handleGetOptimizationObjective(paramsData);
- }
- },
- NewAountId(newVal, oldVal) {
- if ((newVal && this.configForm.adPackage) || (newVal && this.configForm.adExternalUrl)) {
- const paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- appType: this.platformLoadingType,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- packageName: this.configForm.adPackage,
- promotionContent: this.configForm.adDownloadType
- };
- // this.handleGetOptimizationObjective(paramsData);
- }
- if (newVal && this.platformLoadingType) {
- this.handleGetChengZiSite();
- }
- else {
- this.landingPageShowData = {};
- this.configForm.creativeWebUrl = '';
- }
- if (newVal) {
- this.handleGetCreativeClassification();
- this.handleGetAdvertiserStrategy();
- this.handleDirectionalList();
- // this.handleGetAdAudiencePackage();
- }
- else {
- this.createOptions = [];
- this.creativeOptions = [];
- this.selectiveList = [];
- this.optimizationOption = [];
- }
- }
- },
- mounted() {
- const routeQuery = JSON.parse(localStorage.getItem('queryList'));
- if (routeQuery.accountModal === 'edit') {
- this.modalTitle = 'edit';
- this.handleGetDetailList();
- }
- else if (routeQuery.accountModal === 'add') {
- this.modalTitle = 'add';
- this.spinning = false;
- }
- else if (routeQuery.accountModal === 'copy') {
- this.modalTitle = 'copy';
- this.handleGetDetailList();
- }
- },
- methods: {
- ...mapGetters(['nickname', 'avatar', 'userInfo']),
- moment,
- changeAdDirection() {
- this.configForm.adDistrict = 'NONE';
- this.listArr = [];
- this.configForm.adLocationType = 'HOME'
- this.configForm.adGender = 'NONE'
- this.configForm.adSelectAge = ['NONE']
- this.configForm.adInterestActionMode = 'UNLIMITED'
- this.configForm.customPerson = 'NONE'
- this.configForm.adRetargetingTagsType = '1'
- this.configForm.updateGetingInclude = []
- this.configForm.updateGetingExclude = []
- this.directionalData = []
- this.configForm.adSuperiorPopularityType = 'NONE'
- // this.configForm.adPlatform = 'NONE'
- this.configForm.adDeviceSelectType = ['NONE']
- this.configForm.adAndroidVersion = 'NONE'
- this.configForm.androidChangeValue = '9.0'
- this.configForm.adSelectAc = ['NONE']
- this.configForm.adHideIfExists = '0'
- this.configForm.adHideIfConverted = 'NO_EXCLUDE'
- this.configForm.adConvertedTimeDuration = 'ONE_MONTH'
- this.configForm.adAutoExtendEnabled = '0'
- this.configForm.adAudiencePackageId = undefined
- this.packageMessageDetail = [];
- if(this.configForm.adDirectionalFlag != 'add'){
- this.handleGetAdAudiencePackage();
- }
- },
- handleSelectValue(data) {
- this.deepExternalShow = false;
- this.configForm.accountId = data.id;
- // this.$refs['ruleForm'].resetFields();
- this.configForm.adDistrict = 'NONE';
- this.listArr = [];
- this.configForm.adLocationType = 'HOME'
- this.configForm.adGender = 'NONE'
- this.configForm.adSelectAge = ['NONE']
- this.configForm.adInterestActionMode = 'UNLIMITED'
- this.configForm.customPerson = 'NONE'
- this.configForm.adRetargetingTagsType = ''
- this.configForm.updateGetingInclude = []
- this.configForm.updateGetingExclude = []
- this.directionalData = []
- this.configForm.adSuperiorPopularityType = 'NONE'
- // this.configForm.adPlatform = 'NONE'
- this.configForm.adDeviceSelectType = ['NONE']
- this.configForm.adAndroidVersion = 'NONE'
- this.configForm.androidChangeValue = '9.0'
- this.configForm.adSelectAc = ['NONE']
- this.configForm.adHideIfExists = '0'
- this.configForm.adHideIfConverted = 'NO_EXCLUDE'
- this.configForm.adConvertedTimeDuration = 'ONE_MONTH'
- this.configForm.adAutoExtendEnabled = '0'
- this.configForm.adAudiencePackageId = undefined
- this.configForm.adDirectionalFlag = 'add'
- // this.configForm.adConvertType = undefined;
- // this.configForm.adConvertId = undefined;
- // this.toolConvertList = [];
- // this.optimizationOption = [];
- // this.handleGetAdAudiencePackage();
- this.configForm.adConvertType = undefined;
- this.configForm.adConvertId = undefined;
- this.packageMessageDetail = [];
- this.toolConvertList = [];
- this.optimizationOption = [];
- this.handleClearlist();
- if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '1') {
- this.$refs.direct.selectRightData = [];
- this.$refs.direct.tableSelectIds = [];
- }
- else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '2') {
- this.$refs.exclude.selectRightData = [];
- this.$refs.exclude.tableSelectIds = [];
- }
- else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '3') {
- this.$refs.twoway.tableSelectDirectIds = [];
- this.$refs.twoway.tableSelectDirectData = [];
- this.$refs.twoway.tableSelectExcludeIds = [];
- this.$refs.twoway.tableSelectExcludeData = [];
- }
-
- if (this.platformLoadingType!='') {
- let paramsData = {};
- if (this.configForm.adDownloadType === 'DOWNLOAD_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- appType: this.platformLoadingType,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- packageName: this.configForm.adPackage,
- promotionContent: this.configForm.adDownloadType
- };
- }
- else if (this.configForm.adDownloadType === 'EXTERNAL_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- promotionContent: this.configForm.adDownloadType
- };
- }
- this.handleGetOptimizationObjective(paramsData);
- }
- },
- handleAdDistrict(e) {
- const defaultValue = e.target.value;
- if (defaultValue === 'NONE') {
- this.listArr = [];
- this.configForm.adLocationType = '';
- }
- else if (defaultValue === 'CITY') {
- this.configForm.adLocationType = 'HOME';
- }
- },
- handleChangeCreativeType(){
- this.configForm.componentId = undefined
- },
- handleAdUnionVideoType(e) {
- this.$refs['ruleForm'].clearValidate(['creativeSource']);
- this.configForm.componentId = undefined
- if (e.target.value === 'SPLASH_VIDEO') {
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_UNION_SPLASH';
- }
- else {
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- }
- },
- NewCheckboxChangeValue(newVal) {
- this.$refs['ruleForm'].clearValidate(['creativeSource']);
- let selectiveListUpdate = [...this.selectiveList];
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- this.configForm.componentId = ''
- if (newVal.length) {
- if (newVal.includes('INVENTORY_AWEME_FEED')) {
- this.isTAwemeStatus = true;
- }
- else {
- this.isTAwemeStatus = false;
- }
- if (newVal.length === 4 && newVal.includes('INVENTORY_FEED') && newVal.includes('INVENTORY_VIDEO_FEED') && newVal.includes('INVENTORY_HOTSOON_FEED') && newVal.includes('INVENTORY_AWEME_FEED')) {
- this.originalityStatus = true;
- this.pictureStatus = true;
- }
- else if (newVal.length === 1 && newVal[0] === 'INVENTORY_TOMATO_NOVEL') {
- this.isTomatoStatus = true;
- this.originalityStatus = true;
- this.pictureStatus = true;
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- }
- else {
- this.isTomatoStatus = false;
- this.originalityStatus = false;
- this.pictureStatus = false;
- }
- if (newVal.length === 1 && newVal[0] === 'INVENTORY_UNION_SLOT') {
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- this.configForm.adUnionVideoType = 'REWARDED_VIDEO';
- this.configForm.creativePlayableUrl = 'a';
- // this.$nextTick(() => {
- // this.configForm.creativeEnablePersonalAction = true;
- // });
- this.configForm.adAudiencePackageId = undefined;
- this.packageMessageDetail = [];
- this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
- }
- else {
- this.configForm.creativeDownloadStatus = 0;
- this.configForm.adUnionVideoType = '';
- // this.configForm.creativeEnablePersonalAction = '';
- this.configForm.adAudiencePackageId = undefined;
- this.packageMessageDetail = [];
- // this.handleGetAdAudiencePackage();
- }
- }
- else {
- this.isTAwemeStatus = true;
- this.isTomatoStatus = false;
- this.configForm.adUnionVideoType = '';
- this.configForm.adAudiencePackageId = undefined;
- this.packageMessageDetail = [];
- // this.handleGetAdAudiencePackage();
- }
- },
- handleGetChengZiSite() {
- const paramsData = {
- accountId: this.configForm.accountId
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', paramsData).then(result => {
- if (result.code === 0) {
- this.viedoDefaultList = result.result;
- this.viedoDefaultListUpdate = result.result;
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleViedoListClick(data) {
- this.landingPageShowData = data;
- this.configForm.creativeWebUrl = data.creativeWebUrl;
- this.weburlModel = '';
- this.isWebUrl = false;
- },
- handleWebUrlSearch() {
- let defaultList = [];
- this.viedoDefaultListUpdate.forEach(item => {
- if (item.name && item.name.indexOf(this.weburlModel) !== -1) {
- defaultList.push(item);
- }
- });
- this.viedoDefaultList = defaultList;
- },
- handleWebUrlUpdate() {
- this.viedoDefaultList = [...this.viedoDefaultListUpdate];
- this.weburlModel = '';
- },
- handleCancelAll() {
- this.handleWebUrlUpdate();
- this.isWebUrl = false;
- },
- handleHaveWebUrl() {
- this.isWebUrl = true;
- },
- handleAdhideConver(e) {
- const defaultValue = e.target.value;
- if (defaultValue === 'CUSTOMER' || defaultValue === 'APP') {
- this.configForm.adConvertedTimeDuration = 'THREE_MONTH';
- }
- else {
- this.configForm.adConvertedTimeDuration = '';
- }
- },
- handleAdAutoExtend(e) {
- const defaultValue = e.target.value;
- if (defaultValue === '0') {
- this.AutoExtendEditSelect = [];
- this.configForm.adAutoExtendTargets = '';
- }
- },
- handleCreativeSubTitleBlur(e) {
- const defaultValue = e.target.value;
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = defaultValue.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (4 <= length && length <= 24) {
- this.subTitleMsgStatus = false;
- this.subTitleMsg = '';
- }
- else if (!defaultValue) {
- this.subTitleMsgStatus = false;
- this.subTitleMsg = '';
- }
- else {
- this.subTitleMsgStatus = true;
- this.subTitleMsg = '只能输入4-24个字符';
- }
- },
- handleSelectTxtend(list) {
- this.configForm.adAutoExtendTargets = list && list.map(item => item.value).join(',');
- },
- handleCustomPerson(e) {
- const defaultValue = e.target.value;
- if (defaultValue === 'NONE') {
- this.configForm.updateGetingInclude = [];
- this.configForm.adRetargetingTagsInclude = '';
- this.configForm.adRetargetingTagsExclude = '';
- this.configForm.updateGetingExclude = [];
- this.configForm.adRetargetingTagsType = '';
- }
- else if (defaultValue === 'a') {
- this.configForm.adRetargetingTagsType = '1';
- }
- },
- handleAsyncPackage() {
- this.handleGetAdAudiencePackage();
- this.configForm.adAudiencePackageId = undefined;
- this.packageMessageDetail = [];
- },
- handleDpLinkIndexUsed(e) {
- const defaultId = e.target.value;
- if (defaultId === 0) {
- this.adNameTags.pop();
- this.configForm.dpLinkStartIndex = 1;
- this.configForm.dpLinkEndIndex = 2;
- this.configForm.campaignCnt = 1;
- }
- else if (defaultId === 1) {
- this.adNameTags.push('dp链接标识');
- }
- },
- handleDplinkStart(e) {
- this.configForm.dpLinkStartIndex = Math.round(e);
- },
- handleDplinkEnd(e) {
- this.configForm.dpLinkEndIndex = Math.round(e);
- },
- handleFloatingInterval(e) {
- this.configForm.adStepBid = Number(Number(e.target.value).toFixed(2));
- },
- handleAdMinBidBlur(e) {
- this.configForm.adMinBid = Number(Number(e.target.value).toFixed(2));
- },
- handleAdMaxBidBlur(e) {
- const defaultValue = e.target.value;
- this.configForm.adMaxBid = Number(Number(defaultValue).toFixed(2));
- if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '出价不能大于预算';
- }
- else {
- this.isAdCpaBidBlur = false;
- }
- },
- handleDirectionalList() {
- const paramsData = {
- accountId: this.configForm.accountId
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', paramsData).then(result => {
- if (result.code === 0) {
- result.result.forEach(item => {
- item.key = item.custom_audience_id;
- });
- this.directionalData = result.result;
- }
- else {
- this.directionalData = [];
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleSelectionAloneEvent(list) {
- if (this.configForm.adRetargetingTagsType === '1') {
- this.configForm.updateGetingInclude = list;
- this.configForm.adRetargetingTagsInclude = list && list.join(',');
- this.configForm.adRetargetingTagsExclude = '';
- this.configForm.updateGetingExclude = [];
- }
- else if (this.configForm.adRetargetingTagsType === '2') {
- this.configForm.updateGetingExclude = list;
- this.configForm.adRetargetingTagsExclude = list && list.join(',');
- this.configForm.updateGetingInclude = [];
- this.configForm.adRetargetingTagsInclude = '';
- }
- },
- handleClearTableAlone(list) {
- this.configForm.updateGetingInclude = list;
- this.configForm.adRetargetingTagsInclude = list && list.join(',');
- },
- handleClearTableLogic(list) {
- this.configForm.updateGetingExclude = list;
- this.configForm.adRetargetingTagsExclude = list && list.join(',');
- },
- handleClearlist() {
- this.configForm.updateGetingInclude = [];
- this.configForm.adRetargetingTagsInclude = '';
- this.configForm.adRetargetingTagsExclude = '';
- this.configForm.updateGetingExclude = [];
- },
- handleDirectEvent(list) {
- this.configForm.updateGetingInclude = list;
- this.configForm.adRetargetingTagsInclude = list && list.join(',');
- },
- handleExcludeEvent(list) {
- this.configForm.updateGetingExclude = list;
- this.configForm.adRetargetingTagsExclude = list && list.join(',');
- },
- handleDirectionalLogic(e) {
- const selectValue = e.target.value;
- this.handleDirectionalList();
- if (selectValue === '1') {
- this.$refs.exclude.aloneInput = '';
- this.$refs.twoway.directInput = '';
- this.$refs.twoway.excludeInput = '';
- }
- else if (selectValue === '2') {
- this.$refs.direct.aloneInput = '';
- this.$refs.twoway.directInput = '';
- this.$refs.twoway.excludeInput = '';
- }
- else if (selectValue === '3') {
- this.$refs.direct.aloneInput = '';
- this.$refs.exclude.aloneInput = '';
- }
- },
- handleGetAdAudiencePackage() {
- const params = {
- accountId: this.configForm.accountId,
- // landingType: this.platformLoadingType
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
- .then(result => {
- if (result.code === 0) {
- const defaultList = result.result;
- this.promotionTypeList.forEach(item => {
- defaultList.forEach(val => {
- if (val.landing_type === item.value) {
- val.changeName = item.label;
- }
- });
- });
- // if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
- // this.selectiveList = defaultList.filter(item => item.delivery_range === 'UNION');
- // }
- // else {
- this.selectiveList = defaultList;
- // }
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleSelectiveOrientation(e) {
- const ageUpdateList = [];
- const defaultData = this.selectiveList.filter(item => item.audience_package_id === e);
- defaultData.forEach(item => {
- item.replaceSex = item.audience.gender === 'NONE' ? '不限' : item.audience.gender === 'GENDER_FEMALE' ? '女' : '男';
- item.replaceEnabled = item.audience.auto_extend_enabled === 1 ? '开启' : '不开启';
- item.replacePlate = item.audience.platform && item.audience.platform.length ? item.audience.platform.join(',') : '不限';
- item.replaceCitys = item.audience.cityNames && item.audience.cityNames.length ? item.audience.cityNames.join(',') : '不限';
- this.ageArr.forEach(val => {
- if (item.audience.age && item.audience.age.length && item.audience.age.includes(val.value)) {
- ageUpdateList.push(val.label);
- }
- });
- item.replaceAge = ageUpdateList.length ? ageUpdateList.join(',') : '不限';
- });
- this.packageMessageDetail = defaultData;
- },
- handleBiddingMethod(e) {
- this.configForm.adCpaBid = 0;
- this.configForm.adMinBid = '';
- this.configForm.adMaxBid = '';
- this.configForm.adStepBid = 0;
- this.isAdCpaBidBlur = false;
- this.$refs['ruleForm'].clearValidate(['adMinBid']);
- this.$refs['ruleForm'].clearValidate(['adMaxBid']);
- },
- handleAdCpaBidBlur(e) {
- const defaultValue = e.target.value;
- this.configForm.adCpaBid = Number(Number(defaultValue).toFixed(2));
- if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '出价不能大于预算';
- }
- else if (defaultValue > 10000) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '目标转化出价不少于0.1元,不超过10000元,请正确输入';
- }
- else {
- this.isAdCpaBidBlur = false;
- }
- },
- handleGetAdvertiserStrategy() {
- const params = {
- accountId: this.configForm.accountId,
- landingType: this.configForm.campaignLandingType,
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
- .then(result => {
- if (result.code === 0) {
- this.creativeOptions = result.result;
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- },
- // 获取选中的城市
- getSelectedCityArr(val) {
- setTimeout(() => {
- this.configForm.adSelectCity = val;
- }, 200);
- },
- handleCheckedShowList(val) {
- if (val.length) {
- this.configForm.adSelectCity = val.map(item => item.code);
- }
- else {
- this.configForm.adSelectCity = [];
- }
- },
- handlePlateSelect(data) {
- if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
- data.splice(data.findIndex(item => item === 'NONE'), 1);
- }
- else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
- data.splice(0, data.length - 1);
- }
- else if (data.length === 0) {
- data.push('NONE');
- }
- },
- getAgeSelect(data) {
- console.log(data);
- if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
- data.splice(data.findIndex(item => item === 'NONE'), 1);
- }
- else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
- data.splice(0, data.length - 1);
- }
- else if (data.length === 0) {
- data.push('NONE');
- }
- },
- handleAdBudgetBlur(e) {
- const adBudgetInput = e.target.value;
- this.configForm.adBudget = Number(Number(adBudgetInput).toFixed(2));
- if (this.configForm.adCpaBid > adBudgetInput) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '出价不能大于预算';
- }
- else {
- this.isAdCpaBidBlur = false;
- }
- },
- handleAccountBudget(e) {
- const adBudgetInput = e.target.value;
- this.configForm.accountBudget = Number(Number(adBudgetInput).toFixed(2));
- },
- handleExportRules(value, min, max, callback) {
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = value.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (min <= length && length <= max) {
- callback();
- }
- else {
- callback(`只能输入${min}-${max}个字符`);
- }
- },
- handleGetPackage() {
- const params = {
- urlPath: this.configForm.adDownloadUrl
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getPackageNameByUrl', params)
- .then(result => {
- if (result.code === 0) {
- this.configForm.adPackage = result.result.package || '';
- this.platformLoadingType = result.result.platform || '';
- if (result.result.platform && result.result.platform === 'APP_ANDROID') {
- this.configForm.adPlatform = 'ANDROID';
- }
- else if (result.result.platform && result.result.platform === 'APP_IOS') {
- this.configForm.adPlatform = 'IOS';
- }
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- },
- editPackage(){
- var that = this
- return new Promise(function (resolve, reject) {
- const params = {
- urlPath: that.configForm.adDownloadUrl
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getPackageNameByUrl', params)
- .then(result => {
- if (result.code === 0) {
- // this.configForm.adPackage = result.result.package || '';
- // this.platformLoadingType = result.result.platform || '';
- // if (result.result.platform && result.result.platform === 'APP_ANDROID') {
- // this.configForm.adPlatform = 'ANDROID';
- // }
- // else if (result.result.platform && result.result.platform === 'APP_IOS') {
- // this.configForm.adPlatform = 'IOS';
- // }
- resolve(result.result.platform)
- }
- else {
- reject('调用失败')
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- })
- },
- handleAndroidVersion(e) {
- if (e.target.value === 'NONE') {
- this.configForm.androidChangeValue = '';
- }
- },
- handleAdScheduleType(e) {
- if (e.target.value === 'SCHEDULE_FROM_NOW') {
- this.configForm.launchDateRange = [];
- }
- },
- handleLaunchTimeInterval(e) {
- if (e.target.value === 'buxian') {
- this.configForm.scheduleTimeData = str;
- }
- },
- handleAdverPosition(e) {
- this.$refs['ruleForm'].clearValidate(['creativeSource']);
- this.$refs['ruleForm'].clearValidate(['componentId']);
- this.configForm.componentId = ''
- this.configForm.adDeliveryRange = 'DEFAULT'
- if (e.target.value === 'a') {
- this.configForm.radioChangeValue = '';
- this.configForm.checkboxChangeValue = [];
- this.isTAwemeStatus = true;
- this.originalityStatus = true;
- this.pictureStatus = false;
- this.creativeImageShow = true;
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- }
- else if (e.target.value === 'b') {
- this.configForm.radioChangeValue = '';
- this.pictureStatus = true;
- this.originalityStatus = true;
- this.creativeImageShow = true;
- this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- }
- else if (e.target.value === 'c') {
- this.configForm.checkboxChangeValue = [];
- this.isTAwemeStatus = true;
- this.originalityStatus = true;
- this.pictureStatus = false;
- this.creativeImageShow = true;
- this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
- // this.configForm.creativeImageMode = this.configForm.creativeImageMode.toString();
- }
- else if(e.target.value === 'd'){
- this.configForm.radioChangeValue = '';
- this.configForm.checkboxChangeValue = [];
- this.isTAwemeStatus = true;
- this.originalityStatus = true;
- this.pictureStatus = false;
- // this.creativeImageShow = false;
- // this.configForm.creativeImageMode = [];
- // this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
- // this.configForm.creativeImageMode = this.configForm.creativeImageMode.toString();
- }
- this.configForm.adUnionVideoType = '';
- // this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
- this.handleGetAdAudiencePackage();
- },
- handleAccountMode(e) {
- if (e.target.value === '1') {
- this.configForm.accountBudget = 0;
- }
- else if (e.target.value === '2') {
- this.configForm.accountBudget = 1000;
- }
- },
- handleAdDownLoadType(e) {
- this.optimizationOption = [];
- this.landingPageShowData = {};
- this.configForm.creativeWebUrl = '';
- // this.platformLoadingType = '';
- const defaultValue = e.target.value;
- this.configForm.adConvertType = undefined
- this.configForm.adConvertId = undefined
- if (defaultValue === 'DOWNLOAD_URL') {
- this.configForm.adExternalUrl = '';
- this.configForm.adOpenUrl = '';
- this.configForm.adDownloadMode = 'DEFAULT';
- // this.$refs.ruleForm.clearValidate(['adExternalUrl']);
- }
- else if (defaultValue === 'EXTERNAL_URL') {
- // this.configForm.adDownloadUrl = '';
- // this.configForm.adPackage = '';
- this.configForm.adDownloadMode = '';
- this.configForm.adConvertId = '';
- this.configForm.adAppType = '';
- // this.$refs.ruleForm.clearValidate(['adDownloadUrl']);
- // this.$refs.ruleForm.clearValidate(['adPackage']);
- }
- if(this.configForm.adDownloadUrl) {
- this.handleGetPackage();
- const paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- appType: this.platformLoadingType,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- packageName: this.configForm.adPackage,
- promotionContent: this.configForm.adDownloadType
- };
- this.handleGetOptimizationObjective(paramsData);
- }
-
- },
- handleCampaignCnt(e) {
- const finallyResult = e * this.configForm.campaignAdCnt;
- if (finallyResult > 500) {
- this.campaignStatus = true;
- }
- else {
- this.campaignStatus = false;
- }
- },
- handleCampaignAdCnt(e) {
- const finallyResult = e * this.configForm.campaignCnt;
- if (finallyResult > 500) {
- this.campaignStatus = true;
- }
- else {
- this.campaignStatus = false;
- }
- },
- handleConvertChange(e) {
- this.optimizationOption.forEach(element => {
- if (element.convert_id == e) {
- if ("deep_external_actions" in element && element.deep_external_actions != null ) {
- this.deepExternalShow = true;
- this.$nextTick(()=>{
- this.configForm.adDeepBidType = 'DEEP_BID_MIN';
- this.configForm.adDeepCpabid = 0.1;
- })
-
- }else{
- this.deepExternalShow = false;
- }
- }
- });
- // postAction(urlAcount + `/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/readToolConvertInfo?accountId=${this.configForm.accountId}&convertId=${this.configForm.adConvertId}`)
- // .then(res=>{
- // if(res.success){
- // this.configForm.creativeActionTrackUrl = res.result.action_track_url;
- // }
- // })
- },
- adDeepBidTypeChange(e){
- if (e.target.value == 'AUTO_MIN_SECOND_STAGE') {
- this.adDeepCpabidShow = false;
- }else{
- this.adDeepCpabidShow = true;
- this.configForm.adDeepCpabid = 0.1;
- }
- },
- handleGetDetailList() {
- const routeQuery = JSON.parse(localStorage.getItem('queryList'));
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id})
- .then(result => {
- if (result.code === 0) {
- const detailData = result.result;
- this.configForm.accountId = detailData.accountId;
- setTimeout(() => {
- this.configForm.adConvertId = detailData.adConvertId;
- this.spinning = false;
- }, 200);
-
-
- this.configForm.adDownloadUrl = detailData.adDownloadUrl || '';
- this.handleGetPackage()
- this.$nextTick(()=>{
- this.editPackage().then(res=>{
- if (detailData.adAudiencePackageId&&res!='') {
- this.$nextTick(()=>{
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: detailData.accountId})
- .then(result => {
- if (result.code === 0) {
- this.$nextTick(()=>{
- let checkboxChangeValueList = detailData.creativeInventoryType ? detailData.creativeInventoryType.split(',') : [];
- // if (checkboxChangeValueList.length === 1 && checkboxChangeValueList[0] === 'INVENTORY_UNION_SLOT') {
- // this.selectiveList = result.result.filter(item => item.delivery_range === 'UNION');
- // }
- // else {
- this.selectiveList = result.result || [];
- // }
- this.configForm.adAudiencePackageId = Number(detailData.adAudiencePackageId);
- this.handleSelectiveOrientation(Number(detailData.adAudiencePackageId));
- })
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- })
- }
- let paramsData = {};
- if (detailData.adDownloadType === 'DOWNLOAD_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: detailData.accountId,
- appType: res,
- deliveryRange: 'DEFAULT',
- externalUrl: detailData.adExternalUrl,
- landingType: detailData.campaignLandingType,
- packageName: detailData.adPackage,
- promotionContent: detailData.adDownloadType
- };
- }
- else if (detailData.adDownloadType === 'EXTERNAL_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: detailData.accountId,
- deliveryRange: 'DEFAULT',
- externalUrl: detailData.adExternalUrl,
- landingType: detailData.campaignLandingType,
- promotionContent: detailData.adDownloadType
- };
- }
- postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
- if (result.code === 0) {
- // const updateResult = result.result.filter(item => item.external_actions.length > 0);
- this.$nextTick(()=>{
- var updateResult = []
- for (let i = 0; i < result.result[0].converts.length; i++) {
- if(result.result[0].converts[i].external_actions){
- for (let j = 0; j < result.result[0].converts[i].external_actions.length; j++) {
- if(result.result[0].converts[i].external_actions[j].convert_id == detailData.adConvertId){
- updateResult.push(result.result[0].converts[i])
- }
-
- }
- }
-
-
- }
- this.configForm.adConvertType = updateResult[0].convert_type;
- this.optimizationOption = updateResult[0].external_actions;
- this.optimizationOption.forEach(element => {
- if (element.convert_id == detailData.adConvertId) {
- if ("deep_external_actions" in element && element.deep_external_actions != null ) {
- this.deepExternalShow = true;
-
- }else{
- this.deepExternalShow = false;
- }
- }
- });
- if (detailData.adDeepBidType == 'AUTO_MIN_SECOND_STAGE') {
- this.adDeepCpabidShow = false;
- this.configForm.adDeepCpabid = 0.1
- }else{
- this.adDeepCpabidShow = true;
- }
- this.configForm.adDeepBidType = detailData.adDeepBidType;
- this.configForm.adDeepCpabid = detailData.adDeepCpabid;
- console.log( this.configForm.adDeepBidType, this.configForm.adDeepCpabid);
-
- })
-
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- })
- })
- postAction(urlAcount + `/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/readToolConvertInfo?accountId=${detailData.accountId}&convertId=${detailData.adConvertId}`)
- .then(res=>{
- if(res.success){
- this.configForm.creativeActionTrackUrl = res.result.action_track_url;
- }
- })
-
- this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex;
- this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex;
- this.configForm.accountBudgetMode = detailData.accountBudgetMode;
- this.configForm.accountBudget = detailData.accountBudget;
- this.configForm.adDirectionalFlag = detailData.adDirectionalFlag;
- this.configForm.campaignLandingType = detailData.campaignLandingType;
- this.configForm.campaignType = detailData.campaignType;
- this.configForm.campaignName = detailData.campaignName || '';
- this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
- if (detailData.dpLinkIndexUsed === 1) {
- this.$nextTick(() => {
- this.adNameTags.push('dp链接标识');
- })
- }
- this.configForm.adName = detailData.adName || '';
- this.configForm.campaignCnt = detailData.campaignCnt || '';
- this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
- this.configForm.launchTarget = detailData.launchTarget || 'OCPM';
- this.configForm.adDownloadType = detailData.adDownloadType;
- if (detailData.adDownloadType === 'DOWNLOAD_URL') {
- this.$nextTick(() => {
- this.configForm.creativeAppName = detailData.creativeAppName || undefined;
- });
- }
- this.configForm.adPlatform = detailData.adPlatform;
- this.configForm.adExternalUrl = detailData.adExternalUrl || '';
- this.configForm.adOpenUrl = detailData.adOpenUrl || '';
-
- this.configForm.adPackage = detailData.adPackage || '';
- this.configForm.adConvertType = detailData.adConvertType || '';
- this.configForm.adDistrict = detailData.adDistrict || 'NONE';
- this.configForm.adAppType = detailData.adAppType;
- // this.handleGetPackage()
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', {accountId: detailData.accountId}).then(result => {
- if (result.code === 0) {
- const defaultResult = result.result;
- defaultResult.forEach(item => {
- if (item.creativeWebUrl === detailData.creativeWebUrl) {
- this.landingPageShowData = item;
- }
- });
- this.configForm.creativeWebUrl = detailData.creativeWebUrl;
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- if (detailData.adDownloadType === 'DOWNLOAD_URL') {
- this.$nextTick(()=>{
- this.handleGetPackage();
- })
-
- }
- setTimeout(() => {
- this.listArr = detailData.adCity.split(',').map(item => Number(item));
- this.configForm.adSelectCity = detailData.adCity.split(',');
- }, 1000);
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', {accountId: detailData.accountId}).then(result => {
- if (result.code === 0) {
- result.result.forEach(item => {
- item.key = item.custom_audience_id;
- });
- this.directionalData = result.result;
- this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType;
- if (detailData.adRetargetingTagsType === '3') {
- this.configForm.customPerson = 'a';
- this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
- this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
- this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
- this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
- }
- else if (detailData.adRetargetingTagsType === '2') {
- this.configForm.customPerson = 'a';
- this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
- this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
- this.configForm.updateGetingInclude = [];
- }
- else if (detailData.adRetargetingTagsType === '1') {
- this.configForm.customPerson = 'a';
- this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
- this.configForm.updateGetingExclude = [];
- this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
- }
- else {
- this.configForm.customPerson = 'NONE';
- this.configForm.adRetargetingTagsExclude = '';
- this.configForm.updateGetingExclude = '';
- this.configForm.updateGetingInclude = [];
- this.configForm.updateGetingExclude = [];
- }
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- this.configForm.adGender = detailData.adGender || 'NONE';
- this.configForm.adLocationType = detailData.adLocationType;
- this.configForm.adSelectAge = detailData.adAge.split(',');
- this.configForm.adSelectAc = detailData.adAc.split(',');
- this.configForm.adDeviceSelectType = detailData.adDeviceType.split(',');
- this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
- this.configForm.adAc = detailData.adAc;
- this.configForm.adHideIfExists = String(detailData.adHideIfExists);
- this.configForm.adHideIfConverted = detailData.adHideIfConverted;
- this.configForm.adAutoExtendEnabled = detailData.adAutoExtendEnabled;
- this.configForm.adSmartBidType = detailData.adSmartBidType;
- this.configForm.adBudgetMode = detailData.adBudgetMode;
- this.configForm.adBudget = detailData.adBudget;
- this.defaultAdBudget = detailData.accountBudget;
-
- this.configForm.adScheduleType = detailData.adScheduleType;
- this.configForm.launchDateRange[0] = detailData.adStartTime;
- this.configForm.launchDateRange[1] = detailData.adEndTime;
- this.configForm.adPricing = detailData.adPricing;
- this.configForm.adCpaBid = detailData.adCpaBid;
-
- this.configForm.creativeMaterialMode = detailData.creativeMaterialMode;
- this.configForm.creativeProductDescription = detailData.creativeProductDescription;
- this.configForm.creativeEnablePersonalAction = detailData.creativeEnablePersonalAction;
- const params = {
- accountId: detailData.accountId,
- landingType: detailData.campaignLandingType,
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
- .then(result => {
- if (result.code === 0) {
- this.creativeOptions = result.result;
- this.configForm.creativeCallToAction = detailData.creativeCallToAction;
- this.configForm.creativeActionText = detailData.creativeActionText;
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- this.configForm.creativeSource = detailData.creativeSource;
- this.configForm.adBidCreateType = detailData.adBidCreateType;
- this.configForm.adMinBid = detailData.adMinBid;
- this.configForm.adMaxBid = detailData.adMaxBid;
- this.configForm.adStepBid = detailData.adStepBid;
- this.configForm.adBidCreateType = detailData.adBidCreateType;
- this.configForm.creativeThirdIndustryIds[0] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 4);
- this.configForm.creativeThirdIndustryIds[1] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 6);
- this.configForm.creativeThirdIndustryIds[2] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId;
- this.imageUrl = detailData.imageUrl;
- this.urlResult = detailData.imageUrl;
- this.md5Result = detailData.creativeProductImageCode;
- if (detailData.adAndroidOsv !== 'NONE') {
- this.$nextTick(()=>{
- this.configForm.adAndroidVersion = 'a';
- this.configForm.androidChangeValue = detailData.adAndroidOsv;
- })
- }
- else {
- this.configForm.adAndroidVersion = 'NONE';
- }
- if (detailData.productSellingPoints) {
- this.$nextTick(()=>{
- let productPointsList = [];
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
- detailData.productSellingPoints.forEach((item, index) => {
- productPointsList.push({
- id: randomNum + index,
- value: item
- });
- });
- this.configForm.defaultFormList = productPointsList;
- })
- }
- if (detailData.adScheduleTime.indexOf(1) !== -1) {
- this.$nextTick(()=>{
- this.configForm.launchTimeInterval = 'a';
- this.configForm.scheduleTimeData = detailData.adScheduleTime;
- })
- }
- else {
- this.configForm.launchTimeInterval = 'buxian';
- }
- console.log(
- detailData
- );
- if (detailData.creativeSceneInventory) {
- this.configForm.adverPosition = 'c';
- this.configForm.radioChangeValue = detailData.creativeSceneInventory;
- }
-
- else if (detailData.creativeInventoryType) {
- this.configForm.adverPosition = 'b';
- this.configForm.checkboxChangeValue = detailData.creativeInventoryType.split(',');
- if (this.configForm.checkboxChangeValue.includes('INVENTORY_AWEME_FEED')) {
- this.$nextTick(()=>{
- this.isTAwemeStatus = true;
- })
- }
- else {
- this.isTAwemeStatus = false;
- }
- if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
- this.$nextTick(()=>{
- this.configForm.adUnionVideoType = detailData.adUnionVideoType;
- this.configForm.adDeliveryRange = 'UNION';
- })
- }
- else {
- this.configForm.adUnionVideoType = '';
- this.configForm.adDeliveryRange = '';
- }
- this.NewCheckboxChangeValue(this.configForm.checkboxChangeValue);
- }else if(detailData.inventoryCatalog == 'UNIVERSAL'){
- this.configForm.adverPosition = 'd'
- }
- else {
- this.configForm.adverPosition = 'a';
- }
- if (detailData.adKeywords) {
- this.$nextTick(()=>{
- this.creativeTag = detailData.adKeywords;
- })
- }
- // this.$nextTick(()=>{
- // // this.configForm.creativeImageMode = detailData.creativeImageMode
- // if (detailData.inventoryCatalog == 'UNIVERSAL') {
- // this.creativeImageShow = false;
- // this.configForm.creativeImageMode = detailData.creativeImageMode.split(',')
- // }else{
- // this.creativeImageShow = true
- // this.configForm.creativeImageMode = detailData.creativeImageMode
- // }
- // })
- this.configForm.adInterestActionMode = detailData.adInterestActionMode;
- this.configForm.creativeDisplayMode = detailData.creativeDisplayMode;
- this.configForm.creativeIsPresentedVideo = detailData.creativeIsPresentedVideo;
- // this.configForm.creativeGenerateDerivedAd = detailData.creativeGenerateDerivedAd;
- this.configForm.creativeIsCommentDisable = detailData.creativeIsCommentDisable;
- this.configForm.copywritingNumber = detailData.copywritingNumber&&detailData.copywritingNumber>0?detailData.copywritingNumber:undefined;
-
- this.configForm.creativeSubTitle = detailData.creativeSubTitle;
- this.configForm.adConvertedTimeDuration = detailData.adConvertedTimeDuration;
- this.configForm.adDownloadMode = detailData.adDownloadMode;
- this.configForm.adAutoExtendTargets = detailData.adAutoExtendTargets;
- this.AutoExtendEditSelect = detailData.adAutoExtendTargets && detailData.adAutoExtendTargets.split(',');
- this.$nextTick(()=>{
- this.configForm.componentId = detailData.componentId
- this.configForm.creativeDownloadStatus = detailData.creativeDownloadStatus?detailData.creativeDownloadStatus:0;
- })
- }
- else {
- this.$message.error(result.message);
- }
- })
- .catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleConvertTypeChange(e) {
- this.configForm.adConvertId = '';
- this.optimizationOption = [];
- this.toolConvertList.forEach(item => {
- if (item.convert_type === e) {
- this.optimizationOption = [...item.external_actions];
- }
- });
- // this.optimizationOption.forEach(element => {
- // if (element.convert_id == detailData.adConvertId) {
- // if ("deep_external_actions" in element) {
- // this.deepExternalShow = true;
- // }else{
- // this.deepExternalShow = false;
- // }
- // }
- // });
- },
- // 优化目标数据获取
- handleGetOptimizationObjective(paramsData) {
- postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
- if (result.code === 0) {
- this.toolConvertList = result.result[0].converts;
- // if (this.configForm.adConvertType) {
- // this.handleConvertTypeChange(this.configForm.adConvertType);
- // }
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- // 创意分类接口
- handleGetCreativeClassification() {
- const paramsData = {
- accountId: this.configForm.accountId
- };
- getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getIndustryList', paramsData).then(result => {
- if (result.code === 0) {
- this.createOptions = result.result;
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleAddList(data) {
- postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/addBytedanceStrategy', data).then(result => {
- if (result.code === 0) {
- this.$message.success('创建成功');
- this.sureLoading = false;
- this.$router.replace('/account-config/account-config');
- this.$bus.$emit('remove', '/account-config/components/configuration-modal');
- }
- else {
- this.sureLoading = false;
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- // 点击获取光标位置进行字段插入
- handleGetChangeAll(item, field, type) {
- let node = document.getElementById(field);
- let startPos = node.selectionStart; // input 第0个字符到选中的字符
- let endPos = node.selectionEnd; // 选中的字符到最后的字符
- let txt = node.value;
- if (startPos === 0 || endPos === 0) {
- this.configForm[type] += '-{{' + item + '}}-';
- }
- else {
- this.configForm[type] = txt.substring(0, startPos) + '-{{' + item + '}}-' + txt.substring(endPos);
- node.selectionStart = startPos + item.length + 6;
- node.selectionEnd = startPos + item.length + 6;
- }
- node.focus();
- node.blur();
- },
- handleLaunchData(date, dateString) {
- this.configForm.launchDateRange = dateString;
- },
- handleBudgetMode(e) {
- if (e === 'BUDGET_MODE_TOTAL') {
- this.configForm.adScheduleType = 'SCHEDULE_START_END';
- this.adBudgetNum = this.configForm.launchTarget === 'OCPM' ? 300 : 0;
- this.configForm.adBudget = 300;
- if (Number(this.configForm.adCpaBid) > Number(this.configForm.adBudget)) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '出价不能大于预算';
- }
- else {
- this.isAdCpaBidBlur = false;
- this.adCpaBidBlurTxt = '';
- }
- this.$message.warning('请设置投放时间');
- }
- else if (e === 'BUDGET_MODE_DAY') {
- this.adBudgetNum = 0;
- this.configForm.adBudget = 300;
- }
- },
- handleDelOrigin(list) {
- let formData = this.configForm.defaultFormList;
- this.configForm.defaultFormList = formData.filter(item => list.id !== item.id);
- },
- handleAddOrigin() {
- if (this.configForm.defaultFormList.length >= 10) {
- this.$message.error('最多可以添加10个卖点');
- return;
- }
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
- this.$nextTick(() => {
- this.configForm.defaultFormList.push({
- id: randomNum,
- value: ''
- });
- });
- },
- handleCreativeWebUrl(e) {
- const defaultValue = e.target.value;
- this.landingPageShowData = {};
- },
- handleDownloadLink(e) {
- const defaultValue = e.target.value;
- if (defaultValue) {
- this.handleGetPackage();
- let paramsData = {};
- if (this.configForm.adDownloadType === 'DOWNLOAD_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- appType: 'APP_ANDROID',
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- packageName: this.configForm.adPackage,
- promotionContent: this.configForm.adDownloadType
- };
- }
- else if (this.configForm.adDownloadType === 'EXTERNAL_URL') {
- paramsData = {
- advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
- advertiserId: this.configForm.accountId,
- deliveryRange: 'DEFAULT',
- externalUrl: this.configForm.adExternalUrl,
- landingType: this.configForm.campaignLandingType,
- promotionContent: this.configForm.adDownloadType
- };
- }
- this.handleGetOptimizationObjective(paramsData)
- }
- else {
- this.platformLoadingType = '';
- this.configForm.adPackage = '';
- }
- },
- handleDeleteImg() {
- this.imageUrl = '';
- this.isCoverImgDiv = false;
- },
- handleChangeActive() {
- this.isCoverImgDiv = true;
- },
- handleRemoveActive() {
- this.isCoverImgDiv = false;
- },
- getBase64(img, callback) {
- const reader = new FileReader();
- reader.addEventListener('load', () => callback(reader.result));
- reader.readAsDataURL(img);
- },
- beforeUpload(info) {
- const isZip = info.type.includes('png') || info.type.includes('jpeg');
- const fileOvesize = info.size > (1024 * 1024);
- if (!isZip) {
- this.$message.error('请上传正确类型的图片');
- this.imageUrl = '';
- this.urlResult = '';
- this.md5Result = '';
- return;
- }
- if (fileOvesize) {
- this.$message.error('图片大小不能超过1M');
- this.imageUrl = '';
- this.urlResult = '';
- this.md5Result = '';
- return;
- }
- new Promise(function (resolve, reject) {
- let width = 108;
- let height = 108;
- let _URL = window.URL || window.webkitURL;
- let img = new Image();
- img.onload = function () {
- let valid = img.width === width && img.height === height;
- valid ? resolve() : reject();
- };
- img.src = _URL.createObjectURL(info);
- }).then(() => {
- this.handleMd5(info);
- this.getBase64(info, imageUrl => {
- this.imageUrl = imageUrl;
- });
- }, () => {
- this.$message.error('图片尺寸必须是108*108!');
- this.imageUrl = '';
- this.urlResult = '';
- this.md5Result = '';
- return Promise.reject();
- });
- },
- cosUpload(file) {
- let that = this;
- let date = new Date();
- 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;
- let timeElse = new Date().getTime();
- let arr = file.name.split('.');
- let str = '';
- for (let i = 0; i < arr.length; i++) {
- if (i === arr.length - 1) {
- }
- else {
- if (i === arr.length - 2) {
- str += arr[i];
- }
- else {
- str += arr[i] + '.';
- }
- }
- }
- cos.putObject(
- {
- Bucket: 'media-1301855440',
- Region: 'ap-chongqing',
- // 存储桶所在地域,必须字段
- Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
- StorageClass: 'STANDARD',
- Body: file // 上传文件对象
- },
- function (err, data) {
- if (err) {
- that.$message.error('上传失败!!!' + err);
- return;
- }
- that.loadingElse = false;
- that.fileList.push({
- uid: file.name,
- name: file.name,
- status: 'done',
- url: '//' + data.Location
- });
- that.urlResult = '//' + data.Location;
- }
- );
- },
- handleMd5(file) {
- let bmf = new BMF();
- let that = this;
- return new Promise(function (resolve, reject) {
- bmf.md5(file, (err, md5) => {
- that.md5Result = md5;
- getAction('/file/imageCheck', {code: md5}).then(result => {
- if (result.code === -206) {
- that.cosUpload(file);
- resolve();
- }
- else {
- that.urlResult = result.url;
- // reject();
- }
- }).catch(error => {
- console.log(error, 'eeee');
- reject();
- });
- });
- });
- },
- handleRelaxSure() {
- let paramsFormData = this.configForm;
- console.log(paramsFormData);
- if (paramsFormData.adDirectionalFlag === 'add') {
- paramsFormData.adAudiencePackageId = null;
- this.packageMessageDetail = [];
- }
- else if (paramsFormData.adDirectionalFlag === 'choice') {
- paramsFormData.adDistrict = 'NONE';
- this.listArr = [];
- paramsFormData.adLocationType = '';
- paramsFormData.adGender = 'NONE';
- paramsFormData.adSelectAge = ['NONE'];
- paramsFormData.customPerson = 'NONE';
- paramsFormData.updateGetingInclude = [];
- paramsFormData.adRetargetingTagsInclude = '';
- paramsFormData.adRetargetingTagsExclude = '';
- paramsFormData.updateGetingExclude = [];
- paramsFormData.adRetargetingTagsType = '';
- paramsFormData.adSuperiorPopularityType = 'NONE';
- paramsFormData.adInterestActionMode = 'UNLIMITED';
- paramsFormData.adDeviceSelectType = ['NONE'];
- paramsFormData.adAndroidVersion = 'NONE';
- paramsFormData.adHideIfConverted = 'NO_EXCLUDE';
- paramsFormData.adSelectAc = ['NONE'];
- paramsFormData.adHideIfExists = '0';
- paramsFormData.adAutoExtendEnabled = '0';
- paramsFormData.adAutoExtendTargets = '';
- paramsFormData.adSelectCity = [];
- this.adAutoExtendList = [];
- }
- if (paramsFormData.adDistrict === 'CITY') {
- if (!paramsFormData.adSelectCity.length) {
- this.$message.error('请选择省市');
- return;
- }
- }
- else {
- this.listArr = []
- this.configForm.adSelectCity = []
- paramsFormData.adSelectCity = []
- }
- // if (paramsFormData.checkboxChangeValue.length === 1 && paramsFormData.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
- // paramsFormData.adDeliveryRange = 'UNION';
- // paramsFormData.creativeDownloadStatus = null;
- // }
- // else {
- // paramsFormData.adDeliveryRange = 'DEFAULT';
- // paramsFormData.creativeDownloadStatus = 1;
- // }
- if (paramsFormData.adDirectionalFlag === 'choice' && !paramsFormData.adAudiencePackageId) {
- this.$message.error('请选择已有定向包');
- return;
- }
- if (paramsFormData.customPerson === 'a') {
- if (paramsFormData.adRetargetingTagsType === '1' && !paramsFormData.adRetargetingTagsInclude) {
- this.$message.error('请选择人群');
- return;
- }
- else if (paramsFormData.adRetargetingTagsType === '2' && !paramsFormData.adRetargetingTagsExclude) {
- this.$message.error('请选择人群');
- return;
- }
- else if (paramsFormData.adRetargetingTagsType === '3' && (!paramsFormData.adRetargetingTagsExclude || !paramsFormData.adRetargetingTagsInclude)) {
- this.$message.error('请选择人群');
- return;
- }
- }
- else{
- paramsFormData.adRetargetingTagsType = ''
- }
- if (paramsFormData.adAutoExtendEnabled === '1' && !paramsFormData.adAutoExtendTargets) {
- this.$message.error('请选择可开放定向');
- return;
- }
- if (paramsFormData.adScheduleType === 'SCHEDULE_START_END' && !paramsFormData.launchDateRange.length) {
- this.$message.error('请选择投放时间');
- return;
- }
- if (paramsFormData.launchTimeInterval === 'a' && paramsFormData.scheduleTimeData === str) {
- this.$message.error('请选择投放时段');
- return;
- }
- if (this.campaignStatus) {
- return;
- }
- if (paramsFormData.adBudget < paramsFormData.adCpaBid) {
- this.isAdCpaBidBlur = true;
- this.adCpaBidBlurTxt = '出价不能大于预算';
- return;
- }
- else {
- this.isAdCpaBidBlur = false;
- }
- if (this.subTitleMsgStatus) {
- return;
- }
- if (paramsFormData.adverPosition === 'a') {
- paramsFormData.inventoryCatalog = 'SMART';
- paramsFormData.creativeSmartInventory = 'SMART';
- }
- else if (paramsFormData.adverPosition === 'b') {
- if (!paramsFormData.checkboxChangeValue.length) {
- this.$message.error('请选择媒体指定位置');
- return;
- }
- if (paramsFormData.checkboxChangeValue.length === 1 && paramsFormData.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
- paramsFormData.adDeliveryRange = 'UNION';
- paramsFormData.creativeDownloadStatus = null;
- }
- else {
- paramsFormData.adDeliveryRange = 'DEFAULT';
- paramsFormData.creativeDownloadStatus = 1;
- }
- paramsFormData.creativeInventoryTypes = paramsFormData.checkboxChangeValue;
- }
- else if (paramsFormData.adverPosition === 'c') {
- if (!paramsFormData.radioChangeValue) {
- this.$message.error('请选择场景指定位置');
- return;
- }
- paramsFormData.creativeSceneInventory = paramsFormData.radioChangeValue;
- }else if (paramsFormData.adverPosition === 'd') {
- paramsFormData.inventoryCatalog = 'UNIVERSAL';
- paramsFormData.creativeSmartInventory = 'UNIVERSAL';
- paramsFormData.adDeliveryRange = 'UNIVERSAL'
- }
- if (paramsFormData.launchTimeInterval === 'buxian') {
- paramsFormData.adScheduleTime = '';
- }
- else if (paramsFormData.launchTimeInterval === 'a') {
- paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
- }
- if (paramsFormData.adScheduleType === 'SCHEDULE_START_END') {
- paramsFormData.adStartTime = paramsFormData.launchDateRange[0];
- paramsFormData.adEndTime = paramsFormData.launchDateRange[1];
- }
- else if (paramsFormData.adScheduleType === 'SCHEDULE_FROM_NOW') {
- paramsFormData.adStartTime = '';
- paramsFormData.adEndTime = '';
- }
- if (paramsFormData.launchTimeInterval === 'buxian') {
- paramsFormData.adScheduleTime = str;
- }
- else if (paramsFormData.launchTimeInterval === 'a') {
- paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
- }
- if (paramsFormData.adAndroidVersion === 'a') {
- paramsFormData.adAndroidOsv = paramsFormData.androidChangeValue;
- }
- else {
- paramsFormData.adAndroidOsv = 'NONE';
- }
- // TODO 使用抖音号和搭配试玩,暂时没有字段,默认参数为空
- paramsFormData.creativeIesCoreUserId = '';
- paramsFormData.creativePlayableUrl = '';
- paramsFormData.adCity = paramsFormData.adSelectCity.join(',');
- paramsFormData.adAge = paramsFormData.adSelectAge.join(',');
- paramsFormData.adAc = paramsFormData.adSelectAc.join(',');
- paramsFormData.adDeviceType = paramsFormData.adDeviceSelectType.join(',');
- paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
- paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
- paramsFormData.creativeProductImageCode = this.md5Result;
- paramsFormData.imageUrl = this.urlResult;
- paramsFormData.adKeywords = this.creativeTag;
- paramsFormData.copywritingNumber = paramsFormData.copywritingNumber?paramsFormData.copywritingNumber:0
- paramsFormData.userId = this.userInfo().id;
- if (this.deepExternalShow == false) {
- this.$delete(paramsFormData,'adDeepBidType')
- this.$delete(paramsFormData,'adDeepCpabid')
- }
- if (this.adDeepCpabidShow == false) {
- this.$delete(paramsFormData,'adDeepCpabid')
- }
- // if (typeof paramsFormData.creativeImageMode == 'object'){
- // paramsFormData.creativeImageMode = paramsFormData.creativeImageMode.toString()
- // }
- console.log(paramsFormData);
-
- this.$refs.ruleForm.validate(valid => {
- if (valid) {
- this.sureLoading = true;
- if (this.modalTitle === 'add') {
- this.handleAddList(paramsFormData);
- }
- else if (this.modalTitle === 'edit') {
- this.handleEditList(paramsFormData);
- }
- else if (this.modalTitle === 'copy') {
- this.handleAddList(paramsFormData);
- }
- }
- else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- handleEditList(data) {
- const queryData = data;
- const routeQuery = JSON.parse(localStorage.getItem('queryList'));
- queryData.id = routeQuery.id;
- putAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/edit', queryData).then(result => {
- if (result.code === 0) {
- this.$message.success(result.message);
- this.sureLoading = false;
- this.$router.replace('/account-config/account-config');
- this.$bus.$emit('remove', '/account-config/components/configuration-modal');
- }
- else {
- this.sureLoading = false;
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- handleRelaxCancel() {
- this.$router.replace('/account-config/account-config');
- this.$bus.$emit('remove', '/account-config/components/configuration-modal');
- },
- handleEnterChang(value) {
- this.creativeTag.push(...value);
- this.creativeTag = [...new Set(this.creativeTag)];
- for (let i = 0; i < this.creativeTag.length; i++) {
- if (this.creativeTag[i].length > 10) {
- this.creativeTag.splice(i, 1);
- this.$message.error('创意标签最多只能十个字符,超过的已清除');
- }
- }
- this.configForm.creativeLabel = [];
- },
- handleTagsClose(removedTag) {
- const tags = this.creativeTag.filter(tag => tag !== removedTag);
- this.creativeTag = tags;
- }
- }
- };
- </script>
- <style lang="less">
- @import "configuration-modal";
- .display-none-selset {
- display: none !important;
- }
- </style>
|