creative-copywrit.vue 165 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889
  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: 45%;
  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.productId" ref="selectTable"></selectTable>
  286. </a-col>
  287. <a-col :md="8" :sm="8">
  288. <selectTableProject :projectId.sync="queryParam.projectId" :productId="queryParam.productId" ref="selectTableProject"></selectTableProject>
  289. </a-col>
  290. <a-col :md="8" :sm="8">
  291. <a-form-item label="素材名称">
  292. <a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
  293. </a-form-item>
  294. </a-col>
  295. <a-col :md="8" :sm="8">
  296. <a-form-item label="搜索时间">
  297. <a-range-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width: 100%" />
  298. </a-form-item>
  299. </a-col>
  300. <a-col :md="8" :sm="8">
  301. <a-form-item label="唯一标识">
  302. <a-input placeholder="请输入素材唯一标识" v-model="queryParam.code"></a-input>
  303. </a-form-item>
  304. </a-col>
  305. <a-col :md="8" :sm="8">
  306. <a-form-item label="视频标签">
  307. <el-cascader
  308. placeholder="请选择视频的标签"
  309. v-model="labelValue"
  310. :options="options"
  311. :props="{ checkStrictly: true, value: 'tagCode', label: 'tagName', expandTrigger: 'hover' }"
  312. clearable
  313. style="width: 100%; height: 32px"
  314. filterable
  315. >
  316. </el-cascader>
  317. </a-form-item>
  318. </a-col>
  319. <a-col :md="8" :sm="8">
  320. <a-form-item label="剪辑">
  321. <a-select
  322. v-model="queryParam.clipId"
  323. :filter-option="filterOption"
  324. allowClear
  325. show-search
  326. >
  327. <a-select-option
  328. v-for="item in designList"
  329. :key="item.userId"
  330. :value="item.userId"
  331. >
  332. {{ item.companyName + '_' + item.userName }}
  333. </a-select-option>
  334. </a-select>
  335. </a-form-item>
  336. </a-col>
  337. <a-col :md="8" :sm="8">
  338. <a-form-item label="拍摄">
  339. <a-select
  340. v-model="queryParam.shotId"
  341. :filter-option="filterOption"
  342. allowClear
  343. show-search
  344. >
  345. <a-select-option
  346. v-for="item in designList"
  347. :key="item.userId"
  348. :value="item.userId"
  349. >
  350. {{ item.companyName + '_' + item.userName }}
  351. </a-select-option>
  352. </a-select>
  353. </a-form-item>
  354. </a-col>
  355. <a-col :md="8" :sm="8">
  356. <a-form-item label="编导">
  357. <a-select
  358. v-model="queryParam.planId"
  359. :filter-option="filterOption"
  360. allowClear
  361. show-search
  362. >
  363. <a-select-option
  364. v-for="item in designList"
  365. :key="item.userId"
  366. :value="item.userId"
  367. >
  368. {{ item.companyName + '_' + item.userName }}
  369. </a-select-option>
  370. </a-select>
  371. </a-form-item>
  372. </a-col>
  373. <a-col :md="8" :sm="8">
  374. <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  375. <a-button type="primary" @click="handleSubmit" icon="search">查询</a-button>
  376. <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
  377. </span>
  378. </a-col>
  379. </a-row>
  380. </a-form>
  381. </div>
  382. <div class="table-operator" style="position: relative; z-index: 100">
  383. <a-button
  384. @click="
  385. visible = true
  386. confirmLoading = false
  387. add = true
  388. "
  389. type="primary"
  390. icon="plus"
  391. >
  392. 新增
  393. </a-button>
  394. <a-button
  395. @click="onCheckAllChange"
  396. v-if="
  397. queryParam.productId &&
  398. active == '1' &&
  399. (role.roleCode == 'operator' ||
  400. role.roleCode == 'kuaishouOperationManager' ||
  401. role.roleCode == 'admin' ||
  402. role.roleCode == 'operationAssistant' ||
  403. role.roleCode == 'touTiaoOperationManager')
  404. "
  405. >
  406. {{ checkAll ? '取消 ( ' + checkArr.length + ' )' : '全选' }}
  407. </a-button>
  408. <a-button
  409. v-if="
  410. queryParam.productId &&
  411. active == '1' &&
  412. (role.roleCode == 'operator' ||
  413. role.roleCode == 'kuaishouOperationManager' ||
  414. role.roleCode == 'admin' ||
  415. role.roleCode == 'operationAssistant' ||
  416. role.roleCode == 'touTiaoOperationManager')
  417. "
  418. :disabled="checkArr.length == 0"
  419. @click="tongbu('1')"
  420. >
  421. 一键同步头条
  422. </a-button>
  423. <a-button
  424. v-if="
  425. queryParam.productId &&
  426. active == '1' &&
  427. (role.roleCode == 'operator' ||
  428. role.roleCode == 'kuaishouOperationManager' ||
  429. role.roleCode == 'admin' ||
  430. role.roleCode == 'operationAssistant' ||
  431. role.roleCode == 'touTiaoOperationManager')
  432. "
  433. :disabled="checkArr.length == 0"
  434. @click="tongbu('3')"
  435. >
  436. 一键同步头条内广
  437. </a-button>
  438. <!-- && -->
  439. <a-button v-if="checkArr.length && active !== '0'" type="primary" @click="handleFodderWind">素材下线</a-button>
  440. <a-button v-if="checkArr.length && active === '0'" type="primary" @click="handleApprovedClick">通过审核</a-button>
  441. </div>
  442. <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
  443. <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
  444. <a-spin :spinning="spinning">
  445. <div v-if="dataSource.length > 0">
  446. <a-checkbox-group @change="onChangeCheck($event, item)" v-model="checkArr" class="home-card">
  447. <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
  448. <span v-if="items.excellent == 0"></span>
  449. <span
  450. v-else
  451. 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"
  452. >
  453. 优秀素材
  454. </span>
  455. <div class="home-right">
  456. <a-badge
  457. :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
  458. :numberStyle="{ backgroundColor: '#52c41a' }"
  459. style="width: 100%; display: flex"
  460. @click.stop
  461. >
  462. <span
  463. style="
  464. color: #999;
  465. fontsize: 14px;
  466. padding-bottom: 10px;
  467. display: inline-block;
  468. width: 100%;
  469. white-space: nowrap;
  470. overflow: hidden;
  471. text-overflow: ellipsis;
  472. "
  473. :title="items.projectName"
  474. >
  475. {{ items.projectName }}
  476. </span>
  477. <span
  478. style="
  479. color: #999;
  480. fontsize: 14px;
  481. padding-bottom: 10px;
  482. display: inline-block;
  483. width: 100%;
  484. white-space: nowrap;
  485. overflow: hidden;
  486. text-overflow: ellipsis;
  487. "
  488. :title="items.materialName"
  489. >
  490. {{ items.materialName }}
  491. </span>
  492. <a-icon
  493. type="close-circle"
  494. @click="deleteData(items.id)"
  495. v-show="active == '0'"
  496. v-if="items.userId == userInfo().id"
  497. />
  498. </a-badge>
  499. <div style="display: flex; justify-content: center; width: 100%; height: 200px; position: relative">
  500. <div style="width: 100px; position: absolute; left: 0; z-index: 1000">
  501. <a-tooltip placement="top">
  502. <template slot="title">
  503. <span>{{ items.kuaishouEffiType == 1 ? '快手有效视频' : '已经同步到快手平台' }}</span>
  504. </template>
  505. <img
  506. style="width: 30px; height: 30px"
  507. v-if="items.kuaishouVideoIsUp == 1"
  508. :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
  509. src="@/views/modules/material/kuaishou.jpg"
  510. />
  511. </a-tooltip>
  512. <a-tooltip placement="top">
  513. <template slot="title">
  514. <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
  515. </template>
  516. <img
  517. v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
  518. style="width: 30px; height: 30px; margin-left: 5px"
  519. src="@/views/modules/material/douyin.jpg"
  520. alt
  521. />
  522. <img
  523. v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
  524. style="width: 30px; height: 30px; margin-left: 5px"
  525. src="@/views/modules/material/douyinhui.jpg"
  526. alt
  527. />
  528. </a-tooltip>
  529. </div>
  530. <a-icon
  531. type="fire"
  532. style="font-size: 20px; position: absolute; right: 0; bottom: 10px; z-index: 1000; color: red"
  533. v-if="items.whetherUnaudited"
  534. />
  535. <a-popover
  536. title="视频标签"
  537. @visibleChange="changeTag(items.code)"
  538. :overlayStyle="{ width: '400px' }"
  539. >
  540. <template slot="content" v-if="videoTag.length > 0">
  541. <a-tag v-for="(item, index) of videoTag" :key="index" style="margin: 5px">{{ item }}</a-tag>
  542. </template>
  543. <template slot="content" v-else>
  544. <div style="width: 100%; text-align: center">加载中。。。</div>
  545. </template>
  546. <img
  547. :src="items.coverUrl"
  548. alt
  549. style="height: 200px; max-width: 100%; position: absolute; z-index: 10"
  550. />
  551. </a-popover>
  552. </div>
  553. <div style="width: 100%; height: 1px; border-bottom: 1px solid #f2f2f2; margin-top: 5px"></div>
  554. <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
  555. <div
  556. v-if="active == '1'"
  557. class="bhShow"
  558. style="display: flex; justify-content: space-between"
  559. @click.stop="showData(items)"
  560. >
  561. <div class="show-data">
  562. <span>抖音</span>
  563. <span>消耗:{{ items.bytedanceCost || 0 }}</span>
  564. <span>广告语:{{ items.slogansCount || 0 }}</span>
  565. <span style="display: inline-block;text-align: left;width: 400px;">审核通过时间:{{ items.confirmTime || '-' }}</span>
  566. </div>
  567. <div class="show-data">
  568. <span>快手</span>
  569. <span>消耗:{{ items.cost || 0 }}</span>
  570. <span v-if="items.offlineFlag === 1" style="color: #f00;">状态:已下线</span>
  571. </div>
  572. </div>
  573. <div
  574. style="width: 100%; height: 1px; border-bottom: 1px solid #f2f2f2; margin-top: 5px"
  575. v-if="active != '0'"
  576. ></div>
  577. <span
  578. style="color: black; fontsize: 16px; padding-top: 10px; display: block; width: 100%"
  579. @click.stop
  580. >
  581. <a-popconfirm
  582. @confirm="okEditShow(items, '2')"
  583. v-show="active != '2' && active != '3'"
  584. v-if="
  585. role.roleCode == 'operator' ||
  586. role.roleCode == 'kuaishouOperationManager' ||
  587. role.roleCode == 'admin' ||
  588. role.roleCode == 'operationAssistant' ||
  589. role.roleCode == 'touTiaoOperationManager'
  590. "
  591. >
  592. <div slot="title">
  593. <div>
  594. 驳回原因:
  595. <a-textarea
  596. placeholder="请输入原因"
  597. v-model="refuseReason"
  598. :autosize="{ minRows: 3, maxRows: 10 }"
  599. />
  600. </div>
  601. <div>
  602. 截图:
  603. <uploadFile v-if="refuseFile" :value.sync="refuseFile" :fileCount="15" uploadType="image" />
  604. </div>
  605. </div>
  606. <a href="javascript:;" style="margin-right: 20px">驳回</a>
  607. </a-popconfirm>
  608. <a
  609. href="javascript:;"
  610. style="margin-right: 20px"
  611. v-show="active != '1'"
  612. v-if="
  613. role.roleCode == 'operator' ||
  614. role.roleCode == 'kuaishouOperationManager' ||
  615. role.roleCode == 'admin' ||
  616. role.roleCode == 'operationAssistant' ||
  617. role.roleCode == 'touTiaoOperationManager'
  618. "
  619. @click="handleExamin(items)"
  620. >
  621. 通过审核
  622. </a>
  623. <a-dropdown style="margin-right: 20px">
  624. <a class="ant-dropdown-link" @click="(e) => e.preventDefault()">
  625. 更多操作
  626. <a-icon type="down" />
  627. </a>
  628. <a-menu slot="overlay">
  629. <a-menu-item key="0" v-show="active == '2'" v-if="items.userId == userInfo().id">
  630. <a href="javascript:;" style="margin-right: 20px" @click="edit(items, '2')">修改</a>
  631. </a-menu-item>
  632. <a-menu-item
  633. key="1"
  634. v-show="active != '3'"
  635. v-if="items.userId == userInfo().id || role.roleCode == 'designTeamLeader'"
  636. >
  637. <a href="javascript:;" style="margin-right: 20px" @click="personEdit(items, '2')">人员修改</a>
  638. </a-menu-item>
  639. <a-menu-item key="3" v-show="active != '3'">
  640. <a style="margin-right: 20px" @click="addImage(items)">添加封面</a>
  641. </a-menu-item>
  642. <a-menu-item key="4">
  643. <a style="margin-right: 20px" @click="showImage(items)">推荐封面</a>
  644. </a-menu-item>
  645. <a-menu-item key="5">
  646. <a href="javascript:;" style="margin-right: 20px" @click="editTagList(items)">修改标签</a>
  647. </a-menu-item>
  648. </a-menu>
  649. </a-dropdown>
  650. <a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
  651. <br />
  652. {{ items.createTime }}
  653. </span>
  654. </div>
  655. </div>
  656. </a-checkbox-group>
  657. <a-pagination
  658. size="small"
  659. :showTotal="ipagination.showTotal"
  660. style="float: right"
  661. v-if="dataSource.length > 0"
  662. showQuickJumper
  663. :pageSize.sync="ipagination.pageSize"
  664. :total="ipagination.total"
  665. v-model="ipagination.current"
  666. @change="getDataSource"
  667. />
  668. </div>
  669. <div v-else style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center">
  670. <img
  671. 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"
  672. alt
  673. v-if="!loading"
  674. />
  675. <div v-else></div>
  676. </div>
  677. </a-spin>
  678. </a-tab-pane>
  679. </a-tabs>
  680. <a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
  681. <template slot="footer">
  682. <a-button key="back" @click="closeImage">取消</a-button>
  683. <a-button key="submit" type="primary" @click="handleOkImage" :loading="loadingImage">确定</a-button>
  684. </template>
  685. <a-form-item label class="add-image-material">
  686. <uploadFile
  687. v-if="addImageVisible"
  688. :value.sync="urlListImage.url"
  689. :checkFile="fileWater"
  690. @overUpload="overUploadImage"
  691. @removeUpload="deleteImage"
  692. :fileCount="15"
  693. uploadType="image"
  694. />
  695. <span
  696. v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
  697. style="color: red"
  698. >
  699. 上传素材的尺寸不符,请修改(
  700. <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
  701. </span>
  702. <span
  703. v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
  704. style="color: green"
  705. >上传成功</span
  706. >
  707. </a-form-item>
  708. </a-modal>
  709. <a-modal title="数据详情" v-model="showDataBool" :footer="null">
  710. <div class="bhShow" style="display: flex; justify-content: space-between; height: 400px">
  711. <div v-if="douyinData" class="show-data">
  712. <span style="color: black; font-size: 18px; text-align: center; width: 100%">抖音</span>
  713. <span>消耗:{{ douyinData.cost }}</span>
  714. <span>封面点击:{{ douyinData.click }}</span>
  715. <span>封面展示:{{ douyinData.showNum }}</span>
  716. <span>激活:{{ douyinData.active }}</span>
  717. <span>转化量:{{ douyinData.convertNum }}</span>
  718. <span>表单提交:{{ douyinData.form }}</span>
  719. <span>下载注册:{{ douyinData.register }}</span>
  720. <span>视频总播放:{{ douyinData.totalPlay }}</span>
  721. <span>视频有效播放:{{ douyinData.validPlay }}</span>
  722. </div>
  723. <div v-if="kuaishouData" class="show-data">
  724. <span style="color: black; font-size: 18px; text-align: center; width: 100%">快手</span>
  725. <span>消耗:{{ kuaishouData.charge }}</span>
  726. <span>封面点击:{{ kuaishouData.photoClick }}</span>
  727. <span>封面展示:{{ kuaishouData.photoShow }}</span>
  728. <span>素材曝光数:{{ kuaishouData.aclick }}</span>
  729. <span>激活数:{{ kuaishouData.activation }}</span>
  730. <span>行为数:{{ kuaishouData.bclick }}</span>
  731. <span>表单提交数:{{ kuaishouData.formCount }}</span>
  732. </div>
  733. </div>
  734. </a-modal>
  735. <a-modal
  736. :title="add ? '添加素材' : '修改素材'"
  737. v-model="visible"
  738. @cancel="close"
  739. @afterClose="close"
  740. :maskClosable="false"
  741. :width="800"
  742. >
  743. <template slot="footer">
  744. <a-button key="back" @click="close">取消</a-button>
  745. <a-button type="primary" :disabled="!confirmLoading" @click="handleOk" :loading="loadingElse">确定</a-button>
  746. </template>
  747. <a-form :form="form">
  748. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
  749. <a-select
  750. v-decorator="[
  751. 'projectId', // 给表单赋值或拉取表单时,该input对应的key
  752. { rules: [{ required: true, message: '请选择项目!' }] },
  753. ]"
  754. @change="getProjectId"
  755. @focus="getParticipateList"
  756. showSearch
  757. optionFilterProp="children"
  758. :filterOption="filterOption"
  759. @search="getParticipateList"
  760. :disabled="!add"
  761. >
  762. <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
  763. {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
  764. item.mediaId == '1'
  765. ? '头条'
  766. : item.mediaId == '2'
  767. ? '快手'
  768. : item.mediaId == '3'
  769. ? '头条内广'
  770. : '快手内广'
  771. }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
  772. </a-select-option>
  773. </a-select>
  774. </a-form-item>
  775. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频素材上传" v-if="getData('projectId')">
  776. <uploadFile
  777. :checkFile="file"
  778. :value.sync="urlList.url"
  779. @overUpload="overUpload"
  780. @removeUpload="removeUpload"
  781. :fileCount="1"
  782. uploadType="video"
  783. :multiple="false"
  784. />
  785. <span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
  786. <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
  787. </a-form-item>
  788. <a-form-item
  789. :label-col="labelCol"
  790. :wrapper-col="wrapperCol"
  791. label="封面上传"
  792. class="add-image-material"
  793. v-if="getData('projectId') && add && urlList.url != ''"
  794. >
  795. <uploadFile
  796. :value.sync="urlListImage.url"
  797. :checkFile="fileWater"
  798. @overUpload="overUploadImage"
  799. @removeUpload="deleteImage"
  800. :fileCount="15"
  801. uploadType="image"
  802. />
  803. <span
  804. v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
  805. style="color: red"
  806. >
  807. 上传素材的尺寸不符,请修改(
  808. <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
  809. </span>
  810. <span
  811. v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
  812. style="color: green"
  813. >
  814. 上传成功
  815. </span>
  816. </a-form-item>
  817. <div v-if="add">
  818. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  819. <a-select
  820. v-decorator="[
  821. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  822. { rules: [{ required: true, message: '请选择策划!' }] },
  823. ]"
  824. showSearch
  825. optionFilterProp="children"
  826. :filterOption="filterOption"
  827. >
  828. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">{{
  829. item.userName
  830. }}</a-select-option>
  831. </a-select>
  832. </a-form-item>
  833. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄" v-if="activeKey == 'video'">
  834. <a-select
  835. v-decorator="[
  836. 'shotId', // 给表单赋值或拉取表单时,该input对应的key
  837. ]"
  838. showSearch
  839. optionFilterProp="children"
  840. :filterOption="filterOption"
  841. >
  842. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">{{
  843. item.userName
  844. }}</a-select-option>
  845. </a-select>
  846. </a-form-item>
  847. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  848. <a-select
  849. v-decorator="[
  850. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  851. { rules: [{ required: true, message: '请选择剪辑!' }] },
  852. ]"
  853. showSearch
  854. optionFilterProp="children"
  855. :filterOption="filterOption"
  856. >
  857. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">{{
  858. item.userName
  859. }}</a-select-option>
  860. </a-select>
  861. </a-form-item>
  862. </div>
  863. <a-form-item
  864. v-if="add && visible"
  865. :label-col="labelCol"
  866. :wrapper-col="{
  867. xs: { span: 24 },
  868. sm: { span: 12 },
  869. }"
  870. label="形式标签"
  871. >
  872. <el-cascader
  873. placeholder="搜索你想要的形式标签"
  874. :options="departTreeModality"
  875. v-decorator="[
  876. 'modalityTagList', // 给表单赋值或拉取表单时,该input对应的key
  877. { rules: [{ required: true, message: '请选择形式标签!' }] },
  878. ]"
  879. :props="{
  880. multiple: true,
  881. value: 'id',
  882. label: 'tagName',
  883. emitPath: false,
  884. checkStrictly: true,
  885. expandTrigger: 'hover',
  886. }"
  887. filterable
  888. style="width: 100%"
  889. >
  890. </el-cascader>
  891. </a-form-item>
  892. <a-form-item
  893. v-if="add && visible"
  894. :label-col="labelCol"
  895. :wrapper-col="{
  896. xs: { span: 24 },
  897. sm: { span: 12 },
  898. }"
  899. label="场景标签"
  900. >
  901. <el-cascader
  902. placeholder="搜索你想要的场景标签"
  903. :options="departTreeSence"
  904. v-decorator="[
  905. 'senceTagList', // 给表单赋值或拉取表单时,该input对应的key
  906. { rules: [{ required: true, message: '请选择场景标签!' }] },
  907. ]"
  908. :props="{
  909. multiple: true,
  910. value: 'id',
  911. label: 'tagName',
  912. emitPath: false,
  913. checkStrictly: true,
  914. expandTrigger: 'hover',
  915. }"
  916. filterable
  917. style="width: 100%"
  918. >
  919. </el-cascader>
  920. </a-form-item>
  921. <a-form-item
  922. :label-col="labelCol"
  923. :wrapper-col="{
  924. xs: { span: 24 },
  925. sm: { span: 12 },
  926. }"
  927. label="基调标签"
  928. v-if="add && visible"
  929. >
  930. <el-cascader
  931. placeholder="搜索你想要的基调标签"
  932. :options="departTreeMod"
  933. v-decorator="[
  934. 'modTagList', // 给表单赋值或拉取表单时,该input对应的key
  935. { rules: [{ required: true, message: '请选择基调标签!' }] },
  936. ]"
  937. :props="{
  938. multiple: true,
  939. value: 'id',
  940. label: 'tagName',
  941. emitPath: false,
  942. checkStrictly: true,
  943. expandTrigger: 'hover',
  944. }"
  945. filterable
  946. style="width: 100%"
  947. >
  948. </el-cascader>
  949. </a-form-item>
  950. <a-form-item
  951. v-if="add"
  952. :label-col="labelCol"
  953. :wrapper-col="{
  954. xs: { span: 24 },
  955. sm: { span: 18 },
  956. }"
  957. label="其他"
  958. >
  959. <template v-for="(tag, index) in tags">
  960. <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
  961. <a-tag :key="tag" :closable="index !== 0" :afterClose="() => handleClose(tag)">
  962. {{ `${tag.slice(0, 20)}...`}}
  963. </a-tag>
  964. </a-tooltip>
  965. <a-tag v-else :key="tag" :closable="true" :afterClose="() => handleClose(tag)">{{ tag }}</a-tag>
  966. </template>
  967. <a-input
  968. v-if="inputVisible"
  969. ref="input"
  970. type="text"
  971. size="small"
  972. :style="{ width: '78px' }"
  973. :value="inputValue"
  974. @change="handleInputChange"
  975. @blur="handleInputConfirm"
  976. @keyup.enter="handleInputConfirm"
  977. />
  978. <a-tag v-else @click="showInput" style="background: #fff; borderstyle: dashed">
  979. <a-icon type="plus" />New Tag</a-tag>
  980. </a-form-item>
  981. <a-form-item
  982. v-if="add"
  983. :label-col="labelCol"
  984. :wrapper-col="{
  985. xs: { span: 24 },
  986. sm: { span: 12 },
  987. }"
  988. label="描述"
  989. >
  990. <a-textarea
  991. placeholder="请输入描述"
  992. v-decorator="[
  993. 'materialDescribe', // 给表单赋值或拉取表单时,该input对应的key
  994. ]"
  995. :auto-size="{ minRows: 3, maxRows: 10 }"
  996. />
  997. </a-form-item>
  998. </a-form>
  999. </a-modal>
  1000. <a-modal style="overflow-y: auto;" title="素材详情" v-model="visibleDetail" @cancel="handleBudgetCancel" width="70%" :footer="null">
  1001. <div style="width: 100%; height: 35px">
  1002. <a-button type="primary" @click="setSuccess" style="float: right">
  1003. {{ excellent == 0 ? '标记为优秀素材' : '取消标记' }}
  1004. </a-button>
  1005. </div>
  1006. <div style="display: flex; height: 700px">
  1007. <div
  1008. class="video-content"
  1009. style="
  1010. width: 50%;
  1011. padding: 10px;
  1012. box-sizing: border-box;
  1013. display: flex;
  1014. justify-content: center;
  1015. border-right: 1px solid #f2f2f2;
  1016. "
  1017. >
  1018. <video class="video" :src="showUrl" controls="controls" style="height: 50%" controlslist="nodownload">
  1019. 您的浏览器不支持 video 标签。
  1020. </video>
  1021. <div class="downLoad" style="height: 50%; overflow: auto">
  1022. <a-button @click="onCheckAllImageChange" v-if="model.length > 0">
  1023. {{ checkAllImage ? '取消 ( ' + checkArrImage.length + ' )' : '全选' }}
  1024. </a-button>
  1025. <ul
  1026. class="actor-photo-list"
  1027. :style="{ width: model.length > 4 ? 25 * model.length + '%' : '100%' }"
  1028. v-if="model.length > 0"
  1029. >
  1030. <a-checkbox-group
  1031. v-model="checkArrImage"
  1032. style="width: 100%; display: flex; padding-left: 0"
  1033. @change="onChangeCheckImage"
  1034. >
  1035. <li v-for="(item, index) of model" :key="index">
  1036. <a-checkbox :value="item.id" style="position: absolute; z-index: 100"></a-checkbox>
  1037. <img class="video" :src="item.url" @click="coverPreviewShowModal(item, index)" />
  1038. <span
  1039. class="tag-video"
  1040. :style="{
  1041. backgroundColor:
  1042. item.status == 0 ? 'rgba(0, 0, 0)' : item.status == 1 ? 'rgba(0, 180, 100)' : 'red',
  1043. }"
  1044. >{{ item.status == 0 ? '未审核' : item.status == 1 ? '已批准' : '已驳回' }}</span
  1045. >
  1046. </li>
  1047. </a-checkbox-group>
  1048. </ul>
  1049. <div v-else style="height: 100%; display: flex; justify-content: center; align-items: center">
  1050. <img
  1051. 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"
  1052. alt
  1053. />
  1054. </div>
  1055. </div>
  1056. </div>
  1057. <a-modal title="图片预览" v-model="coverPreviewVisible" :footer="null">
  1058. <a-carousel arrows class="cover_carousel_con">
  1059. <div v-for="(item, index) in modelNew" :key="index" class="content">
  1060. <img :src="item.url" :width="300" />
  1061. <div style="margin-top: 10px">
  1062. <a-button type="primary" @click="editImage(item, '1')">通过审核</a-button>
  1063. <a-divider type="vertical" />
  1064. <a-popconfirm @confirm="editImage(item, '2')">
  1065. <div slot="title">
  1066. <div>
  1067. 驳回原因:
  1068. <a-textarea
  1069. placeholder="请输入原因"
  1070. v-model="refuseReasonImage"
  1071. :autosize="{ minRows: 3, maxRows: 10 }"
  1072. />
  1073. </div>
  1074. </div>
  1075. <a-button type="primary">驳回</a-button>
  1076. </a-popconfirm>
  1077. </div>
  1078. </div>
  1079. <a-icon
  1080. type="left-circle"
  1081. slot="prevArrow"
  1082. slot-scope
  1083. style="left: 10px; zindex: 9; font-size: 30px; color: black"
  1084. />
  1085. <a-icon
  1086. type="right-circle"
  1087. slot="nextArrow"
  1088. slot-scope
  1089. style="right: 10px; zindex: 9; font-size: 30px; color: black"
  1090. />
  1091. </a-carousel>
  1092. </a-modal>
  1093. <div style="flex: 3; padding: 10px; box-sizing: border-box; overflow-y: auto;">
  1094. <a-form v-if="detail" class="detail ant-advanced-search-form" layout="inline">
  1095. <div v-if="detail.parameter" style="display: flex">
  1096. <a-form-item label="视频时长" v-if="detail.parameter.second" style="flex: 1">
  1097. {{ detail.parameter.second }}秒
  1098. </a-form-item>
  1099. <a-form-item label="尺寸" style="flex: 1" v-if="detail.parameter.width">
  1100. {{ detail.parameter.width }}*{{ detail.parameter.height }}
  1101. </a-form-item>
  1102. <a-form-item label="大小" style="flex: 1" v-if="detail.parameter.size">
  1103. {{ detail.parameter.size}}
  1104. </a-form-item>
  1105. </div>
  1106. <div v-if="detail.ascription" style="display: flex">
  1107. <a-form-item label="策划" style="flex: 1">{{ detail.ascription.planName }}</a-form-item>
  1108. <a-form-item label="拍摄" style="flex: 1">{{ detail.ascription.shotName }}</a-form-item>
  1109. <a-form-item label="剪辑" v-if="detail.ascription.clipName" style="flex: 1">
  1110. {{ detail.ascription.clipName}}
  1111. </a-form-item>
  1112. </div>
  1113. <div>
  1114. <a-form-item label="标签" v-if="tagInfoList.length > 0">
  1115. <a-tag v-for="(item, index) of tagInfoList" :key="index">{{ item.tagName }}</a-tag>
  1116. </a-form-item>
  1117. </div>
  1118. <div>
  1119. <a-form-item label="其他" v-if="detail.tag">
  1120. <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
  1121. </a-form-item>
  1122. </div>
  1123. <div>
  1124. <a-form-item label="无水印素材下载" v-if="name">
  1125. <a-button type="primary" @click="downloadByBlobShowUrl">下载</a-button>
  1126. </a-form-item>
  1127. </div>
  1128. <div>
  1129. <a-form-item label="水印素材下载" v-if="name">
  1130. <a-button type="primary" @click="downloadByBlob" v-if="showUrlWater">下载</a-button>
  1131. <span v-else>水印素材生成中,请一分钟后刷新</span>
  1132. </a-form-item>
  1133. </div>
  1134. <div>
  1135. <a-form-item label="水印素材链接" v-if="showUrlWater">
  1136. <a-input v-model="showUrlWater" type="text" read-only />
  1137. </a-form-item>
  1138. </div>
  1139. <div style="width: 100%" class="downLoad">
  1140. <a-form-item label="生成水印素材" style="width: 100%">
  1141. <a-select :defaultValue="4" v-model="size" style="width: 80%">
  1142. <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">
  1143. {{ item.name }}
  1144. </a-select-option>
  1145. </a-select>
  1146. <a-button type="primary" @click="getWater" :loading="waterLoading">生成</a-button>
  1147. </a-form-item>
  1148. </div>
  1149. <div>
  1150. <a-form-item label="审核人" v-if="active == '2' && detail.auditorName">
  1151. {{ detail.auditorName }}
  1152. </a-form-item>
  1153. </div>
  1154. <div>
  1155. <a-form-item label="驳回原因" v-if="active == '2'">
  1156. {{ refuseReason ? refuseReason : '无原因' }}</a-form-item>
  1157. </div>
  1158. <div>
  1159. <a-form-item label="截图" v-if="active == '2'">
  1160. <div v-if="refuseFile" style="width: 100%">
  1161. <img
  1162. style="width: 100px; height: auto; margin: 5px"
  1163. @click="showBoHui(item)"
  1164. :src="item"
  1165. v-for="(item, index) in refuseFile"
  1166. :key="index"
  1167. alt
  1168. />
  1169. </div>
  1170. <div v-else>无截图</div>
  1171. </a-form-item>
  1172. </div>
  1173. <div>
  1174. <a-form-item
  1175. label="视频审核"
  1176. v-if="
  1177. active != '2' &&
  1178. (role.roleCode == 'operator' ||
  1179. role.roleCode == 'kuaishouOperationManager' ||
  1180. role.roleCode == 'admin' ||
  1181. role.roleCode == 'operationAssistant' ||
  1182. role.roleCode == 'touTiaoOperationManager')
  1183. "
  1184. >
  1185. <a-popconfirm
  1186. @confirm="edit(null, '0', '1')"
  1187. v-show="active != '1'"
  1188. v-if="
  1189. role.roleCode == 'operator' ||
  1190. role.roleCode == 'kuaishouOperationManager' ||
  1191. role.roleCode == 'admin' ||
  1192. role.roleCode == 'operationAssistant' ||
  1193. role.roleCode == 'touTiaoOperationManager'
  1194. "
  1195. >
  1196. <div slot="title">
  1197. <div>
  1198. 广告语:
  1199. <a-textarea placeholder="请输入" v-model="refuseReason" :autosize="{ minRows: 3, maxRows: 10 }" />
  1200. </div>
  1201. </div>
  1202. <a-button type="primary" v-if="active == '0'" style="margin-right: 10px">通过审核</a-button>
  1203. </a-popconfirm>
  1204. <a-popconfirm @confirm="okEdit" v-show="active != '2'">
  1205. <div slot="title">
  1206. <div>
  1207. 驳回原因:
  1208. <a-textarea
  1209. placeholder="请输入原因"
  1210. v-model="refuseReason"
  1211. :autosize="{ minRows: 3, maxRows: 10 }"
  1212. />
  1213. </div>
  1214. <div>
  1215. 截图:
  1216. <uploadFile v-if="refuseFile" :value.sync="refuseFile" :fileCount="15" uploadType="image" />
  1217. </div>
  1218. </div>
  1219. <a-button type="primary" v-show="active != '2'">驳回</a-button>
  1220. </a-popconfirm>
  1221. </a-form-item>
  1222. </div>
  1223. <div>
  1224. <a-form-item label="封面审核" style="width: 120%">
  1225. <a-button type="primary" :disabled="checkArrImage.length == 0" @click="editImageAll('1')"
  1226. >通过审核</a-button>
  1227. <a-popconfirm @confirm="editImageAll('2')" v-show="active != '2'">
  1228. <div slot="title">
  1229. <div>
  1230. 驳回原因:
  1231. <a-textarea
  1232. placeholder="请输入原因"
  1233. v-model="refuseReasonImage"
  1234. :autosize="{minRows: 3, maxRows: 10}"
  1235. />
  1236. </div>
  1237. </div>
  1238. <a-button type="primary" :disabled="checkArrImage.length != 1" style="margin-left: 10px">驳回</a-button>
  1239. </a-popconfirm>
  1240. </a-form-item>
  1241. </div>
  1242. </a-form>
  1243. <div class="solgan-whole-content">
  1244. <span class="solgan-title-header" style="display: inline-block;width: 60px;">广告语:</span>
  1245. <a-form v-if="slogansDetail.length" :form="solganForm" class="solgan-form-class">
  1246. <a-form-item
  1247. v-for="item in slogansDetail"
  1248. :key="item.id"
  1249. class="solgan-form-model"
  1250. :label-col="labelCol"
  1251. :wrapper-col="wrapperCol"
  1252. label=""
  1253. >
  1254. <div style="width: 430px;">
  1255. <template v-if="item.name === defaultSolganTitle">
  1256. <a-input
  1257. v-decorator="[
  1258. item.name,
  1259. {
  1260. rules: [{validator: validatePass, trigger: 'blur'}],
  1261. initialValue: item.value
  1262. }
  1263. ]"
  1264. class="examin-form-input"
  1265. placeholder="请输入"
  1266. @change="handleSloganSearchChange($event, item.name, item.id)"
  1267. />
  1268. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1269. <a-icon class="examin-form-icon" type="check" @click="handleSolganCheck(item)"/>
  1270. </template>
  1271. <template v-else>
  1272. <span class="default-value-class">{{ item.slogan }}</span>
  1273. <a-icon class="examin-form-icon" type="edit" @click="handleSolganEdit(item)"/>
  1274. </template>
  1275. <a-icon class="examin-form-icon icon-delete" type="delete" @click="handleDelSolgan(item)"/>
  1276. </div>
  1277. <div v-if="item.name === defaultSolganTitle" class="ad-name-tags-class solgan-tags-change">
  1278. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1279. <a-tag
  1280. v-for="val in item.updateTagsList"
  1281. :key="val.id"
  1282. color="#1890ff"
  1283. @click="handleSloganAddTags(val.name, item.name, item.id)"
  1284. >
  1285. + {{ val.name }}
  1286. </a-tag>
  1287. </div>
  1288. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1289. <a-tag
  1290. v-for="val in item.defaultTagsList"
  1291. :key="val.id"
  1292. color="#1890ff"
  1293. @click="handleSloganAddTags(val.name, item.name, item.id)"
  1294. >
  1295. + {{ val.name }}
  1296. </a-tag>
  1297. </div>
  1298. <div v-if="item.tabStatus === 'alone'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'more')">更多</a></div>
  1299. <div v-if="item.tabStatus === 'all'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'little')">收起</a></div>
  1300. </div>
  1301. </a-form-item>
  1302. </a-form>
  1303. <span v-else class="solgan-title-header">暂无</span>
  1304. </div>
  1305. </div>
  1306. </div>
  1307. </a-modal>
  1308. <a-modal title="查看截图" v-model="bohuiShow" :width="300" :footer="null">
  1309. <img :src="bohui" alt style="width: 100%" />
  1310. </a-modal>
  1311. <a-modal title="人员修改" v-model="personVisible" @afterClose="closePerson">
  1312. <template slot="footer">
  1313. <a-button key="back" @click="closePerson">取消</a-button>
  1314. <a-button key="submit" type="primary" :loading="loadingPerson" @click="handleOkPerson">确定</a-button>
  1315. </template>
  1316. <a-form :form="formPerson">
  1317. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
  1318. <a-select
  1319. v-decorator="[
  1320. 'planId', // 给表单赋值或拉取表单时,该input对应的key
  1321. { rules: [{ required: true, message: '请选择策划!' }] },
  1322. ]"
  1323. showSearch
  1324. optionFilterProp="children"
  1325. :filterOption="filterOption"
  1326. >
  1327. <a-select-option :value="item.userId" v-for="item of ascription.planId" :key="item.userId">
  1328. {{ item.userName }}
  1329. </a-select-option>
  1330. </a-select>
  1331. </a-form-item>
  1332. <a-form-item v-if="activeKey === 'video'" :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄">
  1333. <a-select
  1334. v-decorator="[
  1335. 'shotId', // 给表单赋值或拉取表单时,该input对应的key
  1336. ]"
  1337. showSearch
  1338. optionFilterProp="children"
  1339. :filterOption="filterOption"
  1340. >
  1341. <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">
  1342. {{ item.userName }}
  1343. </a-select-option>
  1344. </a-select>
  1345. </a-form-item>
  1346. <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
  1347. <a-select
  1348. v-decorator="[
  1349. 'clipId', // 给表单赋值或拉取表单时,该input对应的key
  1350. { rules: [{ required: true, message: '请选择剪辑!' }] },
  1351. ]"
  1352. showSearch
  1353. optionFilterProp="children"
  1354. :filterOption="filterOption"
  1355. >
  1356. <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
  1357. {{ item.userName }}
  1358. </a-select-option>
  1359. </a-select>
  1360. </a-form-item>
  1361. </a-form>
  1362. </a-modal>
  1363. <a-modal title="标签修改" v-model="tagInfoListVisible">
  1364. <template slot="footer">
  1365. <a-button
  1366. key="back"
  1367. @click="
  1368. tagInfoListVisible = false
  1369. departValueInfoModality = []
  1370. departValueInfoMod = []
  1371. departValueInfoContent = []
  1372. departValueInfoSence = []
  1373. tagCode = null
  1374. "
  1375. >
  1376. 取消
  1377. </a-button>
  1378. <a-button key="submit" type="primary" :loading="loadingTag" @click="handleOkTag">确定</a-button>
  1379. </template>
  1380. <a-form-item
  1381. :label-col="labelCol"
  1382. :wrapper-col="{
  1383. xs: { span: 24 },
  1384. sm: { span: 12 },
  1385. }"
  1386. label="形式"
  1387. >
  1388. <el-cascader
  1389. placeholder="搜索你想要的形式标签"
  1390. :options="departTreeModality"
  1391. v-model="departValueInfoModality"
  1392. :props="{
  1393. multiple: true,
  1394. value: 'id',
  1395. label: 'tagName',
  1396. emitPath: false,
  1397. checkStrictly: true,
  1398. expandTrigger: 'hover',
  1399. }"
  1400. filterable
  1401. style="width: 100%"
  1402. ></el-cascader>
  1403. </a-form-item>
  1404. <a-form-item
  1405. :label-col="labelCol"
  1406. :wrapper-col="{
  1407. xs: { span: 24 },
  1408. sm: { span: 12 },
  1409. }"
  1410. label="场景"
  1411. >
  1412. <el-cascader
  1413. placeholder="搜索你想要的场景标签"
  1414. :options="departTreeSence"
  1415. v-model="departValueInfoSence"
  1416. :props="{
  1417. multiple: true,
  1418. value: 'id',
  1419. label: 'tagName',
  1420. emitPath: false,
  1421. checkStrictly: true,
  1422. expandTrigger: 'hover',
  1423. }"
  1424. filterable
  1425. style="width: 100%"
  1426. ></el-cascader>
  1427. </a-form-item>
  1428. <a-form-item
  1429. :label-col="labelCol"
  1430. :wrapper-col="{
  1431. xs: { span: 24 },
  1432. sm: { span: 12 },
  1433. }"
  1434. label="基调"
  1435. >
  1436. <el-cascader
  1437. placeholder="搜索你想要的基调标签"
  1438. :options="departTreeMod"
  1439. v-model="departValueInfoMod"
  1440. :props="{
  1441. multiple: true,
  1442. value: 'id',
  1443. label: 'tagName',
  1444. emitPath: false,
  1445. checkStrictly: true,
  1446. expandTrigger: 'hover',
  1447. }"
  1448. filterable
  1449. style="width: 100%"
  1450. ></el-cascader>
  1451. </a-form-item>
  1452. </a-modal>
  1453. <a-modal title="推荐封面" v-model="chouzhen" width="60%">
  1454. <template slot="footer">
  1455. <a-button key="back" @click="chouzhen = false">关闭</a-button>
  1456. </template>
  1457. <ul v-if="chouzhenList.length > 0" style="height: 600px; overflow: auto">
  1458. <li v-for="(item, index) of chouzhenList" :key="index" class="chouzhen" :class="{ first: index === 0 }">
  1459. <img
  1460. :src="item.url"
  1461. alt
  1462. style="width: 100%"
  1463. @click="
  1464. showImageStr = item.url
  1465. showImageChouzhen = true
  1466. "
  1467. />
  1468. </li>
  1469. </ul>
  1470. <div style="clear: both"></div>
  1471. <a-modal title="图片预览" v-model="showImageChouzhen" :footer="null">
  1472. <img :src="showImageStr" style="width: 100%" />
  1473. </a-modal>
  1474. </a-modal>
  1475. <account-check ref="check" @synchro="implement"></account-check>
  1476. <accountCheckBytedance ref="accountCheckBytedance" @synchro="implement" />
  1477. <permission-modal ref="modalForm" @ok="modalFormOkElse"></permission-modal>
  1478. <a-modal
  1479. v-if="recommendVisible"
  1480. :visible="recommendVisible"
  1481. title="系统推荐标题"
  1482. dialog-class="recommend-modal"
  1483. @ok="handleRecommendSure"
  1484. @cancel="handleRecommendCancel"
  1485. >
  1486. <div>
  1487. <div class="recommend-modal-header">
  1488. <div style="margin-bottom:30px">
  1489. <span style="display:inline-block;width:40px">行业</span>
  1490. <a-cascader
  1491. style="margin-top: 1rem;width:200px"
  1492. :options="recSearchOptions"
  1493. :showSearch="{recomFilter}"
  1494. expandTrigger="hover"
  1495. @change="handleRecSelectChang"
  1496. placeholder="请选择行业"
  1497. >
  1498. <a-icon type="smile" slot="suffixIcon" class="test" />
  1499. </a-cascader>
  1500. </div>
  1501. <div style="margin-bottom:18px">
  1502. <span style="display:inline-block;width:60px;margin-left: 20px;">关键词</span>
  1503. <a-input placeholder="请输入关键词" v-model="keyWordRec" style="width: 150px"/>
  1504. </div>
  1505. <div style="margin-bottom:18px; margin-left: 20px;">
  1506. <a-button type="primary" @click="handleSearchTitle">生成</a-button>
  1507. </div>
  1508. </div>
  1509. <p>已选:{{ finallyCheckedResult && finallyCheckedResult.length || 0}} 个</p>
  1510. <div class="recommend-modal-content">
  1511. <a-checkbox-group @change="handleCheckBoxChang">
  1512. <span
  1513. class="check-box-class"
  1514. v-for="(item, index) in titleResult"
  1515. :key="index"
  1516. >
  1517. <a-checkbox :value="item">{{ item }}</a-checkbox>
  1518. </span>
  1519. </a-checkbox-group>
  1520. </div>
  1521. </div>
  1522. </a-modal>
  1523. <a-modal
  1524. v-if="causeVisible"
  1525. title="审核通过"
  1526. dialog-class="examin-modal"
  1527. :visible="causeVisible"
  1528. :confirm-loading="causeConfirmLoading"
  1529. @ok="handleCauseSure"
  1530. @cancel="handleCauseCancel"
  1531. >
  1532. <div>
  1533. <div class="acount-title">
  1534. <div class="acount-title-left">素材名称</div>
  1535. <div class="acount-title-right">
  1536. <div class="only-title-mater">{{ currentPageOnlyList.materialName }}</div>
  1537. </div>
  1538. </div>
  1539. <div class="acount-title push-plate">
  1540. <div class="acount-title-left">创意标题</div>
  1541. <div class="acount-title-right">
  1542. <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
  1543. <!-- TODO 暂时功能隐藏 -->
  1544. <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
  1545. <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
  1546. </div>
  1547. </div>
  1548. <div class="acount-title">
  1549. <div class="acount-title-left"></div>
  1550. <div class="acount-title-right">
  1551. <a-form :form="examinForm">
  1552. <a-form-item
  1553. v-for="item in defaultFormList"
  1554. :key="item.id"
  1555. class="examin-form-model"
  1556. :label-col="labelCol"
  1557. :wrapper-col="wrapperCol"
  1558. label=""
  1559. >
  1560. <a-input
  1561. v-decorator="[
  1562. item.name,
  1563. {rules: [
  1564. {validator: validatePass, trigger: 'blur'}
  1565. ]}
  1566. ]"
  1567. class="examin-form-input"
  1568. :id="item.name"
  1569. placeholder="请输入"
  1570. @change="handleFormInputChang($event, item.name, item.id)"
  1571. />
  1572. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1573. <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
  1574. <div class="ad-name-tags-class">
  1575. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1576. <a-tag
  1577. v-for="val in item.updateTagsList"
  1578. :key="val.id"
  1579. color="#1890ff"
  1580. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1581. >
  1582. + {{ val.name }}
  1583. </a-tag>
  1584. </div>
  1585. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1586. <a-tag
  1587. v-for="val in item.defaultTagsList"
  1588. :key="val.id"
  1589. color="#1890ff"
  1590. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1591. >
  1592. + {{ val.name }}
  1593. </a-tag>
  1594. </div>
  1595. <div v-if="item.tabStatus === 'alone'"><a @click="handleMoreTagsShow(item.id, 'more')">更多</a></div>
  1596. <div v-if="item.tabStatus === 'all'"><a @click="handleMoreTagsShow(item.id, 'little')">收起</a></div>
  1597. </div>
  1598. </a-form-item>
  1599. </a-form>
  1600. </div>
  1601. </div>
  1602. </div>
  1603. </a-modal>
  1604. <a-modal
  1605. v-if="batchVisible"
  1606. title="审核通过"
  1607. dialog-class="examin-modal"
  1608. :visible="batchVisible"
  1609. @ok="handleBatchSure"
  1610. @cancel="handleBatchCancel"
  1611. >
  1612. <div>
  1613. <div class="acount-title">
  1614. <div class="acount-title-left">素材名称</div>
  1615. <div class="acount-title-right" :style="accountMaster">
  1616. <div class="only-title-mater" v-for="item in modalShowBatchList" :key="item.id">
  1617. {{ item.materialName }}
  1618. </div>
  1619. </div>
  1620. <a-icon :type="materTitltStatus ? 'up' : 'down'" style="margin-top: 5px;margin-left: 15px;" @click="handleMaterTitleClick"/>
  1621. </div>
  1622. <div class="acount-title push-plate">
  1623. <div class="acount-title-left">创意标题</div>
  1624. <div class="acount-title-right">
  1625. <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
  1626. <!-- TODO 暂时功能隐藏 -->
  1627. <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
  1628. <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
  1629. </div>
  1630. </div>
  1631. <div class="acount-title">
  1632. <div class="acount-title-left"></div>
  1633. <div class="acount-title-right">
  1634. <a-form :form="examinForm">
  1635. <a-form-item
  1636. v-for="item in defaultFormList"
  1637. :key="item.id"
  1638. class="examin-form-model"
  1639. :label-col="labelCol"
  1640. :wrapper-col="wrapperCol"
  1641. label=""
  1642. >
  1643. <a-input
  1644. v-decorator="[
  1645. item.name,
  1646. { rules: [
  1647. {validator: validatePass, trigger: 'blur'}
  1648. ]}
  1649. ]"
  1650. class="examin-form-input"
  1651. placeholder="请输入"
  1652. @change="handleFormInputChang($event, item.name, item.id)"
  1653. />
  1654. <span class="examin-form-num">{{ item.lenSize }}/30</span>
  1655. <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
  1656. <div class="ad-name-tags-class">
  1657. <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
  1658. <a-tag
  1659. v-for="val in item.updateTagsList"
  1660. :key="val.id"
  1661. color="#1890ff"
  1662. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1663. >
  1664. + {{ val.name }}
  1665. </a-tag>
  1666. </div>
  1667. <div v-if="item.tabStatus === 'all'" class="name-tags-left">
  1668. <a-tag
  1669. v-for="val in item.defaultTagsList"
  1670. :key="val.id"
  1671. color="#1890ff"
  1672. @click="handleGetChangeAll(val.name, item.name, item.id)"
  1673. >
  1674. + {{ val.name }}
  1675. </a-tag>
  1676. </div>
  1677. <div v-if="item.tabStatus === 'alone'"><a @click="handleMoreTagsShow(item.id, 'more')">更多</a></div>
  1678. <div v-if="item.tabStatus === 'all'"><a @click="handleMoreTagsShow(item.id, 'little')">收起</a></div>
  1679. </div>
  1680. </a-form-item>
  1681. </a-form>
  1682. </div>
  1683. </div>
  1684. </div>
  1685. </a-modal>
  1686. </a-card>
  1687. </template>
  1688. <script>
  1689. import PermissionModal from '@/views/modules/material/modules/DepartModal';
  1690. import {JeecgListMixin} from '@/mixins/JeecgListMixin';
  1691. import JEllipsis from '@/components/jeecg/JEllipsis';
  1692. import UploadToAli from '@femessage/upload-to-ali';
  1693. import selectTable from '@/views/modules/material/comment/selectTable.vue';
  1694. import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate, fileEditUpdateBatch} from '@/api/actor';
  1695. import {deleteAction, getAction, postAction, putAction} from '@/api/manage';
  1696. import uploadFile from '@/components/uploadFile.vue';
  1697. import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
  1698. import accountCheck from '@/views/modules/material/accountCheck';
  1699. import accountCheckBytedance from '@/views/modules/material/accountCheckBytedance';
  1700. import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue';
  1701. import {urlAcount} from '../account-config/account-config-server.js';
  1702. import qs from 'qs';
  1703. import {mapGetters} from 'vuex';
  1704. import moment from 'moment';
  1705. import BMF from 'browser-md5-file';
  1706. export default {
  1707. name: 'creative-copywrit',
  1708. mixins: [JeecgListMixin],
  1709. components: {
  1710. JEllipsis,
  1711. UploadToAli,
  1712. accountCheck,
  1713. selectTable,
  1714. uploadFile,
  1715. PermissionModal,
  1716. accountCheckBytedance,
  1717. selectTableProject
  1718. },
  1719. data() {
  1720. return {
  1721. designList: [],
  1722. adNameTags: [],
  1723. materTitltStatus: false,
  1724. accountMaster: {
  1725. height: '35px',
  1726. overflow: 'hidden'
  1727. },
  1728. batchVisible: false,
  1729. showTabsTitle: '',
  1730. taobaoSpecialOfferTitle: 'taobao',
  1731. defaultSolganStatus: 'input',
  1732. defaultSolganTitle: 'test',
  1733. slogansDetail: [],
  1734. titleFiledResult: [],
  1735. applyTypeOption: [], // 最终的选择结果
  1736. finallyCheckedResult: [], // 最终的选择结果
  1737. titleResult: [],
  1738. dataOne: [],
  1739. recSearchOptions: [],
  1740. keyWordRec: '',
  1741. recommendVisible: false,
  1742. labelCol: {span: 4},
  1743. wrapperCol: {span: 14},
  1744. solganForm: this.$form.createForm(this),
  1745. examinForm: this.$form.createForm(this),
  1746. defaultFormList: [],
  1747. causeVisible: false,
  1748. causeConfirmLoading: false,
  1749. labelValue: [],
  1750. options: [],
  1751. departTree: [],
  1752. departTreeModality: [],
  1753. departTreeContent: [],
  1754. departTreeSence: [],
  1755. departTreeMod: [],
  1756. departValue: [],
  1757. departValueInfo: [],
  1758. departValueInfoModality: [],
  1759. departValueInfoContent: [],
  1760. departValueInfoSence: [],
  1761. departValueInfoMod: [],
  1762. tagInfoList: [],
  1763. tagInfoListVisible: false,
  1764. tagCode: null,
  1765. loadingTag: false,
  1766. showImageChouzhen: false,
  1767. showImageStr: null,
  1768. coverPreviewVisible: false,
  1769. chouzhen: false,
  1770. chouzhenList: [],
  1771. model: [],
  1772. modelNew: [],
  1773. goodsColumns: [
  1774. {
  1775. title: '封面预览',
  1776. dataIndex: 'url',
  1777. align: 'center',
  1778. scopedSlots: {
  1779. customRender: 'url'
  1780. }
  1781. },
  1782. {
  1783. title: '审核',
  1784. align: 'center',
  1785. dataIndex: 'action',
  1786. width: 100,
  1787. scopedSlots: {
  1788. customRender: 'action'
  1789. }
  1790. }
  1791. ],
  1792. addImageVisible: false,
  1793. addImageData: null,
  1794. projectId: '',
  1795. inputVisible: false,
  1796. inputValue: '',
  1797. labelCol: {
  1798. xs: {
  1799. span: 24
  1800. },
  1801. sm: {
  1802. span: 5
  1803. }
  1804. },
  1805. wrapperCol: {
  1806. xs: {
  1807. span: 24
  1808. },
  1809. sm: {
  1810. span: 12
  1811. }
  1812. },
  1813. queryParam: {},
  1814. dataElse: [],
  1815. ascription: {
  1816. clipId: [], // 剪辑人id
  1817. shotId: [], // 拍摄人id
  1818. planId: [], // 策划id
  1819. planeId: [] // 平面id
  1820. },
  1821. show: true,
  1822. visible: false,
  1823. visibleDetail: false,
  1824. personVisible: false,
  1825. confirmLoading: false,
  1826. loadingElse: false,
  1827. loadingImage: false,
  1828. loadingPerson: false,
  1829. activeKey: 'video',
  1830. active: '0',
  1831. examinelList: [
  1832. {
  1833. value: '0',
  1834. tab: '未审核'
  1835. },
  1836. {
  1837. value: '1',
  1838. tab: '已批准'
  1839. },
  1840. {
  1841. value: '2',
  1842. tab: '已驳回'
  1843. }
  1844. ],
  1845. // 表头
  1846. columns: [],
  1847. urlList: {
  1848. url: '',
  1849. md5: '',
  1850. name: ''
  1851. },
  1852. urlListImage: {
  1853. url: [],
  1854. md5: [],
  1855. name: [],
  1856. size: []
  1857. },
  1858. watermarkUrl: {
  1859. url: '',
  1860. md5: '',
  1861. name: ''
  1862. },
  1863. url: {
  1864. list: '/ctop/materialInfo/listV2'
  1865. },
  1866. form: this.$form.createForm(this),
  1867. formPerson: this.$form.createForm(this),
  1868. tags: [],
  1869. refuseFile: [],
  1870. refuseReason: '',
  1871. refuseReasonImage: '',
  1872. creativeCopywriter: '',
  1873. customDomain: '',
  1874. region: 'oss-cn-beijing',
  1875. bucket: 'ctop-media',
  1876. acceptVideo: 'video/mpeg,video/mp4',
  1877. acceptImage: 'image/jpeg,image/jpg,image/png',
  1878. accessKeyId: 'LTAIbNbqWzSOklQV',
  1879. accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
  1880. checkArr: [],
  1881. checkAll: false,
  1882. checkArrImage: [],
  1883. checkAllImage: false,
  1884. showUrl: '',
  1885. showUrlWater: '',
  1886. materialName: '',
  1887. materialDescribe: '',
  1888. name: '',
  1889. detail: null,
  1890. add: true,
  1891. id: '',
  1892. role: {
  1893. roleCode: '',
  1894. roleName: ''
  1895. },
  1896. key: '0',
  1897. mediaId: null,
  1898. sizeType: [],
  1899. size: null,
  1900. repeat: false,
  1901. excellent: 0,
  1902. code: '',
  1903. material: [],
  1904. imageArrList: [],
  1905. showDataBool: false,
  1906. kuaishouData: null,
  1907. douyinData: null,
  1908. bohui: '',
  1909. bohuiShow: false,
  1910. waterLoading: false,
  1911. videoTag: [],
  1912. videoVisibleChange: '',
  1913. modalShowBatchList: []
  1914. };
  1915. },
  1916. filters: {
  1917. getDate(value) {
  1918. let date = new Date(value);
  1919. let y = date.getFullYear();
  1920. let MM = date.getMonth() + 1;
  1921. MM = MM < 10 ? '0' + MM : MM;
  1922. let d = date.getDate();
  1923. d = d < 10 ? '0' + d : d;
  1924. return y + '-' + MM + '-' + d;
  1925. }
  1926. },
  1927. computed: {
  1928. handleFilterName() {
  1929. return val => {
  1930. return this.examinForm.getFieldsValue()[val] ? this.examinForm.getFieldsValue()[val].length : 0;
  1931. };
  1932. },
  1933. handleFilterSlogan() {
  1934. return val => {
  1935. return this.solganForm.getFieldsValue()[val] ? this.solganForm.getFieldsValue()[val].length : 0;
  1936. };
  1937. },
  1938. dirImg() {
  1939. let date = new Date();
  1940. let y = date.getFullYear();
  1941. let MM = date.getMonth() + 1;
  1942. MM = MM < 10 ? '0' + MM : MM;
  1943. let d = date.getDate();
  1944. d = d < 10 ? '0' + d : d;
  1945. return 'image/' + y + '-' + MM + '-' + d + '/';
  1946. },
  1947. dirVideo() {
  1948. let date = new Date();
  1949. let y = date.getFullYear();
  1950. let MM = date.getMonth() + 1;
  1951. MM = MM < 10 ? '0' + MM : MM;
  1952. let d = date.getDate();
  1953. d = d < 10 ? '0' + d : d;
  1954. return 'video/' + y + '-' + MM + '-' + d + '/';
  1955. }
  1956. },
  1957. created() {
  1958. this.queryParam.type = 'VIDEO';
  1959. this.queryParam.userId = this.userInfo().id;
  1960. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  1961. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  1962. this.ipagination.pageSize = 8;
  1963. this.getParticipateList(null);
  1964. getAction('/sys/user/getRoleInfo', {
  1965. userId: this.userInfo().id
  1966. }).then(res => {
  1967. this.role = res;
  1968. });
  1969. getAction('/ctop/videoWatermarkTemplate/list').then(res => {
  1970. if (res.success) {
  1971. this.sizeType = res.result.records;
  1972. }
  1973. });
  1974. this.getTagListAll();
  1975. },
  1976. updated() {
  1977. stopOtherVideo();
  1978. },
  1979. mounted() {
  1980. setInterval(() => {
  1981. document.querySelectorAll('.el-cascader-node__label').forEach(el => {
  1982. el.onclick = function () {
  1983. if (this.previousElementSibling) {
  1984. this.previousElementSibling.click();
  1985. }
  1986. };
  1987. });
  1988. }, 1000);
  1989. getAction('/ctop/tagInfo/treeList', {
  1990. pageSize: 10000
  1991. }).then(res => {
  1992. if (res.success) {
  1993. this.options = res.result.records;
  1994. }
  1995. else {
  1996. this.$message.error('数据请求失败!');
  1997. }
  1998. });
  1999. this.getHangye();
  2000. this.handleGetCreativeWord();
  2001. this.handleGetDesignList();
  2002. },
  2003. watch: {
  2004. $route(n, o) {
  2005. if (n.path === '/modules/material/videoMaterial') {
  2006. this.queryParam.userId = this.userInfo().id;
  2007. this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2008. this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0';
  2009. this.loadData();
  2010. }
  2011. },
  2012. 'queryParam.productId': function (n, o) {
  2013. if (n != '') {
  2014. this.getList(n);
  2015. this.checkArr = [];
  2016. this.$refs.selectTableProject.keyValue = '';
  2017. this.$refs.selectTableProject.getData(n);
  2018. }
  2019. },
  2020. visibleDetail(n, o) {
  2021. if (!n) {
  2022. this.refuseFile = [];
  2023. this.refuseReason = '';
  2024. closeAllVideoFun();
  2025. }
  2026. },
  2027. defaultFormList: {
  2028. deep: true,
  2029. handler(n, o) {
  2030. const result = [];
  2031. this.defaultFormList = n;
  2032. this.$nextTick(() => {
  2033. this.defaultFormList.forEach(item => {
  2034. if (item.value) {
  2035. result.push(item.value);
  2036. }
  2037. this.examinForm.setFieldsValue({[item.name]: item.value});
  2038. });
  2039. this.titleFiledResult = result;
  2040. });
  2041. }
  2042. },
  2043. labelValue: {
  2044. deep: true,
  2045. handler(n, o) {
  2046. if (n.length >= 1) {
  2047. this.queryParam.tagCode = n[n.length - 1];
  2048. }
  2049. else {
  2050. this.queryParam.tagCode = '';
  2051. }
  2052. }
  2053. }
  2054. },
  2055. methods: {
  2056. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  2057. handleBudgetCancel() {
  2058. this.defaultSolganTitle = 'test';
  2059. this.defaultSolganStatus = 'input';
  2060. this.visibleDetail = false;
  2061. },
  2062. // 获取设计人员
  2063. handleGetDesignList() {
  2064. postAction('/ctop/kuaishou/videoReport/getDesignList').then(result => {
  2065. if (result.success) {
  2066. this.designList = result.result;
  2067. }
  2068. }).catch(error => {
  2069. console.log(error, 'eeee');
  2070. });
  2071. },
  2072. handleSubmit() {
  2073. if (!this.queryParam.productId) {
  2074. this.$refs.selectTableProject.keyValue = '';
  2075. this.$refs.selectTableProject.getData();
  2076. }
  2077. this.searchQuery();
  2078. this.checkArr = [];
  2079. },
  2080. handleExaminMoreList(val, type) {
  2081. if (type === 'more') {
  2082. this.slogansDetail.forEach(item => {
  2083. if (item.id === val) {
  2084. item.tabStatus = 'all';
  2085. }
  2086. });
  2087. }
  2088. else if (type === 'little') {
  2089. this.slogansDetail.forEach(item => {
  2090. if (item.id === val) {
  2091. item.tabStatus = 'alone';
  2092. }
  2093. });
  2094. }
  2095. },
  2096. handleMoreTagsShow(val, type) {
  2097. if (type === 'more') {
  2098. this.defaultFormList.forEach(item => {
  2099. if (item.id === val) {
  2100. item.tabStatus = 'all';
  2101. }
  2102. });
  2103. }
  2104. else if (type === 'little') {
  2105. this.defaultFormList.forEach(item => {
  2106. if (item.id === val) {
  2107. item.tabStatus = 'alone';
  2108. }
  2109. });
  2110. }
  2111. },
  2112. handleGetCreativeWord() {
  2113. getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
  2114. if (result.code === 0) {
  2115. this.adNameTags = result.result.records;
  2116. }
  2117. else {
  2118. this.$message.error(result.message);
  2119. }
  2120. }).catch(error => {
  2121. console.log(error, 'eeee');
  2122. });
  2123. },
  2124. validatePass(rule, value, callback) {
  2125. this.$nextTick(() => {
  2126. let finallyLenList = this.handleJudgeExec(value);
  2127. let newOptionList = [];
  2128. finallyLenList.forEach(item => {
  2129. this.adNameTags.forEach(val => {
  2130. if (item === val.name) {
  2131. newOptionList.push(val);
  2132. }
  2133. });
  2134. });
  2135. let updateFinallyResult = newOptionList.map(val => val.name);
  2136. let resultSelectSize = 0;
  2137. if (updateFinallyResult.length) {
  2138. const inputDefaultLen = this.handleExportRules(value);
  2139. let tagsLen = updateFinallyResult.length * 2;
  2140. let tagsSureLen = 0;
  2141. updateFinallyResult.forEach(item => {
  2142. this.adNameTags.forEach(val => {
  2143. if (item === val.name) {
  2144. tagsSureLen += val.maxWordLen;
  2145. }
  2146. });
  2147. });
  2148. updateFinallyResult.forEach(item => {
  2149. tagsLen += item.length;
  2150. });
  2151. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2152. }
  2153. else {
  2154. resultSelectSize = this.handleExportRules(value);
  2155. }
  2156. if (resultSelectSize === 0) {
  2157. callback(new Error('请输入'));
  2158. }
  2159. else if (resultSelectSize > 30 || resultSelectSize < 5) {
  2160. callback(new Error('创意标题5-30个字'));
  2161. }
  2162. else if (updateFinallyResult.length > 2) {
  2163. callback(new Error('最多选择两个词包'));
  2164. }
  2165. else {
  2166. callback();
  2167. }
  2168. });
  2169. },
  2170. handleJudgeExec(item) {
  2171. let re = /\{(.+?)\}/g;
  2172. let array = [];
  2173. let temp;
  2174. while ((temp = re.exec(item))) {
  2175. array.push(temp[1]);
  2176. };
  2177. return array;
  2178. },
  2179. handleSloganAddTags(item, field, formId) {
  2180. let node = document.getElementById(field);
  2181. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  2182. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  2183. let txt = node.value;
  2184. this.$nextTick(() => {
  2185. let finallyLenList = this.handleJudgeExec(txt);
  2186. let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
  2187. if (updateFinallyResult.length >= 2) {
  2188. this.$message.error('最多选择两个词包');
  2189. return;
  2190. }
  2191. if (startPos === 0 || endPos === 0) {
  2192. txt += '{' + item + '}';
  2193. this.solganForm.setFieldsValue({[field]: txt});
  2194. }
  2195. else {
  2196. this.solganForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
  2197. node.selectionStart = startPos + item.length + 6;
  2198. node.selectionEnd = startPos + item.length + 6;
  2199. }
  2200. node.focus();
  2201. node.blur();
  2202. });
  2203. this.$nextTick(() => {
  2204. const dynamicWordPackIds = [];
  2205. let changeData = this.handleJudgeExec(this.solganForm.getFieldsValue()[field]);
  2206. let newOptionList = [];
  2207. changeData.forEach(item => {
  2208. this.adNameTags.forEach(val => {
  2209. if (item === val.name) {
  2210. newOptionList.push(val);
  2211. }
  2212. });
  2213. });
  2214. let updateChangeData = newOptionList.map(val => val.name);
  2215. const inputDefaultLen = this.handleExportRules(this.solganForm.getFieldsValue()[field]);
  2216. let tagsLen = updateChangeData.length * 2;
  2217. let tagsSureLen = 0;
  2218. let resultSelectSize = 0;
  2219. updateChangeData.forEach(item => {
  2220. this.adNameTags.forEach(val => {
  2221. if (item === val.name) {
  2222. tagsSureLen += val.maxWordLen;
  2223. dynamicWordPackIds.push(val.creativeWordId);
  2224. }
  2225. });
  2226. });
  2227. updateChangeData.forEach(item => {
  2228. tagsLen += item.length;
  2229. });
  2230. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
  2231. this.slogansDetail.forEach(item => {
  2232. if (item.id === formId) {
  2233. item.lenSize = resultSelectSize;
  2234. item.value = this.solganForm.getFieldsValue()[field];
  2235. item.wordPackId = dynamicWordPackIds;
  2236. }
  2237. });
  2238. });
  2239. },
  2240. // 点击获取光标位置进行字段插入
  2241. handleGetChangeAll(item, field, formId) {
  2242. let node = document.getElementById(field);
  2243. let startPos = node.selectionStart; // input 第0个字符到选中的字符
  2244. let endPos = node.selectionEnd; // 选中的字符到最后的字符
  2245. let txt = node.value;
  2246. this.$nextTick(() => {
  2247. let finallyLenList = this.handleJudgeExec(txt);
  2248. let arr = [];
  2249. finallyLenList.forEach(item => {
  2250. this.adNameTags.forEach(val => {
  2251. if (item === val.name) {
  2252. arr.push(val);
  2253. }
  2254. });
  2255. });
  2256. let updateFinallyResult = arr.map(val => val.name);
  2257. if (updateFinallyResult.length >= 2) {
  2258. this.$message.error('最多选择两个词包');
  2259. return;
  2260. }
  2261. if (startPos === 0 || endPos === 0) {
  2262. txt += '{' + item + '}';
  2263. this.examinForm.setFieldsValue({[field]: txt});
  2264. }
  2265. else {
  2266. this.examinForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
  2267. node.selectionStart = startPos + item.length + 6;
  2268. node.selectionEnd = startPos + item.length + 6;
  2269. }
  2270. node.focus();
  2271. node.blur();
  2272. });
  2273. this.$nextTick(() => {
  2274. const dynamicWordPackIds = [];
  2275. let changeData = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
  2276. let newOptionList = [];
  2277. changeData.forEach(item => {
  2278. this.adNameTags.forEach(val => {
  2279. if (item === val.name) {
  2280. newOptionList.push(val);
  2281. }
  2282. });
  2283. });
  2284. let updateChangeData = newOptionList.map(val => val.name);
  2285. const inputDefaultLen = this.handleExportRules(this.examinForm.getFieldsValue()[field]);
  2286. let tagsLen = updateChangeData.length * 2;
  2287. let tagsSureLen = 0;
  2288. let resultSelectSize = 0;
  2289. updateChangeData.forEach(item => {
  2290. this.adNameTags.forEach(val => {
  2291. if (item === val.name) {
  2292. tagsSureLen += val.maxWordLen;
  2293. dynamicWordPackIds.push(val.creativeWordId);
  2294. }
  2295. });
  2296. });
  2297. updateChangeData.forEach(item => {
  2298. tagsLen += item.length;
  2299. });
  2300. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
  2301. this.defaultFormList.forEach(item => {
  2302. if (item.id === formId) {
  2303. item.lenSize = resultSelectSize;
  2304. item.value = this.examinForm.getFieldsValue()[field];
  2305. item.wordPackId = dynamicWordPackIds;
  2306. }
  2307. });
  2308. });
  2309. },
  2310. handleMaterTitleClick() {
  2311. this.materTitltStatus = !this.materTitltStatus;
  2312. if (this.materTitltStatus) {
  2313. this.accountMaster = {
  2314. height: 'auto'
  2315. };
  2316. }
  2317. else {
  2318. this.accountMaster = {
  2319. height: '35px',
  2320. overflow: 'hidden'
  2321. };
  2322. }
  2323. },
  2324. handleApprovedClick() {
  2325. const batchList = [];
  2326. this.defaultFormList = [];
  2327. this.dataSource.forEach(item => {
  2328. if (this.checkArr.includes(item.id)) {
  2329. batchList.push(item);
  2330. }
  2331. });
  2332. this.modalShowBatchList = batchList;
  2333. this.batchVisible = true;
  2334. this.materTitltStatus = false;
  2335. this.accountMaster = {
  2336. height: '35px',
  2337. overflow: 'hidden'
  2338. };
  2339. for (let i = 0; i < 3; i++) {
  2340. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2341. this.defaultFormList.push({
  2342. id: randomNum,
  2343. name: 'username' + randomNum,
  2344. value: '',
  2345. lenSize: 0,
  2346. tabStatus: 'alone',
  2347. defaultTagsList: this.adNameTags,
  2348. updateTagsList: this.adNameTags.slice(0, 4)
  2349. });
  2350. }
  2351. },
  2352. handleBatchSure() {
  2353. if (this.defaultFormList && this.defaultFormList.length < 3) {
  2354. this.$message.error('请至少输入3条标题');
  2355. return;
  2356. }
  2357. let changeSlogan = this.defaultFormList;
  2358. changeSlogan.forEach(item => {
  2359. item.title = item.value;
  2360. item.creative_word_ids = item.wordPackId;
  2361. });
  2362. let params = {
  2363. ids: this.modalShowBatchList.map(item => item.id) || [],
  2364. auditorId: this.userInfo().id,
  2365. status: 1,
  2366. slogans: changeSlogan
  2367. };
  2368. this.examinForm.validateFields(err => {
  2369. if (!err) {
  2370. fileEditUpdateBatch(params).then(res => {
  2371. if (res.code === 0) {
  2372. this.refuseReason = '';
  2373. this.batchVisible = false;
  2374. this.defaultFormList = [];
  2375. this.$message.success('审核成功');
  2376. this.loadData();
  2377. }
  2378. else {
  2379. this.$message.error(res.message);
  2380. }
  2381. });
  2382. }
  2383. });
  2384. },
  2385. handleBatchCancel() {
  2386. this.batchVisible = false;
  2387. },
  2388. handleFodderWind() {
  2389. if (this.checkArr.length > 8) {
  2390. this.$message.error('最多可以支持同时选择8个视频');
  2391. return;
  2392. }
  2393. const paramsData = {
  2394. offlineFlag: 1,
  2395. id: this.checkArr.join(',')
  2396. };
  2397. let that = this;
  2398. this.$confirm({
  2399. title: '下线提示',
  2400. content: '是否下线选中视频',
  2401. onOk() {
  2402. getAction(urlAcount + '/bytedance-api/advertiser/materialInfoController/updMaterialOfflineById', paramsData).then(result => {
  2403. if (result.code === 0) {
  2404. that.searchQuery();
  2405. that.checkArr = [];
  2406. that.$message.success(result.message);
  2407. }
  2408. else {
  2409. that.$message.error(result.message);
  2410. }
  2411. }).catch(error => {
  2412. console.log(error, 'eeee');
  2413. });
  2414. }
  2415. });
  2416. },
  2417. compareToFirstPassword(rule, value, callback) {
  2418. if (value && value.length > 30 || value.length < 5) {
  2419. callback('创意标题5-30个字');
  2420. }
  2421. else {
  2422. callback();
  2423. }
  2424. },
  2425. handleExportRules(value) {
  2426. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  2427. let length = 0;
  2428. let strArr = value.split('');
  2429. strArr.forEach(item => {
  2430. if (cnReg.test(item)) {
  2431. length += 1;
  2432. }
  2433. else {
  2434. length += 0.5;
  2435. }
  2436. });
  2437. return Math.ceil(length);
  2438. },
  2439. handleGetQueryById() {
  2440. getAction('/ctop/materialInfo/queryById', {
  2441. id: this.id
  2442. }).then(res => {
  2443. if (res.success) {
  2444. this.showUrlWater = res.result.watermarkUrl;
  2445. this.name = res.result.watermarkCode;
  2446. this.materialName = res.result.materialName;
  2447. res.result.slogans.forEach(item => {
  2448. let finallyLenList = this.handleJudgeExec(item.slogan);
  2449. let resultSelectSize = 0;
  2450. if (finallyLenList.length) {
  2451. const inputDefaultLen = this.handleExportRules(item.slogan);
  2452. let tagsLen = finallyLenList.length * 2;
  2453. let tagsSureLen = 0;
  2454. finallyLenList.forEach(item => {
  2455. this.adNameTags.forEach(val => {
  2456. if (item === val.name) {
  2457. tagsSureLen += val.maxWordLen;
  2458. }
  2459. });
  2460. });
  2461. finallyLenList.forEach(item => {
  2462. tagsLen += item.length;
  2463. });
  2464. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
  2465. }
  2466. else {
  2467. resultSelectSize = this.handleExportRules(item.slogan);
  2468. }
  2469. item.name = 'username' + item.id;
  2470. item.value = item.slogan;
  2471. item.lenSize = resultSelectSize;
  2472. item.tabStatus = 'alone';
  2473. item.defaultTagsList = this.adNameTags;
  2474. item.updateTagsList = this.adNameTags.slice(0, 4);
  2475. });
  2476. this.slogansDetail = res.result.slogans;
  2477. }
  2478. else {
  2479. this.showUrlWater = null;
  2480. this.name = null;
  2481. }
  2482. });
  2483. },
  2484. handleDelSolgan(data) {
  2485. if (this.slogansDetail && this.slogansDetail.length <= 3) {
  2486. this.$message.error('删除失败,广告语不能少于三条');
  2487. return;
  2488. }
  2489. if (this.defaultSolganStatus === 'edit') {
  2490. this.defaultSolganStatus = 'input';
  2491. }
  2492. let formdata = new FormData();
  2493. formdata.append('id', data.id);
  2494. postAction('/ctop/bytedanceVideoSlogenInfo/delete', formdata).then(res => {
  2495. if (res.success) {
  2496. this.$message.success('删除成功');
  2497. this.handleGetQueryById();
  2498. }
  2499. });
  2500. },
  2501. handleSolganCheck(data) {
  2502. let changeSlogan = this.slogansDetail;
  2503. changeSlogan.forEach(item => {
  2504. item.title = item.value;
  2505. item.creative_word_ids = item.wordPackId;
  2506. });
  2507. this.solganForm.validateFields(err => {
  2508. if (!err) {
  2509. postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
  2510. id: data.id,
  2511. slogan: changeSlogan.filter(item => item.id === data.id)[0].title,
  2512. creativeWordIds: JSON.stringify(changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids)
  2513. }).then(res => {
  2514. if (res.code === 0) {
  2515. this.defaultSolganStatus = 'input';
  2516. this.defaultSolganTitle = 'test';
  2517. this.$message.success('修改成功');
  2518. this.handleGetQueryById();
  2519. }
  2520. else {
  2521. this.$message.error(res.message);
  2522. }
  2523. });
  2524. }
  2525. });
  2526. },
  2527. handleSolganEdit(data) {
  2528. if (this.defaultSolganStatus === 'edit') {
  2529. this.$message.error('请先完成上一次的修改');
  2530. return;
  2531. }
  2532. this.defaultSolganTitle = data.name;
  2533. this.defaultSolganStatus = 'edit';
  2534. this.$nextTick(() => {
  2535. this.solganForm.setFieldsValue({[data.name]: data.slogan});
  2536. });
  2537. },
  2538. handleSloganSearchChange(e, field, formId) {
  2539. this.$nextTick(() => {
  2540. const dynamicWordPackIds = [];
  2541. let finallyLenList = this.handleJudgeExec(e.target.value);
  2542. let newOptionList = [];
  2543. finallyLenList.forEach(item => {
  2544. this.adNameTags.forEach(val => {
  2545. if (item === val.name) {
  2546. newOptionList.push(val);
  2547. }
  2548. });
  2549. });
  2550. let updateFinallyResult = newOptionList.map(val => val.name);
  2551. const inputDefaultLen = this.handleExportRules(e.target.value);
  2552. let tagsLen = updateFinallyResult.length * 2;
  2553. let tagsSureLen = 0;
  2554. let resultSelectSize = 0;
  2555. updateFinallyResult.forEach(item => {
  2556. this.adNameTags.forEach(val => {
  2557. if (item === val.name) {
  2558. tagsSureLen += val.maxWordLen;
  2559. dynamicWordPackIds.push(val.creativeWordId);
  2560. }
  2561. });
  2562. });
  2563. updateFinallyResult.forEach(item => {
  2564. tagsLen += item.length;
  2565. });
  2566. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2567. this.slogansDetail.forEach(item => {
  2568. if (item.id === formId) {
  2569. item.lenSize = resultSelectSize;
  2570. item.wordPackId = dynamicWordPackIds;
  2571. item.value = e.target.value;
  2572. }
  2573. });
  2574. });
  2575. },
  2576. handleFormInputChang(e, field, formId) {
  2577. const changeFiled = [];
  2578. this.defaultFormList.forEach(item => {
  2579. if (item.id === formId) {
  2580. item.value = e.target.value;
  2581. }
  2582. });
  2583. this.defaultFormList.forEach(item => {
  2584. if (item.value) {
  2585. changeFiled.push(item.value);
  2586. }
  2587. });
  2588. this.$nextTick(() => {
  2589. const dynamicWordPackIds = [];
  2590. let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
  2591. let newOptionList = [];
  2592. finallyLenList.forEach(item => {
  2593. this.adNameTags.forEach(val => {
  2594. if (item === val.name) {
  2595. newOptionList.push(val);
  2596. }
  2597. });
  2598. });
  2599. let updateFinallyResult = newOptionList.map(val => val.name);
  2600. const inputDefaultLen = this.handleExportRules(this.defaultFormList.filter(item => item.id === formId)[0].value);
  2601. let tagsLen = updateFinallyResult.length * 2;
  2602. let tagsSureLen = 0;
  2603. let resultSelectSize = 0;
  2604. updateFinallyResult.forEach(item => {
  2605. this.adNameTags.forEach(val => {
  2606. if (item === val.name) {
  2607. tagsSureLen += val.maxWordLen;
  2608. dynamicWordPackIds.push(val.creativeWordId);
  2609. }
  2610. });
  2611. });
  2612. updateFinallyResult.forEach(item => {
  2613. tagsLen += item.length;
  2614. });
  2615. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
  2616. this.defaultFormList.forEach(item => {
  2617. if (item.id === formId) {
  2618. item.lenSize = resultSelectSize;
  2619. item.wordPackId = dynamicWordPackIds;
  2620. }
  2621. });
  2622. this.titleFiledResult = changeFiled;
  2623. });
  2624. },
  2625. handleCheckBoxChang(data) {
  2626. this.applyTypeOption = data;
  2627. this.finallyCheckedResult = data;
  2628. },
  2629. handleSearchTitle() {
  2630. if (!this.keyWordRec) {
  2631. this.$message.error('请输入关键词进行搜索!');
  2632. return;
  2633. }
  2634. getAction('/ctop/creativeTitle/titleSearch', {
  2635. firstCategory: this.dataOne[0],
  2636. secondCategory: this.dataOne[1],
  2637. keywords: this.keyWordRec
  2638. }).then(res => {
  2639. this.titleResult = res.result ? res.result : [];
  2640. });
  2641. },
  2642. recomFilter(inputValue, path) {
  2643. return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
  2644. },
  2645. getHangye() {
  2646. getAction('/ctop/creativeTitle/getTitleLabel', '').then(res => {
  2647. if (res.success) {
  2648. this.recSearchOptions = res.result.map(item => {
  2649. return {
  2650. label: item.label,
  2651. value: item.value,
  2652. children:
  2653. item.children.length > 0
  2654. ? [{label: '不限', value: 0}].concat(item.children)
  2655. : [{label: '不限', value: 0}]
  2656. };
  2657. });
  2658. this.recSearchOptions = [{label: '不限', value: 0}].concat(this.recSearchOptions);
  2659. }
  2660. });
  2661. },
  2662. handleRecSelectChang(value, selectedOptions) {
  2663. this.dataOne = value;
  2664. this.keyWordRec = '';
  2665. },
  2666. handleRecommendSure() {
  2667. if (!this.applyTypeOption.length) {
  2668. this.$message.error('请选择标题');
  2669. return;
  2670. }
  2671. this.recommendVisible = false;
  2672. this.keyWordRec = '';
  2673. let formData = this.defaultFormList;
  2674. this.defaultFormList = formData.filter(item => item.value !== '');
  2675. this.applyTypeOption.forEach(item => {
  2676. const dateTime = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2677. const name = 'username' + dateTime;
  2678. this.defaultFormList.push({
  2679. id: dateTime,
  2680. name: name,
  2681. value: item,
  2682. tabStatus: 'alone',
  2683. defaultTagsList: this.adNameTags,
  2684. updateTagsList: this.adNameTags.slice(0, 4)
  2685. });
  2686. });
  2687. this.titleResult = [];
  2688. this.finallyCheckedResult = [];
  2689. setTimeout(() => {
  2690. this.applyTypeOption = [];
  2691. }, 200);
  2692. },
  2693. handleRecommendCancel() {
  2694. this.recommendVisible = false;
  2695. this.keyWordRec = '';
  2696. this.titleResult = [];
  2697. this.finallyCheckedResult = [];
  2698. },
  2699. handleSelectTitle() {
  2700. this.recommendVisible = true;
  2701. },
  2702. handleAddOrigin() {
  2703. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2704. this.defaultFormList.push({
  2705. id: randomNum,
  2706. name: 'username' + randomNum,
  2707. value: '',
  2708. lenSize: 0,
  2709. tabStatus: 'alone',
  2710. defaultTagsList: this.adNameTags,
  2711. updateTagsList: this.adNameTags.slice(0, 4)
  2712. });
  2713. },
  2714. handleDelOrigin(list) {
  2715. let formData = this.defaultFormList;
  2716. this.defaultFormList = formData.filter(item => list.id !== item.id);
  2717. },
  2718. handleExamin(data) {
  2719. this.defaultFormList = [];
  2720. getAction('/ctop/materialInfo/queryById', {
  2721. id: data.id
  2722. }).then(res => {
  2723. if (res.success) {
  2724. if (res.result.slogans.length) {
  2725. res.result.slogans.forEach(item => {
  2726. let finallyLenList = this.handleJudgeExec(item.slogan);
  2727. let newOptionList = [];
  2728. finallyLenList.forEach(item => {
  2729. this.adNameTags.forEach(val => {
  2730. if (item === val.name) {
  2731. newOptionList.push(val);
  2732. }
  2733. });
  2734. });
  2735. let resultSelectSize = 0;
  2736. if (newOptionList.length) {
  2737. const inputDefaultLen = this.handleExportRules(item.slogan);
  2738. let tagsLen = newOptionList.length * 2;
  2739. let tagsSureLen = 0;
  2740. newOptionList.forEach(item => {
  2741. this.adNameTags.forEach(val => {
  2742. if (item.name === val.name) {
  2743. tagsSureLen += val.maxWordLen;
  2744. }
  2745. });
  2746. });
  2747. finallyLenList.forEach(item => {
  2748. tagsLen += item.length;
  2749. });
  2750. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + newOptionList.length;
  2751. }
  2752. else {
  2753. resultSelectSize = item.slogan.length;
  2754. }
  2755. item.name = 'username' + item.id;
  2756. item.value = item.slogan;
  2757. item.lenSize = resultSelectSize;
  2758. item.tabStatus = 'alone';
  2759. item.defaultTagsList = this.adNameTags;
  2760. item.updateTagsList = this.adNameTags.slice(0, 4);
  2761. item.wordPackId = item.creativeWordIds && JSON.parse(item.creativeWordIds);
  2762. });
  2763. this.defaultFormList = res.result.slogans;
  2764. }
  2765. else {
  2766. for (let i = 0; i < 3; i++) {
  2767. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  2768. this.defaultFormList.push({
  2769. id: randomNum,
  2770. name: 'username' + randomNum,
  2771. value: '',
  2772. lenSize: 0,
  2773. tabStatus: 'alone',
  2774. defaultTagsList: this.adNameTags,
  2775. updateTagsList: this.adNameTags.slice(0, 4)
  2776. });
  2777. }
  2778. }
  2779. }
  2780. else {
  2781. this.showUrlWater = null;
  2782. this.name = null;
  2783. }
  2784. });
  2785. this.currentPageOnlyList = data;
  2786. this.causeVisible = true;
  2787. this.recommendVisible = false;
  2788. this.titleResult = [];
  2789. this.checkArr = [];
  2790. },
  2791. handleCauseCancel() {
  2792. this.causeVisible = false;
  2793. this.defaultFormList = [];
  2794. },
  2795. handleCauseSure() {
  2796. if (this.defaultFormList && this.defaultFormList.length < 3) {
  2797. this.$message.error('请至少输入3条标题');
  2798. return;
  2799. }
  2800. let changeSlogan = this.defaultFormList;
  2801. changeSlogan.forEach(item => {
  2802. item.title = item.value;
  2803. item.creative_word_ids = item.wordPackId;
  2804. });
  2805. let params = {
  2806. id: this.currentPageOnlyList.id,
  2807. auditorId: this.userInfo().id,
  2808. status: 1,
  2809. slogans: changeSlogan
  2810. };
  2811. this.examinForm.validateFields(err => {
  2812. if (!err) {
  2813. fileEditUpdate(params).then(res => {
  2814. if (res.code === 0) {
  2815. this.refuseReason = '';
  2816. this.causeVisible = false;
  2817. this.defaultFormList = [];
  2818. this.$message.success('审核成功');
  2819. this.loadData();
  2820. }
  2821. else {
  2822. this.$message.error(res.message);
  2823. }
  2824. });
  2825. }
  2826. });
  2827. },
  2828. changeTag(visible) {
  2829. if (this.videoVisibleChange !== visible) {
  2830. this.videoVisibleChange = visible;
  2831. this.videoTag = [];
  2832. getAction('/ctop/materialTagInfo/list', {code: visible}).then(res => {
  2833. this.videoTag = res.result.records.map(item => {
  2834. return item.tagName;
  2835. });
  2836. });
  2837. }
  2838. else {
  2839. return;
  2840. }
  2841. },
  2842. modalFormOkElse() {
  2843. this.getTagListAll();
  2844. },
  2845. handleOkTag(e) {
  2846. this.loadingTag = true;
  2847. let data = [
  2848. ...this.departValueInfoModality,
  2849. ...this.departValueInfoMod,
  2850. ...this.departValueInfoContent,
  2851. ...this.departValueInfoSence
  2852. ];
  2853. postAction('/ctop/materialTagInfo/mark', {
  2854. code: this.tagCode,
  2855. tagList: data
  2856. }).then(res => {
  2857. if (res.success) {
  2858. this.departValueInfoModality = [];
  2859. this.departValueInfoMod = [];
  2860. this.departValueInfoContent = [];
  2861. this.departValueInfoSence = [];
  2862. this.loadingTag = false;
  2863. this.tagInfoListVisible = false;
  2864. }
  2865. else {
  2866. this.loadingTag = false;
  2867. this.$message.error(res.message);
  2868. }
  2869. });
  2870. },
  2871. editTagList(item) {
  2872. this.tagInfoListVisible = true;
  2873. this.getTagListInfo(item.code);
  2874. this.tagCode = item.code;
  2875. },
  2876. getTagListAll() {
  2877. this.departTree = [];
  2878. this.departTreeModality = []; // 形式
  2879. this.departTreeContent = []; // 内容
  2880. this.departTreeSence = []; // 场景
  2881. this.departTreeMod = []; // 基调
  2882. this.getQueryTree(1, 'departTreeModality');
  2883. this.getQueryTree(2, 'departTreeMod');
  2884. this.getQueryTree(3, 'departTreeContent');
  2885. this.getQueryTree(4, 'departTreeSence');
  2886. },
  2887. getQueryTree(type, arr) {
  2888. getAction('/ctop/tagInfo/queryTreeList', {
  2889. categoryId: type
  2890. }).then(res => {
  2891. if (res.success) {
  2892. if (res.result) {
  2893. this[arr] = this.getTreeData(res.result);
  2894. }
  2895. }
  2896. });
  2897. },
  2898. getTreeData(data) {
  2899. for (let i = 0; i < data.length; i++) {
  2900. if (data[i].children) {
  2901. if (data[i].children.length < 1) {
  2902. // children若为空数组,则将children设为undefined
  2903. data[i].disabled = false;
  2904. }
  2905. else {
  2906. // children若不为空数组,则继续 递归调用 本方法
  2907. data[i].disabled = true;
  2908. this.getTreeData(data[i].children);
  2909. }
  2910. }
  2911. else {
  2912. data[i].disabled = false;
  2913. }
  2914. }
  2915. return data;
  2916. },
  2917. showBoHui(item) {
  2918. this.bohui = item;
  2919. this.bohuiShow = true;
  2920. },
  2921. editImage(item, status) {
  2922. let params = {};
  2923. params.id = item.id;
  2924. params.status = status;
  2925. params.auditorId = this.userInfo().id;
  2926. if (status === '1') {
  2927. }
  2928. else {
  2929. params.refuseReason = this.refuseReasonImage;
  2930. }
  2931. let updateArr = [params];
  2932. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  2933. if (res.success) {
  2934. getAction('/ctop/MaterialImageInfo/list', {
  2935. videoId: this.code
  2936. }).then(res => {
  2937. if (res.success) {
  2938. this.model = res.result.map((item, index) => {
  2939. return {
  2940. ...item,
  2941. key: index
  2942. };
  2943. });
  2944. this.modelNew = this.model.filter(item => {
  2945. return item.status === '0';
  2946. });
  2947. if (this.modelNew.length === 0) {
  2948. this.coverPreviewVisible = false;
  2949. }
  2950. }
  2951. });
  2952. this.loadData();
  2953. }
  2954. else {
  2955. this.$message.error(res.message);
  2956. }
  2957. });
  2958. },
  2959. editImageAll(status) {
  2960. this.checkArrImage;
  2961. let updateArr = [];
  2962. if (status === '1') {
  2963. updateArr = this.checkArrImage.map((item) => {
  2964. return {
  2965. id: item,
  2966. status: status
  2967. };
  2968. });
  2969. }
  2970. else {
  2971. updateArr = this.checkArrImage.map(item => {
  2972. return {
  2973. id: item,
  2974. status: status,
  2975. refuseReason: this.refuseReasonImage
  2976. };
  2977. });
  2978. }
  2979. putAction('/ctop/MaterialImageInfo/batchEdit', updateArr).then(res => {
  2980. if (res.success) {
  2981. getAction('/ctop/MaterialImageInfo/list', {
  2982. videoId: this.code
  2983. }).then(res => {
  2984. if (res.success) {
  2985. this.checkArrImage = [];
  2986. this.checkAllImage = false;
  2987. this.model = res.result.map((item, index) => {
  2988. return {
  2989. ...item,
  2990. key: index
  2991. };
  2992. });
  2993. }
  2994. });
  2995. this.loadData();
  2996. }
  2997. else {
  2998. this.$message.error(res.message);
  2999. }
  3000. });
  3001. },
  3002. showData(item) {
  3003. if (item.byteDance || item.kuaiShou) {
  3004. this.showDataBool = true;
  3005. this.kuaishouData = item.kuaiShou;
  3006. this.douyinData = item.byteDance;
  3007. }
  3008. else {
  3009. this.$message.error('抖音和快手都无数据');
  3010. return;
  3011. }
  3012. },
  3013. setSuccess() {
  3014. let params = {};
  3015. params.id = this.code;
  3016. params.excellent = this.excellent == 1 ? 0 : 1;
  3017. getAction('/ctop/materialInfo/excellent/set', params).then(res => {
  3018. if (res.success) {
  3019. this.excellent = this.excellent === 1 ? 0 : 1;
  3020. this.loadData(this.ipagination.current);
  3021. }
  3022. });
  3023. },
  3024. getData(className) {
  3025. return this.form.getFieldValue(className);
  3026. },
  3027. deleteData(id) {
  3028. deleteAction('/ctop/materialInfo/delete', {
  3029. id: id
  3030. }).then(res => {
  3031. if (res.success) {
  3032. this.$message.success('删除成功');
  3033. this.loadData();
  3034. } else {
  3035. this.$message.error(res.message);
  3036. }
  3037. });
  3038. },
  3039. filterOption(input, option) {
  3040. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  3041. },
  3042. moment,
  3043. tongbu(value) {
  3044. this.mediaId = value;
  3045. this.$refs.check.getData('/ctop/userAllocation/getAccountListByUserIdAndProductId', {
  3046. userId: this.userInfo().id,
  3047. productId: this.queryParam.productId,
  3048. mediaId: value
  3049. });
  3050. },
  3051. implement(data) {
  3052. let params = {};
  3053. params.mediaId = this.mediaId;
  3054. params.materialArray = JSON.stringify(this.checkArr);
  3055. params.accountArray = JSON.stringify(data);
  3056. postAction('/ctop/materialUpload/uploadAccount', params).then(res => {
  3057. if (res.code === 0) {
  3058. this.checkArr = [];
  3059. this.checkAll = false;
  3060. }
  3061. });
  3062. },
  3063. downloadByBlobShowUrl() {
  3064. fetch(this.showUrl)
  3065. .then(res => res.blob())
  3066. .then(blob => {
  3067. const a = document.createElement('a');
  3068. document.body.appendChild(a);
  3069. a.style.display = 'none';
  3070. // 使用获取到的blob对象创建的url
  3071. const url = window.URL.createObjectURL(blob);
  3072. a.href = url;
  3073. // 指定下载的文件名
  3074. a.download = this.materialName;
  3075. a.click();
  3076. document.body.removeChild(a);
  3077. // 移除blob对象的url
  3078. window.URL.revokeObjectURL(url);
  3079. });
  3080. },
  3081. downloadByBlob() {
  3082. fetch(this.showUrlWater)
  3083. .then(res => res.blob())
  3084. .then(blob => {
  3085. const a = document.createElement('a');
  3086. document.body.appendChild(a);
  3087. a.style.display = 'none';
  3088. // 使用获取到的blob对象创建的url
  3089. const url = window.URL.createObjectURL(blob);
  3090. a.href = url;
  3091. // 指定下载的文件名
  3092. a.download = this.name;
  3093. a.click();
  3094. document.body.removeChild(a);
  3095. // 移除blob对象的url
  3096. window.URL.revokeObjectURL(url);
  3097. });
  3098. },
  3099. download(href, name) {
  3100. let eleLink = document.createElement('a');
  3101. eleLink.download = name;
  3102. eleLink.href = href;
  3103. eleLink.click();
  3104. eleLink.remove();
  3105. },
  3106. onCheckAllChange() {
  3107. if (this.checkAll) {
  3108. this.checkArr = [];
  3109. }
  3110. else {
  3111. this.checkArr = this.dataSource.map(item => {
  3112. return item.id;
  3113. });
  3114. }
  3115. this.checkAll = !this.checkAll;
  3116. },
  3117. onCheckAllImageChange() {
  3118. if (this.checkAllImage) {
  3119. this.checkArrImage = [];
  3120. }
  3121. else {
  3122. this.checkArrImage = this.model.map(item => {
  3123. return item.id;
  3124. });
  3125. }
  3126. this.checkAllImage = !this.checkAllImage;
  3127. },
  3128. searchRe() {
  3129. this.queryParam = {
  3130. type: 'VIDEO',
  3131. userId: this.userInfo().id,
  3132. status: this.active,
  3133. productId: ''
  3134. };
  3135. this.$refs.selectTable.keyValue = '';
  3136. this.$refs.selectTable.getData();
  3137. this.$refs.selectTableProject.keyValue = '';
  3138. this.$refs.selectTableProject.getData();
  3139. this.labelValue = [];
  3140. this.loadData(1);
  3141. this.checkArr = [];
  3142. },
  3143. getList(value) {
  3144. this.loadData();
  3145. },
  3146. onChangeCheckImage(checkedList) {
  3147. if (checkedList.length === 0) {
  3148. this.checkAllImage = false;
  3149. }
  3150. },
  3151. onChangeCheck(checkedList, data) {
  3152. if (data.value === '0') {
  3153. this.showTabsTitle = '0';
  3154. }
  3155. if (checkedList.length === 0) {
  3156. this.checkAll = false;
  3157. }
  3158. },
  3159. handleClose(removedTag) {
  3160. const tags = this.tags.filter(tag => tag !== removedTag);
  3161. this.tags = tags;
  3162. },
  3163. showInput() {
  3164. this.inputVisible = true;
  3165. this.$nextTick(() => {
  3166. this.$refs.input.focus();
  3167. });
  3168. },
  3169. handleInputChange(e) {
  3170. this.inputValue = e.target.value;
  3171. },
  3172. handleInputConfirm() {
  3173. const inputValue = this.inputValue;
  3174. let tags = this.tags;
  3175. if (inputValue && tags.indexOf(inputValue) === -1) {
  3176. tags = [...tags, inputValue];
  3177. }
  3178. Object.assign(this, {
  3179. tags,
  3180. inputVisible: false,
  3181. inputValue: ''
  3182. });
  3183. },
  3184. getWater() {
  3185. this.waterLoading = true;
  3186. let params = qs.stringify({
  3187. id: this.id,
  3188. watermarkTemplateId: this.size
  3189. });
  3190. postAction('/ctop/materialInfo/watermark', params).then(res => {
  3191. if (res.success) {
  3192. this.$message.success('水印素材生成中');
  3193. this.visibleDetail = false;
  3194. this.refuseFile = [];
  3195. this.refuseReason = '';
  3196. closeAllVideoFun();
  3197. this.loadData();
  3198. this.waterLoading = false;
  3199. }
  3200. });
  3201. },
  3202. showDetail(item) {
  3203. this.visibleDetail = true;
  3204. this.showUrl = item.url;
  3205. this.id = item.id;
  3206. this.code = item.code;
  3207. this.excellent = item.excellent;
  3208. if (this.active === '2') {
  3209. this.refuseReason = item.refuseReason;
  3210. this.refuseFile = item.refuseFile ? JSON.parse(item.refuseFile) : null;
  3211. }
  3212. else if (this.active === '1') {
  3213. this.creativeCopywriter = item.creativeCopywriter;
  3214. this.refuseReason = '';
  3215. this.refuseFile = [];
  3216. }
  3217. else {
  3218. this.refuseReason = '';
  3219. this.refuseFile = [];
  3220. }
  3221. getAction('/ctop/materialInfo/getDetail', {
  3222. materialId: item.id
  3223. }).then(res => {
  3224. this.detail = res;
  3225. this.size
  3226. = res.parameter.width === '1080' ? 3 : res.parameter.width === '1920' ? 1 : res.parameter.width === '1280' ? 2 : 4;
  3227. });
  3228. getAction('/ctop/materialInfo/queryById', {
  3229. id: item.id
  3230. }).then(res => {
  3231. if (res.success) {
  3232. this.showUrlWater = res.result.watermarkUrl;
  3233. this.name = res.result.watermarkCode;
  3234. this.materialName = res.result.materialName;
  3235. res.result.slogans.forEach(item => {
  3236. let finallyLenList = this.handleJudgeExec(item.slogan);
  3237. let resultSelectSize = 0;
  3238. if (finallyLenList.length) {
  3239. const inputDefaultLen = this.handleExportRules(item.slogan);
  3240. let tagsLen = finallyLenList.length * 2;
  3241. let tagsSureLen = 0;
  3242. finallyLenList.forEach(item => {
  3243. this.adNameTags.forEach(val => {
  3244. if (item === val.name) {
  3245. tagsSureLen += val.maxWordLen;
  3246. }
  3247. });
  3248. });
  3249. finallyLenList.forEach(item => {
  3250. tagsLen += item.length;
  3251. });
  3252. resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
  3253. }
  3254. else {
  3255. resultSelectSize = this.handleExportRules(item.slogan);
  3256. }
  3257. item.name = 'username' + item.id;
  3258. item.value = item.slogan;
  3259. item.lenSize = resultSelectSize;
  3260. item.tabStatus = 'alone';
  3261. item.defaultTagsList = this.adNameTags;
  3262. item.updateTagsList = this.adNameTags.slice(0, 4);
  3263. });
  3264. this.slogansDetail = res.result.slogans;
  3265. }
  3266. else {
  3267. this.showUrlWater = null;
  3268. this.name = null;
  3269. }
  3270. });
  3271. getAction('/ctop/MaterialImageInfo/list', {
  3272. videoId: item.code
  3273. }).then(res => {
  3274. if (res.success) {
  3275. this.model = res.result.map((item, index) => {
  3276. return {
  3277. ...item,
  3278. key: index
  3279. };
  3280. });
  3281. }
  3282. });
  3283. this.getTagListInfo(item.code);
  3284. },
  3285. getTagListInfo(md5) {
  3286. this.departValueInfoModality = [];
  3287. this.departValueInfoMod = [];
  3288. this.departValueInfoContent = [];
  3289. this.departValueInfoSence = [];
  3290. getAction('/ctop/materialTagInfo/detail', {
  3291. code: md5
  3292. }).then(res => {
  3293. if (res.success) {
  3294. this.tagInfoList = [...res.modalityTagList, ...res.senceTagList, ...res.modTagList];
  3295. if (this.tagInfoListVisible) {
  3296. this.departValueInfoModality = res.modalityTagList.map(item => {
  3297. return item.tagId;
  3298. });
  3299. this.departValueInfoMod = res.modTagList.map(item => {
  3300. return item.tagId;
  3301. });
  3302. this.departValueInfoSence = res.senceTagList.map(item => {
  3303. return item.tagId;
  3304. });
  3305. }
  3306. }
  3307. });
  3308. },
  3309. coverPreviewShowModal(item, index) {
  3310. this.modelNew = this.model.filter(items => items.status === 0);
  3311. if (this.modelNew.length > 0) {
  3312. this.coverPreviewVisible = true;
  3313. }
  3314. },
  3315. okEditShow(item, editStatus) {
  3316. if (editStatus === '2') {
  3317. let params = {};
  3318. params.id = item.id;
  3319. params.auditorId = this.userInfo().id;
  3320. params.refuseReason = this.refuseReason;
  3321. let data = this.refuseFile.map(item => {
  3322. return 'https:' + item;
  3323. });
  3324. params.refuseFile = JSON.stringify(data);
  3325. params.status = editStatus;
  3326. fileEdit(params).then(res => {
  3327. this.refuseFile = [];
  3328. this.refuseReason = '';
  3329. this.loadData();
  3330. });
  3331. }
  3332. else if (editStatus === '1') {
  3333. let params = {};
  3334. params.id = item.id;
  3335. params.auditorId = this.userInfo().id;
  3336. params.creativeCopywriter = this.refuseReason;
  3337. params.status = editStatus;
  3338. fileEdit(params).then(res => {
  3339. this.refuseReason = '';
  3340. this.loadData();
  3341. });
  3342. }
  3343. },
  3344. okEdit(e) {
  3345. this.edit(null, this.active, '2');
  3346. },
  3347. personEdit(item, status) {
  3348. this.add = false;
  3349. this.personVisible = true;
  3350. this.getProjectId(item.projectId);
  3351. getAction('/ctop/materialInfo/getDetail', {
  3352. materialId: item.id
  3353. }).then(res => {
  3354. this.code = item.code;
  3355. if (res.ascription) {
  3356. this.formPerson.setFieldsValue({
  3357. clipId: res.ascription.clipId,
  3358. planId: res.ascription.planId,
  3359. shotId: res.ascription.shotId
  3360. });
  3361. }
  3362. });
  3363. },
  3364. edit(item, status, editStatus) {
  3365. if (status === '0' || status === '1') {
  3366. if (editStatus === '2') {
  3367. let params = {};
  3368. params.id = this.id;
  3369. params.auditorId = this.userInfo().id;
  3370. params.refuseReason = this.refuseReason;
  3371. let data = this.refuseFile.map(item => {
  3372. return 'https:' + item;
  3373. });
  3374. params.refuseFile = JSON.stringify(data);
  3375. params.status = editStatus;
  3376. fileEdit(params).then(res => {
  3377. this.refuseFile = [];
  3378. this.refuseReason = '';
  3379. this.loadData();
  3380. this.visibleDetail = false;
  3381. closeAllVideoFun();
  3382. });
  3383. }
  3384. else {
  3385. fileEdit({
  3386. id: this.id,
  3387. status: editStatus,
  3388. auditorId: this.userInfo().id,
  3389. creativeCopywriter: this.refuseReason
  3390. }).then(res => {
  3391. this.refuseFile = [];
  3392. this.refuseReason = '';
  3393. this.loadData();
  3394. this.visibleDetail = false;
  3395. closeAllVideoFun();
  3396. });
  3397. }
  3398. } else {
  3399. this.add = false;
  3400. this.visible = true;
  3401. this.getProjectId(item.projectId);
  3402. getAction('/ctop/materialInfo/getDetail', {
  3403. materialId: item.id
  3404. }).then(res => {
  3405. if (this.activeKey === 'image') {
  3406. this.form.setFieldsValue({
  3407. projectId: item.projectId,
  3408. clipId: res.ascription.clipId,
  3409. planeId: res.ascription.planeId,
  3410. materialDescribe: item.materialDescribe
  3411. });
  3412. }
  3413. else {
  3414. this.form.setFieldsValue({
  3415. projectId: item.projectId,
  3416. clipId: res.ascription.clipId,
  3417. planId: res.ascription.planId,
  3418. shotId: res.ascription.shotId,
  3419. materialDescribe: item.materialDescribe
  3420. });
  3421. }
  3422. this.tags = res.tag;
  3423. this.urlList.url = item.url;
  3424. this.urlList.md5 = item.code;
  3425. this.urlList.name = item.materialName;
  3426. this.watermarkUrl.url = item.watermarkUrl;
  3427. this.watermarkUrl.md5 = item.watermarkCode;
  3428. this.watermarkUrl.name = item.watermarkMaterialName;
  3429. this.id = item.id;
  3430. });
  3431. }
  3432. },
  3433. closePerson() {
  3434. this.personVisible = false;
  3435. },
  3436. handleOkPerson() {
  3437. this.loadingPerson = true;
  3438. this.formPerson.validateFieldsAndScroll((err, values) => {
  3439. if (err) {
  3440. // 这里做逻辑处理
  3441. } else {
  3442. let params = {
  3443. planId: values.planId,
  3444. shotId: values.shotId,
  3445. clipId: values.clipId,
  3446. materialId: this.code
  3447. }
  3448. fileEditAll(params).then(res => {
  3449. if (res.success) {
  3450. this.$message.success('修改成功');
  3451. this.loadingPerson = false;
  3452. this.closePerson();
  3453. this.loadData();
  3454. } else {
  3455. this.$message.error(res.message);
  3456. }
  3457. })
  3458. }
  3459. })
  3460. },
  3461. handleOkImage() {
  3462. let params = {};
  3463. params.projectId = this.addImageData.projectId;
  3464. params.videoId = this.addImageData.code;
  3465. params.imageArr = this.imageArrList;
  3466. this.loadingImage = true;
  3467. postAction('/insertImage', params).then(res => {
  3468. if (res.code === 0) {
  3469. this.urlListImage = {
  3470. url: [],
  3471. md5: [],
  3472. name: [],
  3473. size: []
  3474. };
  3475. this.imageArrList = [];
  3476. this.addImageVisible = false;
  3477. this.loadingImage = false;
  3478. this.loadData();
  3479. }
  3480. else {
  3481. this.loadingImage = false;
  3482. }
  3483. })
  3484. },
  3485. handleOk() {
  3486. this.form.validateFieldsAndScroll((err, values) => {
  3487. if (err) {
  3488. // 这里做逻辑处理
  3489. }
  3490. else {
  3491. this.loadingElse = true;
  3492. let params = {
  3493. ...values
  3494. };
  3495. let roleCode = {};
  3496. for (const key in this.role) {
  3497. if (key == 'roleCode') {
  3498. this.role[key] = this.role[key] + 'Id';
  3499. roleCode[this.role[key]] = this.userInfo().id;
  3500. }
  3501. }
  3502. params.id = this.add ? null : this.id;
  3503. params.code = this.urlList.md5;
  3504. params.url = this.urlList.url;
  3505. params.materialName = this.urlList.name;
  3506. params.watermarkCode = this.watermarkUrl.md5;
  3507. params.watermarkUrl = this.watermarkUrl.url;
  3508. params.watermarkMaterialName = this.watermarkUrl.name;
  3509. params.userId = this.userInfo().id;
  3510. params.projectId = values.projectId;
  3511. params.materialDescribe = values.materialDescribe;
  3512. params.type = 'VIDEO';
  3513. params.ascription =
  3514. this.activeKey == 'image'
  3515. ? roleCode
  3516. : {
  3517. planId: values.planId,
  3518. shotId: values.shotId,
  3519. clipId: values.clipId,
  3520. };
  3521. params.tag = this.tags;
  3522. params.imageArr = this.imageArrList;
  3523. if (this.add) {
  3524. fileInsertV2(params).then(res => {
  3525. if (res.success) {
  3526. this.form.resetFields();
  3527. this.urlList = {
  3528. url: '',
  3529. md5: '',
  3530. name: ''
  3531. };
  3532. this.watermarkUrl = {
  3533. url: '',
  3534. md5: '',
  3535. name: ''
  3536. };
  3537. this.urlListImage = {
  3538. url: [],
  3539. md5: [],
  3540. name: [],
  3541. size: []
  3542. };
  3543. this.imageArrList = [];
  3544. this.tags = [];
  3545. this.loadData();
  3546. this.visible = false;
  3547. this.add = true;
  3548. for (const key in this.role) {
  3549. if (key == 'roleCode') {
  3550. this.role[key] = this.role[key].substr(0, this.role[key].length - 2);
  3551. }
  3552. }
  3553. this.$message.success('素材上传成功');
  3554. this.loadingElse = false;
  3555. }
  3556. else {
  3557. this.$message.error(res.message);
  3558. this.loadingElse = false;
  3559. }
  3560. });
  3561. }
  3562. else {
  3563. fileEdit({
  3564. ...params,
  3565. status: '0'
  3566. }).then(res => {
  3567. if (res.success) {
  3568. this.form.resetFields();
  3569. this.urlList = {
  3570. url: '',
  3571. md5: '',
  3572. name: ''
  3573. };
  3574. this.watermarkUrl = {
  3575. url: '',
  3576. md5: '',
  3577. name: ''
  3578. };
  3579. this.tags = []
  3580. this.loadData()
  3581. this.visible = false
  3582. this.add = true
  3583. this.loading = false
  3584. this.loadingElse = false
  3585. for (const key in this.role) {
  3586. if (key === 'roleCode') {
  3587. this.role[key] = this.role[key].substr(0, this.role[key].length - 2);
  3588. }
  3589. }
  3590. }
  3591. else {
  3592. this.$message.error(res.message)
  3593. this.loading = false
  3594. this.loadingElse = false
  3595. }
  3596. });
  3597. }
  3598. }
  3599. });
  3600. },
  3601. close() {
  3602. this.visible = false;
  3603. this.dataElse = [];
  3604. this.form.resetFields();
  3605. this.urlList = {
  3606. url: '',
  3607. md5: '',
  3608. name: ''
  3609. };
  3610. this.tags = [];
  3611. this.urlListImage = {
  3612. url: [],
  3613. md5: [],
  3614. name: [],
  3615. size: []
  3616. };
  3617. this.imageArrList = [];
  3618. },
  3619. addImage(item) {
  3620. this.addImageVisible = true;
  3621. this.addImageData = item;
  3622. },
  3623. showImage(item) {
  3624. this.chouzhen = true;
  3625. this.chouzhenList = [];
  3626. let params = {
  3627. videoSignature: item.code,
  3628. pageSize: 20,
  3629. pageNo: 1
  3630. };
  3631. getAction('/cutFrame/material/list', params).then(res => {
  3632. if (res.success) {
  3633. this.chouzhenList.push(...res.result.records);
  3634. }
  3635. });
  3636. },
  3637. closeImage() {
  3638. this.addImageVisible = false;
  3639. this.urlListImage = {
  3640. url: [],
  3641. md5: [],
  3642. name: [],
  3643. size: [],
  3644. }
  3645. this.imageArrList = [];
  3646. },
  3647. callbackTwo(key) {
  3648. this.checkAll = false;
  3649. this.checkArr = [];
  3650. if (key === '3') {
  3651. this.url.list = '/ctop/materialInfo/effiMaterialInfo';
  3652. this.queryParam = {};
  3653. }
  3654. else {
  3655. this.url.list = '/ctop/materialInfo/listV2';
  3656. this.queryParam = {
  3657. type: 'VIDEO',
  3658. userId: this.userInfo().id,
  3659. status: key,
  3660. productId: this.queryParam.productId
  3661. }
  3662. if (this.labelValue.length >= 1) {
  3663. this.queryParam.tagCode = this.labelValue[this.labelValue.length - 1];
  3664. }
  3665. else {
  3666. this.queryParam.tagCode = '';
  3667. }
  3668. if (this.form.getFieldValue('productId')) {
  3669. this.form.setFieldsValue({
  3670. projectId: ''
  3671. });
  3672. }
  3673. }
  3674. this.loadData(1);
  3675. },
  3676. removeUpload() {
  3677. this.form.setFieldsValue({
  3678. modalityTagList: null,
  3679. modTagList: null,
  3680. senceTagList: null
  3681. });
  3682. },
  3683. overUpload(urlAll) {
  3684. this.confirmLoading = true;
  3685. this.repeat = false;
  3686. this.urlList.url = urlAll[0].url;
  3687. this.$message.success('上传成功');
  3688. getAction('/ctop/materialTagInfo/detail', {
  3689. code: this.urlList.md5
  3690. }).then(res => {
  3691. if (res.success) {
  3692. if (res.modalityTagList.length > 0) {
  3693. this.form.setFieldsValue({
  3694. modalityTagList: res.modalityTagList.map(item => {
  3695. return item.tagId;
  3696. }),
  3697. modTagList: res.modTagList.map(item => {
  3698. return item.tagId;
  3699. }),
  3700. senceTagList: res.senceTagList.map(item => {
  3701. return item.tagId;
  3702. })
  3703. });
  3704. }
  3705. }
  3706. });
  3707. },
  3708. deleteImage(url) {
  3709. let index = this.imageArrList.findIndex(v => v.url === url);
  3710. this.imageArrList.splice(index, 1);
  3711. },
  3712. overUploadImage(urlAll) {
  3713. let that = this;
  3714. that.material = [];
  3715. that.imageArrList = [];
  3716. let img;
  3717. if (urlAll.length > 0) {
  3718. for (let i = 0; i < urlAll.length; i++) {
  3719. that.imageArrList.push({
  3720. code: this.urlListImage.md5[i],
  3721. url: urlAll[i].url,
  3722. materialName: this.urlListImage.name[i]
  3723. })
  3724. img = new Image();
  3725. img.src = urlAll[i].url;
  3726. }
  3727. }
  3728. },
  3729. file(file) {
  3730. let bmf = new BMF();
  3731. let that = this;
  3732. return new Promise(function (resolve, reject) {
  3733. bmf.md5(file, (err, md5) => {
  3734. that.urlList.name = file.name;
  3735. that.urlList.md5 = md5;
  3736. fileCheck({
  3737. code: md5,
  3738. projectId: that.getData('projectId')
  3739. }).then((res) => {
  3740. if (res.code == 0) {
  3741. that.$message.error('此素材已经上传');
  3742. that.repeat = true;
  3743. reject()
  3744. }
  3745. else {
  3746. that.repeat = false
  3747. resolve()
  3748. }
  3749. });
  3750. });
  3751. });
  3752. },
  3753. fileWater(file) {
  3754. let bmf = new BMF();
  3755. let that = this;
  3756. this.urlListImage = {
  3757. url: [],
  3758. md5: [],
  3759. name: [],
  3760. size: []
  3761. };
  3762. return new Promise(function (resolve, reject) {
  3763. bmf.md5(file, (err, md5) => {
  3764. that.urlListImage.name.push(file.name);
  3765. that.urlListImage.md5.push(md5);
  3766. that.urlListImage.size.push(file.size);
  3767. resolve();
  3768. });
  3769. });
  3770. },
  3771. getParticipateList(value) {
  3772. getAction('/ctop/projectMember/participateListV2', {
  3773. userId: this.userInfo().id,
  3774. pageSize: 50,
  3775. pageNo: 1,
  3776. projectName: value,
  3777. }).then(res => {
  3778. if (res.code == 0) {
  3779. let defaultData = res.result.records;
  3780. this.dataElse = defaultData;
  3781. }
  3782. });
  3783. },
  3784. getProjectId(items) {
  3785. this.form.resetFields(['clipId', 'planId', 'shotId']);
  3786. getAction('/ctop/projectMember/getMemberList', {
  3787. projectId: items
  3788. }).then(res => {
  3789. if (res.code === 0) {
  3790. this.ascription.clipId = res.result.filter(item => {
  3791. if (
  3792. item.roleCode === 'clip'
  3793. || item.roleCode === 'plan'
  3794. || item.roleCode === 'designTeamLeader'
  3795. || item.roleCode === 'shot'
  3796. || item.roleCode === 'plane'
  3797. || item.roleCode === 'planeLeader'
  3798. ) {
  3799. return {
  3800. userId: item.userId,
  3801. userName: item.userName
  3802. };
  3803. }
  3804. });
  3805. this.ascription.shotId = res.result.filter(item => {
  3806. if (
  3807. item.roleCode === 'clip'
  3808. || item.roleCode === 'shot'
  3809. || item.roleCode === 'plan'
  3810. || item.roleCode === 'designTeamLeader'
  3811. || item.roleCode === 'plane'
  3812. || item.roleCode === 'planeLeader'
  3813. ) {
  3814. return {
  3815. userId: item.userId,
  3816. userName: item.userName
  3817. };
  3818. }
  3819. })
  3820. this.ascription.planId = res.result.filter(item => {
  3821. if (
  3822. item.roleCode === 'shot'
  3823. || item.roleCode === 'plan'
  3824. || item.roleCode === 'designTeamLeader'
  3825. || item.roleCode === 'clip'
  3826. || item.roleCode === 'plane'
  3827. || item.roleCode === 'planeLeader'
  3828. ) {
  3829. return {
  3830. userId: item.userId,
  3831. userName: item.userName
  3832. };
  3833. }
  3834. });
  3835. this.ascription.planeId = res.result.filter(item => {
  3836. if (item.roleCode === 'plane') {
  3837. return {
  3838. userId: item.userId,
  3839. userName: item.userName
  3840. };
  3841. }
  3842. });
  3843. }
  3844. });
  3845. },
  3846. getDataSource(page, pageSize) {
  3847. this.ipagination.current = page;
  3848. this.checkArr = [];
  3849. this.checkAll = false;
  3850. this.loadData();
  3851. }
  3852. }
  3853. };
  3854. </script>
  3855. <style lang="less" scoped>
  3856. @import "creative-copywrit";
  3857. </style>