creative-copywrit.vue 172 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071
  1. <style lang="scss">
  2. .is-disabled .el-checkbox__inner {
  3. display: none !important;
  4. }
  5. .downLoad .ant-form-item-control-wrapper {
  6. width: 70%;
  7. }
  8. #material-card .ant-tabs-tab {
  9. border: 1px solid gainsboro !important;
  10. }
  11. #material-card .ant-tabs-top-bar {
  12. position: relative;
  13. z-index: 100;
  14. }
  15. #material-card .ant-badge-count {
  16. top: 0px;
  17. }
  18. .detail .ant-form-item {
  19. margin-bottom: 10px !important;
  20. }
  21. .ant-carousel .slick-slide {
  22. text-align: center;
  23. background: #364d79;
  24. overflow: hidden;
  25. }
  26. .ad_cover_container .ant-card-body {
  27. padding: 0;
  28. }
  29. .ant-carousel .slick-slide h3 {
  30. color: #fff;
  31. }
  32. .ant-carousel .custom-slick-arrow {
  33. width: 25px;
  34. height: 25px;
  35. font-size: 25px;
  36. color: #fff;
  37. background-color: rgba(31, 45, 61, 0.11);
  38. opacity: 0.3;
  39. }
  40. .ant-carousel .custom-slick-arrow:before {
  41. display: none;
  42. }
  43. .ant-carousel .custom-slick-arrow:hover {
  44. opacity: 0.5;
  45. }
  46. .cover_carousel_con .slick-dots {
  47. bottom: 55px;
  48. }
  49. .add-image-material .draggable-list {
  50. display: block !important;
  51. }
  52. li.chouzhen.first:before {
  53. font-size: 12px;
  54. content: '首帧';
  55. position: absolute;
  56. top: 7px;
  57. left: 5px;
  58. width: 36px;
  59. height: 20px;
  60. color: rgb(255, 255, 255);
  61. line-height: 20px;
  62. text-align: center;
  63. background: rgba(0, 0, 0, 0.5);
  64. border-radius: 2px;
  65. }
  66. .table-page-search-wrapper {
  67. .el-cascader .el-input {
  68. cursor: pointer;
  69. height: 100%;
  70. }
  71. .el-cascader .el-input .el-input__inner {
  72. text-overflow: ellipsis;
  73. height: 100%;
  74. position: relative;
  75. top: -4px;
  76. }
  77. .el-cascader .el-input .el-icon-arrow-down {
  78. -webkit-transition: -webkit-transform 0.3s;
  79. transition: -webkit-transform 0.3s;
  80. transition: transform 0.3s;
  81. transition: transform 0.3s, -webkit-transform 0.3s;
  82. transition: transform 0.3s, -webkit-transform 0.3s;
  83. font-size: 14px;
  84. position: relative;
  85. top: -4px;
  86. }
  87. .el-cascader .el-input .el-icon-arrow-down.is-reverse {
  88. -webkit-transform: rotateZ(180deg);
  89. transform: rotateZ(180deg);
  90. position: relative;
  91. top: 2px;
  92. }
  93. .el-cascader .el-input .el-input__inner .el-input__icon.el-icon-arrow-down {
  94. text-overflow: ellipsis;
  95. height: 100%;
  96. position: relative;
  97. top: -4px;
  98. }
  99. .el-cascader .el-input .el-input__suffix .el-input__icon.el-icon-circle-close {
  100. text-overflow: ellipsis;
  101. height: 100%;
  102. position: relative;
  103. top: -4px;
  104. }
  105. }
  106. </style>
  107. <style lang="scss" scoped>
  108. .chouzhen {
  109. border-style: solid;
  110. border-width: 1px;
  111. border-color: #e4e4e4;
  112. width: calc(20% - 10px);
  113. padding: 10px;
  114. margin-right: 10px;
  115. margin-bottom: 10px;
  116. display: flex;
  117. align-items: center;
  118. background: #fff;
  119. position: relative;
  120. z-index: 99;
  121. float: left;
  122. }
  123. .content {
  124. display: flex !important;
  125. flex-direction: column;
  126. justify-content: center;
  127. align-items: center;
  128. .slick-dots {
  129. bottom: 55px;
  130. }
  131. }
  132. .video-content {
  133. width: 45%;
  134. padding: 10px;
  135. box-sizing: border-box;
  136. display: flex;
  137. flex-direction: column;
  138. justify-content: center;
  139. border-right: 1px solid #f2f2f2;
  140. }
  141. .tag-video {
  142. position: absolute;
  143. right: 0px;
  144. top: 8px;
  145. padding: 4px;
  146. border-radius: 2px;
  147. line-height: 16px;
  148. font-size: 12px;
  149. color: #fff;
  150. background-color: rgba(0, 0, 0, 0.3);
  151. }
  152. .home-item {
  153. overflow: hidden;
  154. }
  155. @media only screen and (min-width: 1200px) {
  156. .home-item {
  157. border-style: solid;
  158. border-width: 1px;
  159. border-color: #e4e4e4;
  160. width: calc(50% - 10px);
  161. padding: 10px;
  162. margin-right: 10px;
  163. margin-bottom: 10px;
  164. display: flex;
  165. align-items: center;
  166. background: #fff;
  167. position: relative;
  168. z-index: 99;
  169. }
  170. }
  171. @media only screen and (min-width: 1250px) {
  172. .home-item {
  173. border-style: solid;
  174. border-width: 1px;
  175. border-color: #e4e4e4;
  176. width: calc(25% - 10px);
  177. padding: 10px;
  178. margin-right: 10px;
  179. margin-bottom: 10px;
  180. display: flex;
  181. align-items: center;
  182. background: #fff;
  183. position: relative;
  184. z-index: 99;
  185. }
  186. }
  187. .actor-photo-list {
  188. display: flex;
  189. padding-left: 0;
  190. li {
  191. width: 25%;
  192. margin: 10px;
  193. position: relative;
  194. height: 250px;
  195. border: 1px solid #f2f2f2;
  196. img,
  197. video {
  198. width: 100%;
  199. margin-top: auto;
  200. margin-bottom: auto;
  201. top: 0;
  202. bottom: 0;
  203. position: absolute;
  204. max-height: 250px;
  205. }
  206. }
  207. }
  208. .home-card {
  209. width: 100%;
  210. overflow: hidden;
  211. padding: 10px 0px;
  212. display: flex;
  213. flex-wrap: wrap;
  214. margin-right: -10px;
  215. .home-right {
  216. width: 100%;
  217. }
  218. .bg:after {
  219. content: '';
  220. width: 110%;
  221. height: 110%;
  222. position: absolute;
  223. left: -5%;
  224. top: -5%;
  225. background: inherit;
  226. filter: blur(10px);
  227. z-index: 2;
  228. }
  229. }
  230. .bh {
  231. height: 60px;
  232. line-height: 30px;
  233. overflow: hidden;
  234. text-overflow: ellipsis;
  235. -webkit-line-clamp: 2;
  236. display: -webkit-box;
  237. -webkit-box-orient: vertical;
  238. }
  239. .bhShow {
  240. height: 100px;
  241. line-height: 25px;
  242. text-align: center;
  243. }
  244. .bhShow span {
  245. font-size: 14px;
  246. }
  247. .show-data {
  248. width: 50%;
  249. display: flex;
  250. flex-direction: column;
  251. align-items: flex-start;
  252. }
  253. a {
  254. font-size: 14px;
  255. }
  256. .actor-photo-list {
  257. display: flex;
  258. padding-left: 0;
  259. li {
  260. width: 25%;
  261. margin: 10px;
  262. position: relative;
  263. height: 250px;
  264. border: 1px solid #f2f2f2;
  265. list-style: none;
  266. img,
  267. video {
  268. width: 100%;
  269. margin-top: auto;
  270. margin-bottom: auto;
  271. top: 0;
  272. bottom: 0;
  273. position: absolute;
  274. max-height: 250px;
  275. }
  276. }
  277. }
  278. </style>
  279. <template>
  280. <a-card :bordered="false" class="only-video-material-disable">
  281. <div class="table-page-search-wrapper">
  282. <a-form layout="inline" :selfUpdate="true">
  283. <a-row :gutter="24">
  284. <a-col :md="8" :sm="8">
  285. <selectTable :projectId.sync="queryParam.productId" ref="selectTable"></selectTable>
  286. </a-col>
  287. <a-col :md="8" :sm="8">
  288. <selectTableProject :projectId.sync="queryParam.projectId" :productId="queryParam.productId" ref="selectTableProject"></selectTableProject>
  289. </a-col>
  290. <a-col :md="8" :sm="8">
  291. <a-form-item label="素材名称">
  292. <a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
  293. </a-form-item>
  294. </a-col>
  295. <a-col :md="8" :sm="8">
  296. <a-form-item label="搜索时间">
  297. <a-range-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width: 100%" />
  298. </a-form-item>
  299. </a-col>
  300. <a-col :md="8" :sm="8">
  301. <a-form-item label="唯一标识">
  302. <a-input placeholder="请输入素材唯一标识" v-model="queryParam.code"></a-input>
  303. </a-form-item>
  304. </a-col>
  305. <a-col :md="8" :sm="8">
  306. <a-form-item label="视频标签">
  307. <el-cascader
  308. placeholder="请选择视频的标签"
  309. v-model="labelValue"
  310. :options="options"
  311. :props="{ checkStrictly: true, value: 'tagCode', label: 'tagName', expandTrigger: 'hover' }"
  312. clearable
  313. style="width: 100%; height: 32px"
  314. filterable
  315. >
  316. </el-cascader>
  317. </a-form-item>
  318. </a-col>
  319. <a-col :md="8" :sm="8">
  320. <a-form-item label="剪辑">
  321. <a-select
  322. v-model="queryParam.clipId"
  323. :filter-option="filterOption"
  324. allowClear
  325. show-search
  326. >
  327. <a-select-option
  328. v-for="item in designList"
  329. :key="item.userId"
  330. :value="item.userId"
  331. >
  332. {{ item.companyName + '_' + item.userName }}
  333. </a-select-option>
  334. </a-select>
  335. </a-form-item>
  336. </a-col>
  337. <a-col :md="8" :sm="8">
  338. <a-form-item label="拍摄">
  339. <a-select
  340. v-model="queryParam.shotId"
  341. :filter-option="filterOption"
  342. allowClear
  343. show-search
  344. >
  345. <a-select-option
  346. v-for="item in designList"
  347. :key="item.userId"
  348. :value="item.userId"
  349. >
  350. {{ item.companyName + '_' + item.userName }}
  351. </a-select-option>
  352. </a-select>
  353. </a-form-item>
  354. </a-col>
  355. <a-col :md="8" :sm="8">
  356. <a-form-item label="编导">
  357. <a-select
  358. v-model="queryParam.planId"
  359. :filter-option="filterOption"
  360. allowClear
  361. show-search
  362. >
  363. <a-select-option
  364. v-for="item in designList"
  365. :key="item.userId"
  366. :value="item.userId"
  367. >
  368. {{ item.companyName + '_' + item.userName }}
  369. </a-select-option>
  370. </a-select>
  371. </a-form-item>
  372. </a-col>
  373. <a-col :md="8" :sm="8" v-if="active == '1'">
  374. <a-form-item label="状态">
  375. <a-select v-model="queryParam.videoStatus">
  376. <a-select-option :value="0">
  377. 不限
  378. </a-select-option>
  379. <a-select-option :value="1">
  380. 未推送
  381. </a-select-option>
  382. <a-select-option :value="2">
  383. 未推送到快手
  384. </a-select-option>
  385. <a-select-option :value="3">
  386. 未推送到头条
  387. </a-select-option>
  388. <a-select-option :value="4">
  389. 推送到快手
  390. </a-select-option>
  391. <a-select-option :value="5">
  392. 推送到头条
  393. </a-select-option>
  394. <a-select-option :value="6">
  395. 已推送到快手&头条
  396. </a-select-option>
  397. </a-select>
  398. </a-form-item>
  399. </a-col>
  400. <a-col :md="8" :sm="8">
  401. <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  402. <a-button type="primary" @click="handleSubmit" icon="search">查询</a-button>
  403. <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
  404. </span>
  405. </a-col>
  406. </a-row>
  407. </a-form>
  408. </div>
  409. <div class="table-operator" style="position: relative; z-index: 100">
  410. <a-button
  411. @click="
  412. visible = true
  413. confirmLoading = false
  414. add = true
  415. "
  416. type="primary"
  417. icon="plus"
  418. >
  419. 新增
  420. </a-button>
  421. <a-button
  422. @click="onCheckAllChange"
  423. v-if="
  424. queryParam.productId &&
  425. active == '1' &&
  426. (role.roleCode == 'operator' ||
  427. role.roleCode == 'kuaishouOperationManager' ||
  428. role.roleCode == 'admin' ||
  429. role.roleCode == 'operationAssistant' ||
  430. role.roleCode == 'touTiaoOperationManager')
  431. "
  432. >
  433. {{ checkAll ? '取消 ( ' + checkArr.length + ' )' : '全选' }}
  434. </a-button>
  435. <a-button
  436. v-if="
  437. queryParam.productId &&
  438. active == '1' &&
  439. (role.roleCode == 'operator' ||
  440. role.roleCode == 'kuaishouOperationManager' ||
  441. role.roleCode == 'admin' ||
  442. role.roleCode == 'operationAssistant' ||
  443. role.roleCode == 'touTiaoOperationManager')
  444. "
  445. :disabled="checkArr.length == 0"
  446. @click="tongbu('1')"
  447. >
  448. 一键同步头条
  449. </a-button>
  450. <a-button
  451. v-if="
  452. queryParam.productId &&
  453. active == '1' &&
  454. (role.roleCode == 'operator' ||
  455. role.roleCode == 'kuaishouOperationManager' ||
  456. role.roleCode == 'admin' ||
  457. role.roleCode == 'operationAssistant' ||
  458. role.roleCode == 'touTiaoOperationManager')
  459. "
  460. :disabled="checkArr.length == 0"
  461. @click="tongbu('3')"
  462. >
  463. 一键同步头条内广
  464. </a-button>
  465. <!-- && -->
  466. <a-button v-if="checkArr.length && active !== '0'" type="primary" @click="handleFodderWind">素材下线</a-button>
  467. <a-button v-if="checkArr.length && active === '0'" type="primary" @click="handleApprovedClick">通过审核</a-button>
  468. </div>
  469. <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
  470. <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
  471. <a-spin :spinning="spinning">
  472. <div v-if="dataSource.length > 0">
  473. <a-checkbox-group @change="onChangeCheck($event, item)" v-model="checkArr" class="home-card">
  474. <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
  475. <span v-if="items.excellent == 0"></span>
  476. <span
  477. v-else
  478. style="position:absolute;top:30px;right:-105px;display:block;width:300px;height:30px;text-align:center;line-height;30px;background:red;transform:rotate(45deg);z-index:1000"
  479. >
  480. 优秀素材
  481. </span>
  482. <div class="home-right">
  483. <a-badge
  484. :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
  485. :numberStyle="{ backgroundColor: '#52c41a' }"
  486. style="width: 100%; display: flex"
  487. @click.stop
  488. >
  489. <span
  490. style="
  491. color: #999;
  492. fontsize: 14px;
  493. padding-bottom: 10px;
  494. display: inline-block;
  495. width: 100%;
  496. white-space: nowrap;
  497. overflow: hidden;
  498. text-overflow: ellipsis;
  499. "
  500. :title="items.projectName"
  501. >
  502. {{ items.projectName }}
  503. </span>
  504. <span
  505. style="
  506. color: #999;
  507. fontsize: 14px;
  508. padding-bottom: 10px;
  509. display: inline-block;
  510. width: 100%;
  511. white-space: nowrap;
  512. overflow: hidden;
  513. text-overflow: ellipsis;
  514. "
  515. :title="items.materialName"
  516. >
  517. {{ items.materialName }}
  518. </span>
  519. <a-icon
  520. type="close-circle"
  521. @click="deleteData(items.id)"
  522. v-show="active == '0'"
  523. v-if="items.userId == userInfo().id"
  524. />
  525. </a-badge>
  526. <div style="display: flex; justify-content: center; width: 100%; height: 200px; position: relative">
  527. <div style="width: 100px; position: absolute; left: 0; z-index: 1000">
  528. <a-tooltip placement="top">
  529. <template slot="title">
  530. <span>{{ items.kuaishouEffiType == 1 ? '快手有效视频' : '已经同步到快手平台' }}</span>
  531. </template>
  532. <img
  533. style="width: 30px; height: 30px"
  534. v-if="items.syncKuaishou == 2"
  535. :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
  536. src="@/views/modules/material/kuaishou.jpg"
  537. />
  538. </a-tooltip>
  539. <a-tooltip placement="top">
  540. <template slot="title">
  541. <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
  542. </template>
  543. <img
  544. v-if="items.syncBytedance == 2 && items.toutiaoEffiType == 1"
  545. style="width: 30px; height: 30px; margin-left: 5px"
  546. src="@/views/modules/material/douyin.jpg"
  547. alt
  548. />
  549. <img
  550. v-else-if="items.syncBytedance == 2 && items.toutiaoEffiType == 0"
  551. style="width: 30px; height: 30px; margin-left: 5px"
  552. src="@/views/modules/material/douyinhui.jpg"
  553. alt
  554. />
  555. </a-tooltip>
  556. </div>
  557. <a-icon
  558. type="fire"
  559. style="font-size: 20px; position: absolute; right: 0; bottom: 10px; z-index: 1000; color: red"
  560. v-if="items.whetherUnaudited"
  561. />
  562. <a-popover
  563. title="视频标签"
  564. @visibleChange="changeTag(items.code)"
  565. :overlayStyle="{ width: '400px' }"
  566. >
  567. <template slot="content" v-if="videoTag.length > 0">
  568. <a-tag v-for="(item, index) of videoTag" :key="index" style="margin: 5px">{{ item }}</a-tag>
  569. </template>
  570. <template slot="content" v-else>
  571. <div style="width: 100%; text-align: center">加载中。。。</div>
  572. </template>
  573. <img
  574. :src="items.coverUrl"
  575. alt
  576. style="height: 200px; max-width: 100%; position: absolute; z-index: 10"
  577. />
  578. </a-popover>
  579. </div>
  580. <div style="width: 100%; height: 1px; border-bottom: 1px solid #f2f2f2; margin-top: 5px"></div>
  581. <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
  582. <div
  583. v-if="active == '1'"
  584. class="bhShow"
  585. style="display: flex; justify-content: space-between"
  586. @click.stop="showData(items)"
  587. >
  588. <div class="show-data">
  589. <span>抖音</span>
  590. <span>消耗:{{ items.bytedanceCost || 0 }}</span>
  591. <span>广告语:{{ items.slogansCount || 0 }}</span>
  592. <span style="display: inline-block;text-align: left;width: 400px;">审核通过时间:{{ items.confirmTime || '-' }}</span>
  593. </div>
  594. <div class="show-data">
  595. <span>快手</span>
  596. <span>消耗:{{ items.cost || 0 }}</span>
  597. <span v-if="items.offlineFlag === 1" style="color: #f00;">状态:已下线</span>
  598. </div>
  599. </div>
  600. <div
  601. style="width: 100%; height: 1px; border-bottom: 1px solid #f2f2f2; margin-top: 5px"
  602. v-if="active != '0'"
  603. ></div>
  604. <span
  605. style="color: black; fontsize: 16px; padding-top: 10px; display: block; width: 100%"
  606. @click.stop
  607. >
  608. <a-popconfirm
  609. @confirm="okEditShow(items, '2')"
  610. v-show="active != '2' && active != '3'"
  611. v-if="
  612. role.roleCode == 'operator' ||
  613. role.roleCode == 'kuaishouOperationManager' ||
  614. role.roleCode == 'admin' ||
  615. role.roleCode == 'operationAssistant' ||
  616. role.roleCode == 'touTiaoOperationManager'
  617. "
  618. >
  619. <div slot="title">
  620. <div>
  621. 驳回原因:
  622. <a-textarea
  623. placeholder="请输入原因"
  624. v-model="refuseReason"
  625. :autosize="{ minRows: 3, maxRows: 10 }"
  626. />
  627. </div>
  628. <div>
  629. 截图:
  630. <uploadFile v-if="refuseFile" :value.sync="refuseFile" :fileCount="15" uploadType="image" />
  631. </div>
  632. </div>
  633. <a href="javascript:;" style="margin-right: 20px">驳回</a>
  634. </a-popconfirm>
  635. <a
  636. href="javascript:;"
  637. style="margin-right: 20px"
  638. v-show="active != '1'"
  639. v-if="
  640. role.roleCode == 'operator' ||
  641. role.roleCode == 'kuaishouOperationManager' ||
  642. role.roleCode == 'admin' ||
  643. role.roleCode == 'operationAssistant' ||
  644. role.roleCode == 'touTiaoOperationManager'
  645. "
  646. @click="handleExamin(items)"
  647. >
  648. 通过审核
  649. </a>
  650. <a-dropdown style="margin-right: 20px">
  651. <a class="ant-dropdown-link" @click="(e) => e.preventDefault()">
  652. 更多操作
  653. <a-icon type="down" />
  654. </a>
  655. <a-menu slot="overlay">
  656. <a-menu-item key="0" v-show="active == '2'" v-if="items.userId == userInfo().id">
  657. <a href="javascript:;" style="margin-right: 20px" @click="edit(items, '2')">修改</a>
  658. </a-menu-item>
  659. <a-menu-item
  660. key="1"
  661. v-show="active != '3'"
  662. v-if="items.userId == userInfo().id || role.roleCode == 'designTeamLeader'"
  663. >
  664. <a href="javascript:;" style="margin-right: 20px" @click="personEdit(items, '2')">人员修改</a>
  665. </a-menu-item>
  666. <a-menu-item key="3" v-show="active != '3'">
  667. <a style="margin-right: 20px" @click="addImage(items)">添加封面</a>
  668. </a-menu-item>
  669. <a-menu-item key="4">
  670. <a style="margin-right: 20px" @click="showImage(items)">推荐封面</a>
  671. </a-menu-item>
  672. <a-menu-item key="5">
  673. <a href="javascript:;" style="margin-right: 20px" @click="editTagList(items)">修改标签</a>
  674. </a-menu-item>
  675. </a-menu>
  676. </a-dropdown>
  677. <a v-show="active === '1'" style="margin-right: 20px" @click="handleRecord(items)">同步记录</a>
  678. <a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
  679. <br />
  680. {{ items.createTime }}
  681. </span>
  682. </div>
  683. </div>
  684. </a-checkbox-group>
  685. <a-pagination
  686. size="small"
  687. :showTotal="ipagination.showTotal"
  688. style="float: right"
  689. v-if="dataSource.length > 0"
  690. showQuickJumper
  691. :pageSize.sync="ipagination.pageSize"
  692. :total="ipagination.total"
  693. v-model="ipagination.current"
  694. @change="getDataSource"
  695. />
  696. </div>
  697. <div v-else style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center">
  698. <img
  699. 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"
  700. alt
  701. v-if="!loading"
  702. />
  703. <div v-else></div>
  704. </div>
  705. </a-spin>
  706. </a-tab-pane>
  707. </a-tabs>
  708. <a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
  709. <template slot="footer">
  710. <a-button key="back" @click="closeImage">取消</a-button>
  711. <a-button key="submit" type="primary" @click="handleOkImage" :loading="loadingImage">确定</a-button>
  712. </template>
  713. <a-form-item label class="add-image-material">
  714. <uploadFile
  715. v-if="addImageVisible"
  716. :value.sync="urlListImage.url"
  717. :checkFile="fileWater"
  718. @overUpload="overUploadImage"
  719. @removeUpload="deleteImage"
  720. :fileCount="15"
  721. uploadType="image"
  722. />
  723. <span
  724. v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
  725. style="color: red"
  726. >
  727. 上传素材的尺寸不符,请修改(
  728. <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
  729. </span>
  730. <span
  731. v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
  732. style="color: green"
  733. >上传成功</span
  734. >
  735. </a-form-item>
  736. </a-modal>
  737. <a-modal title="数据详情" v-model="showDataBool" :footer="null">
  738. <div class="bhShow" style="display: flex; justify-content: space-between; height: 400px">
  739. <div v-if="douyinData" class="show-data">
  740. <span style="color: black; font-size: 18px; text-align: center; width: 100%">抖音</span>
  741. <span>消耗:{{ douyinData.cost }}</span>
  742. <span>封面点击:{{ douyinData.click }}</span>
  743. <span>封面展示:{{ douyinData.showNum }}</span>
  744. <span>激活:{{ douyinData.active }}</span>
  745. <span>转化量:{{ douyinData.convertNum }}</span>
  746. <span>表单提交:{{ douyinData.form }}</span>
  747. <span>下载注册:{{ douyinData.register }}</span>
  748. <span>视频总播放:{{ douyinData.totalPlay }}</span>
  749. <span>视频有效播放:{{ douyinData.validPlay }}</span>
  750. </div>
  751. <div v-if="kuaishouData" class="show-data">
  752. <span style="color: black; font-size: 18px; text-align: center; width: 100%">快手</span>
  753. <span>消耗:{{ kuaishouData.charge }}</span>
  754. <span>封面点击:{{ kuaishouData.photoClick }}</span>
  755. <span>封面展示:{{ kuaishouData.photoShow }}</span>
  756. <span>素材曝光数:{{ kuaishouData.aclick }}</span>
  757. <span>激活数:{{ kuaishouData.activation }}</span>
  758. <span>行为数:{{ kuaishouData.bclick }}</span>
  759. <span>表单提交数:{{ kuaishouData.formCount }}</span>
  760. </div>
  761. </div>
  762. </a-modal>
  763. <a-modal
  764. :title="add ? '添加素材' : '修改素材'"
  765. v-model="visible"
  766. @cancel="close"
  767. @afterClose="close"
  768. :maskClosable="false"
  769. :width="800"
  770. >
  771. <template slot="footer">
  772. <a-button key="back" @click="close">取消</a-button>
  773. <a-button type="primary" :disabled="!confirmLoading" @click="handleOk" :loading="loadingElse">确定</a-button>
  774. </template>
  775. <a-form :form="form">
  776. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
  777. <a-select
  778. v-decorator="[
  779. 'projectId', // 给表单赋值或拉取表单时,该input对应的key
  780. { rules: [{ required: true, message: '请选择项目!' }] },
  781. ]"
  782. @change="getProjectId"
  783. @focus="getParticipateList"
  784. showSearch
  785. optionFilterProp="children"
  786. :filterOption="filterOption"
  787. @search="getParticipateList"
  788. :disabled="!add"
  789. >
  790. <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
  791. {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
  792. item.mediaId == '1'
  793. ? '头条'
  794. : item.mediaId == '2'
  795. ? '快手'
  796. : item.mediaId == '3'
  797. ? '头条内广'
  798. : '快手内广'
  799. }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
  800. </a-select-option>
  801. </a-select>
  802. </a-form-item>
  803. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频素材上传" v-if="getData('projectId')">
  804. <uploadFile
  805. :checkFile="file"
  806. :value.sync="urlList.url"
  807. @overUpload="overUpload"
  808. @removeUpload="removeUpload"
  809. :fileCount="1"
  810. uploadType="video"
  811. :multiple="false"
  812. />
  813. <span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
  814. <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
  815. </a-form-item>
  816. <a-form-item
  817. :label-col="labelCol"
  818. :wrapper-col="wrapperCol"
  819. label="封面上传"
  820. class="add-image-material"
  821. v-if="getData('projectId') && add && urlList.url != ''"
  822. >
  823. <uploadFile
  824. :value.sync="urlListImage.url"
  825. :checkFile="fileWater"
  826. @overUpload="overUploadImage"
  827. @removeUpload="deleteImage"
  828. :fileCount="15"
  829. uploadType="image"
  830. />
  831. <span
  832. v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
  833. style="color: red"
  834. >
  835. 上传素材的尺寸不符,请修改(
  836. <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
  837. </span>
  838. <span
  839. v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
  840. style="color: green"
  841. >
  842. 上传成功
  843. </span>
  844. </a-form-item>
  845. <div v-if="add">
  846. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  847. <a-select
  848. v-decorator="[
  849. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  850. { rules: [{ required: true, message: '请选择策划!' }] },
  851. ]"
  852. showSearch
  853. optionFilterProp="children"
  854. :filterOption="filterOption"
  855. >
  856. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">{{
  857. item.userName
  858. }}</a-select-option>
  859. </a-select>
  860. </a-form-item>
  861. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄" v-if="activeKey == 'video'">
  862. <a-select
  863. v-decorator="[
  864. 'shotId', // 给表单赋值或拉取表单时,该input对应的key
  865. ]"
  866. showSearch
  867. optionFilterProp="children"
  868. :filterOption="filterOption"
  869. >
  870. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">{{
  871. item.userName
  872. }}</a-select-option>
  873. </a-select>
  874. </a-form-item>
  875. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  876. <a-select
  877. v-decorator="[
  878. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  879. { rules: [{ required: true, message: '请选择剪辑!' }] },
  880. ]"
  881. showSearch
  882. optionFilterProp="children"
  883. :filterOption="filterOption"
  884. >
  885. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">{{
  886. item.userName
  887. }}</a-select-option>
  888. </a-select>
  889. </a-form-item>
  890. </div>
  891. <a-form-item
  892. v-if="add && visible"
  893. :label-col="labelCol"
  894. :wrapper-col="{
  895. xs: { span: 24 },
  896. sm: { span: 12 },
  897. }"
  898. label="形式标签"
  899. >
  900. <el-cascader
  901. placeholder="搜索你想要的形式标签"
  902. :options="departTreeModality"
  903. v-decorator="[
  904. 'modalityTagList', // 给表单赋值或拉取表单时,该input对应的key
  905. { rules: [{ required: true, message: '请选择形式标签!' }] },
  906. ]"
  907. :props="{
  908. multiple: true,
  909. value: 'id',
  910. label: 'tagName',
  911. emitPath: false,
  912. checkStrictly: true,
  913. expandTrigger: 'hover',
  914. }"
  915. filterable
  916. style="width: 100%"
  917. >
  918. </el-cascader>
  919. </a-form-item>
  920. <a-form-item
  921. v-if="add && visible"
  922. :label-col="labelCol"
  923. :wrapper-col="{
  924. xs: { span: 24 },
  925. sm: { span: 12 },
  926. }"
  927. label="场景标签"
  928. >
  929. <el-cascader
  930. placeholder="搜索你想要的场景标签"
  931. :options="departTreeSence"
  932. v-decorator="[
  933. 'senceTagList', // 给表单赋值或拉取表单时,该input对应的key
  934. { rules: [{ required: true, message: '请选择场景标签!' }] },
  935. ]"
  936. :props="{
  937. multiple: true,
  938. value: 'id',
  939. label: 'tagName',
  940. emitPath: false,
  941. checkStrictly: true,
  942. expandTrigger: 'hover',
  943. }"
  944. filterable
  945. style="width: 100%"
  946. >
  947. </el-cascader>
  948. </a-form-item>
  949. <a-form-item
  950. :label-col="labelCol"
  951. :wrapper-col="{
  952. xs: { span: 24 },
  953. sm: { span: 12 },
  954. }"
  955. label="基调标签"
  956. v-if="add && visible"
  957. >
  958. <el-cascader
  959. placeholder="搜索你想要的基调标签"
  960. :options="departTreeMod"
  961. v-decorator="[
  962. 'modTagList', // 给表单赋值或拉取表单时,该input对应的key
  963. { rules: [{ required: true, message: '请选择基调标签!' }] },
  964. ]"
  965. :props="{
  966. multiple: true,
  967. value: 'id',
  968. label: 'tagName',
  969. emitPath: false,
  970. checkStrictly: true,
  971. expandTrigger: 'hover',
  972. }"
  973. filterable
  974. style="width: 100%"
  975. >
  976. </el-cascader>
  977. </a-form-item>
  978. <a-form-item
  979. v-if="add"
  980. :label-col="labelCol"
  981. :wrapper-col="{
  982. xs: { span: 24 },
  983. sm: { span: 18 },
  984. }"
  985. label="其他"
  986. >
  987. <template v-for="(tag, index) in tags">
  988. <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
  989. <a-tag :key="tag" :closable="index !== 0" :afterClose="() => handleClose(tag)">
  990. {{ `${tag.slice(0, 20)}...`}}
  991. </a-tag>
  992. </a-tooltip>
  993. <a-tag v-else :key="tag" :closable="true" :afterClose="() => handleClose(tag)">{{ tag }}</a-tag>
  994. </template>
  995. <a-input
  996. v-if="inputVisible"
  997. ref="input"
  998. type="text"
  999. size="small"
  1000. :style="{ width: '78px' }"
  1001. :value="inputValue"
  1002. @change="handleInputChange"
  1003. @blur="handleInputConfirm"
  1004. @keyup.enter="handleInputConfirm"
  1005. />
  1006. <a-tag v-else @click="showInput" style="background: #fff; borderstyle: dashed">
  1007. <a-icon type="plus" />New Tag</a-tag>
  1008. </a-form-item>
  1009. <a-form-item
  1010. v-if="add"
  1011. :label-col="labelCol"
  1012. :wrapper-col="{
  1013. xs: { span: 24 },
  1014. sm: { span: 12 },
  1015. }"
  1016. label="描述"
  1017. >
  1018. <a-textarea
  1019. placeholder="请输入描述"
  1020. v-decorator="[
  1021. 'materialDescribe', // 给表单赋值或拉取表单时,该input对应的key
  1022. ]"
  1023. :auto-size="{ minRows: 3, maxRows: 10 }"
  1024. />
  1025. </a-form-item>
  1026. </a-form>
  1027. </a-modal>
  1028. <a-modal style="overflow-y: auto;" title="素材详情" v-model="visibleDetail" @cancel="handleBudgetCancel" width="70%" :footer="null">
  1029. <div style="width: 100%; height: 35px">
  1030. <a-button type="primary" @click="setSuccess" style="float: right">
  1031. {{ excellent == 0 ? '标记为优秀素材' : '取消标记' }}
  1032. </a-button>
  1033. </div>
  1034. <div style="display: flex; height: 700px">
  1035. <div
  1036. class="video-content"
  1037. style="
  1038. width: 50%;
  1039. padding: 10px;
  1040. box-sizing: border-box;
  1041. display: flex;
  1042. justify-content: center;
  1043. border-right: 1px solid #f2f2f2;
  1044. "
  1045. >
  1046. <video class="video" :src="showUrl" controls="controls" style="height: 50%" controlslist="nodownload">
  1047. 您的浏览器不支持 video 标签。
  1048. </video>
  1049. <div class="downLoad" style="height: 50%; overflow: auto">
  1050. <a-button @click="onCheckAllImageChange" v-if="model.length > 0">
  1051. {{ checkAllImage ? '取消 ( ' + checkArrImage.length + ' )' : '全选' }}
  1052. </a-button>
  1053. <ul
  1054. class="actor-photo-list"
  1055. :style="{ width: model.length > 4 ? 25 * model.length + '%' : '100%' }"
  1056. v-if="model.length > 0"
  1057. >
  1058. <a-checkbox-group
  1059. v-model="checkArrImage"
  1060. style="width: 100%; display: flex; padding-left: 0"
  1061. @change="onChangeCheckImage"
  1062. >
  1063. <li v-for="(item, index) of model" :key="index">
  1064. <a-checkbox :value="item.id" style="position: absolute; z-index: 100"></a-checkbox>
  1065. <img class="video" :src="item.url" @click="coverPreviewShowModal(item, index)" />
  1066. <span
  1067. class="tag-video"
  1068. :style="{
  1069. backgroundColor:
  1070. item.status == 0 ? 'rgba(0, 0, 0)' : item.status == 1 ? 'rgba(0, 180, 100)' : 'red',
  1071. }"
  1072. >{{ item.status == 0 ? '未审核' : item.status == 1 ? '已批准' : '已驳回' }}</span
  1073. >
  1074. </li>
  1075. </a-checkbox-group>
  1076. </ul>
  1077. <div v-else style="height: 100%; display: flex; justify-content: center; align-items: center">
  1078. <img
  1079. 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"
  1080. alt
  1081. />
  1082. </div>
  1083. </div>
  1084. </div>
  1085. <a-modal title="图片预览" v-model="coverPreviewVisible" :footer="null">
  1086. <a-carousel arrows class="cover_carousel_con">
  1087. <div v-for="(item, index) in modelNew" :key="index" class="content">
  1088. <img :src="item.url" :width="300" />
  1089. <div style="margin-top: 10px">
  1090. <a-button type="primary" @click="editImage(item, '1')">通过审核</a-button>
  1091. <a-divider type="vertical" />
  1092. <a-popconfirm @confirm="editImage(item, '2')">
  1093. <div slot="title">
  1094. <div>
  1095. 驳回原因:
  1096. <a-textarea
  1097. placeholder="请输入原因"
  1098. v-model="refuseReasonImage"
  1099. :autosize="{ minRows: 3, maxRows: 10 }"
  1100. />
  1101. </div>
  1102. </div>
  1103. <a-button type="primary">驳回</a-button>
  1104. </a-popconfirm>
  1105. </div>
  1106. </div>
  1107. <a-icon
  1108. type="left-circle"
  1109. slot="prevArrow"
  1110. slot-scope
  1111. style="left: 10px; zindex: 9; font-size: 30px; color: black"
  1112. />
  1113. <a-icon
  1114. type="right-circle"
  1115. slot="nextArrow"
  1116. slot-scope
  1117. style="right: 10px; zindex: 9; font-size: 30px; color: black"
  1118. />
  1119. </a-carousel>
  1120. </a-modal>
  1121. <div style="flex: 3; padding: 10px; box-sizing: border-box; overflow-y: auto;">
  1122. <a-form v-if="detail" class="detail ant-advanced-search-form" layout="inline">
  1123. <div v-if="detail.parameter" style="display: flex">
  1124. <a-form-item label="视频时长" v-if="detail.parameter.second" style="flex: 1">
  1125. {{ detail.parameter.second }}秒
  1126. </a-form-item>
  1127. <a-form-item label="尺寸" style="flex: 1" v-if="detail.parameter.width">
  1128. {{ detail.parameter.width }}*{{ detail.parameter.height }}
  1129. </a-form-item>
  1130. <a-form-item label="大小" style="flex: 1" v-if="detail.parameter.size">
  1131. {{ detail.parameter.size}}
  1132. </a-form-item>
  1133. </div>
  1134. <div v-if="detail.ascription" style="display: flex">
  1135. <a-form-item label="策划" style="flex: 1">{{ detail.ascription.planName }}</a-form-item>
  1136. <a-form-item label="拍摄" style="flex: 1">{{ detail.ascription.shotName }}</a-form-item>
  1137. <a-form-item label="剪辑" v-if="detail.ascription.clipName" style="flex: 1">
  1138. {{ detail.ascription.clipName}}
  1139. </a-form-item>
  1140. </div>
  1141. <div>
  1142. <a-form-item label="标签" v-if="tagInfoList.length > 0">
  1143. <a-tag v-for="(item, index) of tagInfoList" :key="index">{{ item.tagName }}</a-tag>
  1144. </a-form-item>
  1145. </div>
  1146. <div>
  1147. <a-form-item label="其他" v-if="detail.tag">
  1148. <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
  1149. </a-form-item>
  1150. </div>
  1151. <div>
  1152. <a-form-item label="无水印素材下载" v-if="name">
  1153. <a-button type="primary" @click="downloadByBlobShowUrl">下载</a-button>
  1154. </a-form-item>
  1155. </div>
  1156. <div>
  1157. <a-form-item label="水印素材下载" v-if="name">
  1158. <a-button type="primary" @click="downloadByBlob" v-if="showUrlWater">下载</a-button>
  1159. <span v-else>水印素材生成中,请一分钟后刷新</span>
  1160. </a-form-item>
  1161. </div>
  1162. <div>
  1163. <a-form-item label="水印素材链接" v-if="showUrlWater">
  1164. <a-input v-model="showUrlWater" type="text" read-only />
  1165. </a-form-item>
  1166. </div>
  1167. <div style="width: 100%" class="downLoad">
  1168. <a-form-item label="生成水印素材" style="width: 100%">
  1169. <a-select :defaultValue="4" v-model="size" style="width: 80%">
  1170. <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">
  1171. {{ item.name }}
  1172. </a-select-option>
  1173. </a-select>
  1174. <a-button type="primary" @click="getWater" :loading="waterLoading">生成</a-button>
  1175. </a-form-item>
  1176. </div>
  1177. <div>
  1178. <a-form-item label="审核人" v-if="active == '2' && detail.auditorName">
  1179. {{ detail.auditorName }}
  1180. </a-form-item>
  1181. </div>
  1182. <div>
  1183. <a-form-item label="驳回原因" v-if="active == '2'">
  1184. {{ refuseReason ? refuseReason : '无原因' }}</a-form-item>
  1185. </div>
  1186. <div>
  1187. <a-form-item label="截图" v-if="active == '2'">
  1188. <div v-if="refuseFile" style="width: 100%">
  1189. <img
  1190. style="width: 100px; height: auto; margin: 5px"
  1191. @click="showBoHui(item)"
  1192. :src="item"
  1193. v-for="(item, index) in refuseFile"
  1194. :key="index"
  1195. alt
  1196. />
  1197. </div>
  1198. <div v-else>无截图</div>
  1199. </a-form-item>
  1200. </div>
  1201. <div>
  1202. <a-form-item
  1203. label="视频审核"
  1204. v-if="
  1205. active != '2' &&
  1206. (role.roleCode == 'operator' ||
  1207. role.roleCode == 'kuaishouOperationManager' ||
  1208. role.roleCode == 'admin' ||
  1209. role.roleCode == 'operationAssistant' ||
  1210. role.roleCode == 'touTiaoOperationManager')
  1211. "
  1212. >
  1213. <a-popconfirm
  1214. @confirm="edit(null, '0', '1')"
  1215. v-show="active != '1'"
  1216. v-if="
  1217. role.roleCode == 'operator' ||
  1218. role.roleCode == 'kuaishouOperationManager' ||
  1219. role.roleCode == 'admin' ||
  1220. role.roleCode == 'operationAssistant' ||
  1221. role.roleCode == 'touTiaoOperationManager'
  1222. "
  1223. >
  1224. <div slot="title">
  1225. <div>
  1226. 广告语:
  1227. <a-textarea placeholder="请输入" v-model="refuseReason" :autosize="{ minRows: 3, maxRows: 10 }" />
  1228. </div>
  1229. </div>
  1230. <a-button type="primary" v-if="active == '0'" style="margin-right: 10px">通过审核</a-button>
  1231. </a-popconfirm>
  1232. <a-popconfirm @confirm="okEdit" v-show="active != '2'">
  1233. <div slot="title">
  1234. <div>
  1235. 驳回原因:
  1236. <a-textarea
  1237. placeholder="请输入原因"
  1238. v-model="refuseReason"
  1239. :autosize="{ minRows: 3, maxRows: 10 }"
  1240. />
  1241. </div>
  1242. <div>
  1243. 截图:
  1244. <uploadFile v-if="refuseFile" :value.sync="refuseFile" :fileCount="15" uploadType="image" />
  1245. </div>
  1246. </div>
  1247. <a-button type="primary" v-show="active != '2'">驳回</a-button>
  1248. </a-popconfirm>
  1249. </a-form-item>
  1250. </div>
  1251. <div>
  1252. <a-form-item label="封面审核" style="width: 120%">
  1253. <a-button type="primary" :disabled="checkArrImage.length == 0" @click="editImageAll('1')"
  1254. >通过审核</a-button>
  1255. <a-popconfirm @confirm="editImageAll('2')" v-show="active != '2'">
  1256. <div slot="title">
  1257. <div>
  1258. 驳回原因:
  1259. <a-textarea
  1260. placeholder="请输入原因"
  1261. v-model="refuseReasonImage"
  1262. :autosize="{minRows: 3, maxRows: 10}"
  1263. />
  1264. </div>
  1265. </div>
  1266. <a-button type="primary" :disabled="checkArrImage.length != 1" style="margin-left: 10px">驳回</a-button>
  1267. </a-popconfirm>
  1268. </a-form-item>
  1269. </div>
  1270. </a-form>
  1271. <div class="solgan-whole-content">
  1272. <span class="solgan-title-header" style="display: inline-block;width: 60px;">广告语:</span>
  1273. <a-form v-if="slogansDetail.length" :form="solganForm" class="solgan-form-class">
  1274. <a-form-item
  1275. v-for="item in slogansDetail"
  1276. :key="item.id"
  1277. class="solgan-form-model"
  1278. :label-col="labelCol"
  1279. :wrapper-col="wrapperCol"
  1280. label=""
  1281. >
  1282. <div style="width: 430px;">
  1283. <template v-if="item.name === defaultSolganTitle">
  1284. <a-input
  1285. v-decorator="[
  1286. item.name,
  1287. {
  1288. rules: [{validator: validatePass, trigger: 'blur'}],
  1289. initialValue: item.value
  1290. }
  1291. ]"
  1292. class="examin-form-input"
  1293. placeholder="请输入"
  1294. @change="handleSloganSearchChange($event, item.name, item.id)"
  1295. />
  1296. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1297. <a-icon class="examin-form-icon" type="check" @click="handleSolganCheck(item)"/>
  1298. </template>
  1299. <template v-else>
  1300. <span class="default-value-class">{{ item.slogan }}</span>
  1301. <a-icon class="examin-form-icon" type="edit" @click="handleSolganEdit(item)"/>
  1302. </template>
  1303. <a-icon class="examin-form-icon icon-delete" type="delete" @click="handleDelSolgan(item)"/>
  1304. </div>
  1305. <div v-if="item.name === defaultSolganTitle" class="ad-name-tags-class solgan-tags-change">
  1306. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1307. <a-tag
  1308. v-for="val in item.updateTagsList"
  1309. :key="val.id"
  1310. color="#1890ff"
  1311. @click="handleSloganAddTags(val.name, item.name, item.id)"
  1312. >
  1313. + {{ val.name }}
  1314. </a-tag>
  1315. </div>
  1316. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1317. <a-tag
  1318. v-for="val in item.defaultTagsList"
  1319. :key="val.id"
  1320. color="#1890ff"
  1321. @click="handleSloganAddTags(val.name, item.name, item.id)"
  1322. >
  1323. + {{ val.name }}
  1324. </a-tag>
  1325. </div>
  1326. <div v-if="item.tabStatus === 'alone'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'more')">更多</a></div>
  1327. <div v-if="item.tabStatus === 'all'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'little')">收起</a></div>
  1328. </div>
  1329. </a-form-item>
  1330. </a-form>
  1331. <span v-else class="solgan-title-header">暂无</span>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </a-modal>
  1336. <a-modal title="查看截图" v-model="bohuiShow" :width="300" :footer="null">
  1337. <img :src="bohui" alt style="width: 100%" />
  1338. </a-modal>
  1339. <a-modal title="人员修改" v-model="personVisible" @afterClose="closePerson">
  1340. <template slot="footer">
  1341. <a-button key="back" @click="closePerson">取消</a-button>
  1342. <a-button key="submit" type="primary" :loading="loadingPerson" @click="handleOkPerson">确定</a-button>
  1343. </template>
  1344. <a-form :form="formPerson">
  1345. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  1346. <a-select
  1347. v-decorator="[
  1348. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  1349. { rules: [{ required: true, message: '请选择策划!' }] },
  1350. ]"
  1351. showSearch
  1352. optionFilterProp="children"
  1353. :filterOption="filterOption"
  1354. >
  1355. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">
  1356. {{ item.userName }}
  1357. </a-select-option>
  1358. </a-select>
  1359. </a-form-item>
  1360. <a-form-item v-if="activeKey === 'video'" :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄">
  1361. <a-select
  1362. v-decorator="[
  1363. 'shotId', // 给表单赋值或拉取表单时,该input对应的key
  1364. ]"
  1365. showSearch
  1366. optionFilterProp="children"
  1367. :filterOption="filterOption"
  1368. >
  1369. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">
  1370. {{ item.userName }}
  1371. </a-select-option>
  1372. </a-select>
  1373. </a-form-item>
  1374. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  1375. <a-select
  1376. v-decorator="[
  1377. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  1378. { rules: [{ required: true, message: '请选择剪辑!' }] },
  1379. ]"
  1380. showSearch
  1381. optionFilterProp="children"
  1382. :filterOption="filterOption"
  1383. >
  1384. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
  1385. {{ item.userName }}
  1386. </a-select-option>
  1387. </a-select>
  1388. </a-form-item>
  1389. </a-form>
  1390. </a-modal>
  1391. <a-modal title="标签修改" v-model="tagInfoListVisible">
  1392. <template slot="footer">
  1393. <a-button
  1394. key="back"
  1395. @click="
  1396. tagInfoListVisible = false
  1397. departValueInfoModality = []
  1398. departValueInfoMod = []
  1399. departValueInfoContent = []
  1400. departValueInfoSence = []
  1401. tagCode = null
  1402. "
  1403. >
  1404. 取消
  1405. </a-button>
  1406. <a-button key="submit" type="primary" :loading="loadingTag" @click="handleOkTag">确定</a-button>
  1407. </template>
  1408. <a-form-item
  1409. :label-col="labelCol"
  1410. :wrapper-col="{
  1411. xs: { span: 24 },
  1412. sm: { span: 12 },
  1413. }"
  1414. label="形式"
  1415. >
  1416. <el-cascader
  1417. placeholder="搜索你想要的形式标签"
  1418. :options="departTreeModality"
  1419. v-model="departValueInfoModality"
  1420. :props="{
  1421. multiple: true,
  1422. value: 'id',
  1423. label: 'tagName',
  1424. emitPath: false,
  1425. checkStrictly: true,
  1426. expandTrigger: 'hover',
  1427. }"
  1428. filterable
  1429. style="width: 100%"
  1430. ></el-cascader>
  1431. </a-form-item>
  1432. <a-form-item
  1433. :label-col="labelCol"
  1434. :wrapper-col="{
  1435. xs: { span: 24 },
  1436. sm: { span: 12 },
  1437. }"
  1438. label="场景"
  1439. >
  1440. <el-cascader
  1441. placeholder="搜索你想要的场景标签"
  1442. :options="departTreeSence"
  1443. v-model="departValueInfoSence"
  1444. :props="{
  1445. multiple: true,
  1446. value: 'id',
  1447. label: 'tagName',
  1448. emitPath: false,
  1449. checkStrictly: true,
  1450. expandTrigger: 'hover',
  1451. }"
  1452. filterable
  1453. style="width: 100%"
  1454. ></el-cascader>
  1455. </a-form-item>
  1456. <a-form-item
  1457. :label-col="labelCol"
  1458. :wrapper-col="{
  1459. xs: { span: 24 },
  1460. sm: { span: 12 },
  1461. }"
  1462. label="基调"
  1463. >
  1464. <el-cascader
  1465. placeholder="搜索你想要的基调标签"
  1466. :options="departTreeMod"
  1467. v-model="departValueInfoMod"
  1468. :props="{
  1469. multiple: true,
  1470. value: 'id',
  1471. label: 'tagName',
  1472. emitPath: false,
  1473. checkStrictly: true,
  1474. expandTrigger: 'hover',
  1475. }"
  1476. filterable
  1477. style="width: 100%"
  1478. ></el-cascader>
  1479. </a-form-item>
  1480. </a-modal>
  1481. <a-modal title="推荐封面" v-model="chouzhen" width="60%">
  1482. <template slot="footer">
  1483. <a-button key="back" @click="chouzhen = false">关闭</a-button>
  1484. </template>
  1485. <ul v-if="chouzhenList.length > 0" style="height: 600px; overflow: auto">
  1486. <li v-for="(item, index) of chouzhenList" :key="index" class="chouzhen" :class="{ first: index === 0 }">
  1487. <img
  1488. :src="item.url"
  1489. alt
  1490. style="width: 100%"
  1491. @click="
  1492. showImageStr = item.url
  1493. showImageChouzhen = true
  1494. "
  1495. />
  1496. </li>
  1497. </ul>
  1498. <div style="clear: both"></div>
  1499. <a-modal title="图片预览" v-model="showImageChouzhen" :footer="null">
  1500. <img :src="showImageStr" style="width: 100%" />
  1501. </a-modal>
  1502. </a-modal>
  1503. <account-check ref="check" @synchro="implement"></account-check>
  1504. <accountCheckBytedance ref="accountCheckBytedance" @synchro="implement" />
  1505. <permission-modal ref="modalForm" @ok="modalFormOkElse"></permission-modal>
  1506. <a-modal
  1507. v-if="recommendVisible"
  1508. :visible="recommendVisible"
  1509. title="系统推荐标题"
  1510. dialog-class="recommend-modal"
  1511. @ok="handleRecommendSure"
  1512. @cancel="handleRecommendCancel"
  1513. >
  1514. <div>
  1515. <div class="recommend-modal-header">
  1516. <div style="margin-bottom:30px">
  1517. <span style="display:inline-block;width:40px">行业</span>
  1518. <a-cascader
  1519. style="margin-top: 1rem;width:200px"
  1520. :options="recSearchOptions"
  1521. :showSearch="{recomFilter}"
  1522. expandTrigger="hover"
  1523. @change="handleRecSelectChang"
  1524. placeholder="请选择行业"
  1525. >
  1526. <a-icon type="smile" slot="suffixIcon" class="test" />
  1527. </a-cascader>
  1528. </div>
  1529. <div style="margin-bottom:18px">
  1530. <span style="display:inline-block;width:60px;margin-left: 20px;">关键词</span>
  1531. <a-input placeholder="请输入关键词" v-model="keyWordRec" style="width: 150px"/>
  1532. </div>
  1533. <div style="margin-bottom:18px; margin-left: 20px;">
  1534. <a-button type="primary" @click="handleSearchTitle">生成</a-button>
  1535. </div>
  1536. </div>
  1537. <p>已选:{{ finallyCheckedResult && finallyCheckedResult.length || 0}} 个</p>
  1538. <div class="recommend-modal-content">
  1539. <a-checkbox-group @change="handleCheckBoxChang">
  1540. <span
  1541. class="check-box-class"
  1542. v-for="(item, index) in titleResult"
  1543. :key="index"
  1544. >
  1545. <a-checkbox :value="item">{{ item }}</a-checkbox>
  1546. </span>
  1547. </a-checkbox-group>
  1548. </div>
  1549. </div>
  1550. </a-modal>
  1551. <a-modal
  1552. v-if="causeVisible"
  1553. title="审核通过"
  1554. dialog-class="examin-modal"
  1555. :visible="causeVisible"
  1556. :confirm-loading="causeConfirmLoading"
  1557. @ok="handleCauseSure"
  1558. @cancel="handleCauseCancel"
  1559. >
  1560. <div>
  1561. <div class="acount-title">
  1562. <div class="acount-title-left">素材名称</div>
  1563. <div class="acount-title-right">
  1564. <div class="only-title-mater">{{ currentPageOnlyList.materialName }}</div>
  1565. </div>
  1566. </div>
  1567. <div class="acount-title push-plate">
  1568. <div class="acount-title-left">创意标题</div>
  1569. <div class="acount-title-right">
  1570. <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
  1571. <!-- TODO 暂时功能隐藏 -->
  1572. <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
  1573. <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
  1574. </div>
  1575. </div>
  1576. <div class="acount-title">
  1577. <div class="acount-title-left"></div>
  1578. <div class="acount-title-right">
  1579. <a-form :form="examinForm">
  1580. <a-form-item
  1581. v-for="item in defaultFormList"
  1582. :key="item.id"
  1583. class="examin-form-model"
  1584. :label-col="labelCol"
  1585. :wrapper-col="wrapperCol"
  1586. label=""
  1587. >
  1588. <a-input
  1589. v-decorator="[
  1590. item.name,
  1591. {rules: [
  1592. {validator: validatePass, trigger: 'blur'}
  1593. ]}
  1594. ]"
  1595. class="examin-form-input"
  1596. :id="item.name"
  1597. placeholder="请输入"
  1598. @change="handleFormInputChang($event, item.name, item.id)"
  1599. />
  1600. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1601. <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
  1602. <div class="ad-name-tags-class">
  1603. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1604. <a-tag
  1605. v-for="val in item.updateTagsList"
  1606. :key="val.id"
  1607. color="#1890ff"
  1608. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1609. >
  1610. + {{ val.name }}
  1611. </a-tag>
  1612. </div>
  1613. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1614. <a-tag
  1615. v-for="val in item.defaultTagsList"
  1616. :key="val.id"
  1617. color="#1890ff"
  1618. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1619. >
  1620. + {{ val.name }}
  1621. </a-tag>
  1622. </div>
  1623. <div v-if="item.tabStatus === 'alone'"><a @click="handleMoreTagsShow(item.id, 'more')">更多</a></div>
  1624. <div v-if="item.tabStatus === 'all'"><a @click="handleMoreTagsShow(item.id, 'little')">收起</a></div>
  1625. </div>
  1626. </a-form-item>
  1627. </a-form>
  1628. </div>
  1629. </div>
  1630. </div>
  1631. </a-modal>
  1632. <a-modal
  1633. v-if="batchVisible"
  1634. title="审核通过"
  1635. dialog-class="examin-modal"
  1636. :visible="batchVisible"
  1637. @ok="handleBatchSure"
  1638. @cancel="handleBatchCancel"
  1639. >
  1640. <div>
  1641. <div class="acount-title">
  1642. <div class="acount-title-left">素材名称</div>
  1643. <div class="acount-title-right" :style="accountMaster">
  1644. <div class="only-title-mater" v-for="item in modalShowBatchList" :key="item.id">
  1645. {{ item.materialName }}
  1646. </div>
  1647. </div>
  1648. <a-icon :type="materTitltStatus ? 'up' : 'down'" style="margin-top: 5px;margin-left: 15px;" @click="handleMaterTitleClick"/>
  1649. </div>
  1650. <div class="acount-title push-plate">
  1651. <div class="acount-title-left">创意标题</div>
  1652. <div class="acount-title-right">
  1653. <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
  1654. <!-- TODO 暂时功能隐藏 -->
  1655. <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
  1656. <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
  1657. </div>
  1658. </div>
  1659. <div class="acount-title">
  1660. <div class="acount-title-left"></div>
  1661. <div class="acount-title-right">
  1662. <a-form :form="examinForm">
  1663. <a-form-item
  1664. v-for="item in defaultFormList"
  1665. :key="item.id"
  1666. class="examin-form-model"
  1667. :label-col="labelCol"
  1668. :wrapper-col="wrapperCol"
  1669. label=""
  1670. >
  1671. <a-input
  1672. v-decorator="[
  1673. item.name,
  1674. { rules: [
  1675. {validator: validatePass, trigger: 'blur'}
  1676. ]}
  1677. ]"
  1678. class="examin-form-input"
  1679. placeholder="请输入"
  1680. @change="handleFormInputChang($event, item.name, item.id)"
  1681. />
  1682. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1683. <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
  1684. <div class="ad-name-tags-class">
  1685. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1686. <a-tag
  1687. v-for="val in item.updateTagsList"
  1688. :key="val.id"
  1689. color="#1890ff"
  1690. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1691. >
  1692. + {{ val.name }}
  1693. </a-tag>
  1694. </div>
  1695. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1696. <a-tag
  1697. v-for="val in item.defaultTagsList"
  1698. :key="val.id"
  1699. color="#1890ff"
  1700. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1701. >
  1702. + {{ val.name }}
  1703. </a-tag>
  1704. </div>
  1705. <div v-if="item.tabStatus === 'alone'"><a @click="handleMoreTagsShow(item.id, 'more')">更多</a></div>
  1706. <div v-if="item.tabStatus === 'all'"><a @click="handleMoreTagsShow(item.id, 'little')">收起</a></div>
  1707. </div>
  1708. </a-form-item>
  1709. </a-form>
  1710. </div>
  1711. </div>
  1712. </div>
  1713. </a-modal>
  1714. <a-modal v-model="showDataListVisible" title="信息" :footer="null">
  1715. <div v-if="showDataList">
  1716. <p v-for="(item, index) in showDataList" :key="index">
  1717. 素材:{{item.materialName}},{{item.message}};
  1718. <br/>
  1719. 同步账户:{{item.ids.join()}}
  1720. </p>
  1721. </div>
  1722. </a-modal>
  1723. <a-modal
  1724. v-if="recordDetailVisible"
  1725. title="素材同步记录"
  1726. :width="750"
  1727. :visible="recordDetailVisible"
  1728. dialog-class="usage-details-modal change-face-modal change-list-modal-show"
  1729. :footer="null"
  1730. @cancel="handleRecordCancel"
  1731. >
  1732. <div style="overflow: hidden;">
  1733. <a-table
  1734. class="face-right-table"
  1735. ref="table"
  1736. size="middle"
  1737. bordered
  1738. :columns="recordColumns"
  1739. :dataSource="recordData"
  1740. :pagination="recordIpagination"
  1741. :loading="toutiaoMateriaLoading"
  1742. >
  1743. <span slot="createTime" slot-scope="text">
  1744. {{text}}
  1745. </span>
  1746. </a-table>
  1747. </div>
  1748. </a-modal>
  1749. </a-card>
  1750. </template>
  1751. <script>
  1752. import PermissionModal from '@/views/modules/material/modules/DepartModal';
  1753. import {JeecgListMixin} from '@/mixins/JeecgListMixin';
  1754. import JEllipsis from '@/components/jeecg/JEllipsis';
  1755. import UploadToAli from '@femessage/upload-to-ali';
  1756. import selectTable from '@/views/modules/material/comment/selectTable.vue';
  1757. import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate, fileEditUpdateBatch} from '@/api/actor';
  1758. import {deleteAction, getAction, postAction, putAction} from '@/api/manage';
  1759. import uploadFile from '@/components/uploadFile.vue';
  1760. import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
  1761. import accountCheck from '@/views/modules/material/accountCheck';
  1762. import accountCheckBytedance from '@/views/modules/material/accountCheckBytedance';
  1763. import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue';
  1764. import {urlAcount} from '../account-config/account-config-server.js';
  1765. import qs from 'qs';
  1766. import {mapGetters} from 'vuex';
  1767. import moment from 'moment';
  1768. import BMF from 'browser-md5-file';
  1769. export default {
  1770. name: 'creative-copywrit',
  1771. mixins: [JeecgListMixin],
  1772. components: {
  1773. JEllipsis,
  1774. UploadToAli,
  1775. accountCheck,
  1776. selectTable,
  1777. uploadFile,
  1778. PermissionModal,
  1779. accountCheckBytedance,
  1780. selectTableProject
  1781. },
  1782. data() {
  1783. return {
  1784. designList: [],
  1785. adNameTags: [],
  1786. materTitltStatus: false,
  1787. accountMaster: {
  1788. height: '35px',
  1789. overflow: 'hidden'
  1790. },
  1791. batchVisible: false,
  1792. showTabsTitle: '',
  1793. taobaoSpecialOfferTitle: 'taobao',
  1794. defaultSolganStatus: 'input',
  1795. defaultSolganTitle: 'test',
  1796. slogansDetail: [],
  1797. titleFiledResult: [],
  1798. applyTypeOption: [], // 最终的选择结果
  1799. finallyCheckedResult: [], // 最终的选择结果
  1800. titleResult: [],
  1801. dataOne: [],
  1802. recSearchOptions: [],
  1803. keyWordRec: '',
  1804. recommendVisible: false,
  1805. labelCol: {span: 4},
  1806. wrapperCol: {span: 14},
  1807. solganForm: this.$form.createForm(this),
  1808. examinForm: this.$form.createForm(this),
  1809. defaultFormList: [],
  1810. causeVisible: false,
  1811. causeConfirmLoading: false,
  1812. labelValue: [],
  1813. options: [],
  1814. departTree: [],
  1815. departTreeModality: [],
  1816. departTreeContent: [],
  1817. departTreeSence: [],
  1818. departTreeMod: [],
  1819. departValue: [],
  1820. departValueInfo: [],
  1821. departValueInfoModality: [],
  1822. departValueInfoContent: [],
  1823. departValueInfoSence: [],
  1824. departValueInfoMod: [],
  1825. tagInfoList: [],
  1826. tagInfoListVisible: false,
  1827. tagCode: null,
  1828. loadingTag: false,
  1829. showImageChouzhen: false,
  1830. showImageStr: null,
  1831. coverPreviewVisible: false,
  1832. chouzhen: false,
  1833. chouzhenList: [],
  1834. model: [],
  1835. modelNew: [],
  1836. goodsColumns: [
  1837. {
  1838. title: '封面预览',
  1839. dataIndex: 'url',
  1840. align: 'center',
  1841. scopedSlots: {
  1842. customRender: 'url'
  1843. }
  1844. },
  1845. {
  1846. title: '审核',
  1847. align: 'center',
  1848. dataIndex: 'action',
  1849. width: 100,
  1850. scopedSlots: {
  1851. customRender: 'action'
  1852. }
  1853. }
  1854. ],
  1855. addImageVisible: false,
  1856. addImageData: null,
  1857. projectId: '',
  1858. inputVisible: false,
  1859. inputValue: '',
  1860. labelCol: {
  1861. xs: {
  1862. span: 24
  1863. },
  1864. sm: {
  1865. span: 5
  1866. }
  1867. },
  1868. wrapperCol: {
  1869. xs: {
  1870. span: 24
  1871. },
  1872. sm: {
  1873. span: 12
  1874. }
  1875. },
  1876. queryParam: {},
  1877. dataElse: [],
  1878. ascription: {
  1879. clipId: [], // 剪辑人id
  1880. shotId: [], // 拍摄人id
  1881. planId: [], // 策划id
  1882. planeId: [] // 平面id
  1883. },
  1884. show: true,
  1885. visible: false,
  1886. visibleDetail: false,
  1887. personVisible: false,
  1888. confirmLoading: false,
  1889. loadingElse: false,
  1890. loadingImage: false,
  1891. loadingPerson: false,
  1892. activeKey: 'video',
  1893. active: '0',
  1894. examinelList: [
  1895. {
  1896. value: '0',
  1897. tab: '未审核'
  1898. },
  1899. {
  1900. value: '1',
  1901. tab: '已批准'
  1902. },
  1903. {
  1904. value: '2',
  1905. tab: '已驳回'
  1906. }
  1907. ],
  1908. // 表头
  1909. columns: [],
  1910. urlList: {
  1911. url: '',
  1912. md5: '',
  1913. name: ''
  1914. },
  1915. urlListImage: {
  1916. url: [],
  1917. md5: [],
  1918. name: [],
  1919. size: []
  1920. },
  1921. watermarkUrl: {
  1922. url: '',
  1923. md5: '',
  1924. name: ''
  1925. },
  1926. url: {
  1927. list: '/ctop/materialInfo/listV2'
  1928. },
  1929. form: this.$form.createForm(this),
  1930. formPerson: this.$form.createForm(this),
  1931. tags: [],
  1932. refuseFile: [],
  1933. refuseReason: '',
  1934. refuseReasonImage: '',
  1935. creativeCopywriter: '',
  1936. customDomain: '',
  1937. region: 'oss-cn-beijing',
  1938. bucket: 'ctop-media',
  1939. acceptVideo: 'video/mpeg,video/mp4',
  1940. acceptImage: 'image/jpeg,image/jpg,image/png',
  1941. accessKeyId: 'LTAIbNbqWzSOklQV',
  1942. accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
  1943. checkArr: [],
  1944. checkAll: false,
  1945. checkArrImage: [],
  1946. showDataList:[],
  1947. showDataListVisible: false,
  1948. checkAllImage: false,
  1949. showUrl: '',
  1950. showUrlWater: '',
  1951. materialName: '',
  1952. materialDescribe: '',
  1953. name: '',
  1954. detail: null,
  1955. add: true,
  1956. id: '',
  1957. role: {
  1958. roleCode: '',
  1959. roleName: ''
  1960. },
  1961. key: '0',
  1962. mediaId: null,
  1963. sizeType: [],
  1964. size: null,
  1965. repeat: false,
  1966. excellent: 0,
  1967. code: '',
  1968. material: [],
  1969. imageArrList: [],
  1970. showDataBool: false,
  1971. kuaishouData: null,
  1972. douyinData: null,
  1973. bohui: '',
  1974. bohuiShow: false,
  1975. waterLoading: false,
  1976. videoTag: [],
  1977. videoVisibleChange: '',
  1978. modalShowBatchList: [],
  1979. recordDetailVisible:false,
  1980. recordSignature: null,
  1981. toutiaoMateriaLoading:false,
  1982. recordColumns:[
  1983. {
  1984. title: '项目',
  1985. align: 'center',
  1986. dataIndex: 'projectName'
  1987. },
  1988. {
  1989. title: '账户Id',
  1990. align: 'center',
  1991. dataIndex: 'userId',
  1992. customRender: function (text, records) {
  1993. if(records.mediaId == '1' || records.mediaId == '3') {
  1994. return records.accountId
  1995. }else if(records.mediaId == '2' || records.mediaId == '4') {
  1996. return records.userId
  1997. }else {
  1998. return text
  1999. }
  2000. }
  2001. },
  2002. {
  2003. title: '媒体',
  2004. align: 'center',
  2005. dataIndex: 'mediaId',
  2006. customRender: function (text) {
  2007. if (text == '1' || text == '3') {
  2008. return '头条'
  2009. } else if (text == '2' || text == '4') {
  2010. return '快手'
  2011. } else {
  2012. return text
  2013. }
  2014. }
  2015. },
  2016. {
  2017. title: '同步人',
  2018. align: 'center',
  2019. dataIndex: 'userName'
  2020. },
  2021. {
  2022. title: '同步时间',
  2023. align: 'center',
  2024. dataIndex: 'createTime',
  2025. scopedSlots: { customRender: 'createTime' },
  2026. },
  2027. {
  2028. title: '结果',
  2029. align: 'center',
  2030. dataIndex: 'remarks'
  2031. }
  2032. ],
  2033. recordData:[],
  2034. recordIpagination: {
  2035. current: 1,
  2036. pageSize: 10,
  2037. // pageSizeOptions: ['10', '20', '30'],
  2038. showTotal: (total, range) => {
  2039. return range[0] + "-" + range[1] + " 共" + total + "条"
  2040. },
  2041. showQuickJumper: true,
  2042. // showSizeChanger:true,
  2043. // pageSizeOptions: ['10', '30', '50'],
  2044. total: 0,
  2045. onChange: (current, pageSize) => {
  2046. // 切换分页时的回调,
  2047. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  2048. this.recordIpagination.current = current;
  2049. this.recordIpagination.pageSize= pageSize;
  2050. this.handleGetRecordDetail(this.recordSignature)
  2051. }
  2052. },
  2053. };
  2054. },
  2055. filters: {
  2056. getDate(value) {
  2057. let date = new Date(value);
  2058. let y = date.getFullYear();
  2059. let MM = date.getMonth() + 1;
  2060. MM = MM < 10 ? '0' + MM : MM;
  2061. let d = date.getDate();
  2062. d = d < 10 ? '0' + d : d;
  2063. return y + '-' + MM + '-' + d;
  2064. }
  2065. },
  2066. computed: {
  2067. handleFilterName() {
  2068. return val => {
  2069. return this.examinForm.getFieldsValue()[val] ? this.examinForm.getFieldsValue()[val].length : 0;
  2070. };
  2071. },
  2072. handleFilterSlogan() {
  2073. return val => {
  2074. return this.solganForm.getFieldsValue()[val] ? this.solganForm.getFieldsValue()[val].length : 0;
  2075. };
  2076. },
  2077. dirImg() {
  2078. let date = new Date();
  2079. let y = date.getFullYear();
  2080. let MM = date.getMonth() + 1;
  2081. MM = MM < 10 ? '0' + MM : MM;
  2082. let d = date.getDate();
  2083. d = d < 10 ? '0' + d : d;
  2084. return 'image/' + y + '-' + MM + '-' + d + '/';
  2085. },
  2086. dirVideo() {
  2087. let date = new Date();
  2088. let y = date.getFullYear();
  2089. let MM = date.getMonth() + 1;
  2090. MM = MM < 10 ? '0' + MM : MM;
  2091. let d = date.getDate();
  2092. d = d < 10 ? '0' + d : d;
  2093. return 'video/' + y + '-' + MM + '-' + d + '/';
  2094. }
  2095. },
  2096. created() {
  2097. this.queryParam.type = 'VIDEO';
  2098. this.queryParam.userId = this.userInfo().id;
  2099. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2100. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2101. this.ipagination.pageSize = 8;
  2102. this.getParticipateList(null);
  2103. getAction('/sys/user/getRoleInfo', {
  2104. userId: this.userInfo().id
  2105. }).then(res => {
  2106. this.role = res;
  2107. });
  2108. getAction('/ctop/videoWatermarkTemplate/list').then(res => {
  2109. if (res.success) {
  2110. this.sizeType = res.result.records;
  2111. }
  2112. });
  2113. this.getTagListAll();
  2114. },
  2115. updated() {
  2116. stopOtherVideo();
  2117. },
  2118. mounted() {
  2119. setInterval(() => {
  2120. document.querySelectorAll('.el-cascader-node__label').forEach(el => {
  2121. el.onclick = function () {
  2122. if (this.previousElementSibling) {
  2123. this.previousElementSibling.click();
  2124. }
  2125. };
  2126. });
  2127. }, 1000);
  2128. getAction('/ctop/tagInfo/treeList', {
  2129. pageSize: 10000
  2130. }).then(res => {
  2131. if (res.success) {
  2132. this.options = res.result.records;
  2133. }
  2134. else {
  2135. this.$message.error('数据请求失败!');
  2136. }
  2137. });
  2138. this.getHangye();
  2139. this.handleGetCreativeWord();
  2140. this.handleGetDesignList();
  2141. },
  2142. watch: {
  2143. $route(n, o) {
  2144. if (n.path === '/modules/material/videoMaterial') {
  2145. this.queryParam.userId = this.userInfo().id;
  2146. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2147. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2148. this.loadData();
  2149. }
  2150. },
  2151. 'queryParam.productId': function (n, o) {
  2152. if (n != '') {
  2153. this.getList(n);
  2154. this.checkArr = [];
  2155. this.$refs.selectTableProject.keyValue = '';
  2156. this.$refs.selectTableProject.getData(n);
  2157. }
  2158. },
  2159. visibleDetail(n, o) {
  2160. if (!n) {
  2161. this.refuseFile = [];
  2162. this.refuseReason = '';
  2163. closeAllVideoFun();
  2164. }
  2165. },
  2166. defaultFormList: {
  2167. deep: true,
  2168. handler(n, o) {
  2169. const result = [];
  2170. this.defaultFormList = n;
  2171. this.$nextTick(() => {
  2172. this.defaultFormList.forEach(item => {
  2173. if (item.value) {
  2174. result.push(item.value);
  2175. }
  2176. this.examinForm.setFieldsValue({[item.name]: item.value});
  2177. });
  2178. this.titleFiledResult = result;
  2179. });
  2180. }
  2181. },
  2182. labelValue: {
  2183. deep: true,
  2184. handler(n, o) {
  2185. if (n.length >= 1) {
  2186. this.queryParam.tagCode = n[n.length - 1];
  2187. }
  2188. else {
  2189. this.queryParam.tagCode = '';
  2190. }
  2191. }
  2192. }
  2193. },
  2194. methods: {
  2195. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  2196. handleRecordCancel(){
  2197. this.recordDetailVisible = false;
  2198. },
  2199. handleRecord(data){
  2200. this.handleGetRecordDetail(data.code);
  2201. this.recordSignature = data.code;
  2202. this.recordDetailVisible = true;
  2203. this.toutiaoMateriaLoading = true;
  2204. this.kuaishouMateriaLoading = true;
  2205. },
  2206. handleGetRecordDetail(id) {
  2207. // 测试code '7b676546bfb50f1b992d44bd479a1536'
  2208. var params = {}
  2209. params.signature = id
  2210. params.pageNo = this.recordIpagination.current
  2211. params.pageSize = this.recordIpagination.pageSize
  2212. getAction('/ctop/materialUpload/uploadDetail', params).then(result => {
  2213. if (result.success) {
  2214. // 头条处理数据
  2215. this.recordData = result.result.list || []
  2216. this.recordIpagination.total = result.result.total || 0
  2217. }
  2218. else {
  2219. this.$message.error(result.message);
  2220. }
  2221. }).catch(error => {
  2222. console.log(error, 'eeee');
  2223. }).finally(() => {
  2224. this.toutiaoMateriaLoading = false;
  2225. this.kuaishouMateriaLoading = false;
  2226. });
  2227. },
  2228. handleBudgetCancel() {
  2229. this.defaultSolganTitle = 'test';
  2230. this.defaultSolganStatus = 'input';
  2231. this.visibleDetail = false;
  2232. },
  2233. // 获取设计人员
  2234. handleGetDesignList() {
  2235. postAction('/ctop/kuaishou/videoReport/getDesignList').then(result => {
  2236. if (result.success) {
  2237. this.designList = result.result;
  2238. }
  2239. }).catch(error => {
  2240. console.log(error, 'eeee');
  2241. });
  2242. },
  2243. handleSubmit() {
  2244. if (!this.queryParam.productId) {
  2245. this.$refs.selectTableProject.keyValue = '';
  2246. this.$refs.selectTableProject.getData();
  2247. }
  2248. this.searchQuery();
  2249. this.checkArr = [];
  2250. },
  2251. handleExaminMoreList(val, type) {
  2252. if (type === 'more') {
  2253. this.slogansDetail.forEach(item => {
  2254. if (item.id === val) {
  2255. item.tabStatus = 'all';
  2256. }
  2257. });
  2258. }
  2259. else if (type === 'little') {
  2260. this.slogansDetail.forEach(item => {
  2261. if (item.id === val) {
  2262. item.tabStatus = 'alone';
  2263. }
  2264. });
  2265. }
  2266. },
  2267. handleMoreTagsShow(val, type) {
  2268. if (type === 'more') {
  2269. this.defaultFormList.forEach(item => {
  2270. if (item.id === val) {
  2271. item.tabStatus = 'all';
  2272. }
  2273. });
  2274. }
  2275. else if (type === 'little') {
  2276. this.defaultFormList.forEach(item => {
  2277. if (item.id === val) {
  2278. item.tabStatus = 'alone';
  2279. }
  2280. });
  2281. }
  2282. },
  2283. handleGetCreativeWord() {
  2284. getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
  2285. if (result.code === 0) {
  2286. this.adNameTags = result.result.records;
  2287. }
  2288. else {
  2289. this.$message.error(result.message);
  2290. }
  2291. }).catch(error => {
  2292. console.log(error, 'eeee');
  2293. });
  2294. },
  2295. validatePass(rule, value, callback) {
  2296. this.$nextTick(() => {
  2297. let finallyLenList = this.handleJudgeExec(value);
  2298. let newOptionList = [];
  2299. finallyLenList.forEach(item => {
  2300. this.adNameTags.forEach(val => {
  2301. if (item === val.name) {
  2302. newOptionList.push(val);
  2303. }
  2304. });
  2305. });
  2306. let updateFinallyResult = newOptionList.map(val => val.name);
  2307. let resultSelectSize = 0;
  2308. if (updateFinallyResult.length) {
  2309. const inputDefaultLen = this.handleExportRules(value);
  2310. let tagsLen = updateFinallyResult.length * 2;
  2311. let tagsSureLen = 0;
  2312. updateFinallyResult.forEach(item => {
  2313. this.adNameTags.forEach(val => {
  2314. if (item === val.name) {
  2315. tagsSureLen += val.maxWordLen;
  2316. }
  2317. });
  2318. });
  2319. updateFinallyResult.forEach(item => {
  2320. tagsLen += item.length;
  2321. });
  2322. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2323. }
  2324. else {
  2325. resultSelectSize = this.handleExportRules(value);
  2326. }
  2327. if (resultSelectSize === 0) {
  2328. callback(new Error('请输入'));
  2329. }
  2330. else if (resultSelectSize > 30 || resultSelectSize < 5) {
  2331. callback(new Error('创意标题5-30个字'));
  2332. }
  2333. else if (updateFinallyResult.length > 2) {
  2334. callback(new Error('最多选择两个词包'));
  2335. }
  2336. else {
  2337. callback();
  2338. }
  2339. });
  2340. },
  2341. handleJudgeExec(item) {
  2342. let re = /\{(.+?)\}/g;
  2343. let array = [];
  2344. let temp;
  2345. while ((temp = re.exec(item))) {
  2346. array.push(temp[1]);
  2347. };
  2348. return array;
  2349. },
  2350. handleSloganAddTags(item, field, formId) {
  2351. let node = document.getElementById(field);
  2352. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  2353. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  2354. let txt = node.value;
  2355. this.$nextTick(() => {
  2356. let finallyLenList = this.handleJudgeExec(txt);
  2357. let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
  2358. if (updateFinallyResult.length >= 2) {
  2359. this.$message.error('最多选择两个词包');
  2360. return;
  2361. }
  2362. if (startPos === 0 || endPos === 0) {
  2363. txt += '{' + item + '}';
  2364. this.solganForm.setFieldsValue({[field]: txt});
  2365. }
  2366. else {
  2367. this.solganForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
  2368. node.selectionStart = startPos + item.length + 6;
  2369. node.selectionEnd = startPos + item.length + 6;
  2370. }
  2371. node.focus();
  2372. node.blur();
  2373. });
  2374. this.$nextTick(() => {
  2375. const dynamicWordPackIds = [];
  2376. let changeData = this.handleJudgeExec(this.solganForm.getFieldsValue()[field]);
  2377. let newOptionList = [];
  2378. changeData.forEach(item => {
  2379. this.adNameTags.forEach(val => {
  2380. if (item === val.name) {
  2381. newOptionList.push(val);
  2382. }
  2383. });
  2384. });
  2385. let updateChangeData = newOptionList.map(val => val.name);
  2386. const inputDefaultLen = this.handleExportRules(this.solganForm.getFieldsValue()[field]);
  2387. let tagsLen = updateChangeData.length * 2;
  2388. let tagsSureLen = 0;
  2389. let resultSelectSize = 0;
  2390. updateChangeData.forEach(item => {
  2391. this.adNameTags.forEach(val => {
  2392. if (item === val.name) {
  2393. tagsSureLen += val.maxWordLen;
  2394. dynamicWordPackIds.push(val.creativeWordId);
  2395. }
  2396. });
  2397. });
  2398. updateChangeData.forEach(item => {
  2399. tagsLen += item.length;
  2400. });
  2401. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
  2402. this.slogansDetail.forEach(item => {
  2403. if (item.id === formId) {
  2404. item.lenSize = resultSelectSize;
  2405. item.value = this.solganForm.getFieldsValue()[field];
  2406. item.wordPackId = dynamicWordPackIds;
  2407. }
  2408. });
  2409. });
  2410. },
  2411. // 点击获取光标位置进行字段插入
  2412. handleGetChangeAll(item, field, formId) {
  2413. let node = document.getElementById(field);
  2414. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  2415. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  2416. let txt = node.value;
  2417. this.$nextTick(() => {
  2418. let finallyLenList = this.handleJudgeExec(txt);
  2419. let arr = [];
  2420. finallyLenList.forEach(item => {
  2421. this.adNameTags.forEach(val => {
  2422. if (item === val.name) {
  2423. arr.push(val);
  2424. }
  2425. });
  2426. });
  2427. let updateFinallyResult = arr.map(val => val.name);
  2428. if (updateFinallyResult.length >= 2) {
  2429. this.$message.error('最多选择两个词包');
  2430. return;
  2431. }
  2432. if (startPos === 0 || endPos === 0) {
  2433. txt += '{' + item + '}';
  2434. this.examinForm.setFieldsValue({[field]: txt});
  2435. }
  2436. else {
  2437. this.examinForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
  2438. node.selectionStart = startPos + item.length + 6;
  2439. node.selectionEnd = startPos + item.length + 6;
  2440. }
  2441. node.focus();
  2442. node.blur();
  2443. });
  2444. this.$nextTick(() => {
  2445. const dynamicWordPackIds = [];
  2446. let changeData = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
  2447. let newOptionList = [];
  2448. changeData.forEach(item => {
  2449. this.adNameTags.forEach(val => {
  2450. if (item === val.name) {
  2451. newOptionList.push(val);
  2452. }
  2453. });
  2454. });
  2455. let updateChangeData = newOptionList.map(val => val.name);
  2456. const inputDefaultLen = this.handleExportRules(this.examinForm.getFieldsValue()[field]);
  2457. let tagsLen = updateChangeData.length * 2;
  2458. let tagsSureLen = 0;
  2459. let resultSelectSize = 0;
  2460. updateChangeData.forEach(item => {
  2461. this.adNameTags.forEach(val => {
  2462. if (item === val.name) {
  2463. tagsSureLen += val.maxWordLen;
  2464. dynamicWordPackIds.push(val.creativeWordId);
  2465. }
  2466. });
  2467. });
  2468. updateChangeData.forEach(item => {
  2469. tagsLen += item.length;
  2470. });
  2471. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
  2472. this.defaultFormList.forEach(item => {
  2473. if (item.id === formId) {
  2474. item.lenSize = resultSelectSize;
  2475. item.value = this.examinForm.getFieldsValue()[field];
  2476. item.wordPackId = dynamicWordPackIds;
  2477. }
  2478. });
  2479. });
  2480. },
  2481. handleMaterTitleClick() {
  2482. this.materTitltStatus = !this.materTitltStatus;
  2483. if (this.materTitltStatus) {
  2484. this.accountMaster = {
  2485. height: 'auto'
  2486. };
  2487. }
  2488. else {
  2489. this.accountMaster = {
  2490. height: '35px',
  2491. overflow: 'hidden'
  2492. };
  2493. }
  2494. },
  2495. handleApprovedClick() {
  2496. const batchList = [];
  2497. this.defaultFormList = [];
  2498. this.dataSource.forEach(item => {
  2499. if (this.checkArr.includes(item.id)) {
  2500. batchList.push(item);
  2501. }
  2502. });
  2503. this.modalShowBatchList = batchList;
  2504. this.batchVisible = true;
  2505. this.materTitltStatus = false;
  2506. this.accountMaster = {
  2507. height: '35px',
  2508. overflow: 'hidden'
  2509. };
  2510. for (let i = 0; i < 3; i++) {
  2511. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2512. this.defaultFormList.push({
  2513. id: randomNum,
  2514. name: 'username' + randomNum,
  2515. value: '',
  2516. lenSize: 0,
  2517. tabStatus: 'alone',
  2518. defaultTagsList: this.adNameTags,
  2519. updateTagsList: this.adNameTags.slice(0, 4)
  2520. });
  2521. }
  2522. },
  2523. handleBatchSure() {
  2524. if (this.defaultFormList && this.defaultFormList.length < 3) {
  2525. this.$message.error('请至少输入3条标题');
  2526. return;
  2527. }
  2528. let changeSlogan = this.defaultFormList;
  2529. changeSlogan.forEach(item => {
  2530. item.title = item.value;
  2531. item.creative_word_ids = item.wordPackId;
  2532. });
  2533. let params = {
  2534. ids: this.modalShowBatchList.map(item => item.id) || [],
  2535. auditorId: this.userInfo().id,
  2536. status: 1,
  2537. slogans: changeSlogan
  2538. };
  2539. this.examinForm.validateFields(err => {
  2540. if (!err) {
  2541. fileEditUpdateBatch(params).then(res => {
  2542. if (res.code === 0) {
  2543. this.refuseReason = '';
  2544. this.batchVisible = false;
  2545. this.defaultFormList = [];
  2546. this.$message.success('审核成功');
  2547. this.loadData();
  2548. }
  2549. else {
  2550. this.$message.error(res.message);
  2551. }
  2552. });
  2553. }
  2554. });
  2555. },
  2556. handleBatchCancel() {
  2557. this.batchVisible = false;
  2558. },
  2559. handleFodderWind() {
  2560. if (this.checkArr.length > 8) {
  2561. this.$message.error('最多可以支持同时选择8个视频');
  2562. return;
  2563. }
  2564. const paramsData = {
  2565. offlineFlag: 1,
  2566. id: this.checkArr.join(',')
  2567. };
  2568. let that = this;
  2569. this.$confirm({
  2570. title: '下线提示',
  2571. content: '是否下线选中视频',
  2572. onOk() {
  2573. getAction(urlAcount + '/bytedance-api/advertiser/materialInfoController/updMaterialOfflineById', paramsData).then(result => {
  2574. if (result.code === 0) {
  2575. that.searchQuery();
  2576. that.checkArr = [];
  2577. that.$message.success(result.message);
  2578. }
  2579. else {
  2580. that.$message.error(result.message);
  2581. }
  2582. }).catch(error => {
  2583. console.log(error, 'eeee');
  2584. });
  2585. }
  2586. });
  2587. },
  2588. compareToFirstPassword(rule, value, callback) {
  2589. if (value && value.length > 30 || value.length < 5) {
  2590. callback('创意标题5-30个字');
  2591. }
  2592. else {
  2593. callback();
  2594. }
  2595. },
  2596. handleExportRules(value) {
  2597. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2598. let length = 0;
  2599. let strArr = value.split('');
  2600. strArr.forEach(item => {
  2601. if (cnReg.test(item)) {
  2602. length += 1;
  2603. }
  2604. else {
  2605. length += 0.5;
  2606. }
  2607. });
  2608. return Math.ceil(length);
  2609. },
  2610. handleGetQueryById() {
  2611. getAction('/ctop/materialInfo/queryById', {
  2612. id: this.id
  2613. }).then(res => {
  2614. if (res.success) {
  2615. this.showUrlWater = res.result.watermarkUrl;
  2616. this.name = res.result.watermarkCode;
  2617. this.materialName = res.result.materialName;
  2618. res.result.slogans.forEach(item => {
  2619. let finallyLenList = this.handleJudgeExec(item.slogan);
  2620. let resultSelectSize = 0;
  2621. if (finallyLenList.length) {
  2622. const inputDefaultLen = this.handleExportRules(item.slogan);
  2623. let tagsLen = finallyLenList.length * 2;
  2624. let tagsSureLen = 0;
  2625. finallyLenList.forEach(item => {
  2626. this.adNameTags.forEach(val => {
  2627. if (item === val.name) {
  2628. tagsSureLen += val.maxWordLen;
  2629. }
  2630. });
  2631. });
  2632. finallyLenList.forEach(item => {
  2633. tagsLen += item.length;
  2634. });
  2635. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
  2636. }
  2637. else {
  2638. resultSelectSize = this.handleExportRules(item.slogan);
  2639. }
  2640. item.name = 'username' + item.id;
  2641. item.value = item.slogan;
  2642. item.lenSize = resultSelectSize;
  2643. item.tabStatus = 'alone';
  2644. item.defaultTagsList = this.adNameTags;
  2645. item.updateTagsList = this.adNameTags.slice(0, 4);
  2646. });
  2647. this.slogansDetail = res.result.slogans;
  2648. }
  2649. else {
  2650. this.showUrlWater = null;
  2651. this.name = null;
  2652. }
  2653. });
  2654. },
  2655. handleDelSolgan(data) {
  2656. if (this.slogansDetail && this.slogansDetail.length <= 3) {
  2657. this.$message.error('删除失败,广告语不能少于三条');
  2658. return;
  2659. }
  2660. if (this.defaultSolganStatus === 'edit') {
  2661. this.defaultSolganStatus = 'input';
  2662. }
  2663. let formdata = new FormData();
  2664. formdata.append('id', data.id);
  2665. postAction('/ctop/bytedanceVideoSlogenInfo/delete', formdata).then(res => {
  2666. if (res.success) {
  2667. this.$message.success('删除成功');
  2668. this.handleGetQueryById();
  2669. }
  2670. });
  2671. },
  2672. handleSolganCheck(data) {
  2673. let changeSlogan = this.slogansDetail;
  2674. changeSlogan.forEach(item => {
  2675. item.title = item.value;
  2676. item.creative_word_ids = item.wordPackId;
  2677. });
  2678. this.solganForm.validateFields(err => {
  2679. if (!err) {
  2680. postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
  2681. id: data.id,
  2682. slogan: changeSlogan.filter(item => item.id === data.id)[0].title,
  2683. creativeWordIds: JSON.stringify(changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids)
  2684. }).then(res => {
  2685. if (res.code === 0) {
  2686. this.defaultSolganStatus = 'input';
  2687. this.defaultSolganTitle = 'test';
  2688. this.$message.success('修改成功');
  2689. this.handleGetQueryById();
  2690. }
  2691. else {
  2692. this.$message.error(res.message);
  2693. }
  2694. });
  2695. }
  2696. });
  2697. },
  2698. handleSolganEdit(data) {
  2699. if (this.defaultSolganStatus === 'edit') {
  2700. this.$message.error('请先完成上一次的修改');
  2701. return;
  2702. }
  2703. this.defaultSolganTitle = data.name;
  2704. this.defaultSolganStatus = 'edit';
  2705. this.$nextTick(() => {
  2706. this.solganForm.setFieldsValue({[data.name]: data.slogan});
  2707. });
  2708. },
  2709. handleSloganSearchChange(e, field, formId) {
  2710. this.$nextTick(() => {
  2711. const dynamicWordPackIds = [];
  2712. let finallyLenList = this.handleJudgeExec(e.target.value);
  2713. let newOptionList = [];
  2714. finallyLenList.forEach(item => {
  2715. this.adNameTags.forEach(val => {
  2716. if (item === val.name) {
  2717. newOptionList.push(val);
  2718. }
  2719. });
  2720. });
  2721. let updateFinallyResult = newOptionList.map(val => val.name);
  2722. const inputDefaultLen = this.handleExportRules(e.target.value);
  2723. let tagsLen = updateFinallyResult.length * 2;
  2724. let tagsSureLen = 0;
  2725. let resultSelectSize = 0;
  2726. updateFinallyResult.forEach(item => {
  2727. this.adNameTags.forEach(val => {
  2728. if (item === val.name) {
  2729. tagsSureLen += val.maxWordLen;
  2730. dynamicWordPackIds.push(val.creativeWordId);
  2731. }
  2732. });
  2733. });
  2734. updateFinallyResult.forEach(item => {
  2735. tagsLen += item.length;
  2736. });
  2737. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2738. this.slogansDetail.forEach(item => {
  2739. if (item.id === formId) {
  2740. item.lenSize = resultSelectSize;
  2741. item.wordPackId = dynamicWordPackIds;
  2742. item.value = e.target.value;
  2743. }
  2744. });
  2745. });
  2746. },
  2747. handleFormInputChang(e, field, formId) {
  2748. const changeFiled = [];
  2749. this.defaultFormList.forEach(item => {
  2750. if (item.id === formId) {
  2751. item.value = e.target.value;
  2752. }
  2753. });
  2754. this.defaultFormList.forEach(item => {
  2755. if (item.value) {
  2756. changeFiled.push(item.value);
  2757. }
  2758. });
  2759. this.$nextTick(() => {
  2760. const dynamicWordPackIds = [];
  2761. let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
  2762. let newOptionList = [];
  2763. finallyLenList.forEach(item => {
  2764. this.adNameTags.forEach(val => {
  2765. if (item === val.name) {
  2766. newOptionList.push(val);
  2767. }
  2768. });
  2769. });
  2770. let updateFinallyResult = newOptionList.map(val => val.name);
  2771. const inputDefaultLen = this.handleExportRules(this.defaultFormList.filter(item => item.id === formId)[0].value);
  2772. let tagsLen = updateFinallyResult.length * 2;
  2773. let tagsSureLen = 0;
  2774. let resultSelectSize = 0;
  2775. updateFinallyResult.forEach(item => {
  2776. this.adNameTags.forEach(val => {
  2777. if (item === val.name) {
  2778. tagsSureLen += val.maxWordLen;
  2779. dynamicWordPackIds.push(val.creativeWordId);
  2780. }
  2781. });
  2782. });
  2783. updateFinallyResult.forEach(item => {
  2784. tagsLen += item.length;
  2785. });
  2786. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2787. this.defaultFormList.forEach(item => {
  2788. if (item.id === formId) {
  2789. item.lenSize = resultSelectSize;
  2790. item.wordPackId = dynamicWordPackIds;
  2791. }
  2792. });
  2793. this.titleFiledResult = changeFiled;
  2794. });
  2795. },
  2796. handleCheckBoxChang(data) {
  2797. this.applyTypeOption = data;
  2798. this.finallyCheckedResult = data;
  2799. },
  2800. handleSearchTitle() {
  2801. if (!this.keyWordRec) {
  2802. this.$message.error('请输入关键词进行搜索!');
  2803. return;
  2804. }
  2805. getAction('/ctop/creativeTitle/titleSearch', {
  2806. firstCategory: this.dataOne[0],
  2807. secondCategory: this.dataOne[1],
  2808. keywords: this.keyWordRec
  2809. }).then(res => {
  2810. this.titleResult = res.result ? res.result : [];
  2811. });
  2812. },
  2813. recomFilter(inputValue, path) {
  2814. return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
  2815. },
  2816. getHangye() {
  2817. getAction('/ctop/creativeTitle/getTitleLabel', '').then(res => {
  2818. if (res.success) {
  2819. this.recSearchOptions = res.result.map(item => {
  2820. return {
  2821. label: item.label,
  2822. value: item.value,
  2823. children:
  2824. item.children.length > 0
  2825. ? [{label: '不限', value: 0}].concat(item.children)
  2826. : [{label: '不限', value: 0}]
  2827. };
  2828. });
  2829. this.recSearchOptions = [{label: '不限', value: 0}].concat(this.recSearchOptions);
  2830. }
  2831. });
  2832. },
  2833. handleRecSelectChang(value, selectedOptions) {
  2834. this.dataOne = value;
  2835. this.keyWordRec = '';
  2836. },
  2837. handleRecommendSure() {
  2838. if (!this.applyTypeOption.length) {
  2839. this.$message.error('请选择标题');
  2840. return;
  2841. }
  2842. this.recommendVisible = false;
  2843. this.keyWordRec = '';
  2844. let formData = this.defaultFormList;
  2845. this.defaultFormList = formData.filter(item => item.value !== '');
  2846. this.applyTypeOption.forEach(item => {
  2847. const dateTime = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2848. const name = 'username' + dateTime;
  2849. this.defaultFormList.push({
  2850. id: dateTime,
  2851. name: name,
  2852. value: item,
  2853. tabStatus: 'alone',
  2854. defaultTagsList: this.adNameTags,
  2855. updateTagsList: this.adNameTags.slice(0, 4)
  2856. });
  2857. });
  2858. this.titleResult = [];
  2859. this.finallyCheckedResult = [];
  2860. setTimeout(() => {
  2861. this.applyTypeOption = [];
  2862. }, 200);
  2863. },
  2864. handleRecommendCancel() {
  2865. this.recommendVisible = false;
  2866. this.keyWordRec = '';
  2867. this.titleResult = [];
  2868. this.finallyCheckedResult = [];
  2869. },
  2870. handleSelectTitle() {
  2871. this.recommendVisible = true;
  2872. },
  2873. handleAddOrigin() {
  2874. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2875. this.defaultFormList.push({
  2876. id: randomNum,
  2877. name: 'username' + randomNum,
  2878. value: '',
  2879. lenSize: 0,
  2880. tabStatus: 'alone',
  2881. defaultTagsList: this.adNameTags,
  2882. updateTagsList: this.adNameTags.slice(0, 4)
  2883. });
  2884. },
  2885. handleDelOrigin(list) {
  2886. let formData = this.defaultFormList;
  2887. this.defaultFormList = formData.filter(item => list.id !== item.id);
  2888. },
  2889. handleExamin(data) {
  2890. this.defaultFormList = [];
  2891. getAction('/ctop/materialInfo/queryById', {
  2892. id: data.id
  2893. }).then(res => {
  2894. if (res.success) {
  2895. if (res.result.slogans.length) {
  2896. res.result.slogans.forEach(item => {
  2897. let finallyLenList = this.handleJudgeExec(item.slogan);
  2898. let newOptionList = [];
  2899. finallyLenList.forEach(item => {
  2900. this.adNameTags.forEach(val => {
  2901. if (item === val.name) {
  2902. newOptionList.push(val);
  2903. }
  2904. });
  2905. });
  2906. let resultSelectSize = 0;
  2907. if (newOptionList.length) {
  2908. const inputDefaultLen = this.handleExportRules(item.slogan);
  2909. let tagsLen = newOptionList.length * 2;
  2910. let tagsSureLen = 0;
  2911. newOptionList.forEach(item => {
  2912. this.adNameTags.forEach(val => {
  2913. if (item.name === val.name) {
  2914. tagsSureLen += val.maxWordLen;
  2915. }
  2916. });
  2917. });
  2918. finallyLenList.forEach(item => {
  2919. tagsLen += item.length;
  2920. });
  2921. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + newOptionList.length;
  2922. }
  2923. else {
  2924. resultSelectSize = item.slogan.length;
  2925. }
  2926. item.name = 'username' + item.id;
  2927. item.value = item.slogan;
  2928. item.lenSize = resultSelectSize;
  2929. item.tabStatus = 'alone';
  2930. item.defaultTagsList = this.adNameTags;
  2931. item.updateTagsList = this.adNameTags.slice(0, 4);
  2932. item.wordPackId = item.creativeWordIds && JSON.parse(item.creativeWordIds);
  2933. });
  2934. this.defaultFormList = res.result.slogans;
  2935. }
  2936. else {
  2937. for (let i = 0; i < 3; i++) {
  2938. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2939. this.defaultFormList.push({
  2940. id: randomNum,
  2941. name: 'username' + randomNum,
  2942. value: '',
  2943. lenSize: 0,
  2944. tabStatus: 'alone',
  2945. defaultTagsList: this.adNameTags,
  2946. updateTagsList: this.adNameTags.slice(0, 4)
  2947. });
  2948. }
  2949. }
  2950. }
  2951. else {
  2952. this.showUrlWater = null;
  2953. this.name = null;
  2954. }
  2955. });
  2956. this.currentPageOnlyList = data;
  2957. this.causeVisible = true;
  2958. this.recommendVisible = false;
  2959. this.titleResult = [];
  2960. this.checkArr = [];
  2961. },
  2962. handleCauseCancel() {
  2963. this.causeVisible = false;
  2964. this.defaultFormList = [];
  2965. },
  2966. handleCauseSure() {
  2967. if (this.defaultFormList && this.defaultFormList.length < 3) {
  2968. this.$message.error('请至少输入3条标题');
  2969. return;
  2970. }
  2971. let changeSlogan = this.defaultFormList;
  2972. changeSlogan.forEach(item => {
  2973. item.title = item.value;
  2974. item.creative_word_ids = item.wordPackId;
  2975. });
  2976. let params = {
  2977. id: this.currentPageOnlyList.id,
  2978. auditorId: this.userInfo().id,
  2979. status: 1,
  2980. slogans: changeSlogan
  2981. };
  2982. this.examinForm.validateFields(err => {
  2983. if (!err) {
  2984. fileEditUpdate(params).then(res => {
  2985. if (res.code === 0) {
  2986. this.refuseReason = '';
  2987. this.causeVisible = false;
  2988. this.defaultFormList = [];
  2989. this.$message.success('审核成功');
  2990. this.loadData();
  2991. }
  2992. else {
  2993. this.$message.error(res.message);
  2994. }
  2995. });
  2996. }
  2997. });
  2998. },
  2999. changeTag(visible) {
  3000. if (this.videoVisibleChange !== visible) {
  3001. this.videoVisibleChange = visible;
  3002. this.videoTag = [];
  3003. getAction('/ctop/materialTagInfo/list', {code: visible}).then(res => {
  3004. this.videoTag = res.result.records.map(item => {
  3005. return item.tagName;
  3006. });
  3007. });
  3008. }
  3009. else {
  3010. return;
  3011. }
  3012. },
  3013. modalFormOkElse() {
  3014. this.getTagListAll();
  3015. },
  3016. handleOkTag(e) {
  3017. this.loadingTag = true;
  3018. let data = [
  3019. ...this.departValueInfoModality,
  3020. ...this.departValueInfoMod,
  3021. ...this.departValueInfoContent,
  3022. ...this.departValueInfoSence
  3023. ];
  3024. postAction('/ctop/materialTagInfo/mark', {
  3025. code: this.tagCode,
  3026. tagList: data
  3027. }).then(res => {
  3028. if (res.success) {
  3029. this.departValueInfoModality = [];
  3030. this.departValueInfoMod = [];
  3031. this.departValueInfoContent = [];
  3032. this.departValueInfoSence = [];
  3033. this.loadingTag = false;
  3034. this.tagInfoListVisible = false;
  3035. }
  3036. else {
  3037. this.loadingTag = false;
  3038. this.$message.error(res.message);
  3039. }
  3040. });
  3041. },
  3042. editTagList(item) {
  3043. this.tagInfoListVisible = true;
  3044. this.getTagListInfo(item.code);
  3045. this.tagCode = item.code;
  3046. },
  3047. getTagListAll() {
  3048. this.departTree = [];
  3049. this.departTreeModality = []; // 形式
  3050. this.departTreeContent = []; // 内容
  3051. this.departTreeSence = []; // 场景
  3052. this.departTreeMod = []; // 基调
  3053. this.getQueryTree(1, 'departTreeModality');
  3054. this.getQueryTree(2, 'departTreeMod');
  3055. this.getQueryTree(3, 'departTreeContent');
  3056. this.getQueryTree(4, 'departTreeSence');
  3057. },
  3058. getQueryTree(type, arr) {
  3059. getAction('/ctop/tagInfo/queryTreeList', {
  3060. categoryId: type
  3061. }).then(res => {
  3062. if (res.success) {
  3063. if (res.result) {
  3064. this[arr] = this.getTreeData(res.result);
  3065. }
  3066. }
  3067. });
  3068. },
  3069. getTreeData(data) {
  3070. for (let i = 0; i < data.length; i++) {
  3071. if (data[i].children) {
  3072. if (data[i].children.length < 1) {
  3073. // children若为空数组,则将children设为undefined
  3074. data[i].disabled = false;
  3075. }
  3076. else {
  3077. // children若不为空数组,则继续 递归调用 本方法
  3078. data[i].disabled = true;
  3079. this.getTreeData(data[i].children);
  3080. }
  3081. }
  3082. else {
  3083. data[i].disabled = false;
  3084. }
  3085. }
  3086. return data;
  3087. },
  3088. showBoHui(item) {
  3089. this.bohui = item;
  3090. this.bohuiShow = true;
  3091. },
  3092. editImage(item, status) {
  3093. let params = {};
  3094. params.id = item.id;
  3095. params.status = status;
  3096. params.auditorId = this.userInfo().id;
  3097. if (status === '1') {
  3098. }
  3099. else {
  3100. params.refuseReason = this.refuseReasonImage;
  3101. }
  3102. let updateArr = [params];
  3103. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  3104. if (res.success) {
  3105. getAction('/ctop/MaterialImageInfo/list', {
  3106. videoId: this.code
  3107. }).then(res => {
  3108. if (res.success) {
  3109. this.model = res.result.map((item, index) => {
  3110. return {
  3111. ...item,
  3112. key: index
  3113. };
  3114. });
  3115. this.modelNew = this.model.filter(item => {
  3116. return item.status === '0';
  3117. });
  3118. if (this.modelNew.length === 0) {
  3119. this.coverPreviewVisible = false;
  3120. }
  3121. }
  3122. });
  3123. this.loadData();
  3124. }
  3125. else {
  3126. this.$message.error(res.message);
  3127. }
  3128. });
  3129. },
  3130. editImageAll(status) {
  3131. this.checkArrImage;
  3132. let updateArr = [];
  3133. if (status === '1') {
  3134. updateArr = this.checkArrImage.map((item) => {
  3135. return {
  3136. id: item,
  3137. status: status
  3138. };
  3139. });
  3140. }
  3141. else {
  3142. updateArr = this.checkArrImage.map(item => {
  3143. return {
  3144. id: item,
  3145. status: status,
  3146. refuseReason: this.refuseReasonImage
  3147. };
  3148. });
  3149. }
  3150. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  3151. if (res.success) {
  3152. getAction('/ctop/MaterialImageInfo/list', {
  3153. videoId: this.code
  3154. }).then(res => {
  3155. if (res.success) {
  3156. this.checkArrImage = [];
  3157. this.checkAllImage = false;
  3158. this.model = res.result.map((item, index) => {
  3159. return {
  3160. ...item,
  3161. key: index
  3162. };
  3163. });
  3164. }
  3165. });
  3166. this.loadData();
  3167. }
  3168. else {
  3169. this.$message.error(res.message);
  3170. }
  3171. });
  3172. },
  3173. showData(item) {
  3174. if (item.byteDance || item.kuaiShou) {
  3175. this.showDataBool = true;
  3176. this.kuaishouData = item.kuaiShou;
  3177. this.douyinData = item.byteDance;
  3178. }
  3179. else {
  3180. this.$message.error('抖音和快手都无数据');
  3181. return;
  3182. }
  3183. },
  3184. setSuccess() {
  3185. let params = {};
  3186. params.id = this.code;
  3187. params.excellent = this.excellent == 1 ? 0 : 1;
  3188. getAction('/ctop/materialInfo/excellent/set', params).then(res => {
  3189. if (res.success) {
  3190. this.excellent = this.excellent === 1 ? 0 : 1;
  3191. this.loadData(this.ipagination.current);
  3192. }
  3193. });
  3194. },
  3195. getData(className) {
  3196. return this.form.getFieldValue(className);
  3197. },
  3198. deleteData(id) {
  3199. deleteAction('/ctop/materialInfo/delete', {
  3200. id: id
  3201. }).then(res => {
  3202. if (res.success) {
  3203. this.$message.success('删除成功');
  3204. this.loadData();
  3205. } else {
  3206. this.$message.error(res.message);
  3207. }
  3208. });
  3209. },
  3210. filterOption(input, option) {
  3211. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  3212. },
  3213. moment,
  3214. tongbu(value) {
  3215. this.mediaId = value;
  3216. this.$refs.check.getData('/ctop/userAllocation/getAccountListByUserIdAndProductId', {
  3217. userId: this.userInfo().id,
  3218. productId: this.queryParam.productId,
  3219. mediaId: value
  3220. });
  3221. },
  3222. implement(data) {
  3223. let params = {};
  3224. params.mediaId = this.mediaId;
  3225. params.materialArray = JSON.stringify(this.checkArr);
  3226. params.accountArray = JSON.stringify(data);
  3227. params.loginId = this.userInfo().id
  3228. params.userName = this.userInfo().realname
  3229. postAction('/ctop/materialUpload/uploadAccount', params).then(res => {
  3230. if (res.code === 0) {
  3231. this.checkArr = [];
  3232. this.checkAll = false;
  3233. if(res.data){
  3234. this.showDataList = res.data
  3235. this.showDataListVisible = true
  3236. }else{
  3237. this.$message.success(res.message)
  3238. }
  3239. }
  3240. });
  3241. },
  3242. downloadByBlobShowUrl() {
  3243. fetch(this.showUrl)
  3244. .then(res => res.blob())
  3245. .then(blob => {
  3246. const a = document.createElement('a');
  3247. document.body.appendChild(a);
  3248. a.style.display = 'none';
  3249. // 使用获取到的blob对象创建的url
  3250. const url = window.URL.createObjectURL(blob);
  3251. a.href = url;
  3252. // 指定下载的文件名
  3253. a.download = this.materialName;
  3254. a.click();
  3255. document.body.removeChild(a);
  3256. // 移除blob对象的url
  3257. window.URL.revokeObjectURL(url);
  3258. });
  3259. },
  3260. downloadByBlob() {
  3261. fetch(this.showUrlWater)
  3262. .then(res => res.blob())
  3263. .then(blob => {
  3264. const a = document.createElement('a');
  3265. document.body.appendChild(a);
  3266. a.style.display = 'none';
  3267. // 使用获取到的blob对象创建的url
  3268. const url = window.URL.createObjectURL(blob);
  3269. a.href = url;
  3270. // 指定下载的文件名
  3271. a.download = this.name;
  3272. a.click();
  3273. document.body.removeChild(a);
  3274. // 移除blob对象的url
  3275. window.URL.revokeObjectURL(url);
  3276. });
  3277. },
  3278. download(href, name) {
  3279. let eleLink = document.createElement('a');
  3280. eleLink.download = name;
  3281. eleLink.href = href;
  3282. eleLink.click();
  3283. eleLink.remove();
  3284. },
  3285. onCheckAllChange() {
  3286. if (this.checkAll) {
  3287. this.checkArr = [];
  3288. }
  3289. else {
  3290. this.checkArr = this.dataSource.map(item => {
  3291. return item.id;
  3292. });
  3293. }
  3294. this.checkAll = !this.checkAll;
  3295. },
  3296. onCheckAllImageChange() {
  3297. if (this.checkAllImage) {
  3298. this.checkArrImage = [];
  3299. }
  3300. else {
  3301. this.checkArrImage = this.model.map(item => {
  3302. return item.id;
  3303. });
  3304. }
  3305. this.checkAllImage = !this.checkAllImage;
  3306. },
  3307. searchRe() {
  3308. this.queryParam = {
  3309. type: 'VIDEO',
  3310. userId: this.userInfo().id,
  3311. status: this.active,
  3312. productId: ''
  3313. };
  3314. this.$refs.selectTable.keyValue = '';
  3315. this.$refs.selectTable.getData();
  3316. this.$refs.selectTableProject.keyValue = '';
  3317. this.$refs.selectTableProject.getData();
  3318. this.labelValue = [];
  3319. this.loadData(1);
  3320. this.checkArr = [];
  3321. },
  3322. getList(value) {
  3323. this.loadData();
  3324. },
  3325. onChangeCheckImage(checkedList) {
  3326. if (checkedList.length === 0) {
  3327. this.checkAllImage = false;
  3328. }
  3329. },
  3330. onChangeCheck(checkedList, data) {
  3331. if (data.value === '0') {
  3332. this.showTabsTitle = '0';
  3333. }
  3334. if (checkedList.length === 0) {
  3335. this.checkAll = false;
  3336. }
  3337. },
  3338. handleClose(removedTag) {
  3339. const tags = this.tags.filter(tag => tag !== removedTag);
  3340. this.tags = tags;
  3341. },
  3342. showInput() {
  3343. this.inputVisible = true;
  3344. this.$nextTick(() => {
  3345. this.$refs.input.focus();
  3346. });
  3347. },
  3348. handleInputChange(e) {
  3349. this.inputValue = e.target.value;
  3350. },
  3351. handleInputConfirm() {
  3352. const inputValue = this.inputValue;
  3353. let tags = this.tags;
  3354. if (inputValue && tags.indexOf(inputValue) === -1) {
  3355. tags = [...tags, inputValue];
  3356. }
  3357. Object.assign(this, {
  3358. tags,
  3359. inputVisible: false,
  3360. inputValue: ''
  3361. });
  3362. },
  3363. getWater() {
  3364. this.waterLoading = true;
  3365. let params = qs.stringify({
  3366. id: this.id,
  3367. watermarkTemplateId: this.size
  3368. });
  3369. postAction('/ctop/materialInfo/watermark', params).then(res => {
  3370. if (res.success) {
  3371. this.$message.success('水印素材生成中');
  3372. this.visibleDetail = false;
  3373. this.refuseFile = [];
  3374. this.refuseReason = '';
  3375. closeAllVideoFun();
  3376. this.loadData();
  3377. this.waterLoading = false;
  3378. }
  3379. });
  3380. },
  3381. showDetail(item) {
  3382. this.visibleDetail = true;
  3383. this.showUrl = item.url;
  3384. this.id = item.id;
  3385. this.code = item.code;
  3386. this.excellent = item.excellent;
  3387. if (this.active === '2') {
  3388. this.refuseReason = item.refuseReason;
  3389. this.refuseFile = item.refuseFile ? JSON.parse(item.refuseFile) : null;
  3390. }
  3391. else if (this.active === '1') {
  3392. this.creativeCopywriter = item.creativeCopywriter;
  3393. this.refuseReason = '';
  3394. this.refuseFile = [];
  3395. }
  3396. else {
  3397. this.refuseReason = '';
  3398. this.refuseFile = [];
  3399. }
  3400. getAction('/ctop/materialInfo/getDetail', {
  3401. materialId: item.id
  3402. }).then(res => {
  3403. this.detail = res;
  3404. this.size
  3405. = res.parameter.width === '1080' ? 3 : res.parameter.width === '1920' ? 1 : res.parameter.width === '1280' ? 2 : 4;
  3406. });
  3407. getAction('/ctop/materialInfo/queryById', {
  3408. id: item.id
  3409. }).then(res => {
  3410. if (res.success) {
  3411. this.showUrlWater = res.result.watermarkUrl;
  3412. this.name = res.result.watermarkCode;
  3413. this.materialName = res.result.materialName;
  3414. res.result.slogans.forEach(item => {
  3415. let finallyLenList = this.handleJudgeExec(item.slogan);
  3416. let resultSelectSize = 0;
  3417. if (finallyLenList.length) {
  3418. const inputDefaultLen = this.handleExportRules(item.slogan);
  3419. let tagsLen = finallyLenList.length * 2;
  3420. let tagsSureLen = 0;
  3421. finallyLenList.forEach(item => {
  3422. this.adNameTags.forEach(val => {
  3423. if (item === val.name) {
  3424. tagsSureLen += val.maxWordLen;
  3425. }
  3426. });
  3427. });
  3428. finallyLenList.forEach(item => {
  3429. tagsLen += item.length;
  3430. });
  3431. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
  3432. }
  3433. else {
  3434. resultSelectSize = this.handleExportRules(item.slogan);
  3435. }
  3436. item.name = 'username' + item.id;
  3437. item.value = item.slogan;
  3438. item.lenSize = resultSelectSize;
  3439. item.tabStatus = 'alone';
  3440. item.defaultTagsList = this.adNameTags;
  3441. item.updateTagsList = this.adNameTags.slice(0, 4);
  3442. });
  3443. this.slogansDetail = res.result.slogans;
  3444. }
  3445. else {
  3446. this.showUrlWater = null;
  3447. this.name = null;
  3448. }
  3449. });
  3450. getAction('/ctop/MaterialImageInfo/list', {
  3451. videoId: item.code
  3452. }).then(res => {
  3453. if (res.success) {
  3454. this.model = res.result.map((item, index) => {
  3455. return {
  3456. ...item,
  3457. key: index
  3458. };
  3459. });
  3460. }
  3461. });
  3462. this.getTagListInfo(item.code);
  3463. },
  3464. getTagListInfo(md5) {
  3465. this.departValueInfoModality = [];
  3466. this.departValueInfoMod = [];
  3467. this.departValueInfoContent = [];
  3468. this.departValueInfoSence = [];
  3469. getAction('/ctop/materialTagInfo/detail', {
  3470. code: md5
  3471. }).then(res => {
  3472. if (res.success) {
  3473. this.tagInfoList = [...res.modalityTagList, ...res.senceTagList, ...res.modTagList];
  3474. if (this.tagInfoListVisible) {
  3475. this.departValueInfoModality = res.modalityTagList.map(item => {
  3476. return item.tagId;
  3477. });
  3478. this.departValueInfoMod = res.modTagList.map(item => {
  3479. return item.tagId;
  3480. });
  3481. this.departValueInfoSence = res.senceTagList.map(item => {
  3482. return item.tagId;
  3483. });
  3484. }
  3485. }
  3486. });
  3487. },
  3488. coverPreviewShowModal(item, index) {
  3489. this.modelNew = this.model.filter(items => items.status === 0);
  3490. if (this.modelNew.length > 0) {
  3491. this.coverPreviewVisible = true;
  3492. }
  3493. },
  3494. okEditShow(item, editStatus) {
  3495. if (editStatus === '2') {
  3496. let params = {};
  3497. params.id = item.id;
  3498. params.auditorId = this.userInfo().id;
  3499. params.refuseReason = this.refuseReason;
  3500. let data = this.refuseFile.map(item => {
  3501. return 'https:' + item;
  3502. });
  3503. params.refuseFile = JSON.stringify(data);
  3504. params.status = editStatus;
  3505. fileEdit(params).then(res => {
  3506. this.refuseFile = [];
  3507. this.refuseReason = '';
  3508. this.loadData();
  3509. });
  3510. }
  3511. else if (editStatus === '1') {
  3512. let params = {};
  3513. params.id = item.id;
  3514. params.auditorId = this.userInfo().id;
  3515. params.creativeCopywriter = this.refuseReason;
  3516. params.status = editStatus;
  3517. fileEdit(params).then(res => {
  3518. this.refuseReason = '';
  3519. this.loadData();
  3520. });
  3521. }
  3522. },
  3523. okEdit(e) {
  3524. this.edit(null, this.active, '2');
  3525. },
  3526. personEdit(item, status) {
  3527. this.add = false;
  3528. this.personVisible = true;
  3529. this.getProjectId(item.projectId);
  3530. getAction('/ctop/materialInfo/getDetail', {
  3531. materialId: item.id
  3532. }).then(res => {
  3533. this.code = item.code;
  3534. if (res.ascription) {
  3535. this.formPerson.setFieldsValue({
  3536. clipId: res.ascription.clipId,
  3537. planId: res.ascription.planId,
  3538. shotId: res.ascription.shotId
  3539. });
  3540. }
  3541. });
  3542. },
  3543. edit(item, status, editStatus) {
  3544. if (status === '0' || status === '1') {
  3545. if (editStatus === '2') {
  3546. let params = {};
  3547. params.id = this.id;
  3548. params.auditorId = this.userInfo().id;
  3549. params.refuseReason = this.refuseReason;
  3550. let data = this.refuseFile.map(item => {
  3551. return 'https:' + item;
  3552. });
  3553. params.refuseFile = JSON.stringify(data);
  3554. params.status = editStatus;
  3555. fileEdit(params).then(res => {
  3556. this.refuseFile = [];
  3557. this.refuseReason = '';
  3558. this.loadData();
  3559. this.visibleDetail = false;
  3560. closeAllVideoFun();
  3561. });
  3562. }
  3563. else {
  3564. fileEdit({
  3565. id: this.id,
  3566. status: editStatus,
  3567. auditorId: this.userInfo().id,
  3568. creativeCopywriter: this.refuseReason
  3569. }).then(res => {
  3570. this.refuseFile = [];
  3571. this.refuseReason = '';
  3572. this.loadData();
  3573. this.visibleDetail = false;
  3574. closeAllVideoFun();
  3575. });
  3576. }
  3577. } else {
  3578. this.add = false;
  3579. this.visible = true;
  3580. this.getProjectId(item.projectId);
  3581. getAction('/ctop/materialInfo/getDetail', {
  3582. materialId: item.id
  3583. }).then(res => {
  3584. if (this.activeKey === 'image') {
  3585. this.form.setFieldsValue({
  3586. projectId: item.projectId,
  3587. clipId: res.ascription.clipId,
  3588. planeId: res.ascription.planeId,
  3589. materialDescribe: item.materialDescribe
  3590. });
  3591. }
  3592. else {
  3593. this.form.setFieldsValue({
  3594. projectId: item.projectId,
  3595. clipId: res.ascription.clipId,
  3596. planId: res.ascription.planId,
  3597. shotId: res.ascription.shotId,
  3598. materialDescribe: item.materialDescribe
  3599. });
  3600. }
  3601. this.tags = res.tag;
  3602. this.urlList.url = item.url;
  3603. this.urlList.md5 = item.code;
  3604. this.urlList.name = item.materialName;
  3605. this.watermarkUrl.url = item.watermarkUrl;
  3606. this.watermarkUrl.md5 = item.watermarkCode;
  3607. this.watermarkUrl.name = item.watermarkMaterialName;
  3608. this.id = item.id;
  3609. });
  3610. }
  3611. },
  3612. closePerson() {
  3613. this.personVisible = false;
  3614. },
  3615. handleOkPerson() {
  3616. this.loadingPerson = true;
  3617. this.formPerson.validateFieldsAndScroll((err, values) => {
  3618. if (err) {
  3619. // 这里做逻辑处理
  3620. } else {
  3621. let params = {
  3622. planId: values.planId,
  3623. shotId: values.shotId,
  3624. clipId: values.clipId,
  3625. materialId: this.code
  3626. }
  3627. fileEditAll(params).then(res => {
  3628. if (res.success) {
  3629. this.$message.success('修改成功');
  3630. this.loadingPerson = false;
  3631. this.closePerson();
  3632. this.loadData();
  3633. } else {
  3634. this.$message.error(res.message);
  3635. }
  3636. })
  3637. }
  3638. })
  3639. },
  3640. handleOkImage() {
  3641. let params = {};
  3642. params.projectId = this.addImageData.projectId;
  3643. params.videoId = this.addImageData.code;
  3644. params.imageArr = this.imageArrList;
  3645. this.loadingImage = true;
  3646. postAction('/insertImage', params).then(res => {
  3647. if (res.code === 0) {
  3648. this.urlListImage = {
  3649. url: [],
  3650. md5: [],
  3651. name: [],
  3652. size: []
  3653. };
  3654. this.imageArrList = [];
  3655. this.addImageVisible = false;
  3656. this.loadingImage = false;
  3657. this.loadData();
  3658. }
  3659. else {
  3660. this.loadingImage = false;
  3661. }
  3662. })
  3663. },
  3664. handleOk() {
  3665. this.form.validateFieldsAndScroll((err, values) => {
  3666. if (err) {
  3667. // 这里做逻辑处理
  3668. }
  3669. else {
  3670. this.loadingElse = true;
  3671. let params = {
  3672. ...values
  3673. };
  3674. let roleCode = {};
  3675. for (const key in this.role) {
  3676. if (key == 'roleCode') {
  3677. this.role[key] = this.role[key] + 'Id';
  3678. roleCode[this.role[key]] = this.userInfo().id;
  3679. }
  3680. }
  3681. params.id = this.add ? null : this.id;
  3682. params.code = this.urlList.md5;
  3683. params.url = this.urlList.url;
  3684. params.materialName = this.urlList.name;
  3685. params.watermarkCode = this.watermarkUrl.md5;
  3686. params.watermarkUrl = this.watermarkUrl.url;
  3687. params.watermarkMaterialName = this.watermarkUrl.name;
  3688. params.userId = this.userInfo().id;
  3689. params.projectId = values.projectId;
  3690. params.materialDescribe = values.materialDescribe;
  3691. params.type = 'VIDEO';
  3692. params.ascription =
  3693. this.activeKey == 'image'
  3694. ? roleCode
  3695. : {
  3696. planId: values.planId,
  3697. shotId: values.shotId,
  3698. clipId: values.clipId,
  3699. };
  3700. params.tag = this.tags;
  3701. params.imageArr = this.imageArrList;
  3702. if (this.add) {
  3703. fileInsertV2(params).then(res => {
  3704. if (res.success) {
  3705. this.form.resetFields();
  3706. this.urlList = {
  3707. url: '',
  3708. md5: '',
  3709. name: ''
  3710. };
  3711. this.watermarkUrl = {
  3712. url: '',
  3713. md5: '',
  3714. name: ''
  3715. };
  3716. this.urlListImage = {
  3717. url: [],
  3718. md5: [],
  3719. name: [],
  3720. size: []
  3721. };
  3722. this.imageArrList = [];
  3723. this.tags = [];
  3724. this.loadData();
  3725. this.visible = false;
  3726. this.add = true;
  3727. for (const key in this.role) {
  3728. if (key == 'roleCode') {
  3729. this.role[key] = this.role[key].substr(0, this.role[key].length - 2);
  3730. }
  3731. }
  3732. this.$message.success('素材上传成功');
  3733. this.loadingElse = false;
  3734. }
  3735. else {
  3736. this.$message.error(res.message);
  3737. this.loadingElse = false;
  3738. }
  3739. });
  3740. }
  3741. else {
  3742. fileEdit({
  3743. ...params,
  3744. status: '0'
  3745. }).then(res => {
  3746. if (res.success) {
  3747. this.form.resetFields();
  3748. this.urlList = {
  3749. url: '',
  3750. md5: '',
  3751. name: ''
  3752. };
  3753. this.watermarkUrl = {
  3754. url: '',
  3755. md5: '',
  3756. name: ''
  3757. };
  3758. this.tags = []
  3759. this.loadData()
  3760. this.visible = false
  3761. this.add = true
  3762. this.loading = false
  3763. this.loadingElse = false
  3764. for (const key in this.role) {
  3765. if (key === 'roleCode') {
  3766. this.role[key] = this.role[key].substr(0, this.role[key].length - 2);
  3767. }
  3768. }
  3769. }
  3770. else {
  3771. this.$message.error(res.message)
  3772. this.loading = false
  3773. this.loadingElse = false
  3774. }
  3775. });
  3776. }
  3777. }
  3778. });
  3779. },
  3780. close() {
  3781. this.visible = false;
  3782. this.dataElse = [];
  3783. this.form.resetFields();
  3784. this.urlList = {
  3785. url: '',
  3786. md5: '',
  3787. name: ''
  3788. };
  3789. this.tags = [];
  3790. this.urlListImage = {
  3791. url: [],
  3792. md5: [],
  3793. name: [],
  3794. size: []
  3795. };
  3796. this.imageArrList = [];
  3797. },
  3798. addImage(item) {
  3799. this.addImageVisible = true;
  3800. this.addImageData = item;
  3801. },
  3802. showImage(item) {
  3803. this.chouzhen = true;
  3804. this.chouzhenList = [];
  3805. let params = {
  3806. videoSignature: item.code,
  3807. pageSize: 20,
  3808. pageNo: 1
  3809. };
  3810. getAction('/cutFrame/material/list', params).then(res => {
  3811. if (res.success) {
  3812. this.chouzhenList.push(...res.result.records);
  3813. }
  3814. });
  3815. },
  3816. closeImage() {
  3817. this.addImageVisible = false;
  3818. this.urlListImage = {
  3819. url: [],
  3820. md5: [],
  3821. name: [],
  3822. size: [],
  3823. }
  3824. this.imageArrList = [];
  3825. },
  3826. callbackTwo(key) {
  3827. this.checkAll = false;
  3828. this.checkArr = [];
  3829. if (key === '3') {
  3830. this.url.list = '/ctop/materialInfo/effiMaterialInfo';
  3831. this.queryParam = {};
  3832. }
  3833. else {
  3834. this.url.list = '/ctop/materialInfo/listV2';
  3835. this.queryParam = {
  3836. type: 'VIDEO',
  3837. userId: this.userInfo().id,
  3838. status: key,
  3839. productId: this.queryParam.productId
  3840. }
  3841. if (this.labelValue.length >= 1) {
  3842. this.queryParam.tagCode = this.labelValue[this.labelValue.length - 1];
  3843. }
  3844. else {
  3845. this.queryParam.tagCode = '';
  3846. }
  3847. if (this.form.getFieldValue('productId')) {
  3848. this.form.setFieldsValue({
  3849. projectId: ''
  3850. });
  3851. }
  3852. }
  3853. this.loadData(1);
  3854. },
  3855. removeUpload() {
  3856. this.form.setFieldsValue({
  3857. modalityTagList: null,
  3858. modTagList: null,
  3859. senceTagList: null
  3860. });
  3861. },
  3862. overUpload(urlAll) {
  3863. this.confirmLoading = true;
  3864. this.repeat = false;
  3865. this.urlList.url = urlAll[0].url;
  3866. this.$message.success('上传成功');
  3867. getAction('/ctop/materialTagInfo/detail', {
  3868. code: this.urlList.md5
  3869. }).then(res => {
  3870. if (res.success) {
  3871. if (res.modalityTagList.length > 0) {
  3872. this.form.setFieldsValue({
  3873. modalityTagList: res.modalityTagList.map(item => {
  3874. return item.tagId;
  3875. }),
  3876. modTagList: res.modTagList.map(item => {
  3877. return item.tagId;
  3878. }),
  3879. senceTagList: res.senceTagList.map(item => {
  3880. return item.tagId;
  3881. })
  3882. });
  3883. }
  3884. }
  3885. });
  3886. },
  3887. deleteImage(url) {
  3888. let index = this.imageArrList.findIndex(v => v.url === url);
  3889. this.imageArrList.splice(index, 1);
  3890. },
  3891. overUploadImage(urlAll) {
  3892. let that = this;
  3893. that.material = [];
  3894. that.imageArrList = [];
  3895. let img;
  3896. if (urlAll.length > 0) {
  3897. for (let i = 0; i < urlAll.length; i++) {
  3898. that.imageArrList.push({
  3899. code: this.urlListImage.md5[i],
  3900. url: urlAll[i].url,
  3901. materialName: this.urlListImage.name[i]
  3902. })
  3903. img = new Image();
  3904. img.src = urlAll[i].url;
  3905. }
  3906. }
  3907. },
  3908. file(file) {
  3909. let bmf = new BMF();
  3910. let that = this;
  3911. return new Promise(function (resolve, reject) {
  3912. bmf.md5(file, (err, md5) => {
  3913. that.urlList.name = file.name;
  3914. that.urlList.md5 = md5;
  3915. fileCheck({
  3916. code: md5,
  3917. projectId: that.getData('projectId')
  3918. }).then((res) => {
  3919. if (res.code == 0) {
  3920. that.$message.error('此素材已经上传');
  3921. that.repeat = true;
  3922. reject()
  3923. }
  3924. else {
  3925. that.repeat = false
  3926. resolve()
  3927. }
  3928. });
  3929. });
  3930. });
  3931. },
  3932. fileWater(file) {
  3933. let bmf = new BMF();
  3934. let that = this;
  3935. this.urlListImage = {
  3936. url: [],
  3937. md5: [],
  3938. name: [],
  3939. size: []
  3940. };
  3941. return new Promise(function (resolve, reject) {
  3942. bmf.md5(file, (err, md5) => {
  3943. that.urlListImage.name.push(file.name);
  3944. that.urlListImage.md5.push(md5);
  3945. that.urlListImage.size.push(file.size);
  3946. resolve();
  3947. });
  3948. });
  3949. },
  3950. getParticipateList(value) {
  3951. getAction('/ctop/projectMember/participateListV2', {
  3952. userId: this.userInfo().id,
  3953. pageSize: 50,
  3954. pageNo: 1,
  3955. projectName: value,
  3956. }).then(res => {
  3957. if (res.code == 0) {
  3958. let defaultData = res.result.records;
  3959. this.dataElse = defaultData;
  3960. }
  3961. });
  3962. },
  3963. getProjectId(items) {
  3964. this.form.resetFields(['clipId', 'planId', 'shotId']);
  3965. getAction('/ctop/projectMember/getMemberList', {
  3966. projectId: items
  3967. }).then(res => {
  3968. if (res.code === 0) {
  3969. this.ascription.clipId = res.result.filter(item => {
  3970. if (
  3971. item.roleCode === 'clip'
  3972. || item.roleCode === 'plan'
  3973. || item.roleCode === 'designTeamLeader'
  3974. || item.roleCode === 'shot'
  3975. || item.roleCode === 'plane'
  3976. || item.roleCode === 'planeLeader'
  3977. ) {
  3978. return {
  3979. userId: item.userId,
  3980. userName: item.userName
  3981. };
  3982. }
  3983. });
  3984. this.ascription.shotId = res.result.filter(item => {
  3985. if (
  3986. item.roleCode === 'clip'
  3987. || item.roleCode === 'shot'
  3988. || item.roleCode === 'plan'
  3989. || item.roleCode === 'designTeamLeader'
  3990. || item.roleCode === 'plane'
  3991. || item.roleCode === 'planeLeader'
  3992. ) {
  3993. return {
  3994. userId: item.userId,
  3995. userName: item.userName
  3996. };
  3997. }
  3998. })
  3999. this.ascription.planId = res.result.filter(item => {
  4000. if (
  4001. item.roleCode === 'shot'
  4002. || item.roleCode === 'plan'
  4003. || item.roleCode === 'designTeamLeader'
  4004. || item.roleCode === 'clip'
  4005. || item.roleCode === 'plane'
  4006. || item.roleCode === 'planeLeader'
  4007. ) {
  4008. return {
  4009. userId: item.userId,
  4010. userName: item.userName
  4011. };
  4012. }
  4013. });
  4014. this.ascription.planeId = res.result.filter(item => {
  4015. if (item.roleCode === 'plane') {
  4016. return {
  4017. userId: item.userId,
  4018. userName: item.userName
  4019. };
  4020. }
  4021. });
  4022. }
  4023. });
  4024. },
  4025. getDataSource(page, pageSize) {
  4026. this.ipagination.current = page;
  4027. this.checkArr = [];
  4028. this.checkAll = false;
  4029. this.loadData();
  4030. }
  4031. }
  4032. };
  4033. </script>
  4034. <style lang="less" scoped>
  4035. @import "creative-copywrit";
  4036. </style>