configuration-modal.vue 197 KB

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