creatUnit.vue 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129
  1. <style>
  2. .display-none-selset {
  3. display: none !important;
  4. }
  5. #table_time_selected1 tr {
  6. border: 1px solid rgb(102, 162, 243);
  7. }
  8. .plug-timer-grid th {
  9. line-height: 25px;
  10. }
  11. .group-creat .ant-form-item-required::before {
  12. display: inline-block;
  13. margin-right: 4px;
  14. color: #f5222d;
  15. font-size: 14px;
  16. font-family: SimSun, sans-serif;
  17. line-height: 1;
  18. content: '';
  19. }
  20. .else-label .ant-form-item-label label::after {
  21. content: '';
  22. position: relative;
  23. top: -0.5px;
  24. margin: 0 8px 0 2px;
  25. }
  26. </style>
  27. <style scoped>
  28. ::v-deep .ant-radio-group{
  29. width: 100%!important;
  30. }
  31. </style>
  32. <template>
  33. <a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="group-creat">
  34. <a-form @submit="handleSubmit" :form="form">
  35. <a-form-item
  36. label="今日已创建数"
  37. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  38. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  39. >
  40. <div style="color:red">
  41. {{getData('unitType') == '4' ? createCount.ctmCount : createCount.pgdCount }}
  42. </div>
  43. </a-form-item>
  44. <a-form-item
  45. label="创意制作方式"
  46. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  47. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  48. >
  49. <a-radio-group buttonStyle="solid" v-decorator="['unitType', { initialValue: '4' }]" @change="changeUnitType">
  50. <a-radio-button value="4">自定义</a-radio-button>
  51. <a-radio-button value="7">程序化</a-radio-button>
  52. </a-radio-group>
  53. </a-form-item>
  54. <a-form-item
  55. label="目标应用"
  56. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  57. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  58. v-if="campaignType == '2'||campaignType == '7'"
  59. >
  60. <a-select
  61. v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]"
  62. showSearch
  63. allowClear
  64. placeholder="选择应用目标"
  65. optionFilterProp="children"
  66. style="width: 500px"
  67. @focus="handleFocus"
  68. @blur="handleBlur"
  69. @change="handleChange"
  70. :filterOption="filterOption"
  71. >
  72. <a-select-option value="0">请选择目标应用</a-select-option>
  73. <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
  74. {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
  75. appModel.platform | platform
  76. }}
  77. </a-select-option>
  78. </a-select>
  79. <!-- <a @click="addApplication" style="margin-left:10px">刷新应用</a> -->
  80. <a-button type="primary" @click="addApplication" :loading="tongbuLoading"> 刷新应用</a-button>
  81. </a-form-item>
  82. <a-form-item
  83. label="调起链接"
  84. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  85. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  86. v-if="campaignType == '2'||campaignType == '7'"
  87. >
  88. <a-switch default-checked v-model="uriCheck"/>
  89. <span style="color:red"> 需加白使用</span>
  90. <div v-if="uriCheck">
  91. <a-input placeholder="请填写链接" v-decorator="['schemaUri', { rules: [{ message:'链接不能为空'}] }]" />
  92. <br /><br />
  93. <a
  94. v-if="getData('schemaUri')"
  95. @click="
  96. clickTrackUrlShow = true
  97. clickTrackUrlShowType = '3'
  98. "
  99. style="margin-right: 10px; position: relative; top: -20px"
  100. >收藏调起链接</a
  101. >
  102. <a
  103. @click="
  104. getClickTrackUrlList('3')
  105. clickTrackUrlShowType = '3'
  106. "
  107. style="margin-right: 10px; position: relative; top: -20px"
  108. >调起链接列表</a
  109. >
  110. </div>
  111. </a-form-item>
  112. <a-form-item
  113. label="转化类型"
  114. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  115. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  116. v-if="campaignType == '3'"
  117. >
  118. <a-radio-group
  119. buttonStyle="solid"
  120. v-decorator="['urlType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '1' }]"
  121. >
  122. <a-radio-button value="1">淘宝商品</a-radio-button>
  123. <a-radio-button value="2">淘客商品</a-radio-button>
  124. </a-radio-group>
  125. </a-form-item>
  126. <a-form-item
  127. :label="campaignType == 3 ? ' ' : campaignType == '7'?'H5链接':'链接'"
  128. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  129. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  130. v-if="campaignType == 3||campaignType == 4||campaignType == 5||campaignType == 6||campaignType == 7"
  131. :class="{ 'else-label': campaignType == 3 }"
  132. >
  133. <a-input
  134. placeholder="请填写链接"
  135. v-decorator="['url', { rules: [{ required: true, message: '链接不能为空' }] }]"
  136. />
  137. <br /><br />
  138. <a
  139. v-if="getData('url')"
  140. @click="
  141. clickTrackUrlShow = true
  142. clickTrackUrlShowType = '4'
  143. "
  144. style="margin-right: 10px; position: relative; top: -20px"
  145. >收藏链接</a
  146. >
  147. <a
  148. @click="
  149. getClickTrackUrlList('4')
  150. clickTrackUrlShowType = '4'
  151. "
  152. style="margin-right: 10px; position: relative; top: -20px"
  153. >链接列表</a
  154. >
  155. </a-form-item>
  156. <a-form-item
  157. label="转化目标"
  158. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  159. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  160. v-if="campaignType == 2 || campaignType == 4 || campaignType == 5"
  161. >
  162. <span v-if="convertId && !convert" style="display: block; font-size: 16px"
  163. >已选择转化目标: {{ convertId.label }}</span
  164. >
  165. <a-button type="primary" @click="showConvert">{{ convertId ? '更换转化目标' : '选择转化目标' }}</a-button>
  166. </a-form-item>
  167. <a-modal v-model="convert" title="选择转化目标">
  168. <template slot="footer">
  169. <a-button key="back" @click="convert = false">取消</a-button>
  170. <a-button key="submit" type="primary" @click="convertOk"> 确定 </a-button>
  171. </template>
  172. <a-form-item
  173. label="追踪方式"
  174. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  175. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  176. >
  177. <a-radio-group buttonStyle="solid" v-model="convertType" @change="convertChange">
  178. <a-radio-button value="1" v-show="campaignType == 4 || campaignType == 5">JS布玛</a-radio-button>
  179. <a-radio-button value="2" v-show="campaignType == 4 || campaignType == 5">Xpath</a-radio-button>
  180. <a-radio-button
  181. value="3"
  182. v-show="campaignType == 2 && (getPlatForm(getData('appId')) == 1 || getPlatForm(getData('appId')) == 2)"
  183. >应用-SDK
  184. </a-radio-button>
  185. <a-radio-button value="7" v-show="campaignType == 2">应用-API</a-radio-button>
  186. </a-radio-group>
  187. </a-form-item>
  188. <a-form-item
  189. label="选择转化"
  190. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  191. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  192. >
  193. <a-select allowClear labelInValue style="width: 100%" v-model="convertId" @focus="getConvertList">
  194. <a-select-option :value="item.convert_id" v-for="(item, index) in convertList" :key="item.convert_id">
  195. {{ item.convert_name }}</a-select-option
  196. >
  197. </a-select>
  198. </a-form-item>
  199. </a-modal>
  200. <a-form-item
  201. label=" "
  202. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  203. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  204. class="else-label"
  205. v-if="campaignType == '2' && (getPlatForm(getData('appId')) == '1' || getPlatForm(getData('appId')) == '2')"
  206. >
  207. <a-checkbox
  208. v-decorator="[
  209. 'useAppMarket',
  210. {
  211. valuePropName: 'checked',
  212. initialValue: false,
  213. },
  214. ]"
  215. >
  216. 优先从系统应用商店下载
  217. </a-checkbox>
  218. </a-form-item>
  219. <a-form-item
  220. label=" "
  221. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  222. :wrapperCol="{ lg: { span: 10 }, sm: { span: 16 } }"
  223. class="else-label"
  224. v-if="getData('useAppMarket')&&campaignType == '2' && (getPlatForm(getData('appId')) == '1' || getPlatForm(getData('appId')) == '2')"
  225. >
  226. 请勾选投放应用已上架的应用商店(默认全选)
  227. <a-checkbox-group v-model="allForm.appStore">
  228. <a-checkbox value="huawei">华为</a-checkbox>
  229. <a-checkbox value="oppo">OPPO</a-checkbox>
  230. <a-checkbox value="vivo">VIVO</a-checkbox>
  231. <a-checkbox value="xiaomi">小米</a-checkbox>
  232. <a-checkbox value="meizu">魅族</a-checkbox>
  233. <a-checkbox value="smartisan">锤子</a-checkbox>
  234. </a-checkbox-group>
  235. </a-form-item>
  236. <a-form-item label="投放范围" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  237. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  238. v-if="allianceAccount">
  239. <a-radio-group buttonStyle="solid" v-model="allForm.allianceAccount">
  240. <a-radio-button value="1">默认</a-radio-button>
  241. <a-radio-button value="2">联盟广告</a-radio-button>
  242. </a-radio-group>
  243. </a-form-item>
  244. <a-form-item
  245. label="创建数量"
  246. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  247. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  248. >
  249. <a-input-number
  250. v-decorator="[
  251. 'createCount',
  252. {
  253. rules: [{ required: true, message: '创建数量必填' }],
  254. initialValue: 1,
  255. },
  256. ]"
  257. style="width: 150px"
  258. >
  259. </a-input-number>
  260. </a-form-item>
  261. <div style="text-align: center; font-size: 16px; margin-bottom: 10px">目标人群</div>
  262. <a-form-item
  263. label="选择模板"
  264. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  265. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  266. >
  267. <a-select
  268. v-decorator="['templateId']"
  269. showSearch
  270. allowClear
  271. placeholder="选择定向模板"
  272. optionFilterProp="children"
  273. style="width: 500px"
  274. :filterOption="filterOption"
  275. >
  276. <a-select-option v-for="appModel in templateList" :key="appModel.templateId" :value="appModel.templateId">
  277. {{ appModel.templateName }}
  278. </a-select-option>
  279. </a-select>
  280. <a-button type="primary" @click="getTemplate(null)" :loading="templateLoading"> 刷新模板</a-button>
  281. <br>
  282. <a style="margin: 0 10px 0 0" @click="addTemplate(null)">新增模板</a>
  283. <a
  284. @click="lookTemplate(null, getData('templateId'))"
  285. :disabled="getData('templateId') == '' || getData('templateId') == null"
  286. >查看模板</a
  287. >
  288. </a-form-item>
  289. <div style="text-align: center; font-size: 16px">预算和排期</div>
  290. <a-form-item
  291. label="单日预算"
  292. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  293. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  294. >
  295. <a-radio-group buttonStyle="solid" v-model="allForm.dayBudget">
  296. <a-radio-button value="0">不限</a-radio-button>
  297. <a-radio-button value="1">统一预算</a-radio-button>
  298. </a-radio-group>
  299. </a-form-item>
  300. <a-form-item
  301. label=" "
  302. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  303. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  304. class="else-label"
  305. v-if="allForm.dayBudget == '1'"
  306. >
  307. <a-input
  308. placeholder="不小于100,不超过100000000,仅支持输入自然数"
  309. v-decorator="[
  310. 'dayBudget',
  311. {
  312. rules: [{ required: true, message: '请填写预算' }, { validator: budgetValue }],
  313. },
  314. ]"
  315. />
  316. </a-form-item>
  317. <a-form-item
  318. label="投放方式"
  319. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  320. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  321. >
  322. <a-radio-group buttonStyle="solid" v-decorator="['speed', { initialValue: '1' }]">
  323. <a-radio-button value="1">正常投放</a-radio-button>
  324. <a-radio-button value="2">平滑投放</a-radio-button>
  325. </a-radio-group>
  326. <br />
  327. <span>
  328. {{ getData('speed') == '2' ? '平滑匀速投放' : '尽快展示广告消耗预算' }}
  329. </span>
  330. </a-form-item>
  331. <a-form-item
  332. label="排期"
  333. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  334. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  335. >
  336. <a-radio-group buttonStyle="solid" v-model="allForm.time" @change="setTime">
  337. <a-radio-button value="1">从今天开始长期投放</a-radio-button>
  338. <a-radio-button value="2">设置开始和结束日期</a-radio-button>
  339. </a-radio-group>
  340. <br />
  341. <a-range-picker v-if="allForm.time == '2'" v-model="timeRange" format="YYYY-MM-DD" :allowClear="false" />
  342. </a-form-item>
  343. <a-form-item
  344. label="投放时段"
  345. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  346. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  347. >
  348. <a-radio-group buttonStyle="solid" v-model="allForm.scheduleTime" @change="setTimeAll">
  349. <a-radio-button value="1">全天</a-radio-button>
  350. <a-radio-button value="2">特定时间</a-radio-button>
  351. </a-radio-group>
  352. <br />
  353. <selectCheckAll
  354. style="width: 100%"
  355. v-show="allForm.scheduleTime == '2'"
  356. :scheduleTime.sync="allForm.scheduleTimeData"
  357. ref="selectCheck"
  358. />
  359. </a-form-item>
  360. <a-form-item
  361. label="创意展现方式"
  362. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  363. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  364. >
  365. <a-radio-group buttonStyle="solid" v-decorator="['showMode', { initialValue: '2' }]">
  366. <a-radio-button value="2">智能优选</a-radio-button>
  367. <a-radio-button value="1">随机轮播</a-radio-button>
  368. </a-radio-group>
  369. <br />
  370. <span>
  371. {{
  372. getData('showMode') == '1'
  373. ? '广告组包含的广告创意将随机展现'
  374. : '每一次展现的时候,系统会进行CTR预估,预估CTR高的会得到展现机会'
  375. }}
  376. </span>
  377. </a-form-item>
  378. <a-form-item
  379. label="场景广告位"
  380. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  381. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  382. v-if="allForm.allianceAccount == '1'"
  383. >
  384. <checkBoxGroup
  385. :options="[
  386. { label: '优选广告位', value: 1 },
  387. { label: '上下滑大屏广告', value: 6 },
  388. { label: '视频播放页广告', value: 3 },
  389. { label: '激励视频广告位', value: 24 },
  390. { label: '快手联盟优选', value: 10 },
  391. ]"
  392. v-model="allForm.sceneId"
  393. @change="changeData"
  394. />
  395. </a-form-item>
  396. <!-- <a-form-item
  397. label="场景广告位"
  398. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  399. :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
  400. v-if="allForm.allianceAccount == '1'"
  401. >
  402. <a-radio-group buttonStyle="solid" v-decorator="['sceneId', { initialValue: '1' }]">
  403. <a-radio-button value="1">优选广告位</a-radio-button>
  404. <a-radio-button value="2">按场景选择广告位</a-radio-button>
  405. </a-radio-group>
  406. <br />
  407. </a-form-item>
  408. <a-form-item
  409. label=" "
  410. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  411. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  412. class="else-label"
  413. v-if="getData('sceneId') == '2'"
  414. >
  415. <a-checkbox-group :defaultValue="[7]" v-model="allForm.sceneId">
  416. <a-checkbox :value="7">信息流广告</a-checkbox>
  417. <a-checkbox :value="6">上下滑大屏广告</a-checkbox>
  418. <a-checkbox :value="3">视频播放页广告</a-checkbox>
  419. </a-checkbox-group>
  420. </a-form-item> -->
  421. <div style="text-align: center; font-size: 16px">优化目标和计费</div>
  422. <div style="width: 100%" v-for="(item, index) of allForm.group" :key="index">
  423. <div style="clear: both"></div>
  424. <a-form-item
  425. label="选择商品"
  426. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  427. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  428. v-if="isLibrary"
  429. >
  430. <a @click="getProductList()">选择商品</a>
  431. <p v-if="!!outerShowId">{{outerShowId.split('@')[2]}}</p>
  432. </a-form-item>
  433. <a-form-item
  434. label="优化目标"
  435. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  436. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  437. >
  438. <a-radio-group buttonStyle="solid" v-model="item.bidType" @change="resData(index)">
  439. <a-radio-button :value="1" :disabled="campaignBidType == '1'">点击数</a-radio-button>
  440. <a-radio-button :value="10" v-if="campaignBidType != '1'">转化数</a-radio-button>
  441. <a-radio-button :value="12" v-else>转化数</a-radio-button>
  442. </a-radio-group>
  443. </a-form-item>
  444. <a-form-item
  445. label="转化目标"
  446. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  447. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  448. v-if="item.bidType == 10||item.bidType == 12"
  449. >
  450. <a-select v-model="item.ocpxActionType" @change="getDeepTypesList" allowClear>
  451. <a-select-option :value="items.ocpx_action_type" v-for="items in ocpxActionList"
  452. >{{items.name}}</a-select-option
  453. >
  454. </a-select>
  455. </a-form-item>
  456. <a-form-item
  457. label="深度转化目标"
  458. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  459. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  460. v-if="
  461. (item.ocpxActionType == 180 || item.ocpxActionType == 53) && deepTypesList.length > 0
  462. "
  463. >
  464. <a-select v-model="item.deepConversionType" allowClear>
  465. <a-select-option
  466. :value="items.event_type"
  467. v-for="(items, index) of deepTypesList"
  468. :key="index"
  469. >
  470. {{ items.name }}</a-select-option
  471. >
  472. </a-select>
  473. </a-form-item>
  474. <a-form-item
  475. label="计费方式"
  476. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  477. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  478. >
  479. <a-radio-group defaultValue="1">
  480. <a-radio value="1">{{ campaignBidType == '1'?'最大转化':item.bidType == 1 ? '点击计费' : '展示计费(oCPM)' }}</a-radio>
  481. </a-radio-group>
  482. </a-form-item>
  483. <a-form-item
  484. label="出价"
  485. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  486. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  487. v-if="item.bidType == 1&&campaignBidType != '1'"
  488. >
  489. <!-- v-model="item.bid" -->
  490. <a-input-number
  491. v-decorator="[
  492. 'bid',
  493. {
  494. rules: [{ required: true, message: '出价必填' }, {validator: bidCheck}],
  495. },
  496. ]"
  497. :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }"
  498. style="width: 100%"
  499. >
  500. </a-input-number>
  501. <!-- <span style="color: red" v-if="item.showTipCheck && item.ocpxActionType == 180"
  502. >不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span
  503. > -->
  504. </a-form-item>
  505. <a-form-item
  506. label="目标成本"
  507. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  508. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  509. v-else-if="item.bidType != 1 && campaignBidType != '1'"
  510. >
  511. <!-- v-model="item.cpaBid" -->
  512. <a-input-number
  513. v-decorator="[
  514. 'cpaBid',
  515. {
  516. rules: [{ required: true, message: '目标成本必填' }, {validator: cpaBidCheck}],
  517. },]"
  518. style="width: 100%"
  519. >
  520. </a-input-number>
  521. <!-- <span style="color: red" v-if="item.showTipCheck">{{
  522. item.bidType == 1
  523. ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
  524. : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
  525. }}</span> -->
  526. <span
  527. style="color: red; font-weight: 700"
  528. v-if="item.ocpxActionType == 2 && getData('cpaBid') && getData('cpaBid') > 1"
  529. >
  530. 行为出价大于1元,请注意!!!
  531. </span>
  532. </a-form-item>
  533. <a-form-item
  534. label="深度转化出价"
  535. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  536. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  537. v-if="
  538. (item.ocpxActionType == 180 || item.ocpxActionType == 53) &&
  539. item.deepConversionType != ''&&
  540. campaignBidType != '1'
  541. "
  542. >
  543. <a-input-number
  544. v-model="item.deepConversionBid"
  545. @change="deep_conversion_bidTip(index)"
  546. :style="{ borderColor: item.deepConversionBidCheck ? 'red' : '#d9d9d9' }"
  547. style="width: 100%"
  548. :disabled="getData('cpaBid')==null||getData('cpaBid') == ''"
  549. ></a-input-number>
  550. <span style="color: red" v-if="item.deepConversionBidCheck"
  551. >深度转化目标成本必须高于优化目标成本</span
  552. >
  553. </a-form-item>
  554. <a-form-item
  555. label="广告组名称"
  556. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  557. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  558. >
  559. <!-- v-model="item.unitName" -->
  560. <a-input v-decorator="[
  561. 'unitName',
  562. {
  563. rules: [{ required: true, message: '广告组必填' }, {validator: handleConfirmValue}],
  564. },]" @change="checkGroup($event, index)" id="unitName"></a-input>
  565. <span style="color: red" v-if="item.unitNameCheck">广告组名称重复</span>
  566. <a-tag color="#2db7f5" @click="getChangeAll('序号', 'form', 'unitName')">+序号</a-tag>
  567. </a-form-item>
  568. <a-form-item
  569. v-if="showNumber"
  570. label="序号开始值"
  571. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  572. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  573. >
  574. <a-input-number
  575. :min="0"
  576. v-decorator="[
  577. 'startNumber',
  578. {
  579. rules: [{ required: true, message: '序号开始值必填' }],
  580. initialValue: 0,
  581. },
  582. ]"
  583. style="width: 150px"
  584. >
  585. </a-input-number>
  586. </a-form-item>
  587. </div>
  588. <div style="text-align: center; font-size: 16px">创意素材</div>
  589. <a-form-item
  590. label="素材类型"
  591. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  592. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  593. >
  594. <a-radio-group
  595. buttonStyle="solid"
  596. v-decorator="['creativeMaterialType', { initialValue: '1' }]"
  597. @change="changeType()"
  598. >
  599. <a-radio-button value="1">竖版视频</a-radio-button>
  600. <a-radio-button value="2">横版视频</a-radio-button>
  601. <!-- <a-radio-button value="4" v-if="JSON.parse(pane.sceneId).indexOf(7)>0">便利贴创意</a-radio-button> -->
  602. </a-radio-group>
  603. </a-form-item>
  604. <a-form-item
  605. label="创意标题"
  606. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  607. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  608. >
  609. <a-input
  610. v-decorator="[
  611. 'creativeName',
  612. {
  613. rules: [{ required: true, message: '创意标题必填' }],
  614. initialValue: '自定义创意_竖版视频',
  615. },
  616. ]"
  617. ></a-input>
  618. </a-form-item>
  619. <a-form-item
  620. label="创建类型"
  621. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  622. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  623. v-if="getData('unitType')=='4'"
  624. >
  625. <a-radio-group
  626. buttonStyle="solid"
  627. v-decorator="['createType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '0' }]"
  628. @change="getPageSize"
  629. >
  630. <a-radio-button value="0">单品</a-radio-button>
  631. <a-radio-button value="1">混搭</a-radio-button>
  632. </a-radio-group>
  633. </a-form-item>
  634. <a-form-item
  635. v-if="getData('unitType')=='7' || getData('createType')!='1'"
  636. :label="getData('unitType')=='7'?'视频数':'封面数'"
  637. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  638. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  639. >
  640. <a-input-number
  641. :max="getData('unitType')=='7'?10:15"
  642. :min="getData('unitType')=='7'?3:1"
  643. v-decorator="[
  644. 'imageCount',
  645. {
  646. rules: [{ required: true, message: '数量必填必填' }],
  647. initialValue: 5,
  648. },
  649. ]"
  650. style="width: 150px"
  651. >
  652. </a-input-number>
  653. </a-form-item>
  654. <a-form-item
  655. label="选择视频"
  656. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  657. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  658. >
  659. <a @click="getVideoList()">选择视频</a>
  660. {{ videoList.length + '/' + (getData('unitType')=='4'
  661. ?(getData('createType')=='0'?
  662. getData('createCount'):getData('createCount')*15)
  663. :getData('createCount')*getData('imageCount')) }}
  664. <br />
  665. <div v-if="videoList.length > 0 && showVideo" style="display:flex;flex-wrap:wrap">
  666. <span v-for="(item, index) of videoList" :key="index" style="position: relative" class="width-video">
  667. <a-icon type="close-circle" @click="deleteData(index, item)" style="position: absolute;right:0;color:red" />
  668. <img :src="item.coverUrl" controls="controls" style="width:100%" @click="matemalVideo(item)"></img>
  669. </span>
  670. </div>
  671. </a-form-item>
  672. <a-form-item
  673. label="广告语"
  674. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  675. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  676. >
  677. <!-- v-model.trim="allForm.description" -->
  678. <!-- @keyup="getData('description')?getData('description')=this.value.replace(/^ +| +$/g,'')" -->
  679. <!-- <a @click="showTitle()">推荐广告语</a> -->
  680. <div style="position:relative" v-for="(item, index) in descriptionList" :key="index">
  681. <a-textarea
  682. class="rending"
  683. placeholder="请输入广告语"
  684. @change="descriptionchange(item.value, index)"
  685. v-model="item.value"
  686. :autosize="{ minRows: 2, maxRows: 6 }"
  687. :max-length="30"
  688. style=" width: 80%;"
  689. ></a-textarea>
  690. <p
  691. style="
  692. font-size: 12px;
  693. color: #b6bbc7;
  694. letter-spacing: 0.3px;
  695. text-align: right;
  696. line-height: 30px;
  697. position: absolute;
  698. bottom: 0;
  699. left: 0;
  700. width: 80%;
  701. margin-bottom: 0;
  702. "
  703. >
  704. {{ item.value.length }}/30
  705. <!-- {{ getFormData('description').length }}/30 -->
  706. </p>
  707. <div style="position:absolute;right:0;top:-10px">
  708. <a-icon
  709. type="plus"
  710. @click="addDescription()"
  711. style="margin-right:15px"
  712. v-if="descriptionList.length < 10"
  713. />
  714. <a-icon
  715. type="minus"
  716. @click="removeDescription(index)"
  717. v-if="descriptionList.length > 1"
  718. />
  719. </div>
  720. </div>
  721. <a @click="cunTitle()">收藏</a>
  722. <a @click="showCunTitle()" style="margin-left: 10px">收藏列表</a>
  723. <!--
  724. <br />
  725. <a-tag v-for="(itemTag, indexTag) of tags" :key="indexTag" @click="getChange(item, itemTag, index)">{{
  726. itemTag.name
  727. }}</a-tag> -->
  728. </a-form-item>
  729. <a-form-item label="下载详情" v-if="showSite" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  730. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
  731. <a-select
  732. v-decorator="['siteId']"
  733. showSearch
  734. allowClear
  735. placeholder="选择应用下载详情页"
  736. optionFilterProp="children"
  737. :filterOption="filterOption"
  738. >
  739. <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
  740. {{ appModel.name }}
  741. </a-select-option>
  742. </a-select>
  743. </a-form-item>
  744. <a-form-item
  745. label="创意分类"
  746. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  747. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  748. v-if="creativeCategorySwitch"
  749. >
  750. <a-cascader
  751. :options="createOptions"
  752. v-decorator="['creativeCategory',{ rules: [{ required: true, message: '创意分类必选' }] }]"
  753. :fieldNames="fieldNames"
  754. placeholder="请选择创意分类"
  755. />
  756. </a-form-item>
  757. <a-form-item
  758. label="创意标签"
  759. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  760. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  761. v-if="creativeCategorySwitch"
  762. >
  763. <a-select
  764. mode="tags"
  765. style="width: 100%"
  766. placeholder="按回车生成标签"
  767. v-decorator="['creativeTag',{ rules: [{ required: true, message: '创意标签必填' }] }]"
  768. dropdownClassName="display-none-selset"
  769. :token-separators="[',', ' ', ',']"
  770. >
  771. </a-select>
  772. <span v-if="getData('creativeTag') && getData('creativeTag').length > 10" style="color: red"
  773. >创意标签最多填写10个,请删减</span>
  774. <br />
  775. <a-popconfirm @confirm="getInfo()">
  776. <div slot="title">
  777. <div>
  778. 分类名称:
  779. <a-input placeholder="请输入" v-model="tagName" style="display: inline-block; width: 300px" />
  780. </div>
  781. </div>
  782. <a style="margin-right: 10px" :disabled="!getData('creativeTag')">收藏</a>
  783. </a-popconfirm>
  784. <a @click="showCunTag('creativeTag')">收藏列表</a>
  785. </a-form-item>
  786. <a-form-item
  787. label="行动号召"
  788. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  789. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  790. >
  791. <a-select
  792. v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
  793. showSearch
  794. allowClear
  795. placeholder="选择行动号召按钮文案"
  796. optionFilterProp="children"
  797. :filterOption="filterOption"
  798. >
  799. <a-select-option v-for="appModel in actionBarTextList" :key="appModel.id" :value="appModel.actionBarText">
  800. {{ appModel.actionBarText }}
  801. </a-select-option>
  802. </a-select>
  803. </a-form-item>
  804. <a-form-item
  805. label="下载详情"
  806. v-if="showSite"
  807. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  808. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  809. >
  810. <a-select
  811. v-decorator="['siteId']"
  812. showSearch
  813. allowClear
  814. placeholder="选择应用下载详情页"
  815. optionFilterProp="children"
  816. :filterOption="filterOption"
  817. >
  818. <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
  819. {{ appModel.name }}
  820. </a-select-option>
  821. </a-select>
  822. </a-form-item>
  823. <a-form-item
  824. label="第三方点击监测链接"
  825. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  826. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  827. >
  828. <a-input v-decorator="['clickTrackUrl']" placeholder="请输入第三方检测链接"> </a-input>
  829. <a
  830. v-if="getData('clickTrackUrl')"
  831. @click="
  832. clickTrackUrlShow = true
  833. clickTrackUrlShowType == '1'
  834. "
  835. style="margin-right: 10px"
  836. >收藏监测链接</a
  837. >
  838. <a
  839. @click="
  840. getClickTrackUrlList('1')
  841. clickTrackUrlShowType = '1'
  842. "
  843. >监测链接列表</a
  844. >
  845. </a-form-item>
  846. <a-form-item
  847. label="第三方ActionBar点击监控链接"
  848. :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
  849. :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
  850. v-if="actionbarClickUrlSwitch"
  851. >
  852. <a-input v-decorator="['actionbarClickUrl']" placeholder="请输入第三方点击监控链接"> </a-input>
  853. <span style="color: red; position: relative; top: -10px">仅加白使用</span>
  854. <br />
  855. <a
  856. v-if="getData('actionbarClickUrl')"
  857. @click="
  858. clickTrackUrlShow = true
  859. clickTrackUrlShowType = '2'
  860. "
  861. style="margin-right: 10px; position: relative; top: -20px"
  862. >收藏监测链接</a
  863. >
  864. <a
  865. @click="
  866. getClickTrackUrlList('2')
  867. clickTrackUrlShowType = '2'
  868. "
  869. style="margin-right: 10px; position: relative; top: -20px"
  870. >监测链接列表</a
  871. >
  872. </a-form-item>
  873. <a-form-item :wrapperCol="{ span: 20 }" style="text-align: center">
  874. <a-button htmlType="submit" type="primary" :loading="loading">确定</a-button>
  875. <!-- <a-button style="margin-left: 8px" @click="prevStep" v-show="step == 1">上一步</a-button> -->
  876. </a-form-item>
  877. </a-form>
  878. <a-modal v-model="visible" title="广告组创建信息">
  879. <div>创建成功:{{ allForm.success }}条</div>
  880. <template slot="footer">
  881. <a-button key="submit" type="primary" @click="handleOk"> 返回列表 </a-button>
  882. </template>
  883. </a-modal>
  884. <templateModal ref="templateModal" @getData="getTemplateList" />
  885. <a-modal title="查看视频" v-model="visibleVideo" :width="400" :footer="null">
  886. <video class="video" :src="videoUrlShow" controls="controls" style="width: 100%">
  887. 您的浏览器不支持 video 标签。
  888. </video>
  889. </a-modal>
  890. <a-modal
  891. :maskClosable="false"
  892. title="选择素材"
  893. v-model="visibleMatemal"
  894. @ok="handleOkShow"
  895. @cancel="cancelAll"
  896. :width="1000"
  897. >
  898. <a-row :gutter="24">
  899. <a-col :span="8">
  900. <a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
  901. <a-radio-group v-model="mediaDimension" style="width: 300px">
  902. <a-radio-button value="a">按时间查询</a-radio-button>
  903. <a-radio-button value="b">按消耗查询</a-radio-button>
  904. </a-radio-group>
  905. </a-form-item>
  906. </a-col>
  907. <a-col :span="8" v-if="mediaDimension == 'a'">
  908. <a-form-item label="日期选择" :labelCol="labelCol" :wrapperCol="wrapperCol">
  909. <a-range-picker name="buildTime" v-model="time" />
  910. </a-form-item>
  911. </a-col>
  912. <a-col :span="8" v-else>
  913. <a-form-item label="消耗时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
  914. <a-select v-model="costType" placeholder="请选择消耗时间" style="width: 100%">
  915. <a-select-option :value="1">昨天</a-select-option>
  916. <a-select-option :value="2">近七天</a-select-option>
  917. <a-select-option :value="3">近14天</a-select-option>
  918. <a-select-option :value="4">近一个月</a-select-option>
  919. <a-select-option :value="5">近三个月</a-select-option>
  920. <a-select-option :value="6">近半年</a-select-option>
  921. <a-select-option :value="7">近一年</a-select-option>
  922. <a-select-option :value="8">全部</a-select-option>
  923. </a-select>
  924. </a-form-item>
  925. </a-col>
  926. <a-col :span="8">
  927. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol">
  928. 当前选择数量
  929. {{ sumContent + '/' + (getData('unitType')=='4'?(getData('createType')=='0'?getData('createCount'):getData('createCount')*15):getData('createCount')*getData('imageCount') )}}
  930. <a-button type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px" v-if="mediaDimension == 'a'">
  931. 刷新素材</a-button>
  932. </a-form-item>
  933. </a-col>
  934. </a-row>
  935. <a-row :gutter="24">
  936. <a-col :span="8">
  937. <a-form-item label="视频ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
  938. <a-input placeholder="请输入视频ID" v-model="photoId"/>
  939. </a-form-item>
  940. </a-col>
  941. <a-col :span="8">
  942. <a-form-item label="视频名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
  943. <a-input placeholder="请输入视频名称" v-model="photoName"/>
  944. </a-form-item>
  945. </a-col>
  946. <a-col :span="8" v-if="mediaDimension == 'a'">
  947. <a-form-item label="唯一标识" :labelCol="labelCol" :wrapperCol="wrapperCol">
  948. <a-input placeholder="请输入唯一标识,多个以,隔开" v-model="md5Str"/>
  949. </a-form-item>
  950. </a-col>
  951. <a-col :span="4">
  952. <a-button style="position: relative;top: 4px;" @click="selectAllVideo">
  953. 全选
  954. </a-button>
  955. <a-button type="primary" style="position: relative;top: 4px;margin-left:5px" @click="searchVideo">
  956. 搜索
  957. </a-button>
  958. </a-col>
  959. <!-- <a-col :span="12">
  960. <a-form-item label="筛选条件" :labelCol="labelCol" :wrapperCol="wrapperCol">
  961. <a-select v-model="orderBy" style="width: 100%">
  962. <a-select-option value="time"> 按时间排序 </a-select-option>
  963. <a-select-option value="cost"> 按消耗排序</a-select-option>
  964. </a-select>
  965. </a-form-item>
  966. </a-col> -->
  967. </a-row>
  968. <ul v-if="dataSource.length > 0" style="overflow: auto; padding-left: 0;margin-top:10px">
  969. <a-checkbox-group v-model="checkVideo" style="width: 100%" @change="setData">
  970. <li v-for="(item, index) of dataSource" :key="index" class="chouzhen" style="height: 400px">
  971. <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
  972. 您的浏览器不支持 video 标签。
  973. </video> -->
  974. <a-checkbox
  975. :value="item.photoId"
  976. style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0; max-height: 80%;overflow: hidden;"
  977. >
  978. <img :src="item.coverUrl" alt="" style="width: 90%; margin-bottom: 30px" />
  979. </a-checkbox>
  980. <div style="position: absolute; z-index: 100; bottom: 35px;width:100%;left:0">
  981. <div style="width: 100%; text-align: center">
  982. {{ item.statDate&&item.channelType == 0 ?
  983. '内部 ' + item.statDate.split(' ')[0]:item.statDate&&item.channelType == 1 ?
  984. '素造 ' + item.statDate.split(' ')[0]: item.charge&&item.channelType == 0?
  985. '内部 ' + item.charge :'素造 ' + item.charge}}
  986. </div>
  987. </div>
  988. <a @click="matemalVideo(item, index)" style="position: absolute; z-index: 100; right: 0; bottom: 5px;width:100%;text-align:center"
  989. >查看视频</a
  990. >
  991. </li>
  992. </a-checkbox-group>
  993. </ul>
  994. <div v-else style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center">
  995. <img
  996. src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
  997. alt=""
  998. v-if="!loadingVideoList"
  999. />
  1000. <img v-else src="@/views/modules/material/loading.gif" />
  1001. </div>
  1002. <!-- <a-button slot="tabBarExtraContent" type="primary" @click="tongbu()" :loading="tongbuLoading">
  1003. 刷新素材</a-button
  1004. > -->
  1005. </a-tabs>
  1006. <div style="text-align: right">
  1007. <a-pagination
  1008. size="small"
  1009. :showTotal="ipagination.showTotal"
  1010. style="float: right"
  1011. v-if="dataSource.length > 0"
  1012. showQuickJumper
  1013. :pageSize.sync="ipagination.pageSize"
  1014. :total="ipagination.total"
  1015. v-model="ipagination.current"
  1016. @change="getDataSource"
  1017. />
  1018. </div>
  1019. </a-modal>
  1020. <a-modal :title="clickTrackUrlShowType=='3'?'调起链接名称':clickTrackUrlShowType=='4'?'链接名称':'监测链接名称'" v-model="clickTrackUrlShow">
  1021. <template slot="footer">
  1022. <a-button
  1023. key="submit"
  1024. :disabled="trackUrlName == '' && !showTrackUrlNameElse"
  1025. type="primary"
  1026. @click="clickTrackUrlOk"
  1027. >
  1028. 确定
  1029. </a-button>
  1030. </template>
  1031. <a-input :placeholder="clickTrackUrlShowType=='3'?'调起链接名称':clickTrackUrlShowType=='4'?'链接名称':'监测链接名称'" v-model="trackUrlName" @blur="changeTrackUrlName" style="width: 100%" />
  1032. <span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
  1033. </a-modal>
  1034. <a-modal :title="clickTrackUrlShowType=='3'?'调起链接列表':clickTrackUrlShowType=='4'?'链接列表':'监测链接列表'" v-model="clickTrackUrlList" :width="1000" :footer="null">
  1035. <a-spin :spinning="spinning">
  1036. <a-row :gutter="10" class="onlny-click-track">
  1037. <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
  1038. <a-card class="search-box" style="over-flow: auto">
  1039. <!-- <a-input v-model="trackName"></a-input> -->
  1040. <a-input-search
  1041. placeholder="请输入名称"
  1042. enter-button="Search"
  1043. size="large"
  1044. @search="onSearch"
  1045. style="width: 40%; margin-bottom: 20px"
  1046. v-model="trackName"
  1047. />
  1048. <a-list size="large" bordered :dataSource="trackUrlList">
  1049. <a-list-item slot="renderItem" slot-scope="item" :title="item.trackUrl" style="line-height: 50px">
  1050. <div slot="actions">
  1051. <a @click="okClickTrackUrl(item)">选择</a>
  1052. <a-divider type="vertical" />
  1053. <a @click="removeClickTrackUrl(item)">删除</a>
  1054. </div>
  1055. {{ item.trackName }}
  1056. <a-input v-model="item.trackUrl" readOnly style="margin: 10px; width: 70%"></a-input>
  1057. </a-list-item>
  1058. </a-list>
  1059. </a-card>
  1060. </a-col>
  1061. </a-row>
  1062. </a-spin>
  1063. </a-modal>
  1064. <a-modal title="收藏标题" v-model="creativeTagVisible" :width="1000" @ok="okTag">
  1065. <el-tree :data="optionsTag" show-checkbox node-key="id" :props="defaultProps" :check-strictly="true" ref="tree">
  1066. </el-tree>
  1067. </a-modal>
  1068. <a-modal title="推荐标题" v-model="titleVisible" :width="1000" :footer="null">
  1069. <a-row :gutter="10">
  1070. <a-col :sm="10" style="margin-bottom: 20px; z-index: 10">
  1071. <a-card class="search-box" style="min-height: 500px">
  1072. <div style="margin-bottom: 30px">
  1073. <span style="display: inline-block; width: 80px">行业</span>
  1074. <a-cascader
  1075. style="margin-top: 1rem; width: 300px"
  1076. v-model="dataOne"
  1077. :options="options"
  1078. :showSearch="{ filter }"
  1079. expandTrigger="hover"
  1080. @change="onChangeTitle"
  1081. placeholder="请选择行业"
  1082. >
  1083. <a-icon type="smile" slot="suffixIcon" class="test" />
  1084. </a-cascader>
  1085. </div>
  1086. <div style="margin-bottom: 30px">
  1087. <span style="display: inline-block; width: 80px">关键词</span>
  1088. <a-input placeholder="请输入关键词" v-model="value" style="width: 300px" />
  1089. </div>
  1090. <span style="display: inline-block; width: 80px; float: left"></span>
  1091. <a-button type="primary" @click="searchQuery" :disabled="value == ''">生成</a-button>
  1092. </a-card>
  1093. </a-col>
  1094. <a-col :sm="14" style="margin-bottom: 20px; z-index: 10">
  1095. <a-card class="search-box" style="over-flow: auto">
  1096. <a-list size="large" bordered :dataSource="title">
  1097. <a-list-item slot="renderItem" slot-scope="item">
  1098. <a slot="actions" @click="okTitle(item)">选择</a>
  1099. {{ item }}
  1100. </a-list-item>
  1101. </a-list>
  1102. </a-card>
  1103. </a-col>
  1104. </a-row>
  1105. </a-modal>
  1106. <a-modal title="收藏标题" v-model="cunTitleVisible" :width="1000" :footer="null">
  1107. <a-row :gutter="10">
  1108. <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
  1109. <a-card class="search-box" style="over-flow: auto">
  1110. <a-list size="large" bordered :dataSource="cunTitleList">
  1111. <a-list-item slot="renderItem" slot-scope="item">
  1112. <div slot="actions">
  1113. <a @click="okTitleCun(item)">选择</a>
  1114. <a-divider type="vertical" />
  1115. <a @click="removeTitleCun(item)">删除</a>
  1116. </div>
  1117. {{ item.title }}
  1118. </a-list-item>
  1119. </a-list>
  1120. </a-card>
  1121. </a-col>
  1122. </a-row>
  1123. </a-modal>
  1124. <a-modal title="选择商品" v-model="libraryVisible" :width="1000"
  1125. @ok="libraryVisible = false;outerShowId=outerId;libraryPage.current=1;libraryName=null"
  1126. @cancel="libraryVisible = false;libraryList=[];outerId=undefined;libraryPage.current=1;libraryName=null">
  1127. <a-row :gutter="24">
  1128. <a-col :span="10">
  1129. <a-input-search
  1130. placeholder="请输入产品名称"
  1131. enter-button="搜索"
  1132. size="large"
  1133. @search="libraryPage.current=1;getProductList()"
  1134. style="width: 100%; margin-bottom: 20px"
  1135. v-model="libraryName"
  1136. />
  1137. </a-col>
  1138. </a-row>
  1139. <a-card style="width:100%">
  1140. <a-radio-group v-model="outerId">
  1141. <a-card-grid style="width: 25%;" :hoverable="false" v-for="(item, index) in libraryList" :key="index">
  1142. <a-radio :value="item.outer_id+'@'+item.product_id+'@'+item.product_name"><h3>{{item.product_name}}</h3>
  1143. <p>ID:{{item.outer_id}}</p></a-radio>
  1144. </a-card-grid>
  1145. </a-radio-group>
  1146. </a-card>
  1147. <div style="text-align: right">
  1148. <a-pagination
  1149. size="small"
  1150. :showTotal="libraryPage.showTotal"
  1151. style="float: right"
  1152. v-if="libraryList.length > 0"
  1153. showQuickJumper
  1154. :pageSize.sync="libraryPage.pageSize"
  1155. :total="libraryPage.total"
  1156. v-model="libraryPage.current"
  1157. @change="getProductList"
  1158. />
  1159. </div>
  1160. </a-modal>
  1161. </a-card>
  1162. </template>
  1163. <script>
  1164. import { getAction, postAction, deleteAction } from '@/api/manage'
  1165. import moment from 'moment'
  1166. import { mapGetters } from 'vuex'
  1167. import jq from 'jquery'
  1168. import selectCheckAll from '@/views/modules/kuaishouapp/account/stepForm/stepModule/test'
  1169. import templateModal from '@/views/modules/kuaishouapp/crossAccount/templateModal'
  1170. import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
  1171. let dateQuantumRangeConst = ''
  1172. const columns = [
  1173. {
  1174. title: '人群',
  1175. dataIndex: 'orientationName',
  1176. scopedSlots: {
  1177. customRender: 'orientationName',
  1178. },
  1179. width: 150,
  1180. },
  1181. {
  1182. title: '属性',
  1183. dataIndex: 'populationType',
  1184. filters: [
  1185. {
  1186. text: '上传人群',
  1187. value: '1',
  1188. },
  1189. {
  1190. text: '广告人群',
  1191. value: '2',
  1192. },
  1193. {
  1194. text: '主题专区',
  1195. value: '3',
  1196. },
  1197. {
  1198. text: '逻辑规则',
  1199. value: '4',
  1200. },
  1201. {
  1202. text: '人群扩展',
  1203. value: '5',
  1204. },
  1205. {
  1206. text: '平台定制',
  1207. value: '6',
  1208. },
  1209. {
  1210. text: '定制付费',
  1211. value: '7',
  1212. },
  1213. {
  1214. text: '网红粉丝类别',
  1215. value: '8',
  1216. },
  1217. {
  1218. text: '内容付费行为',
  1219. value: '9',
  1220. },
  1221. {
  1222. text: '移动应用安装',
  1223. value: '10',
  1224. },
  1225. {
  1226. text: '快手使用活跃度',
  1227. value: '11',
  1228. },
  1229. {
  1230. text: '行业分类',
  1231. value: '12',
  1232. },
  1233. {
  1234. text: '商业兴趣',
  1235. value: '13',
  1236. },
  1237. {
  1238. text: '固化标签',
  1239. value: '14',
  1240. },
  1241. {
  1242. text: '行业偏好',
  1243. value: '15',
  1244. },
  1245. {
  1246. text: '第三方标签',
  1247. value: '16',
  1248. },
  1249. {
  1250. text: '产品关键词',
  1251. value: '17',
  1252. },
  1253. ],
  1254. onFilter: (value, record) => record.populationType.toString().toLowerCase().includes(value.toLowerCase()),
  1255. scopedSlots: {
  1256. customRender: 'populationType',
  1257. },
  1258. width: 150,
  1259. },
  1260. {
  1261. title: '创建时间',
  1262. dataIndex: 'createTime',
  1263. scopedSlots: {
  1264. customRender: 'createTime',
  1265. },
  1266. sorter: (a, b) => a.createTime - b.createTime,
  1267. },
  1268. ]
  1269. function tqFun(qcArr1) {
  1270. var tempArr = []
  1271. function bbFun(qcArr) {
  1272. for (var i = 0; i < qcArr.length; i++) {
  1273. if (qcArr[i] instanceof Array) {
  1274. bbFun(qcArr[i])
  1275. } else {
  1276. tempArr.push(qcArr[i])
  1277. }
  1278. }
  1279. return tempArr
  1280. }
  1281. return bbFun(qcArr1)
  1282. }
  1283. export default {
  1284. name: 'creat-unit',
  1285. components: {
  1286. selectCheckAll,
  1287. templateModal,
  1288. checkBoxGroup,
  1289. },
  1290. props: {
  1291. campaignId: {
  1292. type: String,
  1293. default() {
  1294. return null
  1295. },
  1296. },
  1297. },
  1298. data() {
  1299. return {
  1300. descriptionList: [{value:''}],
  1301. showNumber:false,
  1302. md5Str:'',
  1303. photoId:'',
  1304. photoName:'',
  1305. costType: 1,
  1306. uriCheck: false,
  1307. templateLoading: false,
  1308. dataOne: [],
  1309. actionBarTextList: [],
  1310. trackName: '',
  1311. trackUrlList: [],
  1312. showSite: false,
  1313. appList: [],
  1314. siteList: [],
  1315. createOptions: [],
  1316. fieldNames: {
  1317. label: 'category_name',
  1318. value: 'category_id',
  1319. children: 'child',
  1320. },
  1321. defaultProps: {
  1322. children: 'children',
  1323. label: 'label',
  1324. id: 'id',
  1325. },
  1326. showTrackUrlNameElse: true,
  1327. clickTrackUrlList: false,
  1328. spinning: false,
  1329. trackUrlName: '',
  1330. tagName: '',
  1331. labelCol: {
  1332. lg: {
  1333. span: 6,
  1334. },
  1335. sm: {
  1336. span: 6,
  1337. },
  1338. xs: {
  1339. span: 6,
  1340. },
  1341. md: {
  1342. span: 6,
  1343. },
  1344. },
  1345. wrapperCol: {
  1346. lg: {
  1347. span: 18,
  1348. },
  1349. sm: {
  1350. span: 18,
  1351. },
  1352. xs: {
  1353. span: 14,
  1354. },
  1355. md: {
  1356. span: 14,
  1357. },
  1358. },
  1359. ipagination: {
  1360. current: 1,
  1361. pageSize: 10,
  1362. // pageSizeOptions: ['10', '20', '30'],
  1363. showTotal: (total, range) => {
  1364. return range[0] + '-' + range[1] + ' 共' + total + '条'
  1365. },
  1366. showQuickJumper: true,
  1367. // showSizeChanger: true,
  1368. total: 0,
  1369. onChange: (current) => {
  1370. // 切换分页时的回调,
  1371. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  1372. this.ipagination.current = current
  1373. },
  1374. },
  1375. showVideo: true,
  1376. videoList: [],
  1377. orderBy: 'time',
  1378. mediaDimension: 'a',
  1379. visibleMatemal: false,
  1380. loadingVideoList: false,
  1381. checkVideo: [],
  1382. checkVideoAll: [],
  1383. checkVideoWai: [],
  1384. checkVideoWhole: [],
  1385. dataSource: [],
  1386. active: 0,
  1387. time: [],
  1388. channelType: 0,
  1389. creativeMaterialType: '',
  1390. tab: [
  1391. // {
  1392. // value: 2,
  1393. // label: '全部',
  1394. // },
  1395. {
  1396. value: 0,
  1397. label: '内部',
  1398. },
  1399. {
  1400. value: 1,
  1401. label: '外部',
  1402. },
  1403. ],
  1404. templateList: [],
  1405. allianceAccount: false,
  1406. creativeCategorySwitch: false,
  1407. actionbarClickUrlSwitch: false,
  1408. tongbuLoading: false,
  1409. convert: false,
  1410. convertId: '',
  1411. convertList: [],
  1412. checkedTrue: false,
  1413. nameValue: '',
  1414. visible: false,
  1415. timeRange: [],
  1416. form: this.$form.createForm(this),
  1417. step: 0,
  1418. people: '2',
  1419. targeted: '2',
  1420. topMiddle: false,
  1421. topMiddleNo: false,
  1422. keyValue: '',
  1423. keyValueNo: '',
  1424. columns,
  1425. selectedRowKeys: [],
  1426. selectedRowKeysValue: [],
  1427. selectedRowKeysNo: [],
  1428. selectedRowKeysValueNo: [],
  1429. data: [],
  1430. populationData: {},
  1431. url: {
  1432. insertTemplateUrl: '/kuaishou/create/createGroups',
  1433. userAllocationList: '/ctop/userAllocation/list',
  1434. campaignList: '/kuaishou/kuaiShouCampaignTemplate/list',
  1435. getDeepConversionUrl: '/kuaishou/kuaiShouConversionTypes/getIsActivate',
  1436. getCampaignTemplate: '/kuaishou/kuaiShouCampaignTemplate/getKuaiShouCampaignTemplate',
  1437. appListUrl: '/kuaishou/kuaiShouCreateAppTemplate/list',
  1438. },
  1439. appList: [],
  1440. appId: '',
  1441. loading: false,
  1442. campaignTemplateId: '',
  1443. campaignType: null,
  1444. campaignBidType: null,
  1445. maxBid: 0,
  1446. allForm: {
  1447. dayBudget: '0',
  1448. time: '1',
  1449. scheduleTime: '1',
  1450. scheduleTimeData:
  1451. '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
  1452. group: [],
  1453. groupTypeData: null,
  1454. fail: [],
  1455. success: [],
  1456. sceneId: [1],
  1457. appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'],
  1458. allianceAccount: '1',
  1459. description: '',
  1460. },
  1461. convertType: '1',
  1462. convertAllList: [],
  1463. dataList: [],
  1464. clickTrackUrlShow: false,
  1465. clickTrackUrlShowType: '1',
  1466. optionsTag: [],
  1467. creativeTagVisible: false,
  1468. visibleVideo: false,
  1469. videoUrlShow: '',
  1470. sumContent: 0,
  1471. titleVisible: false,
  1472. options: [],
  1473. value: '',
  1474. title: [],
  1475. cunTitleVisible: false,
  1476. cunTitleList: [],
  1477. createCount: 0,
  1478. tongbuLoading: false,
  1479. ocpxActionList: [],
  1480. deepTypesList: [],
  1481. libraryVisible:false,
  1482. isLibrary:false,
  1483. libraryId:null,
  1484. libraryName:null,
  1485. libraryList:[],
  1486. outerId:undefined,
  1487. outerShowId:undefined,
  1488. libraryPage:{
  1489. current: 1,
  1490. pageSize: 8,
  1491. // pageSizeOptions: ['10', '20', '30'],
  1492. showTotal: (total, range) => {
  1493. return range[0] + '-' + range[1] + ' 共' + total + '条'
  1494. },
  1495. showQuickJumper: true,
  1496. // showSizeChanger: true,
  1497. total: 0,
  1498. onChange: (current) => {
  1499. // 切换分页时的回调,
  1500. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  1501. this.libraryPage.current = current
  1502. },
  1503. },
  1504. }
  1505. },
  1506. computed: {
  1507. count() {
  1508. return moment().startOf('day')
  1509. },
  1510. },
  1511. filters: {
  1512. getDate(value) {
  1513. let date = new Date(value)
  1514. let y = date.getFullYear()
  1515. let MM = date.getMonth() + 1
  1516. MM = MM < 10 ? '0' + MM : MM
  1517. let d = date.getDate()
  1518. d = d < 10 ? '0' + d : d
  1519. return y + '-' + MM + '-' + d
  1520. },
  1521. platform(str) {
  1522. var data = {
  1523. 1: 'Android应用下载',
  1524. 2: 'Android网页游戏',
  1525. 3: 'iOS应用下载',
  1526. 4: 'iOS网页游戏',
  1527. }
  1528. return data[str]
  1529. },
  1530. },
  1531. methods: {
  1532. getOcpxActionList(value){
  1533. var params = {}
  1534. params.accountId = localStorage.getItem('campaignAccountId')
  1535. params.sceneCategory = 0
  1536. params.campaignType = localStorage.getItem('campaignType')
  1537. params.sceneIds = this.allForm.allianceAccount == '1' ? this.allForm.sceneId : [5]
  1538. params.appId = value?value:null
  1539. var url = '/kuaishou/batch/conversionInfos'
  1540. if(this.campaignBidType == '1'){
  1541. url = '/kuaishou/batch/mcbConversionInfos'
  1542. }
  1543. this.postDataAction(url, params).then(res=>{
  1544. if(res.success){
  1545. this.ocpxActionList = res.result.data.ocpx_types
  1546. }
  1547. })
  1548. },
  1549. getDeepTypesList(data){
  1550. if(!!data){
  1551. var params = {}
  1552. params.accountId = localStorage.getItem('campaignAccountId')
  1553. params.sceneCategory = 0
  1554. params.campaignType = localStorage.getItem('campaignType')
  1555. params.sceneIds = this.allForm.allianceAccount == '1' ? this.allForm.sceneId : [5]
  1556. params.appId = this.getData('appId')
  1557. params.ocpxActionType = data
  1558. this.postDataAction('/kuaishou/batch/deepTypes', params).then(res=>{
  1559. if(res.success){
  1560. this.deepTypesList = res.result.data.deep_types
  1561. }
  1562. })
  1563. }else{
  1564. this.deepTypesList = []
  1565. }
  1566. },
  1567. descriptionchange(val, index) {
  1568. this.$nextTick(() => {
  1569. this.descriptionList[index].value = val.replace(/\s*/g, '').trim()
  1570. })
  1571. },
  1572. addDescription() {
  1573. this.descriptionList.push({ value: '' })
  1574. },
  1575. removeDescription(index) {
  1576. this.descriptionList.splice(index, 1)
  1577. },
  1578. searchVideo() {
  1579. let url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
  1580. let params = {}
  1581. // localStorage.getItem('campaignAccountId')
  1582. params.accountId = localStorage.getItem('campaignAccountId')
  1583. params.pageSize = this.ipagination.pageSize
  1584. params.pageNo = this.ipagination.current
  1585. params.status = 0
  1586. params.photoId = this.photoId
  1587. params.photoName = this.photoName
  1588. params.materialType =this.creativeMaterialType
  1589. if(this.mediaDimension == 'a'){
  1590. url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
  1591. params.signatures = this.md5Str
  1592. if (this.time.length > 0) {
  1593. // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
  1594. // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
  1595. params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
  1596. params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
  1597. }
  1598. }else if(this.mediaDimension == 'b'){
  1599. url = '/kuaishou/kuaiShouVideoGet/getVideoListByCostType'
  1600. params.costType = this.costType
  1601. }
  1602. // params.materialType = this.creativeMaterialType
  1603. // params.channelType = this.channelType
  1604. // params.orderBy = this.orderBy
  1605. this.showVideoList(url, params)
  1606. },
  1607. tongbu() {
  1608. this.tongbuLoading = true
  1609. getAction('/kuaishou/batch/syncVideo', {
  1610. accountId: localStorage.getItem('campaignAccountId'),
  1611. }).then((res) => {
  1612. if (res.success) {
  1613. this.$message.success(res.message)
  1614. this.tongbuLoading = false
  1615. this.searchVideo()
  1616. } else {
  1617. this.$message.error(res.message)
  1618. this.tongbuLoading = false
  1619. }
  1620. })
  1621. },
  1622. removeTitleCun(item) {
  1623. deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
  1624. id: item.id,
  1625. }).then((res) => {
  1626. if (res.success) {
  1627. this.getCunTitle()
  1628. }
  1629. })
  1630. },
  1631. okTitleCun(item) {
  1632. this.allForm.description = item.title
  1633. // this.form.setFieldsValue({
  1634. // description: item.title,
  1635. // })
  1636. if (this.descriptionList[0].value == '') {
  1637. this.descriptionList = [{value:item.title}]
  1638. } else {
  1639. for (let index = 0; index < this.descriptionList.length; index++) {
  1640. if (this.descriptionList[index].value == '') {
  1641. this.descriptionList.splice(index, 1)
  1642. }
  1643. }
  1644. if(this.descriptionList.length<=9){
  1645. this.descriptionList.push({value:item.title})
  1646. }
  1647. }
  1648. this.cunTitleVisible = false
  1649. this.cunTitleList = []
  1650. },
  1651. cunTitle() {
  1652. let isNotComplete = this.descriptionList.findIndex(item => {
  1653. return item.value === ''
  1654. })
  1655. if (isNotComplete > -1) {
  1656. this.$message.error('广告语未填,不可收藏')
  1657. return
  1658. }
  1659. var params = {}
  1660. params.accountId = localStorage.getItem('campaignAccountId')
  1661. params.userId = this.userInfo().id
  1662. params.titles = this.descriptionList.map(item=>{
  1663. return item.value
  1664. })
  1665. postAction('/kuaishou/kuaiShouTitleCollection/addMore', params).then((res) => {
  1666. if (res.success) {
  1667. this.$message.success('收藏成功')
  1668. } else {
  1669. this.$message.error(res.message)
  1670. }
  1671. })
  1672. },
  1673. showCunTitle() {
  1674. this.cunTitleVisible = true
  1675. this.getCunTitle()
  1676. },
  1677. getCunTitle() {
  1678. var params = {}
  1679. params.accountId = localStorage.getItem('campaignAccountId')
  1680. params.userId = this.userInfo().id
  1681. params.pageNo = 1
  1682. params.pageSize = 500
  1683. getAction('/kuaishou/kuaiShouTitleCollection/list', params).then((res) => {
  1684. if (res.success) {
  1685. this.cunTitleList = res.result.records
  1686. }
  1687. })
  1688. },
  1689. okTitle(item) {
  1690. this.allForm.description = item
  1691. this.$nextTick(() => {
  1692. if (this.descriptionList[0].value == '') {
  1693. this.descriptionList = [{value:item}]
  1694. } else {
  1695. for (let index = 0; index < this.descriptionList.length; index++) {
  1696. if (this.descriptionList[index].value == '') {
  1697. this.descriptionList.splice(index, 1)
  1698. }
  1699. }
  1700. if(this.descriptionList.length<=9){
  1701. this.descriptionList.push({value:item})
  1702. }
  1703. }
  1704. })
  1705. this.titleVisible = false
  1706. this.dataOne = []
  1707. this.value = ''
  1708. this.title = []
  1709. },
  1710. searchQuery() {
  1711. // /ctop/creativeTitle/titleSuggestion
  1712. getAction('/ctop/creativeTitle/titleSearch', {
  1713. firstCategory: this.dataOne[0],
  1714. secondCategory: this.dataOne[1],
  1715. keywords: this.value,
  1716. }).then((res) => {
  1717. console.log(res)
  1718. this.title = res.result ? res.result : []
  1719. })
  1720. // firstCategory,secondCategory,keywords
  1721. },
  1722. onChangeTitle(value, selectedOptions) {
  1723. this.dataOne = value
  1724. this.value = ''
  1725. this.title = []
  1726. },
  1727. filter(inputValue, path) {
  1728. return path.some((option) => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
  1729. },
  1730. showTitle() {
  1731. this.titleVisible = true
  1732. this.getHangye()
  1733. },
  1734. getHangye() {
  1735. getAction('/ctop/creativeTitle/getTitleLabel', '').then((res) => {
  1736. if (res.success) {
  1737. this.options = res.result.map((item) => {
  1738. return {
  1739. label: item.label,
  1740. value: item.value,
  1741. children:
  1742. item.children.length > 0
  1743. ? [
  1744. {
  1745. label: '不限',
  1746. value: 0,
  1747. },
  1748. ].concat(item.children)
  1749. : [
  1750. {
  1751. label: '不限',
  1752. value: 0,
  1753. },
  1754. ],
  1755. }
  1756. })
  1757. this.options = [
  1758. {
  1759. label: '不限',
  1760. value: 0,
  1761. },
  1762. ].concat(this.options)
  1763. if (this.dataOne.length > 0) {
  1764. return
  1765. } else {
  1766. this.dataOne = [0]
  1767. }
  1768. }
  1769. })
  1770. },
  1771. matemalVideo(item) {
  1772. this.visibleVideo = true
  1773. this.videoUrlShow = item.url
  1774. },
  1775. showCunTag(type) {
  1776. this.creativeTagVisible = true
  1777. var params = {}
  1778. params.accountId = localStorage.getItem('campaignAccountId')
  1779. params.userId = this.userInfo().id
  1780. params.pageSize = 1000
  1781. params.pageNo = 1
  1782. getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
  1783. if (res.success) {
  1784. // console.log(res.result)
  1785. this.optionsTag = res.result.records.map((item) => {
  1786. return {
  1787. id: item.id,
  1788. label: item.tagName,
  1789. children: JSON.parse(item.tagArray).map((item) => {
  1790. return {
  1791. id: item,
  1792. label: item,
  1793. disabled: true,
  1794. }
  1795. }),
  1796. }
  1797. })
  1798. }
  1799. })
  1800. },
  1801. okTag() {
  1802. var data = this.$refs.tree.getCheckedKeys()
  1803. if (data.length > 1) {
  1804. this.$message.error('只能选择一个选项')
  1805. // this.$refs.tree.setCheckedKeys([]);
  1806. } else {
  1807. var params = {}
  1808. params.accountId = localStorage.getItem('campaignAccountId')
  1809. params.userId = this.userInfo().id
  1810. params.pageSize = 1000
  1811. params.pageNo = 1
  1812. params.id = data[0]
  1813. getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
  1814. if (res.success) {
  1815. // console.log(res.result)
  1816. this.$nextTick(() => {
  1817. this.form.setFieldsValue({
  1818. creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
  1819. return item
  1820. }),
  1821. })
  1822. this.form.validateFields(['creativeTag'])
  1823. })
  1824. this.creativeTagVisible = false
  1825. } else {
  1826. this.$message.error('选择出错,请稍后选择或自行手填')
  1827. }
  1828. })
  1829. }
  1830. },
  1831. getInfo() {
  1832. if (this.tagName == '') {
  1833. this.$message.error('请输入分类名称')
  1834. return
  1835. } else {
  1836. let params = {}
  1837. params.tagName = this.tagName
  1838. // params.campaignBudget = this.campaignBudget
  1839. params.tagArray = JSON.stringify(this.getData('creativeTag'))
  1840. params.userId = this.userInfo().id
  1841. params.accountId = localStorage.getItem('campaignAccountId')
  1842. postAction('/tag/kuaiShouCreativeTagCollection/add', params).then((res) => {
  1843. if (res.success) {
  1844. this.$message.success('添加成功')
  1845. this.tagName = ''
  1846. } else {
  1847. this.$message.error(res.message)
  1848. }
  1849. })
  1850. }
  1851. },
  1852. onSearch(value) {
  1853. var params = {}
  1854. params.accountId = localStorage.getItem('campaignAccountId')
  1855. params.userId = this.userInfo().id
  1856. params.trackType = this.clickTrackUrlShowType
  1857. params.pageNo = 1
  1858. params.pageSize = 500
  1859. params.trackName = value
  1860. getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then((res) => {
  1861. if (res.success) {
  1862. this.trackUrlList = res.result.records
  1863. } else {
  1864. this.$message.error(res.message)
  1865. }
  1866. })
  1867. },
  1868. okClickTrackUrl(item) {
  1869. this.clickTrackUrlList = false
  1870. if (this.clickTrackUrlShowType == '1') {
  1871. this.form.setFieldsValue({
  1872. clickTrackUrl: item.trackUrl,
  1873. })
  1874. } else if (this.clickTrackUrlShowType == '2') {
  1875. this.form.setFieldsValue({
  1876. actionbarClickUrl: item.trackUrl,
  1877. })
  1878. }else if (this.clickTrackUrlShowType == '3') {
  1879. this.form.setFieldsValue({
  1880. schemaUri: item.trackUrl,
  1881. })
  1882. }else if (this.clickTrackUrlShowType == '4') {
  1883. this.form.setFieldsValue({
  1884. url: item.trackUrl,
  1885. })
  1886. }
  1887. },
  1888. removeClickTrackUrl(item) {
  1889. deleteAction('/kuaishou/kuaiShouTrackUrlCollection/delete', {
  1890. id: item.id,
  1891. }).then((res) => {
  1892. if (res.success) {
  1893. this.getClickTrackUrlList(this.clickTrackUrlShowType)
  1894. }
  1895. })
  1896. },
  1897. getClickTrackUrlList(type) {
  1898. this.spinning = true
  1899. this.clickTrackUrlList = true
  1900. this.trackUrlList = []
  1901. var params = {}
  1902. params.accountId = localStorage.getItem('campaignAccountId')
  1903. params.trackType = type
  1904. params.userId = this.userInfo().id
  1905. params.pageNo = 1
  1906. params.pageSize = 500
  1907. getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then((res) => {
  1908. if (res.success) {
  1909. this.spinning = false
  1910. this.trackUrlList = res.result.records
  1911. } else {
  1912. this.spinning = false
  1913. this.$message.error(res.message)
  1914. }
  1915. })
  1916. },
  1917. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  1918. changeTrackUrlName() {
  1919. var params = {}
  1920. params.accountId = localStorage.getItem('campaignAccountId')
  1921. params.userId = this.userInfo().id
  1922. params.trackName = this.trackUrlName
  1923. getAction('/kuaishou/kuaiShouTrackUrlCollection/checkTrackName', params).then((res) => {
  1924. this.showTrackUrlNameElse = res.result
  1925. })
  1926. },
  1927. clickTrackUrlOk() {
  1928. var params = {}
  1929. params.accountId = localStorage.getItem('campaignAccountId')
  1930. params.userId = this.userInfo().id
  1931. params.trackName = this.trackUrlName
  1932. params.trackType = this.clickTrackUrlShowType
  1933. params.trackUrl =
  1934. this.clickTrackUrlShowType == '1' ?
  1935. this.getData('clickTrackUrl') :
  1936. this.clickTrackUrlShowType == '2'?this.getData('actionbarClickUrl'):
  1937. this.clickTrackUrlShowType == '3'?this.getData('schemaUri'):
  1938. this.clickTrackUrlShowType == '4'?this.getData('url'):this.getData('clickTrackUrl')
  1939. postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then((res) => {
  1940. if (res.success) {
  1941. this.clickTrackUrlShow = false
  1942. this.trackUrlName = ''
  1943. this.$message.success('添加成功')
  1944. } else {
  1945. this.$message.error(res.message)
  1946. }
  1947. })
  1948. },
  1949. deleteData(index, item) {
  1950. this.videoList.splice(index, 1)
  1951. var deleteIndex = this.checkVideo.findIndex((c) => c == item.photoId)
  1952. this.checkVideo.splice(deleteIndex, 1)
  1953. for (let i = 0; i < this.checkVideoAll.length; i++) {
  1954. for (let j = 0; j < this.checkVideoAll[i].length; j++) {
  1955. if (this.checkVideoAll[i][j] == item.photoId) {
  1956. this.checkVideoAll[i] = this.checkVideo
  1957. }
  1958. }
  1959. }
  1960. // for (let i = 0; i < this.checkVideoWai.length; i++) {
  1961. // for (let j = 0; j < this.checkVideoWai[i].length; j++) {
  1962. // if (this.checkVideoWai[i][j] == item.photoId) {
  1963. // this.checkVideoWai[i] = this.checkVideo
  1964. // }
  1965. // }
  1966. // }
  1967. this.sumContent = this.checkVideo.length
  1968. // var deleteIndexAll = this.checkVideoAll.findIndex((c) => c == item.photoId)
  1969. // this.checkVideoAll.splice(deleteIndexAll, 1)
  1970. },
  1971. setVideUrl(photoId) {
  1972. this.videoList = []
  1973. getAction('/batch/kuaiShouGroupTemplate/getUrlByPhotoId', { photoId: photoId }).then((res) => {
  1974. if (res.success) {
  1975. this.videoList.push({ url: res.result.url, photoId: photoId, coverUrl: res.result.coverUrl })
  1976. } else {
  1977. }
  1978. })
  1979. },
  1980. changeData(data) {
  1981. if (data.length > 1 && data.findIndex((item) => item == 1) == 0) {
  1982. data.splice(
  1983. data.findIndex((item) => item == 1),
  1984. 1
  1985. )
  1986. } else if (data.length > 1 && data.findIndex((item) => item == 1) == data.length - 1) {
  1987. data.splice(0, data.length - 1)
  1988. } else if (data.length == 0) {
  1989. data.push(1)
  1990. }
  1991. this.getOcpxActionList()
  1992. },
  1993. selectAllVideo() {
  1994. this.checkVideo = this.dataSource.map((item) => {
  1995. return item.photoId
  1996. })
  1997. // if (this.active == 0) {
  1998. for (let i = 0; i < this.ipagination.current; i++) {
  1999. this.checkVideoAll.push([])
  2000. }
  2001. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2002. // } else if (this.active == 1) {
  2003. // for (let i = 0; i < this.ipagination.current; i++) {
  2004. // this.checkVideoWai.push([])
  2005. // }
  2006. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2007. // }
  2008. var sum = 0
  2009. for (let i = 0; i < this.checkVideoAll.length; i++) {
  2010. sum += this.checkVideoAll[i].length
  2011. }
  2012. for (let i = 0; i < this.checkVideoWai.length; i++) {
  2013. sum += this.checkVideoWai[i].length
  2014. }
  2015. this.sumContent = sum
  2016. if(this.getData('unitType') == '4'){
  2017. if (this.getData('createType') == '0') {
  2018. if (sum > this.getData('createCount')) {
  2019. this.$message.error('最多选择' + this.getData('createCount') + '个素材')
  2020. this.checkVideo = []
  2021. this.sumContent = this.sumContent - 10
  2022. // if (this.active == 0) {
  2023. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2024. }
  2025. } else {
  2026. if (sum > this.getData('createCount') * 15) {
  2027. this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
  2028. this.checkVideo = []
  2029. this.sumContent = this.sumContent - 15
  2030. // if (this.active == 0) {
  2031. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2032. // } else if (this.active == 1) {
  2033. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2034. // }
  2035. }
  2036. }
  2037. }else{
  2038. if (sum > this.getData('createCount')*this.getData('imageCount')) {
  2039. this.$message.error('最多选择'+this.getData('createCount')*this.getData('imageCount')+'个素材')
  2040. this.checkVideo = []
  2041. this.sumContent-=10
  2042. // if (this.active == 0) {
  2043. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2044. // } else if (this.active == 1) {
  2045. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2046. // }
  2047. }
  2048. }
  2049. },
  2050. setData(data) {
  2051. // if (this.active == 0) {
  2052. for (let i = 0; i < this.ipagination.current; i++) {
  2053. this.checkVideoAll.push([])
  2054. }
  2055. this.checkVideoAll[this.ipagination.current - 1] = data
  2056. // } else if (this.active == 1) {
  2057. // for (let i = 0; i < this.ipagination.current; i++) {
  2058. // this.checkVideoWai.push([])
  2059. // }
  2060. // this.checkVideoWai[this.ipagination.current - 1] = data
  2061. // }
  2062. var sum = 0
  2063. for (let i = 0; i < this.checkVideoAll.length; i++) {
  2064. sum += this.checkVideoAll[i].length
  2065. }
  2066. for (let i = 0; i < this.checkVideoWai.length; i++) {
  2067. sum += this.checkVideoWai[i].length
  2068. }
  2069. this.sumContent = sum
  2070. if(this.getData('unitType') == '4'){
  2071. if (this.getData('createType') == '0') {
  2072. if (sum > this.getData('createCount')) {
  2073. this.$message.error('最多选择' + this.getData('createCount') + '个素材')
  2074. this.checkVideo.pop()
  2075. this.sumContent--
  2076. // if (this.active == 0) {
  2077. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2078. // } else if (this.active == 1) {
  2079. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2080. // }
  2081. }
  2082. } else {
  2083. if (sum > this.getData('createCount') * 15) {
  2084. this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
  2085. this.checkVideo.pop()
  2086. this.sumContent--
  2087. // if (this.active == 0) {
  2088. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2089. // } else if (this.active == 1) {
  2090. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2091. // }
  2092. }
  2093. }
  2094. }else{
  2095. if (sum > this.getData('createCount')*this.getData('imageCount')) {
  2096. this.$message.error('最多选择'+this.getData('createCount')*this.getData('imageCount')+'个素材')
  2097. this.checkVideo.pop()
  2098. this.sumContent--
  2099. // if (this.active == 0) {
  2100. this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
  2101. // } else if (this.active == 1) {
  2102. // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
  2103. // }
  2104. }
  2105. }
  2106. },
  2107. getVideoList() {
  2108. this.orderBy = 'time'
  2109. this.visibleMatemal = true
  2110. if (this.checkVideo.length > 0) {
  2111. } else {
  2112. this.showVideo = false
  2113. this.checkVideo = []
  2114. }
  2115. // this.active = 0
  2116. // this.time = []
  2117. // this.channelType = 0
  2118. this.creativeMaterialType = this.getData('creativeMaterialType')
  2119. this.searchVideo()
  2120. // this.getAction('/kuaishou/kuaiShouVideoGet/getBatchV2VideoList', {accountId:10168379}).then(res=>{
  2121. // console.log(res)
  2122. // })
  2123. // this.getAction('/kuaishou/kuaiShouVideoGet/getVideoListByCostType', {accountId:10168379,costType:1}).then(res=>{
  2124. // console.log(res)
  2125. // })
  2126. },
  2127. getDataSource(page, pageSize) {
  2128. console.log(this.checkVideo, this.checkVideoAll)
  2129. this.checkVideo = this.checkVideoAll[page-1]
  2130. this.ipagination.current = page
  2131. this.searchVideo()
  2132. },
  2133. cancelAll() {
  2134. // this.checkVideoAll = []
  2135. // this.checkVideoWei = []
  2136. this.ipagination.current = 1
  2137. this.mediaDimension = 'a'
  2138. this.time = []
  2139. this.costType = 1
  2140. this.photoId = ''
  2141. this.photoName = ''
  2142. this.visibleMatemal = false
  2143. this.md5Str = ""
  2144. },
  2145. handleOkShow() {
  2146. // this.checkVideoAll = [...new Set(this.checkVideoAll)]
  2147. var data = tqFun(this.checkVideoAll).concat(tqFun(this.checkVideoWai))
  2148. this.checkVideo = data
  2149. // console.log(this.checkVideoAll, this.checkVideo)
  2150. for (let i = 0; i < this.checkVideo.length; i++) {
  2151. this.setVideUrl(this.checkVideo[i])
  2152. if (i == this.checkVideo.length - 1) {
  2153. this.showVideo = true
  2154. this.visibleMatemal = false
  2155. this.cancelAll()
  2156. }
  2157. }
  2158. },
  2159. callback(key) {
  2160. this.channelType = key
  2161. this.checkVideo = []
  2162. this.ipagination.current = 1
  2163. this.time = []
  2164. if (key == 0) {
  2165. this.checkVideo = this.checkVideoAll[this.ipagination.current - 1]
  2166. } else if (key == 1) {
  2167. this.checkVideo = this.checkVideoWai[this.ipagination.current - 1]
  2168. }
  2169. },
  2170. changeType() {
  2171. this.$nextTick(() => {
  2172. if (this.getData('creativeMaterialType') == '1') {
  2173. if(this.getData('unitType') == '4') {
  2174. this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
  2175. }else{
  2176. this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
  2177. }
  2178. } else {
  2179. if(this.getData('unitType') == '4') {
  2180. this.form.setFieldsValue({creativeName:'自定义创意_横版视频'})
  2181. }else{
  2182. this.form.setFieldsValue({creativeName:'程序化创意_横版视频'})
  2183. }
  2184. }
  2185. })
  2186. },
  2187. lookTemplate(accountId, templateId) {
  2188. this.$refs.templateModal.handleOk(localStorage.getItem('campaignAccountId'), templateId, 'look')
  2189. },
  2190. addTemplate(accountId) {
  2191. this.$refs.templateModal.create(localStorage.getItem('campaignAccountId'), 'add')
  2192. },
  2193. getTemplate(accountId) {
  2194. var data = null
  2195. if (accountId) {
  2196. data = accountId
  2197. } else {
  2198. this.templateLoading = true
  2199. data = localStorage.getItem('campaignAccountId')
  2200. }
  2201. getAction('/batch/kuaishouTemplate/getTemplateByAccountId', {
  2202. accountId: data,
  2203. }).then((res) => {
  2204. if (res.success) {
  2205. this.getTemplateList(data)
  2206. }
  2207. })
  2208. },
  2209. getTemplateList(accountId) {
  2210. this.templateList = []
  2211. getAction('/batch/kuaishouTemplate/list', {
  2212. accountId: accountId,
  2213. }).then((res) => {
  2214. if (res.success) {
  2215. this.templateList = res.result.map((item, index) => {
  2216. return {
  2217. ...item,
  2218. key: index,
  2219. }
  2220. })
  2221. this.templateLoading = false
  2222. } else {
  2223. this.templateLoading = false
  2224. }
  2225. })
  2226. },
  2227. convertOk() {
  2228. var dataLink = []
  2229. dataLink = this.convertAllList.filter((item) => {
  2230. return item.convert_id == this.convertId.key
  2231. })
  2232. if (dataLink.length > 0) {
  2233. this.form.setFieldsValue({ clickTrackUrl: dataLink[0].click_url })
  2234. this.convert = false
  2235. }
  2236. },
  2237. showConvert() {
  2238. this.convertChange()
  2239. if (this.campaignType == 2) {
  2240. if (this.getData('appId')) {
  2241. this.convert = true
  2242. if (this.getPlatForm(this.getData('appId')) == 1 || this.getPlatForm(this.getData('appId')) == 2) {
  2243. this.convertType = '3'
  2244. } else {
  2245. this.convertType = '7'
  2246. }
  2247. } else {
  2248. this.$message.error('请选择应用')
  2249. }
  2250. } else {
  2251. this.convert = true
  2252. this.convertType = '1'
  2253. }
  2254. this.getConvertList()
  2255. },
  2256. convertChange() {
  2257. this.convertId = ''
  2258. },
  2259. getConvertList() {
  2260. var params = {}
  2261. params.accountId = localStorage.getItem('campaignAccountId')
  2262. params.type = this.convertType
  2263. getAction('/kuaishou/batch/getConvertList', params).then((res) => {
  2264. if (res.success) {
  2265. this.convertList = res.result.map((item) => {
  2266. return {
  2267. ...item,
  2268. convert_id: item.convert_id + '',
  2269. }
  2270. })
  2271. this.convertAllList.push(...this.convertList)
  2272. }
  2273. })
  2274. },
  2275. getCheck(e) {
  2276. this.checkedTrue = e.target.checked
  2277. },
  2278. addGroup() {
  2279. this.allForm.group.push( {
  2280. bidType: this.campaignBidType == '1'? 12:10,
  2281. // bid: '',
  2282. // cpaBid: '',
  2283. showTipCheck: false,
  2284. deepConversionBidCheck: false,
  2285. // unitName: '',
  2286. unitNameCheck: false,
  2287. deepConversionType: '',
  2288. deepConversionBid: '',
  2289. ocpxActionType: this.campaignBidType == '1'? undefined:2,
  2290. })
  2291. },
  2292. resData(index) {
  2293. // this.allForm.group[index].bid = ''
  2294. // this.allForm.group[index].cpaBid = ''
  2295. this.allForm.group[index].showTipCheck = false
  2296. this.allForm.group[index].deepConversionBidCheck = false
  2297. this.allForm.group[index].deepConversionType = ''
  2298. this.allForm.group[index].deepConversionBid = ''
  2299. this.form.setFieldsValue({
  2300. bid: undefined,
  2301. })
  2302. this.form.setFieldsValue({
  2303. cpaBid: undefined,
  2304. })
  2305. },
  2306. removeGroup(index) {
  2307. this.allForm.group.splice(index, 1)
  2308. },
  2309. deep_conversion_bidTip(index) {
  2310. if (
  2311. this.allForm.group[index].deepConversionBid < this.getData('cpaBid')
  2312. ) {
  2313. this.allForm.group[index].deepConversionBidCheck = true
  2314. } else {
  2315. this.allForm.group[index].deepConversionBidCheck = false
  2316. }
  2317. },
  2318. checkGroup(e, index) {
  2319. if (e.target.value != '') {
  2320. getAction('/kuaishou/batch/checkUnitName', {
  2321. campaignId: localStorage.getItem('campaignList'),
  2322. unitName: e.target.value,
  2323. }).then((res) => {
  2324. if (res.success) {
  2325. this.allForm.group[index].unitNameCheck = !res.result
  2326. } else {
  2327. this.allForm.group[index].unitNameCheck = false
  2328. }
  2329. })
  2330. }
  2331. },
  2332. showTip(index) {
  2333. if (this.allForm.group[index].bidType == 1) {
  2334. if (this.getData('bid') < 0.2 || this.getData('bid') > this.maxBid) {
  2335. this.allForm.group[index].showTipCheck = true
  2336. } else {
  2337. this.allForm.group[index].showTipCheck = false
  2338. }
  2339. } else {
  2340. if (this.getData('cpaBid') < 1 || this.getData('cpaBid') > this.maxBid) {
  2341. this.allForm.group[index].showTipCheck = true
  2342. } else {
  2343. this.allForm.group[index].showTipCheck = false
  2344. }
  2345. }
  2346. },
  2347. getScheduleTime(item) {
  2348. this.allForm.scheduleTimeData = item
  2349. },
  2350. setTime(e) {
  2351. if (e.target.value == '2') {
  2352. this.timeRange[0] = moment().startOf('day')
  2353. this.timeRange[1] = moment().add(1, 'months')
  2354. }
  2355. },
  2356. setTimeAll(e) {
  2357. if (e.target.value == '2') {
  2358. this.$nextTick(() => {
  2359. this.$refs.selectCheck.init()
  2360. })
  2361. } else {
  2362. }
  2363. },
  2364. getData(className) {
  2365. return this.form.getFieldValue(className)
  2366. },
  2367. bidCheck(rule, value, callback) {
  2368. if (value < 0.2) {
  2369. callback('不得低于0.2元')
  2370. } else {
  2371. callback()
  2372. }
  2373. },
  2374. cpaBidCheck(rule, value, callback) {
  2375. if (value < 0.1) {
  2376. callback('不得低于0.1元')
  2377. } else {
  2378. callback()
  2379. }
  2380. },
  2381. handleConfirmValue(rule, value, callback) {
  2382. if (value != '' && value != undefined) {
  2383. getAction('/kuaishou/batch/checkUnitName', {
  2384. campaignId: localStorage.getItem('campaignList'),
  2385. unitName: value + '_0',
  2386. }).then((res) => {
  2387. if (res.success) {
  2388. if (!res.result) {
  2389. callback('广告组名称重复')
  2390. } else {
  2391. callback()
  2392. }
  2393. } else {
  2394. callback()
  2395. }
  2396. })
  2397. } else {
  2398. callback()
  2399. }
  2400. },
  2401. budgetValue(rule, value, callback) {
  2402. if (value < 100 || value > 100000000) {
  2403. callback('不小于100,不超过100000000,仅支持输入自然数')
  2404. }
  2405. callback()
  2406. },
  2407. handleConfirmBid(rule, value, callback) {
  2408. if (this.bid == 0 || this.bid <= 0.2 || this.bid >= 100) {
  2409. callback('不得低于0.2元,不得高于100元')
  2410. }
  2411. callback()
  2412. },
  2413. handleConfirmCpaBid(rule, value, callback) {
  2414. if (this.ocpxActionType == '2' && (this.cpaBid == 0 || this.cpaBid <= 1 || this.cpaBid >= 3000)) {
  2415. callback('金额不得低于1元,不得高于3000元')
  2416. }
  2417. if (this.ocpxActionType == '180' && (this.cpaBid == 0 || this.cpaBid <= 5 || this.cpaBid >= 3000)) {
  2418. callback('金额不得低于5元,不得高于3000元')
  2419. }
  2420. callback()
  2421. },
  2422. onSelectChange(selectedRowKeys, selectionRows) {
  2423. this.selectedRowKeys = selectedRowKeys
  2424. this.selectedRowKeysValue = selectionRows.map((item) => {
  2425. return {
  2426. orientationId: item.orientationId,
  2427. orientationName: item.orientationName,
  2428. }
  2429. })
  2430. },
  2431. getCheckboxProps(record) {
  2432. return {
  2433. props: {
  2434. disabled: this.selectedRowKeysValueNo.some((item) => item.orientationId === record.orientationId),
  2435. },
  2436. }
  2437. },
  2438. onSelectChangeNo(selectedRowKeys, selectionRows) {
  2439. this.selectedRowKeysNo = selectedRowKeys
  2440. this.selectedRowKeysValueNo = selectionRows.map((item) => {
  2441. return {
  2442. orientationId: item.orientationId,
  2443. orientationName: item.orientationName,
  2444. }
  2445. })
  2446. },
  2447. getCheckboxPropsNo(record) {
  2448. return {
  2449. props: {
  2450. disabled: this.selectedRowKeysValue.some((item) => item.orientationId === record.orientationId),
  2451. },
  2452. }
  2453. },
  2454. okSelect() {
  2455. this.keyValue = ''
  2456. this.topMiddle = false
  2457. for (let i = 0; i < this.selectedRowKeysValue.length; i++) {
  2458. this.keyValue += this.selectedRowKeysValue[i].orientationName + ' '
  2459. }
  2460. },
  2461. okSelectNo() {
  2462. this.keyValueNo = ''
  2463. this.topMiddleNo = false
  2464. for (let i = 0; i < this.selectedRowKeysValueNo.length; i++) {
  2465. this.keyValueNo += this.selectedRowKeysValueNo[i].orientationName + ' '
  2466. }
  2467. },
  2468. radioChange() {
  2469. this.selectedRowKeys = []
  2470. this.selectedRowKeysValue = []
  2471. this.selectedRowKeysNo = []
  2472. this.selectedRowKeysValueNo = []
  2473. this.keyValue = ''
  2474. this.keyValueNo = ''
  2475. },
  2476. addApplication() {
  2477. this.tongbuLoading = true
  2478. // this.$refs.application.showApplication()
  2479. getAction('/kuaishou/batch/syncAppList', {
  2480. accountId: localStorage.getItem('campaignAccountId'),
  2481. }).then((res) => {
  2482. if (res.success) {
  2483. this.tongbuLoading = false
  2484. this.$message.success(res.message)
  2485. this.getAppList()
  2486. } else {
  2487. this.tongbuLoading = false
  2488. this.$message.error(res.message)
  2489. }
  2490. })
  2491. },
  2492. handleOk() {
  2493. var that = this
  2494. this.$bus.$emit('remove', '/creat/creatUnit')
  2495. this.$router.replace({
  2496. path: '/batchCreation/campaignList',
  2497. })
  2498. },
  2499. handleCancel(e) {
  2500. this.visible = false
  2501. },
  2502. handleSubmit(e) {
  2503. e.preventDefault()
  2504. if (
  2505. this.checkVideo.length <
  2506. (this.getData('unitType')=='4'?this.getData('createType') == '0' ? this.getData('createCount') : this.getData('createCount') * 15:
  2507. this.getData('createCount')*this.getData('imageCount'))
  2508. ) {
  2509. // this.$message.error('选择的素材不能小于创建条数')
  2510. this.getData('unitType')=='4'?
  2511. this.getData('createType') == '0'
  2512. ? this.$message.error('选择的素材不能小于创建条数')
  2513. : this.$message.error('选择的素材不能小于创建条数*15'):
  2514. this.$message.error('选择的素材不能小于创建条数*'+this.getData('imageCount'))
  2515. } else {
  2516. let isNotComplete = this.descriptionList.findIndex(item => {
  2517. return item.value === ''
  2518. })
  2519. if (isNotComplete > -1) {
  2520. this.$message.error('广告语未填')
  2521. return
  2522. }
  2523. if(this.getData('unitType')=='7'&&this.descriptionList.length<3){
  2524. this.$message.error('程序化创意广告语最少三条')
  2525. return
  2526. }
  2527. this.form.validateFieldsAndScroll((err, values) => {
  2528. if (!err) {
  2529. this.loading = true
  2530. var groupArr = this.allForm.group.map((item) => {
  2531. return {
  2532. ...item,
  2533. deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
  2534. ocpxActionType: item.ocpxActionType,
  2535. bidType: item.bidType == 1 ? 2 : item.bidType,
  2536. }
  2537. })
  2538. var json = {
  2539. ...values,
  2540. cpaBid: values.cpaBid && values.cpaBid != '' ? values.cpaBid * 1000 : null,
  2541. bid: values.bid && values.bid != '' ? values.bid * 1000 : null,
  2542. convertId: this.convertId ? this.convertId.key : null,
  2543. dayBudget: values.dayBudget * 1000,
  2544. photoArr: this.checkVideo,
  2545. creativeCategory: values.creativeCategory
  2546. ? values.creativeCategory[values.creativeCategory.length - 1]
  2547. : null,
  2548. unitType: values.unitType,
  2549. }
  2550. var params = {
  2551. userId: this.userInfo().id,
  2552. ...json,
  2553. ...groupArr[0],
  2554. description:JSON.stringify(this.descriptionList.map(item=>{return item.value})),
  2555. accountId: localStorage.getItem('campaignAccountId'),
  2556. campaignId: localStorage.getItem('campaignList'),
  2557. beginTime: moment(this.timeRange[0]).format('YYYY-MM-DD'),
  2558. endTime: this.allForm.time == '2' ? moment(this.timeRange[1]).format('YYYY-MM-DD') : '',
  2559. appStore: values.useAppMarket == true ? this.allForm.appStore : null,
  2560. useAppMarket: values.useAppMarket ? 1 : 0,
  2561. sceneId: this.allForm.allianceAccount == '1' ? this.allForm.sceneId : [5],
  2562. scheduleTime:
  2563. this.allForm.scheduleTime == '2'
  2564. ? this.allForm.scheduleTimeData
  2565. : '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
  2566. }
  2567. if(!!this.outerShowId){
  2568. params.libraryId = this.libraryId
  2569. params.outerId = this.outerShowId.split('@')[0]
  2570. params.productId = this.outerShowId.split('@')[1]
  2571. params.detailUnitType = this.campaignType == '2'?0:this.campaignType == '5'?1:this.campaignType == '7'?2:0
  2572. }
  2573. postAction('/batch/kuaiShouGroupTemplate/submitUnitTask', params).then((res) => {
  2574. this.loading = false
  2575. if (res.success) {
  2576. this.visible = true
  2577. this.allForm.fail = res.result.code
  2578. this.allForm.success = res.result.size
  2579. } else {
  2580. this.$message.error(res.message)
  2581. }
  2582. })
  2583. }
  2584. })
  2585. }
  2586. },
  2587. onChange(value) {
  2588. // console.log(value)
  2589. },
  2590. changeUnitType(e){
  2591. this.sumContent = 0
  2592. this.videoList = []
  2593. this.checkVideo = []
  2594. this.checkVideoAll = []
  2595. this.ipagination.pageSize = 10
  2596. this.$nextTick(()=>{
  2597. if (this.getData('creativeMaterialType') == '1') {
  2598. if(this.getData('unitType') == '4') {
  2599. this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
  2600. }else{
  2601. this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
  2602. }
  2603. } else {
  2604. if(this.getData('unitType') == '4') {
  2605. this.form.setFieldsValue({creativeName:'自定义创意_横版视频'})
  2606. }else{
  2607. this.form.setFieldsValue({creativeName:'程序化创意_横版视频'})
  2608. }
  2609. }
  2610. // if(e.target.value == '4') {
  2611. // this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
  2612. // }else{
  2613. // this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
  2614. // }
  2615. })
  2616. },
  2617. handleChange(value) {
  2618. // this.$refs.population.getAppList(value)
  2619. this.getSiteList(value)
  2620. this.getOcpxActionList(value)
  2621. },
  2622. handleChangeMould(value) {
  2623. if (value) {
  2624. this.populationData = JSON.parse(
  2625. this.dataList.filter((item) => {
  2626. return item.id == value
  2627. })[0].templateContent
  2628. )
  2629. } else {
  2630. this.populationData = {}
  2631. }
  2632. },
  2633. getPlatForm(appId) {
  2634. if (appId) {
  2635. var data = this.appList.filter((item) => {
  2636. return item.appId == appId
  2637. })
  2638. return data[0].platform
  2639. }
  2640. },
  2641. handleBlur() {
  2642. // console.log('blur')
  2643. },
  2644. handleFocus() {
  2645. // console.log('focus')
  2646. },
  2647. getPageSize(data) {
  2648. if (data.target.value == '0') {
  2649. this.ipagination.pageSize = 5
  2650. } else if (data.target.value == '1') {
  2651. this.ipagination.pageSize = 15
  2652. }
  2653. this.videoList = []
  2654. this.checkVideo = []
  2655. this.checkVideoAll = []
  2656. this.checkVideoWai = []
  2657. this.sumContent = 0
  2658. },
  2659. filterOption(input, option) {
  2660. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  2661. },
  2662. prevStep() {
  2663. this.$emit('prevStep', this.campaignId ? this.campaignId : localStorage.getItem('campaignList'))
  2664. },
  2665. getMould() {
  2666. let params = {}
  2667. params.accountId = localStorage.getItem('campaignAccountId')
  2668. getAction('/kuaishou/batch/getDirectionalTemplate', params).then((res) => {
  2669. // console.log(res)
  2670. if (res.success) {
  2671. this.dataList = res.result.map((item, index) => {
  2672. return {
  2673. ...item,
  2674. key: index,
  2675. }
  2676. })
  2677. }
  2678. })
  2679. },
  2680. getAppList() {
  2681. let params = {}
  2682. params.accountId = localStorage.getItem('campaignAccountId')
  2683. getAction('/kuaishou/batch/getAppList', params).then((res) => {
  2684. if (res.success) {
  2685. this.appList = res.result.map((item, index) => {
  2686. return {
  2687. ...item,
  2688. key: index,
  2689. }
  2690. })
  2691. }
  2692. })
  2693. },
  2694. getCampaignList() {
  2695. var params = {}
  2696. params.accountId = localStorage.getItem('campaignAccountId')
  2697. params.campaignId = this.campaignId ? this.campaignId : localStorage.getItem('campaignList')
  2698. getAction('/kuaishou/batch/getCampaignList', params).then((res) => {
  2699. if (res.success) {
  2700. this.campaignType = res.result.records[0].campaignType
  2701. // console.log(this.campaignType)
  2702. }
  2703. })
  2704. },
  2705. getData(className) {
  2706. return this.form.getFieldValue(className)
  2707. },
  2708. showVideoList(url, params) {
  2709. this.dataSource = []
  2710. this.loadingVideoList = true
  2711. getAction(url, params).then((res) => {
  2712. // console.log(res)
  2713. if (res.success) {
  2714. this.dataSource = res.result.list
  2715. this.ipagination.total = res.result.total
  2716. this.loadingVideoList = false
  2717. } else {
  2718. this.loadingVideoList = false
  2719. }
  2720. })
  2721. },
  2722. getSiteList(appId) {
  2723. getAction('/kuaishou/batch/getPageList', {
  2724. accountId: localStorage.getItem('campaignAccountId'),
  2725. appId: appId,
  2726. viewComp: 7,
  2727. }).then((res) => {
  2728. if (res.success) {
  2729. this.siteList = res.result
  2730. if (this.siteList.length > 0) {
  2731. this.showSite = true
  2732. }
  2733. } else {
  2734. this.showSite = false
  2735. }
  2736. })
  2737. },
  2738. getChangeAll(type, form, field) {
  2739. this.showNumber = false
  2740. this.showNumber = true
  2741. var node = document.getElementById(field)
  2742. var v = '{{' + type + '}}'
  2743. if (document.selection) {
  2744. //IE
  2745. node.focus()
  2746. var sel = document.selection.createRange()
  2747. sel.text = v
  2748. sel.select()
  2749. if (field == 'campaignName') {
  2750. this[form].setFieldsValue({ campaignName: sel.text })
  2751. } else if (field == 'unitName') {
  2752. this[form].setFieldsValue({ unitName: sel.text })
  2753. }
  2754. } else if (node.selectionStart || node.selectionStart == '0') {
  2755. //MOZILLA/GOOGLE
  2756. var startPos = node.selectionStart
  2757. var endPos = node.selectionEnd
  2758. var restoreTop = node.scrollTop
  2759. node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
  2760. if (restoreTop > 0) {
  2761. node.scrollTop = restoreTop
  2762. }
  2763. if (field == 'campaignName') {
  2764. this[form].setFieldsValue({ campaignName: node.value })
  2765. } else if (field == 'unitName') {
  2766. this[form].setFieldsValue({ unitName: node.value })
  2767. }
  2768. node.focus()
  2769. node.selectionStart = startPos + v.length
  2770. node.selectionEnd = startPos + v.length
  2771. // this.campaignName = node.value
  2772. } else {
  2773. //OTHER
  2774. node.value += v
  2775. // console.log(node.value)
  2776. if (field == 'campaignName') {
  2777. this[form].setFieldsValue({ campaignName: node.value })
  2778. } else if (field == 'unitName') {
  2779. this[form].setFieldsValue({ unitName: node.value })
  2780. }
  2781. node.focus()
  2782. // this.campaignName = node.value
  2783. }
  2784. },
  2785. getIsActivate(val){
  2786. let params={};
  2787. params.accountId=localStorage.getItem('campaignAccountId');
  2788. params.campaignType=localStorage.getItem('campaignType');
  2789. params.appId=val
  2790. getAction('/kuaishou/batch/getIsActivate',params).then(res => {
  2791. if (res.success) {
  2792. this.allForm.groupTypeData = res.result
  2793. }
  2794. })
  2795. },
  2796. getProductList(){
  2797. postAction('/batch/kuaiShouGroupTemplate/productList',{
  2798. accountId: localStorage.getItem('campaignAccountId'),
  2799. libraryId: this.libraryId,
  2800. libraryName:this.libraryName,
  2801. page:this.libraryPage.current,
  2802. pageSize:this.libraryPage.pageSize
  2803. }).then(result=>{
  2804. if(result.code == 0){
  2805. this.libraryVisible = true
  2806. this.libraryList = result.data.details
  2807. this.libraryPage.total = result.data.total_count
  2808. if(!!this.outerShowId){
  2809. this.outerId = this.outerShowId
  2810. }
  2811. }
  2812. })
  2813. },
  2814. },
  2815. watch: {
  2816. timeSeries(val) {
  2817. // console.log(val)
  2818. },
  2819. checkVideo(n, o) {},
  2820. checkVideoAll(n, o) {
  2821. // this.checkVideoAll = [...new Set(n)]
  2822. // console.log(n,o)
  2823. // this.checkVideo = [...new Set(n)]
  2824. },
  2825. time(n, o) {
  2826. if(this.visibleMatemal){
  2827. this.searchVideo()
  2828. }
  2829. // if (n.length > 0) {
  2830. // var params = {}
  2831. // params.accountId = localStorage.getItem('campaignAccountId')
  2832. // params.materialType = this.creativeMaterialType
  2833. // params.pageSize = this.ipagination.pageSize
  2834. // params.pageNo = 1
  2835. // params.status = 0
  2836. // params.channelType = this.channelType
  2837. // params.startDate = moment(n[0]).format('YYYY-MM-DD') + ' 00:00:00'
  2838. // params.endDate = moment(n[1]).format('YYYY-MM-DD') + ' 23:59:59'
  2839. // params.orderBy = this.orderBy
  2840. // params.signatures = this.md5Str
  2841. // this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
  2842. // } else {
  2843. // var params = {}
  2844. // params.accountId = localStorage.getItem('campaignAccountId')
  2845. // params.materialType = this.creativeMaterialType
  2846. // params.pageSize = this.ipagination.pageSize
  2847. // params.pageNo = 1
  2848. // params.status = 0
  2849. // params.channelType = this.channelType
  2850. // params.orderBy = this.orderBy
  2851. // params.signatures = this.md5Str
  2852. // this.ipagination.current = 1
  2853. // this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
  2854. // }
  2855. },
  2856. },
  2857. created(){
  2858. this.campaignBidType = localStorage.getItem('campaignBidType')
  2859. },
  2860. mounted: function () {
  2861. this.getOcpxActionList()
  2862. // this.getDeepTypesList(2)
  2863. this.step = localStorage.getItem('step')
  2864. this.getTemplate(localStorage.getItem('campaignAccountId'))
  2865. this.getAppList()
  2866. // this.getCampaignList()
  2867. this.campaignType = localStorage.getItem('campaignType')
  2868. this.getMould()
  2869. this.addGroup()
  2870. getAction('/kuaishou/batch/getWhiteList', {
  2871. accountId: localStorage.getItem('campaignAccountId'),
  2872. }).then((res) => {
  2873. if (res.success) {
  2874. // console.log(res)
  2875. if (res.result) {
  2876. this.creativeCategorySwitch = res.result.creative_category_switch == 1 ? true : false
  2877. this.allianceAccount = res.result.alliance_account == 1 ? true : false
  2878. this.actionbarClickUrlSwitch = res.result.actionbar_click_url_switch == 1 ? true : false
  2879. // if (res.result.alliance_account == 1) {
  2880. // this.allianceAccount = true
  2881. // } else {
  2882. // this.allianceAccount = false
  2883. // }
  2884. } else {
  2885. this.allianceAccount = false
  2886. this.creativeCategorySwitch = false
  2887. this.actionbarClickUrlSwitch = false
  2888. }
  2889. }
  2890. })
  2891. getAction('/kuaishou/batch/getProjectMaxBid', {
  2892. accountId: localStorage.getItem('campaignAccountId'),
  2893. }).then((res) => {
  2894. if (res.success) {
  2895. this.maxBid = res.result / 1000
  2896. }
  2897. })
  2898. getAction('/kuaishou/batch/getActionBarTextByType', {
  2899. type: localStorage.getItem('campaignType'),
  2900. }).then((res) => {
  2901. if (res.success) {
  2902. this.actionBarTextList = res.result
  2903. }
  2904. })
  2905. getAction('/kuaishou/batch/getCreativeCategory', {
  2906. accountId: localStorage.getItem('campaignAccountId'),
  2907. }).then((res) => {
  2908. if (res.success) {
  2909. // console.log(res)
  2910. this.createOptions = res.result
  2911. }
  2912. })
  2913. getAction('/batch/kuaiShouGroupTemplate/getApiCreateCount', {
  2914. accountId: localStorage.getItem('campaignAccountId'),
  2915. }).then((res) => {
  2916. this.createCount = res.result
  2917. })
  2918. postAction('/batch/kuaiShouGroupTemplate/getLibraryConfig',{
  2919. accountId: localStorage.getItem('campaignAccountId'),
  2920. }).then(res=>{
  2921. if(res.success){
  2922. this.isLibrary = res.result.isLibrary
  2923. this.libraryId = res.result.libraryId
  2924. }
  2925. })
  2926. },
  2927. }
  2928. </script>
  2929. <style type="text/css" scoped lang="scss">
  2930. .width-video {
  2931. width: calc(20% - 10px);
  2932. margin-right: 10px;
  2933. margin-bottom: 10px;
  2934. }
  2935. .chouzhen {
  2936. border-style: solid;
  2937. border-width: 1px;
  2938. border-color: #e4e4e4;
  2939. width: calc(20% - 10px);
  2940. padding: 10px;
  2941. margin-right: 10px;
  2942. margin-bottom: 10px;
  2943. display: flex;
  2944. align-items: center;
  2945. background: #fff;
  2946. position: relative;
  2947. z-index: 99;
  2948. float: left;
  2949. }
  2950. li.chouzhen.first:before {
  2951. font-size: 12px;
  2952. content: '首帧';
  2953. position: absolute;
  2954. top: 7px;
  2955. left: 5px;
  2956. width: 36px;
  2957. height: 20px;
  2958. color: rgb(255, 255, 255);
  2959. line-height: 20px;
  2960. text-align: center;
  2961. background: rgba(0, 0, 0, 0.5);
  2962. border-radius: 2px;
  2963. z-index: 1000;
  2964. }
  2965. .actor-photo-list {
  2966. display: flex;
  2967. padding-left: 0;
  2968. li {
  2969. width: 25%;
  2970. margin: 10px;
  2971. position: relative;
  2972. height: 250px;
  2973. border: 1px solid #f2f2f2;
  2974. list-style: none;
  2975. img,
  2976. video {
  2977. width: 100%;
  2978. margin-top: auto;
  2979. margin-bottom: auto;
  2980. top: 0;
  2981. bottom: 0;
  2982. position: absolute;
  2983. max-height: 250px;
  2984. }
  2985. }
  2986. }
  2987. .plug-timer-grid {
  2988. width: 100%;
  2989. }
  2990. .plug-timer-grid td,
  2991. .plug-timer-grid th {
  2992. border: 1px solid #97b4d1;
  2993. text-align: center;
  2994. /*cursor:pointer;*/
  2995. font-size: 10px;
  2996. line-height: 10px;
  2997. }
  2998. .Selected {
  2999. background-color: rgb(102, 162, 243);
  3000. opacity: 0.5;
  3001. }
  3002. .plug-timer-grid {
  3003. border-collapse: collapse;
  3004. z-index: 4;
  3005. }
  3006. .plug-timer-grid thead tr {
  3007. display: table-row;
  3008. vertical-align: inherit;
  3009. border-color: inherit;
  3010. }
  3011. .group-creat table td {
  3012. height: 20px;
  3013. max-width: 5px;
  3014. font-size: 12px;
  3015. text-align: center;
  3016. vertical-align: middle;
  3017. overflow: hidden;
  3018. transition: background 0.5s;
  3019. -webkit-transition: background 0.5s;
  3020. }
  3021. .plug-timer-grid tbody th {
  3022. width: 4%;
  3023. }
  3024. .plug-timer-grid tbody tr td {
  3025. width: 2%;
  3026. }
  3027. /*.clear{*/
  3028. /* margin:20px 0px 20px 0px;*/
  3029. /*}*/
  3030. </style>