configuration-modal.vue 188 KB

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