configuration-copy.vue 165 KB

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