videoMaterial.vue 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408
  1. <style lang="scss">
  2. .downLoad .ant-form-item-control-wrapper {
  3. width: 70%;
  4. }
  5. #material-card .ant-tabs-tab {
  6. border: 1px solid gainsboro !important;
  7. }
  8. #material-card .ant-tabs-top-bar {
  9. position: relative;
  10. z-index: 100;
  11. }
  12. #material-card .ant-badge-count {
  13. top: 0px;
  14. }
  15. .detail .ant-form-item {
  16. margin-bottom: 10px !important;
  17. }
  18. .ant-carousel >>> .slick-slide {
  19. text-align: center;
  20. // height: 160px;
  21. // line-height: 160px;
  22. background: #364d79;
  23. overflow: hidden;
  24. }
  25. .ad_cover_container .ant-card-body {
  26. padding: 0;
  27. }
  28. .ant-carousel >>> .slick-slide h3 {
  29. color: #fff;
  30. }
  31. .ant-carousel >>> .custom-slick-arrow {
  32. width: 25px;
  33. height: 25px;
  34. font-size: 25px;
  35. color: #fff;
  36. background-color: rgba(31, 45, 61, 0.11);
  37. opacity: 0.3;
  38. }
  39. .ant-carousel >>> .custom-slick-arrow:before {
  40. display: none;
  41. }
  42. .ant-carousel >>> .custom-slick-arrow:hover {
  43. opacity: 0.5;
  44. }
  45. .cover_carousel_con .slick-dots {
  46. bottom: 55px;
  47. }
  48. .add-image-material .draggable-list {
  49. display: block !important;
  50. }
  51. li.chouzhen.first:before{
  52. font-size: 12px;
  53. content: "首帧";
  54. position: absolute;
  55. top: 7px;
  56. left: 5px;
  57. width: 36px;
  58. height: 20px;
  59. color: rgb(255, 255, 255);
  60. line-height: 20px;
  61. text-align: center;
  62. background: rgba(0, 0, 0, 0.5);
  63. border-radius: 2px;
  64. }
  65. </style>
  66. <style lang="scss" scoped>
  67. .chouzhen{
  68. border-style: solid;
  69. border-width: 1px;
  70. border-color: #e4e4e4;
  71. width: calc(20% - 10px);
  72. padding: 10px;
  73. margin-right: 10px;
  74. margin-bottom: 10px;
  75. display: flex;
  76. align-items: center;
  77. background: #fff;
  78. position: relative;
  79. z-index: 99;
  80. float:left
  81. }
  82. .content {
  83. display: flex !important;
  84. flex-direction: column;
  85. justify-content: center;
  86. align-items: center;
  87. .slick-dots {
  88. bottom: 55px;
  89. }
  90. }
  91. .video-content {
  92. width: 50%;
  93. padding: 10px;
  94. box-sizing: border-box;
  95. display: flex;
  96. flex-direction: column;
  97. justify-content: center;
  98. border-right: 1px solid #f2f2f2;
  99. }
  100. .tag-video {
  101. position: absolute;
  102. right: 0px;
  103. top: 8px;
  104. padding: 4px;
  105. border-radius: 2px;
  106. line-height: 16px;
  107. font-size: 12px;
  108. color: #fff;
  109. background-color: rgba(0, 0, 0, 0.3);
  110. }
  111. .home-item {
  112. overflow: hidden;
  113. }
  114. @media only screen and (min-width: 1200px) {
  115. .home-item {
  116. border-style: solid;
  117. border-width: 1px;
  118. border-color: #e4e4e4;
  119. width: calc(50% - 10px);
  120. padding: 10px;
  121. margin-right: 10px;
  122. margin-bottom: 10px;
  123. display: flex;
  124. align-items: center;
  125. background: #fff;
  126. position: relative;
  127. z-index: 99;
  128. }
  129. }
  130. /*>=1024的设备*/
  131. // @media (min-width: 1100px) {
  132. // .checkbox_item_container {
  133. // width:70%
  134. // }
  135. // } /*>=1100的设备*/
  136. @media only screen and (min-width: 1250px) {
  137. .home-item {
  138. border-style: solid;
  139. border-width: 1px;
  140. border-color: #e4e4e4;
  141. width: calc(25% - 10px);
  142. padding: 10px;
  143. margin-right: 10px;
  144. margin-bottom: 10px;
  145. display: flex;
  146. align-items: center;
  147. background: #fff;
  148. position: relative;
  149. z-index: 99;
  150. }
  151. }
  152. /*>=1280的设备*/
  153. // @media (min-width: 1366px) {
  154. // }
  155. // @media (min-width: 1440px) {
  156. // }
  157. // @media (min-width: 1680px) {
  158. // }
  159. // @media (min-width: 1920px) {
  160. // .home-item {
  161. // border-style: solid;
  162. // border-width: 1px;
  163. // border-color: #e4e4e4;
  164. // width: calc(25% - 10px);
  165. // padding: 10px;
  166. // margin-right: 10px;
  167. // margin-bottom: 10px;
  168. // display: flex;
  169. // align-items: center;
  170. // background: #fff;
  171. // position: relative;
  172. // z-index: 99;
  173. // cursor: pointer;
  174. // }
  175. // }
  176. .actor-photo-list {
  177. display: flex;
  178. padding-left: 0;
  179. li {
  180. width: 25%;
  181. margin: 10px;
  182. position: relative;
  183. height: 250px;
  184. border: 1px solid #f2f2f2;
  185. img,
  186. video {
  187. width: 100%;
  188. margin-top: auto;
  189. margin-bottom: auto;
  190. top: 0;
  191. bottom: 0;
  192. position: absolute;
  193. max-height: 250px;
  194. }
  195. }
  196. }
  197. .home-card {
  198. width: 100%;
  199. overflow: hidden;
  200. padding: 10px 0px;
  201. display: flex;
  202. flex-wrap: wrap;
  203. margin-right: -10px;
  204. .home-right {
  205. width: 100%;
  206. }
  207. .bg:after {
  208. content: '';
  209. width: 110%;
  210. height: 110%;
  211. position: absolute;
  212. left: -5%;
  213. top: -5%;
  214. background: inherit;
  215. filter: blur(10px);
  216. z-index: 2;
  217. }
  218. }
  219. .bh {
  220. height: 60px;
  221. line-height: 30px;
  222. overflow: hidden;
  223. text-overflow: ellipsis;
  224. -webkit-line-clamp: 2;
  225. display: -webkit-box;
  226. -webkit-box-orient: vertical;
  227. }
  228. .bhShow {
  229. height: 100px;
  230. line-height: 25px;
  231. text-align: center;
  232. }
  233. .bhShow span {
  234. font-size: 14px;
  235. }
  236. .show-data {
  237. width: 50%;
  238. display: flex;
  239. flex-direction: column;
  240. align-items: flex-start;
  241. }
  242. a {
  243. font-size: 14px;
  244. }
  245. .actor-photo-list {
  246. display: flex;
  247. padding-left: 0;
  248. li {
  249. width: 25%;
  250. margin: 10px;
  251. position: relative;
  252. height: 250px;
  253. border: 1px solid #f2f2f2;
  254. list-style: none;
  255. img,
  256. video {
  257. width: 100%;
  258. margin-top: auto;
  259. margin-bottom: auto;
  260. top: 0;
  261. bottom: 0;
  262. position: absolute;
  263. max-height: 250px;
  264. }
  265. }
  266. }
  267. </style>
  268. <template>
  269. <a-card :bordered="false">
  270. <!-- 查询区域 -->
  271. <div class="table-page-search-wrapper">
  272. <a-form layout="inline">
  273. <a-row :gutter="24">
  274. <a-col :md="8" :sm="8">
  275. <!-- <a-form-item label="项目名称"> -->
  276. <selectTable :projectId.sync="queryParam.projectId"></selectTable>
  277. </a-col>
  278. <a-col :md="8" :sm="8">
  279. <a-form-item label="素材名称">
  280. <a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
  281. </a-form-item>
  282. </a-col>
  283. <!-- -->
  284. <a-col :md="8" :sm="8">
  285. <a-form-item label="时间选择">
  286. <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" />
  287. <!-- <a-input placeholder="请输入查询时间" v-model="queryParam.createTime"></a-input> -->
  288. </a-form-item>
  289. </a-col>
  290. <a-col :md="8" :sm="8">
  291. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  292. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  293. <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
  294. </span>
  295. </a-col>
  296. </a-row>
  297. </a-form>
  298. </div>
  299. <!-- table区域-begin -->
  300. <!-- <div> -->
  301. <!-- 操作按钮区域 -->
  302. <div class="table-operator" style="position:relative;z-index:100">
  303. <a-button
  304. @click="
  305. visible = true
  306. confirmLoading = false
  307. add = true
  308. "
  309. type="primary"
  310. icon="plus"
  311. >新增</a-button
  312. >
  313. <a-button
  314. @click="onCheckAllChange"
  315. v-if="
  316. queryParam.projectId &&
  317. active == '1' &&
  318. (role.roleCode == 'operator' ||
  319. role.roleCode == 'kuaishouOperationManager' ||
  320. role.roleCode == 'admin' ||
  321. role.roleCode == 'operationAssistant' ||
  322. role.roleCode == 'touTiaoOperationManager')
  323. "
  324. >{{ checkAll ? '取消 ( ' + checkArr.length + ' )' : '全选' }}</a-button
  325. >
  326. <a-button
  327. v-if="
  328. queryParam.projectId &&
  329. active == '1' &&
  330. (role.roleCode == 'operator' ||
  331. role.roleCode == 'kuaishouOperationManager' ||
  332. role.roleCode == 'admin' ||
  333. role.roleCode == 'operationAssistant' ||
  334. role.roleCode == 'touTiaoOperationManager')
  335. "
  336. :disabled="checkArr.length == 0"
  337. @click="tongbu"
  338. >一键同步</a-button
  339. >
  340. </div>
  341. <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
  342. <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
  343. <div v-if="dataSource.length > 0">
  344. <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
  345. <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
  346. <span v-if="items.excellent == 0"></span>
  347. <span
  348. v-else
  349. 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"
  350. >优秀素材</span
  351. >
  352. <div class="home-right">
  353. <a-badge
  354. :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
  355. :numberStyle="{ backgroundColor: '#52c41a' }"
  356. style="width:100%;display:flex"
  357. @click.stop
  358. >
  359. <span
  360. style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
  361. :title="items.projectName"
  362. >
  363. {{ items.projectName }}
  364. </span>
  365. <span
  366. style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
  367. :title="items.materialName"
  368. >
  369. {{items.materialName}}
  370. </span>
  371. <a-icon
  372. type="close-circle"
  373. @click="deleteData(items.id)"
  374. v-show="active == '0'"
  375. v-if="items.userId == userInfo().id"
  376. />
  377. </a-badge>
  378. <div style="display:flex;justify-content:center;width:100%;height:200px;position:relative;">
  379. <!-- <video
  380. :src="items.url"
  381. @canplay="a(items)"
  382. style="height:200px;max-width:100%;position:absolute;z-index:10;"
  383. /> -->
  384. <div style="width: 100px;position: absolute;left: 0;z-index:1000">
  385. <a-tooltip placement="top">
  386. <template slot="title">
  387. <span>{{ items.kuaishouEffiType == 1 ? '快手有效视频' : '已经同步到快手平台' }}</span>
  388. </template>
  389. <img
  390. style="width:30px;height:30px;"
  391. v-if="items.kuaishouVideoIsUp == 1"
  392. :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
  393. src="./kuaishou.jpg"
  394. />
  395. </a-tooltip>
  396. <a-tooltip placement="top">
  397. <template slot="title">
  398. <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
  399. </template>
  400. <img
  401. v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
  402. style="width:30px;height:30px;margin-left:5px;"
  403. src="./douyin.jpg"
  404. alt=""
  405. />
  406. <img
  407. v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
  408. style="width:30px;height:30px;margin-left:5px;"
  409. src="./douyinhui.jpg"
  410. alt=""
  411. />
  412. </a-tooltip>
  413. </div>
  414. <a-icon
  415. type="fire"
  416. style="font-size:20px;position: absolute;right: 0;bottom:10px;z-index:1000;color:red"
  417. v-if="items.whetherUnaudited"
  418. />
  419. <img
  420. :src="items.url + '?x-oss-process=video/snapshot,t_00000,m_fast'"
  421. alt=""
  422. style="height:200px;max-width:100%;position:absolute;z-index:10;"
  423. />
  424. <!-- <img
  425. src="./timg.gif"
  426. v-if="!items.showVideo"
  427. alt=""
  428. style="height:200px;max-width:100%;position:absolute;z-index:11;"
  429. @click.stop
  430. /> -->
  431. </div>
  432. <div style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"></div>
  433. <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
  434. <div
  435. v-if="active == '1'"
  436. class="bhShow"
  437. style="display:flex;justify-content:space-between;"
  438. @click.stop="showData(items)"
  439. >
  440. <div v-if="items.byteDance" class="show-data">
  441. <span>抖音</span>
  442. <span>消耗:{{ items.byteDance.cost }}</span>
  443. <span>封面点击:{{ items.byteDance.click }}</span>
  444. <span>封面展示:{{ items.byteDance.showNum }}</span>
  445. </div>
  446. <div v-else style="line-height:100px;" class="show-data">
  447. <span>抖音:无</span>
  448. </div>
  449. <div v-if="items.kuaiShou" class="show-data">
  450. <span>快手</span>
  451. <span>消耗:{{ items.kuaiShou.charge }}</span>
  452. <span>封面点击:{{ items.kuaiShou.photoClick }}</span>
  453. <span>封面展示:{{ items.kuaiShou.photoShow }}</span>
  454. </div>
  455. <div v-else style="line-height:100px;" class="show-data">
  456. <span>快手:无</span>
  457. </div>
  458. </div>
  459. <div
  460. style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"
  461. v-if="active != '0'"
  462. ></div>
  463. <span style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%" @click.stop>
  464. <a
  465. href="javascript:;"
  466. style="margin-right:20px"
  467. @click="edit(items, '2')"
  468. v-show="active == '2'"
  469. v-if="items.userId == userInfo().id"
  470. >
  471. 修改</a
  472. >
  473. <a
  474. href="javascript:;"
  475. style="margin-right:20px"
  476. v-show="active !='3'"
  477. @click="personEdit(items, '2')"
  478. v-if="items.userId == userInfo().id||role.roleCode =='designTeamLeader'"
  479. >
  480. 人员修改</a
  481. >
  482. <a-popconfirm
  483. @confirm="okEditShow(items, '2')"
  484. v-show="active != '2'&&active!='3'"
  485. v-if="
  486. role.roleCode == 'operator' ||
  487. role.roleCode == 'kuaishouOperationManager' ||
  488. role.roleCode == 'admin' ||
  489. role.roleCode == 'operationAssistant' ||
  490. role.roleCode == 'touTiaoOperationManager'
  491. "
  492. >
  493. <div slot="title">
  494. <div>
  495. 驳回原因:
  496. <a-textarea
  497. placeholder="请输入原因"
  498. v-model="refuseReason"
  499. :autosize="{ minRows: 3, maxRows: 10 }"
  500. />
  501. </div>
  502. <div>
  503. 截图:
  504. <upload-to-ali
  505. v-model="refuseFile"
  506. :customDomain="customDomain"
  507. multiple
  508. preview
  509. :region="region"
  510. :bucket="bucket"
  511. :accept="acceptImage"
  512. :max="10"
  513. :size="2048"
  514. :accessKeyId="accessKeyId"
  515. :accessKeySecret="accessKeySecret"
  516. :dir="dirImg"
  517. ></upload-to-ali>
  518. </div>
  519. </div>
  520. <a href="javascript:;" style="margin-right:20px">驳回</a>
  521. </a-popconfirm>
  522. <a-popconfirm
  523. @confirm="okEditShow(items, '1')"
  524. v-show="active != '1'&&active!='3'"
  525. v-if="
  526. role.roleCode == 'operator' ||
  527. role.roleCode == 'kuaishouOperationManager' ||
  528. role.roleCode == 'admin' ||
  529. role.roleCode == 'operationAssistant' ||
  530. role.roleCode == 'touTiaoOperationManager'
  531. "
  532. >
  533. <div slot="title">
  534. <div>
  535. 广告语:
  536. <a-textarea
  537. placeholder="请输入"
  538. v-model="refuseReason"
  539. :autosize="{ minRows: 3, maxRows: 10 }"
  540. />
  541. </div>
  542. </div>
  543. <a
  544. href="javascript:;"
  545. style="margin-right:20px"
  546. v-show="active != '1'"
  547. v-if="
  548. role.roleCode == 'operator' ||
  549. role.roleCode == 'kuaishouOperationManager' ||
  550. role.roleCode == 'admin' ||
  551. role.roleCode == 'operationAssistant' ||
  552. role.roleCode == 'touTiaoOperationManager'
  553. "
  554. >
  555. 通过审核</a
  556. >
  557. </a-popconfirm>
  558. <a
  559. v-show="active!='3'"
  560. style="margin-right:20px"
  561. @click="addImage(items)"
  562. >添加封面</a
  563. >
  564. <a
  565. style="margin-right:20px"
  566. @click="showImage(items)"
  567. >推荐封面</a
  568. >
  569. <a-checkbox :value="items.id" style="float:right" v-show="active == '1'"></a-checkbox>
  570. <br>
  571. {{ items.createTime | getDate }}
  572. </span>
  573. </div>
  574. </div>
  575. </a-checkbox-group>
  576. <a-pagination
  577. size="small"
  578. :showTotal="ipagination.showTotal"
  579. style="float:right"
  580. v-if="dataSource.length > 0"
  581. showQuickJumper
  582. :pageSize.sync="ipagination.pageSize"
  583. :total="ipagination.total"
  584. v-model="ipagination.current"
  585. @change="getDataSource"
  586. />
  587. </div>
  588. <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
  589. <img
  590. 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"
  591. alt="" v-if="!loading"/>
  592. <img
  593. v-else
  594. src="./loading.gif"
  595. />
  596. </div>
  597. </a-tab-pane>
  598. </a-tabs>
  599. <a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
  600. <template slot="footer">
  601. <a-button key="back" @click="closeImage">取消</a-button>
  602. <a-button key="submit" type="primary" @click="handleOkImage" :loading="loadingImage">
  603. 确定
  604. </a-button>
  605. </template>
  606. <a-form-item label="" class="add-image-material">
  607. <upload-to-ali
  608. style="width:100%"
  609. v-model="urlListImage.url"
  610. :customDomain="customDomain"
  611. :multiple="true"
  612. preview
  613. :region="region"
  614. :bucket="bucket"
  615. :accept="acceptImage"
  616. :max="10"
  617. :size="2048"
  618. :accessKeyId="accessKeyId"
  619. :accessKeySecret="accessKeySecret"
  620. :before-upload="fileWater"
  621. :dir="dirImg"
  622. @delete='deleteImage'
  623. @loaded="overUploadImage"
  624. ></upload-to-ali>
  625. <span v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0" style="color:red"
  626. >上传素材的尺寸不符,请修改(<span v-for="(item, index) of material" :key="index" v-show="!item"
  627. >第{{ index + 1 }}张</span
  628. >出错)</span
  629. >
  630. <span
  631. v-else-if="urlListImage.url.length > 0 && material.filter(item => item == false).length == 0"
  632. style="color:green"
  633. >上传成功</span
  634. >
  635. </a-form-item>
  636. </a-modal>
  637. <a-modal title="数据详情" v-model="showDataBool" :footer="null">
  638. <div class="bhShow" style="display:flex;justify-content:space-between;height:400px">
  639. <div v-if="douyinData" class="show-data">
  640. <span style="color:black;font-size:18px;text-align:center;width:100%">抖音</span>
  641. <span>消耗:{{ douyinData.cost }}</span>
  642. <span>封面点击:{{ douyinData.click }}</span>
  643. <span>封面展示:{{ douyinData.showNum }}</span>
  644. <span>激活:{{ douyinData.active }}</span>
  645. <span>转化量:{{ douyinData.convertNum }}</span>
  646. <span>表单提交:{{ douyinData.form }}</span>
  647. <span>下载注册:{{ douyinData.register }}</span>
  648. <span>视频总播放:{{ douyinData.totalPlay }}</span>
  649. <span>视频有效播放:{{ douyinData.validPlay }}</span>
  650. </div>
  651. <div v-if="kuaishouData" class="show-data">
  652. <span style="color:black;font-size:18px;text-align:center;width:100%">快手</span>
  653. <span>消耗:{{ kuaishouData.charge }}</span>
  654. <span>封面点击:{{ kuaishouData.photoClick }}</span>
  655. <span>封面展示:{{ kuaishouData.photoShow }}</span>
  656. <span>素材曝光数:{{ kuaishouData.aclick }}</span>
  657. <span>激活数:{{ kuaishouData.activation }}</span>
  658. <span>行为数:{{ kuaishouData.bclick }}</span>
  659. <span>表单提交数:{{ kuaishouData.formCount }}</span>
  660. </div>
  661. </div>
  662. </a-modal>
  663. <a-modal :title="add?'添加素材':'修改素材'" v-model="visible" @cancel="close" @afterClose="close" :maskClosable="false" :width="800">
  664. <template slot="footer">
  665. <a-button key="back" @click="close">取消</a-button>
  666. <a-button key="submit" type="primary" :disabled="!confirmLoading" :loding="loading" @click="handleOk">
  667. 确定
  668. </a-button>
  669. </template>
  670. <a-form :form="form">
  671. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
  672. <!-- <selectTable :projectId.sync="projectId" /> -->
  673. <a-select
  674. v-decorator="[
  675. 'projectId', // 给表单赋值或拉取表单时,该input对应的key
  676. { rules: [{ required: true, message: '请选择项目!' }] }
  677. ]"
  678. @change="getProjectId"
  679. showSearch
  680. optionFilterProp="children"
  681. :filterOption="filterOption"
  682. :disabled="!add"
  683. >
  684. <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
  685. {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
  686. item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
  687. }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
  688. </a-select-option>
  689. </a-select>
  690. </a-form-item>
  691. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频素材上传" v-if="getData('projectId')">
  692. <upload-to-ali
  693. v-model="urlList.url"
  694. :customDomain="customDomain"
  695. preview
  696. :region="region"
  697. :bucket="bucket"
  698. :accept="acceptVideo"
  699. :max="10"
  700. :size="1024000"
  701. :accessKeyId="accessKeyId"
  702. :accessKeySecret="accessKeySecret"
  703. :before-upload="file"
  704. :dir="dirVideo"
  705. @loaded="overUpload"
  706. >
  707. </upload-to-ali>
  708. <span v-if="repeat" style="color:red">
  709. 此素材重复,请重新选择上传
  710. </span>
  711. <span v-if="confirmLoading && urlList.url != ''" style="color:green">
  712. 上传成功
  713. </span>
  714. </a-form-item>
  715. <a-form-item
  716. :label-col="labelCol"
  717. :wrapper-col="wrapperCol"
  718. label="封面上传"
  719. class="add-image-material"
  720. v-if="getData('projectId')&&add&&urlList.url!=''"
  721. >
  722. <upload-to-ali
  723. style="width:160%"
  724. v-model="urlListImage.url"
  725. :customDomain="customDomain"
  726. :multiple="true"
  727. preview
  728. :region="region"
  729. :bucket="bucket"
  730. :accept="acceptImage"
  731. :max="10"
  732. :size="2048"
  733. :accessKeyId="accessKeyId"
  734. :accessKeySecret="accessKeySecret"
  735. :before-upload="fileWater"
  736. :dir="dirImg"
  737. @delete='deleteImage'
  738. @loaded="overUploadImage"
  739. ></upload-to-ali>
  740. <span
  741. v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0"
  742. style="color:red"
  743. >上传素材的尺寸不符,请修改(<span v-for="(item, index) of material" :key="index" v-show="!item"
  744. >第{{ index + 1 }}张</span
  745. >出错)</span
  746. >
  747. <span
  748. v-else-if="urlListImage.url.length > 0 && material.filter(item => item == false).length == 0"
  749. style="color:green"
  750. >上传成功</span
  751. >
  752. </a-form-item>
  753. <div v-if="add">
  754. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  755. <a-select
  756. v-decorator="[
  757. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  758. { rules: [{ required: true, message: '请选择策划!' }] }
  759. ]"
  760. showSearch
  761. optionFilterProp="children"
  762. :filterOption="filterOption"
  763. >
  764. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">
  765. {{ item.userName }}
  766. </a-select-option>
  767. </a-select>
  768. </a-form-item>
  769. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄" v-if="activeKey == 'video'">
  770. <a-select
  771. v-decorator="[
  772. 'shotId' // 给表单赋值或拉取表单时,该input对应的key
  773. ]"
  774. showSearch
  775. optionFilterProp="children"
  776. :filterOption="filterOption"
  777. >
  778. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">
  779. {{ item.userName }}
  780. </a-select-option>
  781. </a-select>
  782. </a-form-item>
  783. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  784. <a-select
  785. v-decorator="[
  786. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  787. { rules: [{ required: true, message: '请选择剪辑!' }] }
  788. ]"
  789. showSearch
  790. optionFilterProp="children"
  791. :filterOption="filterOption"
  792. >
  793. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
  794. {{ item.userName }}
  795. </a-select-option>
  796. </a-select>
  797. </a-form-item>
  798. </div>
  799. <a-form-item
  800. :label-col="labelCol"
  801. :wrapper-col="{
  802. xs: { span: 24 },
  803. sm: { span: 18 }
  804. }"
  805. label="标签"
  806. v-if="add"
  807. >
  808. <template v-for="(tag, index) in tags">
  809. <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
  810. <a-tag :key="tag" :closable="index !== 0" :afterClose="() => handleClose(tag)">
  811. {{ `${tag.slice(0, 20)}...` }}
  812. </a-tag>
  813. </a-tooltip>
  814. <a-tag v-else :key="tag" :closable="true" :afterClose="() => handleClose(tag)">
  815. {{ tag }}
  816. </a-tag>
  817. </template>
  818. <a-input
  819. v-if="inputVisible"
  820. ref="input"
  821. type="text"
  822. size="small"
  823. :style="{ width: '78px' }"
  824. :value="inputValue"
  825. @change="handleInputChange"
  826. @blur="handleInputConfirm"
  827. @keyup.enter="handleInputConfirm"
  828. />
  829. <a-tag v-else @click="showInput" style="background: #fff; borderStyle: dashed;">
  830. <a-icon type="plus" /> New Tag
  831. </a-tag>
  832. </a-form-item>
  833. <a-form-item
  834. :label-col="labelCol"
  835. :wrapper-col="{
  836. xs: { span: 24 },
  837. sm: { span: 12 }
  838. }"
  839. label="描述"
  840. v-if="add"
  841. >
  842. <a-textarea
  843. placeholder="请输入描述"
  844. v-decorator="[
  845. 'materialDescribe' // 给表单赋值或拉取表单时,该input对应的key
  846. ]"
  847. :autosize="{ minRows: 3, maxRows: 10 }"
  848. />
  849. </a-form-item>
  850. </a-form>
  851. </a-modal>
  852. <a-modal title="素材详情" v-model="visibleDetail" width="70%" :footer="null">
  853. <div style="width:100%;height:35px">
  854. <a-button type="primary" @click="setSuccess" style="float:right">
  855. {{ excellent == 0 ? '标记为优秀素材' : '取消标记' }}
  856. </a-button>
  857. </div>
  858. <div style="display:flex;height:700px">
  859. <div
  860. class="video-content"
  861. style="width:50%;padding:10px;box-sizing:border-box;display:flex;justify-content:center;border-right:1px solid #f2f2f2"
  862. >
  863. <video class="video" :src="showUrl" controls="controls" style="height:50%" controlsList="nodownload">
  864. 您的浏览器不支持 video 标签。
  865. </video>
  866. <div class="downLoad" style="height:50%;overflow:auto">
  867. <a-button @click="onCheckAllImageChange" v-if="model.length > 0">{{
  868. checkAllImage ? '取消 ( ' + checkArrImage.length + ' )' : '全选'
  869. }}</a-button>
  870. <ul class="actor-photo-list" :style="{ width: model.length>4?25 * model.length + '%':'100%' }" v-if="model.length > 0">
  871. <a-checkbox-group
  872. v-model="checkArrImage"
  873. style="width:100%; display: flex;padding-left: 0;"
  874. @change="onChangeCheckImage"
  875. >
  876. <li v-for="(item, index) of model" :key="index">
  877. <a-checkbox :value="item.id" style="position:absolute;z-index: 100"></a-checkbox
  878. ><img class="video" :src="item.url" @click="coverPreviewShowModal(item, index)" />
  879. <span
  880. class="tag-video"
  881. :style="{
  882. backgroundColor:
  883. item.status == 0 ? 'rgba(0, 0, 0)' : item.status == 1 ? 'rgba(0, 180, 100)' : 'red'
  884. }"
  885. >{{ item.status == 0 ? '未审核' : item.status == 1 ? '已批准' : '已驳回' }}</span
  886. >
  887. </li>
  888. </a-checkbox-group>
  889. </ul>
  890. <div v-else style="height:100%;display:flex;justify-content: center;align-items: center;">
  891. <img
  892. 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"
  893. alt="" />
  894. </div>
  895. </div>
  896. </div>
  897. <a-modal title="图片预览" v-model="coverPreviewVisible" :footer="null">
  898. <a-carousel arrows class="cover_carousel_con">
  899. <div v-for="(item, index) in modelNew" :key="index" class="content">
  900. <img :src="item.url" :width="300" />
  901. <div style="margin-top:10px">
  902. <a-button type="primary" @click="editImage(item, '1')">
  903. 通过审核
  904. </a-button>
  905. <a-divider type="vertical" />
  906. <a-popconfirm @confirm="editImage(item, '2')">
  907. <div slot="title">
  908. <div>
  909. 驳回原因:
  910. <a-textarea
  911. placeholder="请输入原因"
  912. v-model="refuseReasonImage"
  913. :autosize="{ minRows: 3, maxRows: 10 }"
  914. />
  915. </div>
  916. </div>
  917. <a-button type="primary">驳回</a-button>
  918. <!-- @click="edit(null, '0', '2')" -->
  919. </a-popconfirm>
  920. </div>
  921. </div>
  922. <a-icon
  923. type="left-circle"
  924. slot="prevArrow"
  925. slot-scope
  926. style="left: 10px;zIndex: 9;font-size:30px;color:black"
  927. />
  928. <a-icon
  929. type="right-circle"
  930. slot="nextArrow"
  931. slot-scope
  932. style="right: 10px;zIndex: 9;font-size:30px;color:black"
  933. />
  934. </a-carousel>
  935. </a-modal>
  936. <div style="flex:3;padding:10px;box-sizing:border-box;">
  937. <a-form v-if="detail" class="detail ant-advanced-search-form" layout="inline">
  938. <div v-if="detail.parameter" style="display:flex;">
  939. <a-form-item label="视频时长" v-if="detail.parameter.second" style="flex:1">
  940. {{ detail.parameter.second }}秒
  941. </a-form-item>
  942. <a-form-item label="尺寸" style="flex:1" v-if="detail.parameter.width">
  943. {{ detail.parameter.width }}*{{ detail.parameter.height }}
  944. </a-form-item>
  945. <a-form-item label="大小" style="flex:1" v-if="detail.parameter.size">
  946. {{ detail.parameter.size }}
  947. </a-form-item>
  948. </div>
  949. <div v-if="detail.ascription" style="display:flex;">
  950. <a-form-item label="策划" style="flex:1">
  951. {{ detail.ascription.planName }}
  952. </a-form-item>
  953. <a-form-item label="拍摄" style="flex:1">
  954. {{ detail.ascription.shotName }}
  955. </a-form-item>
  956. <a-form-item label="剪辑" v-if="detail.ascription.clipName" style="flex:1">
  957. {{ detail.ascription.clipName }}
  958. </a-form-item>
  959. </div>
  960. <div>
  961. <a-form-item label="标签" v-if="detail.tag">
  962. <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
  963. </a-form-item>
  964. </div>
  965. <div>
  966. <a-form-item label="无水印素材下载" v-if="name">
  967. <a-button type="primary" @click="downloadByBlobShowUrl">下载</a-button>
  968. </a-form-item>
  969. </div>
  970. <div>
  971. <a-form-item label="水印素材下载" v-if="name">
  972. <a-button type="primary" @click="downloadByBlob" v-if="showUrlWater">下载</a-button>
  973. <span v-else>水印素材生成中,请一分钟后刷新</span>
  974. </a-form-item>
  975. </div>
  976. <div>
  977. <a-form-item label="水印素材链接" v-if="showUrlWater">
  978. <a-input v-model="showUrlWater" type="text" readonly />
  979. </a-form-item>
  980. </div>
  981. <div style="width:100%" class="downLoad">
  982. <a-form-item label="生成水印素材" style="width:100%">
  983. <a-select :defaultValue="4" v-model="size" style="width:80%">
  984. <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">{{
  985. item.name
  986. }}</a-select-option>
  987. </a-select>
  988. <a-button type="primary" @click="getWater">生成</a-button>
  989. </a-form-item>
  990. </div>
  991. <div>
  992. <a-form-item label="审核人" v-if="active == '2' && detail.auditorName">
  993. {{ detail.auditorName }}
  994. </a-form-item>
  995. </div>
  996. <div>
  997. <a-form-item label="广告语" v-if="active == '1'">
  998. {{ creativeCopywriter ? creativeCopywriter : '无广告语' }}
  999. </a-form-item>
  1000. </div>
  1001. <div>
  1002. <a-form-item label="驳回原因" v-if="active == '2'">
  1003. {{ refuseReason ? refuseReason : '无原因' }}
  1004. </a-form-item>
  1005. </div>
  1006. <div>
  1007. <a-form-item label="截图" v-if="active == '2'">
  1008. <upload-to-ali
  1009. v-if="refuseFile"
  1010. disabled
  1011. v-model="refuseFile"
  1012. :customDomain="customDomain"
  1013. multiple
  1014. preview
  1015. :region="region"
  1016. :bucket="bucket"
  1017. :accept="acceptImage"
  1018. :max="10"
  1019. :size="2048"
  1020. :accessKeyId="accessKeyId"
  1021. :accessKeySecret="accessKeySecret"
  1022. :dir="dirImg"
  1023. ></upload-to-ali>
  1024. <div v-else>无截图</div>
  1025. </a-form-item>
  1026. </div>
  1027. <div>
  1028. <a-form-item
  1029. label="视频审核"
  1030. v-if="
  1031. active != '2' &&
  1032. (role.roleCode == 'operator' ||
  1033. role.roleCode == 'kuaishouOperationManager' ||
  1034. role.roleCode == 'admin' ||
  1035. role.roleCode == 'operationAssistant' ||
  1036. role.roleCode == 'touTiaoOperationManager')
  1037. "
  1038. >
  1039. <a-popconfirm
  1040. @confirm="edit(null, '0', '1')"
  1041. v-show="active != '1'"
  1042. v-if="
  1043. role.roleCode == 'operator' ||
  1044. role.roleCode == 'kuaishouOperationManager' ||
  1045. role.roleCode == 'admin' ||
  1046. role.roleCode == 'operationAssistant' ||
  1047. role.roleCode == 'touTiaoOperationManager'
  1048. "
  1049. >
  1050. <div slot="title">
  1051. <div>
  1052. 广告语:
  1053. <a-textarea placeholder="请输入" v-model="refuseReason" :autosize="{ minRows: 3, maxRows: 10 }" />
  1054. </div>
  1055. </div>
  1056. <a-button type="primary" v-if="active == '0'" style="margin-right:10px">通过审核</a-button>
  1057. </a-popconfirm>
  1058. <a-popconfirm @confirm="okEdit" v-show="active != '2'">
  1059. <div slot="title">
  1060. <div>
  1061. 驳回原因:
  1062. <a-textarea
  1063. placeholder="请输入原因"
  1064. v-model="refuseReason"
  1065. :autosize="{ minRows: 3, maxRows: 10 }"
  1066. />
  1067. </div>
  1068. <div>
  1069. 截图:
  1070. <upload-to-ali
  1071. v-model="refuseFile"
  1072. :customDomain="customDomain"
  1073. multiple
  1074. preview
  1075. :region="region"
  1076. :bucket="bucket"
  1077. :accept="acceptImage"
  1078. :max="10"
  1079. :size="2048"
  1080. :accessKeyId="accessKeyId"
  1081. :accessKeySecret="accessKeySecret"
  1082. :dir="dirImg"
  1083. ></upload-to-ali>
  1084. </div>
  1085. </div>
  1086. <a-button type="primary" v-show="active != '2'">驳回</a-button>
  1087. <!-- @click="edit(null, '0', '2')" -->
  1088. </a-popconfirm>
  1089. </a-form-item>
  1090. </div>
  1091. <div>
  1092. <a-form-item label="封面审核" style="width:120%">
  1093. <a-button type="primary" :disabled="checkArrImage.length == 0" @click="editImageAll('1')"
  1094. >通过审核</a-button
  1095. >
  1096. <a-popconfirm @confirm="editImageAll('2')" v-show="active != '2'">
  1097. <div slot="title">
  1098. <div>
  1099. 驳回原因:
  1100. <a-textarea
  1101. placeholder="请输入原因"
  1102. v-model="refuseReasonImage"
  1103. :autosize="{ minRows: 3, maxRows: 10 }"
  1104. />
  1105. </div>
  1106. </div>
  1107. <a-button type="primary" :disabled="checkArrImage.length != 1" style="margin-left:10px"
  1108. >驳回</a-button
  1109. >
  1110. <!-- @click="edit(null, '0', '2')" -->
  1111. </a-popconfirm>
  1112. </a-form-item>
  1113. </div>
  1114. </a-form>
  1115. </div>
  1116. </div>
  1117. </a-modal>
  1118. <a-modal title="人员修改" v-model="personVisible" @afterClose="closePerson">
  1119. <template slot="footer">
  1120. <a-button key="back" @click="closePerson">取消</a-button>
  1121. <a-button key="submit" type="primary" :loading="loadingPerson" @click="handleOkPerson">
  1122. 确定
  1123. </a-button>
  1124. </template>
  1125. <a-form :form="formPerson">
  1126. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  1127. <a-select
  1128. v-decorator="[
  1129. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  1130. { rules: [{ required: true, message: '请选择策划!' }] }
  1131. ]"
  1132. showSearch
  1133. optionFilterProp="children"
  1134. :filterOption="filterOption"
  1135. >
  1136. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">
  1137. {{ item.userName }}
  1138. </a-select-option>
  1139. </a-select>
  1140. </a-form-item>
  1141. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄" v-if="activeKey == 'video'">
  1142. <a-select
  1143. v-decorator="[
  1144. 'shotId' // 给表单赋值或拉取表单时,该input对应的key
  1145. ]"
  1146. showSearch
  1147. optionFilterProp="children"
  1148. :filterOption="filterOption"
  1149. >
  1150. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">
  1151. {{ item.userName }}
  1152. </a-select-option>
  1153. </a-select>
  1154. </a-form-item>
  1155. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  1156. <a-select
  1157. v-decorator="[
  1158. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  1159. { rules: [{ required: true, message: '请选择剪辑!' }] }
  1160. ]"
  1161. showSearch
  1162. optionFilterProp="children"
  1163. :filterOption="filterOption"
  1164. >
  1165. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
  1166. {{ item.userName }}
  1167. </a-select-option>
  1168. </a-select>
  1169. </a-form-item>
  1170. </a-form>
  1171. </a-modal>
  1172. <a-modal title="推荐封面" v-model="chouzhen" width="60%">
  1173. <template slot="footer">
  1174. <a-button key="back" @click="chouzhen=false">关闭</a-button>
  1175. </template>
  1176. <ul v-if="chouzhenList.length>0" style="height:600px;overflow:auto">
  1177. <li v-for="(item,index) of chouzhenList" :key="index" class="chouzhen" :class="{'first':index == 0}">
  1178. <img :src="item.url" alt="" style="width:100%">
  1179. </li>
  1180. </ul>
  1181. <div style="clear:both"></div>
  1182. </a-modal>
  1183. <account-check ref="check" @synchro="implement"></account-check>
  1184. </a-card>
  1185. </template>
  1186. <script>
  1187. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  1188. import JEllipsis from '@/components/jeecg/JEllipsis'
  1189. import UploadToAli from '@femessage/upload-to-ali'
  1190. import { fileCheck, fileInsertV2, fileEdit, fileCheckImage,fileEditAll } from '@/api/actor'
  1191. import { getAction, postAction, postFile, deleteAction, putAction } from '@/api/manage'
  1192. import qs from 'qs'
  1193. import { mapGetters } from 'vuex'
  1194. import moment from 'moment'
  1195. import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
  1196. import BMF from 'browser-md5-file'
  1197. import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl'
  1198. import accountCheck from './accountCheck'
  1199. export default {
  1200. name: 'YardList',
  1201. mixins: [JeecgListMixin],
  1202. components: {
  1203. JEllipsis,
  1204. UploadToAli,
  1205. accountCheck,
  1206. selectTable
  1207. },
  1208. data() {
  1209. return {
  1210. coverPreviewVisible: false,
  1211. chouzhen:false,
  1212. chouzhenList:[],
  1213. model: [],
  1214. modelNew: [],
  1215. goodsColumns: [
  1216. {
  1217. title: '封面预览',
  1218. // dataIndex: 'coverUrl',
  1219. // key: 'coverUrl',
  1220. dataIndex: 'url',
  1221. align: 'center',
  1222. scopedSlots: { customRender: 'url' }
  1223. },
  1224. {
  1225. title: '审核',
  1226. align: 'center',
  1227. dataIndex: 'action',
  1228. width: 100,
  1229. scopedSlots: { customRender: 'action' }
  1230. }
  1231. ],
  1232. addImageVisible: false,
  1233. addImageData: null,
  1234. projectId: '',
  1235. inputVisible: false,
  1236. inputValue: '',
  1237. labelCol: {
  1238. xs: {
  1239. span: 24
  1240. },
  1241. sm: {
  1242. span: 5
  1243. }
  1244. },
  1245. wrapperCol: {
  1246. xs: {
  1247. span: 24
  1248. },
  1249. sm: {
  1250. span: 12
  1251. }
  1252. },
  1253. queryParam: {},
  1254. dataElse: [],
  1255. ascription: {
  1256. clipId: [], //剪辑人id
  1257. shotId: [], //拍摄人id
  1258. planId: [], //策划id
  1259. planeId: [] //平面id
  1260. },
  1261. show: true,
  1262. visible: false,
  1263. visibleDetail: false,
  1264. personVisible:false,
  1265. confirmLoading: false,
  1266. loading:false,
  1267. loadingImage:false,
  1268. loadingPerson:false,
  1269. activeKey: 'video',
  1270. active: '0',
  1271. examinelList: [
  1272. {
  1273. value: '0',
  1274. tab: '未审核'
  1275. },
  1276. {
  1277. value: '1',
  1278. tab: '已批准'
  1279. },
  1280. {
  1281. value: '2',
  1282. tab: '已驳回'
  1283. },
  1284. {
  1285. value:'3',
  1286. tab:'有效视频'
  1287. }
  1288. ],
  1289. // 表头
  1290. columns: [],
  1291. urlList: {
  1292. url: '',
  1293. md5: '',
  1294. name: ''
  1295. },
  1296. urlListImage: {
  1297. url: [],
  1298. md5: [],
  1299. name: [],
  1300. size: []
  1301. },
  1302. watermarkUrl: {
  1303. url: '',
  1304. md5: '',
  1305. name: ''
  1306. },
  1307. url: {
  1308. list: '/ctop/materialInfo/list'
  1309. },
  1310. detail: false,
  1311. form: this.$form.createForm(this),
  1312. formPerson:this.$form.createForm(this),
  1313. tags: [],
  1314. refuseFile: [],
  1315. refuseReason: '',
  1316. refuseReasonImage: '',
  1317. creativeCopywriter: '',
  1318. customDomain: '',
  1319. region: 'oss-cn-beijing',
  1320. bucket: 'ctop-media',
  1321. acceptVideo: 'video/mpeg,video/mp4',
  1322. acceptImage: 'image/jpeg,image/jpg',
  1323. accessKeyId: 'LTAIbNbqWzSOklQV',
  1324. accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
  1325. checkArr: [],
  1326. checkAll: false,
  1327. checkArrImage: [],
  1328. checkAllImage: false,
  1329. showUrl: '',
  1330. showUrlWater: '',
  1331. materialName: '',
  1332. materialDescribe: '',
  1333. name: '',
  1334. detail: null,
  1335. add: true,
  1336. id: '',
  1337. role: {
  1338. roleCode: '',
  1339. roleName: ''
  1340. },
  1341. key: '0',
  1342. mediaId: null,
  1343. sizeType: [],
  1344. size: null,
  1345. repeat: false,
  1346. excellent: 0,
  1347. code: '',
  1348. material: [],
  1349. imageArrList: [],
  1350. showDataBool: false,
  1351. kuaishouData: null,
  1352. douyinData: null
  1353. }
  1354. },
  1355. filters: {
  1356. getDate(value) {
  1357. let date = new Date(value)
  1358. let y = date.getFullYear()
  1359. let MM = date.getMonth() + 1
  1360. MM = MM < 10 ? '0' + MM : MM
  1361. let d = date.getDate()
  1362. d = d < 10 ? '0' + d : d
  1363. return y + '-' + MM + '-' + d
  1364. }
  1365. },
  1366. computed: {
  1367. dirImg() {
  1368. let date = new Date()
  1369. let y = date.getFullYear()
  1370. let MM = date.getMonth() + 1
  1371. MM = MM < 10 ? '0' + MM : MM
  1372. let d = date.getDate()
  1373. d = d < 10 ? '0' + d : d
  1374. return 'image/' + y + '-' + MM + '-' + d + '/'
  1375. },
  1376. dirVideo() {
  1377. let date = new Date()
  1378. let y = date.getFullYear()
  1379. let MM = date.getMonth() + 1
  1380. MM = MM < 10 ? '0' + MM : MM
  1381. let d = date.getDate()
  1382. d = d < 10 ? '0' + d : d
  1383. return 'video/' + y + '-' + MM + '-' + d + '/'
  1384. }
  1385. },
  1386. created() {
  1387. this.queryParam.type = 'VIDEO'
  1388. this.queryParam.userId = this.userInfo().id
  1389. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
  1390. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
  1391. // this.queryParam.status = key
  1392. this.ipagination.pageSize = 8
  1393. this.getParticipateList()
  1394. // /sys/user/getRoleInfo
  1395. getAction('/sys/user/getRoleInfo', {
  1396. userId: this.userInfo().id
  1397. }).then(res => {
  1398. this.role = res
  1399. })
  1400. getAction('/ctop/videoWatermarkTemplate/list').then(res => {
  1401. if (res.success) {
  1402. this.sizeType = res.result.records
  1403. }
  1404. })
  1405. },
  1406. updated() {
  1407. stopOtherVideo()
  1408. },
  1409. watch: {
  1410. $route: function(n, o) {
  1411. if (n.path == '/modules/material/videoMaterial') {
  1412. this.queryParam.userId = this.userInfo().id
  1413. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
  1414. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
  1415. this.loadData()
  1416. }
  1417. },
  1418. 'queryParam.projectId': function(n, o) {
  1419. if (n != '') {
  1420. this.getList(n)
  1421. }
  1422. },
  1423. visibleDetail:function(n,o){
  1424. if(!n){
  1425. this.refuseFile = []
  1426. this.refuseReason = ''
  1427. }
  1428. }
  1429. },
  1430. methods: {
  1431. editImage(item, status) {
  1432. var params = {}
  1433. params.id = item.id
  1434. params.status = status
  1435. params.auditorId = this.userInfo().id
  1436. if (status == '1') {
  1437. } else {
  1438. params.refuseReason = this.refuseReasonImage
  1439. }
  1440. var updateArr = [params]
  1441. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  1442. console.log(res)
  1443. if (res.success) {
  1444. // this.coverPreviewVisible = false
  1445. getAction('/ctop/MaterialImageInfo/list', {
  1446. videoId: this.code
  1447. }).then(res => {
  1448. if (res.success) {
  1449. this.model = res.result.map((item, index) => {
  1450. return {
  1451. ...item,
  1452. key: index
  1453. }
  1454. })
  1455. this.modelNew = this.model.filter((item, index) => {
  1456. return item.status == '0'
  1457. })
  1458. if (this.modelNew.length == 0) {
  1459. this.coverPreviewVisible = false
  1460. }
  1461. }
  1462. })
  1463. this.loadData()
  1464. } else {
  1465. this.$message.error(res.message)
  1466. }
  1467. })
  1468. },
  1469. editImageAll(status) {
  1470. this.checkArrImage
  1471. // var params = {}
  1472. // params.id = item.id
  1473. // params.status = status
  1474. var updateArr = []
  1475. if (status == '1') {
  1476. updateArr = this.checkArrImage.map(item => {
  1477. return { id: item, status: status }
  1478. })
  1479. } else {
  1480. updateArr = this.checkArrImage.map(item => {
  1481. return { id: item, status: status, refuseReason: this.refuseReasonImage }
  1482. })
  1483. }
  1484. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  1485. if (res.success) {
  1486. // this.coverPreviewVisible = false
  1487. getAction('/ctop/MaterialImageInfo/list', {
  1488. videoId: this.code
  1489. }).then(res => {
  1490. if (res.success) {
  1491. this.checkArrImage = []
  1492. this.checkAllImage = false
  1493. this.model = res.result.map((item, index) => {
  1494. return {
  1495. ...item,
  1496. key: index
  1497. }
  1498. })
  1499. }
  1500. })
  1501. this.loadData()
  1502. } else {
  1503. this.$message.error(res.message)
  1504. }
  1505. })
  1506. },
  1507. showData(item) {
  1508. if (item.byteDance || item.kuaiShou) {
  1509. this.showDataBool = true
  1510. this.kuaishouData = item.kuaiShou
  1511. this.douyinData = item.byteDance
  1512. } else {
  1513. this.$message.error('抖音和快手都无数据')
  1514. return
  1515. }
  1516. },
  1517. setSuccess() {
  1518. var params = {}
  1519. params.id = this.code
  1520. params.excellent = this.excellent == 1 ? 0 : 1
  1521. getAction('/ctop/materialInfo/excellent/set', params).then(res => {
  1522. if (res.success) {
  1523. this.excellent = this.excellent == 1 ? 0 : 1
  1524. this.loadData(this.ipagination.current)
  1525. }
  1526. })
  1527. },
  1528. getData(className) {
  1529. return this.form.getFieldValue(className)
  1530. },
  1531. deleteData(id) {
  1532. deleteAction('/ctop/materialInfo/delete', {
  1533. id: id
  1534. }).then(res => {
  1535. if (res.success) {
  1536. this.$message.success('删除成功')
  1537. this.loadData()
  1538. } else {
  1539. this.$message.error(res.message)
  1540. }
  1541. })
  1542. },
  1543. filterOption(input, option) {
  1544. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1545. },
  1546. moment,
  1547. a(item) {
  1548. item.showVideo = true
  1549. },
  1550. tongbu() {
  1551. this.$refs.check.getData('/ctop/userAllocation/getAccountListByProjectId', {
  1552. userId: this.userInfo().id,
  1553. projectId: this.queryParam.projectId
  1554. })
  1555. },
  1556. implement(data) {
  1557. var params = {}
  1558. params.mediaId = this.mediaId
  1559. params.materialArray = JSON.stringify(this.checkArr)
  1560. params.accountArray = JSON.stringify(data)
  1561. postAction('/ctop/materialUpload/uploadAccount', params).then(res => {
  1562. if (res.code == 0) {
  1563. this.checkArr = []
  1564. this.checkAll = false
  1565. }
  1566. })
  1567. // /ctop/materialUpload/uploadAccount
  1568. },
  1569. downloadByBlobShowUrl() {
  1570. fetch(this.showUrl)
  1571. .then(res => res.blob())
  1572. .then(blob => {
  1573. const a = document.createElement('a')
  1574. document.body.appendChild(a)
  1575. a.style.display = 'none'
  1576. // 使用获取到的blob对象创建的url
  1577. const url = window.URL.createObjectURL(blob)
  1578. a.href = url
  1579. // 指定下载的文件名
  1580. a.download = this.materialName
  1581. a.click()
  1582. document.body.removeChild(a)
  1583. // 移除blob对象的url
  1584. window.URL.revokeObjectURL(url)
  1585. })
  1586. },
  1587. downloadByBlob() {
  1588. fetch(this.showUrlWater)
  1589. .then(res => res.blob())
  1590. .then(blob => {
  1591. const a = document.createElement('a')
  1592. document.body.appendChild(a)
  1593. a.style.display = 'none'
  1594. // 使用获取到的blob对象创建的url
  1595. const url = window.URL.createObjectURL(blob)
  1596. a.href = url
  1597. // 指定下载的文件名
  1598. a.download = this.name
  1599. a.click()
  1600. document.body.removeChild(a)
  1601. // 移除blob对象的url
  1602. window.URL.revokeObjectURL(url)
  1603. })
  1604. },
  1605. download(href, name) {
  1606. let eleLink = document.createElement('a')
  1607. eleLink.download = name
  1608. eleLink.href = href
  1609. eleLink.click()
  1610. eleLink.remove()
  1611. },
  1612. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  1613. onCheckAllChange() {
  1614. if (this.checkAll) {
  1615. this.checkArr = []
  1616. } else {
  1617. this.checkArr = this.dataSource.map(item => {
  1618. return item.id
  1619. })
  1620. }
  1621. this.checkAll = !this.checkAll
  1622. },
  1623. onCheckAllImageChange() {
  1624. if (this.checkAllImage) {
  1625. this.checkArrImage = []
  1626. } else {
  1627. this.checkArrImage = this.model.map(item => {
  1628. return item.id
  1629. })
  1630. }
  1631. this.checkAllImage = !this.checkAllImage
  1632. },
  1633. searchRe() {
  1634. this.queryParam = {
  1635. type: 'VIDEO',
  1636. userId: this.userInfo().id,
  1637. status: this.active
  1638. }
  1639. this.loadData(1)
  1640. },
  1641. getList(value) {
  1642. if (value) {
  1643. this.mediaId = this.dataElse.filter(item => {
  1644. if (value == item.projectId) {
  1645. return item
  1646. }
  1647. })[0].mediaId
  1648. }
  1649. this.loadData()
  1650. },
  1651. onChangeCheckImage(checkedList) {
  1652. if (checkedList.length == 0) {
  1653. this.checkAllImage = false
  1654. }
  1655. },
  1656. onChangeCheck(checkedList) {
  1657. if (checkedList.length == 0) {
  1658. this.checkAll = false
  1659. }
  1660. },
  1661. handleClose(removedTag) {
  1662. const tags = this.tags.filter(tag => tag !== removedTag)
  1663. this.tags = tags
  1664. },
  1665. showInput() {
  1666. this.inputVisible = true
  1667. this.$nextTick(function() {
  1668. this.$refs.input.focus()
  1669. })
  1670. },
  1671. handleInputChange(e) {
  1672. this.inputValue = e.target.value
  1673. },
  1674. handleInputConfirm() {
  1675. const inputValue = this.inputValue
  1676. let tags = this.tags
  1677. if (inputValue && tags.indexOf(inputValue) === -1) {
  1678. tags = [...tags, inputValue]
  1679. }
  1680. Object.assign(this, {
  1681. tags,
  1682. inputVisible: false,
  1683. inputValue: ''
  1684. })
  1685. },
  1686. getWater() {
  1687. var params = qs.stringify({
  1688. id: this.id,
  1689. watermarkTemplateId: this.size
  1690. })
  1691. postAction('/ctop/materialInfo/watermark', params).then(res => {
  1692. if (res.success) {
  1693. // getAction("/ctop/videoWatermarkTask/list").then(res=>{
  1694. // console.log(res)
  1695. // })
  1696. this.$message.success('水印素材生成中')
  1697. this.visibleDetail = false
  1698. this.refuseFile = []
  1699. this.refuseReason = ''
  1700. closeAllVideoFun()
  1701. this.loadData()
  1702. }
  1703. })
  1704. },
  1705. showDetail(item) {
  1706. this.visibleDetail = true
  1707. this.showUrl = item.url
  1708. this.id = item.id
  1709. this.code = item.code
  1710. this.excellent = item.excellent
  1711. if (this.active == '2') {
  1712. this.refuseReason = item.refuseReason
  1713. this.refuseFile = item.refuseFile ? JSON.parse(item.refuseFile) : null
  1714. } else if (this.active == '1') {
  1715. this.creativeCopywriter = item.creativeCopywriter
  1716. this.refuseReason = ''
  1717. this.refuseFile = []
  1718. } else {
  1719. this.refuseReason = ''
  1720. this.refuseFile = []
  1721. }
  1722. getAction('/ctop/materialInfo/getDetail', {
  1723. materialId: item.id
  1724. }).then(res => {
  1725. this.detail = res
  1726. this.size =
  1727. res.parameter.width == '1080' ? 3 : res.parameter.width == '1920' ? 1 : res.parameter.width == '1280' ? 2 : 4
  1728. })
  1729. getAction('/ctop/materialInfo/queryById', {
  1730. id: item.id
  1731. }).then(res => {
  1732. if (res.success) {
  1733. this.showUrlWater = res.result.watermarkUrl
  1734. this.name = res.result.watermarkCode
  1735. this.materialName = res.result.materialName
  1736. } else {
  1737. this.showUrlWater = null
  1738. this.name = null
  1739. }
  1740. })
  1741. getAction('/ctop/MaterialImageInfo/list', {
  1742. videoId: item.code
  1743. }).then(res => {
  1744. console.log(res)
  1745. if (res.success) {
  1746. this.model = res.result.map((item, index) => {
  1747. return {
  1748. ...item,
  1749. key: index
  1750. }
  1751. })
  1752. }
  1753. })
  1754. },
  1755. coverPreviewShowModal(item, index) {
  1756. console.log(this.model)
  1757. this.modelNew = this.model.filter(items => {
  1758. return items.status == 0
  1759. })
  1760. if (this.modelNew.length > 0) {
  1761. this.coverPreviewVisible = true
  1762. }
  1763. },
  1764. okEditShow(item, editStatus) {
  1765. if (editStatus == '2') {
  1766. var params = {}
  1767. params.id = item.id
  1768. params.auditorId = this.userInfo().id
  1769. params.refuseReason = this.refuseReason
  1770. var data = this.refuseFile.map(item => {
  1771. return 'https:' + item
  1772. })
  1773. params.refuseFile = JSON.stringify(data)
  1774. params.status = editStatus
  1775. fileEdit(params).then(res => {
  1776. this.refuseFile = []
  1777. this.refuseReason = ''
  1778. this.loadData()
  1779. })
  1780. } else if (editStatus == '1') {
  1781. var params = {}
  1782. params.id = item.id
  1783. params.auditorId = this.userInfo().id
  1784. params.creativeCopywriter = this.refuseReason
  1785. params.status = editStatus
  1786. fileEdit(params).then(res => {
  1787. this.refuseReason = ''
  1788. this.loadData()
  1789. })
  1790. }
  1791. },
  1792. okEdit(e) {
  1793. this.edit(null, this.active, '2')
  1794. },
  1795. personEdit(item,status){
  1796. this.add = false
  1797. this.personVisible = true
  1798. this.getProjectId(item.projectId)
  1799. getAction('/ctop/materialInfo/getDetail', {
  1800. materialId: item.id
  1801. }).then(res => {
  1802. this.formPerson.setFieldsValue({
  1803. clipId: res.ascription.clipId,
  1804. planId: res.ascription.planId,
  1805. shotId: res.ascription.shotId,
  1806. })
  1807. this.code = item.code
  1808. })
  1809. },
  1810. edit(item, status, editStatus) {
  1811. if (status == '0' || status == '1') {
  1812. if (editStatus == '2') {
  1813. var params = {}
  1814. params.id = this.id
  1815. params.auditorId = this.userInfo().id
  1816. params.refuseReason = this.refuseReason
  1817. var data = this.refuseFile.map(item => {
  1818. return 'https:' + item
  1819. })
  1820. params.refuseFile = JSON.stringify(data)
  1821. params.status = editStatus
  1822. fileEdit(params).then(res => {
  1823. this.refuseFile = []
  1824. this.refuseReason = ''
  1825. this.loadData()
  1826. this.visibleDetail = false
  1827. closeAllVideoFun()
  1828. })
  1829. } else {
  1830. fileEdit({
  1831. id: this.id,
  1832. status: editStatus,
  1833. auditorId: this.userInfo().id,
  1834. creativeCopywriter: this.refuseReason
  1835. }).then(res => {
  1836. this.refuseFile = []
  1837. this.refuseReason = ''
  1838. this.loadData()
  1839. this.visibleDetail = false
  1840. closeAllVideoFun()
  1841. })
  1842. }
  1843. } else {
  1844. this.add = false
  1845. this.visible = true
  1846. this.getProjectId(item.projectId)
  1847. getAction('/ctop/materialInfo/getDetail', {
  1848. materialId: item.id
  1849. }).then(res => {
  1850. if (this.activeKey == 'image') {
  1851. this.form.setFieldsValue({
  1852. projectId: item.projectId,
  1853. clipId: res.ascription.clipId,
  1854. planeId: res.ascription.planeId,
  1855. materialDescribe: item.materialDescribe
  1856. })
  1857. } else {
  1858. this.form.setFieldsValue({
  1859. projectId: item.projectId,
  1860. clipId: res.ascription.clipId,
  1861. planId: res.ascription.planId,
  1862. shotId: res.ascription.shotId,
  1863. materialDescribe: item.materialDescribe
  1864. })
  1865. }
  1866. this.tags = res.tag
  1867. this.urlList.url = item.url
  1868. this.urlList.md5 = item.code
  1869. this.urlList.name = item.materialName
  1870. this.watermarkUrl.url = item.watermarkUrl
  1871. this.watermarkUrl.md5 = item.watermarkCode
  1872. this.watermarkUrl.name = item.watermarkMaterialName
  1873. this.id = item.id
  1874. })
  1875. }
  1876. },
  1877. closePerson(){
  1878. this.personVisible = false
  1879. },
  1880. handleOkPerson(){
  1881. this.loadingPerson = true
  1882. this.formPerson.validateFieldsAndScroll((err, values) => {
  1883. if (err) {
  1884. // 这里做逻辑处理
  1885. } else {
  1886. var params = {
  1887. planId: values.planId,
  1888. shotId: values.shotId,
  1889. clipId: values.clipId,
  1890. materialId:this.code
  1891. }
  1892. fileEditAll(params).then(res=>{
  1893. console.log(res)
  1894. if(res.success){
  1895. this.$message.success('修改成功')
  1896. this.loadingPerson = false
  1897. this.closePerson()
  1898. this.loadData()
  1899. }else{
  1900. this.$message.error(res.message)
  1901. }
  1902. })
  1903. }
  1904. })
  1905. },
  1906. handleOkImage() {
  1907. if(this.urlListImage.url.length>0){
  1908. var params = {}
  1909. params.projectId = this.addImageData.projectId
  1910. params.videoId = this.addImageData.code
  1911. params.imageArr = this.imageArrList
  1912. this.loadingImage = true
  1913. postAction('/insertImage', params).then(res => {
  1914. console.log(res)
  1915. if (res.code == 0) {
  1916. this.urlListImage = {
  1917. url: [],
  1918. md5: [],
  1919. name: [],
  1920. size: []
  1921. }
  1922. this.imageArrList = []
  1923. this.addImageVisible = false
  1924. this.loadingImage = false
  1925. this.loadData()
  1926. }else{
  1927. this.loadingImage = false
  1928. }
  1929. })
  1930. }
  1931. },
  1932. handleOk() {
  1933. this.loading = true
  1934. this.form.validateFieldsAndScroll((err, values) => {
  1935. if (err) {
  1936. // 这里做逻辑处理
  1937. } else {
  1938. var params = {}
  1939. var roleCode = {}
  1940. for (const key in this.role) {
  1941. if (key == 'roleCode') {
  1942. this.role[key] = this.role[key] + 'Id'
  1943. roleCode[this.role[key]] = this.userInfo().id
  1944. }
  1945. }
  1946. params.id = this.add ? null : this.id
  1947. params.code = this.urlList.md5
  1948. params.url = this.urlList.url
  1949. params.materialName = this.urlList.name
  1950. params.watermarkCode = this.watermarkUrl.md5
  1951. params.watermarkUrl = this.watermarkUrl.url
  1952. params.watermarkMaterialName = this.watermarkUrl.name
  1953. params.userId = this.userInfo().id
  1954. params.projectId = values.projectId
  1955. params.materialDescribe = values.materialDescribe
  1956. params.type = 'VIDEO'
  1957. params.ascription =
  1958. this.activeKey == 'image'
  1959. ? roleCode
  1960. : {
  1961. planId: values.planId,
  1962. shotId: values.shotId,
  1963. clipId: values.clipId
  1964. }
  1965. params.tag = this.tags
  1966. params.imageArr = this.imageArrList
  1967. if (this.add) {
  1968. fileInsertV2(params).then(res => {
  1969. if (res.success) {
  1970. this.form.resetFields()
  1971. this.urlList = {
  1972. url: '',
  1973. md5: '',
  1974. name: ''
  1975. }
  1976. this.watermarkUrl = {
  1977. url: '',
  1978. md5: '',
  1979. name: ''
  1980. }
  1981. this.urlListImage = {
  1982. url: [],
  1983. md5: [],
  1984. name: [],
  1985. size: []
  1986. }
  1987. this.imageArrList = []
  1988. this.tags = []
  1989. this.loadData()
  1990. this.visible = false
  1991. this.add = true
  1992. this.loading = false
  1993. for (const key in this.role) {
  1994. if (key == 'roleCode') {
  1995. this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
  1996. }
  1997. }
  1998. this.$message.success('素材上传成功')
  1999. this.loading = false
  2000. } else {
  2001. this.$message.error(res.message)
  2002. this.loading = false
  2003. }
  2004. })
  2005. } else {
  2006. fileEdit({
  2007. ...params,
  2008. status: '0'
  2009. }).then(res => {
  2010. if(res.success){
  2011. this.form.resetFields()
  2012. this.urlList = {
  2013. url: '',
  2014. md5: '',
  2015. name: ''
  2016. }
  2017. this.watermarkUrl = {
  2018. url: '',
  2019. md5: '',
  2020. name: ''
  2021. }
  2022. this.tags = []
  2023. this.loadData()
  2024. this.visible = false
  2025. this.add = true
  2026. this.loading = false
  2027. for (const key in this.role) {
  2028. if (key == 'roleCode') {
  2029. this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
  2030. }
  2031. }
  2032. }else{
  2033. this.$message.error(res.message)
  2034. this.loading = false
  2035. }
  2036. })
  2037. }
  2038. }
  2039. })
  2040. },
  2041. close() {
  2042. this.visible = false
  2043. this.form.resetFields()
  2044. this.urlList = { url: '', md5: '', name: '' }
  2045. this.tags = []
  2046. this.urlListImage = {
  2047. url: [],
  2048. md5: [],
  2049. name: [],
  2050. size: []
  2051. }
  2052. this.imageArrList = []
  2053. },
  2054. addImage(item) {
  2055. this.addImageVisible = true
  2056. this.addImageData = item
  2057. },
  2058. showImage(item){
  2059. this.chouzhen = true
  2060. this.chouzhenList = []
  2061. var params = {
  2062. videoSignature:item.code,
  2063. pageSize:20,
  2064. pageNo:1
  2065. }
  2066. getAction('/cutFrame/material/list',params).then(res=>{
  2067. console.log(res)
  2068. if(res.success){
  2069. this.chouzhenList.push(...res.result.records)
  2070. }
  2071. })
  2072. },
  2073. closeImage() {
  2074. this.addImageVisible = false
  2075. this.urlListImage = {
  2076. url: [],
  2077. md5: [],
  2078. name: [],
  2079. size: []
  2080. }
  2081. this.imageArrList = []
  2082. },
  2083. onChange(date, dateString) {},
  2084. callbackTwo(key) {
  2085. this.checkAll = false
  2086. this.checkArr = []
  2087. if(key == '3'){
  2088. this.url.list = "/ctop/materialInfo/effiMaterialInfo"
  2089. this.queryParam = {
  2090. }
  2091. }else{
  2092. this.url.list = "/ctop/materialInfo/list"
  2093. this.queryParam = {
  2094. type: 'VIDEO',
  2095. userId: this.userInfo().id,
  2096. status: key ,
  2097. projectId:this.queryParam.projectId
  2098. }
  2099. if (this.form.getFieldValue('projectId')) {
  2100. this.form.setFieldsValue({
  2101. projectId: ''
  2102. })
  2103. }
  2104. }
  2105. // if (this.form.getFieldValue('projectId')) {
  2106. // this.form.setFieldsValue({
  2107. // projectId: ''
  2108. // })
  2109. // }
  2110. // this.queryParam.status = key
  2111. this.loadData(1)
  2112. },
  2113. overUpload(urlAll) {
  2114. this.confirmLoading = true
  2115. this.repeat = false
  2116. this.$message.success('上传成功')
  2117. },
  2118. deleteImage(url){
  2119. console.log(url, this.urlListImage.url)
  2120. var index = this.imageArrList.findIndex(v => v.url === url)
  2121. this.imageArrList.splice(index,1)
  2122. console.log(index)
  2123. },
  2124. overUploadImage(urlAll) {
  2125. // var index = this.urlList.url.findIndex(item => item === urlAll[0])
  2126. // var data = { url: urlAll[0], code: this.urlList.md5[index], name: this.urlList.name[index] }
  2127. // this.imageArr.push(data)
  2128. var that = this
  2129. that.material = []
  2130. that.imageArrList = []
  2131. var img
  2132. if(urlAll.length>0){
  2133. for (var i = 0; i < this.urlListImage.url.length; i++) {
  2134. that.imageArrList.push({
  2135. // width: img.width,
  2136. // height: img.height,
  2137. // size: this.urlListImage.size[i],
  2138. code: this.urlListImage.md5[i],
  2139. url: this.urlListImage.url[i],
  2140. materialName: this.urlListImage.name[i]
  2141. })
  2142. img = new Image()
  2143. img.src = this.urlListImage.url[i]
  2144. if (img.complete) {
  2145. // 打印
  2146. if (img.width == 720) {
  2147. if (img.height == 1280) {
  2148. that.material.push(true)
  2149. } else {
  2150. that.material.push(false)
  2151. }
  2152. } else if (img.width == 1080) {
  2153. if (img.height == 1920) {
  2154. that.material.push(true)
  2155. } else {
  2156. that.material.push(false)
  2157. }
  2158. } else if (img.width == 1280) {
  2159. if (img.height == 720) {
  2160. that.material.push(true)
  2161. } else {
  2162. that.material.push(false)
  2163. }
  2164. } else if (img.width == 1920) {
  2165. if (img.height == 1080) {
  2166. that.material.push(true)
  2167. } else {
  2168. that.material.push(false)
  2169. }
  2170. } else {
  2171. that.material.push(false)
  2172. }
  2173. } else {
  2174. img.onload = () => {
  2175. if (img.width == 720) {
  2176. if (img.height == 1280) {
  2177. that.material.push(true)
  2178. } else {
  2179. that.material.push(false)
  2180. }
  2181. } else if (img.width == 1080) {
  2182. if (img.height == 1920) {
  2183. that.material.push(true)
  2184. } else {
  2185. that.material.push(false)
  2186. }
  2187. } else if (img.width == 1280) {
  2188. if (img.height == 720) {
  2189. that.material.push(true)
  2190. } else {
  2191. that.material.push(false)
  2192. }
  2193. } else if (img.width == 1920) {
  2194. if (img.height == 1080) {
  2195. that.material.push(true)
  2196. } else {
  2197. that.material.push(false)
  2198. }
  2199. } else {
  2200. that.material.push(false)
  2201. }
  2202. }
  2203. }
  2204. }
  2205. }else{
  2206. }
  2207. },
  2208. file(file) {
  2209. var bmf = new BMF()
  2210. var that = this
  2211. return new Promise(function(resolve, reject) {
  2212. bmf.md5(file[0], (err, md5) => {
  2213. that.urlList.name = file[0].name
  2214. that.urlList.md5 = md5
  2215. fileCheck({
  2216. code: md5,
  2217. projectId: that.getData('projectId')
  2218. }).then(res => {
  2219. if (res.code == 0) {
  2220. that.$message.error('此素材已经上传')
  2221. that.repeat = true
  2222. reject()
  2223. } else {
  2224. that.repeat = false
  2225. resolve()
  2226. // reject()
  2227. }
  2228. })
  2229. })
  2230. })
  2231. },
  2232. fileWater(file) {
  2233. var bmf = new BMF()
  2234. var that = this
  2235. var codeData = that.urlList.md5!=''?that.urlList.md5:that.addImageData.code
  2236. console.log(codeData)
  2237. this.urlListImage= {
  2238. url: [],
  2239. md5: [],
  2240. name: [],
  2241. size: []
  2242. }
  2243. return new Promise(function(resolve, reject) {
  2244. for (let i = 0; i < file.length; i++) {
  2245. bmf.md5(file[i], (err, md5) => {
  2246. fileCheckImage({
  2247. code: md5,
  2248. projectId: that.getData('projectId'),
  2249. videoId:codeData
  2250. }).then(res => {
  2251. if (res.code == 0) {
  2252. that.$message.error('此素材已经上传')
  2253. reject()
  2254. } else {
  2255. that.urlListImage.name.push(file[i].name)
  2256. that.urlListImage.md5.push(md5)
  2257. that.urlListImage.size.push(file[i].size)
  2258. resolve()
  2259. // reject()
  2260. }
  2261. })
  2262. })
  2263. }
  2264. })
  2265. },
  2266. getParticipateList() {
  2267. getAction('/ctop/projectMember/participateList', {
  2268. userId: this.userInfo().id
  2269. }).then(res => {
  2270. if (res.code == 0) {
  2271. this.dataElse = res.result
  2272. }
  2273. })
  2274. },
  2275. getProjectId(items) {
  2276. this.form.resetFields(['clipId', 'planId', 'shotId'])
  2277. getAction('/ctop/projectMember/getMemberList', {
  2278. projectId: items
  2279. }).then(res => {
  2280. if (res.code == 0) {
  2281. this.ascription.clipId = res.result.filter(item => {
  2282. if (
  2283. item.roleCode == 'clip' ||
  2284. item.roleCode == 'plan' ||
  2285. item.roleCode == 'designTeamLeader' ||
  2286. item.roleCode == 'shot' ||
  2287. item.roleCode == 'plane'
  2288. ) {
  2289. return {
  2290. userId: item.userId,
  2291. userName: item.userName
  2292. }
  2293. }
  2294. })
  2295. this.ascription.shotId = res.result.filter(item => {
  2296. if (
  2297. item.roleCode == 'clip' ||
  2298. item.roleCode == 'shot' ||
  2299. item.roleCode == 'plan' ||
  2300. item.roleCode == 'designTeamLeader' ||
  2301. item.roleCode == 'plane'
  2302. ) {
  2303. return {
  2304. userId: item.userId,
  2305. userName: item.userName
  2306. }
  2307. }
  2308. })
  2309. this.ascription.planId = res.result.filter(item => {
  2310. if (
  2311. item.roleCode == 'shot' ||
  2312. item.roleCode == 'plan' ||
  2313. item.roleCode == 'designTeamLeader' ||
  2314. item.roleCode == 'clip' ||
  2315. item.roleCode == 'plane'
  2316. ) {
  2317. return {
  2318. userId: item.userId,
  2319. userName: item.userName
  2320. }
  2321. }
  2322. })
  2323. this.ascription.planeId = res.result.filter(item => {
  2324. if (item.roleCode == 'plane') {
  2325. return {
  2326. userId: item.userId,
  2327. userName: item.userName
  2328. }
  2329. }
  2330. })
  2331. }
  2332. })
  2333. },
  2334. getDataSource(page, pageSize) {
  2335. this.ipagination.current = page
  2336. this.checkArr = []
  2337. this.checkAll = false
  2338. this.loadData()
  2339. }
  2340. }
  2341. }
  2342. </script>
  2343. <style scoped>
  2344. @import '~@assets/less/common.less';
  2345. </style>