videoMaterial.vue 117 KB

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