configuration-copy.vue 167 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255
  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" :disabled="originalityStatus">自定义创意</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="creativeActionText" key="REWARDED_VIDEO">
  807. <a-select
  808. class="common-input-long"
  809. v-model="configForm.creativeActionText"
  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 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="creativeActionText" key="ORIGINAL_VIDEO">
  870. <a-select
  871. class="common-input-long"
  872. v-model="configForm.creativeActionText"
  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 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="creativeActionText" key="SPLASH_VIDEO">
  911. <a-select
  912. class="common-input-long"
  913. v-model="configForm.creativeActionText"
  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 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" :disabled="pictureStatus">横版视频</a-radio-button>
  962. <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE" :disabled="pictureStatus">大图横图</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" :disabled="pictureStatus">大图竖图</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="isTomatoStatus" label="行动号召" prop="creativeActionText" key="SPLASH_VIDEO_ONE">
  1021. <a-select
  1022. class="common-input-long"
  1023. v-model="configForm.creativeActionText"
  1024. >
  1025. <a-select-option
  1026. v-for="(item, index) in creativeOptions"
  1027. :key="index + 1"
  1028. :value="item"
  1029. >
  1030. {{ item }}
  1031. </a-select-option>
  1032. </a-select>
  1033. </a-form-model-item>
  1034. <a-form-model-item v-if="isTAwemeStatus" label="行动号召">
  1035. <a-radio-group v-model="configForm.creativeEnablePersonalAction" button-style="solid">
  1036. <a-radio-button :value="true">开启智能优选</a-radio-button>
  1037. <a-radio-button :value="false">关闭智能优选</a-radio-button>
  1038. </a-radio-group>
  1039. <span class="especial-label">*</span>
  1040. </a-form-model-item>
  1041. <div v-if="isTAwemeStatus" class="adver-position-radio">
  1042. <a-form-model-item prop="creativeCallToAction">
  1043. <a-select
  1044. class="common-input-long"
  1045. v-model="configForm.creativeCallToAction"
  1046. >
  1047. <a-select-option
  1048. v-for="(item, index) in configForm.creativeOptions"
  1049. :key="index + 1"
  1050. :value="item"
  1051. >
  1052. {{ item }}
  1053. </a-select-option>
  1054. </a-select>
  1055. </a-form-model-item>
  1056. </div>
  1057. <a-form-model-item label="来源" :prop="getSource">
  1058. <a-input
  1059. class="common-input-long"
  1060. placeholder="请输入来源"
  1061. v-model="configForm.creativeSource"
  1062. allow-clear
  1063. />
  1064. </a-form-model-item>
  1065. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="应用名" prop="creativeAppName">
  1066. <a-input
  1067. class="common-input-long"
  1068. placeholder="请输入应用名"
  1069. v-model="configForm.creativeAppName"
  1070. allow-clear
  1071. />
  1072. </a-form-model-item>
  1073. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL' && platformLoadingType === 'APP_ANDROID'" label="副标题">
  1074. <a-input
  1075. class="common-input-long"
  1076. placeholder="请输入副标题"
  1077. v-model="configForm.creativeSubTitle"
  1078. allow-clear
  1079. @blur="handleCreativeSubTitleBlur"
  1080. />
  1081. </a-form-model-item>
  1082. <div v-if="subTitleMsgStatus" style="width: 500px;color: #f00;margin-left: 140px">{{ subTitleMsg }}</div>
  1083. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="自动生成视频素材">
  1084. <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
  1085. <a-radio-button :value="0">不启用</a-radio-button>
  1086. <a-radio-button :value="1">启用</a-radio-button>
  1087. </a-radio-group>
  1088. </a-form-model-item>
  1089. <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="最优创意衍生计划">
  1090. <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
  1091. <a-radio-button :value="0">不启用</a-radio-button>
  1092. <a-radio-button :value="1">启用</a-radio-button>
  1093. </a-radio-group>
  1094. </a-form-model-item>
  1095. <a-form-model-item label="广告评论">
  1096. <a-radio-group v-model="configForm.creativeIsCommentDisable" button-style="solid">
  1097. <a-radio-button :value="1">关闭</a-radio-button>
  1098. <a-radio-button :value="0">开启</a-radio-button>
  1099. </a-radio-group>
  1100. </a-form-model-item>
  1101. <a-form-model-item label="客户端下载视频">
  1102. <a-radio-group v-model="configForm.creativeDownloadStatus" button-style="solid">
  1103. <a-radio-button :value="1">关闭</a-radio-button>
  1104. <a-radio-button :value="0">开启</a-radio-button>
  1105. </a-radio-group>
  1106. </a-form-model-item>
  1107. <a-form-model-item label="创意展现">
  1108. <a-radio-group v-model="configForm.creativeDisplayMode" button-style="solid">
  1109. <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
  1110. <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
  1111. </a-radio-group>
  1112. </a-form-model-item>
  1113. <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_CTR'" class="adver-position-radio">
  1114. 选择优选模式,系统会自动对效果好的创意进行展示量倾斜,创意效果越好展示量越高
  1115. </div>
  1116. <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_RANDOM'" class="adver-position-radio">
  1117. 使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
  1118. </div>
  1119. </div>
  1120. </div>
  1121. <div class="separate-module-con">
  1122. <p class="rock-title">创意分类</p>
  1123. <a-form-model-item label="创意分类" prop="creativeThirdIndustryIds">
  1124. <a-cascader
  1125. v-model="configForm.creativeThirdIndustryIds"
  1126. class="common-input-long"
  1127. :options="createOptions"
  1128. :fieldNames="fieldNames"
  1129. placeholder="请选择创意分类"
  1130. />
  1131. </a-form-model-item>
  1132. <a-form-model-item label="创意标签">
  1133. <a-select
  1134. v-model="configForm.creativeLabel"
  1135. :token-separators="[',', ' ', ',']"
  1136. mode="tags"
  1137. style="width: 320px"
  1138. placeholder="按回车生成标签"
  1139. dropdownClassName="display-none-selset"
  1140. @change="handleEnterChang"
  1141. >
  1142. </a-select>
  1143. <span class="especial-label">*</span>
  1144. </a-form-model-item>
  1145. <div class="adver-position-radio">
  1146. <div class="creative-label-content">
  1147. <p>已选:{{ creativeTag.length || 0 }}</p>
  1148. <div class="label-content-select-tag">
  1149. <a-tag
  1150. v-for="item in creativeTag"
  1151. :key="item"
  1152. :closable="true"
  1153. class="tag-select-class"
  1154. @close="handleTagsClose(item)"
  1155. >
  1156. {{ item }}
  1157. </a-tag>
  1158. </div>
  1159. </div>
  1160. </div>
  1161. </div>
  1162. <div class="separate-module-con btn-Unique-con">
  1163. <a-button class="sure-btn" type="primary" :loading="sureLoading" @click="handleRelaxSure">确定</a-button>
  1164. <a-button class="cancel-btn" @click="handleRelaxCancel">取消</a-button>
  1165. </div>
  1166. </a-spin>
  1167. </a-form-model>
  1168. </div>
  1169. <a-modal
  1170. v-if="isWebUrl"
  1171. title="使用落地页"
  1172. :visible="isWebUrl"
  1173. dialog-class="web-url-modal"
  1174. :footer="false"
  1175. @cancel="handleCancelAll"
  1176. >
  1177. <div class="mater-viedo-content">
  1178. <a-row class="viedo-serach-class" :gutter="24">
  1179. <a-col :span="9">
  1180. <a-form-item label="落地页名称" :labelCol="modalCol" :wrapperCol="modalWrapper">
  1181. <a-input v-model="weburlModel" placeholder="请输入落地页名称关键字"/>
  1182. </a-form-item>
  1183. </a-col>
  1184. <a-col :span="8">
  1185. <a-button type="primary" style="position: relative;top: 4px;" @click="handleWebUrlSearch">搜索</a-button>
  1186. <a-button type="primary" style="position: relative;top: 4px;margin-left: 15px;" @click="handleWebUrlUpdate">重置</a-button>
  1187. </a-col>
  1188. </a-row>
  1189. <div class="viedo-content-class">
  1190. <div v-if="viedoDefaultList.length" class="viedo-content-group">
  1191. <li
  1192. class="content-modal-li"
  1193. v-for="(item, index) in viedoDefaultList"
  1194. :key="index"
  1195. @click="handleViedoListClick(item)"
  1196. >
  1197. <img v-if="item.thumbnail" :src="item.thumbnail"/>
  1198. <img v-else src="@/assets/noImg.png"/>
  1199. <div class="checkbox-select-show"><a>{{ item.name }}</a></div>
  1200. <div class="checkbox-select-time">ID:{{ item.siteId }}</div>
  1201. </li>
  1202. </div>
  1203. <div v-else class="no-data-group">
  1204. 暂无数据
  1205. </div>
  1206. </div>
  1207. </div>
  1208. </a-modal>
  1209. </div>
  1210. </template>
  1211. <script>
  1212. import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
  1213. import SelectCheckAll from '../../BatchCreate/toutiaoTime';
  1214. import radioCheck from '@/components/formComponents/checkBoxGroup';
  1215. import linkMultiSelect from '@/views/modules/BatchCreate/linkMultiSelect';
  1216. import DirectionalLogic from './directional-logic/directional-logic';
  1217. import AutoSelect from './tree-select/tree-select';
  1218. import CheckMorePlat from './check-more-plat/check-more-plat';
  1219. import moment from 'moment';
  1220. import BMF from 'browser-md5-file';
  1221. import {urlAcount} from '../account-config-server.js';
  1222. import {getAction, postAction, putAction} from '@/api/manage';
  1223. import {mapGetters} from 'vuex';
  1224. let COS = require('cos-js-sdk-v5');
  1225. let cos = new COS({
  1226. SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
  1227. SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
  1228. });
  1229. let str = '';
  1230. for (let i = 0; i < 7 * 48; i++) {
  1231. str += '0';
  1232. }
  1233. export default {
  1234. name: 'configuration-copy',
  1235. props: {
  1236. visible: {
  1237. type: Boolean,
  1238. default: false
  1239. }
  1240. },
  1241. components: {
  1242. AcountSearch,
  1243. SelectCheckAll,
  1244. radioCheck,
  1245. linkMultiSelect,
  1246. DirectionalLogic,
  1247. AutoSelect,
  1248. CheckMorePlat
  1249. },
  1250. data() {
  1251. let handleConfirmValue = (rule, value, callback) => {
  1252. 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.,?'\\+&%$#=~_-]+))*$/;
  1253. if (urlregex.test(value)) {
  1254. callback();
  1255. }
  1256. else {
  1257. callback('请输入正确的格式');
  1258. }
  1259. };
  1260. let handleCharacterLen100 = (rule, value, callback) => {
  1261. this.handleExportRules(value, 1, 100, callback);
  1262. };
  1263. let handleCharacterLen20 = (rule, value, callback) => {
  1264. this.handleExportRules(value, 4, 20, callback);
  1265. };
  1266. let handleCharacterLenCreativeApp = (rule, value, callback) => {
  1267. this.handleExportRules(value, 4, 20, callback);
  1268. };
  1269. let floatingIntervalValidator = (rule, value, callback) => {
  1270. const finallyResult = Number(this.configForm.adMinBid) + Number(value);
  1271. if (finallyResult < Number(this.configForm.adMaxBid)) {
  1272. callback();
  1273. }
  1274. else {
  1275. callback('最低出价+浮动间隔<最高出价');
  1276. }
  1277. };
  1278. let adMinBidValidator = (rule, value, callback) => {
  1279. const finallyResult = Number(this.configForm.adMaxBid);
  1280. if (finallyResult && value && Number(value) < finallyResult) {
  1281. this.$refs['ruleForm'].clearValidate(['adMaxBid']);
  1282. callback();
  1283. }
  1284. else {
  1285. callback('最低出价不能高于最高出价');
  1286. }
  1287. };
  1288. let adMaxBidValidator = (rule, value, callback) => {
  1289. const finallyResult = Number(this.configForm.adMinBid);
  1290. if (finallyResult && value && Number(value) > finallyResult) {
  1291. this.$refs['ruleForm'].clearValidate(['adMinBid']);
  1292. callback();
  1293. }
  1294. else {
  1295. callback('最高出价不能低于最低出价');
  1296. }
  1297. };
  1298. let budgetValidator = (rule, value, callback) => {
  1299. // if (this.modalTitle === 'edit') {
  1300. // if (Number(value) > Number(this.defaultAdBudget) && Number(value) < (Number(this.defaultAdBudget) + 100)) {
  1301. // callback('单次修改预算幅度, 不能低于100.0元');
  1302. // }
  1303. // else if (Number(value) < Number(this.defaultAdBudget) && Number(value) > (Number(this.defaultAdBudget) - 100)) {
  1304. // callback('单次修改预算幅度, 不能低于100.0元');
  1305. // }
  1306. // else {
  1307. // callback();
  1308. // }
  1309. // }
  1310. if (this.modalTitle === 'copy') {
  1311. callback();
  1312. }
  1313. };
  1314. return {
  1315. spinning: false,
  1316. landingPageShowData: {},
  1317. weburlModel: '',
  1318. modalCol: {
  1319. lg: {span: 6},
  1320. sm: {span: 6},
  1321. xs: {span: 6},
  1322. md: {span: 6}
  1323. },
  1324. modalWrapper: {
  1325. lg: {span: 18},
  1326. sm: {span: 18},
  1327. xs: {span: 14},
  1328. md: {span: 14}
  1329. },
  1330. viedoDefaultList: [],
  1331. viedoDefaultListUpdate: [],
  1332. isWebUrl: false,
  1333. sureLoading: false,
  1334. subTitleMsgStatus: false,
  1335. subTitleMsg: '',
  1336. AutoExtendEditSelect: [],
  1337. adPlatformOption: [
  1338. {
  1339. value: 'NONE',
  1340. label: '不限'
  1341. },
  1342. {
  1343. value: 'IOS',
  1344. label: 'IOS'
  1345. },
  1346. {
  1347. value: 'ANDROID',
  1348. label: 'ANDROID'
  1349. },
  1350. {
  1351. value: 'PC',
  1352. label: 'PC'
  1353. }
  1354. ],
  1355. adAutoExtendList: [],
  1356. directionalData: [],
  1357. platformLoadingType: '',
  1358. deviceTypeList: [
  1359. {
  1360. value: 'NONE',
  1361. label: '不限'
  1362. },
  1363. {
  1364. value: 'MOBILE',
  1365. label: '智能手机'
  1366. },
  1367. {
  1368. value: 'PAD',
  1369. label: '平板'
  1370. }
  1371. ],
  1372. adAcList: [
  1373. {
  1374. value: 'NONE',
  1375. label: '不限'
  1376. },
  1377. {
  1378. value: 'WIFI',
  1379. label: 'WI-FI'
  1380. },
  1381. {
  1382. value: '2G',
  1383. label: '2G'
  1384. },
  1385. {
  1386. value: '3G',
  1387. label: '3G'
  1388. },
  1389. {
  1390. value: '4G',
  1391. label: '4G'
  1392. }
  1393. ],
  1394. adHideIfConvertedDataOption: [ // 过滤已转化用户option
  1395. {
  1396. id: 'NO_EXCLUDE',
  1397. name: '不限'
  1398. },
  1399. {
  1400. id: 'AD',
  1401. name: '广告计划'
  1402. },
  1403. {
  1404. id: 'CAMPAIGN',
  1405. name: '广告组'
  1406. },
  1407. {
  1408. id: 'ADVERTISER',
  1409. name: '广告账户'
  1410. },
  1411. {
  1412. id: 'CUSTOMER',
  1413. name: '公司账户'
  1414. },
  1415. {
  1416. id: 'APP',
  1417. name: 'APP'
  1418. }
  1419. ],
  1420. packageMessageDetail: [],
  1421. selectiveList: [],
  1422. isLadderBlur: false,
  1423. ladderBlurTxt: '',
  1424. isAdCpaBid11Blur: false,
  1425. adCpaBid11BlurTxt: '',
  1426. isAdCpaBidBlur: false,
  1427. adCpaBidBlurTxt: '',
  1428. listArr: [],
  1429. regionCityListUrl: 'ctop/bytedanceAreaInfo/list',
  1430. defaultAdBudget: '',
  1431. adBudgetNum: 300,
  1432. campaignStatus: false,
  1433. detailData: {},
  1434. modalTitle: '',
  1435. toolConvertList: [],
  1436. optimizationOption: [],
  1437. md5Result: '',
  1438. urlResult: '',
  1439. createOptions: [],
  1440. campaignTags: ['序号', '日期'],
  1441. adNameTags: ['序号', '出价方式', '素材名称', '日期', '创意方式'],
  1442. fieldNames: {
  1443. label: 'industryName',
  1444. value: 'industryId',
  1445. children: 'children'
  1446. },
  1447. promotionTypeList: [
  1448. {
  1449. value: 'EXTERNAL',
  1450. label: '落地页'
  1451. },
  1452. {
  1453. value: 'ARTICLE',
  1454. label: '文章推广'
  1455. },
  1456. {
  1457. value: 'GOODS',
  1458. label: '商品推广'
  1459. },
  1460. {
  1461. value: 'DPA',
  1462. label: '商品目录'
  1463. },
  1464. {
  1465. value: 'STORE',
  1466. label: '门店推广'
  1467. },
  1468. {
  1469. value: 'AWEME',
  1470. label: '抖音号推广'
  1471. },
  1472. {
  1473. value: 'SHOP',
  1474. label: '店铺直投'
  1475. },
  1476. {
  1477. value: 'APP_ANDROID',
  1478. label: '应用下载-安卓'
  1479. },
  1480. {
  1481. value: 'APP_IOS',
  1482. label: '应用下载-IOS'
  1483. }
  1484. ],
  1485. ageArr: [
  1486. {
  1487. value: 'NONE',
  1488. label: '不限'
  1489. },
  1490. {
  1491. value: 'AGE_BETWEEN_18_23',
  1492. label: '18-23岁'
  1493. },
  1494. {
  1495. value: 'AGE_BETWEEN_24_30',
  1496. label: '24-30岁'
  1497. },
  1498. {
  1499. value: 'AGE_BETWEEN_31_40',
  1500. label: '31-40岁'
  1501. },
  1502. {
  1503. value: 'AGE_BETWEEN_41_49',
  1504. label: '41-49岁'
  1505. },
  1506. {
  1507. value: 'AGE_ABOVE_50',
  1508. label: '50岁+'
  1509. }
  1510. ],
  1511. fileList: [],
  1512. isCoverImgDiv: false,
  1513. imageUrl: '',
  1514. creativeTag: [],
  1515. radioStyle: {
  1516. display: 'block',
  1517. height: '30px',
  1518. lineHeight: '30px',
  1519. marginLeft: 0
  1520. },
  1521. labelCol: {span: 4},
  1522. wrapperCol: {span: 14},
  1523. rules: {
  1524. creativeAppName: [
  1525. {required: true, message: '请输入', trigger: 'blur'},
  1526. {validator: handleCharacterLenCreativeApp, trigger: 'blur'}
  1527. ],
  1528. adExternalUrl: [
  1529. {required: true, message: '请输入', trigger: 'blur'},
  1530. {validator: handleConfirmValue, trigger: 'blur'}
  1531. ],
  1532. adPackage: [
  1533. {required: true, message: '请输入', trigger: 'blur'}
  1534. ],
  1535. adDownloadUrl: [
  1536. {required: true, message: '请输入', trigger: 'blur'},
  1537. {validator: handleConfirmValue, trigger: 'blur'}
  1538. ],
  1539. campaignCnt: [
  1540. {required: true, message: '请输入', trigger: 'blur'}
  1541. ],
  1542. campaignAdCnt: [
  1543. {required: true, message: '请输入', trigger: 'blur'}
  1544. ],
  1545. dpLinkStartIndex: [
  1546. {required: true, message: '请输入', trigger: 'blur'}
  1547. ],
  1548. dpLinkEndIndex: [
  1549. {required: true, message: '请输入', trigger: 'blur'}
  1550. ],
  1551. accountBudget: [
  1552. {required: true, message: '请输入', trigger: 'blur'},
  1553. {validator: budgetValidator, trigger: 'blur'}
  1554. ],
  1555. campaignName: [
  1556. {required: true, message: '请输入广告组名称', trigger: 'blur'},
  1557. {validator: handleCharacterLen100, trigger: 'blur'}
  1558. ],
  1559. creativeSource: [
  1560. {required: true, message: '请输入', trigger: 'blur'},
  1561. {validator: handleCharacterLen20, trigger: 'blur'}
  1562. ],
  1563. adCpaBid: [
  1564. {required: true, message: '请输入', trigger: 'blur'}
  1565. ],
  1566. adStepBid: [
  1567. {required: true, message: '请输入', trigger: 'blur'},
  1568. {validator: floatingIntervalValidator, trigger: 'blur'}
  1569. ],
  1570. adMinBid: [
  1571. {required: true, message: '请输入最低出价', trigger: 'blur'},
  1572. {validator: adMinBidValidator, trigger: 'blur'}
  1573. ],
  1574. adMaxBid: [
  1575. {required: true, message: '请输入最高出价', trigger: 'blur'},
  1576. {validator: adMaxBidValidator, trigger: 'blur'}
  1577. ],
  1578. adName: [
  1579. {required: true, message: '请输入广告计划名称', trigger: 'blur'},
  1580. {validator: handleCharacterLen100, trigger: 'blur'}
  1581. ],
  1582. creativeProductDescription: [
  1583. {required: true, message: '请输入', trigger: 'blur'},
  1584. {min: 1, max: 7, message: '请输入1-7个字', trigger: 'blur'}
  1585. ],
  1586. creativeWebUrl: [
  1587. {required: true, message: '请输入', trigger: 'blur'},
  1588. {validator: handleConfirmValue, trigger: 'blur'}
  1589. ],
  1590. adAudiencePackageId: [{required: true, message: '请选择', trigger: 'change'}],
  1591. creativeCallToAction: [{required: true, message: '请选择', trigger: 'change'}],
  1592. creativeActionText: [{required: true, message: '请选择', trigger: 'change'}],
  1593. adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
  1594. adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
  1595. creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
  1596. },
  1597. configForm: {
  1598. collocationPlay: 'a',
  1599. adUnionVideoType: '',
  1600. creativeWebUrl: '',
  1601. adAppType: '',
  1602. adDirectionalFlag: 'add',
  1603. adInterestActionMode: 'UNLIMITED',
  1604. creativeDisplayMode: 'CREATIVE_DISPLAY_MODE_CTR',
  1605. creativeAppName: undefined,
  1606. creativeIsPresentedVideo: 0,
  1607. creativeGenerateDerivedAd: 0,
  1608. creativeIsCommentDisable: 0,
  1609. creativeDownloadStatus: 1,
  1610. creativeSubTitle: '',
  1611. adConvertedTimeDuration: 'THREE_MONTH',
  1612. adDownloadMode: 'DEFAULT',
  1613. dpLinkIndexUsed: 0,
  1614. adRetargetingTagsType: '',
  1615. adAudiencePackageId: undefined,
  1616. adStepBid: 0,
  1617. ladderOne: '',
  1618. ladderTwo: '',
  1619. adMinBid: '',
  1620. adMaxBid: '',
  1621. adBidCreateType: 'FIX',
  1622. creativeOptions: [],
  1623. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  1624. adLocationType: '',
  1625. adCity: '',
  1626. adSelectCity: [],
  1627. defaultFormList: [],
  1628. productSellingPoints: [], // 商品买点
  1629. adBudgetMode: 'BUDGET_MODE_DAY', // 预算类型
  1630. adDownloadUrl: '', // 下载链接
  1631. accountBudget: 0, // 账户日预算
  1632. accountId: undefined, // 账户
  1633. dpLinkStartIndex: 1,
  1634. dpLinkEndIndex: 2,
  1635. accountBudgetMode: '1', // 预算方式
  1636. campaignLandingType: 'APP', // 推广目标
  1637. advertisingType: '1', // 广告类型
  1638. campaignName: '', // 广告组名称
  1639. adName: '', // 广告计划名称
  1640. campaignCnt: 1, // 广告组计划数量
  1641. campaignAdCnt: 1, // 广告计划数量
  1642. launchTarget: 'OCPM', // 投放目标
  1643. adDownloadType: 'EXTERNAL_URL', // 下载方式
  1644. adExternalUrl: '', // 落地页链接
  1645. adOpenUrl: '', // 直达链接内容
  1646. adPackage: '', // 应用包名
  1647. adConvertType: '', // 转化跟踪方式
  1648. adConvertId: '', // 优化目标 -- 走接口
  1649. adverPosition: 'a', // 广告位置
  1650. radioChangeValue: '', // 广告位置-按照场景指定位置
  1651. checkboxChangeValue: [], // 广告位置-按照媒体指定位置
  1652. adDistrict: 'NONE', // 定向-区域
  1653. adGender: 'NONE', // 定向-性别
  1654. adAge: '', // 定向-年龄
  1655. adSelectAge: ['NONE'],
  1656. customPerson: 'NONE', // 定向-自定义
  1657. adSuperiorPopularityType: 'NONE', // 定向-媒体定向
  1658. adPlatform: 'NONE', // 定向-平台
  1659. updateAdPlatform: ['NONE'],
  1660. adDeviceSelectType: ['NONE'],
  1661. adSelectAc: ['NONE'],
  1662. adAc: '', // 定向-网络
  1663. adHideIfExists: '0', // 定向-已安装用户
  1664. adHideIfConverted: 'NO_EXCLUDE', // 定向-已转化用户
  1665. adAutoExtendEnabled: '0', // 定向-智能播放
  1666. adAndroidVersion: 'NONE', // 定向-安卓版本
  1667. androidChangeValue: '', // 安卓版本-自定义
  1668. adSmartBidType: 'SMART_BID_CUSTOM', // 投放场景
  1669. adBudget: 300, // 预算
  1670. adScheduleType: 'SCHEDULE_FROM_NOW', // 投放时间
  1671. launchDateRange: [], // 设置开始和结束时间
  1672. launchTimeInterval: 'buxian', // 投放时段
  1673. scheduleTimeData: str, // 指定时段选择
  1674. adPricing: 'PRICING_OCPM', // 付费方式
  1675. adCpaBid: 0.1, // 目标转化出价
  1676. creativeActionTrackUrl: '', // 监测地址
  1677. creativeMaterialMode: 'STATIC_ASSEMBLE', // 创意方式
  1678. creativeImageMode: 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL', // 创意内容
  1679. creativeProductDescription: '', // 卡片标题
  1680. creativeEnablePersonalAction: true, // 智能优选
  1681. creativeSource: '', // 来源
  1682. creativeThirdIndustryId: '', // 创意分类
  1683. creativeThirdIndustryIds: [], // 创意分类
  1684. adKeywords: [], // 创意标签
  1685. updateGetingInclude: [],
  1686. updateGetingExclude: [],
  1687. adRetargetingTagsInclude: '',
  1688. adRetargetingTagsExclude: '',
  1689. adAutoExtendTargets: '',
  1690. adDeliveryRange: '',
  1691. creativeCallToAction: undefined, // 行动号召
  1692. creativeActionText: undefined,
  1693. creativeLabel: undefined // 倡议标签
  1694. },
  1695. originalityStatus: true, // 创意状态
  1696. pictureStatus: false,
  1697. isTomatoStatus: false,
  1698. isTAwemeStatus: true
  1699. };
  1700. },
  1701. computed: {
  1702. selectOrientPlaceholder() {
  1703. if (!this.configForm.accountId) {
  1704. return '请选择账户';
  1705. }
  1706. else {
  1707. return 'able';
  1708. }
  1709. },
  1710. getEndIndex() {
  1711. return Number(this.configForm.dpLinkStartIndex) + 1;
  1712. },
  1713. getSource() {
  1714. if (this.configForm.campaignLandingType !== 'APP' || (this.configForm.campaignLandingType === 'APP' && this.configForm.adDownloadType === 'EXTERNAL_URL')) {
  1715. return 'creativeSource';
  1716. }
  1717. },
  1718. NewAountId() {
  1719. return this.configForm.accountId;
  1720. },
  1721. NewAdPackage() {
  1722. return this.configForm.adPackage;
  1723. },
  1724. NewAdExternalUrl() {
  1725. return this.configForm.adExternalUrl;
  1726. },
  1727. NewPlatformLoadingType() {
  1728. return this.platformLoadingType;
  1729. },
  1730. NewIsTAwemeStatus() {
  1731. return this.isTAwemeStatus;
  1732. },
  1733. NewAdSelectAge() {
  1734. return this.configForm.adSelectAge;
  1735. },
  1736. NewAdDistrict() {
  1737. return this.configForm.adDistrict;
  1738. },
  1739. NewAdGender() {
  1740. return this.configForm.adGender;
  1741. },
  1742. NewAdInterestActionMode() {
  1743. return this.configForm.adInterestActionMode;
  1744. },
  1745. NewCustomPerson() {
  1746. return this.configForm.customPerson;
  1747. },
  1748. NewAdAutoExtendList() {
  1749. return this.adAutoExtendList;
  1750. }
  1751. },
  1752. watch: {
  1753. NewAdAutoExtendList(newVal) {
  1754. if (!newVal.length) {
  1755. this.configForm.adAutoExtendEnabled = '0';
  1756. this.AutoExtendEditSelect = [];
  1757. }
  1758. },
  1759. NewCustomPerson(newVal) {
  1760. if (newVal !== 'NONE') {
  1761. this.adAutoExtendList.push({
  1762. value: 'CUSTOM_AUDIENCE',
  1763. label: '自定人群-定向'
  1764. });
  1765. }
  1766. else {
  1767. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'CUSTOM_AUDIENCE');
  1768. }
  1769. },
  1770. NewAdInterestActionMode(newVal) {
  1771. if (newVal !== 'UNLIMITED') {
  1772. this.adAutoExtendList.push({
  1773. value: 'INTEREST_ACTION',
  1774. label: '行为兴趣'
  1775. });
  1776. }
  1777. else {
  1778. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'INTEREST_ACTION');
  1779. }
  1780. },
  1781. NewAdGender(newVal) {
  1782. if (newVal !== 'NONE') {
  1783. if (!this.adAutoExtendList.find(item => item.value === 'GENDER')) {
  1784. this.adAutoExtendList.push({
  1785. value: 'GENDER',
  1786. label: '性别'
  1787. });
  1788. }
  1789. }
  1790. else {
  1791. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'GENDER');
  1792. }
  1793. },
  1794. NewAdDistrict(newVal) {
  1795. if (newVal !== 'NONE') {
  1796. this.adAutoExtendList.push({
  1797. value: 'REGION',
  1798. label: '地域'
  1799. });
  1800. }
  1801. else {
  1802. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'REGION');
  1803. }
  1804. },
  1805. NewAdSelectAge(newVal) {
  1806. if (newVal[0] !== 'NONE') {
  1807. if (!this.adAutoExtendList.find(item => item.value === 'AGE')) {
  1808. this.adAutoExtendList.push({
  1809. value: 'AGE',
  1810. label: '年龄'
  1811. });
  1812. }
  1813. }
  1814. else {
  1815. this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'AGE');
  1816. }
  1817. },
  1818. NewIsTAwemeStatus(newVal) {
  1819. if (!newVal) {
  1820. this.md5Result = '';
  1821. this.urlResult = '';
  1822. this.imageUrl = '';
  1823. this.configForm.creativeProductDescription = '';
  1824. this.configForm.defaultFormList = [];
  1825. this.configForm.creativeEnablePersonalAction = '';
  1826. this.configForm.creativeCallToAction = '';
  1827. }
  1828. else {
  1829. this.configForm.creativeEnablePersonalAction = true;
  1830. }
  1831. },
  1832. NewPlatformLoadingType(newVal, oldVal) {
  1833. if (newVal) {
  1834. this.configForm.adAppType = newVal;
  1835. }
  1836. if (newVal && this.configForm.accountId) {
  1837. this.handleGetChengZiSite();
  1838. }
  1839. else {
  1840. this.landingPageShowData = {};
  1841. this.configForm.creativeWebUrl = '';
  1842. }
  1843. },
  1844. NewAdExternalUrl(newVal, oldVal) {
  1845. if (newVal && this.configForm.accountId) {
  1846. const paramsData = {
  1847. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  1848. advertiserId: this.configForm.accountId,
  1849. deliveryRange: 'DEFAULT',
  1850. externalUrl: this.configForm.adExternalUrl,
  1851. landingType: this.configForm.campaignLandingType,
  1852. promotionContent: this.configForm.adDownloadType
  1853. };
  1854. this.handleGetOptimizationObjective(paramsData);
  1855. }
  1856. },
  1857. NewAdPackage(newVal, oldVal) {
  1858. if (newVal && this.configForm.accountId) {
  1859. const paramsData = {
  1860. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  1861. advertiserId: this.configForm.accountId,
  1862. appType: 'APP_ANDROID',
  1863. deliveryRange: 'DEFAULT',
  1864. externalUrl: this.configForm.adExternalUrl,
  1865. landingType: this.configForm.campaignLandingType,
  1866. packageName: this.configForm.adPackage,
  1867. promotionContent: this.configForm.adDownloadType
  1868. };
  1869. this.handleGetOptimizationObjective(paramsData);
  1870. }
  1871. },
  1872. NewAountId(newVal, oldVal) {
  1873. if ((newVal && this.configForm.adPackage) || (newVal && this.configForm.adExternalUrl)) {
  1874. const paramsData = {
  1875. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  1876. advertiserId: this.configForm.accountId,
  1877. appType: 'APP_ANDROID',
  1878. deliveryRange: 'DEFAULT',
  1879. externalUrl: this.configForm.adExternalUrl,
  1880. landingType: this.configForm.campaignLandingType,
  1881. packageName: this.configForm.adPackage,
  1882. promotionContent: this.configForm.adDownloadType
  1883. };
  1884. this.handleGetOptimizationObjective(paramsData);
  1885. }
  1886. if (newVal && this.platformLoadingType) {
  1887. this.handleGetChengZiSite();
  1888. }
  1889. else {
  1890. this.landingPageShowData = {};
  1891. this.configForm.creativeWebUrl = '';
  1892. }
  1893. if (newVal) {
  1894. this.handleGetCreativeClassification();
  1895. this.handleGetAdvertiserStrategy();
  1896. this.handleDirectionalList();
  1897. // this.handleGetAdAudiencePackage();
  1898. }
  1899. else {
  1900. this.createOptions = [];
  1901. this.creativeOptions = [];
  1902. this.selectiveList = [];
  1903. this.optimizationOption = [];
  1904. }
  1905. }
  1906. },
  1907. mounted() {
  1908. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  1909. if (routeQuery.accountModal === 'copy') {
  1910. this.modalTitle = 'copy';
  1911. this.handleGetDetailList();
  1912. }
  1913. },
  1914. methods: {
  1915. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  1916. moment,
  1917. handleSelectValue(data) {
  1918. this.configForm.accountId = data.id;
  1919. this.configForm.adConvertType = undefined;
  1920. this.configForm.adConvertId = undefined;
  1921. this.configForm.adAudiencePackageId = undefined;
  1922. this.packageMessageDetail = [];
  1923. this.toolConvertList = [];
  1924. this.optimizationOption = [];
  1925. this.handleClearlist();
  1926. this.handleGetAdAudiencePackage();
  1927. if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '1') {
  1928. this.$refs.direct.selectRightData = [];
  1929. this.$refs.direct.tableSelectIds = [];
  1930. }
  1931. else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '2') {
  1932. this.$refs.exclude.selectRightData = [];
  1933. this.$refs.exclude.tableSelectIds = [];
  1934. }
  1935. else if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '3') {
  1936. this.$refs.twoway.tableSelectDirectIds = [];
  1937. this.$refs.twoway.tableSelectDirectData = [];
  1938. this.$refs.twoway.tableSelectExcludeIds = [];
  1939. this.$refs.twoway.tableSelectExcludeData = [];
  1940. }
  1941. },
  1942. handleAdDistrict(e) {
  1943. const defaultValue = e.target.value;
  1944. if (defaultValue === 'NONE') {
  1945. this.listArr = [];
  1946. this.configForm.adLocationType = '';
  1947. }
  1948. else if (defaultValue === 'CITY') {
  1949. this.configForm.adLocationType = 'HOME';
  1950. }
  1951. },
  1952. handleAdUnionVideoType(e) {
  1953. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  1954. if (e.target.value === 'SPLASH_VIDEO') {
  1955. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_UNION_SPLASH';
  1956. }
  1957. else {
  1958. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  1959. }
  1960. },
  1961. NewCheckboxChangeValue(newVal) {
  1962. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  1963. let selectiveListUpdate = [...this.selectiveList];
  1964. if (newVal.length) {
  1965. if (newVal.includes('INVENTORY_AWEME_FEED')) {
  1966. this.isTAwemeStatus = true;
  1967. }
  1968. else {
  1969. this.isTAwemeStatus = false;
  1970. }
  1971. if (newVal.length === 4 && newVal.includes('INVENTORY_FEED') && newVal.includes('INVENTORY_VIDEO_FEED') && newVal.includes('INVENTORY_HOTSOON_FEED') && newVal.includes('INVENTORY_AWEME_FEED')) {
  1972. this.originalityStatus = true;
  1973. this.pictureStatus = true;
  1974. }
  1975. else if (newVal.length === 1 && newVal[0] === 'INVENTORY_TOMATO_NOVEL') {
  1976. this.isTomatoStatus = true;
  1977. this.originalityStatus = true;
  1978. this.pictureStatus = true;
  1979. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  1980. }
  1981. else {
  1982. this.isTomatoStatus = false;
  1983. this.originalityStatus = false;
  1984. this.pictureStatus = false;
  1985. }
  1986. if (newVal.length === 1 && newVal[0] === 'INVENTORY_UNION_SLOT') {
  1987. this.configForm.adUnionVideoType = 'REWARDED_VIDEO';
  1988. // this.$nextTick(() => {
  1989. // this.configForm.creativeEnablePersonalAction = true;
  1990. // });
  1991. this.configForm.adAudiencePackageId = undefined;
  1992. this.packageMessageDetail = [];
  1993. this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
  1994. }
  1995. else {
  1996. this.configForm.adUnionVideoType = '';
  1997. // this.configForm.creativeEnablePersonalAction = '';
  1998. this.configForm.adAudiencePackageId = undefined;
  1999. this.packageMessageDetail = [];
  2000. this.handleGetAdAudiencePackage();
  2001. }
  2002. }
  2003. else {
  2004. this.isTAwemeStatus = true;
  2005. this.isTomatoStatus = false;
  2006. this.configForm.adUnionVideoType = '';
  2007. this.configForm.adAudiencePackageId = undefined;
  2008. this.packageMessageDetail = [];
  2009. this.handleGetAdAudiencePackage();
  2010. }
  2011. },
  2012. handleGetChengZiSite() {
  2013. const paramsData = {
  2014. accountId: this.configForm.accountId
  2015. };
  2016. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', paramsData).then(result => {
  2017. if (result.code === 0) {
  2018. this.viedoDefaultList = result.result;
  2019. this.viedoDefaultListUpdate = result.result;
  2020. }
  2021. else {
  2022. this.$message.error(result.message);
  2023. }
  2024. }).catch(error => {
  2025. console.log(error, 'eeee');
  2026. });
  2027. },
  2028. handleViedoListClick(data) {
  2029. this.landingPageShowData = data;
  2030. this.configForm.creativeWebUrl = data.creativeWebUrl;
  2031. this.weburlModel = '';
  2032. this.isWebUrl = false;
  2033. },
  2034. handleWebUrlSearch() {
  2035. let defaultList = [];
  2036. this.viedoDefaultListUpdate.forEach(item => {
  2037. if (item.name && item.name.indexOf(this.weburlModel) !== -1) {
  2038. defaultList.push(item);
  2039. }
  2040. });
  2041. this.viedoDefaultList = defaultList;
  2042. },
  2043. handleWebUrlUpdate() {
  2044. this.viedoDefaultList = [...this.viedoDefaultListUpdate];
  2045. this.weburlModel = '';
  2046. },
  2047. handleCancelAll() {
  2048. this.handleWebUrlUpdate();
  2049. this.isWebUrl = false;
  2050. },
  2051. handleHaveWebUrl() {
  2052. this.isWebUrl = true;
  2053. },
  2054. handleAdhideConver(e) {
  2055. const defaultValue = e.target.value;
  2056. if (defaultValue === 'CUSTOMER' || defaultValue === 'APP') {
  2057. this.configForm.adConvertedTimeDuration = 'THREE_MONTH';
  2058. }
  2059. else {
  2060. this.configForm.adConvertedTimeDuration = '';
  2061. }
  2062. },
  2063. handleAdAutoExtend(e) {
  2064. const defaultValue = e.target.value;
  2065. if (defaultValue === '0') {
  2066. this.AutoExtendEditSelect = [];
  2067. this.configForm.adAutoExtendTargets = '';
  2068. }
  2069. },
  2070. handleCreativeSubTitleBlur(e) {
  2071. const defaultValue = e.target.value;
  2072. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2073. let length = 0;
  2074. let strArr = defaultValue.split('');
  2075. strArr.forEach(item => {
  2076. if (cnReg.test(item)) {
  2077. length += 2;
  2078. }
  2079. else {
  2080. length += 1;
  2081. }
  2082. });
  2083. if (4 <= length && length <= 24) {
  2084. this.subTitleMsgStatus = false;
  2085. this.subTitleMsg = '';
  2086. }
  2087. else if (!defaultValue) {
  2088. this.subTitleMsgStatus = false;
  2089. this.subTitleMsg = '';
  2090. }
  2091. else {
  2092. this.subTitleMsgStatus = true;
  2093. this.subTitleMsg = '只能输入4-24个字符';
  2094. }
  2095. },
  2096. handleSelectTxtend(list) {
  2097. this.configForm.adAutoExtendTargets = list && list.map(item => item.value).join(',');
  2098. },
  2099. handleCustomPerson(e) {
  2100. const defaultValue = e.target.value;
  2101. if (defaultValue === 'NONE') {
  2102. this.configForm.updateGetingInclude = [];
  2103. this.configForm.adRetargetingTagsInclude = '';
  2104. this.configForm.adRetargetingTagsExclude = '';
  2105. this.configForm.updateGetingExclude = [];
  2106. this.configForm.adRetargetingTagsType = '';
  2107. }
  2108. else if (defaultValue === 'a') {
  2109. this.configForm.adRetargetingTagsType = '1';
  2110. }
  2111. },
  2112. handleAsyncPackage() {
  2113. this.handleGetAdAudiencePackage();
  2114. this.configForm.adAudiencePackageId = undefined;
  2115. this.packageMessageDetail = [];
  2116. },
  2117. handleDpLinkIndexUsed(e) {
  2118. const defaultId = e.target.value;
  2119. if (defaultId === 0) {
  2120. this.adNameTags.pop();
  2121. this.configForm.dpLinkStartIndex = 1;
  2122. this.configForm.dpLinkEndIndex = 2;
  2123. this.configForm.campaignCnt = 1;
  2124. }
  2125. else if (defaultId === 1) {
  2126. this.adNameTags.push('dp链接标识');
  2127. }
  2128. },
  2129. handleDplinkStart(e) {
  2130. this.configForm.dpLinkStartIndex = Math.round(e);
  2131. },
  2132. handleDplinkEnd(e) {
  2133. this.configForm.dpLinkEndIndex = Math.round(e);
  2134. },
  2135. handleFloatingInterval(e) {
  2136. this.configForm.adStepBid = Number(Number(e.target.value).toFixed(2));
  2137. },
  2138. handleAdMinBidBlur(e) {
  2139. this.configForm.adMinBid = Number(Number(e.target.value).toFixed(2));
  2140. },
  2141. handleAdMaxBidBlur(e) {
  2142. const defaultValue = e.target.value;
  2143. this.configForm.adMaxBid = Number(Number(defaultValue).toFixed(2));
  2144. if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
  2145. this.isAdCpaBidBlur = true;
  2146. this.adCpaBidBlurTxt = '出价不能大于预算';
  2147. }
  2148. else {
  2149. this.isAdCpaBidBlur = false;
  2150. }
  2151. },
  2152. handleDirectionalList() {
  2153. const paramsData = {
  2154. accountId: this.configForm.accountId
  2155. };
  2156. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', paramsData).then(result => {
  2157. if (result.code === 0) {
  2158. result.result.forEach(item => {
  2159. item.key = item.custom_audience_id;
  2160. });
  2161. this.directionalData = result.result;
  2162. }
  2163. else {
  2164. this.directionalData = [];
  2165. this.$message.error(result.message);
  2166. }
  2167. }).catch(error => {
  2168. console.log(error, 'eeee');
  2169. });
  2170. },
  2171. handleSelectionAloneEvent(list) {
  2172. if (this.configForm.adRetargetingTagsType === '1') {
  2173. this.configForm.updateGetingInclude = list;
  2174. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2175. this.configForm.adRetargetingTagsExclude = '';
  2176. this.configForm.updateGetingExclude = [];
  2177. }
  2178. else if (this.configForm.adRetargetingTagsType === '2') {
  2179. this.configForm.updateGetingExclude = list;
  2180. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2181. this.configForm.updateGetingInclude = [];
  2182. this.configForm.adRetargetingTagsInclude = '';
  2183. }
  2184. },
  2185. handleClearTableAlone(list) {
  2186. this.configForm.updateGetingInclude = list;
  2187. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2188. },
  2189. handleClearTableLogic(list) {
  2190. this.configForm.updateGetingExclude = list;
  2191. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2192. },
  2193. handleClearlist() {
  2194. this.configForm.updateGetingInclude = [];
  2195. this.configForm.adRetargetingTagsInclude = '';
  2196. this.configForm.adRetargetingTagsExclude = '';
  2197. this.configForm.updateGetingExclude = [];
  2198. },
  2199. handleDirectEvent(list) {
  2200. this.configForm.updateGetingInclude = list;
  2201. this.configForm.adRetargetingTagsInclude = list && list.join(',');
  2202. },
  2203. handleExcludeEvent(list) {
  2204. this.configForm.updateGetingExclude = list;
  2205. this.configForm.adRetargetingTagsExclude = list && list.join(',');
  2206. },
  2207. handleDirectionalLogic(e) {
  2208. const selectValue = e.target.value;
  2209. this.handleDirectionalList();
  2210. if (selectValue === '1') {
  2211. this.$refs.exclude.aloneInput = '';
  2212. this.$refs.twoway.directInput = '';
  2213. this.$refs.twoway.excludeInput = '';
  2214. }
  2215. else if (selectValue === '2') {
  2216. this.$refs.direct.aloneInput = '';
  2217. this.$refs.twoway.directInput = '';
  2218. this.$refs.twoway.excludeInput = '';
  2219. }
  2220. else if (selectValue === '3') {
  2221. this.$refs.direct.aloneInput = '';
  2222. this.$refs.exclude.aloneInput = '';
  2223. }
  2224. },
  2225. handleGetAdAudiencePackage() {
  2226. const params = {
  2227. accountId: this.configForm.accountId
  2228. };
  2229. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
  2230. .then(result => {
  2231. if (result.code === 0) {
  2232. const defaultList = result.result;
  2233. this.promotionTypeList.forEach(item => {
  2234. defaultList.forEach(val => {
  2235. if (val.landing_type === item.value) {
  2236. val.changeName = item.label;
  2237. }
  2238. });
  2239. });
  2240. if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  2241. this.selectiveList = defaultList.filter(item => item.delivery_range === 'UNION');
  2242. }
  2243. else {
  2244. this.selectiveList = defaultList;
  2245. }
  2246. }
  2247. else {
  2248. this.$message.error(result.message);
  2249. }
  2250. })
  2251. .catch(error => {
  2252. console.log(error, 'eeee');
  2253. });
  2254. },
  2255. handleSelectiveOrientation(e) {
  2256. const ageUpdateList = [];
  2257. const defaultData = this.selectiveList.filter(item => item.audience_package_id === e);
  2258. defaultData.forEach(item => {
  2259. item.replaceSex = item.audience.gender === 'NONE' ? '不限' : item.audience.gender === 'GENDER_FEMALE' ? '女' : '男';
  2260. item.replaceEnabled = item.audience.auto_extend_enabled === 1 ? '开启' : '不开启';
  2261. item.replacePlate = item.audience.platform && item.audience.platform.length ? item.audience.platform.join(',') : '不限';
  2262. item.replaceCitys = item.audience.cityNames && item.audience.cityNames.length ? item.audience.cityNames.join(',') : '不限';
  2263. this.ageArr.forEach(val => {
  2264. if (item.audience.age && item.audience.age.length && item.audience.age.includes(val.value)) {
  2265. ageUpdateList.push(val.label);
  2266. }
  2267. });
  2268. item.replaceAge = ageUpdateList.length ? ageUpdateList.join(',') : '不限';
  2269. });
  2270. this.packageMessageDetail = defaultData;
  2271. },
  2272. handleBiddingMethod(e) {
  2273. this.configForm.adCpaBid = 0;
  2274. this.configForm.adMinBid = '';
  2275. this.configForm.adMaxBid = '';
  2276. this.configForm.adStepBid = 0;
  2277. this.isAdCpaBidBlur = false;
  2278. this.$refs['ruleForm'].clearValidate(['adMinBid']);
  2279. this.$refs['ruleForm'].clearValidate(['adMaxBid']);
  2280. },
  2281. handleAdCpaBidBlur(e) {
  2282. const defaultValue = e.target.value;
  2283. this.configForm.adCpaBid = Number(Number(defaultValue).toFixed(2));
  2284. if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
  2285. this.isAdCpaBidBlur = true;
  2286. this.adCpaBidBlurTxt = '出价不能大于预算';
  2287. }
  2288. else if (defaultValue > 10000) {
  2289. this.isAdCpaBidBlur = true;
  2290. this.adCpaBidBlurTxt = '目标转化出价不少于0.1元,不超过10000元,请正确输入';
  2291. }
  2292. else {
  2293. this.isAdCpaBidBlur = false;
  2294. }
  2295. },
  2296. handleGetAdvertiserStrategy() {
  2297. const params = {
  2298. accountId: this.configForm.accountId,
  2299. landingType: this.configForm.campaignLandingType,
  2300. advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
  2301. };
  2302. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
  2303. .then(result => {
  2304. if (result.code === 0) {
  2305. this.configForm.creativeOptions = result.result;
  2306. }
  2307. else {
  2308. this.$message.error(result.message);
  2309. }
  2310. })
  2311. .catch(error => {
  2312. console.log(error, 'eeee');
  2313. });
  2314. },
  2315. // 获取选中的城市
  2316. getSelectedCityArr(val) {
  2317. setTimeout(() => {
  2318. this.configForm.adSelectCity = val;
  2319. }, 200);
  2320. },
  2321. handleCheckedShowList(val) {
  2322. if (val.length) {
  2323. this.configForm.adSelectCity = val.map(item => item.code);
  2324. }
  2325. else {
  2326. this.configForm.adSelectCity = [];
  2327. }
  2328. },
  2329. handlePlateSelect(data) {
  2330. if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
  2331. data.splice(data.findIndex(item => item === 'NONE'), 1);
  2332. }
  2333. else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
  2334. data.splice(0, data.length - 1);
  2335. }
  2336. else if (data.length === 0) {
  2337. data.push('NONE');
  2338. }
  2339. },
  2340. getAgeSelect(data) {
  2341. if (data.length > 1 && data.findIndex(item => item === 'NONE') === 0) {
  2342. data.splice(data.findIndex(item => item === 'NONE'), 1);
  2343. }
  2344. else if (data.length > 1 && data.findIndex(item => item === 'NONE') === data.length - 1) {
  2345. data.splice(0, data.length - 1);
  2346. }
  2347. else if (data.length === 0) {
  2348. data.push('NONE');
  2349. }
  2350. },
  2351. handleAdBudgetBlur(e) {
  2352. const adBudgetInput = e.target.value;
  2353. this.configForm.adBudget = Number(Number(adBudgetInput).toFixed(2));
  2354. if (this.configForm.adCpaBid > adBudgetInput) {
  2355. this.isAdCpaBidBlur = true;
  2356. this.adCpaBidBlurTxt = '出价不能大于预算';
  2357. }
  2358. else {
  2359. this.isAdCpaBidBlur = false;
  2360. }
  2361. },
  2362. handleAccountBudget(e) {
  2363. const adBudgetInput = e.target.value;
  2364. this.configForm.accountBudget = Number(Number(adBudgetInput).toFixed(2));
  2365. },
  2366. handleExportRules(value, min, max, callback) {
  2367. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2368. let length = 0;
  2369. let strArr = value.split('');
  2370. strArr.forEach(item => {
  2371. if (cnReg.test(item)) {
  2372. length += 2;
  2373. }
  2374. else {
  2375. length += 1;
  2376. }
  2377. });
  2378. if (min <= length && length <= max) {
  2379. callback();
  2380. }
  2381. else {
  2382. callback(`只能输入${min}-${max}个字符`);
  2383. }
  2384. },
  2385. handleGetPackage() {
  2386. const params = {
  2387. urlPath: this.configForm.adDownloadUrl
  2388. };
  2389. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getPackageNameByUrl', params)
  2390. .then(result => {
  2391. if (result.code === 0) {
  2392. this.configForm.adPackage = result.result.package || '';
  2393. this.platformLoadingType = result.result.platform || '';
  2394. if (result.result.platform && result.result.platform === 'APP_ANDROID') {
  2395. this.configForm.adPlatform = 'ANDROID';
  2396. }
  2397. else if (result.result.platform && result.result.platform === 'APP_IOS') {
  2398. this.configForm.adPlatform = 'IOS';
  2399. }
  2400. }
  2401. else {
  2402. this.$message.error(result.message);
  2403. }
  2404. })
  2405. .catch(error => {
  2406. console.log(error, 'eeee');
  2407. });
  2408. },
  2409. handleAndroidVersion(e) {
  2410. if (e.target.value === 'NONE') {
  2411. this.configForm.androidChangeValue = '';
  2412. }
  2413. },
  2414. handleAdScheduleType(e) {
  2415. if (e.target.value === 'SCHEDULE_FROM_NOW') {
  2416. this.configForm.launchDateRange = [];
  2417. }
  2418. },
  2419. handleLaunchTimeInterval(e) {
  2420. if (e.target.value === 'buxian') {
  2421. this.configForm.scheduleTimeData = str;
  2422. }
  2423. },
  2424. handleAdverPosition(e) {
  2425. this.$refs['ruleForm'].clearValidate(['creativeSource']);
  2426. if (e.target.value === 'a') {
  2427. this.configForm.radioChangeValue = '';
  2428. this.configForm.checkboxChangeValue = [];
  2429. this.isTAwemeStatus = true;
  2430. this.originalityStatus = true;
  2431. this.pictureStatus = false;
  2432. }
  2433. else if (e.target.value === 'b') {
  2434. this.configForm.radioChangeValue = '';
  2435. this.pictureStatus = true;
  2436. this.originalityStatus = true;
  2437. }
  2438. else if (e.target.value === 'c') {
  2439. this.configForm.checkboxChangeValue = [];
  2440. this.isTAwemeStatus = true;
  2441. this.originalityStatus = true;
  2442. this.pictureStatus = false;
  2443. }
  2444. this.configForm.adUnionVideoType = '';
  2445. this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
  2446. this.handleGetAdAudiencePackage();
  2447. },
  2448. handleAccountMode(e) {
  2449. if (e.target.value === '1') {
  2450. this.configForm.accountBudget = 0;
  2451. }
  2452. else if (e.target.value === '2') {
  2453. this.configForm.accountBudget = 1000;
  2454. }
  2455. },
  2456. handleAdDownLoadType(e) {
  2457. this.optimizationOption = [];
  2458. this.landingPageShowData = {};
  2459. this.configForm.creativeWebUrl = '';
  2460. this.platformLoadingType = '';
  2461. const defaultValue = e.target.value;
  2462. if (defaultValue === 'DOWNLOAD_URL') {
  2463. this.configForm.adExternalUrl = '';
  2464. this.configForm.adOpenUrl = '';
  2465. this.$refs.ruleForm.clearValidate(['adExternalUrl']);
  2466. }
  2467. else if (defaultValue === 'EXTERNAL_URL') {
  2468. this.configForm.adDownloadUrl = '';
  2469. this.configForm.adPackage = '';
  2470. this.configForm.adConvertId = '';
  2471. this.configForm.adAppType = '';
  2472. this.$refs.ruleForm.clearValidate(['adDownloadUrl']);
  2473. this.$refs.ruleForm.clearValidate(['adPackage']);
  2474. }
  2475. },
  2476. handleCampaignCnt(e) {
  2477. const finallyResult = e * this.configForm.campaignAdCnt;
  2478. if (finallyResult > 500) {
  2479. this.campaignStatus = true;
  2480. }
  2481. else {
  2482. this.campaignStatus = false;
  2483. }
  2484. },
  2485. handleCampaignAdCnt(e) {
  2486. const finallyResult = e * this.configForm.campaignCnt;
  2487. if (finallyResult > 500) {
  2488. this.campaignStatus = true;
  2489. }
  2490. else {
  2491. this.campaignStatus = false;
  2492. }
  2493. },
  2494. handleConvertChange(e) {
  2495. const convertTitle = this.optimizationOption.filter(item => item.convert_id === e);
  2496. this.configForm.creativeActionTrackUrl = convertTitle[0].action_track_url;
  2497. },
  2498. handleGetDetailList() {
  2499. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  2500. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id})
  2501. .then(result => {
  2502. if (result.code === 0) {
  2503. const detailData = result.result;
  2504. this.configForm.accountId = detailData.accountId;
  2505. let paramsData = {};
  2506. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  2507. paramsData = {
  2508. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2509. advertiserId: detailData.accountId,
  2510. appType: 'APP_ANDROID',
  2511. deliveryRange: 'DEFAULT',
  2512. externalUrl: detailData.adExternalUrl,
  2513. landingType: detailData.campaignLandingType,
  2514. packageName: detailData.adPackage,
  2515. promotionContent: detailData.adDownloadType
  2516. };
  2517. }
  2518. else if (detailData.adDownloadType === 'EXTERNAL_URL') {
  2519. paramsData = {
  2520. advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
  2521. advertiserId: detailData.accountId,
  2522. deliveryRange: 'DEFAULT',
  2523. externalUrl: detailData.adExternalUrl,
  2524. landingType: detailData.campaignLandingType,
  2525. promotionContent: detailData.adDownloadType
  2526. };
  2527. }
  2528. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
  2529. if (result.code === 0) {
  2530. const updateResult = result.result.filter(item => item.external_actions.length > 0);
  2531. this.configForm.adConvertType = updateResult[0].convert_type;
  2532. this.optimizationOption = updateResult[0].external_actions;
  2533. setTimeout(() => {
  2534. this.configForm.adConvertId = detailData.adConvertId;
  2535. this.spinning = false;
  2536. }, 2000);
  2537. }
  2538. else {
  2539. this.$message.error(result.message);
  2540. }
  2541. }).catch(error => {
  2542. console.log(error, 'eeee');
  2543. });
  2544. if (detailData.adAudiencePackageId) {
  2545. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: detailData.accountId})
  2546. .then(result => {
  2547. if (result.code === 0) {
  2548. let checkboxChangeValueList = detailData.creativeInventoryType ? detailData.creativeInventoryType.split(',') : [];
  2549. if (checkboxChangeValueList.length === 1 && checkboxChangeValueList[0] === 'INVENTORY_UNION_SLOT') {
  2550. this.selectiveList = result.result.filter(item => item.delivery_range === 'UNION');
  2551. }
  2552. else {
  2553. this.selectiveList = result.result || [];
  2554. }
  2555. this.configForm.adAudiencePackageId = Number(detailData.adAudiencePackageId);
  2556. this.handleSelectiveOrientation(Number(detailData.adAudiencePackageId));
  2557. }
  2558. else {
  2559. this.$message.error(result.message);
  2560. }
  2561. })
  2562. .catch(error => {
  2563. console.log(error, 'eeee');
  2564. });
  2565. }
  2566. this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex;
  2567. this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex;
  2568. this.configForm.accountBudgetMode = detailData.accountBudgetMode;
  2569. this.configForm.accountBudget = detailData.accountBudget;
  2570. this.configForm.adDirectionalFlag = detailData.adDirectionalFlag;
  2571. this.configForm.campaignLandingType = detailData.campaignLandingType;
  2572. this.configForm.advertisingType = detailData.advertisingType || '1';
  2573. this.configForm.campaignName = detailData.campaignName || '';
  2574. this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
  2575. if (detailData.dpLinkIndexUsed === 1) {
  2576. this.adNameTags.push('dp链接标识');
  2577. }
  2578. this.configForm.adName = detailData.adName || '';
  2579. this.configForm.campaignCnt = detailData.campaignCnt || '';
  2580. this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
  2581. this.configForm.launchTarget = detailData.launchTarget || 'OCPM';
  2582. this.configForm.adDownloadType = detailData.adDownloadType;
  2583. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  2584. this.$nextTick(() => {
  2585. this.configForm.creativeAppName = detailData.creativeAppName || undefined;
  2586. });
  2587. }
  2588. this.configForm.adPlatform = detailData.adPlatform;
  2589. this.configForm.adExternalUrl = detailData.adExternalUrl || '';
  2590. this.configForm.adOpenUrl = detailData.adOpenUrl || '';
  2591. this.configForm.adDownloadUrl = detailData.adDownloadUrl || '';
  2592. this.configForm.adPackage = detailData.adPackage || '';
  2593. this.configForm.adConvertType = detailData.adConvertType || '';
  2594. this.configForm.adDistrict = detailData.adDistrict || 'NONE';
  2595. this.configForm.adAppType = detailData.adAppType;
  2596. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', {accountId: detailData.accountId}).then(result => {
  2597. if (result.code === 0) {
  2598. const defaultResult = result.result;
  2599. defaultResult.forEach(item => {
  2600. if (item.creativeWebUrl === detailData.creativeWebUrl) {
  2601. this.landingPageShowData = item;
  2602. }
  2603. });
  2604. this.configForm.creativeWebUrl = detailData.creativeWebUrl;
  2605. }
  2606. else {
  2607. this.$message.error(result.message);
  2608. }
  2609. }).catch(error => {
  2610. console.log(error, 'eeee');
  2611. });
  2612. if (detailData.adDownloadType === 'DOWNLOAD_URL') {
  2613. this.handleGetPackage();
  2614. }
  2615. setTimeout(() => {
  2616. this.listArr = detailData.adCity.split(',').map(item => Number(item));
  2617. this.configForm.adSelectCity = detailData.adCity.split(',');
  2618. }, 1000);
  2619. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', {accountId: detailData.accountId}).then(result => {
  2620. if (result.code === 0) {
  2621. result.result.forEach(item => {
  2622. item.key = item.custom_audience_id;
  2623. });
  2624. this.directionalData = result.result;
  2625. this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType;
  2626. if (detailData.adRetargetingTagsType === '3') {
  2627. this.configForm.customPerson = 'a';
  2628. this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
  2629. this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
  2630. this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
  2631. this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
  2632. }
  2633. else if (detailData.adRetargetingTagsType === '2') {
  2634. this.configForm.customPerson = 'a';
  2635. this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
  2636. this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
  2637. this.configForm.updateGetingInclude = [];
  2638. }
  2639. else if (detailData.adRetargetingTagsType === '1') {
  2640. this.configForm.customPerson = 'a';
  2641. this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
  2642. this.configForm.updateGetingExclude = [];
  2643. this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
  2644. }
  2645. else {
  2646. this.configForm.customPerson = 'NONE';
  2647. this.configForm.adRetargetingTagsExclude = '';
  2648. this.configForm.updateGetingExclude = '';
  2649. this.configForm.updateGetingInclude = [];
  2650. this.configForm.updateGetingExclude = [];
  2651. }
  2652. }
  2653. else {
  2654. this.$message.error(result.message);
  2655. }
  2656. }).catch(error => {
  2657. console.log(error, 'eeee');
  2658. });
  2659. this.configForm.adGender = detailData.adGender || 'NONE';
  2660. this.configForm.adLocationType = detailData.adLocationType;
  2661. this.configForm.adSelectAge = detailData.adAge.split(',');
  2662. this.configForm.adSelectAc = detailData.adAc.split(',');
  2663. this.configForm.adDeviceSelectType = detailData.adDeviceType.split(',');
  2664. this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
  2665. this.configForm.adAc = detailData.adAc;
  2666. this.configForm.adHideIfExists = String(detailData.adHideIfExists);
  2667. this.configForm.adHideIfConverted = detailData.adHideIfConverted;
  2668. this.configForm.adAutoExtendEnabled = detailData.adAutoExtendEnabled;
  2669. this.configForm.adSmartBidType = detailData.adSmartBidType;
  2670. this.configForm.adBudgetMode = detailData.adBudgetMode;
  2671. this.configForm.adBudget = detailData.adBudget;
  2672. this.defaultAdBudget = detailData.accountBudget;
  2673. this.configForm.adScheduleType = detailData.adScheduleType;
  2674. this.configForm.launchDateRange[0] = detailData.adStartTime;
  2675. this.configForm.launchDateRange[1] = detailData.adEndTime;
  2676. this.configForm.adPricing = detailData.adPricing;
  2677. this.configForm.adCpaBid = detailData.adCpaBid;
  2678. this.configForm.creativeActionTrackUrl = detailData.creativeActionTrackUrl;
  2679. this.configForm.creativeMaterialMode = detailData.creativeMaterialMode;
  2680. this.configForm.creativeImageMode = detailData.creativeImageMode;
  2681. this.configForm.creativeProductDescription = detailData.creativeProductDescription;
  2682. this.configForm.creativeEnablePersonalAction = detailData.creativeEnablePersonalAction;
  2683. const params = {
  2684. accountId: detailData.accountId,
  2685. landingType: detailData.campaignLandingType,
  2686. advancedCreativeType: 'ATTACHED_CREATIVE_NONE'
  2687. };
  2688. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
  2689. .then(result => {
  2690. if (result.code === 0) {
  2691. this.configForm.creativeOptions = result.result;
  2692. this.configForm.creativeCallToAction = detailData.creativeCallToAction;
  2693. this.configForm.creativeActionText = detailData.creativeActionText;
  2694. }
  2695. else {
  2696. this.$message.error(result.message);
  2697. }
  2698. })
  2699. .catch(error => {
  2700. console.log(error, 'eeee');
  2701. });
  2702. this.configForm.creativeSource = detailData.creativeSource;
  2703. this.configForm.adBidCreateType = detailData.adBidCreateType;
  2704. this.configForm.adMinBid = detailData.adMinBid;
  2705. this.configForm.adMaxBid = detailData.adMaxBid;
  2706. this.configForm.adStepBid = detailData.adStepBid;
  2707. this.configForm.adBidCreateType = detailData.adBidCreateType;
  2708. this.configForm.creativeThirdIndustryIds[0] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 4);
  2709. this.configForm.creativeThirdIndustryIds[1] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId.substr(0, 6);
  2710. this.configForm.creativeThirdIndustryIds[2] = detailData.creativeThirdIndustryId && detailData.creativeThirdIndustryId;
  2711. this.imageUrl = detailData.imageUrl;
  2712. this.urlResult = detailData.imageUrl;
  2713. this.md5Result = detailData.creativeProductImageCode;
  2714. if (detailData.adAndroidOsv !== 'NONE') {
  2715. this.configForm.adAndroidVersion = 'a';
  2716. this.configForm.androidChangeValue = detailData.adAndroidOsv;
  2717. }
  2718. else {
  2719. this.configForm.adAndroidVersion = 'NONE';
  2720. }
  2721. if (detailData.productSellingPoints) {
  2722. let productPointsList = [];
  2723. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2724. detailData.productSellingPoints.forEach((item, index) => {
  2725. productPointsList.push({
  2726. id: randomNum + index,
  2727. value: item
  2728. });
  2729. });
  2730. this.configForm.defaultFormList = productPointsList;
  2731. }
  2732. if (detailData.adScheduleTime.indexOf(1) !== -1) {
  2733. this.configForm.launchTimeInterval = 'a';
  2734. this.configForm.scheduleTimeData = detailData.adScheduleTime;
  2735. }
  2736. else {
  2737. this.configForm.launchTimeInterval = 'buxian';
  2738. }
  2739. if (detailData.creativeSceneInventory) {
  2740. this.configForm.adverPosition = 'c';
  2741. this.configForm.radioChangeValue = detailData.creativeSceneInventory;
  2742. }
  2743. else if (detailData.creativeInventoryType) {
  2744. this.configForm.adverPosition = 'b';
  2745. this.configForm.checkboxChangeValue = detailData.creativeInventoryType.split(',');
  2746. if (this.configForm.checkboxChangeValue.includes('INVENTORY_AWEME_FEED')) {
  2747. this.isTAwemeStatus = true;
  2748. }
  2749. else {
  2750. this.isTAwemeStatus = false;
  2751. }
  2752. if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  2753. this.configForm.adUnionVideoType = detailData.adUnionVideoType;
  2754. this.configForm.adDeliveryRange = 'UNION';
  2755. }
  2756. else {
  2757. this.configForm.adUnionVideoType = '';
  2758. this.configForm.adDeliveryRange = '';
  2759. }
  2760. }
  2761. else {
  2762. this.configForm.adverPosition = 'a';
  2763. }
  2764. if (detailData.adKeywords) {
  2765. this.creativeTag = detailData.adKeywords;
  2766. }
  2767. this.configForm.adInterestActionMode = detailData.adInterestActionMode;
  2768. this.configForm.creativeDisplayMode = detailData.creativeDisplayMode;
  2769. this.configForm.creativeIsPresentedVideo = detailData.creativeIsPresentedVideo;
  2770. this.configForm.creativeGenerateDerivedAd = detailData.creativeGenerateDerivedAd;
  2771. this.configForm.creativeIsCommentDisable = detailData.creativeIsCommentDisable;
  2772. this.configForm.creativeDownloadStatus = detailData.creativeDownloadStatus;
  2773. this.configForm.creativeSubTitle = detailData.creativeSubTitle;
  2774. this.configForm.adConvertedTimeDuration = detailData.adConvertedTimeDuration;
  2775. this.configForm.adDownloadMode = detailData.adDownloadMode;
  2776. this.configForm.adAutoExtendTargets = detailData.adAutoExtendTargets;
  2777. this.AutoExtendEditSelect = detailData.adAutoExtendTargets && detailData.adAutoExtendTargets.split(',');
  2778. }
  2779. else {
  2780. this.$message.error(result.message);
  2781. }
  2782. })
  2783. .catch(error => {
  2784. console.log(error, 'eeee');
  2785. });
  2786. },
  2787. handleConvertTypeChange(e) {
  2788. this.configForm.adConvertId = '';
  2789. this.optimizationOption = [];
  2790. this.toolConvertList.forEach(item => {
  2791. if (item.convert_type === e) {
  2792. this.optimizationOption = [...item.external_actions];
  2793. }
  2794. });
  2795. },
  2796. // 优化目标数据获取
  2797. handleGetOptimizationObjective(paramsData) {
  2798. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getToolConvert', paramsData).then(result => {
  2799. if (result.code === 0) {
  2800. this.toolConvertList = result.result;
  2801. if (this.configForm.adConvertType) {
  2802. this.handleConvertTypeChange(this.configForm.adConvertType);
  2803. }
  2804. }
  2805. else {
  2806. this.$message.error(result.message);
  2807. }
  2808. }).catch(error => {
  2809. console.log(error, 'eeee');
  2810. });
  2811. },
  2812. // 创意分类接口
  2813. handleGetCreativeClassification() {
  2814. const paramsData = {
  2815. accountId: this.configForm.accountId
  2816. };
  2817. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getIndustryList', paramsData).then(result => {
  2818. if (result.code === 0) {
  2819. this.createOptions = result.result;
  2820. }
  2821. else {
  2822. this.$message.error(result.message);
  2823. }
  2824. }).catch(error => {
  2825. console.log(error, 'eeee');
  2826. });
  2827. },
  2828. handleAddList(data) {
  2829. postAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/addBytedanceStrategy', data).then(result => {
  2830. if (result.code === 0) {
  2831. this.$message.success(result.message);
  2832. this.sureLoading = false;
  2833. this.$router.replace('/account-config/account-config');
  2834. this.$bus.$emit('remove', '/account-config/components/configuration-copy');
  2835. }
  2836. else {
  2837. this.sureLoading = false;
  2838. this.$message.error(result.message);
  2839. }
  2840. }).catch(error => {
  2841. console.log(error, 'eeee');
  2842. });
  2843. },
  2844. // 点击获取光标位置进行字段插入
  2845. handleGetChangeAll(item, field, type) {
  2846. let node = document.getElementById(field);
  2847. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  2848. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  2849. let txt = node.value;
  2850. if (startPos === 0 || endPos === 0) {
  2851. this.configForm[type] += '-{{' + item + '}}-';
  2852. }
  2853. else {
  2854. this.configForm[type] = txt.substring(0, startPos) + '-{{' + item + '}}-' + txt.substring(endPos);
  2855. node.selectionStart = startPos + item.length + 6;
  2856. node.selectionEnd = startPos + item.length + 6;
  2857. }
  2858. node.focus();
  2859. node.blur();
  2860. },
  2861. handleLaunchData(date, dateString) {
  2862. this.configForm.launchDateRange = dateString;
  2863. },
  2864. handleBudgetMode(e) {
  2865. if (e === 'BUDGET_MODE_TOTAL') {
  2866. this.configForm.adScheduleType = 'SCHEDULE_START_END';
  2867. this.adBudgetNum = this.configForm.launchTarget === 'OCPM' ? 300 : 0;
  2868. this.configForm.adBudget = 300;
  2869. if (Number(this.configForm.adCpaBid) > Number(this.configForm.adBudget)) {
  2870. this.isAdCpaBidBlur = true;
  2871. this.adCpaBidBlurTxt = '出价不能大于预算';
  2872. }
  2873. else {
  2874. this.isAdCpaBidBlur = false;
  2875. this.adCpaBidBlurTxt = '';
  2876. }
  2877. this.$message.warning('请设置投放时间');
  2878. }
  2879. else if (e === 'BUDGET_MODE_DAY') {
  2880. this.adBudgetNum = 0;
  2881. this.configForm.adBudget = 300;
  2882. }
  2883. },
  2884. handleDelOrigin(list) {
  2885. let formData = this.configForm.defaultFormList;
  2886. this.configForm.defaultFormList = formData.filter(item => list.id !== item.id);
  2887. },
  2888. handleAddOrigin() {
  2889. if (this.configForm.defaultFormList.length >= 10) {
  2890. this.$message.error('最多可以添加10个卖点');
  2891. return;
  2892. }
  2893. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2894. this.$nextTick(() => {
  2895. this.configForm.defaultFormList.push({
  2896. id: randomNum,
  2897. value: ''
  2898. });
  2899. });
  2900. },
  2901. handleCreativeWebUrl(e) {
  2902. const defaultValue = e.target.value;
  2903. this.landingPageShowData = {};
  2904. },
  2905. handleDownloadLink(e) {
  2906. const defaultValue = e.target.value;
  2907. if (defaultValue) {
  2908. this.handleGetPackage();
  2909. }
  2910. else {
  2911. this.platformLoadingType = '';
  2912. this.configForm.adPackage = '';
  2913. }
  2914. },
  2915. handleDeleteImg() {
  2916. this.imageUrl = '';
  2917. this.isCoverImgDiv = false;
  2918. },
  2919. handleChangeActive() {
  2920. this.isCoverImgDiv = true;
  2921. },
  2922. handleRemoveActive() {
  2923. this.isCoverImgDiv = false;
  2924. },
  2925. getBase64(img, callback) {
  2926. const reader = new FileReader();
  2927. reader.addEventListener('load', () => callback(reader.result));
  2928. reader.readAsDataURL(img);
  2929. },
  2930. beforeUpload(info) {
  2931. const isZip = info.type.includes('png') || info.type.includes('jpeg');
  2932. const fileOvesize = info.size > (1024 * 1024);
  2933. if (!isZip) {
  2934. this.$message.error('请上传正确类型的图片');
  2935. this.imageUrl = '';
  2936. this.urlResult = '';
  2937. this.md5Result = '';
  2938. return;
  2939. }
  2940. if (fileOvesize) {
  2941. this.$message.error('图片大小不能超过1M');
  2942. this.imageUrl = '';
  2943. this.urlResult = '';
  2944. this.md5Result = '';
  2945. return;
  2946. }
  2947. new Promise(function (resolve, reject) {
  2948. let width = 108;
  2949. let height = 108;
  2950. let _URL = window.URL || window.webkitURL;
  2951. let img = new Image();
  2952. img.onload = function () {
  2953. let valid = img.width === width && img.height === height;
  2954. valid ? resolve() : reject();
  2955. };
  2956. img.src = _URL.createObjectURL(info);
  2957. }).then(() => {
  2958. this.handleMd5(info);
  2959. this.getBase64(info, imageUrl => {
  2960. this.imageUrl = imageUrl;
  2961. });
  2962. }, () => {
  2963. this.$message.error('图片尺寸必须是108*108!');
  2964. this.imageUrl = '';
  2965. this.urlResult = '';
  2966. this.md5Result = '';
  2967. return Promise.reject();
  2968. });
  2969. },
  2970. cosUpload(file) {
  2971. let that = this;
  2972. let date = new Date();
  2973. let y = date.getFullYear();
  2974. let MM = date.getMonth() + 1;
  2975. MM = MM < 10 ? '0' + MM : MM;
  2976. let d = date.getDate();
  2977. d = d < 10 ? '0' + d : d;
  2978. let timeElse = new Date().getTime();
  2979. let arr = file.name.split('.');
  2980. let str = '';
  2981. for (let i = 0; i < arr.length; i++) {
  2982. if (i === arr.length - 1) {
  2983. }
  2984. else {
  2985. if (i === arr.length - 2) {
  2986. str += arr[i];
  2987. }
  2988. else {
  2989. str += arr[i] + '.';
  2990. }
  2991. }
  2992. }
  2993. cos.putObject(
  2994. {
  2995. Bucket: 'media-1301855440',
  2996. Region: 'ap-chongqing',
  2997. // 存储桶所在地域,必须字段
  2998. Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
  2999. StorageClass: 'STANDARD',
  3000. Body: file // 上传文件对象
  3001. },
  3002. function (err, data) {
  3003. if (err) {
  3004. that.$message.error('上传失败!!!' + err);
  3005. return;
  3006. }
  3007. that.loadingElse = false;
  3008. that.fileList.push({
  3009. uid: file.name,
  3010. name: file.name,
  3011. status: 'done',
  3012. url: '//' + data.Location
  3013. });
  3014. that.urlResult = '//' + data.Location;
  3015. }
  3016. );
  3017. },
  3018. handleMd5(file) {
  3019. let bmf = new BMF();
  3020. let that = this;
  3021. return new Promise(function (resolve, reject) {
  3022. bmf.md5(file, (err, md5) => {
  3023. that.md5Result = md5;
  3024. getAction('/file/imageCheck', {code: md5}).then(result => {
  3025. if (result.code === -206) {
  3026. that.cosUpload(file);
  3027. resolve();
  3028. }
  3029. else {
  3030. that.urlResult = result.url;
  3031. // reject();
  3032. }
  3033. }).catch(error => {
  3034. console.log(error, 'eeee');
  3035. reject();
  3036. });
  3037. });
  3038. });
  3039. },
  3040. handleRelaxSure() {
  3041. let paramsFormData = this.configForm;
  3042. if (paramsFormData.adDirectionalFlag === 'add') {
  3043. paramsFormData.adAudiencePackageId = null;
  3044. this.packageMessageDetail = [];
  3045. }
  3046. else if (paramsFormData.adDirectionalFlag === 'choice') {
  3047. paramsFormData.adDistrict = 'NONE';
  3048. this.listArr = [];
  3049. paramsFormData.adLocationType = '';
  3050. paramsFormData.adGender = 'NONE';
  3051. paramsFormData.adSelectAge = ['NONE'];
  3052. paramsFormData.customPerson = 'NONE';
  3053. paramsFormData.updateGetingInclude = [];
  3054. paramsFormData.adRetargetingTagsInclude = '';
  3055. paramsFormData.adRetargetingTagsExclude = '';
  3056. paramsFormData.updateGetingExclude = [];
  3057. paramsFormData.adRetargetingTagsType = '';
  3058. paramsFormData.adSuperiorPopularityType = 'NONE';
  3059. paramsFormData.adInterestActionMode = 'UNLIMITED';
  3060. paramsFormData.adDeviceSelectType = ['NONE'];
  3061. paramsFormData.adAndroidVersion = 'NONE';
  3062. paramsFormData.adHideIfConverted = 'NO_EXCLUDE';
  3063. paramsFormData.adSelectAc = ['NONE'];
  3064. paramsFormData.adHideIfExists = '0';
  3065. paramsFormData.adAutoExtendEnabled = '0';
  3066. paramsFormData.adAutoExtendTargets = '';
  3067. paramsFormData.adSelectCity = [];
  3068. this.adAutoExtendList = [];
  3069. }
  3070. if (paramsFormData.adDistrict === 'CITY') {
  3071. if (!paramsFormData.adSelectCity.length) {
  3072. this.$message.error('请选择省市');
  3073. return;
  3074. }
  3075. }
  3076. if (paramsFormData.checkboxChangeValue.length === 1 && paramsFormData.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
  3077. paramsFormData.adDeliveryRange = 'UNION';
  3078. }
  3079. else {
  3080. paramsFormData.adDeliveryRange = '';
  3081. }
  3082. if (paramsFormData.adDirectionalFlag === 'choice' && !paramsFormData.adAudiencePackageId) {
  3083. this.$message.error('请选择已有定向包');
  3084. return;
  3085. }
  3086. if (paramsFormData.customPerson === 'a') {
  3087. if (paramsFormData.adRetargetingTagsType === '1' && !paramsFormData.adRetargetingTagsInclude) {
  3088. this.$message.error('请选择人群');
  3089. return;
  3090. }
  3091. else if (paramsFormData.adRetargetingTagsType === '2' && !paramsFormData.adRetargetingTagsExclude) {
  3092. this.$message.error('请选择人群');
  3093. return;
  3094. }
  3095. else if (paramsFormData.adRetargetingTagsType === '3' && (!paramsFormData.adRetargetingTagsExclude || !paramsFormData.adRetargetingTagsInclude)) {
  3096. this.$message.error('请选择人群');
  3097. return;
  3098. }
  3099. }
  3100. if (paramsFormData.adAutoExtendEnabled === '1' && !paramsFormData.adAutoExtendTargets) {
  3101. this.$message.error('请选择可开放定向');
  3102. return;
  3103. }
  3104. if (paramsFormData.adScheduleType === 'SCHEDULE_START_END' && !paramsFormData.launchDateRange.length) {
  3105. this.$message.error('请选择投放时间');
  3106. return;
  3107. }
  3108. if (paramsFormData.launchTimeInterval === 'a' && paramsFormData.scheduleTimeData === str) {
  3109. this.$message.error('请选择投放时段');
  3110. return;
  3111. }
  3112. if (this.isTAwemeStatus && !this.urlResult) {
  3113. this.$message.error('请上传图片');
  3114. return;
  3115. }
  3116. if (this.isTAwemeStatus && !paramsFormData.defaultFormList.length) {
  3117. this.$message.error('请添加卖点');
  3118. return;
  3119. }
  3120. if (!this.creativeTag.length) {
  3121. this.$message.error('请添加标签');
  3122. return;
  3123. }
  3124. if (this.campaignStatus) {
  3125. return;
  3126. }
  3127. if (paramsFormData.adBudget < paramsFormData.adCpaBid) {
  3128. this.isAdCpaBidBlur = true;
  3129. this.adCpaBidBlurTxt = '出价不能大于预算';
  3130. return;
  3131. }
  3132. else {
  3133. this.isAdCpaBidBlur = false;
  3134. }
  3135. if (this.subTitleMsgStatus) {
  3136. return;
  3137. }
  3138. if (paramsFormData.adverPosition === 'a') {
  3139. paramsFormData.creativeSmartInventory = 1;
  3140. }
  3141. else if (paramsFormData.adverPosition === 'b') {
  3142. if (!paramsFormData.checkboxChangeValue.length) {
  3143. this.$message.error('请选择媒体指定位置');
  3144. return;
  3145. }
  3146. paramsFormData.creativeInventoryTypes = paramsFormData.checkboxChangeValue;
  3147. }
  3148. else if (paramsFormData.adverPosition === 'c') {
  3149. if (!paramsFormData.radioChangeValue) {
  3150. this.$message.error('请选择场景指定位置');
  3151. return;
  3152. }
  3153. paramsFormData.creativeSceneInventory = paramsFormData.radioChangeValue;
  3154. }
  3155. if (paramsFormData.launchTimeInterval === 'buxian') {
  3156. paramsFormData.adScheduleTime = '';
  3157. }
  3158. else if (paramsFormData.launchTimeInterval === 'a') {
  3159. paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
  3160. }
  3161. if (paramsFormData.adScheduleType === 'SCHEDULE_START_END') {
  3162. paramsFormData.adStartTime = paramsFormData.launchDateRange[0];
  3163. paramsFormData.adEndTime = paramsFormData.launchDateRange[1];
  3164. }
  3165. else if (paramsFormData.adScheduleType === 'SCHEDULE_FROM_NOW') {
  3166. paramsFormData.adStartTime = '';
  3167. paramsFormData.adEndTime = '';
  3168. }
  3169. if (paramsFormData.launchTimeInterval === 'buxian') {
  3170. paramsFormData.adScheduleTime = str;
  3171. }
  3172. else if (paramsFormData.launchTimeInterval === 'a') {
  3173. paramsFormData.adScheduleTime = paramsFormData.scheduleTimeData;
  3174. }
  3175. if (paramsFormData.adAndroidVersion === 'a') {
  3176. paramsFormData.adAndroidOsv = paramsFormData.androidChangeValue;
  3177. }
  3178. else {
  3179. paramsFormData.adAndroidOsv = 'NONE';
  3180. }
  3181. paramsFormData.adCity = paramsFormData.adSelectCity.join(',');
  3182. paramsFormData.adAge = paramsFormData.adSelectAge.join(',');
  3183. paramsFormData.adAc = paramsFormData.adSelectAc.join(',');
  3184. paramsFormData.adDeviceType = paramsFormData.adDeviceSelectType.join(',');
  3185. paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
  3186. paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
  3187. paramsFormData.creativeProductImageCode = this.md5Result;
  3188. paramsFormData.imageUrl = this.urlResult;
  3189. paramsFormData.adKeywords = this.creativeTag;
  3190. paramsFormData.userId = this.userInfo().id;
  3191. this.$refs.ruleForm.validate(valid => {
  3192. if (valid) {
  3193. this.sureLoading = true;
  3194. if (this.modalTitle === 'copy') {
  3195. this.handleAddList(paramsFormData);
  3196. }
  3197. }
  3198. else {
  3199. console.log('error submit!!');
  3200. return false;
  3201. }
  3202. });
  3203. },
  3204. handleEditList(data) {
  3205. const queryData = data;
  3206. const routeQuery = JSON.parse(localStorage.getItem('queryList'));
  3207. queryData.id = routeQuery.id;
  3208. putAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/edit', queryData).then(result => {
  3209. if (result.code === 0) {
  3210. this.$message.success(result.message);
  3211. this.sureLoading = false;
  3212. this.$router.replace('/account-config/account-config');
  3213. this.$bus.$emit('remove', '/account-config/components/configuration-copy');
  3214. }
  3215. else {
  3216. this.sureLoading = false;
  3217. this.$message.error(result.message);
  3218. }
  3219. }).catch(error => {
  3220. console.log(error, 'eeee');
  3221. });
  3222. },
  3223. handleRelaxCancel() {
  3224. this.$router.replace('/account-config/account-config');
  3225. this.$bus.$emit('remove', '/account-config/components/configuration-copy');
  3226. },
  3227. handleEnterChang(value) {
  3228. this.creativeTag.push(...value);
  3229. this.creativeTag = [...new Set(this.creativeTag)];
  3230. for (let i = 0; i < this.creativeTag.length; i++) {
  3231. if (this.creativeTag[i].length > 10) {
  3232. this.creativeTag.splice(i, 1);
  3233. this.$message.error('创意标签最多只能十个字符,超过的已清除');
  3234. }
  3235. }
  3236. this.configForm.creativeLabel = [];
  3237. },
  3238. handleTagsClose(removedTag) {
  3239. const tags = this.creativeTag.filter(tag => tag !== removedTag);
  3240. this.creativeTag = tags;
  3241. }
  3242. }
  3243. };
  3244. </script>
  3245. <style lang="less">
  3246. @import "configuration-modal";
  3247. .display-none-selset {
  3248. display: none !important;
  3249. }
  3250. </style>