videoMaterial.vue 139 KB

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