videoMaterial.vue 106 KB

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