configLaunchInfo.vue 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368
  1. <template>
  2. <div class="newPlan">
  3. <a-spin :spinning="spinning">
  4. <a-form :form="form">
  5. <!-- 投放范围 -->
  6. <div class="moduler">
  7. <div class="moduler-title">选择账户</div>
  8. <div>
  9. <div class="row-item">
  10. <div class="hint-item"></div>
  11. <div class="label-item">
  12. <div class="text-item">账户</div>
  13. <div class="required-item"></div>
  14. </div>
  15. <div class="input-item">
  16. <Treeselect :appId.sync="accountId" :multiple="false" request="2" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px;width:580px " />
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <!-- 推广目的 -->
  22. <div class="moduler">
  23. <div class="moduler-title">请选择营销目标</div>
  24. <div class="row-item">
  25. <div class="hint-item">
  26. </div>
  27. <div class="label-item">
  28. <div class="text-item">营销目标</div>
  29. <div class="required-item"></div>
  30. </div>
  31. <div class="input-item">
  32. <a-form-item >
  33. <a-radio-group v-decorator="['campaignType',{initialValue:2 }]" @change="campaignTypeChange">
  34. <a-radio-button :value="2">提升应用安装</a-radio-button>
  35. <a-radio-button :value="3">获取电商下单</a-radio-button>
  36. <a-radio-button :value="4">推广品牌活动</a-radio-button>
  37. <a-radio-button :value="5">收集销售线索</a-radio-button>
  38. <a-radio-button :value="7">提高应用活跃</a-radio-button>
  39. </a-radio-group>
  40. </a-form-item>
  41. </div>
  42. </div>
  43. </div>
  44. <!-- 基础信息 -->
  45. <div class="moduler">
  46. <div class="moduler-title">请设置基本信息</div>
  47. <!-- <div class="row-item">
  48. <div class="hint-item"> </div>
  49. <div class="label-item">
  50. <div class="text-item">模板名称</div>
  51. <div class="required-item"></div>
  52. </div>
  53. <div class="input-item">
  54. <a-form-item>
  55. <a-input v-model="strategyName" allow-clear />
  56. </a-form-item>
  57. </div>
  58. </div> -->
  59. <div class="row-item">
  60. <div class="hint-item"> </div>
  61. <div class="label-item">
  62. <div class="text-item">计划命名规范</div>
  63. <div class="required-item"></div>
  64. </div>
  65. <div class="input-item">
  66. <a-form-item>
  67. <a-input v-decorator="['campaignName',{ rules: [{ required: true, message: '请填写计划的命名规则' }] }]" allow-clear />
  68. </a-form-item>
  69. </div>
  70. </div>
  71. <div class="row-item">
  72. <div class="hint-item"> </div>
  73. <div class="label-item">
  74. <div class="text-item">组命名规范</div>
  75. <div class="required-item"></div>
  76. </div>
  77. <div class="input-item">
  78. <a-form-item>
  79. <a-input v-decorator="['groupName',{ rules: [{ required: true, message: '请填写组的命名规则' }] }]" allow-clear />
  80. </a-form-item>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="moduler">
  85. <div class="moduler-title">目标应用</div>
  86. <div class="ad-range">
  87. <div class="row-item" >
  88. <div class="hint-item"></div>
  89. <div class="label-item">
  90. <div class="text-item">系统类型</div>
  91. <div class="required-item"></div>
  92. </div>
  93. <div class="input-item">
  94. <a-form-item >
  95. <a-radio-group v-model="sysType" @change="sysTypeChange">
  96. <a-radio-button :value="1">安卓</a-radio-button>
  97. <a-radio-button :value="2">IOS</a-radio-button>
  98. </a-radio-group>
  99. </a-form-item>
  100. </div>
  101. </div>
  102. <div class="row-item" v-if="getFormData('campaignType')==2||getFormData('campaignType')==7">
  103. <div class="hint-item"></div>
  104. <div class="label-item">
  105. <div class="text-item">选择应用</div>
  106. <div class="required-item"></div>
  107. </div>
  108. <div class="input-item">
  109. <a-form-item>
  110. <a-select v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
  111. placeholder="选择应用目标" optionFilterProp="children" style="width: 500px"
  112. :filterOption="filterOption" @change="appIdChange">
  113. <!-- <a-select-option value="0">请选择目标应用</a-select-option> -->
  114. <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
  115. {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
  116. appModel.platform | platform
  117. }}
  118. </a-select-option>
  119. </a-select>
  120. </a-form-item>
  121. </div>
  122. </div>
  123. <div class="row-item" v-if="getFormData('campaignType') == 3">
  124. <div class="hint-item"></div>
  125. <div class="label-item">
  126. <div class="text-item">转化类型</div>
  127. <div class="required-item"></div>
  128. </div>
  129. <div class="input-item">
  130. <a-form-item >
  131. <a-radio-group buttonStyle="solid"
  132. v-decorator="['urlType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '1' }]">
  133. <a-radio-button value="1">淘宝商品</a-radio-button>
  134. <a-radio-button value="2">淘客商品</a-radio-button>
  135. </a-radio-group>
  136. </a-form-item>
  137. </div>
  138. </div>
  139. <div class="row-item" v-if="getFormData('campaignType') == 3||getFormData('campaignType') == 4||getFormData('campaignType') == 5">
  140. <div class="hint-item"></div>
  141. <div class="label-item">
  142. <div class="text-item">链接</div>
  143. <!-- <div class="required-item"></div> -->
  144. </div>
  145. <div class="input-item">
  146. <a-form-item v-if="getFormData('campaignType') != 2" :class="{ 'else-label': getFormData('campaignType') == 3 }">
  147. <a-input placeholder="请填写链接" v-decorator="['url', { rules: [{ required: true,message:'链接不能为空'}] }]" />
  148. </a-form-item>
  149. </div>
  150. </div>
  151. <div class="row-item" v-if="getFormData('campaignType') == 2||getFormData('campaignType') == 4||getFormData('campaignType') == 5">
  152. <div class="hint-item"></div>
  153. <div class="label-item">
  154. <div class="text-item">转化追踪</div>
  155. <div class="required-item"></div>
  156. </div>
  157. <div class="input-item">
  158. <a-form-item >
  159. <span v-if="convertId&&!convert" style="display:block;font-size:16px">已选择转化目标: {{convertId.label}}</span>
  160. <a-button type="primary" @click="showConvert">{{convertId?'更换转化目标':'选择转化目标'}}</a-button>
  161. </a-form-item>
  162. <div style="margin-top:10px">
  163. <a-form-item v-if="sysType==1" >
  164. <a-checkbox v-decorator="[
  165. 'useAppMarket',
  166. {
  167. valuePropName: 'checked',
  168. initialValue: false,
  169. },
  170. ]">
  171. 优先从系统应用商店下载
  172. </a-checkbox>
  173. </a-form-item>
  174. <a-form-item v-if="sysType==1&&getData('useAppMarket')">
  175. 请勾选投放应用已上架的应用商店(默认全选)
  176. <a-checkbox-group v-model="appStore">
  177. <a-checkbox value="huawei">华为</a-checkbox>
  178. <a-checkbox value="oppo">OPPO</a-checkbox>
  179. <a-checkbox value="vivo">VIVO</a-checkbox>
  180. <a-checkbox value="xiaomi">小米</a-checkbox>
  181. <a-checkbox value="meizu">魅族</a-checkbox>
  182. <a-checkbox value="smartisan">锤子</a-checkbox>
  183. </a-checkbox-group>
  184. </a-form-item>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="moduler">
  191. <div class="moduler-title">用户定向
  192. <div style="margin-left:30px;position:relative;top:-2px">
  193. <a-radio-group v-model="useDirectional" @change="useDirectionalChange">
  194. <a-radio :value="1">
  195. 不使用定向
  196. </a-radio>
  197. <!-- <a-radio :value="0">
  198. 使用定向包
  199. </a-radio> -->
  200. </a-radio-group>
  201. </div>
  202. </div>
  203. <div class="ad-range" v-if="useDirectional==1">
  204. <div class="row-item">
  205. <div class="hint-item"></div>
  206. <div class="label-item">
  207. <div class="text-item">地域</div>
  208. <div class="required-item"></div>
  209. </div>
  210. <div class="input-item">
  211. <a-form-item>
  212. <a-radio-group v-model="district" @change="cityChange">
  213. <a-radio-button value="NONE">不限</a-radio-button>
  214. <a-radio-button value="CITY">按省市</a-radio-button>
  215. <a-radio-button value="COUNTY">按区县</a-radio-button>
  216. </a-radio-group>
  217. </a-form-item>
  218. <div class="region" style="margin-top:20px" v-show="district!='NONE'">
  219. <!-- 省市 -->
  220. <div class="provincyCity" v-if="district=='CITY'">
  221. <linkMultiSelect title='省份' :listArr='regionList' :maxLayers='2' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCityArr'/>
  222. </div>
  223. <!-- 区县 -->
  224. <div class="district" v-else-if="district=='COUNTY'">
  225. <linkMultiSelect title='省份' :listArr='regionList' :maxLayers='3' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCountyArr'/>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. <div class="row-item">
  231. <div class="hint-item"></div>
  232. <div class="label-item">
  233. <div class="text-item">性别</div>
  234. <div class="required-item"></div>
  235. </div>
  236. <div class="input-item">
  237. <a-form-item>
  238. <a-radio-group v-decorator="['gender', {initialValue:0 }]" >
  239. <a-radio-button :value="0">不限</a-radio-button>
  240. <a-radio-button :value="2">男</a-radio-button>
  241. <a-radio-button :value="1">女</a-radio-button>
  242. </a-radio-group>
  243. </a-form-item>
  244. </div>
  245. </div>
  246. <div class="row-item">
  247. <div class="hint-item"></div>
  248. <div class="label-item">
  249. <div class="text-item">年龄</div>
  250. <div class="required-item"></div>
  251. </div>
  252. <div class="input-item">
  253. <a-form-item>
  254. <radioCheck :checkArr='ageArr' @getSonValue='getAgeSelect' />
  255. </a-form-item>
  256. </div>
  257. </div>
  258. <div class="row-item">
  259. <div class="hint-item"></div>
  260. <div class="label-item">
  261. <div class="text-item">操作系统</div>
  262. <div class="required-item"></div>
  263. </div>
  264. <div class="input-item">
  265. <a-form-item>
  266. <a-radio-group v-decorator="['platformOs', {initialValue:1 }]" >
  267. <a-radio-button :value="0">不限</a-radio-button>
  268. <a-radio-button :value="1">Android</a-radio-button>
  269. <a-radio-button :value="2">IOS</a-radio-button>
  270. </a-radio-group>
  271. </a-form-item>
  272. </div>
  273. </div>
  274. <div class="row-item">
  275. <div class="hint-item"></div>
  276. <div class="label-item">
  277. <div class="text-item">自定义人群</div>
  278. <div class="required-item"></div>
  279. </div>
  280. <div class="input-item">
  281. <a-form-item>
  282. <a-radio-group v-decorator="['customCrowd', {initialValue:'0' }]" @change="customCrowdChange">
  283. <a-radio-button value="0">不限</a-radio-button>
  284. <a-radio-button value="1">定向</a-radio-button>
  285. <a-radio-button value="2">排除</a-radio-button>
  286. <a-radio-button value="3">同时定向排除</a-radio-button>
  287. </a-radio-group>
  288. </a-form-item>
  289. <div class="dingxiang_paichu" v-if="getFormData('customCrowd')&&getFormData('customCrowd')!='0'" style="width:60%">
  290. <a-tabs v-model="tabKey" @change="retargetTabChange" >
  291. <a-tab-pane key="1" tab="定向池" v-if="getFormData('customCrowd')!='2'">
  292. <a-table
  293. :columns="retargetColumns"
  294. :row-key="record => record.key"
  295. :data-source="retargetDataAll"
  296. :loading="loading"
  297. style="width:100%;margin:15px 0"
  298. :pagination='false'
  299. @change="retargetTableChange"
  300. :scroll="{ y: 250 }"
  301. :row-selection="rowSelection"
  302. bordered
  303. >
  304. <template slot="name" slot-scope="name"> {{ name }} </template>
  305. <template slot="populationType" slot-scope="populationType"> {{ populationType | customCrowdHandler}} </template>
  306. </a-table>
  307. </a-tab-pane>
  308. <a-tab-pane key="2" tab="排除池" v-if="getFormData('customCrowd')!='1'">
  309. <a-table
  310. :columns="retargetColumns"
  311. :row-key="record => record.key"
  312. :data-source="retargetDataAll"
  313. :loading="loading"
  314. style="width:100%;margin:15px 0"
  315. :pagination='false'
  316. @change="retargetTableChange"
  317. :scroll="{ y: 250 }"
  318. :row-selection="rowSelection2"
  319. bordered
  320. >
  321. <template slot="name" slot-scope="name"> {{ name }} </template>
  322. <template slot="populationType" slot-scope="populationType"> {{ populationType |customCrowdHandler}} </template>
  323. </a-table>
  324. </a-tab-pane>
  325. </a-tabs>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <div class="ad-range2" v-if="useDirectional==0">
  331. <div style="position:relative" class="ad-range2-title">
  332. <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
  333. <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
  334. <span>点击全选</span>
  335. </a-checkbox>
  336. </div>
  337. <a-spin :spinning="directionalSpinning">
  338. <div class="title-list">
  339. <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
  340. <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
  341. <label>
  342. <a-checkbox :value='item.id'>
  343. {{item.templateName+'_('+item.id+')'}}
  344. </a-checkbox>
  345. </label>
  346. </div>
  347. </a-checkbox-group>
  348. </div>
  349. </a-spin>
  350. </div>
  351. </div>
  352. <!-- <div class="moduler">
  353. <div class="moduler-title">预算和排期</div>
  354. <div class="ad-range">
  355. <div class="row-item" >
  356. <div class="hint-item"></div>
  357. <div class="label-item">
  358. <div class="text-item">投放时间</div>
  359. <div class="required-item"></div>
  360. </div>
  361. <div class="input-item">
  362. <a-form-item>
  363. <a-radio-group v-decorator="['scheduleType', { initialValue:'SCHEDULE_FROM_NOW' }]" @change="scheduleTypeChange">
  364. <a-radio-button value="SCHEDULE_FROM_NOW">从今天起长期投放</a-radio-button>
  365. <a-radio-button value="SCHEDULE_START_END">设置开始和结束时间</a-radio-button>
  366. </a-radio-group>
  367. <p style="margin-top:15px">
  368. <a-range-picker
  369. @change="dateChange"
  370. v-model="dateRange"
  371. :disabled-date="disabledDate"
  372. v-if="getFormData('scheduleType')=='SCHEDULE_START_END'"
  373. />
  374. </p>
  375. </a-form-item>
  376. </div>
  377. </div>
  378. <div class="row-item">
  379. <div class="hint-item"></div>
  380. <div class="label-item">
  381. <div class="text-item">投放时段</div>
  382. <div class="required-item"></div>
  383. </div>
  384. <div class="input-item">
  385. <a-form-item>
  386. <a-radio-group v-decorator="['scheduleTimes', { initialValue:'' }]" >
  387. <a-radio-button value=''>不限</a-radio-button>
  388. <a-radio-button value="SpecifiedTImePeriod">指定时间段</a-radio-button>
  389. </a-radio-group>
  390. <div
  391. v-show="getFormData('scheduleTimes')=='SpecifiedTImePeriod'"
  392. style="margin-top:15px"
  393. >
  394. <scheduleTime
  395. style="width:100%"
  396. :scheduleTime.sync="scheduleTimeData"
  397. ref="selectCheck"
  398. />
  399. </div>
  400. </a-form-item>
  401. </div>
  402. </div>
  403. <div class="row-item">
  404. <div class="hint-item">
  405. </div>
  406. <div class="label-item">
  407. <div class="text-item">策略预算</div>
  408. <div class="required-item"></div>
  409. </div>
  410. <div class="input-item">
  411. <a-form-item>
  412. <a-radio-group v-decorator="['strategyBudget', { initialValue:'' }]" >
  413. <a-radio-button value=''>不限</a-radio-button>
  414. <a-radio-button value="unifiedBudget">统一预算</a-radio-button>
  415. </a-radio-group>
  416. <a-input-group compact v-if="getFormData('strategyBudget')=='unifiedBudget'" style="margin-top:20px">
  417. <a-select :disabled="true" v-decorator="['budgetMode', { initialValue:'TOTAL' }]">
  418. <a-select-option value="TOTAL" >总预算</a-select-option>
  419. <a-select-option
  420. value="TOTAL"
  421. v-if="getFormData('smartBidType')=='SMART_BID_CUSTOM'"
  422. >总预算</a-select-option>
  423. </a-select>
  424. <a-input style="width: 25%" v-decorator="['budget', { initialValue:300 }]" />
  425. </a-input-group>
  426. <span class="tip" v-if="getFormData('budget')<300">请输入预算,不少于300元,不超过9999999.99元</span>
  427. </a-form-item>
  428. </div>
  429. </div>
  430. </div>
  431. </div> -->
  432. <div class="moduler">
  433. <div class="moduler-title">优化目标和付费</div>
  434. <div class="ad-range">
  435. <div class="row-item" >
  436. <div class="hint-item"></div>
  437. <div class="label-item">
  438. <div class="text-item">优化目标</div>
  439. <!-- <div class="required-item"></div> -->
  440. </div>
  441. <div class="input-item">
  442. <a-form-item>
  443. <a-radio-group v-decorator="['bidType', { initialValue:10 }]" @change="bidTypeChange">
  444. <!-- <a-radio-button :value="2">封面点击数</a-radio-button> -->
  445. <a-radio-button :value="10">转化数</a-radio-button>
  446. </a-radio-group>
  447. </a-form-item>
  448. </div>
  449. </div>
  450. <div class="row-item" v-if="getFormData('bidType')==10">
  451. <div class="hint-item"></div>
  452. <div class="label-item">
  453. <div class="text-item">转化目标</div>
  454. <!-- <div class="required-item"></div> -->
  455. </div>
  456. <div class="input-item">
  457. <a-form-item>
  458. <a-select size="default" v-decorator="['ocpxActionType']" style="width: 200px" @change="handleChange">
  459. <a-select-option :value="2">行为数</a-select-option>
  460. <a-select-option :value="180"
  461. v-if="getFormData('campaignType') == 2 && groupTypeData.isActivate == 1">激活</a-select-option>
  462. <a-select-option :value="53" v-if="
  463. (getFormData('campaignType') == 4 || getFormData('campaignType') == 5) && groupTypeData.isFormSubmit == '1'
  464. ">表单提交</a-select-option>
  465. <a-select-option :value="394" v-if="
  466. groupTypeData.isOrderSubmit == '1'
  467. ">订单提交</a-select-option>
  468. <a-select-option :value="348" v-if="
  469. groupTypeData.isValidClue == '1'
  470. ">使用有效线索</a-select-option>
  471. <a-select-option :value="383" v-if="
  472. groupTypeData.isCreditGrant == '1'
  473. ">授信出价</a-select-option>
  474. <a-select-option :value="384" v-if="
  475. groupTypeData.isWanJian == '1'
  476. ">完件出价</a-select-option>
  477. <a-select-option :value="190" v-if="
  478. groupTypeData.isPurchase == '1'
  479. ">付费出价</a-select-option>
  480. <a-select-option :value="191" v-if="
  481. groupTypeData.isFirstdayRoi == '1'
  482. ">首日ROI</a-select-option>
  483. <a-select-option :value="396" v-if="
  484. groupTypeData.isRegister == '1'
  485. ">注册优化目标</a-select-option>
  486. </a-select>
  487. </a-form-item>
  488. </div>
  489. </div>
  490. <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) &&groupTypeData.deepConversionTypes&&groupTypeData.deepConversionTypes.length > 0 ">
  491. <div class="hint-item"></div>
  492. <div class="label-item">
  493. <div class="text-item">深度转化目标</div>
  494. <!-- <div class="required-item"></div> -->
  495. </div>
  496. <div class="input-item">
  497. <a-form-item>
  498. <a-select v-decorator="['deepConversionType']" allowClear style="width: 200px">
  499. <a-select-option v-for="(items, index) of groupTypeData.deepConversionTypes" :key="index">
  500. {{ items.desc }}</a-select-option>
  501. </a-select>
  502. </a-form-item>
  503. </div>
  504. </div>
  505. <div class="row-item" >
  506. <div class="hint-item"></div>
  507. <div class="label-item">
  508. <div class="text-item">计费方式</div>
  509. <!-- <div class="required-item"></div> -->
  510. </div>
  511. <div class="input-item">
  512. <a-form-item>
  513. <a-radio-group v-model="chargeMethods">
  514. <a-radio-button v-if="getFormData('bidType')==2" value="CPC">点击计费(CPC)</a-radio-button>
  515. <a-radio-button v-if="getFormData('bidType')==10" value="OCPM">按展示付费(oCPM)</a-radio-button>
  516. </a-radio-group>
  517. </a-form-item>
  518. </div>
  519. </div>
  520. <div class="row-item" v-if="getFormData('bidType')==2">
  521. <div class="hint-item">
  522. </div>
  523. <div class="label-item">
  524. <div class="text-item">点击出价</div>
  525. <div class="required-item"></div>
  526. </div>
  527. <div class="input-item">
  528. <a-form-item>
  529. <a-input-number
  530. style="width:200px"
  531. :max="10000"
  532. :step="0.1"
  533. v-decorator="['bid', {rules:validationRules.bid} ]"
  534. />
  535. <span style="margin-left:5px">元</span>
  536. <!-- <span style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
  537. </a-form-item>
  538. <span
  539. class="tip"
  540. v-if="getFormData('bid')<0.1"
  541. >请输入点击出价,不少于0.1元,不超过10000元</span>
  542. </div>
  543. </div>
  544. <div class="row-item" v-if="getFormData('bidType')==10">
  545. <div class="hint-item">
  546. </div>
  547. <div class="label-item">
  548. <div class="text-item">转化目标出价</div>
  549. <div class="required-item"></div>
  550. </div>
  551. <div class="input-item">
  552. <a-form-item>
  553. <a-input-number
  554. style="width:200px"
  555. :max="10000"
  556. :step="0.1"
  557. v-decorator="['cpaBid', {rules:validationRules.bid} ]"
  558. />
  559. <span style="margin-left:5px">元</span>
  560. </a-form-item>
  561. <span
  562. class="tip"
  563. v-if="getFormData('cpaBid')<0.1"
  564. >请输入点击出价,不少于0.1元,不超过10000元</span>
  565. </div>
  566. </div>
  567. <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) &&groupTypeData.deepConversionTypes&&groupTypeData.deepConversionTypes.length > 0 ">
  568. <div class="hint-item">
  569. </div>
  570. <div class="label-item">
  571. <div class="text-item">深度转化目标出价</div>
  572. <!-- <div class="required-item"></div> -->
  573. </div>
  574. <div class="input-item">
  575. <a-form-item>
  576. <a-input-number
  577. style="width:200px"
  578. :max="10000"
  579. :step="0.1"
  580. v-decorator="['deepConversionBid' ]"
  581. />
  582. <span style="margin-left:5px">元</span>
  583. <!-- <span style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
  584. </a-form-item>
  585. <!-- <span
  586. class="tip"
  587. v-if="getFormData('deepConversionBid')<0.1"
  588. >请输入点击出价,不少于0.1元,不超过10000元</span> -->
  589. </div>
  590. </div>
  591. </div>
  592. </div>
  593. <div class="moduler">
  594. <div class="moduler-title">创意信息</div>
  595. <div class="ad-range">
  596. <div class="row-item">
  597. <div class="hint-item"></div>
  598. <div class="label-item">
  599. <div class="text-item">广告位置</div>
  600. <div class="required-item"></div>
  601. </div>
  602. <div class="input-item">
  603. <a-form-item>
  604. <a-radio-group v-model="adposition" @change="adpositionChange">
  605. <a-radio-button :value='1'>优选广告位</a-radio-button>
  606. <a-radio-button value="inventoryTypes">按媒体指定位置</a-radio-button>
  607. </a-radio-group>
  608. </a-form-item>
  609. <div style="width: 400px; margin-top: 24px;" class="inventoryTypes" v-show="adposition=='inventoryTypes'">
  610. <div class="inventory-tags-lists-header">
  611. <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
  612. </a-checkbox>
  613. <div class="inventory-tags-lists-name"><strong>APP名称</strong></div>
  614. </div>
  615. <div class="inventory-tags-lists-container">
  616. <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
  617. </div>
  618. </div>
  619. </div>
  620. </div>
  621. <div class="row-item" >
  622. <div class="hint-item"></div>
  623. <div class="label-item">
  624. <div class="text-item">下载详情</div>
  625. <!-- <div class="required-item"></div> -->
  626. </div>
  627. <div class="input-item" >
  628. <a-form-item>
  629. <a-select
  630. v-decorator="['siteId']"
  631. showSearch
  632. allowClear
  633. placeholder="选择应用下载详情页"
  634. optionFilterProp="children"
  635. :filterOption="filterOption"
  636. style="width:400px"
  637. >
  638. <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
  639. {{ appModel.name }}
  640. </a-select-option>
  641. </a-select>
  642. </a-form-item>
  643. </div>
  644. </div>
  645. <div class="row-item">
  646. <div class="hint-item"></div>
  647. <div class="label-item">
  648. <div class="text-item">点击监测链接</div>
  649. <!-- <div class="required-item"></div> -->
  650. <!-- http://ptd.yoyuan.com.cn/apk/download/1119929/YouYuan_1119929.apk -->
  651. </div>
  652. <div class="input-item">
  653. <a-form-item>
  654. <a-input v-decorator="['clickTrackUrl']" />
  655. </a-form-item>
  656. </div>
  657. </div>
  658. <div class="row-item">
  659. <div class="hint-item"></div>
  660. <div class="label-item">
  661. <div class="text-item">开始播放监测链接</div>
  662. <!-- <div class="required-item"></div> -->
  663. </div>
  664. <div class="input-item">
  665. <a-form-item>
  666. <a-input v-decorator="['impressionUrl']" />
  667. </a-form-item>
  668. </div>
  669. </div>
  670. <div class="row-item">
  671. <div class="hint-item"></div>
  672. <div class="label-item">
  673. <div class="text-item">点击按钮监测链接</div>
  674. <!-- <div class="required-item"></div> -->
  675. </div>
  676. <div class="input-item">
  677. <a-form-item>
  678. <a-input v-decorator="['actionbarClickUrl']" />
  679. </a-form-item>
  680. </div>
  681. </div>
  682. <div class="row-item" v-if="whiteList.actionbar_click_url_switch">
  683. <div class="hint-item"></div>
  684. <div class="label-item">
  685. <div class="text-item">第三方ActionBar点击监控链接</div>
  686. <!-- <div class="required-item"></div> -->
  687. </div>
  688. <div class="input-item">
  689. <a-form-item >
  690. <a-input
  691. v-decorator="[
  692. 'actionbarClickUrl',
  693. {
  694. rules: [{ message: '请输入第三方点击监控链接' }],
  695. },
  696. ]"
  697. placeholder="请输入第三方点击监控链接"
  698. >
  699. </a-input>
  700. <span style="color: red; position: relative; top: -10px">仅加白使用</span>
  701. </a-form-item>
  702. </div>
  703. </div>
  704. <div class="row-item">
  705. <div class="hint-item"></div>
  706. <div class="label-item">
  707. <div class="text-item">创意分类</div>
  708. <div class="required-item" v-show="whiteList.creative_category_switch"></div>
  709. </div>
  710. <div class="input-item">
  711. <a-form-item >
  712. <a-cascader
  713. :options="createOptions"
  714. v-decorator="['creativeCategory',{ rules: [{ required: whiteList.creative_category_switch, message: '创意分类必填' }] }]"
  715. :fieldNames="fieldNames"
  716. placeholder="请选择创意分类"
  717. />
  718. </a-form-item>
  719. </div>
  720. </div>
  721. <div class="row-item">
  722. <div class="hint-item"></div>
  723. <div class="label-item">
  724. <div class="text-item">创意标签</div>
  725. <div class="required-item" v-show="whiteList.creative_category_switch"></div>
  726. </div>
  727. <div class="input-item">
  728. <a-form-item>
  729. <a-select
  730. mode="tags"
  731. style="width: 100%"
  732. placeholder="按回车生成标签"
  733. v-decorator="['creativeTag', { validator: creativeTagValid }]"
  734. dropdownClassName="display-none-selset"
  735. :token-separators="[',', ' ', ',']"
  736. >
  737. </a-select>
  738. <span v-if="getData('creativeTag')&&getData('creativeTag').length > 10" style="color:red">创意标签最多填写10个,请删减</span>
  739. </a-form-item>
  740. </div>
  741. </div>
  742. <div class="row-item">
  743. <div class="hint-item"></div>
  744. <div class="label-item">
  745. <div class="text-item">行动号召</div>
  746. <div class="required-item"></div>
  747. </div>
  748. <div class="input-item">
  749. <a-form-item >
  750. <a-select
  751. v-decorator="['actionBarText', { rules: [{ required: true, message: '请选择行动号召按钮文案' }] }]"
  752. showSearch
  753. allowClear
  754. placeholder="选择行动号召按钮文案"
  755. optionFilterProp="children"
  756. :filterOption="filterOption"
  757. >
  758. <a-select-option v-for="appModel in actionBarTextList" :key="appModel.id" :value="appModel.actionBarText">
  759. {{ appModel.actionBarText }}
  760. </a-select-option>
  761. </a-select>
  762. </a-form-item>
  763. </div>
  764. </div>
  765. <div class="row-item">
  766. <div class="hint-item"></div>
  767. <div class="label-item">
  768. <div class="text-item">关联封面数</div>
  769. <div class="required-item"></div>
  770. </div>
  771. <div class="input-item">
  772. <a-form-item >
  773. <a-input-number
  774. style="width:200px"
  775. :max="15"
  776. :step="1"
  777. :min='1'
  778. v-decorator="['imageCnt',{ initialValue:1, rules: [{ required: true, message: '请填写关联封面数' }] } ]"
  779. />
  780. </a-form-item>
  781. </div>
  782. </div>
  783. <div class="row-item">
  784. <div class="hint-item"> </div>
  785. <div class="label-item">
  786. <div class="text-item">广告语</div>
  787. <div class="required-item"></div>
  788. </div>
  789. <div class="input-item">
  790. <a-form-item>
  791. <div style="position:relative">
  792. <a-textarea
  793. class="rending"
  794. placeholder="请输入广告语"
  795. @change="descriptionchange"
  796. v-decorator="['description',{rules: [ { required: true, message: '请填写广告语' }] } ]"
  797. :autosize="{ minRows: 2, maxRows: 6 }"
  798. :max-length="30"
  799. ></a-textarea>
  800. <p
  801. style="
  802. font-size: 12px;
  803. color: #b6bbc7;
  804. letter-spacing: 0.3px;
  805. text-align: right;
  806. line-height: 30px;
  807. position: absolute;
  808. bottom: 0;
  809. right: 6px;
  810. width: 100%;
  811. margin-bottom: 0;
  812. "
  813. >
  814. {{ description.length }}/30
  815. <!-- {{ getFormData('description').length }}/30 -->
  816. </p>
  817. </div>
  818. </a-form-item>
  819. </div>
  820. </div>
  821. </div>
  822. </div>
  823. <!-- <div class="moduler">
  824. <div class="opt">
  825. <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
  826. <a-button type="primary" @click="goNext" :loading="goNextloading">下一步</a-button>
  827. </div>
  828. </div> -->
  829. <div class="moduler">
  830. <!-- <div class="moduler-title">计划名称</div> -->
  831. <div class="opt">
  832. <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
  833. <!-- -->
  834. <a-button type="primary" @click="goNext" :loading="goNextloading">确定</a-button>
  835. </div>
  836. </div>
  837. </a-form>
  838. <div class="infoModal">
  839. <a-modal v-model="visible" title="提示" @ok="handleOk" :keyboard='false' :maskClosable='false'>
  840. <ul>
  841. <li v-for="(item,index) in errorInfo" :key="index">
  842. <span>账户{{LHKaccountInfo[index].title}}:</span>{{item.message || '定向设置成功'}}
  843. </li>
  844. </ul>
  845. <template slot="footer">
  846. <a-button key="back" @click="handleCancel">
  847. 返回本页
  848. </a-button>
  849. <a-button key="submit" type="primary" @click="handleOk">
  850. 下一步
  851. </a-button>
  852. </template>
  853. </a-modal>
  854. </div>
  855. <a-modal v-model="convert" title="选择转化目标">
  856. <template slot="footer">
  857. <a-button key="back" @click="convert=false">取消</a-button>
  858. <a-button key="submit" type="primary" @click="convert=false">
  859. 确定
  860. </a-button>
  861. </template>
  862. <a-form-item label="追踪方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  863. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
  864. <a-radio-group buttonStyle="solid" v-model="convertType" @change="convertChange">
  865. <a-radio-button value="1" v-show="getFormData('campaignType') == 4||getFormData('campaignType') == 5">JS布玛</a-radio-button>
  866. <a-radio-button value="2" v-show="getFormData('campaignType') == 4||getFormData('campaignType') == 5">Xpath</a-radio-button>
  867. <a-radio-button value="3"
  868. v-show="getFormData('campaignType') == 2">应用-SDK
  869. </a-radio-button>
  870. <a-radio-button value="7" v-show="getFormData('campaignType') == 2">应用-API</a-radio-button>
  871. </a-radio-group>
  872. </a-form-item>
  873. <a-form-item label="选择转化" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  874. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
  875. <a-select allowClear labelInValue style="width:100%" v-model="convertId" @focus="getConvertList">
  876. <a-select-option :value="item.convert_id" v-for="item in convertList" :key="item.convert_id">
  877. {{item.convert_name}}</a-select-option>
  878. </a-select>
  879. </a-form-item>
  880. </a-modal>
  881. <a-modal v-model="useDirectionalVisible" title="选择定向包" @ok="selectDirectionalOk" width='600px' height='500px'>
  882. <div style="position:relative">
  883. <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
  884. <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
  885. <span>点击全选</span>
  886. </a-checkbox>
  887. </div>
  888. <a-spin :spinning="directionalSpinning">
  889. <div class="title-list">
  890. <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
  891. <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
  892. <label>
  893. <a-checkbox :value='item.id'>
  894. {{item.templateName+'_('+item.id+')'}}
  895. </a-checkbox>
  896. </label>
  897. </div>
  898. </a-checkbox-group>
  899. </div>
  900. </a-spin>
  901. </a-modal>
  902. </a-spin>
  903. </div>
  904. </template>
  905. <script>
  906. import moment from 'moment'
  907. import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
  908. import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
  909. import { TreeSelect } from 'ant-design-vue';
  910. import qs from 'qs'
  911. const SHOW_PARENT = TreeSelect.SHOW_PARENT;
  912. // import selectCheckAll from './toutiaoTime'
  913. import radioCheck from './components/radioCheck';
  914. import linkMultiSelect from './components/linkMultiSelect'
  915. import singleLayersSelecte from './components/singleLayerSelecte'
  916. import scheduleTime from '@/components/formComponents/toutiaoTime'
  917. import $ from "jquery"
  918. // import { filter } from 'vue/types/umd';
  919. var str = ""
  920. for (let i = 0; i < 7*24; i++) {
  921. str+='0'
  922. }
  923. let ageArr=[
  924. {
  925. value:'',
  926. title:'不限',
  927. checked:false,
  928. },
  929. {
  930. value:18,
  931. title:' 18-23岁',
  932. checked:false,
  933. },
  934. {
  935. value:24,
  936. title:'24-30岁',
  937. checked:false,
  938. },
  939. {
  940. value:31,
  941. title:'31-40岁',
  942. checked:false,
  943. },
  944. {
  945. value:41,
  946. title:'41-49岁',
  947. checked:false,
  948. },
  949. {
  950. value:50,
  951. title:'50岁+',
  952. checked:false,
  953. },
  954. ]
  955. let autoExtendOptions=[
  956. {
  957. label:'地域',
  958. value:'REGION',
  959. },
  960. {
  961. label:'性别',
  962. value:'GENDER',
  963. },
  964. {
  965. label:'年龄',
  966. value:'AGE',
  967. },
  968. {
  969. label:'行为兴趣',
  970. value:'INTEREST_ACTION',
  971. },
  972. {
  973. label:'自定义人群',
  974. value:'CUSTOM_AUDIENCE',
  975. },
  976. ]
  977. let retargetColumns=[
  978. {
  979. title: '人群包',
  980. dataIndex: 'name',
  981. sorter: true,
  982. width: '40%',
  983. scopedSlots: { customRender: 'name' },
  984. },
  985. {
  986. title: '属性',
  987. dataIndex: 'populationType',
  988. scopedSlots: {
  989. customRender: 'populationType'
  990. },
  991. width: 200
  992. },
  993. {
  994. title: '所属账号',
  995. dataIndex: 'accountName',
  996. sorter: true,
  997. width: '40%',
  998. scopedSlots: { customRender: 'accountName' },
  999. },
  1000. ]
  1001. const plainOptions = [
  1002. {
  1003. value: 6,
  1004. label: '上下滑大屏广告'
  1005. },
  1006. {
  1007. value: 7,
  1008. label: '信息流广告'
  1009. },
  1010. {
  1011. value: 3,
  1012. label: '视频播放页广告'
  1013. },
  1014. ];
  1015. export default {
  1016. components: {
  1017. // selectCheckAll,
  1018. // newDirectedPackage,
  1019. Treeselect,
  1020. radioCheck,
  1021. linkMultiSelect,
  1022. singleLayersSelecte,
  1023. scheduleTime
  1024. },
  1025. data() {
  1026. return {
  1027. regionList:[],
  1028. editRecordId:'',
  1029. spinning:false,
  1030. description:'',
  1031. whiteList:{},
  1032. actionBarTextList:[],
  1033. treeData:[],
  1034. accountId:undefined,
  1035. strategyName: '',
  1036. form: this.$form.createForm(this),
  1037. goNextloading:false,
  1038. goPlanShowloading:false,
  1039. dateRange: [moment(), moment()],
  1040. visible:false,
  1041. errorInfo:[],
  1042. fieldNames: {
  1043. label: 'category_name',
  1044. value: 'category_id',
  1045. children: 'child',
  1046. },
  1047. createOptions: [],
  1048. appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
  1049. sysType:1,
  1050. indeterminateDirectional:false,
  1051. checkAllDirectional:false,
  1052. directionalList:[],
  1053. directionalSpinning:false,
  1054. directionalCheckedList:[],
  1055. useDirectional:1,
  1056. siteList:[],
  1057. tabKey:'1',
  1058. adposition:1,
  1059. groupTypeData:{},
  1060. convert: false,
  1061. convertId: "",
  1062. convertList: [],
  1063. convertType: '1',
  1064. strategyInfo:{},
  1065. accountInfo:{},
  1066. appList: [],
  1067. appListAll:[],
  1068. dateRange: [moment(), moment()],
  1069. scheduleTime: '',
  1070. scheduleTimeData:str,
  1071. projectInfo:[],
  1072. chargeMethods:'CPC',
  1073. unionVideoType:'REWARDED_VIDEO',
  1074. district:'NONE',
  1075. sceneInventory:'',
  1076. checkedList: [],
  1077. indeterminate: false,
  1078. checkAll: false,
  1079. plainOptions,
  1080. // 定向的参数
  1081. regionValue:'NONE',
  1082. ageArr,//受众年龄
  1083. region:[],
  1084. agesRange:[],
  1085. regionCityListUrl:'/kuaishou/batch/getRegion',
  1086. regionCountyListUrl:'/kuaishou/batch/getRegion',
  1087. // 自定义人群
  1088. // 自定义人群参数
  1089. retargetColumns,
  1090. retargetData:[],
  1091. retargetDataAll:[],
  1092. loading:false,
  1093. customCrowd:'NONE',//自定义人群 选择的值
  1094. selectedRowKeys:[],
  1095. incluedSelectedRowKeys:[],
  1096. incluedSelectedKeys:[],
  1097. excludeSelectedKeys:[],
  1098. excludeSelectedRowKeys:[],
  1099. autoExtendEnabled:0,//智能放量是否开启
  1100. autoExtendOptions,//智能投放可选定向数组
  1101. autoExtendTargets:[],//智能放量开启后的选择数据----------需传递的参数
  1102. autoExtendTargetsChecked:[],
  1103. radioStyle: {
  1104. display: 'block',
  1105. height: '30px',
  1106. lineHeight: '30px',
  1107. padding: '0 15px'
  1108. },
  1109. goNextloading:false,
  1110. goPlanShowloading:false,
  1111. dateRange: [moment(), moment()],
  1112. visible:false,
  1113. errorInfo:[],
  1114. validationRules: {
  1115. url: [
  1116. {
  1117. required: true,
  1118. validator: this.validateURL,
  1119. },
  1120. ],
  1121. name:[{
  1122. required: true,
  1123. validator: this.validateName,
  1124. }],
  1125. bid:[{
  1126. required: true,
  1127. message:'出价信息必须填写',
  1128. // validator: this.validateBid,
  1129. }],
  1130. roi:[{
  1131. required: true,
  1132. message:'ROI系数必须填写',
  1133. // validator: this.validateBid,
  1134. }],
  1135. },
  1136. useDirectionalVisible:false,
  1137. }
  1138. },
  1139. watch: {
  1140. accountId(newValue,oldValue){
  1141. if(newValue){
  1142. // this.treeData.forEach(item=>{
  1143. // if(item.children){
  1144. // item.children.forEach(ele=>{
  1145. // if(ele.value==newValue){
  1146. // this.$parent.accountInfo=ele
  1147. // }
  1148. // })
  1149. // }
  1150. // })
  1151. this.getAppList()
  1152. getAction('/kuaishou/batch/getIsActivate', {
  1153. accountId: this.accountId
  1154. }).then(res => {
  1155. if (res.success) {
  1156. this.groupTypeData = res.result
  1157. }
  1158. })
  1159. getAction('/kuaishou/batch/getCreativeCategory', {
  1160. accountId:this.accountId,
  1161. }).then((res) => {
  1162. if (res.success) {
  1163. console.log(res)
  1164. this.createOptions = res.result
  1165. }
  1166. })
  1167. this.getWhiteList()
  1168. this.getpopulationlist()
  1169. }else{
  1170. }
  1171. }
  1172. },
  1173. computed: {
  1174. hasSelected() {
  1175. return this.selectedRowKeys.length > 0;
  1176. },
  1177. rowSelection() {
  1178. return {
  1179. // selectedRowKeys: this.incluedSelectedRowKeys,
  1180. onChange: (selectedRowKeys, selectedRows) => {
  1181. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
  1182. this.incluedSelectedRowKeys = selectedRowKeys;
  1183. this.incluedSelectedKeys=selectedRows
  1184. },
  1185. getCheckboxProps: record => ({
  1186. props: {
  1187. disabled: this.excludeSelectedRowKeys.indexOf(record.key)>-1, // Column configuration not to be checked
  1188. name: record.name,
  1189. defaultChecked:this.incluedSelectedRowKeys.indexOf(record.key)>-1
  1190. },
  1191. }),
  1192. };
  1193. },
  1194. rowSelection2() {
  1195. return {
  1196. // selectedRowKeys: this.excludeSelectedRowKeys,
  1197. onChange: (selectedRowKeys, selectedRows) => {
  1198. // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
  1199. // this.selectedRowKeys = selectedRowKeys;
  1200. this.excludeSelectedRowKeys = selectedRowKeys;
  1201. this.excludeSelectedKeys=selectedRows
  1202. },
  1203. getCheckboxProps: record => ({
  1204. props: {
  1205. disabled: this.incluedSelectedRowKeys.indexOf(record.key)>-1, // Column configuration not to be checked
  1206. name: record.name,
  1207. defaultChecked:this.excludeSelectedRowKeys.indexOf(record.key)>-1
  1208. },
  1209. }),
  1210. };
  1211. },
  1212. },
  1213. methods: {
  1214. descriptionchange(e){
  1215. this.description=e.target.value
  1216. },
  1217. //获取表单的某一个属性值
  1218. getFormData(className) {
  1219. return this.form.getFieldValue(className)
  1220. },
  1221. dateChange(date, dateString) {
  1222. // console.log(date,dateString)
  1223. this.form.getFieldDecorator('startTime')
  1224. this.form.getFieldDecorator('endTime')
  1225. this.form.setFieldsValue({
  1226. startTime: date[0].format('YYYY-MM-DD HH:mm'),
  1227. endTime: date[1].format('YYYY-MM-DD HH:mm'),
  1228. })
  1229. },
  1230. //推广目的改变
  1231. campaignTypeChange(e){
  1232. console.log(e.target)
  1233. let strategyNamepart=this.campaignTypeHandle(e.target.value);
  1234. this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
  1235. this.getActionBarText()
  1236. },
  1237. goBack() {
  1238. this.$router.replace('/autoLaunch/configLaunchList')
  1239. this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
  1240. this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
  1241. },
  1242. //请求项目和账户内容
  1243. accountHttp(){
  1244. this.treeData=[];
  1245. this.accountIds=[];
  1246. getAction('/ctop/projectMember/getProjectAccountByUserId?mediaType=2', {}).then(res => {
  1247. if(res.success){
  1248. // console.log(res);
  1249. if(res.result){
  1250. res.result.forEach((element,index) => {
  1251. if(element){
  1252. this.treeData.push({});
  1253. this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
  1254. this.treeData[index].value='project'+element.project.projectId;
  1255. this.treeData[index].key=element.project.projectId;
  1256. this.treeData[index].mediaId=element.project.mediaId;
  1257. this.treeData[index].children=[];
  1258. if(element.account.length){
  1259. element.account.forEach((ele,i)=>{
  1260. this.treeData[index].children.push({});
  1261. this.treeData[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
  1262. this.treeData[index].children[i].value=ele.accountId;
  1263. this.treeData[index].children[i].key=ele.accountId;
  1264. })
  1265. }
  1266. }
  1267. });
  1268. // console.log(this.treeData)
  1269. }
  1270. }
  1271. })
  1272. },
  1273. campaignTypeHandle(val){
  1274. let str='';
  1275. switch (val) {
  1276. case '2':
  1277. str='应用安装'
  1278. break;
  1279. case '3':
  1280. str='电商下单'
  1281. break;
  1282. case '4':
  1283. str='推广品牌'
  1284. break;
  1285. case '5':
  1286. str='营销线索'
  1287. break;
  1288. case '7':
  1289. str='应用活跃'
  1290. break;
  1291. default:
  1292. str='转化错误'
  1293. break;
  1294. }
  1295. return str
  1296. },
  1297. creativeTagValid(rule, value, callback) {
  1298. if (value.length > 10) {
  1299. callback('创意标签最多填写10个,请删减')
  1300. } else if(value.length == 0){
  1301. if(this.whiteList.creative_category_switch==1){
  1302. callback('创意标签必须填写')
  1303. }
  1304. }else {
  1305. callback()
  1306. }
  1307. },
  1308. directionalChange(checkedList) {
  1309. // console.log(checkedList)
  1310. this.indeterminateDirectional = !!checkedList.length && checkedList.length < this.directionalList.length;
  1311. this.checkAllDirectional = checkedList.length === this.directionalList.length;
  1312. },
  1313. onCheckAllDirectionalChange(e) {
  1314. console.log(e)
  1315. let valueOption=[];
  1316. valueOption=this.directionalList.map(item=>{
  1317. return item.id
  1318. })
  1319. Object.assign(this, {
  1320. directionalCheckedList: e.target.checked ? valueOption : [],
  1321. indeterminateDirectional: false,
  1322. checkAllDirectional: e.target.checked,
  1323. });
  1324. },
  1325. selectDirectionalOk(e){
  1326. this.useDirectionalVisible=false
  1327. },
  1328. useDirectionalChange(e){
  1329. console.log(e);
  1330. if(e.target.value==0){
  1331. // this.useDirectionalVisible=true;
  1332. this.getUserDirectional()
  1333. }
  1334. },
  1335. // 获取定向包
  1336. getUserDirectional(){
  1337. getAction('/kuaishou/batch/getDirectionalTemplate',{
  1338. accountId:this.accountId
  1339. }).then(res=>{
  1340. console.log(res);
  1341. this.directionalList=res.result
  1342. })
  1343. },
  1344. appIdChange(val){
  1345. console.log(val)
  1346. this.siteList=[]
  1347. this.getPageList(val)
  1348. },
  1349. disabledDate(current) {
  1350. return current && current < moment().subtract(1, 'day')
  1351. },
  1352. bidTypeChange(e){
  1353. console.log(e);
  1354. this.chargeMethods=e.target.value==10?"OCPM":'CPC'
  1355. },
  1356. getData(className) {
  1357. return this.form.getFieldValue(className)
  1358. },
  1359. handleChange(val){
  1360. console.log(val)
  1361. },
  1362. // 投放日期改变
  1363. scheduleTypeChange(val){
  1364. console.log(val)
  1365. if(val=='SCHEDULE_FROM_NOW'){
  1366. this.dateRange=[moment(),moment().add(10,'years')]
  1367. }else{
  1368. this.dateRange=[moment(),moment().add(10,'days')]
  1369. }
  1370. },
  1371. filterOption(input, option) {
  1372. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1373. },
  1374. adpositionChange(){
  1375. if(this.adposition!='inventoryTypes'){
  1376. this.checkedList=[];
  1377. this.indeterminate=false;
  1378. this.checkAll=false;
  1379. }
  1380. },
  1381. cityChange(){
  1382. this.region=[];
  1383. },
  1384. onChange(checkedList) {
  1385. this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length;
  1386. this.checkAll = checkedList.length === plainOptions.length;
  1387. },
  1388. onCheckAllChange(e) {
  1389. let valueOption = [];
  1390. this.plainOptions.forEach((item) => {
  1391. valueOption.push(item.value)
  1392. })
  1393. Object.assign(this, {
  1394. checkedList: e.target.checked ? valueOption : [],
  1395. indeterminate: false,
  1396. checkAll: e.target.checked,
  1397. });
  1398. },
  1399. customCrowdChange(e){
  1400. console.log(e);
  1401. if(e.target.value=='1' || e.target.value=='2'){
  1402. this.retargetTabChange();
  1403. this.tabKey=e.target.value
  1404. }else if(e.target.value=='3'){
  1405. this.retargetTabChange();
  1406. this.tabKey='1'
  1407. }
  1408. },
  1409. // 自定义人群的--同时定向排除tab切换事件
  1410. retargetTabChange(){
  1411. console.log()
  1412. this.retargetDataAll=[];
  1413. this.loading=true;
  1414. getAction('/kuaishou/batch/getPopulationList',{
  1415. accountId:this.accountId
  1416. }).then((res)=>{
  1417. // console.log(res)
  1418. this.loading=false;
  1419. if(res.success){
  1420. res.result.forEach((ele)=>{
  1421. ele.key=ele.orientationId
  1422. ele.id= ele.orientationId
  1423. ele.name=ele.orientationName+"("+ele.orientationId+")"
  1424. ele.accountName=this.accountInfo.title
  1425. ele.accountId=this.accountId
  1426. })
  1427. // this.retargetData=res.data;
  1428. this.retargetDataAll=[...this.retargetDataAll,...res.result];
  1429. }
  1430. })
  1431. },
  1432. onSelectChange(selectedRowKeys) {
  1433. // console.log('selectedRowKeys changed: ', selectedRowKeys);
  1434. this.selectedRowKeys = selectedRowKeys;
  1435. },
  1436. // 自定义人群的改变
  1437. retargetTableChange(pagination, filters, sorter){
  1438. // console.log(pagination);
  1439. },
  1440. //获取选中的城市
  1441. getSelectedCityArr(val){
  1442. console.log(val);
  1443. this.region=[];
  1444. this.region=val;
  1445. },
  1446. // 获取选中的区县
  1447. getSelectedCountyArr(val){
  1448. // console.log(val)
  1449. this.region=[];
  1450. this.region=val;
  1451. },
  1452. //获取选中的年龄段
  1453. getAgeSelect(val){
  1454. // console.log(val)
  1455. if(val.length==1&&val[0]==""){
  1456. this.agesRange=[]
  1457. }else{
  1458. this.agesRange=val;
  1459. }
  1460. },
  1461. //获取智能放量定向的值
  1462. getAutoExtendEnabled(val){
  1463. // console.log(val)
  1464. this.autoExtendTargets=[];
  1465. this.autoExtendTargets.push(...val)
  1466. },
  1467. callback(val) {
  1468. console.log(val);
  1469. },
  1470. handleOk(e) {
  1471. this.visible=false;
  1472. this.$router.push({path:'/LaunchHousekeeper/setProjectCreate'})
  1473. },
  1474. handleCancel(e) {
  1475. this.visible = false;
  1476. },
  1477. // 直达链接是否启用
  1478. useOpenUrlChange(){
  1479. this.form.setFieldsValue({
  1480. openUrl:''
  1481. })
  1482. },
  1483. //获取表单的某一个属性值
  1484. getFormData(className) {
  1485. return this.form.getFieldValue(className)
  1486. },
  1487. dateChange(date, dateString) {
  1488. // console.log(date,dateString)
  1489. this.form.getFieldDecorator('beginTime')
  1490. this.form.getFieldDecorator('endTime')
  1491. this.form.setFieldsValue({
  1492. beginTime: date[0].format('YYYY-MM-DD HH:mm'),
  1493. endTime: date[1].format('YYYY-MM-DD HH:mm'),
  1494. })
  1495. },
  1496. // 验证网址
  1497. IsURL(res) {
  1498. // var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
  1499. var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
  1500. var re = new RegExp(strRegex)
  1501. // console.log(re.test(res))
  1502. if (re.test(res)) {
  1503. return true
  1504. } else {
  1505. return false
  1506. }
  1507. },
  1508. validateURL(rule, value, callback) {
  1509. // console.log(rule, value, callback);
  1510. if (this.IsURL(value)) {
  1511. callback()
  1512. } else if (value && !this.IsURL(value)) {
  1513. callback('链接地址无法访问,请正确输入')
  1514. } else {
  1515. callback('链接必须填写')
  1516. }
  1517. },
  1518. validateName(rule, value, callback){
  1519. // console.log(rule, value, callback);
  1520. if (value) {
  1521. callback()
  1522. } else {
  1523. callback('应用包名称必须填写')
  1524. }
  1525. },
  1526. validateBid(rule, value, callback){
  1527. // console.log(rule, value, callback);
  1528. if (value) {
  1529. callback()
  1530. } else {
  1531. callback('出价必须填写')
  1532. }
  1533. },
  1534. // 保存并新建创意
  1535. goNext() {
  1536. this.$nextTick(()=>{
  1537. this.form.validateFields((err, values) => {
  1538. if (!err) {
  1539. // this.goNextloading=true;
  1540. if(this.district!='NONE'){
  1541. values.district=this.district
  1542. }
  1543. console.log(this.excludeSelectedKeys,this.incluedSelectedKeys)
  1544. // 设置广告位值
  1545. if(this.adposition!='inventoryTypes'){
  1546. this.checkedList=[];
  1547. values.sceneId=JSON.stringify([this.adposition])
  1548. }else{
  1549. values.sceneId=JSON.stringify(this.checkedList)
  1550. }
  1551. // 时间段值
  1552. // if(this.getFormData('scheduleTime')!=''){
  1553. // values.scheduleTime=this.scheduleTimeData
  1554. // }else{
  1555. // values.scheduleTime=''
  1556. // }
  1557. // 投放时间的值
  1558. // if(this.getFormData('scheduleType')=='SCHEDULE_FROM_NOW'){
  1559. // values.beginTime=this.dateRange[0].format('YYYY-MM-DD');
  1560. // values.endTime= this.dateRange[1].add(10,"years").format('YYYY-MM-DD');
  1561. // }else{
  1562. // values.beginTime=this.dateRange[0].format('YYYY-MM-DD');
  1563. // values.endTime= this.dateRange[1].format('YYYY-MM-DD');
  1564. // }
  1565. values.agesRange=JSON.stringify(this.agesRange)
  1566. values.region=this.region.length?JSON.stringify(this.region):undefined;
  1567. values.convertId=this.convertId==''?undefined:this.convertId;
  1568. let excludePopulation=this.excludeSelectedKeys.map(item=>{
  1569. return item.id
  1570. })
  1571. let population=this.incluedSelectedKeys.map(item=>{
  1572. return item.id
  1573. })
  1574. values.excludePopulation=excludePopulation.length>0?JSON.stringify(excludePopulation):undefined;
  1575. values.population=population.length>0?JSON.stringify(population):undefined;
  1576. values.useAppMarket=values.useAppMarket?'1':'0'
  1577. // if(this.useDirectional==0){
  1578. // values.templateId=this.directionalCheckedList
  1579. // }
  1580. if(this.sysType==1&&this.getData('useAppMarket')){
  1581. values.appStore=JSON.stringify(this.appStore)
  1582. }
  1583. if(values.cpaBid){
  1584. values.cpaBid=parseInt(values.cpaBid*1000)
  1585. }
  1586. // if(values.bid){
  1587. // values.bid=parseInt(values.bid*1000)
  1588. // }
  1589. // if(values.cpaBidMin){
  1590. // values.cpaBidMin=parseInt(values.cpaBidMin*1000)
  1591. // }
  1592. // if(values.cpaBidMax){
  1593. // values.cpaBidMax=parseInt(values.cpaBidMax*1000)
  1594. // }
  1595. // if(values.stepSize){
  1596. // values.stepSize=parseInt(values.stepSize*1000)
  1597. // }
  1598. if(values.creativeCategory&&values.creativeCategory.length>0){
  1599. values.creativeCategory=values.creativeCategory[values.creativeCategory.length-1]
  1600. }else{
  1601. values.creativeCategory=undefined
  1602. }
  1603. values.accountId = this.accountId
  1604. console.log('Received values of form: ', values)
  1605. let url=''
  1606. if(this.editRecordId){
  1607. url='/ctop/aiKuaishouAdvertiserStrategy/edit'
  1608. }else{
  1609. url='/ctop/aiKuaishouAdvertiserStrategy/add'
  1610. }
  1611. postAction(url,values).then(res=>{
  1612. console.log(res)
  1613. this.goNextloading=false
  1614. if(res.success){
  1615. this.$router.replace('/autoLaunch/configLaunchList')
  1616. this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
  1617. this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
  1618. }else{
  1619. this.$message.error(res.message)
  1620. // this.$router.replace('/autoLaunch/configLaunchList')
  1621. // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
  1622. // this.$bus.$emit('remove', `/autoLaunch/configLaunchInfo?id=${this.editRecordId}`)
  1623. }
  1624. })
  1625. // $.ajax({
  1626. // url:'http://192.168.1.193:31012/add_advertiser_strategy',
  1627. // type:"POST",
  1628. // data:JSON.stringify(values),
  1629. // crossDomain:true,
  1630. // contentType:"application/json; charset=utf-8;",
  1631. // dataType:'json',
  1632. // success:(res)=>{
  1633. // this.goNextloading=false
  1634. // console.log(res)
  1635. // let result=JSON.parse(res)
  1636. // if(result.code==0){
  1637. // this.$router.replace('/autoLaunch/configLaunchList')
  1638. // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
  1639. // }else{
  1640. // this.$message.error(result.message)
  1641. // this.$router.replace('/autoLaunch/configLaunchList')
  1642. // this.$bus.$emit('remove', '/autoLaunch/configLaunchInfo')
  1643. // }
  1644. // },
  1645. // error:(res)=>{
  1646. // console.log(res)
  1647. // }
  1648. // })
  1649. }else{
  1650. this.$message.error('请正确填写必填项目')
  1651. }
  1652. })
  1653. })
  1654. },
  1655. // 获取applist
  1656. getAppList() {
  1657. let params = {}
  1658. params.accountId = this.accountId
  1659. getAction('/kuaishou/batch/getAppList', params).then(res => {
  1660. if (res.success) {
  1661. this.appListAll = res.result.map((item, index) => {
  1662. return {
  1663. ...item,
  1664. key: index
  1665. }
  1666. })
  1667. if(this.sysType==1){
  1668. this.appList=this.appListAll.filter(item=>{
  1669. return item.platform==1||item.platform==2
  1670. })
  1671. }else if(this.sysType==2){
  1672. this.appList=this.appListAll.filter(item=>{
  1673. return item.platform==3||item.platform==4
  1674. })
  1675. }
  1676. }
  1677. })
  1678. },
  1679. convertChange() {
  1680. this.convertId = ""
  1681. },
  1682. getConvertList() {
  1683. var params = {}
  1684. params.accountId = this.accountId
  1685. params.type = this.convertType
  1686. getAction('/kuaishou/batch/getConvertList', params).then(res => {
  1687. console.log(res)
  1688. if (res.success) {
  1689. this.convertList = res.result.map(item => {
  1690. return {
  1691. ...item,
  1692. convert_id: item.convert_id + ''
  1693. }
  1694. })
  1695. }
  1696. })
  1697. },
  1698. sysTypeChange(e){
  1699. console.log(e.target.value);
  1700. this.form.setFieldsValue({
  1701. appId:'',
  1702. platformOs:e.target.value
  1703. })
  1704. if(this.getFormData('campaignType')==2 || this.getFormData('campaignType')==7){
  1705. this.appIdChange(this.getFormData('appId'))
  1706. }
  1707. if(this.sysType==1){
  1708. this.appList=this.appListAll.filter(item=>{
  1709. return (item.platform==1 || item.platform==2)
  1710. })
  1711. }else if(this.sysType==2){
  1712. this.appList=this.appListAll.filter(item=>{
  1713. return (item.platform==3||item.platform==4)
  1714. })
  1715. }
  1716. },
  1717. getPlatForm(appId) {
  1718. if (appId) {
  1719. var data = this.appList.filter(item => {
  1720. return item.appId == appId
  1721. })
  1722. return data[0].platform
  1723. }
  1724. },
  1725. showConvert() {
  1726. this.convertChange()
  1727. if (this.getFormData('campaignType') == 2) {
  1728. if (this.getData('appId')) {
  1729. this.convert = true;
  1730. if (this.getPlatForm(this.getData('appId')) == 1 || this.getPlatForm(this.getData('appId')) == 2) {
  1731. this.convertType = '3'
  1732. } else {
  1733. this.convertType = '7'
  1734. }
  1735. } else {
  1736. this.$message.error('请选择应用')
  1737. }
  1738. } else {
  1739. this.convert = true
  1740. this.convertType = '1'
  1741. }
  1742. this.getConvertList()
  1743. },
  1744. getPageList(appId) {
  1745. getAction('/kuaishou/batch/getPageList', {
  1746. accountId: this.accountId,
  1747. appId: appId,
  1748. viewComp: 7,
  1749. }).then((res) => {
  1750. if (res.success) {
  1751. this.siteList = res.result
  1752. }
  1753. })
  1754. },
  1755. // 获取行动号召按钮
  1756. getActionBarText(){
  1757. this.actionBarTextList=[]
  1758. getAction('/kuaishou/batch/getActionBarTextByType', {
  1759. type:this.getFormData('campaignType')
  1760. }).then((res) => {
  1761. if (res.success) {
  1762. this.actionBarTextList = res.result
  1763. }
  1764. })
  1765. },
  1766. // 获取创意分类创意标签白名单
  1767. getWhiteList(){
  1768. this.whiteList={}
  1769. getAction('/kuaishou/batch/getWhiteList', {
  1770. accountId: this.accountId,
  1771. }).then((res) => {
  1772. if (res.success) {
  1773. // console.log(res)
  1774. if (res.result) {
  1775. this.whiteList=res.result
  1776. }
  1777. }
  1778. })
  1779. },
  1780. editEchoPage(){
  1781. this.spinning=true;
  1782. if(this.editRecordId){
  1783. getAction('/ctop/aiKuaishouAdvertiserStrategy/queryById',{
  1784. id:this.editRecordId
  1785. }).then(res=>{
  1786. console.log(res);
  1787. this.accountId=res.result.accountId;
  1788. this.description=res.result.description
  1789. this.form.setFieldsValue({
  1790. ...res.result,
  1791. creativeTag:res.result.creativeTag?res.result.creativeTag:undefined,
  1792. useAppMarket:res.result.useAppMarket==1?true:false,
  1793. cpaBid:res.result.cpaBid/1000,
  1794. })
  1795. this.ageArr=[];
  1796. this.ageArr=JSON.parse(JSON.stringify(ageArr))
  1797. let agesRange=res.result.agesRange?JSON.parse(res.result.agesRange):[]
  1798. if(agesRange.length>0){
  1799. agesRange.forEach((item,index)=>{
  1800. this.ageArr.forEach((ele)=>{
  1801. if(ele.value==item){
  1802. ele.checked=true;
  1803. }
  1804. })
  1805. });
  1806. }
  1807. let sceneId=res.result.sceneId?JSON.parse(res.result.sceneId):[]
  1808. if(sceneId.length==1&&sceneId[0]==1){
  1809. this.adposition=1
  1810. }else{
  1811. this.adposition='inventoryTypes';
  1812. this.checkedList=sceneId
  1813. }
  1814. if(res.result.population&&res.result.excludePopulation){
  1815. this.form.setFieldsValue({
  1816. customCrowd:'3'
  1817. })
  1818. }else if(res.result.population&&!res.result.excludePopulation){
  1819. this.form.setFieldsValue({
  1820. customCrowd:'1'
  1821. })
  1822. }else if(!res.result.population&&!res.result.excludePopulation){
  1823. this.form.setFieldsValue({
  1824. customCrowd:'0'
  1825. })
  1826. }else{
  1827. this.form.setFieldsValue({
  1828. customCrowd:'2'
  1829. })
  1830. }
  1831. this.incluedSelectedRowKeys=res.result.population?JSON.parse(res.result.population):[]
  1832. this.excludeSelectedRowKeys=res.result.excludePopulation?JSON.parse(res.result.excludePopulation):[]
  1833. let region=res.result.region?JSON.parse(res.result.region):[]
  1834. if(region.length==0){
  1835. this.district='NONE'
  1836. }else{
  1837. this.district='CITY';
  1838. this.regionList=region
  1839. }
  1840. if(this.getFormData('customCrowd')=='1' || this.getFormData('customCrowd')=='2'){
  1841. this.tabKey=this.getFormData('customCrowd')
  1842. }else if(this.getFormData('customCrowd')=='3'){
  1843. this.tabKey='1'
  1844. }
  1845. this.spinning=false;
  1846. })
  1847. }
  1848. },
  1849. getpopulationlist(){
  1850. getAction('/kuaishou/batch/getPopulationList',{
  1851. accountId:this.accountId
  1852. }).then((res)=>{
  1853. // console.log(res)
  1854. this.loading=false;
  1855. if(res.success){
  1856. res.result.forEach((ele)=>{
  1857. ele.key=ele.orientationId
  1858. ele.id= ele.orientationId
  1859. ele.name=ele.orientationName+"("+ele.orientationId+")"
  1860. ele.accountName=this.accountInfo.title
  1861. ele.accountId=this.accountId
  1862. })
  1863. // this.retargetData=res.data;
  1864. this.retargetDataAll=[...this.retargetDataAll,...res.result];
  1865. }
  1866. })
  1867. }
  1868. },
  1869. mounted() {
  1870. this.accountHttp()
  1871. // this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
  1872. let strategyNamepart=this.campaignTypeHandle(this.getFormData('campaignType'));
  1873. this.strategyName ='[预设]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
  1874. this.getActionBarText()
  1875. if(this.$route){
  1876. let editRecordId=this.$route.query.id;
  1877. if(editRecordId){
  1878. this.editRecordId=editRecordId;
  1879. this.editEchoPage()
  1880. }
  1881. }
  1882. },
  1883. filters: {
  1884. getDate(value) {
  1885. let date = new Date(value)
  1886. let y = date.getFullYear()
  1887. let MM = date.getMonth() + 1
  1888. MM = MM < 10 ? '0' + MM : MM
  1889. let d = date.getDate()
  1890. d = d < 10 ? '0' + d : d
  1891. return y + '-' + MM + '-' + d
  1892. },
  1893. platform(str) {
  1894. var data = {
  1895. 1: 'Android应用下载',
  1896. 2: 'Android网页游戏',
  1897. 3: 'iOS应用下载',
  1898. 4: 'iOS网页游戏'
  1899. }
  1900. return data[str]
  1901. },
  1902. customCrowdHandler(val){
  1903. let str=''
  1904. switch (val) {
  1905. case '1':
  1906. str='上传人群'
  1907. break;
  1908. case '2':
  1909. str='广告人群'
  1910. break;
  1911. case '3':
  1912. str='主题专区'
  1913. break;
  1914. case '4':
  1915. str='逻辑规则'
  1916. break;
  1917. case '5':
  1918. str='人群扩展'
  1919. break;
  1920. case '6':
  1921. str='平台定制'
  1922. break;
  1923. case '7':
  1924. str='定制付费'
  1925. break;
  1926. case '8':
  1927. str='网红粉丝类别'
  1928. break;
  1929. case '9':
  1930. str='内容付费行为'
  1931. break;
  1932. case '10':
  1933. str='移动应用安装'
  1934. break;
  1935. case '11':
  1936. str='快手使用活跃度'
  1937. break;
  1938. case '12':
  1939. str='行业分类'
  1940. break;
  1941. case '13':
  1942. str='商业兴趣'
  1943. break;
  1944. case '14':
  1945. str='固化标签'
  1946. break;
  1947. case '15':
  1948. str='行业偏好'
  1949. break;
  1950. case '16':
  1951. str='第三方标签'
  1952. break;
  1953. case '17':
  1954. str='产品关键词'
  1955. break;
  1956. default:
  1957. break;
  1958. }
  1959. return str
  1960. }
  1961. },
  1962. }
  1963. </script>
  1964. <style lang="scss">
  1965. .newPlan{
  1966. .ant-btn-danger {
  1967. background-color: #ff4d4f !important;
  1968. }
  1969. }
  1970. .ant-tooltip-inner,
  1971. .ant-tooltip,
  1972. .ant-tooltip-arrow::before {
  1973. background-color: #fff;
  1974. color: #333;
  1975. }
  1976. .ant-tooltip-inner {
  1977. span {
  1978. display: block;
  1979. }
  1980. }
  1981. .ant-tooltip {
  1982. max-width: 450px;
  1983. }
  1984. .newPlan {
  1985. .ant-radio-button-wrapper {
  1986. min-width: 80px;
  1987. text-align: center;
  1988. }
  1989. .ant-form-item {
  1990. -webkit-box-sizing: border-box;
  1991. box-sizing: border-box;
  1992. margin: 0;
  1993. padding: 0;
  1994. color: rgba(0, 0, 0, 0.65);
  1995. font-size: 14px;
  1996. font-variant: tabular-nums;
  1997. line-height: 1.5;
  1998. list-style: none;
  1999. -webkit-font-feature-settings: 'tnum';
  2000. font-feature-settings: 'tnum';
  2001. vertical-align: top;
  2002. }
  2003. .directedBody {
  2004. .ant-form-item {
  2005. margin-bottom: 20px;
  2006. }
  2007. }
  2008. .inventoryTypes{
  2009. .ant-checkbox-wrapper,
  2010. .ant-checkbox-group-item {
  2011. display: block;
  2012. padding: 5px 15px;
  2013. }
  2014. .ant-checkbox-wrapper:first-child {
  2015. padding: 0 15px 5px;
  2016. }
  2017. }
  2018. }
  2019. </style>
  2020. <style lang="scss" scoped>
  2021. .newPlan {
  2022. font-family: PingFangSC-Regular, tahoma, arial, 'Hiragino Sans GB', 'Microsoft yahei', sans-serif;
  2023. color: #333;
  2024. ul,
  2025. li {
  2026. margin: 0;
  2027. padding: 0;
  2028. }
  2029. .moduler {
  2030. background: #fff;
  2031. margin-bottom: 16px;
  2032. position: relative;
  2033. padding: 32px 24px 48px 32px;
  2034. border-radius: 4px;
  2035. box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
  2036. .ad-range2{
  2037. width: 680px;
  2038. padding: 5px 32px;
  2039. .ad-range2-title{
  2040. background: #f9f9f9;
  2041. // line-height: 32px;
  2042. // height: 32px;
  2043. padding: 15px 15px;
  2044. border: 1px solid #eaeaea;
  2045. border-bottom: 0;
  2046. }
  2047. .quanxuanDirectional{
  2048. // padding: 0 8px;
  2049. position: absolute;
  2050. right: 10px;
  2051. top: 15px;
  2052. color: #1890ff;
  2053. }
  2054. .title-list {
  2055. // width: calc(100% + 48px);
  2056. width: 100%;
  2057. margin: 0;
  2058. margin-bottom: 0;
  2059. padding: 0;
  2060. background: #fff;
  2061. height: 363px;
  2062. border: 1px solid #eaeaea;
  2063. overflow: scroll;
  2064. overflow-x: hidden;
  2065. // margin-top: 10px;
  2066. }
  2067. .title-list .title-item{
  2068. padding: 10px 30px;
  2069. width: 100%;
  2070. // height: 32px;
  2071. // line-height: 32px;
  2072. // border-bottom: 1px solid #eaeaea;
  2073. }
  2074. }
  2075. .moduler-title {
  2076. display: flex;
  2077. align-items: center;
  2078. font-size: 22px;
  2079. margin-bottom: 20px;
  2080. }
  2081. .row-item {
  2082. display: flex;
  2083. justify-content: flex-start;
  2084. align-items: center;
  2085. margin-bottom: 32px;
  2086. }
  2087. .row-item:last-of-type {
  2088. margin-bottom: 0;
  2089. }
  2090. .row-item .hint-item {
  2091. width: 24px;
  2092. min-width: 24px;
  2093. align-self: flex-start;
  2094. line-height: 20px;
  2095. height: 20px;
  2096. margin-top: 9px;
  2097. }
  2098. .row-item .label-item {
  2099. position: relative;
  2100. align-items: flex-start;
  2101. align-self: flex-start;
  2102. line-height: 20px;
  2103. height: 20px;
  2104. margin-top: 10px;
  2105. width: 80px;
  2106. min-width: 80px;
  2107. .text-item {
  2108. font-size: 14px;
  2109. width: 60px;
  2110. }
  2111. }
  2112. .row-item .required-item {
  2113. width: 4px;
  2114. height: 4px;
  2115. border-radius: 2px;
  2116. background: #f45858;
  2117. position: absolute;
  2118. right: 10px;
  2119. top: 50%;
  2120. transform: translateY(-50%);
  2121. }
  2122. .row-item .input-item {
  2123. min-width: 480px;
  2124. position: relative;
  2125. // height: 35px;
  2126. .tip {
  2127. font-size: 12px;
  2128. color: tomato;
  2129. }
  2130. .inventory-tags-lists-header {
  2131. background-color: #F8F9FA;
  2132. border: 1px solid #E4E9ED;
  2133. height: 36px;
  2134. line-height: 33px;
  2135. border-radius: 4px 4px 0 0;
  2136. font-weight: bold;
  2137. display: flex;
  2138. }
  2139. .inventory-tags-lists-container {
  2140. border: 1px solid #E4E9ED;
  2141. margin-top: -1px;
  2142. height: 100%;
  2143. padding: 4px 0px;
  2144. border-radius: 0 0 4px 4px;
  2145. }
  2146. .inventory-tags-lists-item {
  2147. width: 100%;
  2148. height: 37px;
  2149. line-height: 37px;
  2150. padding-left: 12px;
  2151. padding-right: 12px;
  2152. display: flex;
  2153. font-size: 14px;
  2154. color: #333;
  2155. }
  2156. }
  2157. }
  2158. .opt {
  2159. text-align: right;
  2160. }
  2161. }
  2162. </style>