videoMaterial.vue 104 KB

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