videoMaterial.vue 103 KB

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