creative-copywrit.vue 128 KB

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