videoMaterial.vue 80 KB

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