videoMaterial.vue 82 KB

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