configuration-modal.vue 195 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780
  1. <template>
  2. <div class="configuration-modal">
  3. <div>
  4. <a-form-model
  5. ref="ruleForm"
  6. class="config-form-modal"
  7. :model="configForm"
  8. :rules="rules"
  9. :label-col="labelCol"
  10. :wrapper-col="wrapperCol"
  11. >
  12. <a-spin :spinning="spinning">
  13. <p class="separate-title-header">{{ modalTitle === 'add' ? '新增' : modalTitle === 'edit' ?'编辑':'复制'}}配置信息</p>
  14. <div class="separate-module-con">
  15. <a-form-model-item label="广告账户">
  16. <acount-search
  17. class="acount-search-class"
  18. :disabled="modalTitle === 'edit'"
  19. :appId.sync="configForm.accountId"
  20. :multiple="false"
  21. request="1,3"
  22. @select-value="handleSelectValue"
  23. >
  24. </acount-search>
  25. </a-form-model-item>
  26. <a-form-model-item label="dp链接">
  27. <a-radio-group
  28. :disabled="modalTitle === 'edit'"
  29. v-model="configForm.dpLinkIndexUsed"
  30. button-style="solid"
  31. @change="handleDpLinkIndexUsed"
  32. >
  33. <a-radio-button :value="0">关闭</a-radio-button>
  34. <a-radio-button :value="1">开启</a-radio-button>
  35. </a-radio-group>
  36. </a-form-model-item>
  37. <div v-if="configForm.dpLinkIndexUsed === 1">
  38. <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
  39. <a-input-number
  40. class="common-input"
  41. v-model="configForm.dpLinkStartIndex"
  42. :disabled="modalTitle === 'edit'"
  43. :min="1"
  44. placeholder="请输入"
  45. @change="handleDplinkStart"
  46. />
  47. <span>~</span>
  48. </a-form-model-item>
  49. <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
  50. <a-input-number
  51. class="common-input"
  52. v-model="configForm.dpLinkEndIndex"
  53. :disabled="modalTitle === 'edit'"
  54. :min="getEndIndex"
  55. placeholder="请输入"
  56. @change="handleDplinkEnd"
  57. />
  58. </a-form-model-item>
  59. </div>
  60. <a-form-model-item label="预算方式">
  61. <a-radio-group
  62. v-model="configForm.accountBudgetMode"
  63. button-style="solid"
  64. @change="handleAccountMode"
  65. >
  66. <a-radio-button value="1">不限预算</a-radio-button>
  67. <a-radio-button value="2">指定预算</a-radio-button>
  68. </a-radio-group>
  69. </a-form-model-item>
  70. <a-form-model-item v-if="configForm.accountBudgetMode === '2'" label="账户日预算" prop="accountBudget">
  71. <a-input-number
  72. v-model="configForm.accountBudget"
  73. :min="1000"
  74. :max="9999999.99"
  75. :step="0.01"
  76. @blur="handleAccountBudget"
  77. /> 元
  78. </a-form-model-item>
  79. </div>
  80. <div class="separate-module-con">
  81. <p class="rock-title">广告组信息</p>
  82. <a-form-model-item label="营销链路">
  83. <a-radio-group v-model="configForm.marketingPurpose" button-style="solid">
  84. <a-radio-button value="ACKNOWLEDGE" disabled>品牌认知</a-radio-button>
  85. <a-radio-button value="INTENTION" disabled>用户意向</a-radio-button>
  86. <a-radio-button value="CONVERSION">行动转化</a-radio-button>
  87. </a-radio-group>
  88. </a-form-model-item>
  89. <a-form-model-item label="推广目标">
  90. <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.campaignLandingType" button-style="solid">
  91. <a-radio-button value="APP">应用</a-radio-button>
  92. <a-radio-button value="LINK" disabled>销售线索收集</a-radio-button>
  93. <a-radio-button value="SHOP" disabled>电商店铺推广</a-radio-button>
  94. </a-radio-group>
  95. </a-form-model-item>
  96. <a-form-model-item label="广告类型">
  97. <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.campaignType" button-style="solid">
  98. <a-radio-button value="FEED">信息流广告</a-radio-button>
  99. <a-radio-button value="SEARCH" disabled>搜索广告</a-radio-button>
  100. </a-radio-group>
  101. </a-form-model-item>
  102. </div>
  103. <div class="separate-module-con">
  104. <p class="rock-title">基础信息</p>
  105. <a-form-model-item label="广告组名称" prop="campaignName">
  106. <a-input
  107. class="common-input-long"
  108. id="campaignName"
  109. v-model="configForm.campaignName"
  110. allow-clear
  111. placeholder="请输入广告组名称"
  112. />
  113. <div>
  114. <a-tag
  115. v-for="item in campaignTags"
  116. :key="item"
  117. color="#1890ff"
  118. @click="handleGetChangeAll(item, 'campaignName', 'campaignName')"
  119. >
  120. + {{ item }}
  121. </a-tag>
  122. </div>
  123. </a-form-model-item>
  124. <a-form-model-item label="广告计划名称" prop="adName">
  125. <a-input
  126. class="common-input-long"
  127. id="groupName"
  128. v-model="configForm.adName"
  129. allow-clear
  130. placeholder="请输入广告计划名称"
  131. />
  132. <div>
  133. <a-tag
  134. v-for="item in adNameTags"
  135. :key="item"
  136. color="#1890ff"
  137. @click="handleGetChangeAll(item, 'groupName', 'adName')"
  138. >
  139. + {{ item }}
  140. </a-tag>
  141. </div>
  142. </a-form-model-item>
  143. <a-form-model-item label="创建数量: 广告组数量" class="campaign-cnt-class" prop="campaignCnt">
  144. <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt" :disabled="configForm.dpLinkIndexUsed === 0"/>
  145. <a-tooltip placement="top">
  146. <template slot="title">
  147. <span>输入的数量为每天所创建的广告组数量</span>
  148. <span>以及每个广告组创建的广告计划数量</span>
  149. </template>
  150. <a-icon class="form-itrm-icon" type="question-circle"/>
  151. </a-tooltip>
  152. <div v-if="campaignStatus" style="width: 500px;color: #f00;">单账号每天创建计划上限500个</div>
  153. </a-form-model-item>
  154. <a-form-model-item label="广告计划数量" class="campaign-ad-class" prop="campaignAdCnt">
  155. <a-input-number v-model="configForm.campaignAdCnt" :min="1" @change="handleCampaignAdCnt"/>
  156. </a-form-model-item>
  157. </div>
  158. <div class="separate-module-con">
  159. <p class="rock-title">投放内容</p>
  160. <a-form-model-item label="投放目标">
  161. <a-radio-group :disabled="modalTitle === 'edit'" v-model="configForm.launchTarget" button-style="solid">
  162. <a-radio-button value="OCPM">转化量</a-radio-button>
  163. <a-radio-button value="CPC" disabled>点击量</a-radio-button>
  164. <a-radio-button value="CPM" disabled>展示量</a-radio-button>
  165. </a-radio-group>
  166. </a-form-model-item>
  167. <a-form-model-item label="下载链接" prop="adDownloadUrl">
  168. <a-input
  169. class="common-input-long"
  170. :disabled="modalTitle === 'edit'"
  171. v-model="configForm.adDownloadUrl"
  172. placeholder="请输入下载链接"
  173. allow-clear
  174. @change="handleDownloadLink"
  175. />
  176. </a-form-model-item>
  177. <a-form-model-item label="应用包名" prop="adPackage">
  178. <a-input
  179. class="common-input-long"
  180. :disabled="modalTitle === 'edit'"
  181. v-model="configForm.adPackage"
  182. placeholder="请输入应用包名"
  183. allow-clear
  184. />
  185. </a-form-model-item>
  186. <a-form-model-item label="下载方式">
  187. <a-radio-group
  188. :disabled="modalTitle === 'edit'"
  189. v-model="configForm.adDownloadType"
  190. button-style="solid"
  191. @change="handleAdDownLoadType"
  192. >
  193. <a-radio-button value="DOWNLOAD_URL">下载链接</a-radio-button>
  194. <a-radio-button value="EXTERNAL_URL" :disabled="platformLoadingType == 'APP_IOS'">落地页</a-radio-button>
  195. </a-radio-group>
  196. </a-form-model-item>
  197. <div v-if="configForm.adDownloadType === 'EXTERNAL_URL'">
  198. <a-form-model-item label="落地页链接" prop="adExternalUrl" key="arr">
  199. <a-input
  200. class="common-input-long"
  201. :disabled="modalTitle === 'edit'"
  202. v-model="configForm.adExternalUrl"
  203. placeholder="请输入落地页链接"
  204. allow-clear
  205. />
  206. </a-form-model-item>
  207. </div>
  208. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&platformLoadingType != 'APP_IOS'" label="优先应用商店下载">
  209. <a-radio-group
  210. v-model="configForm.adDownloadMode"
  211. button-style="solid"
  212. >
  213. <a-radio-button value="DEFAULT">不启用</a-radio-button>
  214. <a-radio-button value="APP_STORE_DELIVERY">启用</a-radio-button>
  215. </a-radio-group>
  216. </a-form-model-item>
  217. <a-form-model-item label="直达链接内容">
  218. <a-input
  219. class="common-input-long"
  220. v-model="configForm.adOpenUrl"
  221. placeholder="请输入直达链接内容"
  222. allow-clear
  223. />
  224. </a-form-model-item>
  225. <a-form-model-item v-if="platformLoadingType === 'APP_ANDROID' && configForm.adDownloadType === 'DOWNLOAD_URL'" label="应用下载详情页" prop="creativeWebUrl">
  226. <a-input
  227. class="common-input-long"
  228. v-model="configForm.creativeWebUrl"
  229. placeholder="请输入应用下载详情页"
  230. :disabled="modalTitle === 'edit'"
  231. allow-clear
  232. @change="handleCreativeWebUrl"
  233. />
  234. <span style="margin-left: 10px;"><a :disabled="modalTitle === 'edit'" @click="handleHaveWebUrl">使用已有</a></span>
  235. </a-form-model-item>
  236. <div v-if="platformLoadingType === 'APP_ANDROID' && configForm.adDownloadType === 'DOWNLOAD_URL'" class="adver-position-radio">
  237. <div class="create-web-url-class">
  238. <div class="web-url-img">
  239. <img v-if="landingPageShowData.thumbnail" :src="landingPageShowData.thumbnail"/>
  240. <img v-else src="@/assets/noImg.png"/>
  241. </div>
  242. <div class="web-url-content">
  243. <div class="url-content-name"><a>{{ landingPageShowData.name }}</a></div>
  244. <div class="url-content-id">ID:{{ landingPageShowData.siteId || '暂无' }}</div>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. <div class="separate-module-con">
  250. <p class="rock-title">优化目标</p>
  251. <a-form-model-item label="转化跟踪方式" :prop="configForm.launchTarget === 'OCPM' ? 'adConvertType' : ''">
  252. <a-select
  253. class="common-input-long"
  254. :disabled="modalTitle === 'edit'"
  255. v-model="configForm.adConvertType"
  256. placeholder="请选择"
  257. @change="handleConvertTypeChange"
  258. >
  259. <a-select-option value="AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD">应用下载API</a-select-option>
  260. <a-select-option value="AD_CONVERT_SOURCE_TYPE_SDK">应用下载SDK</a-select-option>
  261. <a-select-option value="AD_CONVERT_SOURCE_TYPE_OPEN_URL">应用直达API(应用直达链接)</a-select-option>
  262. <a-select-option value="AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD">普通应用下载</a-select-option>
  263. </a-select>
  264. </a-form-model-item>
  265. <a-form-model-item label="优化目标" :prop="configForm.launchTarget === 'OCPM' ? 'adConvertId' : ''">
  266. <a-select
  267. class="common-input-long"
  268. :disabled="modalTitle === 'edit'"
  269. v-model="configForm.adConvertId"
  270. placeholder="请选择"
  271. @change="handleConvertChange"
  272. >
  273. <a-select-option
  274. v-for="(item, index) in optimizationOption"
  275. :key="index"
  276. :value="item.convert_id"
  277. >
  278. {{ item.external_name }}
  279. </a-select-option>
  280. </a-select>
  281. </a-form-model-item>
  282. </div>
  283. <div class="separate-module-con">
  284. <p class="rock-title">设置投放位置</p>
  285. <a-form-model-item label="广告位置">
  286. <a-radio-group
  287. :disabled="modalTitle === 'edit'"
  288. v-model="configForm.adverPosition"
  289. button-style="solid"
  290. @change="handleAdverPosition"
  291. >
  292. <a-radio-button value="a">系统优选广告位</a-radio-button>
  293. <a-radio-button value="b">首选媒体</a-radio-button>
  294. <!-- <a-radio-button value="c">按场景指定位置</a-radio-button> -->
  295. <a-radio-button value="d">通投智选</a-radio-button>
  296. </a-radio-group>
  297. </a-form-model-item>
  298. <div class="adver-position-radio">
  299. <p v-if="configForm.adverPosition === 'a'">
  300. 系统将根据您设置的定向,选择预估效果最好的广告位进行投放,并触达尽可能多的目标用户
  301. </p>
  302. <div v-if="configForm.adverPosition === 'c'" class="position-radio-change">
  303. <p>位置选择</p>
  304. <a-radio-group v-model="configForm.radioChangeValue">
  305. <a-radio :style="radioStyle" value="VIDEO_SCENE">沉浸式竖版视频场景</a-radio>
  306. <a-radio :style="radioStyle" value="FEED_SCENE">信息流场景</a-radio>
  307. <a-radio :style="radioStyle" value="TAIL_SCENE">视频后贴和尾帧场景</a-radio>
  308. </a-radio-group>
  309. </div>
  310. <div v-if="configForm.adverPosition === 'b'" class="position-radio-change">
  311. <p>位置选择</p>
  312. <a-checkbox-group v-model="configForm.checkboxChangeValue" @change="NewCheckboxChangeValue">
  313. <a-checkbox :style="radioStyle" value="INVENTORY_FEED">今日头条</a-checkbox>
  314. <a-checkbox :style="radioStyle" value="INVENTORY_VIDEO_FEED">西瓜视频</a-checkbox>
  315. <a-checkbox :style="radioStyle" value="INVENTORY_HOTSOON_FEED">抖音火山版</a-checkbox>
  316. <a-checkbox :style="radioStyle" value="INVENTORY_AWEME_FEED">抖音短视频</a-checkbox>
  317. <a-checkbox :style="radioStyle" value="INVENTORY_UNION_SLOT">穿山甲</a-checkbox>
  318. <a-checkbox :style="radioStyle" value="UNION_BOUTIQUE_GAME">ohayoo精品游戏</a-checkbox>
  319. <a-checkbox :style="radioStyle" value="INVENTORY_TOMATO_NOVEL">番茄小说</a-checkbox>
  320. </a-checkbox-group>
  321. </div>
  322. </div>
  323. <a-form-model-item v-if="configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT'" label="投放形式">
  324. <a-radio-group
  325. v-model="configForm.adUnionVideoType"
  326. button-style="solid"
  327. @change="handleAdUnionVideoType"
  328. >
  329. <a-radio-button value="REWARDED_VIDEO">
  330. 激励视频
  331. <a-tooltip placement="top">
  332. <template slot="title">
  333. <span>特定场景下用户通过观看视频广告以换取游戏/应用内虚拟奖励的广告</span>
  334. </template>
  335. <a-icon type="question-circle"/>
  336. </a-tooltip>
  337. </a-radio-button>
  338. <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
  339. <a-radio-button value="SPLASH_VIDEO">开屏</a-radio-button>
  340. </a-radio-group>
  341. </a-form-model-item>
  342. </div>
  343. <div class="separate-module-con">
  344. <a-tabs v-model="configForm.adDirectionalFlag" @change="changeAdDirection">
  345. <a-tab-pane key="add" tab="新建定向">
  346. <p class="rock-title">用户定向</p>
  347. <a-form-model-item label="地域">
  348. <a-radio-group
  349. v-model="configForm.adDistrict"
  350. button-style="solid"
  351. @change="handleAdDistrict"
  352. >
  353. <a-radio-button value="NONE">不限</a-radio-button>
  354. <a-radio-button value="CITY">按省市</a-radio-button>
  355. <a-radio-button value="COUNTY" disabled>按区县</a-radio-button>
  356. </a-radio-group>
  357. </a-form-model-item>
  358. <div v-if="configForm.adDistrict === 'CITY'" class="adver-position-radio selected-city-arr">
  359. <link-multi-select
  360. title="省份"
  361. :listArr="listArr"
  362. :maxLayers="2"
  363. :listUrl="regionCityListUrl"
  364. @getSelectedArr="getSelectedCityArr"
  365. @checkedShowList="handleCheckedShowList"
  366. >
  367. </link-multi-select>
  368. <a-radio-group class="city-arr-radio-group" v-model="configForm.adLocationType">
  369. <a-radio value="HOME">居住在该地区的用户</a-radio>
  370. <a-radio value="TRAVEL"> 到该地区旅行的用户</a-radio>
  371. <a-radio value="ALL">该地区内的所有用户</a-radio>
  372. <a-radio value="CURRENT">正在该地区的用户</a-radio>
  373. </a-radio-group>
  374. </div>
  375. <a-form-model-item label="性别">
  376. <a-radio-group v-model="configForm.adGender" button-style="solid">
  377. <a-radio-button value="NONE">不限</a-radio-button>
  378. <a-radio-button value="GENDER_MALE">男</a-radio-button>
  379. <a-radio-button value="GENDER_FEMALE">女</a-radio-button>
  380. </a-radio-group>
  381. </a-form-model-item>
  382. <a-form-model-item label="年龄">
  383. <radio-check v-model="configForm.adSelectAge" :options="ageArr" @change="getAgeSelect"></radio-check>
  384. </a-form-model-item>
  385. <a-form-model-item label="行为兴趣">
  386. <a-radio-group
  387. v-model="configForm.adInterestActionMode"
  388. button-style="solid"
  389. >
  390. <a-radio-button value="UNLIMITED">不限</a-radio-button>
  391. <a-radio-button value="RECOMMEND">
  392. 系统推荐
  393. <a-tooltip placement="top">
  394. <template slot="title">
  395. <span>若与自定义人群包同时使用,选择定向人群时系统推荐定向不生效</span>
  396. </template>
  397. <a-icon type="question-circle" />
  398. </a-tooltip>
  399. </a-radio-button>
  400. <a-radio-button value="CUSTOM" disabled>自定义</a-radio-button>
  401. </a-radio-group>
  402. </a-form-model-item>
  403. <a-form-model-item label="自定义人群">
  404. <a-radio-group
  405. v-model="configForm.customPerson"
  406. button-style="solid"
  407. @change="handleCustomPerson"
  408. >
  409. <a-radio-button value="NONE">不限</a-radio-button>
  410. <a-radio-button value="a">自定义人群</a-radio-button>
  411. </a-radio-group>
  412. </a-form-model-item>
  413. <a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
  414. <a-radio-group
  415. v-model="configForm.adRetargetingTagsType"
  416. button-style="solid"
  417. @change="handleDirectionalLogic"
  418. >
  419. <a-radio-button value="1">定向</a-radio-button>
  420. <a-radio-button value="2">排除</a-radio-button>
  421. <a-radio-button value="3">同时定向排除</a-radio-button>
  422. </a-radio-group>
  423. </a-form-model-item>
  424. <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
  425. <div style="width: 60%;">
  426. <directional-logic
  427. ref="direct"
  428. packtype="directional"
  429. multitype="alone"
  430. :defaultlist="directionalData"
  431. :valueids="configForm.adRetargetingTagsType"
  432. :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"
  433. @clearlist="handleClearlist"
  434. @clear-table-alone="handleClearTableAlone"
  435. >
  436. </directional-logic>
  437. </div>
  438. </div>
  439. <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
  440. <div style="width: 60%;">
  441. <directional-logic
  442. ref="exclude"
  443. packtype="exclude"
  444. multitype="alone"
  445. :defaultlist="directionalData"
  446. :valueids="configForm.adRetargetingTagsType"
  447. :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"
  448. @clearlist="handleClearlist"
  449. @clear-table-alone="handleClearTableLogic"
  450. >
  451. </directional-logic>
  452. </div>
  453. </div>
  454. <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
  455. <div style="width: 60%;">
  456. <directional-logic
  457. ref="twoway"
  458. packtype="twoway"
  459. multitype="all"
  460. :defaultlist="directionalData"
  461. :valueids="configForm.adRetargetingTagsType"
  462. :updatelistinclude="configForm.updateGetingInclude"
  463. :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent"
  464. @selection-exclude-event="handleExcludeEvent"
  465. @clearlist="handleClearlist"
  466. @clear-table-direct="handleClearTableAlone"
  467. @clear-table-exclude="handleClearTableLogic"
  468. >
  469. </directional-logic>
  470. </div>
  471. </div>
  472. <a-form-model-item label="媒体定向">
  473. <a-radio-group v-model="configForm.adSuperiorPopularityType" button-style="solid">
  474. <a-radio-button value="NONE">不限</a-radio-button>
  475. <a-radio-button value="GAME" disabled>游戏优质媒体</a-radio-button>
  476. <a-radio-button value="b" disabled>自定义</a-radio-button>
  477. </a-radio-group>
  478. </a-form-model-item>
  479. <a-form-model-item label="平台">
  480. <!-- <check-more-plat
  481. v-model="configForm.updateAdPlatform"
  482. :options="adPlatformOption"
  483. @change="handlePlateSelect"
  484. >
  485. </check-more-plat> -->
  486. <a-radio-group v-model="configForm.adPlatform" button-style="solid">
  487. <a-radio-button value="NONE" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">不限</a-radio-button>
  488. <a-radio-button value="IOS" :disabled="platformLoadingType === 'APP_ANDROID'">IOS</a-radio-button>
  489. <a-radio-button value="ANDROID" :disabled="platformLoadingType === 'APP_IOS'">Andriod</a-radio-button>
  490. <a-radio-button value="PC" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">PC</a-radio-button>
  491. </a-radio-group>
  492. </a-form-model-item>
  493. <a-form-model-item label="设备类型">
  494. <radio-check
  495. v-model="configForm.adDeviceSelectType"
  496. :options="deviceTypeList"
  497. @change="getAgeSelect"
  498. >
  499. </radio-check>
  500. </a-form-model-item>
  501. <a-form-model-item v-if="configForm.adDownloadUrl&&configForm.adPlatform == 'ANDROID'" label="安卓版本">
  502. <a-radio-group v-model="configForm.adAndroidVersion" button-style="solid" @change="handleAndroidVersion">
  503. <a-radio-button value="NONE">不限</a-radio-button>
  504. <a-radio-button value="a">自定义</a-radio-button>
  505. </a-radio-group>
  506. </a-form-model-item>
  507. <div class="adver-position-radio">
  508. <div v-if="configForm.adDownloadUrl && configForm.adAndroidVersion === 'a'" class="position-radio-change">
  509. <p>安卓版本</p>
  510. <a-radio-group v-model="configForm.androidChangeValue">
  511. <a-radio :style="radioStyle" value="9.0">Andriod 9.0及以上</a-radio>
  512. <a-radio :style="radioStyle" value="8.1">Andriod 8.1及以上</a-radio>
  513. <a-radio :style="radioStyle" value="8.0">Andriod 8.0及以上</a-radio>
  514. <a-radio :style="radioStyle" value="7.1">Andriod 7.1及以上</a-radio>
  515. <a-radio :style="radioStyle" value="7.0">Andriod 7.0及以上</a-radio>
  516. <a-radio :style="radioStyle" value="6.0">Andriod 6.0及以上</a-radio>
  517. <a-radio :style="radioStyle" value="5.1">Andriod 5.1及以上</a-radio>
  518. </a-radio-group>
  519. </div>
  520. </div>
  521. <a-form-model-item label="网络">
  522. <radio-check v-model="configForm.adSelectAc" :options="adAcList" @change="getAgeSelect"></radio-check>
  523. </a-form-model-item>
  524. <a-form-model-item label="已安装用户">
  525. <a-radio-group v-model="configForm.adHideIfExists" button-style="solid">
  526. <a-radio-button value="0">不限</a-radio-button>
  527. <a-radio-button value="1">过滤</a-radio-button>
  528. <a-radio-button value="2">定向</a-radio-button>
  529. </a-radio-group>
  530. </a-form-model-item>
  531. <a-form-model-item v-if="configForm.adConvertType" label="过滤已转化用户">
  532. <a-radio-group v-model="configForm.adHideIfConverted" button-style="solid" @change="handleAdhideConver">
  533. <a-radio-button
  534. v-for="item in adHideIfConvertedDataOption"
  535. :key="item.id"
  536. :value="item.id"
  537. >
  538. {{ item.name }}
  539. </a-radio-button>
  540. </a-radio-group>
  541. </a-form-model-item>
  542. <a-form-model-item v-if="configForm.adHideIfConverted === 'CUSTOMER' || configForm.adHideIfConverted === 'APP'" label="过滤时间">
  543. <a-radio-group v-model="configForm.adConvertedTimeDuration" button-style="solid">
  544. <a-radio-button value="ONE_MONTH">1个月</a-radio-button>
  545. <a-radio-button value="THREE_MONTH">3个月</a-radio-button>
  546. <a-radio-button value="SIX_MONTH">6个月</a-radio-button>
  547. <a-radio-button value="TWELVE_MONTH">12个月</a-radio-button>
  548. </a-radio-group>
  549. <a-tooltip placement="top">
  550. <template slot="title">
  551. <span>对已转化过的用户避免再次投放的时间</span>
  552. </template>
  553. <a-icon class="form-itrm-icon" style="left: -90px;" type="question-circle"/>
  554. </a-tooltip>
  555. </a-form-model-item>
  556. <a-form-model-item label="智能放量">
  557. <a-radio-group
  558. :disabled="!adAutoExtendList.length"
  559. v-model="configForm.adAutoExtendEnabled"
  560. button-style="solid"
  561. @change="handleAdAutoExtend"
  562. >
  563. <a-radio-button value="0">不开启</a-radio-button>
  564. <a-radio-button value="1">开启</a-radio-button>
  565. </a-radio-group>
  566. <a-tooltip placement="top">
  567. <template slot="title">
  568. <span>智能放量可以帮您逐步探索已选定向人群之外的目标人群,提升跑量。已选择定向建议放开</span>
  569. </template>
  570. <a-icon class="form-itrm-icon" style="left: -90px;" type="question-circle"/>
  571. </a-tooltip>
  572. </a-form-model-item>
  573. <div v-if="configForm.adAutoExtendEnabled === '1'" class="adver-position-radio" style="width: 70%;">
  574. <auto-select
  575. :defaultlist="adAutoExtendList"
  576. :editdata="AutoExtendEditSelect"
  577. @select-finally-result="handleSelectTxtend"
  578. >
  579. </auto-select>
  580. </div>
  581. </a-tab-pane>
  582. <a-tab-pane key="choice" tab="选择定向包">
  583. <a-form-model-item class="select-orientation-class" label="选择已有定向包" :prop="configForm.adDirectionalFlag === 'choice' ? 'adAudiencePackageId' : ''">
  584. <a-select
  585. class="common-input-long"
  586. style="width: 320px;"
  587. v-model="configForm.adAudiencePackageId"
  588. allow-clear
  589. placeholder="请选择已有定向包名称"
  590. :disabled="selectOrientPlaceholder !== 'able'"
  591. @change="handleSelectiveOrientation"
  592. >
  593. <a-select-option
  594. v-for="(item, index) in selectiveList"
  595. :key="index"
  596. :value="item.audience_package_id"
  597. >
  598. <div class="orient-list">
  599. <span class="orient-option-left" style="display: inline-block;width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span>
  600. <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>
  601. </div>
  602. </a-select-option>
  603. </a-select>
  604. <span style="margin-left: 20px;">
  605. <a-button :disabled="selectOrientPlaceholder !== 'able'" type="primary" @click="handleAsyncPackage">同步定向包</a-button>
  606. </span>
  607. <a-tooltip placement="top">
  608. <template slot="title">
  609. <span>已有定向包只展示当前推广目的和投放范围下,定向功能升级后仍可用的定向包</span>
  610. </template>
  611. <a-icon class="form-itrm-icon orientation-icon" type="question-circle"/>
  612. </a-tooltip>
  613. </a-form-model-item>
  614. <span v-if="selectOrientPlaceholder !== 'able'" style="color: #f00; margin-left: 198px;">{{ selectOrientPlaceholder }}</span>
  615. <div class="select-orientation-content">
  616. <p class="orientation-header-title">已选定向信息</p>
  617. <div v-if="packageMessageDetail.length" class="orientation-content-substance">
  618. <div class="content-substance-singal">
  619. <span class="singal-spn">定向人群包:</span>
  620. <span class="singal-content">{{ packageMessageDetail[0].description }}</span>
  621. </div>
  622. <div class="content-substance-singal">
  623. <span class="singal-spn">地域:</span>
  624. <span class="singal-content">{{ packageMessageDetail[0].replaceCitys }}</span>
  625. </div>
  626. <div class="content-substance-singal">
  627. <span class="singal-spn">性别:</span>
  628. <span class="singal-content">{{ packageMessageDetail[0].replaceSex }}</span>
  629. </div>
  630. <div class="content-substance-singal">
  631. <span class="singal-spn">年龄:</span>
  632. <span class="singal-content">{{ packageMessageDetail[0].replaceAge }}</span>
  633. </div>
  634. <div class="content-substance-singal">
  635. <span class="singal-spn">平台:</span>
  636. <span class="singal-content">{{ packageMessageDetail[0].replacePlate }}</span>
  637. </div>
  638. <div class="content-substance-singal">
  639. <span class="singal-spn">智能放量:</span>
  640. <span class="singal-content">{{ packageMessageDetail[0].replaceEnabled }}</span>
  641. </div>
  642. </div>
  643. <div v-else class="orientation-content-msg">
  644. <div class="icon"><a-icon type="container"/></div>
  645. <div>请在上方选择一个已有定向包</div>
  646. </div>
  647. </div>
  648. </a-tab-pane>
  649. </a-tabs>
  650. </div>
  651. <div class="separate-module-con">
  652. <p class="rock-title">预算与出价</p>
  653. <a-form-model-item label="投放场景">
  654. <a-radio-group v-model="configForm.adSmartBidType" button-style="solid">
  655. <a-radio-button value="SMART_BID_CUSTOM" :disabled="modalTitle === 'edit'">常规投放</a-radio-button>
  656. <a-radio-button value="SMART_BID_CONSERVATIVE" disabled>放量投放</a-radio-button>
  657. </a-radio-group>
  658. </a-form-model-item>
  659. <a-form-model-item label="预算">
  660. <a-input-group compact>
  661. <a-select
  662. :disabled="modalTitle === 'edit'"
  663. v-model="configForm.adBudgetMode"
  664. @change="handleBudgetMode"
  665. >
  666. <a-select-option value="BUDGET_MODE_DAY">日预算</a-select-option>
  667. <a-select-option value="BUDGET_MODE_TOTAL">总预算</a-select-option>
  668. </a-select>
  669. <a-input-number
  670. class="common-input"
  671. v-model="configForm.adBudget"
  672. :min="adBudgetNum"
  673. :max="9999999.00"
  674. :step="0.01"
  675. @blur="handleAdBudgetBlur"
  676. />
  677. </a-input-group>
  678. </a-form-model-item>
  679. <a-form-model-item label="投放时间">
  680. <a-radio-group
  681. :disabled="modalTitle === 'edit' || configForm.adBudgetMode === 'BUDGET_MODE_TOTAL'"
  682. v-model="configForm.adScheduleType"
  683. button-style="solid"
  684. @change="handleAdScheduleType"
  685. >
  686. <a-radio-button value="SCHEDULE_FROM_NOW">从今天起长期投放</a-radio-button>
  687. <a-radio-button value="SCHEDULE_START_END">设置开始和结束日期</a-radio-button>
  688. </a-radio-group>
  689. </a-form-model-item>
  690. <div class="adver-position-radio">
  691. <div v-if="configForm.adScheduleType === 'SCHEDULE_START_END'" class="position-radio-change">
  692. <a-range-picker
  693. v-model="configForm.launchDateRange"
  694. :disabled="modalTitle === 'edit'"
  695. format="YYYY-MM-DD"
  696. @change="handleLaunchData"
  697. />
  698. </div>
  699. </div>
  700. <a-form-model-item label="投放时段">
  701. <a-radio-group v-model="configForm.launchTimeInterval" button-style="solid" @change="handleLaunchTimeInterval">
  702. <a-radio-button value="buxian">不限</a-radio-button>
  703. <a-radio-button value="a">指定时间段</a-radio-button>
  704. </a-radio-group>
  705. </a-form-model-item>
  706. <div class="adver-position-radio">
  707. <div v-if="configForm.launchTimeInterval === 'a'" class="position-radio-change">
  708. <selectCheckAll
  709. style="width:100%"
  710. :scheduleTime.sync="configForm.scheduleTimeData"
  711. ref="selectCheck"
  712. />
  713. </div>
  714. </div>
  715. <a-form-model-item label="付费方式">
  716. <a-radio-group v-model="configForm.adPricing" button-style="solid">
  717. <a-radio-button value="PRICING_OCPM" :disabled="modalTitle === 'edit'">按展示付费(oCPM)</a-radio-button>
  718. </a-radio-group>
  719. </a-form-model-item>
  720. <a-form-model-item label="出价方式">
  721. <a-radio-group v-model="configForm.adBidCreateType" button-style="solid" @change="handleBiddingMethod">
  722. <a-radio-button value="FIX">固定出价</a-radio-button>
  723. <a-radio-button value="RAND">随机出价</a-radio-button>
  724. <a-radio-button value="STEP">阶梯出价</a-radio-button>
  725. </a-radio-group>
  726. </a-form-model-item>
  727. <a-form-model-item v-if="configForm.adBidCreateType === 'FIX'" label="目标转化出价" :prop="configForm.launchTarget === 'OCPM' ? 'adCpaBid' : ''">
  728. <a-input-number
  729. class="common-input"
  730. v-model="configForm.adCpaBid"
  731. :min="0.1"
  732. :step="0.01"
  733. @blur="handleAdCpaBidBlur"
  734. /> 元
  735. <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;">{{ adCpaBidBlurTxt }}</div>
  736. </a-form-model-item>
  737. <div v-if="configForm.adBidCreateType === 'RAND'">
  738. <a-form-model-item label="目标转化出价"
  739. class="dp-link-start" prop="adMinBid">
  740. <a-input-number
  741. class="common-input"
  742. v-model="configForm.adMinBid"
  743. :min="0.1"
  744. :max="10000"
  745. :step="0.01"
  746. placeholder="请输入"
  747. @blur="handleAdMinBidBlur"
  748. />
  749. <span>~</span>
  750. </a-form-model-item>
  751. <a-form-model-item class="dp-link-end" prop="adMaxBid">
  752. <a-input-number
  753. class="common-input"
  754. v-model="configForm.adMaxBid"
  755. :min="0.1"
  756. :max="10000"
  757. :step="0.01"
  758. placeholder="请输入"
  759. @blur="handleAdMaxBidBlur"
  760. /> 元
  761. </a-form-model-item>
  762. <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;margin-left: 140px;">{{ adCpaBidBlurTxt }}</div>
  763. </div>
  764. <div v-if="configForm.adBidCreateType === 'STEP'">
  765. <a-form-model-item label="目标转化出价" class="dp-link-start" prop="adMinBid">
  766. <a-input-number
  767. class="common-input"
  768. v-model="configForm.adMinBid"
  769. :min="0.1"
  770. :max="10000"
  771. :step="0.01"
  772. placeholder="请输入"
  773. @blur="handleAdMinBidBlur"
  774. />
  775. <span>~</span>
  776. </a-form-model-item>
  777. <a-form-model-item class="dp-link-end" prop="adMaxBid">
  778. <a-input-number
  779. class="common-input"
  780. v-model="configForm.adMaxBid"
  781. :min="0.1"
  782. :max="10000"
  783. :step="0.01"
  784. placeholder="请输入"
  785. @blur="handleAdMaxBidBlur"
  786. /> 元
  787. </a-form-model-item>
  788. <div v-if="isAdCpaBidBlur" style="width: 500px;color: #f00;margin-left: 140px">{{ adCpaBidBlurTxt }}</div>
  789. <a-form-model-item label="浮动间隔" prop="adStepBid">
  790. <a-input-number
  791. class="common-input"
  792. v-model="configForm.adStepBid"
  793. :min="0"
  794. :step="0.01"
  795. placeholder="请输入"
  796. @blur="handleFloatingInterval"
  797. />
  798. <span>元</span>
  799. </a-form-model-item>
  800. </div>
  801. <div v-if="deepExternalShow">
  802. <a-form-model-item label="深度优化方式" prop="deepExternal">
  803. <a-radio-group @change="adDeepBidTypeChange" v-model="configForm.adDeepBidType" button-style="solid">
  804. <a-radio-button value="DEEP_BID_MIN" >自定义双出价</a-radio-button>
  805. <a-radio-button value="AUTO_MIN_SECOND_STAGE" >自动优化</a-radio-button>
  806. </a-radio-group>
  807. </a-form-model-item>
  808. <a-form-model-item v-if="adDeepCpabidShow" label="深度转化出价" prop="adDeepCpabid">
  809. <a-input-number
  810. class="common-input"
  811. v-model="configForm.adDeepCpabid"
  812. :min="0.1"
  813. :max="10000"
  814. :step="0.01"
  815. placeholder="请输入"
  816. /> 元
  817. <!-- <a-input-number
  818. class="common-input"
  819. v-model="configForm.adDeepCpabid"
  820. :min="0.1"
  821. :max="10000"
  822. :step="0.01"
  823. placeholder="请输入"
  824. /> 元 -->
  825. </a-form-model-item>
  826. </div>
  827. </div>
  828. <!-- <div class="separate-module-con">
  829. <p class="rock-title">第三方检测链接</p>
  830. <a-form-model-item label="点击监测">
  831. <a-input
  832. class="common-input-long"
  833. placeholder="请输入链接地址"
  834. v-model="configForm.creativeActionTrackUrl"
  835. allow-clear
  836. />
  837. </a-form-model-item>
  838. </div> -->
  839. <div class="separate-module-con">
  840. <p class="rock-title">创意信息</p>
  841. <a-form-model-item v-if="!(configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_FEED')&&!configForm.adUnionVideoType" label="使用抖音号投放">
  842. <a-radio-group v-model="configForm.creativeIesCoreUserId" button-style="solid">
  843. <a-radio-button value="1">不使用</a-radio-button>
  844. <a-radio-button value="2" disabled>使用</a-radio-button>
  845. </a-radio-group>
  846. </a-form-model-item>
  847. <a-form-model-item label="创意方式">
  848. <a-radio-group v-model="configForm.creativeMaterialMode" button-style="solid">
  849. <!-- :disabled="modalTitle === 'edit' || originalityStatus" -->
  850. <a-radio-button value="STATIC_ASSEMBLE" :disabled="modalTitle === 'edit'">程序化创意</a-radio-button>
  851. <a-radio-button value="NONE" disabled>自定义创意</a-radio-button>
  852. </a-radio-group>
  853. </a-form-model-item>
  854. <div v-if="configForm.adUnionVideoType === 'REWARDED_VIDEO'">
  855. <a-form-model-item label="创意内容">
  856. <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
  857. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
  858. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
  859. </a-radio-group>
  860. </a-form-model-item>
  861. <a-form-model-item label="行动号召" prop="creativeActionText" key="REWARDED_VIDEO">
  862. <a-select
  863. class="common-input-long"
  864. v-model="configForm.creativeActionText"
  865. >
  866. <a-select-option
  867. v-for="(item, index) in creativeOptions"
  868. :key="index + 1"
  869. :value="item"
  870. >
  871. {{ item }}
  872. </a-select-option>
  873. </a-select>
  874. </a-form-model-item>
  875. <a-form-model-item label="来源" prop="creativeSource">
  876. <a-input
  877. class="common-input-long"
  878. placeholder="请输入来源"
  879. v-model="configForm.creativeSource"
  880. allow-clear
  881. />
  882. </a-form-model-item>
  883. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName24">
  884. <a-input
  885. class="common-input-long"
  886. placeholder="请输入应用名"
  887. v-model="configForm.creativeAppName"
  888. allow-clear
  889. />
  890. </a-form-model-item>
  891. <a-form-model-item label="搭配试玩">
  892. <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
  893. <a-radio-button value="a">不启用</a-radio-button>
  894. <a-radio-button value="b" disabled>启用</a-radio-button>
  895. </a-radio-group>
  896. </a-form-model-item>
  897. <a-form-model-item label="自动生成视频素材">
  898. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  899. <a-radio-button :value="0">不启用</a-radio-button>
  900. <a-radio-button :value="1">启用</a-radio-button>
  901. </a-radio-group>
  902. </a-form-model-item>
  903. <a-form-model-item label="广告语数量">
  904. <a-input-number
  905. :max="10"
  906. :min="1"
  907. v-model="configForm.copywritingNumber"
  908. :precision="0"
  909. style="width: 150px"
  910. >
  911. </a-input-number>
  912. </a-form-model-item>
  913. <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
  914. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  915. <a-radio-button :value="0">不启用</a-radio-button>
  916. <a-radio-button :value="1">启用</a-radio-button>
  917. </a-radio-group>
  918. </a-form-model-item> -->
  919. </div>
  920. <div v-else-if="configForm.adUnionVideoType === 'ORIGINAL_VIDEO'">
  921. <a-form-model-item label="创意内容">
  922. <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
  923. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
  924. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
  925. <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
  926. <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
  927. <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
  928. </a-radio-group>
  929. </a-form-model-item>
  930. <a-form-model-item label="行动号召" prop="creativeActionText" key="ORIGINAL_VIDEO">
  931. <a-select
  932. class="common-input-long"
  933. v-model="configForm.creativeActionText"
  934. >
  935. <a-select-option
  936. v-for="(item, index) in creativeOptions"
  937. :key="index + 1"
  938. :value="item"
  939. >
  940. {{ item }}
  941. </a-select-option>
  942. </a-select>
  943. </a-form-model-item>
  944. <a-form-model-item label="来源" prop="creativeSource">
  945. <a-input
  946. class="common-input-long"
  947. placeholder="请输入来源"
  948. v-model="configForm.creativeSource"
  949. allow-clear
  950. />
  951. </a-form-model-item>
  952. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName23">
  953. <a-input
  954. class="common-input-long"
  955. placeholder="请输入应用名"
  956. v-model="configForm.creativeAppName"
  957. allow-clear
  958. />
  959. </a-form-model-item>
  960. <a-form-model-item label="自动生成视频素材">
  961. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  962. <a-radio-button :value="0">不启用</a-radio-button>
  963. <a-radio-button :value="1">启用</a-radio-button>
  964. </a-radio-group>
  965. </a-form-model-item>
  966. <a-form-model-item label="广告语数量">
  967. <a-input-number
  968. :max="10"
  969. :min="1"
  970. v-model="configForm.copywritingNumber"
  971. :precision="0"
  972. style="width: 150px"
  973. >
  974. </a-input-number>
  975. </a-form-model-item>
  976. <a-form-model-item label="搭配试玩">
  977. <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
  978. <a-radio-button value="a">不启用</a-radio-button>
  979. <a-radio-button value="b" disabled>普通试玩</a-radio-button>
  980. </a-radio-group>
  981. </a-form-model-item>
  982. <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
  983. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  984. <a-radio-button :value="0">不启用</a-radio-button>
  985. <a-radio-button :value="1">启用</a-radio-button>
  986. </a-radio-group>
  987. </a-form-model-item> -->
  988. </div>
  989. <div v-else-if="configForm.adUnionVideoType === 'SPLASH_VIDEO'">
  990. <a-form-model-item label="创意内容">
  991. <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
  992. <a-radio-button value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏图片</a-radio-button>
  993. </a-radio-group>
  994. </a-form-model-item>
  995. <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO">
  996. <a-select
  997. class="common-input-long"
  998. v-model="configForm.creativeActionText"
  999. >
  1000. <a-select-option
  1001. v-for="(item, index) in creativeOptions"
  1002. :key="index + 1"
  1003. :value="item"
  1004. >
  1005. {{ item }}
  1006. </a-select-option>
  1007. </a-select>
  1008. </a-form-model-item>
  1009. <a-form-model-item label="来源" prop="creativeSource">
  1010. <a-input
  1011. class="common-input-long"
  1012. placeholder="请输入来源"
  1013. v-model="configForm.creativeSource"
  1014. allow-clear
  1015. />
  1016. </a-form-model-item>
  1017. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName25">
  1018. <a-input
  1019. class="common-input-long"
  1020. placeholder="请输入应用名"
  1021. v-model="configForm.creativeAppName"
  1022. allow-clear
  1023. />
  1024. </a-form-model-item>
  1025. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="自动生成视频素材">
  1026. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  1027. <a-radio-button :value="0">不启用</a-radio-button>
  1028. <a-radio-button :value="1">启用</a-radio-button>
  1029. </a-radio-group>
  1030. </a-form-model-item>
  1031. <!-- <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="最优创意衍生计划">
  1032. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  1033. <a-radio-button :value="0">不启用</a-radio-button>
  1034. <a-radio-button :value="1">启用</a-radio-button>
  1035. </a-radio-group>
  1036. </a-form-model-item> -->
  1037. <a-form-model-item label="广告语数量">
  1038. <a-input-number
  1039. :max="10"
  1040. :min="1"
  1041. v-model="configForm.copywritingNumber"
  1042. :precision="0"
  1043. style="width: 150px"
  1044. >
  1045. </a-input-number>
  1046. </a-form-model-item>
  1047. <a-form-model-item label="搭配试玩">
  1048. <a-radio-group v-model="configForm.creativePlayableUrl" button-style="solid">
  1049. <a-radio-button value="a">不启用</a-radio-button>
  1050. <a-radio-button value="b" disabled>普通试玩</a-radio-button>
  1051. </a-radio-group>
  1052. </a-form-model-item>
  1053. <a-form-model-item label="创意展现">
  1054. <a-radio-group v-model="configForm.creativeDisplayMode" button-style="solid">
  1055. <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
  1056. <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
  1057. </a-radio-group>
  1058. </a-form-model-item>
  1059. <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_CTR'" class="adver-position-radio">
  1060. 选择优选模式,系统会自动对效果好的创意进行展示量倾斜,创意效果越好展示量越高
  1061. </div>
  1062. <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_RANDOM'" class="adver-position-radio">
  1063. 使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
  1064. </div>
  1065. </div>
  1066. <div v-else-if="configForm.checkboxChangeValue.length === 1 && configForm.checkboxChangeValue[0] === 'INVENTORY_AWEME_FEED'">
  1067. <a-form-model-item label="创意内容">
  1068. <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
  1069. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
  1070. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO" :disabled="pictureStatus">横版视频</a-radio-button>
  1071. </a-radio-group>
  1072. </a-form-model-item>
  1073. <a-form-model-item label="创意组件" prop="componentId" key="componentIdkey"
  1074. v-if="configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE'&&configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE_VERTICAL'&&configForm.adverPosition != 'a'">
  1075. <a-input
  1076. class="common-input-long"
  1077. placeholder="请输入创意组件"
  1078. v-model="configForm.componentId"
  1079. allow-clear
  1080. />
  1081. </a-form-model-item>
  1082. <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO_ONE">
  1083. <a-select
  1084. class="common-input-long"
  1085. v-model="configForm.creativeActionText"
  1086. >
  1087. <a-select-option
  1088. v-for="(item, index) in creativeOptions"
  1089. :key="index + 1"
  1090. :value="item"
  1091. >
  1092. {{ item }}
  1093. </a-select-option>
  1094. </a-select>
  1095. </a-form-model-item>
  1096. <a-form-model-item label="来源" :prop="getSource">
  1097. <a-input
  1098. class="common-input-long"
  1099. placeholder="请输入来源"
  1100. v-model="configForm.creativeSource"
  1101. allow-clear
  1102. />
  1103. </a-form-model-item>
  1104. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName26">
  1105. <a-input
  1106. class="common-input-long"
  1107. placeholder="请输入应用名"
  1108. v-model="configForm.creativeAppName"
  1109. allow-clear
  1110. />
  1111. </a-form-model-item>
  1112. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL' && platformLoadingType === 'APP_ANDROID'" label="副标题">
  1113. <a-input
  1114. class="common-input-long"
  1115. placeholder="请输入副标题"
  1116. v-model="configForm.creativeSubTitle"
  1117. allow-clear
  1118. @blur="handleCreativeSubTitleBlur"
  1119. />
  1120. </a-form-model-item>
  1121. <div v-if="subTitleMsgStatus" style="width: 500px;color: #f00;margin-left: 140px">{{ subTitleMsg }}</div>
  1122. <a-form-model-item label="自动生成视频素材">
  1123. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  1124. <a-radio-button :value="0">不启用</a-radio-button>
  1125. <a-radio-button :value="1">启用</a-radio-button>
  1126. </a-radio-group>
  1127. </a-form-model-item>
  1128. <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
  1129. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  1130. <a-radio-button :value="0">不启用</a-radio-button>
  1131. <a-radio-button :value="1">启用</a-radio-button>
  1132. </a-radio-group>
  1133. </a-form-model-item> -->
  1134. <a-form-model-item label="广告评论">
  1135. <a-radio-group v-model="configForm.creativeIsCommentDisable" button-style="solid">
  1136. <a-radio-button :value="1">关闭</a-radio-button>
  1137. <a-radio-button :value="0">开启</a-radio-button>
  1138. </a-radio-group>
  1139. </a-form-model-item>
  1140. <a-form-model-item label="广告语数量">
  1141. <a-input-number
  1142. :max="10"
  1143. :min="1"
  1144. v-model="configForm.copywritingNumber"
  1145. :precision="0"
  1146. style="width: 150px"
  1147. >
  1148. </a-input-number>
  1149. </a-form-model-item>
  1150. <a-form-model-item label="客户端下载视频">
  1151. <a-radio-group v-model="configForm.creativeDownloadStatus" button-style="solid">
  1152. <a-radio-button :value="1">关闭</a-radio-button>
  1153. <a-radio-button :value="0">开启</a-radio-button>
  1154. </a-radio-group>
  1155. </a-form-model-item>
  1156. </div>
  1157. <div v-else>
  1158. <a-form-model-item label="创意内容" v-if="creativeImageShow">
  1159. <a-radio-group v-model="configForm.creativeImageMode" button-style="solid" @change="handleChangeCreativeType">
  1160. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
  1161. <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO" :disabled="pictureStatus">横版视频</a-radio-button>
  1162. <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE" :disabled="pictureStatus">大图横图</a-radio-button>
  1163. <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
  1164. <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL" :disabled="pictureStatus">大图竖图</a-radio-button>
  1165. </a-radio-group>
  1166. </a-form-model-item>
  1167. <a-form-model-item label="创意内容" v-else="creativeImageShow">
  1168. <radio-check v-model="configForm.creativeImageMode" :options="creativeImageModeArr"></radio-check>
  1169. </a-form-model-item>
  1170. <a-form-model-item label="创意组件" prop="componentId" key="componentIdkey"
  1171. v-if="configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE'&&configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE_VERTICAL'&&configForm.adverPosition != 'a'">
  1172. <a-input
  1173. class="common-input-long"
  1174. placeholder="请输入创意组件"
  1175. v-model="configForm.componentId"
  1176. allow-clear
  1177. />
  1178. </a-form-model-item>
  1179. <a-form-model-item label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO_ONE">
  1180. <a-select
  1181. class="common-input-long"
  1182. v-model="configForm.creativeActionText"
  1183. >
  1184. <a-select-option
  1185. v-for="(item, index) in creativeOptions"
  1186. :key="index + 1"
  1187. :value="item"
  1188. >
  1189. {{ item }}
  1190. </a-select-option>
  1191. </a-select>
  1192. </a-form-model-item>
  1193. <a-form-model-item label="来源" :prop="getSource">
  1194. <a-input
  1195. class="common-input-long"
  1196. placeholder="请输入来源"
  1197. v-model="configForm.creativeSource"
  1198. allow-clear
  1199. />
  1200. </a-form-model-item>
  1201. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'&&configForm.adverPosition != 'a'" label="应用名" prop="creativeAppName" key="creativeAppName26">
  1202. <a-input
  1203. class="common-input-long"
  1204. placeholder="请输入应用名"
  1205. v-model="configForm.creativeAppName"
  1206. allow-clear
  1207. />
  1208. </a-form-model-item>
  1209. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL' && platformLoadingType === 'APP_ANDROID'" label="副标题">
  1210. <a-input
  1211. class="common-input-long"
  1212. placeholder="请输入副标题"
  1213. v-model="configForm.creativeSubTitle"
  1214. allow-clear
  1215. @blur="handleCreativeSubTitleBlur"
  1216. />
  1217. </a-form-model-item>
  1218. <div v-if="subTitleMsgStatus" style="width: 500px;color: #f00;margin-left: 140px">{{ subTitleMsg }}</div>
  1219. <a-form-model-item label="自动生成视频素材">
  1220. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  1221. <a-radio-button :value="0">不启用</a-radio-button>
  1222. <a-radio-button :value="1">启用</a-radio-button>
  1223. </a-radio-group>
  1224. </a-form-model-item>
  1225. <!-- <a-form-model-item v-if="configForm.adDownloadType === 'EXTERNAL_URL'" label="最优创意衍生计划">
  1226. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  1227. <a-radio-button :value="0">不启用</a-radio-button>
  1228. <a-radio-button :value="1">启用</a-radio-button>
  1229. </a-radio-group>
  1230. </a-form-model-item> -->
  1231. <a-form-model-item label="广告评论">
  1232. <a-radio-group v-model="configForm.creativeIsCommentDisable" button-style="solid">
  1233. <a-radio-button :value="1">关闭</a-radio-button>
  1234. <a-radio-button :value="0">开启</a-radio-button>
  1235. </a-radio-group>
  1236. </a-form-model-item>
  1237. <a-form-model-item label="广告语数量">
  1238. <a-input-number
  1239. :max="10"
  1240. :min="1"
  1241. v-model="configForm.copywritingNumber"
  1242. :precision="0"
  1243. style="width: 150px"
  1244. >
  1245. </a-input-number>
  1246. </a-form-model-item>
  1247. <a-form-model-item label="客户端下载视频">
  1248. <a-radio-group v-model="configForm.creativeDownloadStatus" button-style="solid">
  1249. <a-radio-button :value="1">关闭</a-radio-button>
  1250. <a-radio-button :value="0">开启</a-radio-button>
  1251. </a-radio-group>
  1252. </a-form-model-item>
  1253. </div>
  1254. </div>
  1255. <div class="separate-module-con">
  1256. <p class="rock-title">创意分类</p>
  1257. <a-form-model-item label="创意分类">
  1258. <a-cascader
  1259. v-model="configForm.creativeThirdIndustryIds"
  1260. class="common-input-long"
  1261. :options="createOptions"
  1262. :fieldNames="fieldNames"
  1263. placeholder="请选择创意分类"
  1264. />
  1265. </a-form-model-item>
  1266. <a-form-model-item label="创意标签">
  1267. <a-select
  1268. v-model="configForm.creativeLabel"
  1269. :token-separators="[',', ' ', ',']"
  1270. mode="tags"
  1271. style="width: 320px"
  1272. placeholder="按回车生成标签"
  1273. dropdownClassName="display-none-selset"
  1274. @change="handleEnterChang"
  1275. >
  1276. </a-select>
  1277. </a-form-model-item>
  1278. <div class="adver-position-radio">
  1279. <div class="creative-label-content">
  1280. <p>已选:{{ creativeTag.length || 0 }}</p>
  1281. <div class="label-content-select-tag">
  1282. <a-tag
  1283. v-for="item in creativeTag"
  1284. :key="item"
  1285. :closable="true"
  1286. class="tag-select-class"
  1287. @close="handleTagsClose(item)"
  1288. >
  1289. {{ item }}
  1290. </a-tag>
  1291. </div>
  1292. </div>
  1293. </div>
  1294. </div>
  1295. <div class="separate-module-con btn-Unique-con">
  1296. <a-button class="sure-btn" type="primary" :loading="sureLoading" @click="handleRelaxSure">确定</a-button>
  1297. <a-button class="cancel-btn" @click="handleRelaxCancel">取消</a-button>
  1298. </div>
  1299. </a-spin>
  1300. </a-form-model>
  1301. </div>
  1302. <a-modal
  1303. v-if="isWebUrl"
  1304. title="使用落地页"
  1305. :visible="isWebUrl"
  1306. dialog-class="web-url-modal"
  1307. :footer="false"
  1308. @cancel="handleCancelAll"
  1309. >
  1310. <div class="mater-viedo-content">
  1311. <a-row class="viedo-serach-class" :gutter="24">
  1312. <a-col :span="9">
  1313. <a-form-item label="落地页名称" :labelCol="modalCol" :wrapperCol="modalWrapper">
  1314. <a-input v-model="weburlModel" placeholder="请输入落地页名称关键字"/>
  1315. </a-form-item>
  1316. </a-col>
  1317. <a-col :span="8">
  1318. <a-button type="primary" style="position: relative;top: 4px;" @click="handleWebUrlSearch">搜索</a-button>
  1319. <a-button type="primary" style="position: relative;top: 4px;margin-left: 15px;" @click="handleWebUrlUpdate">重置</a-button>
  1320. </a-col>
  1321. </a-row>
  1322. <div class="viedo-content-class">
  1323. <div v-if="viedoDefaultList.length" class="viedo-content-group">
  1324. <li
  1325. class="content-modal-li"
  1326. v-for="(item, index) in viedoDefaultList"
  1327. :key="index"
  1328. @click="handleViedoListClick(item)"
  1329. >
  1330. <img v-if="item.thumbnail" :src="item.thumbnail"/>
  1331. <img v-else src="@/assets/noImg.png"/>
  1332. <div class="checkbox-select-show"><a>{{ item.name }}</a></div>
  1333. <div class="checkbox-select-time">ID:{{ item.siteId }}</div>
  1334. </li>
  1335. </div>
  1336. <div v-else class="no-data-group">
  1337. 暂无数据
  1338. </div>
  1339. </div>
  1340. </div>
  1341. </a-modal>
  1342. </div>
  1343. </template>
  1344. <script>
  1345. import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
  1346. import SelectCheckAll from '../../BatchCreate/toutiaoTime';
  1347. import radioCheck from '@/components/formComponents/checkBoxGroup';
  1348. import linkMultiSelect from '@/views/modules/BatchCreate/linkMultiSelect';
  1349. import DirectionalLogic from './directional-logic/directional-logic';
  1350. import AutoSelect from './tree-select/tree-select';
  1351. import CheckMorePlat from './check-more-plat/check-more-plat';
  1352. import moment from 'moment';
  1353. import BMF from 'browser-md5-file';
  1354. import {urlAcount} from '../account-config-server.js';
  1355. import {getAction, postAction, putAction} from '@/api/manage';
  1356. import {mapGetters} from 'vuex';
  1357. let COS = require('cos-js-sdk-v5');
  1358. let cos = new COS({
  1359. SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
  1360. SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
  1361. });
  1362. let str = '';
  1363. for (let i = 0; i < 7 * 48; i++) {
  1364. str += '0';
  1365. }
  1366. export default {
  1367. name: 'configuration-modal',
  1368. props: {
  1369. visible: {
  1370. type: Boolean,
  1371. default: false
  1372. }
  1373. },
  1374. components: {
  1375. AcountSearch,
  1376. SelectCheckAll,
  1377. radioCheck,
  1378. linkMultiSelect,
  1379. DirectionalLogic,
  1380. AutoSelect,
  1381. CheckMorePlat
  1382. },
  1383. data() {
  1384. let handleConfirmValue = (rule, value, callback) => {
  1385. 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.,?'\\+&%$#=~_-]+))*$/;
  1386. if (urlregex.test(value)) {
  1387. callback();
  1388. }
  1389. else {
  1390. callback('请输入正确的格式');
  1391. }
  1392. };
  1393. let handleCharacterLen100 = (rule, value, callback) => {
  1394. this.handleExportRules(value, 1, 100, callback);
  1395. };
  1396. let handleCharacterLen20 = (rule, value, callback) => {
  1397. this.handleExportRules(value, 4, 20, callback);
  1398. };
  1399. let handleCharacterLenCreativeApp = (rule, value, callback) => {
  1400. this.handleExportRules(value, 4, 20, callback);
  1401. };
  1402. let floatingIntervalValidator = (rule, value, callback) => {
  1403. const finallyResult = Number(this.configForm.adMinBid) + Number(value);
  1404. if (finallyResult < Number(this.configForm.adMaxBid)) {
  1405. callback();
  1406. }
  1407. else {
  1408. callback('最低出价+浮动间隔<最高出价');
  1409. }
  1410. };
  1411. let adMinBidValidator = (rule, value, callback) => {
  1412. const finallyResult = Number(this.configForm.adMaxBid);
  1413. if (finallyResult && value && Number(value) < finallyResult) {
  1414. this.$refs['ruleForm'].clearValidate(['adMaxBid']);
  1415. callback();
  1416. }
  1417. else {
  1418. callback('最低出价不能高于最高出价');
  1419. }
  1420. };
  1421. let adMaxBidValidator = (rule, value, callback) => {
  1422. const finallyResult = Number(this.configForm.adMinBid);
  1423. if (finallyResult && value && Number(value) > finallyResult) {
  1424. this.$refs['ruleForm'].clearValidate(['adMinBid']);
  1425. callback();
  1426. }
  1427. else {
  1428. callback('最高出价不能低于最低出价');
  1429. }
  1430. };
  1431. let budgetValidator = (rule, value, callback) => {
  1432. if (this.modalTitle === 'edit') {
  1433. if(this.defaultAdBudget!=''){
  1434. if (Number(value) > Number(this.defaultAdBudget) && Number(value) < (Number(this.defaultAdBudget) + 100)) {
  1435. callback('单次修改预算幅度, 不能低于100.0元');
  1436. }
  1437. else if (Number(value) < Number(this.defaultAdBudget) && Number(value) > (Number(this.defaultAdBudget) - 100)) {
  1438. callback('单次修改预算幅度, 不能低于100.0元');
  1439. }
  1440. else {
  1441. callback();
  1442. }
  1443. }
  1444. else {
  1445. callback();
  1446. }
  1447. }
  1448. else if (this.modalTitle === 'add') {
  1449. callback();
  1450. }
  1451. else if (this.modalTitle === 'copy') {
  1452. if(this.defaultAdBudget!=''){
  1453. if (Number(value) > Number(this.defaultAdBudget) && Number(value) < (Number(this.defaultAdBudget) + 100)) {
  1454. callback('单次修改预算幅度, 不能低于100.0元');
  1455. }
  1456. else if (Number(value) < Number(this.defaultAdBudget) && Number(value) > (Number(this.defaultAdBudget) - 100)) {
  1457. callback('单次修改预算幅度, 不能低于100.0元');
  1458. }
  1459. else {
  1460. callback();
  1461. }
  1462. }
  1463. else {
  1464. callback();
  1465. }
  1466. }
  1467. };
  1468. return {
  1469. spinning: false,
  1470. landingPageShowData: {},
  1471. weburlModel: '',
  1472. modalCol: {
  1473. lg: {span: 6},
  1474. sm: {span: 6},
  1475. xs: {span: 6},
  1476. md: {span: 6}
  1477. },
  1478. modalWrapper: {
  1479. lg: {span: 18},
  1480. sm: {span: 18},
  1481. xs: {span: 14},
  1482. md: {span: 14}
  1483. },
  1484. viedoDefaultList: [],
  1485. viedoDefaultListUpdate: [],
  1486. isWebUrl: false,
  1487. sureLoading: false,
  1488. subTitleMsgStatus: false,
  1489. subTitleMsg: '',
  1490. AutoExtendEditSelect: [],
  1491. adPlatformOption: [
  1492. {
  1493. value: 'NONE',
  1494. label: '不限'
  1495. },
  1496. {
  1497. value: 'IOS',
  1498. label: 'IOS'
  1499. },
  1500. {
  1501. value: 'ANDROID',
  1502. label: 'ANDROID'
  1503. },
  1504. {
  1505. value: 'PC',
  1506. label: 'PC'
  1507. }
  1508. ],
  1509. adAutoExtendList: [],
  1510. directionalData: [],
  1511. platformLoadingType: '',
  1512. deviceTypeList: [
  1513. {
  1514. value: 'NONE',
  1515. label: '不限'
  1516. },
  1517. {
  1518. value: 'MOBILE',
  1519. label: '智能手机'
  1520. },
  1521. {
  1522. value: 'PAD',
  1523. label: '平板'
  1524. }
  1525. ],
  1526. adAcList: [
  1527. {
  1528. value: 'NONE',
  1529. label: '不限'
  1530. },
  1531. {
  1532. value: 'WIFI',
  1533. label: 'WI-FI'
  1534. },
  1535. {
  1536. value: '2G',
  1537. label: '2G'
  1538. },
  1539. {
  1540. value: '3G',
  1541. label: '3G'
  1542. },
  1543. {
  1544. value: '4G',
  1545. label: '4G'
  1546. }
  1547. ],
  1548. adHideIfConvertedDataOption: [ // 过滤已转化用户option
  1549. {
  1550. id: 'NO_EXCLUDE',
  1551. name: '不限'
  1552. },
  1553. {
  1554. id: 'AD',
  1555. name: '广告计划'
  1556. },
  1557. {
  1558. id: 'CAMPAIGN',
  1559. name: '广告组'
  1560. },
  1561. {
  1562. id: 'ADVERTISER',
  1563. name: '广告账户'
  1564. },
  1565. {
  1566. id: 'CUSTOMER',
  1567. name: '公司账户'
  1568. },
  1569. {
  1570. id: 'APP',
  1571. name: 'APP'
  1572. }
  1573. ],
  1574. packageMessageDetail: [],
  1575. selectiveList: [],
  1576. isLadderBlur: false,
  1577. ladderBlurTxt: '',
  1578. isAdCpaBid11Blur: false,
  1579. adCpaBid11BlurTxt: '',
  1580. isAdCpaBidBlur: false,
  1581. adCpaBidBlurTxt: '',
  1582. listArr: [],
  1583. regionCityListUrl: 'ctop/bytedanceAreaInfo/list',
  1584. defaultAdBudget: '',
  1585. adBudgetNum: 300,
  1586. campaignStatus: false,
  1587. detailData: {},
  1588. modalTitle: '',
  1589. toolConvertList: [],
  1590. optimizationOption: [],
  1591. md5Result: '',
  1592. urlResult: '',
  1593. createOptions: [],
  1594. campaignTags: ['序号', '日期'],
  1595. adNameTags: ['序号', '出价方式', '素材名称', '日期', '创意方式'],
  1596. fieldNames: {
  1597. label: 'industryName',
  1598. value: 'industryId',
  1599. children: 'children'
  1600. },
  1601. promotionTypeList: [
  1602. {
  1603. value: 'EXTERNAL',
  1604. label: '落地页'
  1605. },
  1606. {
  1607. value: 'ARTICLE',
  1608. label: '文章推广'
  1609. },
  1610. {
  1611. value: 'GOODS',
  1612. label: '商品推广'
  1613. },
  1614. {
  1615. value: 'DPA',
  1616. label: '商品目录'
  1617. },
  1618. {
  1619. value: 'STORE',
  1620. label: '门店推广'
  1621. },
  1622. {
  1623. value: 'AWEME',
  1624. label: '抖音号推广'
  1625. },
  1626. {
  1627. value: 'SHOP',
  1628. label: '店铺直投'
  1629. },
  1630. {
  1631. value: 'APP_ANDROID',
  1632. label: '应用下载-安卓'
  1633. },
  1634. {
  1635. value: 'APP_IOS',
  1636. label: '应用下载-IOS'
  1637. }
  1638. ],
  1639. ageArr: [
  1640. {
  1641. value: 'NONE',
  1642. label: '不限'
  1643. },
  1644. {
  1645. value: 'AGE_BETWEEN_18_23',
  1646. label: '18-23岁'
  1647. },
  1648. {
  1649. value: 'AGE_BETWEEN_24_30',
  1650. label: '24-30岁'
  1651. },
  1652. {
  1653. value: 'AGE_BETWEEN_31_40',
  1654. label: '31-40岁'
  1655. },
  1656. {
  1657. value: 'AGE_BETWEEN_41_49',
  1658. label: '41-49岁'
  1659. },
  1660. {
  1661. value: 'AGE_ABOVE_50',
  1662. label: '50岁+'
  1663. }
  1664. ],
  1665. creativeImageModeArr:[
  1666. {
  1667. value:"CREATIVE_IMAGE_MODE_VIDEO_VERTICAL",
  1668. label:'竖版视频'
  1669. },{
  1670. value:"CREATIVE_IMAGE_MODE_VIDEO",
  1671. label:'横版视频'
  1672. },{
  1673. value:"CREATIVE_IMAGE_MODE_LARGE",
  1674. label:'大图横图'
  1675. },{
  1676. value:"CREATIVE_IMAGE_MODE_SMALL",
  1677. label:'小图',
  1678. disabled:true
  1679. },{
  1680. value:"CREATIVE_IMAGE_MODE_LARGE_VERTICAL",
  1681. label:"大图竖图"
  1682. }
  1683. ],
  1684. fileList: [],
  1685. isCoverImgDiv: false,
  1686. imageUrl: '',
  1687. creativeTag: [],
  1688. radioStyle: {
  1689. display: 'block',
  1690. height: '30px',
  1691. lineHeight: '30px',
  1692. marginLeft: 0
  1693. },
  1694. labelCol: {span: 4},
  1695. wrapperCol: {span: 14},
  1696. creativeOptions: [],
  1697. rules: {
  1698. componentId: [
  1699. {required: true, message: '请输入创意组件', trigger: 'blur'}
  1700. ],
  1701. creativeAppName: [
  1702. {required: true, message: '请输入', trigger: 'blur'},
  1703. {validator: handleCharacterLenCreativeApp, trigger: 'blur'}
  1704. ],
  1705. adExternalUrl: [
  1706. {required: true, message: '请输入', trigger: 'blur'},
  1707. {validator: handleConfirmValue, trigger: 'blur'}
  1708. ],
  1709. adPackage: [
  1710. {required: true, message: '请输入', trigger: 'blur'}
  1711. ],
  1712. adDownloadUrl: [
  1713. {required: true, message: '请输入', trigger: 'blur'},
  1714. {validator: handleConfirmValue, trigger: 'blur'}
  1715. ],
  1716. campaignCnt: [
  1717. {required: true, message: '请输入', trigger: 'blur'}
  1718. ],
  1719. campaignAdCnt: [
  1720. {required: true, message: '请输入', trigger: 'blur'}
  1721. ],
  1722. dpLinkStartIndex: [
  1723. {required: true, message: '请输入', trigger: 'blur'}
  1724. ],
  1725. dpLinkEndIndex: [
  1726. {required: true, message: '请输入', trigger: 'blur'}
  1727. ],
  1728. accountBudget: [
  1729. {required: true, message: '请输入', trigger: 'blur'},
  1730. {validator: budgetValidator, trigger: 'blur'}
  1731. ],
  1732. campaignName: [
  1733. {required: true, message: '请输入广告组名称', trigger: 'blur'},
  1734. {validator: handleCharacterLen100, trigger: 'blur'}
  1735. ],
  1736. creativeSource: [
  1737. {required: true, message: '请输入', trigger: 'blur'},
  1738. {validator: handleCharacterLen20, trigger: 'blur'}
  1739. ],
  1740. adCpaBid: [
  1741. {required: true, message: '请输入', trigger: 'blur'}
  1742. ],
  1743. adStepBid: [
  1744. {required: true, message: '请输入', trigger: 'blur'},
  1745. {validator: floatingIntervalValidator, trigger: 'blur'}
  1746. ],
  1747. adMinBid: [
  1748. {required: true, message: '请输入最低出价', trigger: 'blur'},
  1749. {validator: adMinBidValidator, trigger: 'blur'}
  1750. ],
  1751. adMaxBid: [
  1752. {required: true, message: '请输入最高出价', trigger: 'blur'},
  1753. {validator: adMaxBidValidator, trigger: 'blur'}
  1754. ],
  1755. adName: [
  1756. {required: true, message: '请输入广告计划名称', trigger: 'blur'},
  1757. {validator: handleCharacterLen100, trigger: 'blur'}
  1758. ],
  1759. creativeProductDescription: [
  1760. {required: true, message: '请输入', trigger: 'blur'},
  1761. {min: 1, max: 7, message: '请输入1-7个字', trigger: 'blur'}
  1762. ],
  1763. creativeWebUrl: [
  1764. {required: true, message: '请输入', trigger: 'blur'},
  1765. {validator: handleConfirmValue, trigger: 'blur'}
  1766. ],
  1767. adAudiencePackageId: [{required: true, message: '请选择', trigger: 'change'}],
  1768. creativeCallToAction: [{required: true, message: '请选择', trigger: 'change'}],
  1769. creativeActionText: [{required: true, message: '请选择', trigger: 'change'}],
  1770. adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
  1771. adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
  1772. creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}],
  1773. adDeepCpabid:[ {required: true, message: '请输入', trigger: 'blur'},]
  1774. },
  1775. configForm: {
  1776. adDeepBidType:'DEEP_BID_MIN',
  1777. adDeepCpabid:0,
  1778. copywritingNumber: undefined,
  1779. marketingPurpose: 'CONVERSION',
  1780. componentId: '',
  1781. creativeIesCoreUserId: '1',
  1782. creativePlayableUrl: 'a',
  1783. adUnionVideoType: '',
  1784. creativeWebUrl: '',
  1785. adAppType: '',
  1786. adDirectionalFlag: 'add',
  1787. adInterestActionMode: 'UNLIMITED',
  1788. creativeDisplayMode: 'CREATIVE_DISPLAY_MODE_CTR',
  1789. creativeAppName: undefined,
  1790. creativeIsPresentedVideo: 0,
  1791. // creativeGenerateDerivedAd: 0,
  1792. creativeIsCommentDisable: 0,
  1793. creativeDownloadStatus: 0,
  1794. creativeSubTitle: '',
  1795. adConvertedTimeDuration: 'THREE_MONTH',
  1796. adDownloadMode: 'DEFAULT',
  1797. dpLinkIndexUsed: 0,
  1798. adRetargetingTagsType: '',
  1799. adAudiencePackageId: undefined,
  1800. adStepBid: 0,
  1801. ladderOne: '',
  1802. ladderTwo: '',
  1803. adMinBid: '',
  1804. adMaxBid: '',
  1805. adBidCreateType: 'FIX',
  1806. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  1807. adLocationType: '',
  1808. adCity: '',
  1809. adSelectCity: [],
  1810. defaultFormList: [],
  1811. productSellingPoints: [], // 商品买点
  1812. adBudgetMode: 'BUDGET_MODE_DAY', // 预算类型
  1813. adDownloadUrl: '', // 下载链接
  1814. accountBudget: 0, // 账户日预算
  1815. accountId: undefined, // 账户
  1816. dpLinkStartIndex: 1,
  1817. dpLinkEndIndex: 2,
  1818. accountBudgetMode: '1', // 预算方式
  1819. campaignLandingType: 'APP', // 推广目标
  1820. campaignType: 'FEED', // 广告类型
  1821. campaignName: '', // 广告组名称
  1822. adName: '', // 广告计划名称
  1823. campaignCnt: 1, // 广告组计划数量
  1824. campaignAdCnt: 1, // 广告计划数量
  1825. launchTarget: 'OCPM', // 投放目标
  1826. adDownloadType: 'EXTERNAL_URL', // 下载方式
  1827. adExternalUrl: '', // 落地页链接
  1828. adOpenUrl: '', // 直达链接内容
  1829. adPackage: '', // 应用包名
  1830. adConvertType: '', // 转化跟踪方式
  1831. adConvertId: '', // 优化目标 -- 走接口
  1832. adverPosition: 'a', // 广告位置
  1833. radioChangeValue: '', // 广告位置-按照场景指定位置
  1834. checkboxChangeValue: [], // 广告位置-按照媒体指定位置
  1835. adDistrict: 'NONE', // 定向-区域
  1836. adGender: 'NONE', // 定向-性别
  1837. adAge: '', // 定向-年龄
  1838. adSelectAge: ['NONE'],
  1839. customPerson: 'NONE', // 定向-自定义
  1840. adSuperiorPopularityType: 'NONE', // 定向-媒体定向
  1841. adPlatform: 'NONE', // 定向-平台
  1842. updateAdPlatform: ['NONE'],
  1843. adDeviceSelectType: ['NONE'],
  1844. adSelectAc: ['NONE'],
  1845. adAc: '', // 定向-网络
  1846. adHideIfExists: '0', // 定向-已安装用户
  1847. adHideIfConverted: 'NO_EXCLUDE', // 定向-已转化用户
  1848. adAutoExtendEnabled: '0', // 定向-智能播放
  1849. adAndroidVersion: 'NONE', // 定向-安卓版本
  1850. androidChangeValue: '', // 安卓版本-自定义
  1851. adSmartBidType: 'SMART_BID_CUSTOM', // 投放场景
  1852. adBudget: 300, // 预算
  1853. adScheduleType: 'SCHEDULE_FROM_NOW', // 投放时间
  1854. launchDateRange: [], // 设置开始和结束时间
  1855. launchTimeInterval: 'buxian', // 投放时段
  1856. scheduleTimeData: str, // 指定时段选择
  1857. adPricing: 'PRICING_OCPM', // 付费方式
  1858. adCpaBid: 0.1, // 目标转化出价
  1859. creativeActionTrackUrl: '', // 监测地址
  1860. creativeMaterialMode: 'STATIC_ASSEMBLE', // 创意方式
  1861. creativeImageMode: 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL', // 创意内容
  1862. creativeProductDescription: '', // 卡片标题
  1863. creativeEnablePersonalAction: true, // 智能优选
  1864. creativeSource: '', // 来源
  1865. creativeThirdIndustryId: '', // 创意分类
  1866. creativeThirdIndustryIds: [], // 创意分类
  1867. adKeywords: [], // 创意标签
  1868. updateGetingInclude: [],
  1869. updateGetingExclude: [],
  1870. adRetargetingTagsInclude: '',
  1871. adRetargetingTagsExclude: '',
  1872. adAutoExtendTargets: '',
  1873. adDeliveryRange: '',
  1874. creativeCallToAction: undefined, // 行动号召
  1875. creativeActionText: undefined,
  1876. creativeLabel: undefined // 倡议标签
  1877. },
  1878. originalityStatus: true, // 创意状态
  1879. pictureStatus: false,
  1880. isTomatoStatus: false,
  1881. isTAwemeStatus: true,
  1882. creativeImageShow:true,
  1883. deepExternalArr:[],
  1884. deepExternalShow:false,
  1885. adDeepCpabidShow:true
  1886. };
  1887. },
  1888. computed: {
  1889. selectOrientPlaceholder() {
  1890. if (!this.configForm.accountId) {
  1891. return '请选择账户';
  1892. }
  1893. else {
  1894. return 'able';
  1895. }
  1896. },
  1897. getEndIndex() {
  1898. return Number(this.configForm.dpLinkStartIndex) + 1;
  1899. },
  1900. getSource() {
  1901. if (this.configForm.campaignLandingType !== 'APP' || (this.configForm.campaignLandingType === 'APP' && this.configForm.adDownloadType === 'EXTERNAL_URL')) {
  1902. return 'creativeSource';
  1903. }
  1904. },
  1905. NewAountId() {
  1906. return this.configForm.accountId;
  1907. },
  1908. NewAdPackage() {
  1909. return this.configForm.adPackage;
  1910. },
  1911. NewAdExternalUrl() {
  1912. return this.configForm.adExternalUrl;
  1913. },
  1914. NewPlatformLoadingType() {
  1915. return this.platformLoadingType;
  1916. },
  1917. NewIsTAwemeStatus() {
  1918. return this.isTAwemeStatus;
  1919. },
  1920. NewAdSelectAge() {
  1921. return this.configForm.adSelectAge;
  1922. },
  1923. NewAdDistrict() {
  1924. return this.configForm.adDistrict;
  1925. },
  1926. NewAdGender() {
  1927. return this.configForm.adGender;
  1928. },
  1929. NewAdInterestActionMode() {
  1930. return this.configForm.adInterestActionMode;
  1931. },
  1932. NewCustomPerson() {
  1933. return this.configForm.customPerson;
  1934. },
  1935. NewAdAutoExtendList() {
  1936. return this.adAutoExtendList;
  1937. }
  1938. },
  1939. watch: {
  1940. NewAdAutoExtendList(newVal) {
  1941. if (!newVal.length) {
  1942. this.configForm.adAutoExtendEnabled = '0';
  1943. this.AutoExtendEditSelect = [];
  1944. }
  1945. },
  1946. NewCustomPerson(newVal) {
  1947. if (newVal !== 'NONE') {
  1948. this.adAutoExtendList.push({
  1949. value: 'CUSTOM_AUDIENCE',
  1950. label: '自定人群-定向'
  1951. });
  1952. }
  1953. else {
  1954. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'CUSTOM_AUDIENCE');
  1955. }
  1956. },
  1957. NewAdInterestActionMode(newVal) {
  1958. if (newVal !== 'UNLIMITED') {
  1959. this.adAutoExtendList.push({
  1960. value: 'INTEREST_ACTION',
  1961. label: '行为兴趣'
  1962. });
  1963. }
  1964. else {
  1965. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'INTEREST_ACTION');
  1966. }
  1967. },
  1968. NewAdGender(newVal) {
  1969. if (newVal !== 'NONE') {
  1970. if (!this.adAutoExtendList.find(item => item.value === 'GENDER')) {
  1971. this.adAutoExtendList.push({
  1972. value: 'GENDER',
  1973. label: '性别'
  1974. });
  1975. }
  1976. }
  1977. else {
  1978. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'GENDER');
  1979. }
  1980. },
  1981. NewAdDistrict(newVal) {
  1982. if (newVal !== 'NONE') {
  1983. this.adAutoExtendList.push({
  1984. value: 'REGION',
  1985. label: '地域'
  1986. });
  1987. }
  1988. else {
  1989. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'REGION');
  1990. }
  1991. },
  1992. NewAdSelectAge(newVal) {
  1993. if (newVal[0] !== 'NONE') {
  1994. if (!this.adAutoExtendList.find(item => item.value === 'AGE')) {
  1995. this.adAutoExtendList.push({
  1996. value: 'AGE',
  1997. label: '年龄'
  1998. });
  1999. }
  2000. }
  2001. else {
  2002. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'AGE');
  2003. }
  2004. },
  2005. NewIsTAwemeStatus(newVal) {
  2006. if (!newVal) {
  2007. this.md5Result = '';
  2008. this.urlResult = '';
  2009. this.imageUrl = '';
  2010. this.configForm.creativeProductDescription = '';
  2011. this.configForm.defaultFormList = [];
  2012. this.configForm.creativeEnablePersonalAction = '';
  2013. this.configForm.creativeCallToAction = undefined;
  2014. }
  2015. else {
  2016. this.configForm.creativeEnablePersonalAction = true;
  2017. }
  2018. },
  2019. NewPlatformLoadingType(newVal, oldVal) {
  2020. if (newVal) {
  2021. this.configForm.adAppType = newVal;
  2022. }
  2023. if (newVal && this.configForm.accountId) {
  2024. this.handleGetChengZiSite();
  2025. }
  2026. else {
  2027. this.landingPageShowData = {};
  2028. this.configForm.creativeWebUrl = '';
  2029. }
  2030. },
  2031. NewAdExternalUrl(newVal, oldVal) {
  2032. if (newVal && this.configForm.accountId) {
  2033. const paramsData = {
  2034. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2035. advertiserId: this.configForm.accountId,
  2036. deliveryRange: 'DEFAULT',
  2037. externalUrl: this.configForm.adExternalUrl,
  2038. landingType: this.configForm.campaignLandingType,
  2039. promotionContent: this.configForm.adDownloadType
  2040. };
  2041. this.handleGetOptimizationObjective(paramsData);
  2042. }
  2043. },
  2044. NewAdPackage(newVal, oldVal) {
  2045. if (newVal && this.configForm.accountId) {
  2046. const paramsData = {
  2047. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2048. advertiserId: this.configForm.accountId,
  2049. appType: 'APP_ANDROID',
  2050. deliveryRange: 'DEFAULT',
  2051. externalUrl: this.configForm.adExternalUrl,
  2052. landingType: this.configForm.campaignLandingType,
  2053. packageName: this.configForm.adPackage,
  2054. promotionContent: this.configForm.adDownloadType
  2055. };
  2056. // this.handleGetOptimizationObjective(paramsData);
  2057. }
  2058. },
  2059. NewAountId(newVal, oldVal) {
  2060. if ((newVal && this.configForm.adPackage) || (newVal && this.configForm.adExternalUrl)) {
  2061. const paramsData = {
  2062. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2063. advertiserId: this.configForm.accountId,
  2064. appType: this.platformLoadingType,
  2065. deliveryRange: 'DEFAULT',
  2066. externalUrl: this.configForm.adExternalUrl,
  2067. landingType: this.configForm.campaignLandingType,
  2068. packageName: this.configForm.adPackage,
  2069. promotionContent: this.configForm.adDownloadType
  2070. };
  2071. // this.handleGetOptimizationObjective(paramsData);
  2072. }
  2073. if (newVal && this.platformLoadingType) {
  2074. this.handleGetChengZiSite();
  2075. }
  2076. else {
  2077. this.landingPageShowData = {};
  2078. this.configForm.creativeWebUrl = '';
  2079. }
  2080. if (newVal) {
  2081. this.handleGetCreativeClassification();
  2082. this.handleGetAdvertiserStrategy();
  2083. this.handleDirectionalList();
  2084. // this.handleGetAdAudiencePackage();
  2085. }
  2086. else {
  2087. this.createOptions = [];
  2088. this.creativeOptions = [];
  2089. this.selectiveList = [];
  2090. this.optimizationOption = [];
  2091. }
  2092. }
  2093. },
  2094. mounted() {
  2095. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  2096. if (routeQuery.accountModal === 'edit') {
  2097. this.modalTitle = 'edit';
  2098. this.handleGetDetailList();
  2099. }
  2100. else if (routeQuery.accountModal === 'add') {
  2101. this.modalTitle = 'add';
  2102. this.spinning = false;
  2103. }
  2104. else if (routeQuery.accountModal === 'copy') {
  2105. this.modalTitle = 'copy';
  2106. this.handleGetDetailList();
  2107. }
  2108. },
  2109. methods: {
  2110. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  2111. moment,
  2112. changeAdDirection() {
  2113. this.configForm.adDistrict = 'NONE';
  2114. this.listArr = [];
  2115. this.configForm.adLocationType = 'HOME'
  2116. this.configForm.adGender = 'NONE'
  2117. this.configForm.adSelectAge = ['NONE']
  2118. this.configForm.adInterestActionMode = 'UNLIMITED'
  2119. this.configForm.customPerson = 'NONE'
  2120. this.configForm.adRetargetingTagsType = '1'
  2121. this.configForm.updateGetingInclude = []
  2122. this.configForm.updateGetingExclude = []
  2123. this.directionalData = []
  2124. this.configForm.adSuperiorPopularityType = 'NONE'
  2125. // this.configForm.adPlatform = 'NONE'
  2126. this.configForm.adDeviceSelectType = ['NONE']
  2127. this.configForm.adAndroidVersion = 'NONE'
  2128. this.configForm.androidChangeValue = '9.0'
  2129. this.configForm.adSelectAc = ['NONE']
  2130. this.configForm.adHideIfExists = '0'
  2131. this.configForm.adHideIfConverted = 'NO_EXCLUDE'
  2132. this.configForm.adConvertedTimeDuration = 'ONE_MONTH'
  2133. this.configForm.adAutoExtendEnabled = '0'
  2134. this.configForm.adAudiencePackageId = undefined
  2135. this.packageMessageDetail = [];
  2136. if(this.configForm.adDirectionalFlag != 'add'){
  2137. this.handleGetAdAudiencePackage();
  2138. }
  2139. },
  2140. handleSelectValue(data) {
  2141. this.configForm.accountId = data.id;
  2142. // this.$refs['ruleForm'].resetFields();
  2143. this.configForm.adDistrict = 'NONE';
  2144. this.listArr = [];
  2145. this.configForm.adLocationType = 'HOME'
  2146. this.configForm.adGender = 'NONE'
  2147. this.configForm.adSelectAge = ['NONE']
  2148. this.configForm.adInterestActionMode = 'UNLIMITED'
  2149. this.configForm.customPerson = 'NONE'
  2150. this.configForm.adRetargetingTagsType = ''
  2151. this.configForm.updateGetingInclude = []
  2152. this.configForm.updateGetingExclude = []
  2153. this.directionalData = []
  2154. this.configForm.adSuperiorPopularityType = 'NONE'
  2155. // this.configForm.adPlatform = 'NONE'
  2156. this.configForm.adDeviceSelectType = ['NONE']
  2157. this.configForm.adAndroidVersion = 'NONE'
  2158. this.configForm.androidChangeValue = '9.0'
  2159. this.configForm.adSelectAc = ['NONE']
  2160. this.configForm.adHideIfExists = '0'
  2161. this.configForm.adHideIfConverted = 'NO_EXCLUDE'
  2162. this.configForm.adConvertedTimeDuration = 'ONE_MONTH'
  2163. this.configForm.adAutoExtendEnabled = '0'
  2164. this.configForm.adAudiencePackageId = undefined
  2165. this.configForm.adDirectionalFlag = 'add'
  2166. // this.configForm.adConvertType = undefined;
  2167. // this.configForm.adConvertId = undefined;
  2168. // this.toolConvertList = [];
  2169. // this.optimizationOption = [];
  2170. // this.handleGetAdAudiencePackage();
  2171. this.configForm.adConvertType = undefined;
  2172. this.configForm.adConvertId = undefined;
  2173. this.packageMessageDetail = [];
  2174. this.toolConvertList = [];
  2175. this.optimizationOption = [];
  2176. this.handleClearlist();
  2177. if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '1') {
  2178. this.$refs.direct.selectRightData = [];
  2179. this.$refs.direct.tableSelectIds = [];
  2180. }
  2181. else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '2') {
  2182. this.$refs.exclude.selectRightData = [];
  2183. this.$refs.exclude.tableSelectIds = [];
  2184. }
  2185. else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '3') {
  2186. this.$refs.twoway.tableSelectDirectIds = [];
  2187. this.$refs.twoway.tableSelectDirectData = [];
  2188. this.$refs.twoway.tableSelectExcludeIds = [];
  2189. this.$refs.twoway.tableSelectExcludeData = [];
  2190. }
  2191. if (this.platformLoadingType!='') {
  2192. let paramsData = {};
  2193. if (this.configForm.adDownloadType === 'DOWNLOAD_URL') {
  2194. paramsData = {
  2195. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2196. advertiserId: this.configForm.accountId,
  2197. appType: this.platformLoadingType,
  2198. deliveryRange: 'DEFAULT',
  2199. externalUrl: this.configForm.adExternalUrl,
  2200. landingType: this.configForm.campaignLandingType,
  2201. packageName: this.configForm.adPackage,
  2202. promotionContent: this.configForm.adDownloadType
  2203. };
  2204. }
  2205. else if (this.configForm.adDownloadType === 'EXTERNAL_URL') {
  2206. paramsData = {
  2207. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2208. advertiserId: this.configForm.accountId,
  2209. deliveryRange: 'DEFAULT',
  2210. externalUrl: this.configForm.adExternalUrl,
  2211. landingType: this.configForm.campaignLandingType,
  2212. promotionContent: this.configForm.adDownloadType
  2213. };
  2214. }
  2215. this.handleGetOptimizationObjective(paramsData);
  2216. }
  2217. },
  2218. handleAdDistrict(e) {
  2219. const defaultValue = e.target.value;
  2220. if (defaultValue === 'NONE') {
  2221. this.listArr = [];
  2222. this.configForm.adLocationType = '';
  2223. }
  2224. else if (defaultValue === 'CITY') {
  2225. this.configForm.adLocationType = 'HOME';
  2226. }
  2227. },
  2228. handleChangeCreativeType(){
  2229. this.configForm.componentId = undefined
  2230. },
  2231. handleAdUnionVideoType(e) {
  2232. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  2233. this.configForm.componentId = undefined
  2234. if (e.target.value === 'SPLASH_VIDEO') {
  2235. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_UNION_SPLASH';
  2236. }
  2237. else {
  2238. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2239. }
  2240. },
  2241. NewCheckboxChangeValue(newVal) {
  2242. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  2243. let selectiveListUpdate = [...this.selectiveList];
  2244. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2245. this.configForm.componentId = ''
  2246. if (newVal.length) {
  2247. if (newVal.includes('INVENTORY_AWEME_FEED')) {
  2248. this.isTAwemeStatus = true;
  2249. }
  2250. else {
  2251. this.isTAwemeStatus = false;
  2252. }
  2253. if (newVal.length === 4 && newVal.includes('INVENTORY_FEED') && newVal.includes('INVENTORY_VIDEO_FEED') && newVal.includes('INVENTORY_HOTSOON_FEED') && newVal.includes('INVENTORY_AWEME_FEED')) {
  2254. this.originalityStatus = true;
  2255. this.pictureStatus = true;
  2256. }
  2257. else if (newVal.length === 1 && newVal[0] === 'INVENTORY_TOMATO_NOVEL') {
  2258. this.isTomatoStatus = true;
  2259. this.originalityStatus = true;
  2260. this.pictureStatus = true;
  2261. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2262. }
  2263. else {
  2264. this.isTomatoStatus = false;
  2265. this.originalityStatus = false;
  2266. this.pictureStatus = false;
  2267. }
  2268. if (newVal.length === 1 && newVal[0] === 'INVENTORY_UNION_SLOT') {
  2269. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2270. this.configForm.adUnionVideoType = 'REWARDED_VIDEO';
  2271. this.configForm.creativePlayableUrl = 'a';
  2272. // this.$nextTick(() => {
  2273. // this.configForm.creativeEnablePersonalAction = true;
  2274. // });
  2275. this.configForm.adAudiencePackageId = undefined;
  2276. this.packageMessageDetail = [];
  2277. this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
  2278. }
  2279. else {
  2280. this.configForm.creativeDownloadStatus = 0;
  2281. this.configForm.adUnionVideoType = '';
  2282. // this.configForm.creativeEnablePersonalAction = '';
  2283. this.configForm.adAudiencePackageId = undefined;
  2284. this.packageMessageDetail = [];
  2285. // this.handleGetAdAudiencePackage();
  2286. }
  2287. }
  2288. else {
  2289. this.isTAwemeStatus = true;
  2290. this.isTomatoStatus = false;
  2291. this.configForm.adUnionVideoType = '';
  2292. this.configForm.adAudiencePackageId = undefined;
  2293. this.packageMessageDetail = [];
  2294. // this.handleGetAdAudiencePackage();
  2295. }
  2296. },
  2297. handleGetChengZiSite() {
  2298. const paramsData = {
  2299. accountId: this.configForm.accountId
  2300. };
  2301. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', paramsData).then(result => {
  2302. if (result.code === 0) {
  2303. this.viedoDefaultList = result.result;
  2304. this.viedoDefaultListUpdate = result.result;
  2305. }
  2306. else {
  2307. this.$message.error(result.message);
  2308. }
  2309. }).catch(error => {
  2310. console.log(error, 'eeee');
  2311. });
  2312. },
  2313. handleViedoListClick(data) {
  2314. this.landingPageShowData = data;
  2315. this.configForm.creativeWebUrl = data.creativeWebUrl;
  2316. this.weburlModel = '';
  2317. this.isWebUrl = false;
  2318. },
  2319. handleWebUrlSearch() {
  2320. let defaultList = [];
  2321. this.viedoDefaultListUpdate.forEach(item => {
  2322. if (item.name && item.name.indexOf(this.weburlModel) !== -1) {
  2323. defaultList.push(item);
  2324. }
  2325. });
  2326. this.viedoDefaultList = defaultList;
  2327. },
  2328. handleWebUrlUpdate() {
  2329. this.viedoDefaultList = [...this.viedoDefaultListUpdate];
  2330. this.weburlModel = '';
  2331. },
  2332. handleCancelAll() {
  2333. this.handleWebUrlUpdate();
  2334. this.isWebUrl = false;
  2335. },
  2336. handleHaveWebUrl() {
  2337. this.isWebUrl = true;
  2338. },
  2339. handleAdhideConver(e) {
  2340. const defaultValue = e.target.value;
  2341. if (defaultValue === 'CUSTOMER' || defaultValue === 'APP') {
  2342. this.configForm.adConvertedTimeDuration = 'THREE_MONTH';
  2343. }
  2344. else {
  2345. this.configForm.adConvertedTimeDuration = '';
  2346. }
  2347. },
  2348. handleAdAutoExtend(e) {
  2349. const defaultValue = e.target.value;
  2350. if (defaultValue === '0') {
  2351. this.AutoExtendEditSelect = [];
  2352. this.configForm.adAutoExtendTargets = '';
  2353. }
  2354. },
  2355. handleCreativeSubTitleBlur(e) {
  2356. const defaultValue = e.target.value;
  2357. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2358. let length = 0;
  2359. let strArr = defaultValue.split('');
  2360. strArr.forEach(item => {
  2361. if (cnReg.test(item)) {
  2362. length += 2;
  2363. }
  2364. else {
  2365. length += 1;
  2366. }
  2367. });
  2368. if (4 <= length && length <= 24) {
  2369. this.subTitleMsgStatus = false;
  2370. this.subTitleMsg = '';
  2371. }
  2372. else if (!defaultValue) {
  2373. this.subTitleMsgStatus = false;
  2374. this.subTitleMsg = '';
  2375. }
  2376. else {
  2377. this.subTitleMsgStatus = true;
  2378. this.subTitleMsg = '只能输入4-24个字符';
  2379. }
  2380. },
  2381. handleSelectTxtend(list) {
  2382. this.configForm.adAutoExtendTargets = list && list.map(item => item.value).join(',');
  2383. },
  2384. handleCustomPerson(e) {
  2385. const defaultValue = e.target.value;
  2386. if (defaultValue === 'NONE') {
  2387. this.configForm.updateGetingInclude = [];
  2388. this.configForm.adRetargetingTagsInclude = '';
  2389. this.configForm.adRetargetingTagsExclude = '';
  2390. this.configForm.updateGetingExclude = [];
  2391. this.configForm.adRetargetingTagsType = '';
  2392. }
  2393. else if (defaultValue === 'a') {
  2394. this.configForm.adRetargetingTagsType = '1';
  2395. }
  2396. },
  2397. handleAsyncPackage() {
  2398. this.handleGetAdAudiencePackage();
  2399. this.configForm.adAudiencePackageId = undefined;
  2400. this.packageMessageDetail = [];
  2401. },
  2402. handleDpLinkIndexUsed(e) {
  2403. const defaultId = e.target.value;
  2404. if (defaultId === 0) {
  2405. this.adNameTags.pop();
  2406. this.configForm.dpLinkStartIndex = 1;
  2407. this.configForm.dpLinkEndIndex = 2;
  2408. this.configForm.campaignCnt = 1;
  2409. }
  2410. else if (defaultId === 1) {
  2411. this.adNameTags.push('dp链接标识');
  2412. }
  2413. },
  2414. handleDplinkStart(e) {
  2415. this.configForm.dpLinkStartIndex = Math.round(e);
  2416. },
  2417. handleDplinkEnd(e) {
  2418. this.configForm.dpLinkEndIndex = Math.round(e);
  2419. },
  2420. handleFloatingInterval(e) {
  2421. this.configForm.adStepBid = Number(Number(e.target.value).toFixed(2));
  2422. },
  2423. handleAdMinBidBlur(e) {
  2424. this.configForm.adMinBid = Number(Number(e.target.value).toFixed(2));
  2425. },
  2426. handleAdMaxBidBlur(e) {
  2427. const defaultValue = e.target.value;
  2428. this.configForm.adMaxBid = Number(Number(defaultValue).toFixed(2));
  2429. if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
  2430. this.isAdCpaBidBlur = true;
  2431. this.adCpaBidBlurTxt = '出价不能大于预算';
  2432. }
  2433. else {
  2434. this.isAdCpaBidBlur = false;
  2435. }
  2436. },
  2437. handleDirectionalList() {
  2438. const paramsData = {
  2439. accountId: this.configForm.accountId
  2440. };
  2441. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', paramsData).then(result => {
  2442. if (result.code === 0) {
  2443. result.result.forEach(item => {
  2444. item.key = item.custom_audience_id;
  2445. });
  2446. this.directionalData = result.result;
  2447. }
  2448. else {
  2449. this.directionalData = [];
  2450. this.$message.error(result.message);
  2451. }
  2452. }).catch(error => {
  2453. console.log(error, 'eeee');
  2454. });
  2455. },
  2456. handleSelectionAloneEvent(list) {
  2457. if (this.configForm.adRetargetingTagsType === '1') {
  2458. this.configForm.updateGetingInclude = list;
  2459. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2460. this.configForm.adRetargetingTagsExclude = '';
  2461. this.configForm.updateGetingExclude = [];
  2462. }
  2463. else if (this.configForm.adRetargetingTagsType === '2') {
  2464. this.configForm.updateGetingExclude = list;
  2465. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2466. this.configForm.updateGetingInclude = [];
  2467. this.configForm.adRetargetingTagsInclude = '';
  2468. }
  2469. },
  2470. handleClearTableAlone(list) {
  2471. this.configForm.updateGetingInclude = list;
  2472. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2473. },
  2474. handleClearTableLogic(list) {
  2475. this.configForm.updateGetingExclude = list;
  2476. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2477. },
  2478. handleClearlist() {
  2479. this.configForm.updateGetingInclude = [];
  2480. this.configForm.adRetargetingTagsInclude = '';
  2481. this.configForm.adRetargetingTagsExclude = '';
  2482. this.configForm.updateGetingExclude = [];
  2483. },
  2484. handleDirectEvent(list) {
  2485. this.configForm.updateGetingInclude = list;
  2486. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2487. },
  2488. handleExcludeEvent(list) {
  2489. this.configForm.updateGetingExclude = list;
  2490. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2491. },
  2492. handleDirectionalLogic(e) {
  2493. const selectValue = e.target.value;
  2494. this.handleDirectionalList();
  2495. if (selectValue === '1') {
  2496. this.$refs.exclude.aloneInput = '';
  2497. this.$refs.twoway.directInput = '';
  2498. this.$refs.twoway.excludeInput = '';
  2499. }
  2500. else if (selectValue === '2') {
  2501. this.$refs.direct.aloneInput = '';
  2502. this.$refs.twoway.directInput = '';
  2503. this.$refs.twoway.excludeInput = '';
  2504. }
  2505. else if (selectValue === '3') {
  2506. this.$refs.direct.aloneInput = '';
  2507. this.$refs.exclude.aloneInput = '';
  2508. }
  2509. },
  2510. handleGetAdAudiencePackage() {
  2511. const params = {
  2512. accountId: this.configForm.accountId,
  2513. // landingType: this.platformLoadingType
  2514. };
  2515. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
  2516. .then(result => {
  2517. if (result.code === 0) {
  2518. const defaultList = result.result;
  2519. this.promotionTypeList.forEach(item => {
  2520. defaultList.forEach(val => {
  2521. if (val.landing_type === item.value) {
  2522. val.changeName = item.label;
  2523. }
  2524. });
  2525. });
  2526. // if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  2527. // this.selectiveList = defaultList.filter(item => item.delivery_range === 'UNION');
  2528. // }
  2529. // else {
  2530. this.selectiveList = defaultList;
  2531. // }
  2532. }
  2533. else {
  2534. this.$message.error(result.message);
  2535. }
  2536. })
  2537. .catch(error => {
  2538. console.log(error, 'eeee');
  2539. });
  2540. },
  2541. handleSelectiveOrientation(e) {
  2542. const ageUpdateList = [];
  2543. const defaultData = this.selectiveList.filter(item => item.audience_package_id === e);
  2544. defaultData.forEach(item => {
  2545. item.replaceSex = item.audience.gender === 'NONE' ? '不限' : item.audience.gender === 'GENDER_FEMALE' ? '女' : '男';
  2546. item.replaceEnabled = item.audience.auto_extend_enabled === 1 ? '开启' : '不开启';
  2547. item.replacePlate = item.audience.platform && item.audience.platform.length ? item.audience.platform.join(',') : '不限';
  2548. item.replaceCitys = item.audience.cityNames && item.audience.cityNames.length ? item.audience.cityNames.join(',') : '不限';
  2549. this.ageArr.forEach(val => {
  2550. if (item.audience.age && item.audience.age.length && item.audience.age.includes(val.value)) {
  2551. ageUpdateList.push(val.label);
  2552. }
  2553. });
  2554. item.replaceAge = ageUpdateList.length ? ageUpdateList.join(',') : '不限';
  2555. });
  2556. this.packageMessageDetail = defaultData;
  2557. },
  2558. handleBiddingMethod(e) {
  2559. this.configForm.adCpaBid = 0;
  2560. this.configForm.adMinBid = '';
  2561. this.configForm.adMaxBid = '';
  2562. this.configForm.adStepBid = 0;
  2563. this.isAdCpaBidBlur = false;
  2564. this.$refs['ruleForm'].clearValidate(['adMinBid']);
  2565. this.$refs['ruleForm'].clearValidate(['adMaxBid']);
  2566. },
  2567. handleAdCpaBidBlur(e) {
  2568. const defaultValue = e.target.value;
  2569. this.configForm.adCpaBid = Number(Number(defaultValue).toFixed(2));
  2570. if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
  2571. this.isAdCpaBidBlur = true;
  2572. this.adCpaBidBlurTxt = '出价不能大于预算';
  2573. }
  2574. else if (defaultValue > 10000) {
  2575. this.isAdCpaBidBlur = true;
  2576. this.adCpaBidBlurTxt = '目标转化出价不少于0.1元,不超过10000元,请正确输入';
  2577. }
  2578. else {
  2579. this.isAdCpaBidBlur = false;
  2580. }
  2581. },
  2582. handleGetAdvertiserStrategy() {
  2583. const params = {
  2584. accountId: this.configForm.accountId,
  2585. landingType: this.configForm.campaignLandingType,
  2586. advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
  2587. };
  2588. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
  2589. .then(result => {
  2590. if (result.code === 0) {
  2591. this.creativeOptions = result.result;
  2592. }
  2593. else {
  2594. this.$message.error(result.message);
  2595. }
  2596. })
  2597. .catch(error => {
  2598. console.log(error, 'eeee');
  2599. });
  2600. },
  2601. // 获取选中的城市
  2602. getSelectedCityArr(val) {
  2603. setTimeout(() => {
  2604. this.configForm.adSelectCity = val;
  2605. }, 200);
  2606. },
  2607. handleCheckedShowList(val) {
  2608. if (val.length) {
  2609. this.configForm.adSelectCity = val.map(item => item.code);
  2610. }
  2611. else {
  2612. this.configForm.adSelectCity = [];
  2613. }
  2614. },
  2615. handlePlateSelect(data) {
  2616. if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
  2617. data.splice(data.findIndex(item => item === 'NONE'), 1);
  2618. }
  2619. else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
  2620. data.splice(0, data.length - 1);
  2621. }
  2622. else if (data.length === 0) {
  2623. data.push('NONE');
  2624. }
  2625. },
  2626. getAgeSelect(data) {
  2627. if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
  2628. data.splice(data.findIndex(item => item === 'NONE'), 1);
  2629. }
  2630. else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
  2631. data.splice(0, data.length - 1);
  2632. }
  2633. else if (data.length === 0) {
  2634. data.push('NONE');
  2635. }
  2636. },
  2637. handleAdBudgetBlur(e) {
  2638. const adBudgetInput = e.target.value;
  2639. this.configForm.adBudget = Number(Number(adBudgetInput).toFixed(2));
  2640. if (this.configForm.adCpaBid > adBudgetInput) {
  2641. this.isAdCpaBidBlur = true;
  2642. this.adCpaBidBlurTxt = '出价不能大于预算';
  2643. }
  2644. else {
  2645. this.isAdCpaBidBlur = false;
  2646. }
  2647. },
  2648. handleAccountBudget(e) {
  2649. const adBudgetInput = e.target.value;
  2650. this.configForm.accountBudget = Number(Number(adBudgetInput).toFixed(2));
  2651. },
  2652. handleExportRules(value, min, max, callback) {
  2653. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2654. let length = 0;
  2655. let strArr = value.split('');
  2656. strArr.forEach(item => {
  2657. if (cnReg.test(item)) {
  2658. length += 2;
  2659. }
  2660. else {
  2661. length += 1;
  2662. }
  2663. });
  2664. if (min <= length && length <= max) {
  2665. callback();
  2666. }
  2667. else {
  2668. callback(`只能输入${min}-${max}个字符`);
  2669. }
  2670. },
  2671. handleGetPackage() {
  2672. const params = {
  2673. urlPath: this.configForm.adDownloadUrl
  2674. };
  2675. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getPackageNameByUrl', params)
  2676. .then(result => {
  2677. if (result.code === 0) {
  2678. this.configForm.adPackage = result.result.package || '';
  2679. this.platformLoadingType = result.result.platform || '';
  2680. if (result.result.platform && result.result.platform === 'APP_ANDROID') {
  2681. this.configForm.adPlatform = 'ANDROID';
  2682. }
  2683. else if (result.result.platform && result.result.platform === 'APP_IOS') {
  2684. this.configForm.adPlatform = 'IOS';
  2685. }
  2686. }
  2687. else {
  2688. this.$message.error(result.message);
  2689. }
  2690. })
  2691. .catch(error => {
  2692. console.log(error, 'eeee');
  2693. });
  2694. },
  2695. editPackage(){
  2696. var that = this
  2697. return new Promise(function (resolve, reject) {
  2698. const params = {
  2699. urlPath: that.configForm.adDownloadUrl
  2700. };
  2701. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getPackageNameByUrl', params)
  2702. .then(result => {
  2703. if (result.code === 0) {
  2704. // this.configForm.adPackage = result.result.package || '';
  2705. // this.platformLoadingType = result.result.platform || '';
  2706. // if (result.result.platform && result.result.platform === 'APP_ANDROID') {
  2707. // this.configForm.adPlatform = 'ANDROID';
  2708. // }
  2709. // else if (result.result.platform && result.result.platform === 'APP_IOS') {
  2710. // this.configForm.adPlatform = 'IOS';
  2711. // }
  2712. resolve(result.result.platform)
  2713. }
  2714. else {
  2715. reject('调用失败')
  2716. }
  2717. })
  2718. .catch(error => {
  2719. console.log(error, 'eeee');
  2720. });
  2721. })
  2722. },
  2723. handleAndroidVersion(e) {
  2724. if (e.target.value === 'NONE') {
  2725. this.configForm.androidChangeValue = '';
  2726. }
  2727. },
  2728. handleAdScheduleType(e) {
  2729. if (e.target.value === 'SCHEDULE_FROM_NOW') {
  2730. this.configForm.launchDateRange = [];
  2731. }
  2732. },
  2733. handleLaunchTimeInterval(e) {
  2734. if (e.target.value === 'buxian') {
  2735. this.configForm.scheduleTimeData = str;
  2736. }
  2737. },
  2738. handleAdverPosition(e) {
  2739. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  2740. this.$refs['ruleForm'].clearValidate(['componentId']);
  2741. this.configForm.componentId = ''
  2742. this.configForm.adDeliveryRange = 'DEFAULT'
  2743. if (e.target.value === 'a') {
  2744. this.configForm.radioChangeValue = '';
  2745. this.configForm.checkboxChangeValue = [];
  2746. this.isTAwemeStatus = true;
  2747. this.originalityStatus = true;
  2748. this.pictureStatus = false;
  2749. this.creativeImageShow = true;
  2750. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2751. }
  2752. else if (e.target.value === 'b') {
  2753. this.configForm.radioChangeValue = '';
  2754. this.pictureStatus = true;
  2755. this.originalityStatus = true;
  2756. this.creativeImageShow = true;
  2757. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2758. }
  2759. else if (e.target.value === 'c') {
  2760. this.configForm.checkboxChangeValue = [];
  2761. this.isTAwemeStatus = true;
  2762. this.originalityStatus = true;
  2763. this.pictureStatus = false;
  2764. this.creativeImageShow = true;
  2765. this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
  2766. }
  2767. else if(e.target.value === 'd'){
  2768. this.configForm.radioChangeValue = '';
  2769. this.configForm.checkboxChangeValue = [];
  2770. this.isTAwemeStatus = true;
  2771. this.originalityStatus = true;
  2772. this.pictureStatus = false;
  2773. this.creativeImageShow = false;
  2774. this.configForm.creativeImageMode = [];
  2775. this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
  2776. }
  2777. this.configForm.adUnionVideoType = '';
  2778. // this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2779. this.handleGetAdAudiencePackage();
  2780. },
  2781. handleAccountMode(e) {
  2782. if (e.target.value === '1') {
  2783. this.configForm.accountBudget = 0;
  2784. }
  2785. else if (e.target.value === '2') {
  2786. this.configForm.accountBudget = 1000;
  2787. }
  2788. },
  2789. handleAdDownLoadType(e) {
  2790. this.optimizationOption = [];
  2791. this.landingPageShowData = {};
  2792. this.configForm.creativeWebUrl = '';
  2793. // this.platformLoadingType = '';
  2794. const defaultValue = e.target.value;
  2795. this.configForm.adConvertType = undefined
  2796. this.configForm.adConvertId = undefined
  2797. if (defaultValue === 'DOWNLOAD_URL') {
  2798. this.configForm.adExternalUrl = '';
  2799. this.configForm.adOpenUrl = '';
  2800. this.configForm.adDownloadMode = 'DEFAULT';
  2801. // this.$refs.ruleForm.clearValidate(['adExternalUrl']);
  2802. }
  2803. else if (defaultValue === 'EXTERNAL_URL') {
  2804. // this.configForm.adDownloadUrl = '';
  2805. // this.configForm.adPackage = '';
  2806. this.configForm.adDownloadMode = '';
  2807. this.configForm.adConvertId = '';
  2808. this.configForm.adAppType = '';
  2809. // this.$refs.ruleForm.clearValidate(['adDownloadUrl']);
  2810. // this.$refs.ruleForm.clearValidate(['adPackage']);
  2811. }
  2812. if(this.configForm.adDownloadUrl) {
  2813. this.handleGetPackage();
  2814. const paramsData = {
  2815. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2816. advertiserId: this.configForm.accountId,
  2817. appType: this.platformLoadingType,
  2818. deliveryRange: 'DEFAULT',
  2819. externalUrl: this.configForm.adExternalUrl,
  2820. landingType: this.configForm.campaignLandingType,
  2821. packageName: this.configForm.adPackage,
  2822. promotionContent: this.configForm.adDownloadType
  2823. };
  2824. this.handleGetOptimizationObjective(paramsData);
  2825. }
  2826. },
  2827. handleCampaignCnt(e) {
  2828. const finallyResult = e * this.configForm.campaignAdCnt;
  2829. if (finallyResult > 500) {
  2830. this.campaignStatus = true;
  2831. }
  2832. else {
  2833. this.campaignStatus = false;
  2834. }
  2835. },
  2836. handleCampaignAdCnt(e) {
  2837. const finallyResult = e * this.configForm.campaignCnt;
  2838. if (finallyResult > 500) {
  2839. this.campaignStatus = true;
  2840. }
  2841. else {
  2842. this.campaignStatus = false;
  2843. }
  2844. },
  2845. handleConvertChange(e) {
  2846. this.optimizationOption.forEach(element => {
  2847. if (element.convert_id == e) {
  2848. if ("deep_external_actions" in element) {
  2849. this.deepExternalShow = true;
  2850. }else{
  2851. this.deepExternalShow = false;
  2852. }
  2853. }
  2854. });
  2855. // postAction(urlAcount + `/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/readToolConvertInfo?accountId=${this.configForm.accountId}&convertId=${this.configForm.adConvertId}`)
  2856. // .then(res=>{
  2857. // if(res.success){
  2858. // this.configForm.creativeActionTrackUrl = res.result.action_track_url;
  2859. // }
  2860. // })
  2861. },
  2862. adDeepBidTypeChange(e){
  2863. if (e.target.value == 'AUTO_MIN_SECOND_STAGE') {
  2864. this.adDeepCpabidShow = false;
  2865. this.configForm.adDeepCpabid = 0;
  2866. }else{
  2867. this.adDeepCpabidShow = true;
  2868. }
  2869. },
  2870. handleGetDetailList() {
  2871. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  2872. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id})
  2873. .then(result => {
  2874. if (result.code === 0) {
  2875. const detailData = result.result;
  2876. this.configForm.accountId = detailData.accountId;
  2877. setTimeout(() => {
  2878. this.configForm.adConvertId = detailData.adConvertId;
  2879. this.spinning = false;
  2880. }, 200);
  2881. this.configForm.adDownloadUrl = detailData.adDownloadUrl || '';
  2882. this.handleGetPackage()
  2883. this.$nextTick(()=>{
  2884. this.editPackage().then(res=>{
  2885. if (detailData.adAudiencePackageId&&res!='') {
  2886. this.$nextTick(()=>{
  2887. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: detailData.accountId})
  2888. .then(result => {
  2889. if (result.code === 0) {
  2890. this.$nextTick(()=>{
  2891. let checkboxChangeValueList = detailData.creativeInventoryType ? detailData.creativeInventoryType.split(',') : [];
  2892. // if (checkboxChangeValueList.length === 1 && checkboxChangeValueList[0] === 'INVENTORY_UNION_SLOT') {
  2893. // this.selectiveList = result.result.filter(item => item.delivery_range === 'UNION');
  2894. // }
  2895. // else {
  2896. this.selectiveList = result.result || [];
  2897. // }
  2898. this.configForm.adAudiencePackageId = Number(detailData.adAudiencePackageId);
  2899. this.handleSelectiveOrientation(Number(detailData.adAudiencePackageId));
  2900. })
  2901. }
  2902. else {
  2903. this.$message.error(result.message);
  2904. }
  2905. })
  2906. .catch(error => {
  2907. console.log(error, 'eeee');
  2908. });
  2909. })
  2910. }
  2911. let paramsData = {};
  2912. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  2913. paramsData = {
  2914. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2915. advertiserId: detailData.accountId,
  2916. appType: res,
  2917. deliveryRange: 'DEFAULT',
  2918. externalUrl: detailData.adExternalUrl,
  2919. landingType: detailData.campaignLandingType,
  2920. packageName: detailData.adPackage,
  2921. promotionContent: detailData.adDownloadType
  2922. };
  2923. }
  2924. else if (detailData.adDownloadType === 'EXTERNAL_URL') {
  2925. paramsData = {
  2926. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2927. advertiserId: detailData.accountId,
  2928. deliveryRange: 'DEFAULT',
  2929. externalUrl: detailData.adExternalUrl,
  2930. landingType: detailData.campaignLandingType,
  2931. promotionContent: detailData.adDownloadType
  2932. };
  2933. }
  2934. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
  2935. if (result.code === 0) {
  2936. // const updateResult = result.result.filter(item => item.external_actions.length > 0);
  2937. this.$nextTick(()=>{
  2938. var updateResult = []
  2939. for (let i = 0; i < result.result[0].converts.length; i++) {
  2940. if(result.result[0].converts[i].external_actions){
  2941. for (let j = 0; j < result.result[0].converts[i].external_actions.length; j++) {
  2942. if(result.result[0].converts[i].external_actions[j].convert_id == detailData.adConvertId){
  2943. updateResult.push(result.result[0].converts[i])
  2944. }
  2945. }
  2946. }
  2947. }
  2948. this.configForm.adConvertType = updateResult[0].convert_type;
  2949. this.optimizationOption = updateResult[0].external_actions;
  2950. this.optimizationOption.forEach(element => {
  2951. if (element.convert_id == detailData.adConvertId) {
  2952. if ("deep_external_actions" in element) {
  2953. this.deepExternalShow = true;
  2954. }else{
  2955. this.deepExternalShow = false;
  2956. }
  2957. }
  2958. });
  2959. if (detailData.adDeepBidType == 'AUTO_MIN_SECOND_STAGE') {
  2960. this.adDeepCpabidShow = false;
  2961. this.configForm.adDeepCpabid = 0
  2962. }else{
  2963. this.adDeepCpabidShow = true;
  2964. }
  2965. this.configForm.adDeepBidType = detailData.adDeepBidType;
  2966. this.configForm.adDeepCpabid = detailData.adDeepCpabid;
  2967. })
  2968. }
  2969. else {
  2970. this.$message.error(result.message);
  2971. }
  2972. }).catch(error => {
  2973. console.log(error, 'eeee');
  2974. });
  2975. })
  2976. })
  2977. postAction(urlAcount + `/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/readToolConvertInfo?accountId=${detailData.accountId}&convertId=${detailData.adConvertId}`)
  2978. .then(res=>{
  2979. if(res.success){
  2980. this.configForm.creativeActionTrackUrl = res.result.action_track_url;
  2981. }
  2982. })
  2983. this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex;
  2984. this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex;
  2985. this.configForm.accountBudgetMode = detailData.accountBudgetMode;
  2986. this.configForm.accountBudget = detailData.accountBudget;
  2987. this.configForm.adDirectionalFlag = detailData.adDirectionalFlag;
  2988. this.configForm.campaignLandingType = detailData.campaignLandingType;
  2989. this.configForm.campaignType = detailData.campaignType;
  2990. this.configForm.campaignName = detailData.campaignName || '';
  2991. this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
  2992. if (detailData.dpLinkIndexUsed === 1) {
  2993. this.$nextTick(() => {
  2994. this.adNameTags.push('dp链接标识');
  2995. })
  2996. }
  2997. this.configForm.adName = detailData.adName || '';
  2998. this.configForm.campaignCnt = detailData.campaignCnt || '';
  2999. this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
  3000. this.configForm.launchTarget = detailData.launchTarget || 'OCPM';
  3001. this.configForm.adDownloadType = detailData.adDownloadType;
  3002. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  3003. this.$nextTick(() => {
  3004. this.configForm.creativeAppName = detailData.creativeAppName || undefined;
  3005. });
  3006. }
  3007. this.configForm.adPlatform = detailData.adPlatform;
  3008. this.configForm.adExternalUrl = detailData.adExternalUrl || '';
  3009. this.configForm.adOpenUrl = detailData.adOpenUrl || '';
  3010. this.configForm.adPackage = detailData.adPackage || '';
  3011. this.configForm.adConvertType = detailData.adConvertType || '';
  3012. this.configForm.adDistrict = detailData.adDistrict || 'NONE';
  3013. this.configForm.adAppType = detailData.adAppType;
  3014. // this.handleGetPackage()
  3015. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', {accountId: detailData.accountId}).then(result => {
  3016. if (result.code === 0) {
  3017. const defaultResult = result.result;
  3018. defaultResult.forEach(item => {
  3019. if (item.creativeWebUrl === detailData.creativeWebUrl) {
  3020. this.landingPageShowData = item;
  3021. }
  3022. });
  3023. this.configForm.creativeWebUrl = detailData.creativeWebUrl;
  3024. }
  3025. else {
  3026. this.$message.error(result.message);
  3027. }
  3028. }).catch(error => {
  3029. console.log(error, 'eeee');
  3030. });
  3031. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  3032. this.$nextTick(()=>{
  3033. this.handleGetPackage();
  3034. })
  3035. }
  3036. setTimeout(() => {
  3037. this.listArr = detailData.adCity.split(',').map(item => Number(item));
  3038. this.configForm.adSelectCity = detailData.adCity.split(',');
  3039. }, 1000);
  3040. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', {accountId: detailData.accountId}).then(result => {
  3041. if (result.code === 0) {
  3042. result.result.forEach(item => {
  3043. item.key = item.custom_audience_id;
  3044. });
  3045. this.directionalData = result.result;
  3046. this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType;
  3047. if (detailData.adRetargetingTagsType === '3') {
  3048. this.configForm.customPerson = 'a';
  3049. this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
  3050. this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
  3051. this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
  3052. this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
  3053. }
  3054. else if (detailData.adRetargetingTagsType === '2') {
  3055. this.configForm.customPerson = 'a';
  3056. this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
  3057. this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
  3058. this.configForm.updateGetingInclude = [];
  3059. }
  3060. else if (detailData.adRetargetingTagsType === '1') {
  3061. this.configForm.customPerson = 'a';
  3062. this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
  3063. this.configForm.updateGetingExclude = [];
  3064. this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
  3065. }
  3066. else {
  3067. this.configForm.customPerson = 'NONE';
  3068. this.configForm.adRetargetingTagsExclude = '';
  3069. this.configForm.updateGetingExclude = '';
  3070. this.configForm.updateGetingInclude = [];
  3071. this.configForm.updateGetingExclude = [];
  3072. }
  3073. }
  3074. else {
  3075. this.$message.error(result.message);
  3076. }
  3077. }).catch(error => {
  3078. console.log(error, 'eeee');
  3079. });
  3080. this.configForm.adGender = detailData.adGender || 'NONE';
  3081. this.configForm.adLocationType = detailData.adLocationType;
  3082. this.configForm.adSelectAge = detailData.adAge.split(',');
  3083. this.configForm.adSelectAc = detailData.adAc.split(',');
  3084. this.configForm.adDeviceSelectType = detailData.adDeviceType.split(',');
  3085. this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
  3086. this.configForm.adAc = detailData.adAc;
  3087. this.configForm.adHideIfExists = String(detailData.adHideIfExists);
  3088. this.configForm.adHideIfConverted = detailData.adHideIfConverted;
  3089. this.configForm.adAutoExtendEnabled = detailData.adAutoExtendEnabled;
  3090. this.configForm.adSmartBidType = detailData.adSmartBidType;
  3091. this.configForm.adBudgetMode = detailData.adBudgetMode;
  3092. this.configForm.adBudget = detailData.adBudget;
  3093. this.defaultAdBudget = detailData.accountBudget;
  3094. this.configForm.adScheduleType = detailData.adScheduleType;
  3095. this.configForm.launchDateRange[0] = detailData.adStartTime;
  3096. this.configForm.launchDateRange[1] = detailData.adEndTime;
  3097. this.configForm.adPricing = detailData.adPricing;
  3098. this.configForm.adCpaBid = detailData.adCpaBid;
  3099. this.configForm.creativeMaterialMode = detailData.creativeMaterialMode;
  3100. this.configForm.creativeProductDescription = detailData.creativeProductDescription;
  3101. this.configForm.creativeEnablePersonalAction = detailData.creativeEnablePersonalAction;
  3102. const params = {
  3103. accountId: detailData.accountId,
  3104. landingType: detailData.campaignLandingType,
  3105. advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
  3106. };
  3107. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
  3108. .then(result => {
  3109. if (result.code === 0) {
  3110. this.creativeOptions = result.result;
  3111. this.configForm.creativeCallToAction = detailData.creativeCallToAction;
  3112. this.configForm.creativeActionText = detailData.creativeActionText;
  3113. }
  3114. else {
  3115. this.$message.error(result.message);
  3116. }
  3117. })
  3118. .catch(error => {
  3119. console.log(error, 'eeee');
  3120. });
  3121. this.configForm.creativeSource = detailData.creativeSource;
  3122. this.configForm.adBidCreateType = detailData.adBidCreateType;
  3123. this.configForm.adMinBid = detailData.adMinBid;
  3124. this.configForm.adMaxBid = detailData.adMaxBid;
  3125. this.configForm.adStepBid = detailData.adStepBid;
  3126. this.configForm.adBidCreateType = detailData.adBidCreateType;
  3127. this.configForm.creativeThirdIndustryIds[0] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 4);
  3128. this.configForm.creativeThirdIndustryIds[1] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 6);
  3129. this.configForm.creativeThirdIndustryIds[2] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId;
  3130. this.imageUrl = detailData.imageUrl;
  3131. this.urlResult = detailData.imageUrl;
  3132. this.md5Result = detailData.creativeProductImageCode;
  3133. if (detailData.adAndroidOsv !== 'NONE') {
  3134. this.$nextTick(()=>{
  3135. this.configForm.adAndroidVersion = 'a';
  3136. this.configForm.androidChangeValue = detailData.adAndroidOsv;
  3137. })
  3138. }
  3139. else {
  3140. this.configForm.adAndroidVersion = 'NONE';
  3141. }
  3142. if (detailData.productSellingPoints) {
  3143. this.$nextTick(()=>{
  3144. let productPointsList = [];
  3145. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  3146. detailData.productSellingPoints.forEach((item, index) => {
  3147. productPointsList.push({
  3148. id: randomNum + index,
  3149. value: item
  3150. });
  3151. });
  3152. this.configForm.defaultFormList = productPointsList;
  3153. })
  3154. }
  3155. if (detailData.adScheduleTime.indexOf(1) !== -1) {
  3156. this.$nextTick(()=>{
  3157. this.configForm.launchTimeInterval = 'a';
  3158. this.configForm.scheduleTimeData = detailData.adScheduleTime;
  3159. })
  3160. }
  3161. else {
  3162. this.configForm.launchTimeInterval = 'buxian';
  3163. }
  3164. if (detailData.creativeSceneInventory) {
  3165. this.configForm.adverPosition = 'c';
  3166. this.configForm.radioChangeValue = detailData.creativeSceneInventory;
  3167. }
  3168. else if (detailData.creativeInventoryType) {
  3169. this.configForm.adverPosition = 'b';
  3170. this.configForm.checkboxChangeValue = detailData.creativeInventoryType.split(',');
  3171. if (this.configForm.checkboxChangeValue.includes('INVENTORY_AWEME_FEED')) {
  3172. this.$nextTick(()=>{
  3173. this.isTAwemeStatus = true;
  3174. })
  3175. }
  3176. else {
  3177. this.isTAwemeStatus = false;
  3178. }
  3179. if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  3180. this.$nextTick(()=>{
  3181. this.configForm.adUnionVideoType = detailData.adUnionVideoType;
  3182. this.configForm.adDeliveryRange = 'UNION';
  3183. })
  3184. }
  3185. else {
  3186. this.configForm.adUnionVideoType = '';
  3187. this.configForm.adDeliveryRange = '';
  3188. }
  3189. this.NewCheckboxChangeValue(this.configForm.checkboxChangeValue);
  3190. }
  3191. else {
  3192. this.configForm.adverPosition = 'a';
  3193. }
  3194. if (detailData.adKeywords) {
  3195. this.$nextTick(()=>{
  3196. this.creativeTag = detailData.adKeywords;
  3197. })
  3198. }
  3199. this.$nextTick(()=>{
  3200. this.configForm.creativeImageMode = detailData.creativeImageMode;
  3201. })
  3202. this.configForm.adInterestActionMode = detailData.adInterestActionMode;
  3203. this.configForm.creativeDisplayMode = detailData.creativeDisplayMode;
  3204. this.configForm.creativeIsPresentedVideo = detailData.creativeIsPresentedVideo;
  3205. // this.configForm.creativeGenerateDerivedAd = detailData.creativeGenerateDerivedAd;
  3206. this.configForm.creativeIsCommentDisable = detailData.creativeIsCommentDisable;
  3207. this.configForm.copywritingNumber = detailData.copywritingNumber&&detailData.copywritingNumber>0?detailData.copywritingNumber:undefined;
  3208. this.configForm.creativeSubTitle = detailData.creativeSubTitle;
  3209. this.configForm.adConvertedTimeDuration = detailData.adConvertedTimeDuration;
  3210. this.configForm.adDownloadMode = detailData.adDownloadMode;
  3211. this.configForm.adAutoExtendTargets = detailData.adAutoExtendTargets;
  3212. this.AutoExtendEditSelect = detailData.adAutoExtendTargets && detailData.adAutoExtendTargets.split(',');
  3213. this.$nextTick(()=>{
  3214. this.configForm.componentId = detailData.componentId
  3215. this.configForm.creativeDownloadStatus = detailData.creativeDownloadStatus?detailData.creativeDownloadStatus:0;
  3216. })
  3217. }
  3218. else {
  3219. this.$message.error(result.message);
  3220. }
  3221. })
  3222. .catch(error => {
  3223. console.log(error, 'eeee');
  3224. });
  3225. },
  3226. handleConvertTypeChange(e) {
  3227. this.configForm.adConvertId = '';
  3228. this.optimizationOption = [];
  3229. this.toolConvertList.forEach(item => {
  3230. if (item.convert_type === e) {
  3231. this.optimizationOption = [...item.external_actions];
  3232. }
  3233. });
  3234. // this.optimizationOption.forEach(element => {
  3235. // console.log(element);
  3236. // console.log(detailData.adConvertId);
  3237. // if (element.convert_id == detailData.adConvertId) {
  3238. // console.log(1111111);
  3239. // if ("deep_external_actions" in element) {
  3240. // this.deepExternalShow = true;
  3241. // }else{
  3242. // this.deepExternalShow = false;
  3243. // }
  3244. // }
  3245. // });
  3246. },
  3247. // 优化目标数据获取
  3248. handleGetOptimizationObjective(paramsData) {
  3249. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
  3250. if (result.code === 0) {
  3251. this.toolConvertList = result.result[0].converts;
  3252. // if (this.configForm.adConvertType) {
  3253. // this.handleConvertTypeChange(this.configForm.adConvertType);
  3254. // }
  3255. }
  3256. else {
  3257. this.$message.error(result.message);
  3258. }
  3259. }).catch(error => {
  3260. console.log(error, 'eeee');
  3261. });
  3262. },
  3263. // 创意分类接口
  3264. handleGetCreativeClassification() {
  3265. const paramsData = {
  3266. accountId: this.configForm.accountId
  3267. };
  3268. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getIndustryList', paramsData).then(result => {
  3269. if (result.code === 0) {
  3270. this.createOptions = result.result;
  3271. }
  3272. else {
  3273. this.$message.error(result.message);
  3274. }
  3275. }).catch(error => {
  3276. console.log(error, 'eeee');
  3277. });
  3278. },
  3279. handleAddList(data) {
  3280. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/addBytedanceStrategy', data).then(result => {
  3281. if (result.code === 0) {
  3282. this.$message.success('创建成功');
  3283. this.sureLoading = false;
  3284. this.$router.replace('/account-config/account-config');
  3285. this.$bus.$emit('remove', '/account-config/components/configuration-modal');
  3286. }
  3287. else {
  3288. this.sureLoading = false;
  3289. this.$message.error(result.message);
  3290. }
  3291. }).catch(error => {
  3292. console.log(error, 'eeee');
  3293. });
  3294. },
  3295. // 点击获取光标位置进行字段插入
  3296. handleGetChangeAll(item, field, type) {
  3297. let node = document.getElementById(field);
  3298. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  3299. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  3300. let txt = node.value;
  3301. if (startPos === 0 || endPos === 0) {
  3302. this.configForm[type] += '-{{' + item + '}}-';
  3303. }
  3304. else {
  3305. this.configForm[type] = txt.substring(0, startPos) + '-{{' + item + '}}-' + txt.substring(endPos);
  3306. node.selectionStart = startPos + item.length + 6;
  3307. node.selectionEnd = startPos + item.length + 6;
  3308. }
  3309. node.focus();
  3310. node.blur();
  3311. },
  3312. handleLaunchData(date, dateString) {
  3313. this.configForm.launchDateRange = dateString;
  3314. },
  3315. handleBudgetMode(e) {
  3316. if (e === 'BUDGET_MODE_TOTAL') {
  3317. this.configForm.adScheduleType = 'SCHEDULE_START_END';
  3318. this.adBudgetNum = this.configForm.launchTarget === 'OCPM' ? 300 : 0;
  3319. this.configForm.adBudget = 300;
  3320. if (Number(this.configForm.adCpaBid) > Number(this.configForm.adBudget)) {
  3321. this.isAdCpaBidBlur = true;
  3322. this.adCpaBidBlurTxt = '出价不能大于预算';
  3323. }
  3324. else {
  3325. this.isAdCpaBidBlur = false;
  3326. this.adCpaBidBlurTxt = '';
  3327. }
  3328. this.$message.warning('请设置投放时间');
  3329. }
  3330. else if (e === 'BUDGET_MODE_DAY') {
  3331. this.adBudgetNum = 0;
  3332. this.configForm.adBudget = 300;
  3333. }
  3334. },
  3335. handleDelOrigin(list) {
  3336. let formData = this.configForm.defaultFormList;
  3337. this.configForm.defaultFormList = formData.filter(item => list.id !== item.id);
  3338. },
  3339. handleAddOrigin() {
  3340. if (this.configForm.defaultFormList.length >= 10) {
  3341. this.$message.error('最多可以添加10个卖点');
  3342. return;
  3343. }
  3344. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  3345. this.$nextTick(() => {
  3346. this.configForm.defaultFormList.push({
  3347. id: randomNum,
  3348. value: ''
  3349. });
  3350. });
  3351. },
  3352. handleCreativeWebUrl(e) {
  3353. const defaultValue = e.target.value;
  3354. this.landingPageShowData = {};
  3355. },
  3356. handleDownloadLink(e) {
  3357. const defaultValue = e.target.value;
  3358. if (defaultValue) {
  3359. this.handleGetPackage();
  3360. let paramsData = {};
  3361. if (this.configForm.adDownloadType === 'DOWNLOAD_URL') {
  3362. paramsData = {
  3363. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  3364. advertiserId: this.configForm.accountId,
  3365. appType: 'APP_ANDROID',
  3366. deliveryRange: 'DEFAULT',
  3367. externalUrl: this.configForm.adExternalUrl,
  3368. landingType: this.configForm.campaignLandingType,
  3369. packageName: this.configForm.adPackage,
  3370. promotionContent: this.configForm.adDownloadType
  3371. };
  3372. }
  3373. else if (this.configForm.adDownloadType === 'EXTERNAL_URL') {
  3374. paramsData = {
  3375. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  3376. advertiserId: this.configForm.accountId,
  3377. deliveryRange: 'DEFAULT',
  3378. externalUrl: this.configForm.adExternalUrl,
  3379. landingType: this.configForm.campaignLandingType,
  3380. promotionContent: this.configForm.adDownloadType
  3381. };
  3382. }
  3383. this.handleGetOptimizationObjective(paramsData)
  3384. }
  3385. else {
  3386. this.platformLoadingType = '';
  3387. this.configForm.adPackage = '';
  3388. }
  3389. },
  3390. handleDeleteImg() {
  3391. this.imageUrl = '';
  3392. this.isCoverImgDiv = false;
  3393. },
  3394. handleChangeActive() {
  3395. this.isCoverImgDiv = true;
  3396. },
  3397. handleRemoveActive() {
  3398. this.isCoverImgDiv = false;
  3399. },
  3400. getBase64(img, callback) {
  3401. const reader = new FileReader();
  3402. reader.addEventListener('load', () => callback(reader.result));
  3403. reader.readAsDataURL(img);
  3404. },
  3405. beforeUpload(info) {
  3406. const isZip = info.type.includes('png') || info.type.includes('jpeg');
  3407. const fileOvesize = info.size > (1024 * 1024);
  3408. if (!isZip) {
  3409. this.$message.error('请上传正确类型的图片');
  3410. this.imageUrl = '';
  3411. this.urlResult = '';
  3412. this.md5Result = '';
  3413. return;
  3414. }
  3415. if (fileOvesize) {
  3416. this.$message.error('图片大小不能超过1M');
  3417. this.imageUrl = '';
  3418. this.urlResult = '';
  3419. this.md5Result = '';
  3420. return;
  3421. }
  3422. new Promise(function (resolve, reject) {
  3423. let width = 108;
  3424. let height = 108;
  3425. let _URL = window.URL || window.webkitURL;
  3426. let img = new Image();
  3427. img.onload = function () {
  3428. let valid = img.width === width && img.height === height;
  3429. valid ? resolve() : reject();
  3430. };
  3431. img.src = _URL.createObjectURL(info);
  3432. }).then(() => {
  3433. this.handleMd5(info);
  3434. this.getBase64(info, imageUrl => {
  3435. this.imageUrl = imageUrl;
  3436. });
  3437. }, () => {
  3438. this.$message.error('图片尺寸必须是108*108!');
  3439. this.imageUrl = '';
  3440. this.urlResult = '';
  3441. this.md5Result = '';
  3442. return Promise.reject();
  3443. });
  3444. },
  3445. cosUpload(file) {
  3446. let that = this;
  3447. let date = new Date();
  3448. let y = date.getFullYear();
  3449. let MM = date.getMonth() + 1;
  3450. MM = MM < 10 ? '0' + MM : MM;
  3451. let d = date.getDate();
  3452. d = d < 10 ? '0' + d : d;
  3453. let timeElse = new Date().getTime();
  3454. let arr = file.name.split('.');
  3455. let str = '';
  3456. for (let i = 0; i < arr.length; i++) {
  3457. if (i === arr.length - 1) {
  3458. }
  3459. else {
  3460. if (i === arr.length - 2) {
  3461. str += arr[i];
  3462. }
  3463. else {
  3464. str += arr[i] + '.';
  3465. }
  3466. }
  3467. }
  3468. cos.putObject(
  3469. {
  3470. Bucket: 'media-1301855440',
  3471. Region: 'ap-chongqing',
  3472. // 存储桶所在地域,必须字段
  3473. Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
  3474. StorageClass: 'STANDARD',
  3475. Body: file // 上传文件对象
  3476. },
  3477. function (err, data) {
  3478. if (err) {
  3479. that.$message.error('上传失败!!!' + err);
  3480. return;
  3481. }
  3482. that.loadingElse = false;
  3483. that.fileList.push({
  3484. uid: file.name,
  3485. name: file.name,
  3486. status: 'done',
  3487. url: '//' + data.Location
  3488. });
  3489. that.urlResult = '//' + data.Location;
  3490. }
  3491. );
  3492. },
  3493. handleMd5(file) {
  3494. let bmf = new BMF();
  3495. let that = this;
  3496. return new Promise(function (resolve, reject) {
  3497. bmf.md5(file, (err, md5) => {
  3498. that.md5Result = md5;
  3499. getAction('/file/imageCheck', {code: md5}).then(result => {
  3500. if (result.code === -206) {
  3501. that.cosUpload(file);
  3502. resolve();
  3503. }
  3504. else {
  3505. that.urlResult = result.url;
  3506. // reject();
  3507. }
  3508. }).catch(error => {
  3509. console.log(error, 'eeee');
  3510. reject();
  3511. });
  3512. });
  3513. });
  3514. },
  3515. handleRelaxSure() {
  3516. let paramsFormData = this.configForm;
  3517. console.log(paramsFormData);
  3518. if (paramsFormData.adDirectionalFlag === 'add') {
  3519. paramsFormData.adAudiencePackageId = null;
  3520. this.packageMessageDetail = [];
  3521. }
  3522. else if (paramsFormData.adDirectionalFlag === 'choice') {
  3523. paramsFormData.adDistrict = 'NONE';
  3524. this.listArr = [];
  3525. paramsFormData.adLocationType = '';
  3526. paramsFormData.adGender = 'NONE';
  3527. paramsFormData.adSelectAge = ['NONE'];
  3528. paramsFormData.customPerson = 'NONE';
  3529. paramsFormData.updateGetingInclude = [];
  3530. paramsFormData.adRetargetingTagsInclude = '';
  3531. paramsFormData.adRetargetingTagsExclude = '';
  3532. paramsFormData.updateGetingExclude = [];
  3533. paramsFormData.adRetargetingTagsType = '';
  3534. paramsFormData.adSuperiorPopularityType = 'NONE';
  3535. paramsFormData.adInterestActionMode = 'UNLIMITED';
  3536. paramsFormData.adDeviceSelectType = ['NONE'];
  3537. paramsFormData.adAndroidVersion = 'NONE';
  3538. paramsFormData.adHideIfConverted = 'NO_EXCLUDE';
  3539. paramsFormData.adSelectAc = ['NONE'];
  3540. paramsFormData.adHideIfExists = '0';
  3541. paramsFormData.adAutoExtendEnabled = '0';
  3542. paramsFormData.adAutoExtendTargets = '';
  3543. paramsFormData.adSelectCity = [];
  3544. this.adAutoExtendList = [];
  3545. }
  3546. if (paramsFormData.adDistrict === 'CITY') {
  3547. if (!paramsFormData.adSelectCity.length) {
  3548. this.$message.error('请选择省市');
  3549. return;
  3550. }
  3551. }
  3552. else {
  3553. this.listArr = []
  3554. this.configForm.adSelectCity = []
  3555. paramsFormData.adSelectCity = []
  3556. }
  3557. // if (paramsFormData.checkboxChangeValue.length === 1 && paramsFormData.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  3558. // paramsFormData.adDeliveryRange = 'UNION';
  3559. // paramsFormData.creativeDownloadStatus = null;
  3560. // }
  3561. // else {
  3562. // paramsFormData.adDeliveryRange = 'DEFAULT';
  3563. // paramsFormData.creativeDownloadStatus = 1;
  3564. // }
  3565. if (paramsFormData.adDirectionalFlag === 'choice' && !paramsFormData.adAudiencePackageId) {
  3566. this.$message.error('请选择已有定向包');
  3567. return;
  3568. }
  3569. if (paramsFormData.customPerson === 'a') {
  3570. if (paramsFormData.adRetargetingTagsType === '1' && !paramsFormData.adRetargetingTagsInclude) {
  3571. this.$message.error('请选择人群');
  3572. return;
  3573. }
  3574. else if (paramsFormData.adRetargetingTagsType === '2' && !paramsFormData.adRetargetingTagsExclude) {
  3575. this.$message.error('请选择人群');
  3576. return;
  3577. }
  3578. else if (paramsFormData.adRetargetingTagsType === '3' && (!paramsFormData.adRetargetingTagsExclude || !paramsFormData.adRetargetingTagsInclude)) {
  3579. this.$message.error('请选择人群');
  3580. return;
  3581. }
  3582. }
  3583. else{
  3584. paramsFormData.adRetargetingTagsType = ''
  3585. }
  3586. if (paramsFormData.adAutoExtendEnabled === '1' && !paramsFormData.adAutoExtendTargets) {
  3587. this.$message.error('请选择可开放定向');
  3588. return;
  3589. }
  3590. if (paramsFormData.adScheduleType === 'SCHEDULE_START_END' && !paramsFormData.launchDateRange.length) {
  3591. this.$message.error('请选择投放时间');
  3592. return;
  3593. }
  3594. if (paramsFormData.launchTimeInterval === 'a' && paramsFormData.scheduleTimeData === str) {
  3595. this.$message.error('请选择投放时段');
  3596. return;
  3597. }
  3598. if (this.campaignStatus) {
  3599. return;
  3600. }
  3601. if (paramsFormData.adBudget < paramsFormData.adCpaBid) {
  3602. this.isAdCpaBidBlur = true;
  3603. this.adCpaBidBlurTxt = '出价不能大于预算';
  3604. return;
  3605. }
  3606. else {
  3607. this.isAdCpaBidBlur = false;
  3608. }
  3609. if (this.subTitleMsgStatus) {
  3610. return;
  3611. }
  3612. if (paramsFormData.adverPosition === 'a') {
  3613. paramsFormData.inventoryCatalog = 'SMART';
  3614. paramsFormData.creativeSmartInventory = 'SMART';
  3615. }
  3616. else if (paramsFormData.adverPosition === 'b') {
  3617. if (!paramsFormData.checkboxChangeValue.length) {
  3618. this.$message.error('请选择媒体指定位置');
  3619. return;
  3620. }
  3621. if (paramsFormData.checkboxChangeValue.length === 1 && paramsFormData.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  3622. paramsFormData.adDeliveryRange = 'UNION';
  3623. paramsFormData.creativeDownloadStatus = null;
  3624. }
  3625. else {
  3626. paramsFormData.adDeliveryRange = 'DEFAULT';
  3627. paramsFormData.creativeDownloadStatus = 1;
  3628. }
  3629. paramsFormData.creativeInventoryTypes = paramsFormData.checkboxChangeValue;
  3630. }
  3631. else if (paramsFormData.adverPosition === 'c') {
  3632. if (!paramsFormData.radioChangeValue) {
  3633. this.$message.error('请选择场景指定位置');
  3634. return;
  3635. }
  3636. paramsFormData.creativeSceneInventory = paramsFormData.radioChangeValue;
  3637. }
  3638. if (paramsFormData.launchTimeInterval === 'buxian') {
  3639. paramsFormData.adScheduleTime = '';
  3640. }
  3641. else if (paramsFormData.launchTimeInterval === 'a') {
  3642. paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
  3643. }
  3644. if (paramsFormData.adScheduleType === 'SCHEDULE_START_END') {
  3645. paramsFormData.adStartTime = paramsFormData.launchDateRange[0];
  3646. paramsFormData.adEndTime = paramsFormData.launchDateRange[1];
  3647. }
  3648. else if (paramsFormData.adScheduleType === 'SCHEDULE_FROM_NOW') {
  3649. paramsFormData.adStartTime = '';
  3650. paramsFormData.adEndTime = '';
  3651. }
  3652. if (paramsFormData.launchTimeInterval === 'buxian') {
  3653. paramsFormData.adScheduleTime = str;
  3654. }
  3655. else if (paramsFormData.launchTimeInterval === 'a') {
  3656. paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
  3657. }
  3658. if (paramsFormData.adAndroidVersion === 'a') {
  3659. paramsFormData.adAndroidOsv = paramsFormData.androidChangeValue;
  3660. }
  3661. else {
  3662. paramsFormData.adAndroidOsv = 'NONE';
  3663. }
  3664. // TODO 使用抖音号和搭配试玩,暂时没有字段,默认参数为空
  3665. paramsFormData.creativeIesCoreUserId = '';
  3666. paramsFormData.creativePlayableUrl = '';
  3667. paramsFormData.adCity = paramsFormData.adSelectCity.join(',');
  3668. paramsFormData.adAge = paramsFormData.adSelectAge.join(',');
  3669. paramsFormData.adAc = paramsFormData.adSelectAc.join(',');
  3670. paramsFormData.adDeviceType = paramsFormData.adDeviceSelectType.join(',');
  3671. paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
  3672. paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
  3673. paramsFormData.creativeProductImageCode = this.md5Result;
  3674. paramsFormData.imageUrl = this.urlResult;
  3675. paramsFormData.adKeywords = this.creativeTag;
  3676. paramsFormData.copywritingNumber = paramsFormData.copywritingNumber?paramsFormData.copywritingNumber:0
  3677. paramsFormData.userId = this.userInfo().id;
  3678. this.$refs.ruleForm.validate(valid => {
  3679. if (valid) {
  3680. this.sureLoading = true;
  3681. if (this.modalTitle === 'add') {
  3682. this.handleAddList(paramsFormData);
  3683. }
  3684. else if (this.modalTitle === 'edit') {
  3685. this.handleEditList(paramsFormData);
  3686. }
  3687. else if (this.modalTitle === 'copy') {
  3688. this.handleAddList(paramsFormData);
  3689. }
  3690. }
  3691. else {
  3692. console.log('error submit!!');
  3693. return false;
  3694. }
  3695. });
  3696. },
  3697. handleEditList(data) {
  3698. const queryData = data;
  3699. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  3700. queryData.id = routeQuery.id;
  3701. putAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/edit', queryData).then(result => {
  3702. if (result.code === 0) {
  3703. this.$message.success(result.message);
  3704. this.sureLoading = false;
  3705. this.$router.replace('/account-config/account-config');
  3706. this.$bus.$emit('remove', '/account-config/components/configuration-modal');
  3707. }
  3708. else {
  3709. this.sureLoading = false;
  3710. this.$message.error(result.message);
  3711. }
  3712. }).catch(error => {
  3713. console.log(error, 'eeee');
  3714. });
  3715. },
  3716. handleRelaxCancel() {
  3717. this.$router.replace('/account-config/account-config');
  3718. this.$bus.$emit('remove', '/account-config/components/configuration-modal');
  3719. },
  3720. handleEnterChang(value) {
  3721. this.creativeTag.push(...value);
  3722. this.creativeTag = [...new Set(this.creativeTag)];
  3723. for (let i = 0; i < this.creativeTag.length; i++) {
  3724. if (this.creativeTag[i].length > 10) {
  3725. this.creativeTag.splice(i, 1);
  3726. this.$message.error('创意标签最多只能十个字符,超过的已清除');
  3727. }
  3728. }
  3729. this.configForm.creativeLabel = [];
  3730. },
  3731. handleTagsClose(removedTag) {
  3732. const tags = this.creativeTag.filter(tag => tag !== removedTag);
  3733. this.creativeTag = tags;
  3734. }
  3735. }
  3736. };
  3737. </script>
  3738. <style lang="less">
  3739. @import "configuration-modal";
  3740. .display-none-selset {
  3741. display: none !important;
  3742. }
  3743. </style>