videoMaterial.vue 69 KB

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