videoMaterial.vue 104 KB

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