videoMaterial.vue 100 KB

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