creative-copywrit.vue 164 KB

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