videoMaterial.vue 85 KB

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