index.blade.php 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585
  1. @extends('layouts.base')
  2. @section('title', '多媒体素材管理')
  3. @section('content')
  4. <!-- <script src="{{resource_get('resources/views/setting/media/js/jszip.js')}}"></script>
  5. <script src="{{resource_get('resources/views/setting/media/js/jquery.min.js')}}"></script>
  6. <script src="{{resource_get('resources/views/setting/media/js/FileSaver.min.js')}}"></script> -->
  7. <style>
  8. .panel {
  9. margin-bottom: 10px !important;
  10. border-radius: 10px;
  11. padding-left: 20px;
  12. }
  13. .panel .active a {
  14. background-color: #29ba9c !important;
  15. border-radius: 18px !important;
  16. color: #fff;
  17. }
  18. .clearfix::after {
  19. content: '';
  20. display: block;
  21. clear: both;
  22. }
  23. .panel a {
  24. border: none !important;
  25. background-color: #fff !important;
  26. }
  27. .content {
  28. background: #eff3f6;
  29. padding: 10px !important;
  30. }
  31. .multimedia-con {
  32. padding-bottom: 20px;
  33. position: relative;
  34. border-radius: 8px;
  35. min-height: 100vh;
  36. background: #fff;
  37. }
  38. .multimedia-con .setting .block {
  39. /* padding: 10px; */
  40. padding: 10px 10px 10px 20px;
  41. background-color: #fff;
  42. border-radius: 8px;
  43. }
  44. .multimedia-con .setting .block .title {
  45. font-size: 18px;
  46. margin-bottom: 15px;
  47. display: flex;
  48. align-items: center;
  49. justify-content: space-between;
  50. }
  51. .add {
  52. width: 154px;
  53. height: 36px;
  54. border-radius: 4px;
  55. border: solid 1px #29ba9c;
  56. color: #29ba9c;
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. }
  61. .el-table--fit {
  62. margin-top: -10px;
  63. }
  64. b {
  65. font-size: 14px;
  66. }
  67. .vue-crumbs a {
  68. color: #333;
  69. }
  70. .vue-crumbs a:hover {
  71. color: #29ba9c;
  72. }
  73. .vue-crumbs {
  74. margin: 0 20px;
  75. font-size: 14px;
  76. color: #333;
  77. font-weight: 400;
  78. padding-bottom: 10px;
  79. line-height: 32px;
  80. }
  81. .el-table--border::after,
  82. .el-table--group::after,
  83. .el-table::before {
  84. background-color: #fff;
  85. }
  86. #multimedia-material .el-button--danger {
  87. margin-left: 20px;
  88. background-color: #EE3939;
  89. font-size: 14px;
  90. line-height: 10px;
  91. border-radius: 10px;
  92. }
  93. .fr {
  94. float: right;
  95. }
  96. /* .fl {
  97. float: left;
  98. } */
  99. .right-icon {
  100. /* position: absolute; */
  101. }
  102. .add-icon {
  103. cursor: pointer;
  104. }
  105. .set-icon {
  106. cursor: pointer;
  107. }
  108. .right-icon span {
  109. margin-right: 10px;
  110. font-size: 14px;
  111. }
  112. .right-icon i {
  113. padding-right: 5px;
  114. font-size: 16px;
  115. vertical-align: middle;
  116. }
  117. .grouping {
  118. margin: 15px 0;
  119. }
  120. .grouping b {
  121. display: inline-block;
  122. padding-top: 5px;
  123. }
  124. .grouping ul {
  125. overflow: hidden;
  126. height: 40px;
  127. }
  128. .gro-box {
  129. margin-left: 30px;
  130. min-width: 800px;
  131. height: 40px;
  132. overflow: hidden;
  133. }
  134. .gro-item {
  135. margin-right: 15px;
  136. margin-bottom: 15px;
  137. cursor: pointer;
  138. }
  139. .gro-item span {
  140. display: inline-block;
  141. padding: 3px 8px;
  142. color: #666;
  143. border-radius: 10px;
  144. border: 1px solid #c8cede;
  145. }
  146. .gro-item .gro-activity {
  147. color: #fff;
  148. background-color: #54c8b0;
  149. }
  150. .gro-pull-down {
  151. display: inline-block;
  152. width: 25px;
  153. height: 25px;
  154. line-height: 25px;
  155. text-align: center;
  156. font-size: 20px;
  157. border-radius: 3px;
  158. border: 1px solid #c8cede;
  159. cursor: pointer;
  160. }
  161. .gro-left-title {
  162. font-size: 14px;
  163. font-weight: 700;
  164. color: #3C4858;
  165. padding-top: 5px
  166. }
  167. /* .bg-purple-light {
  168. margin-left:50px;
  169. min-width:800px;
  170. } */
  171. /* .bg-purple-light ul {
  172. max-width:1600px;
  173. width:auto;
  174. } */
  175. #multimedia-material .has-gutter th {
  176. width: 500px;
  177. font-size: 14px;
  178. }
  179. #multimedia-material /deep/.el-table th>.cell {
  180. /* text-align: center; */
  181. }
  182. #multimedia-material /deep/.el-table .cell {
  183. text-align: center;
  184. color: #666;
  185. font-size: 14px;
  186. }
  187. #multimedia-material /deep/.el-table th:hover {
  188. background-color: #fff;
  189. }
  190. #multimedia-material .el-table__row:hover>td {
  191. background-color: #ffffff !important;
  192. }
  193. #multimedia-material .el-table__row--striped:hover>td {
  194. background-color: #fafafa !important;
  195. }
  196. #multimedia-material .right-icon .el-input {
  197. display: block;
  198. margin: 15px 0;
  199. }
  200. #multimedia-material .gro-inp {
  201. margin-bottom: 15px;
  202. }
  203. .video {
  204. position: relative;
  205. /* margin-left: 60px; */
  206. width: 190px;
  207. height: 110px;
  208. }
  209. .map3 {
  210. width: 50px;
  211. height: 50px;
  212. }
  213. .map3 img{
  214. width:50px;
  215. height:50px;
  216. }
  217. .video video {
  218. width: 190px;
  219. height: 110px;
  220. /* vertical-align: bottom; */
  221. object-fit: cover;
  222. }
  223. .video-title {
  224. margin-left: 15px;
  225. width: 130px;
  226. text-align: left;
  227. overflow: hidden;
  228. text-overflow: ellipsis;
  229. white-space: nowrap
  230. }
  231. #multimedia-material .cell {
  232. /* display: flex; */
  233. flex-direction: row;
  234. justify-content: center;
  235. align-items: center;
  236. }
  237. #multimedia-material .right-icon .el-input {
  238. margin-bottom: 15px !important;
  239. }
  240. .el-popover .el-button--success {
  241. background: #29b69a;
  242. margin-left: 35px;
  243. }
  244. .el-popover .el-button--info {
  245. margin-right: 35px;
  246. }
  247. .el-table__row .el-icon-edit {
  248. padding-left: 15px;
  249. font-size: 16px;
  250. /* vertical-align: middle; */
  251. }
  252. .el-table__row .el-icon-delete {
  253. font-size: 16px;
  254. }
  255. .img-box {
  256. padding: 15px;
  257. width: 100%;
  258. }
  259. .img-box .img-item {
  260. position: relative;
  261. margin: 20px 15px 15px 0;
  262. width: 150px;
  263. height: 200px;
  264. cursor: pointer;
  265. }
  266. .img-box .img-item .el-input {
  267. margin-top: 10px;
  268. }
  269. .img-box .img-item img {
  270. /* padding-top: 30px; */
  271. width: 100%;
  272. height: 150px;
  273. }
  274. .img-box .img-item .goods-name {
  275. width: 100%;
  276. padding: 15px 10px;
  277. font-size: 14px;
  278. overflow: hidden;
  279. color: #333;
  280. text-overflow: ellipsis;
  281. white-space: nowrap;
  282. text-align:center;
  283. }
  284. .img-box .img-item .mark {
  285. position: absolute;
  286. display: none;
  287. padding: 8px;
  288. left: 0;
  289. top: 0px;
  290. width: 100%;
  291. height: 150px;
  292. background: rgba(41, 186, 156, 0.3);
  293. }
  294. .img-box .img-item:hover .mark {
  295. display: block;
  296. }
  297. .full-screen {
  298. display: inline-block;
  299. margin-left: 60px;
  300. padding: 2px;
  301. background: #fff;
  302. border-radius: 50%;
  303. font-size: 16px;
  304. color: #666;
  305. cursor: pointer;
  306. }
  307. .mark .el-icon-more {
  308. margin-left: 10px;
  309. padding: 3px;
  310. display: inline-block;
  311. border-radius: 50%;
  312. font-size: 16px;
  313. color: #666;
  314. background: #fff;
  315. cursor: pointer;
  316. }
  317. .mark .el-popover {
  318. width: 100px !important;
  319. }
  320. .mark .el-checkbox__input {
  321. /* position: absolute;
  322. top: 5px; */
  323. }
  324. .mark .el-checkbox__input .el-checkbox__inner {}
  325. .mark .el-checkbox__input .el-checkbox__inner .el-checkbox__original {}
  326. .more-operation {
  327. display: inline-block;
  328. width: 100%;
  329. margin-bottom: 6px;
  330. }
  331. .more-operation:hover {
  332. cursor: pointer;
  333. color: #000;
  334. }
  335. .img-item .operations {
  336. position: absolute;
  337. padding-top: 8px;
  338. display: none;
  339. top: 35px;
  340. right: 13px;
  341. width: 65px;
  342. height: 90px;
  343. background: #fff;
  344. text-align: center;
  345. border-radius: 5px;
  346. }
  347. .img-item .operations::before {
  348. position: absolute;
  349. top: -6px;
  350. right: 0;
  351. content: '';
  352. border-right: 8px solid transparent;
  353. border-left: 8px solid transparent;
  354. border-bottom: 8px solid #fff;
  355. }
  356. .operation-win {
  357. position: absolute;
  358. top: 40px;
  359. right: 0;
  360. width: 80px;
  361. height: 100px;
  362. background: #fff;
  363. border-radius: 5px;
  364. }
  365. #multimedia-material .el-popover {
  366. width: 50px !important;
  367. }
  368. .gro-del {
  369. width: 100%;
  370. margin-bottom: 30px;
  371. }
  372. .del-item,
  373. .sel-item {
  374. width: 80%;
  375. }
  376. .dialog-footer-del .el-button {
  377. float: right;
  378. width: 100px;
  379. }
  380. .dialog-footer-del .el-button--default {
  381. margin-right: 20px;
  382. }
  383. .gro-sure,
  384. .gro-cancel {
  385. width: 80px;
  386. height: 40px;
  387. }
  388. .gro-sure {
  389. margin-left: 30px !important;
  390. }
  391. .gro-cancel {
  392. margin-left: 50px !important;
  393. }
  394. .system {
  395. color: #000;
  396. }
  397. .system,
  398. .custom {
  399. height: 40px;
  400. line-height: 40px;
  401. border-bottom: 1px solid #c8cede;
  402. }
  403. .custom i {
  404. padding-left: 10px;
  405. cursor: pointer;
  406. }
  407. .custom .el-input {
  408. width: 150px;
  409. float: left;
  410. }
  411. .select {
  412. padding: 0 15px;
  413. height: 40px;
  414. line-height: 40px;
  415. }
  416. .already-sel {
  417. padding: 0 10px;
  418. }
  419. .cancel-sel {
  420. color: #95a0b8;
  421. cursor: pointer;
  422. }
  423. .switch-hover {
  424. margin-left: 10px;
  425. display: inline-block;
  426. transform: rotate(90deg);
  427. }
  428. .switch-hover:hover,
  429. .sel-del:hover {
  430. cursor: pointer;
  431. }
  432. .sel-del .switch-hover {
  433. font-size: 20px;
  434. }
  435. .video-audio {
  436. margin-top: 10px;
  437. }
  438. .rename-inp {
  439. width: 100px;
  440. }
  441. .move-gro {
  442. margin: 20px 0;
  443. }
  444. .move-gro span {
  445. margin: 5px 15px 5px 0;
  446. display: inline-block;
  447. padding: 3px;
  448. color: #666;
  449. border-radius: 10px;
  450. border: 1px solid #c8cede;
  451. cursor: pointer;
  452. }
  453. .move-type {
  454. margin: 15px 0;
  455. }
  456. .move-type span {
  457. margin-right: 10px;
  458. display: inline-block;
  459. padding: 3px 5px;
  460. color: #54c8b0;
  461. border: 1px solid #54c8b0;
  462. border-radius: 10px;
  463. }
  464. .sty-gro {
  465. color: #333;
  466. font-weight: 500;
  467. }
  468. .select-win {
  469. position: absolute;
  470. top: 0;
  471. left: 0;
  472. width: 100%;
  473. background: pink;
  474. }
  475. .dP {
  476. display: block !important;
  477. }
  478. .dn {
  479. display: none !important;
  480. }
  481. .el-popover {
  482. min-width: 70px
  483. }
  484. .more-operation {
  485. }
  486. .more-operation p {
  487. cursor: pointer;
  488. }
  489. .moveActivity {
  490. color: #fff!important;
  491. background-color: #54c8b0;
  492. }
  493. .gro-del .el-checkbox {
  494. margin-right: 0;
  495. width: 120px;
  496. }
  497. .gro-width {
  498. width: 125px;
  499. text-align:center
  500. }
  501. .move-width {
  502. width: 110px;
  503. text-align: center;
  504. }
  505. .video-time {
  506. position:absolute;
  507. padding-right:8px;
  508. bottom:10px;
  509. left:10px;
  510. color:#fff;
  511. width:50px;
  512. height:20px;
  513. font-size:12px;
  514. line-height:20px;
  515. border-radius:5px;
  516. text-align:right;
  517. background:rgba(0,0,0,0.5)
  518. }
  519. .play-triangle {
  520. /* vertical-align: middle; */
  521. position:absolute;
  522. top:3px;
  523. left:6px;
  524. /* padding-left:5px; */
  525. height:0;
  526. width:0;
  527. overflow: hidden; /* 这里设置overflow, font-size, line-height */
  528. font-size: 0; /*是因为, 虽然宽高度为0, 但在IE6下会具有默认的 */
  529. line-height: 0; /* 字体大小和行高, 导致盒子呈现被撑开的长矩形 */
  530. border-color:transparent transparent transparent #fff;
  531. border-style:solid;
  532. border-width:7px;
  533. }
  534. #multimedia-material .el-col-24 {
  535. padding-right:0 !important;
  536. }
  537. .header {
  538. /* padding:3px;
  539. background:red */
  540. }
  541. .main-panel .header {
  542. margin-bottom:0;
  543. }
  544. [v-cloak] {
  545. display: none;
  546. }
  547. .indicate{
  548. cursor:pointer
  549. }
  550. /* 上传组件 样式 */
  551. .titleWire::before{
  552. content: '';
  553. width: 6px;
  554. height: 16px;
  555. display: inline-block;
  556. background-color: #29BA9C;
  557. vertical-align: middle;
  558. }
  559. .textInterval{
  560. margin-left: 6px;
  561. }
  562. .upload-img input{
  563. display: none;
  564. }
  565. .upload-img .el-upload-list {
  566. display:none
  567. }
  568. .content-box{
  569. height: 400px;
  570. display: flex;
  571. /* justify-content: space-between; */
  572. }
  573. .content-box-left{
  574. /* width: 330px; */
  575. width: 120px;
  576. /* background-color: brown; */
  577. height: 380px;
  578. border-right: 1px solid #ccc;
  579. }
  580. body .el-scrollbar__wrap {
  581. overflow-x: hidden;
  582. }
  583. .content-box-left p {
  584. color: #101010;
  585. }
  586. .conten-box-right{
  587. margin-left: 10px;
  588. width: 100%;
  589. height: 400px;
  590. /* background-color: red; */
  591. }
  592. /* 上传图片 样式 */
  593. .conten-box-right-img{
  594. /* padding-right: 10px;
  595. padding-right: 10px; */
  596. display: flex;
  597. flex-wrap: wrap;
  598. margin: 10px;
  599. width: 7.3vw;
  600. height: 7.3vw;
  601. }
  602. li{
  603. list-style: none;
  604. }
  605. /* .fl{
  606. float: left;
  607. } */
  608. .conten-box-right-img img{
  609. width: 100%;
  610. height: 100%;
  611. object-fit: contain;
  612. /* margin-right: 5px;
  613. margin-bottom: 5px; */
  614. }
  615. /* 上传视频 音频 */
  616. .conten-box-right-video{
  617. overflow: hidden;
  618. }
  619. .video-top{
  620. margin-bottom: 20px;
  621. }
  622. .video-top-init{
  623. margin: 0 auto;
  624. margin-top: 50px;
  625. width: 260px;
  626. height: 150px;
  627. border-radius: 10px;
  628. text-align: center;
  629. border: 1px dashed rgba(187, 187, 187, 100);
  630. }
  631. .video-top-init-text{
  632. margin-top: 55px;
  633. }
  634. .video-top-init video{
  635. width: 100%;
  636. height: 100%;
  637. }
  638. .video-top-init input{
  639. display: none;
  640. }
  641. /* .video-bottom{
  642. margin: 0 auto;
  643. } */
  644. .video-bottom-init{
  645. margin: 0 auto;
  646. margin-top: 30px;
  647. text-align: center;
  648. width: 260px;
  649. height: 150px;
  650. }
  651. /* 上传成功 样式 */
  652. .top-win-text{
  653. font-size: 68px;
  654. margin-bottom: 20px;
  655. }
  656. .video-top-win{
  657. margin: 0 auto;
  658. margin-top: 30px;
  659. text-align: center;
  660. }
  661. .top-win-copy{
  662. margin-top: 45px;
  663. }
  664. .video-bottom-win{
  665. /* margin: 0 auto; */
  666. text-align: center;
  667. margin-top: 40px;
  668. }
  669. /* 上传 打开 按钮 颜色 */
  670. .uploadi-text{
  671. width: 86px;
  672. height: 27px;
  673. line-height: 27px;
  674. border-radius: 8px;
  675. color: rgba(16, 16, 16, 100);
  676. font-size: 12px;
  677. text-align: center;
  678. border: 1px solid rgba(187, 187, 187, 100);
  679. margin-left: 6px;
  680. cursor: pointer;
  681. }
  682. .uploadi-text span{
  683. color: #101010;
  684. }
  685. .groupings{
  686. color: #fff !important;
  687. background-color: #29BA9C;
  688. cursor: pointer;
  689. }
  690. .video-top-init .el-upload-list{
  691. display: none;
  692. }
  693. .head-dialog{
  694. display: flex;
  695. justify-content: space-between;
  696. }
  697. .divider .el-divider--horizontal{
  698. margin-bottom: 0px;
  699. }
  700. .content-box-left-text:first-child{
  701. display: none;
  702. }
  703. .video-top-audioName{
  704. margin-top: 65px;
  705. display: block;
  706. overflow: hidden;/*超出部分隐藏*/
  707. white-space: nowrap;/*不换行*/
  708. text-overflow:ellipsis;/*超出部分文字以...显示*/
  709. }
  710. </style>
  711. <div id='multimedia-material' v-cloak v-if="loadingData">
  712. <div class="panel panel-info">
  713. <ul class="add-shopnav">
  714. <li @click="tabClick(1)" :class="defaultIndex == 1?'active':''"><a href="javascript:void(0)">
  715. 图片
  716. </a></li>
  717. <li @click="tabClick(3)" :class="defaultIndex == 3?'active':''"><a href="javascript:void(0)">
  718. 视频
  719. </a></li>
  720. <li @click="tabClick(2)" :class="defaultIndex == 2?'active':''"><a href="javascript:void(0)">
  721. 音频
  722. </a></li>
  723. </ul>
  724. </div>
  725. <div class="multimedia-con" >
  726. <div class="setting">
  727. <div class="block">
  728. <div class="title">
  729. <div style="display:flex;align-items:center;">
  730. <b v-if="defaultIndex == 1">图片&nbsp;共([[resourceTotal]])</b>
  731. <b v-if="defaultIndex == 3">视频&nbsp;共([[resourceTotal]])</b>
  732. <b v-if="defaultIndex == 2">音频&nbsp;共([[resourceTotal]])</b>
  733. <el-button type="danger" round @click="detelDialogVisible = true" style="background:#f37474;border:none">批量删除素材</el-button>
  734. <div class="uploadi-text" v-if="defaultIndex == 1" @click="openDialog('1')">
  735. <span>上传图片</span>
  736. </div>
  737. <div class="uploadi-text" v-if="defaultIndex == 3" @click="openDialog('3')">
  738. <span>上传视频</span>
  739. </div>
  740. <div class="uploadi-text" v-if="defaultIndex == 2" @click="openDialog('2')">
  741. <span>上传音频</span>
  742. </div>
  743. </div>
  744. <!-- 批量删除素材弹窗 -->
  745. <el-dialog title="选择你要删除的素材范围" :center="true" width="35%" :visible.sync="detelDialogVisible" width="30%" :before-close="handleClose" >
  746. <div class="gro-del clearfix">
  747. <span class="fl">按分组删除:</span>
  748. <div class="del-item fr">
  749. <el-checkbox-group v-model="checkList" @change="moreSelectGro($event)">
  750. <el-checkbox v-for="(item,index) in groupList" :label="item.id" >[[item.title]]</el-checkbox>
  751. </el-checkbox-group>
  752. </div>
  753. </div>
  754. <div class="scope-sel clearfix">
  755. <span class="fl">选择时间范围:</span>
  756. <div class="sel-item fr">
  757. <el-radio-group v-model="radioList" @change="rangeChange($event)">
  758. <el-radio label="all">全部删除</el-radio>
  759. <el-radio label="month">一个月前</el-radio>
  760. <el-radio label="three_month">三个月前</el-radio>
  761. <el-radio label="half_year">半年前</el-radio>
  762. <el-radio label="year">一年前</el-radio>
  763. </el-radio-group>
  764. </div>
  765. </div>
  766. <span slot="footer" class="dialog-footer-del clearfix">
  767. <el-button type="primary" @click="startDetel()">开始删除</el-button>
  768. <el-button @click="detelDialogVisible = false">取 消</el-button>
  769. </span>
  770. </el-dialog>
  771. <div class="right-icon">
  772. <!-- <span v-if="defaultIndex == 1" class="indicate" @click="openUpload('slide_pic','1')">上传图片</span>
  773. <span v-if="defaultIndex == 3" class="indicate" @click="openUpload('slide_pic','3')">上传视频</span>
  774. <span v-if="defaultIndex == 2" class="indicate" @click="openUpload('slide_pic','2')">上传音频</span> -->
  775. <el-popover placement="bottom" width="300" trigger="click">
  776. <span slot="reference" class="add-icon">
  777. <i class="el-icon-circle-plus-outline "></i>新建
  778. </span>
  779. <p class="gro-inp">请输入分组名称</p>
  780. <el-input v-model="newGroupName" placeholder="" style="margin-bottom:15px" maxlength="6"show-word-limit></el-input>
  781. <el-button type="primary" class="gro-sure" @click="handAddGroup()">确定</el-button>
  782. <el-button class="gro-cancel" @click="handCancelGroup()">取消</el-button>
  783. </el-popover>
  784. <span class="set-icon" @click="adminClick()">
  785. <i class="el-icon-setting"></i>管理
  786. </span>
  787. </div>
  788. <!-- 管理弹窗 -->
  789. <el-dialog title="管理分组" :visible.sync="adminDialogVisible" width="30%" :before-close="handleClose" >
  790. <!-- 暂时注释 -->
  791. <!-- <span class="drag">拖拽分组进行排序</span> -->
  792. <draggable v-model="groupList" :disabled="disabled" chosen-class="chosen" handle=".header" force-fallback="true" group="people" animation="1000" @start="onStart" @end="onEnd" :move="onMove">
  793. <transition-group>
  794. <div class="custom" v-for="(item,index) in groupList" :key="index">
  795. <span class="fl" v-if="groId != item.id" :class="item.tag_type == 1?'sty-gro':''">[[item.title]]</span>
  796. <el-input class = "edit-inp" v-model ="adminRnameGroup" v-if="groId == item.id" @change="changeGroupName($event)" @input = "inpName($event)" @blur="inputBlur()" ref="input" ></el-input>
  797. <el-button type="success" v-if="groId == item.id" style="background: #29BA9C;" @click="sureName(item.id)">确定</el-button>
  798. <span class="fr" v-if="item.tag_type == 1" :class="item.tag_type == 1?'sty-gro':''">系统分组</span>
  799. <div class="fr" v-if="item.tag_type == 2">
  800. <i class="el-icon-edit" @click.stop.prevent="EditGroup(item.id,item.title)"></i>
  801. <el-popover
  802. placement="bottom"
  803. width="300"
  804. trigger="click"
  805. >
  806. <i class="el-icon-delete" slot="reference" @click.stop.prevent="getGroId(item.id)"></i>
  807. <p style="margin: 10px 0;">
  808. <el-radio v-model="radio" @change = "slectRadio($event)" label="1">删除分组,组内所有<span v-if="defaultIndex == 1">图片</span><span v-if="defaultIndex == 2">音频</span><span v-if="defaultIndex == 3">视频</span>移到未分组</el-radio>
  809. </p>
  810. <p style="margin: 10px 0 20px 0;">
  811. <el-radio v-model="radio" @change = "slectRadio($event)" label="2">删除分组,同时删除组内所有<span v-if="defaultIndex == 1">图片</span><span v-if="defaultIndex == 2">音频</span><span v-if="defaultIndex == 3">视频</span></el-radio>
  812. </p>
  813. <el-button type="primary" class="gro-sure" @click="ManageSureDetel()">确定</el-button>
  814. <el-button @click="cancel(item.id)">取消</el-button>
  815. </el-popover>
  816. <!-- 暂时注释掉 -->
  817. <!-- <i class="el-icon-s-fold header"></i> -->
  818. </div>
  819. </div>
  820. </transition-group>
  821. </draggable>
  822. <span slot="footer" class="dialog-footer">
  823. <el-button type="primary" @click="adminDialogVisible = false">确 定</el-button>
  824. <el-button @click="cancel()">取 消</el-button>
  825. </span>
  826. </el-dialog>
  827. </div>
  828. <div class="grouping clearfix">
  829. <el-row>
  830. <el-col :span="1">
  831. <div class="grid-content bg-purple gro-left-title ">分组</div>
  832. </el-col>
  833. <el-col :span="22">
  834. <div class="grid-content bg-purple-light">
  835. <ul class="clearfix">
  836. <li class="gro-item fl" v-for="(item,index) in groupList"><span @click="groupingClick(item.id,item.title)" :class="(groupId == item.id && gname == item.title)?'gro-activity':''">[[item.title]]([[(item.source_count)]])</span></li>
  837. </ul>
  838. </div>
  839. </el-col>
  840. <el-col :span="1">
  841. <div class="grid-content bg-purple fr" style="margin-right: 10px;"><i class="el-icon-arrow-down gro-pull-down" @click="pullDownClick()"></i></div>
  842. </el-col>
  843. </el-row>
  844. <el-row>
  845. <el-col :span="2">
  846. <div class="grid-content bg-purple gro-left-title ">日期筛选:</div>
  847. </el-col>
  848. <el-col :span="4">
  849. <el-date-picker
  850. size="mini"
  851. v-model="filterTime"
  852. type="month"
  853. placeholder="选择时间"
  854. @change="getResourList(defaultIndex,groupId,defaultIndex==1?15:videoAudioSize,1)"
  855. >
  856. </el-date-picker>
  857. </el-col>
  858. </el-row>
  859. </div>
  860. <!-- 分组下拉弹窗 -->
  861. <el-dialog title="所有分组" :visible.sync="groDialogVisible" width="40%" :before-close="handleClose">
  862. <ul class="clearfix">
  863. <li class="gro-item fl" v-for="(item,index) in groupList">
  864. <span @click="groupingClick(item.id,item.title)" :class="(groupId == item.id && gname == item.title)?'gro-activity':''">[[item.title]]([[(item.source_count)]])</span></li>
  865. </ul>
  866. </el-dialog>
  867. </div>
  868. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  869. <!-- 全选按钮 -->
  870. <div class="select" v-if="defaultIndex == 1 && idArr.length != 0">
  871. <el-checkbox label="全选" v-model.number="is_all_choose" @change="allChoose($event)"></el-checkbox>
  872. <span class="already-sel">已选择[[idArr.length]]项内容</span>
  873. <span class="cancel-sel" @click = "cancelSelect()">取消选择</span>
  874. <span class="fr">
  875. <span style="display: none;">
  876. <i class="el-icon-download" style="margin-right: 10px; cursor: pointer;" id="packageImages"></i>
  877. </span>
  878. <el-popover placement="bottom" title="" width="200" trigger="click" >
  879. <p style="margin:15px 0;">确定要删除选中的素材吗</p>
  880. <el-button type="primary" style="height: 30px; line-height:5px" @click="sureSelectDetel()">确定</el-button>
  881. <el-button style="height: 30px; line-height:5px" @click="cancel()" >取消</el-button>
  882. <i class="el-icon-delete sel-del" slot="reference"></i>
  883. </el-popover>
  884. <!-- 批量移动 -->
  885. <el-popover placement="left-end" title="" width="300" trigger="click">
  886. <div class="move-gro" style="width: 280px; " >
  887. <span class="gro-width" v-for="(item,index) in groupList" @click="moveGroupClick(item.id,item.title)" :class="groupName == item.title && moveGroupId == item.id?'moveActivity':''">[[item.title]]</span>
  888. </div>
  889. <el-button type="primary" style="height: 30px; line-height:5px; margin-left:30px" @click="removeSure()">确定</el-button>
  890. <el-button style="height: 30px; line-height:5px;margin-left:70px" @click="cancel()">取消</el-button>
  891. <i class="el-icon-sort switch-hover" slot="reference" @click="batchMove()"></i>
  892. </el-popover>
  893. </span>
  894. </div>
  895. <!-- 图片 -->
  896. <div v-if="defaultIndex == 1 && listLoading">
  897. <ul class="img-box clearfix">
  898. <li class="fl img-item" v-for="(item,index) in resourceList" @mouseenter="into(item.id)" @mouseleave="out(item.id)" id="refImg">
  899. <div>
  900. <img :src="item.attachment" alt="">
  901. </div>
  902. <p class="goods-name" v-if=" renameId != item.id">[[item.filename]]</p>
  903. <el-input class = "edit-inp" v-model = "item.filename" v-if=" renameId == item.id" @blur="blurInput($event,item.id)" @input = "inpNewName($event)" ref="renameInput" @keyup.enter.native = "enter($event,item.id)"></el-input>
  904. <div class="mark" :style="{ display: item.is_choose ? 'block' : '' }">
  905. <!-- {{item.is_choose}} -->
  906. <el-checkbox v-model="item.is_choose" @change="handChecked($event,index,item.attachment)"></el-checkbox>
  907. <span class="el-icon-rank full-screen" @click="screenViewClick(item.attachment)" :class="item.is_choose?'dn':'dp'"></span>
  908. <i class="el-icon-more" slot="reference" @click="moreDot= true" :class="item.is_choose?'dn':'dp'"></i>
  909. <div class="operations" :style="{ display: moreDot? 'block' : 'none' }">
  910. <span class="more-operation" @click="renameClick(item.id)">重命名</span>
  911. <!-- 移动分组弹窗 -->
  912. <el-popover placement="bottom" title="" width="260" trigger="click">
  913. <span class="more-operation" slot="reference" @click="removeClick(item.id)">移动分组</span>
  914. <div class="move-gro" style="width: 260px;" >
  915. <span class="move-width" v-for="(item,index) in groupList" @click="moveGroupClick(item.id,item.title)" :class="groupName == item.title && moveGroupId == item.id?'moveActivity':''">[[item.title]]</span>
  916. </div>
  917. <el-button type="primary" style="height: 30px; line-height:5px;margin-left:20px" @click="removeSure()">确定</el-button>
  918. <el-button style="height: 30px; line-height:5px;margin-left:40px " @click="cancel()">取消</el-button>
  919. </el-popover>
  920. <!-- 删除弹窗 -->
  921. <el-popover placement="bottom" title="" width="200" trigger="click">
  922. <p style="margin:15px 0;">确定要删除此素材吗</p>
  923. <el-button type="primary" style="height: 30px; line-height:5px" @click="sureDetel(item.id, item)">确定</el-button>
  924. <el-button style="height: 30px; line-height:5px" @click="cancel()" >取消</el-button>
  925. <span slot="reference" class="more-operation" @click="detelClick(item.id)">删除</span>
  926. </el-popover>
  927. </div>
  928. </div>
  929. </li>
  930. </ul>
  931. <!-- 没有数据 -->
  932. <div v-if="resourceList <= 0" style="text-align:center">暂无数据~</div>
  933. </div>
  934. <!-- 模拟点击按钮 -->
  935. <!-- <el-button @click="openUploadImg(defaultIndex)">模拟的上传按钮(到时候会去掉)</el-button> -->
  936. <!-- 上传组件 -->
  937. <!-- <upload-multimedia-img ref="uploadImg" :upload-show="uploadShow" :type="type" :name="chooseImgName" @replace="changeProp" @sure="sureImg" @videoclik="handleVideo"></upload-multimedia-img> -->
  938. <!-- <el-button @click="openUploadImg(defaultIndex)">原生组件的上传按钮(到时候会去掉)</el-button> -->
  939. <!-- <custom-img></custom-img> -->
  940. <!-- 图片全屏查看弹窗 -->
  941. <el-dialog title="" :visible.sync="fullImg" width="500px" height="500px;">
  942. <img :src="fullImgUrl" alt="" style="width:100%;height: 100%;">
  943. </el-dialog>
  944. <!-- 视频和音频 -->
  945. <div v-if="(defaultIndex == 2 || defaultIndex == 3) && listLoading" class="video-audio">
  946. <template>
  947. <el-table :data="resourceList" style="width: 100%" size="medium">
  948. <el-table-column prop="created_at" label="创建时间" align="center">
  949. </el-table-column>
  950. <el-table-column label="名称" align="center" width="190">
  951. <template slot-scope="scope">
  952. <!--视频 -->
  953. <div class="video fl" v-if="defaultIndex == 3">
  954. <video :src="scope.row.attachment" @click="dialogPlay(scope.row.attachment)"></video>
  955. <span class="video-time">播放<i class="play-triangle"></i>
  956. <!-- [[Math.floor(scope.row.timeline / 60)]]:[[Math.floor(scope.row.timeline % 60) >= 10?Math.floor(scope.row.timeline % 60):'0' + Math.floor(scope.row.timeline % 60)]] -->
  957. </span>
  958. </div>
  959. <!-- 弹窗播放 -->
  960. <el-dialog title="" :visible.sync="VideoDialogPlay" width="50%" :before-close="handleClose">
  961. <div style="min-width:500px;min-height:400px;min-height:500px; height: 500px;">
  962. <video style="width:100%; height:100%" :src="DialogViedoUrl" autoplay controls></video>
  963. </div>
  964. </el-dialog>
  965. <span class=" video-title fl" v-if="defaultIndex == 3" v-if="defaultIndex == 3">[[scope.row.filename]]</span>
  966. <!-- 音频 -->
  967. <div class="map3" v-if="defaultIndex == 2" style="position: relative;margin: 0 auto;">
  968. <img src="{!! resource_get('static/images/play.png') !!}" alt="" v-if="scope.row.is_choose == 0" @click="aduioClick(scope.row,scope.row.id,scope.$index,scope.row.is_choose)">
  969. <img src="{!! resource_get('static/images/puse.png') !!}" alt="" v-if="scope.row.is_choose == 1" @click="aduioClick(scope.row,scope.row.id,scope.$index,scope.row.is_choose)">
  970. <!-- <span style="position: absolute; bottom: 0; right: -38px;">[[Math.floor(scope.row.timeline / 60)]]:[[Math.floor(scope.row.timeline % 60) >= 10?Math.floor(scope.row.timeline % 60):'0' + Math.floor(scope.row.timeline % 60)]]</span> -->
  971. </div>
  972. <audio class="myAudio" v-if="defaultIndex==2">
  973. <source :src="scope.row.attachment" type="audio/mpeg">
  974. </audio>
  975. <!-- <audio class="myAudio" v-if="defaultIndex==2" controls>
  976. <source src="../../../../static/1.mp3" type="audio/mpeg">
  977. </audio> -->
  978. <div style="text-align:center;padding-top:10px" v-if="defaultIndex == 2">
  979. <p style="width: 150px;overflow: hidden;text-overflow: ellipsis; white-space: nowrap">[[scope.row.filename]]</p>
  980. </div>
  981. </template>
  982. </el-table-column>
  983. <el-table-column label="分组" align="center">
  984. <template slot-scope="scope">
  985. <span v-if="scope.row.id != noneGroup" style="display:inline-block;">[[scope.row.tag_name]]</span>
  986. <el-popover placement="bottom" title="" width="260" trigger="click">
  987. <i class="el-icon-edit" slot="reference" size="" @click="removeClick(scope.row.id)"></i>
  988. <div class="move-gro" style="width: 260px;" >
  989. <span class="move-width" v-for="(item,index) in groupList" @click="moveGroupClick(item.id,item.title)" :class="groupName == item.title && moveGroupId == item.id?'moveActivity':''">[[item.title]]</span>
  990. </div>
  991. <el-button type="primary" style="height: 30px; line-height:5px;margin-left:20px" @click="removeSure()">确定</el-button>
  992. <el-button style="height: 30px; line-height:5px;margin-left:40px " @click="cancel()">取消</el-button>
  993. </el-popover>
  994. </template>
  995. </el-table-column>
  996. <!-- defaultIndex == 3 ? '视频链接' : defaultIndex == 3 ? '音频链接':'' -->
  997. <el-table-column :label="defaultIndex == 3 ? '视频链接' : '音频链接'" align="center">
  998. <template slot-scope="scope">
  999. <i class="el-icon-link" @click="clickCopyUrl(scope.row.attachment)" ></i>
  1000. </template>
  1001. </el-table-column>
  1002. <el-table-column label="操作" align="center">
  1003. <template slot-scope="scope">
  1004. <el-popover
  1005. placement="bottom"
  1006. title="标题"
  1007. width="200"
  1008. trigger="click"
  1009. >
  1010. <p style="margin:15px 0;">确定要删除此素材吗</p>
  1011. <el-button type="primary" style="height: 30px; line-height:5px" @click="sureDetel(scope.row.id)">确定</el-button>
  1012. <el-button style="height: 30px; line-height:5px" @click="cancel()" >取消</el-button>
  1013. </p>
  1014. <i class="el-icon-delete" slot="reference" @click="TableDetel(scope.row.id)" ></i>
  1015. </el-popover>
  1016. </template>
  1017. </el-table-column>
  1018. <!-- <el-table-column label="文件格式">
  1019. <template slot-scope="scope">
  1020. <span>[[scope.row.filename.substr(scope.row.filename.length-3)]]</span>
  1021. </template>
  1022. </el-table-column> -->
  1023. </el-table>
  1024. </template>
  1025. </div>
  1026. <!-- 分页 -->
  1027. <el-row style="background-color:#fff;">
  1028. <el-col :span="24" align="center" migra style="padding:15px 5% 15px 0" v-loading="loading">
  1029. <el-pagination
  1030. background
  1031. @current-change="currentChange"
  1032. layout="prev, pager, next, jumper"
  1033. :current-page="current_page"
  1034. :page-size.sync="Number(page_size)"
  1035. :total="page_total">
  1036. </el-pagination>
  1037. </el-col>
  1038. </el-row>
  1039. </div>
  1040. </div>
  1041. <!-- <upload-multimedia-img
  1042. :upload-show="uploadShow"
  1043. :type="type"
  1044. :name="chooseImgName"
  1045. :sel-Num="selNum"
  1046. @replace="changeProp"
  1047. @sure="sureImg"
  1048. ></upload-multimedia-img> -->
  1049. <!-- 上传组件 -->
  1050. <div>
  1051. <el-dialog :visible.sync="dialogTableVisible" @close='closeDialog'>
  1052. <template slot="title" >
  1053. <div class="head-dialog">
  1054. <div class="titleWire">
  1055. <span v-if="uploadtype == 1" class="textInterval">上传图片</span>
  1056. <span v-if="uploadtype == 3" class="textInterval">上传视频</span>
  1057. <span v-if="uploadtype == 2" class="textInterval">上传音频</span>
  1058. </div>
  1059. <!-- 图片上传 -->
  1060. <div class="upload-img" v-if="uploadtype == 1">
  1061. <el-upload
  1062. class="upload-demo"
  1063. :action="uploadLink"
  1064. ref="upload"
  1065. multiple
  1066. accept="image/*"
  1067. :on-success="handleSucesss"
  1068. :on-progress="handlePreview"
  1069. >
  1070. <el-button size="small" type="primary" style="margin-right: 24px;">点击上传</el-button>
  1071. </el-upload>
  1072. </div>
  1073. </div>
  1074. <div class="divider">
  1075. <el-divider></el-divider>
  1076. </div>
  1077. <!-- 内容部分 -->
  1078. <div class="content-box">
  1079. <!-- 左 -->
  1080. <div class="content-box-left" style=" cursor: pointer" >
  1081. <el-scrollbar style="height:100%">
  1082. <p class="content-box-left-text" v-for="(item,index) in groupList" @click="groupingClick(item.id, item.title, $event,'scrollbar')"
  1083. :class="(pop_groupId == item.id && pop_gname == item.title)?'groupings':''">[[ item.title == '全部' ? '' : item.title]]
  1084. <span >([[item.title == '全部' ? '' : item.source_count]])</span></p>
  1085. </el-scrollbar>
  1086. </div>
  1087. <!-- <div style="height: 100%;">
  1088. <hr>
  1089. <el-divider direction="vertical"></el-divider>
  1090. </div> -->
  1091. <div class="conten-box-right">
  1092. <el-scrollbar style="height:100%">
  1093. <!-- 图片 -->
  1094. <div v-if="uploadtype == 1">
  1095. <div v-loading="videoloading" style="margin-top: 25px;">
  1096. <div class="conten-box-right-img fl" v-for="(item,index) in dataList" v-if="defaultIndex == 1 && listLoading" >
  1097. <li style="width: 7.3vw;height: 7.3vw;">
  1098. <img :src="item" alt="">
  1099. </li>
  1100. </div>
  1101. <div v-if="dataList <= 0" style=" line-height: 400px; text-align:center; ">暂无数据~请上传图片</div>
  1102. </div>
  1103. </div>
  1104. <!-- 视频音频 -->
  1105. <div class="conten-box-right-video" v-if="uploadtype == 2 || uploadtype == 3">
  1106. <div class="video-top" >
  1107. <!-- 默认上传显示 -->
  1108. <div class="video-top-init" v-loading="videoloading" v-if="uploadInitShow">
  1109. <el-upload
  1110. ref="upload"
  1111. class="avatar-uploader"
  1112. :accept="uploadtype == 3 ? 'video/*' : 'audio/*'"
  1113. :action="uploadvideo"
  1114. :on-success="onSuccess"
  1115. :on-progress="onProgress"
  1116. >
  1117. <!-- v-if="imageUrl" -->
  1118. <div v-if="videoimg == null" class="video-top-init-text">
  1119. <i class="el-icon-plus avatar-uploader-icon"></i>
  1120. <div class="el-upload__text"><em>点击上传</em></div>
  1121. </div>
  1122. <div style="width: 260px; height: 150px;" v-else-if="videoimg !== null && uploadtype == 3">
  1123. <video :src="videoimg" class="avatar">
  1124. </div>
  1125. <div v-else style="width: 260px; height: 150px;">
  1126. <span class="video-top-audioName">[[audioName]]</span>
  1127. <!-- <audio :src="audioName">
  1128. <source src="videoimg" >
  1129. </audio> -->
  1130. </div>
  1131. </el-upload>
  1132. </div>
  1133. <!-- 上传成功 -->
  1134. <div class="video-top-win" v-show="uploadWinShow">
  1135. <!-- <img src="" alt=""> -->
  1136. <div class="top-win-text">
  1137. <i class="el-icon-success" style="color: #29BA9C;"></i>
  1138. </div>
  1139. <p style="color: #101010;">生成视频链接成功</p>
  1140. </div>
  1141. <!-- 复制链接 -->
  1142. <div class="top-win-copy" v-show="copyLinkShow">
  1143. <el-row :gutter="20">
  1144. <el-col :span="15" :offset="3">
  1145. <el-input v-model="copyTextLink" disabled></el-input>
  1146. </el-col>
  1147. <el-col :span="3">
  1148. <el-button type="primary" style="background-color: #29BA9C;" @click="clickCopyUrl(copyTextLink)">复制</el-button>
  1149. </el-col>
  1150. </el-row>
  1151. </div>
  1152. <!-- 成功上传 返回 -->
  1153. <div class="video-bottom-win" v-show="putbackInitShow">
  1154. <el-button size="medium" @click="cilckShow"> 返 回 </el-button>
  1155. </div>
  1156. <!-- 上传默认显示 -->
  1157. <div class="video-bottom-init" v-if="uploadtype == 2 || uploadtype == 3">
  1158. <p v-show="iploadTetxshow" style="color: red;">请上传<span v-if="uploadtype == 2 "></span>音频<span v-if="uploadtype == 3">视频</span>文件!</p>
  1159. <el-button type="primary" v-show="iploadShow" style="background-color: #29BA9C;" @click="submitUpload">生成链接</el-button>
  1160. </div>
  1161. </div>
  1162. <!-- 生成链接 -->
  1163. <div class="video-bottom" >
  1164. </div>
  1165. </div>
  1166. </el-scrollbar>
  1167. </div>
  1168. </div>
  1169. <!-- 分组 -->
  1170. <div class="">
  1171. <el-popover placement="top" width="300" trigger="click">
  1172. <span style="color:#229980;cursor: pointer;" class="fl" slot="reference" >
  1173. <i class="el-icon-plus"></i>
  1174. 新建分组</span>
  1175. <p class="gro-inp">请输入分组名称</p>
  1176. <el-input v-model="newGroupName" placeholder="" style="margin-bottom:15px" maxlength="6"show-word-limit></el-input>
  1177. <el-button type="primary" class="gro-sure" style="margin-left:30px" @click="handAddGroup()">确定</el-button>
  1178. <el-button @click="handCancelGroup()" style="margin-left:50px">取消</el-button>
  1179. </el-popover>
  1180. </div>
  1181. </template>
  1182. </el-dialog>
  1183. </div>
  1184. </div>
  1185. <script>
  1186. // 全局注册拖拽组件
  1187. // Vue.component('vuedraggable', window.vuedraggable)
  1188. var vm = new Vue({
  1189. el: "#multimedia-material",
  1190. delimiters: ['[[', ']]'],
  1191. data() {
  1192. return {
  1193. type:'',
  1194. uploadShow:false,// 上传
  1195. chooseImgName:'',
  1196. selNum:'',
  1197. dataList:[], //选中的img
  1198. loadingShow:true,
  1199. videoloading:false,
  1200. groupIndex:'',
  1201. // switchover:'', //切换颜色
  1202. tagid: 0, //默认是0
  1203. videoimg:null,
  1204. // 上传参数
  1205. uploadLink:'',
  1206. uploadvideo:'',
  1207. audioName:'',
  1208. uploadWinShow:false, //上传成功模板
  1209. uploadInitShow:true, // 默认上传模板
  1210. copyLinkShow:false, // 复制链接
  1211. putbackInitShow:false, //返回模板按钮
  1212. iploadTetxshow:false, //生成链接文本
  1213. copyTextLink:'', // 复制链接 input框 文本
  1214. iploadShow:true, // 生成链接按钮 切换
  1215. uploadtype:null,
  1216. dialogTableVisible: false, //上传组件 开关
  1217. loadingData:false,
  1218. moreDot: false,
  1219. visible: false,
  1220. GroVisible:false,
  1221. checked:null,
  1222. groId:null, // 分组id
  1223. inpStatus:null,
  1224. newGroupName: '',// 新建分组名字
  1225. // 批量删除
  1226. curIndex: 0,
  1227. detelDialogVisible: false,
  1228. groDialogVisible: false,
  1229. adminDialogVisible: false,
  1230. imgChecked: false,
  1231. markFlag: false,
  1232. radio: '',
  1233. checkList: [],
  1234. radioList: [],
  1235. defaultIndex: 1,
  1236. loading: false,
  1237. groupId: 1,
  1238. pop_groupId: 0,
  1239. groupList: [],
  1240. input: '',
  1241. renameStatus: false,
  1242. renameGroupStatus: false,
  1243. name: '',
  1244. rName:'',
  1245. imgList:[],
  1246. resourceList:[],
  1247. resourceTotal:'',
  1248. intoId:null,
  1249. screenAndDot:null,
  1250. moreOperation:false,
  1251. moreStatus:null,
  1252. renameId:'',
  1253. moveGroupId:'',
  1254. VideoDialogPlay:false,
  1255. DialogViedoUrl:'',
  1256. page_total:0,// 分页
  1257. page_size:15,
  1258. videoAudioSize:3,
  1259. current_page:0,
  1260. page:1,//默认第一页
  1261. labelStatus:'',
  1262. manageId:'',
  1263. is_all_choose: 0,//是否全选
  1264. idArr:[],//选中的id,
  1265. selectIndexArr:[],
  1266. removeResourcesIdArr:[],
  1267. batchMoveStatus:false,//判断是否是批量移动
  1268. timeSelect:'',//删除的时间范围
  1269. groupName:'',
  1270. fullImg:false,
  1271. fullImgUrl:'',
  1272. gjson:{},
  1273. gname:0,
  1274. pop_gname: '全部',
  1275. source_count:'',
  1276. noneGroup:'',
  1277. playOrPuse:'',
  1278. audioStatus:false,
  1279. audioImg:'',
  1280. aduioDialogVisible:true,
  1281. activeName:'first',
  1282. aduioChecked:'',
  1283. videoChecked:'',
  1284. currentPage3:0,
  1285. imgChecked:'',
  1286. netUrl:'',
  1287. valPage:null,
  1288. fileList:[],
  1289. disabled:false,
  1290. dragId:[],
  1291. adminRnameGroup:'',
  1292. allSelectStatus:false,
  1293. listLoading:false,
  1294. palyingTag:false,
  1295. pusedingTag:true,
  1296. filterTime:null, //* 素材筛选日期
  1297. }
  1298. },
  1299. components: {
  1300. // vuedraggable: window.vuedraggable,//当前页面注册拖拽组件
  1301. },
  1302. mounted() {
  1303. window.onload = function() {
  1304. if (!window.sessionStorage['tempFlag']) {
  1305. console.log('关闭~~')
  1306. localStorage.clear()
  1307. // sessionStorage.clear()
  1308. } else {
  1309. this.groupId = window.sessionStorage.getItem('groupTag')?window.sessionStorage.getItem('groupTag'):''
  1310. window.sessionStorage.removeItem('tempFlag')
  1311. }
  1312. }
  1313. window.onunload = function () {
  1314. window.sessionStorage['tempFlag'] = false
  1315. }
  1316. window.onbeforeunload = function () {
  1317. window.sessionStorage['tempFlag'] = true
  1318. }
  1319. this.defaultIndex = window.sessionStorage.getItem('typeId')?window.sessionStorage.getItem('typeId'):'1'
  1320. this.gjson =JSON.parse(window.sessionStorage.getItem('groupTag')?window.sessionStorage.getItem('groupTag'):'{}')
  1321. this.groupId = this.gjson.id
  1322. this.pop_groupId = this.gjson.id
  1323. this.gname = this.gjson.gname
  1324. this.pop_gname = this.gjson.gname
  1325. if(this.defaultIndex == 1) {
  1326. this.page_size = 15
  1327. this.getResourList(this.defaultIndex, this.groupId,this.page_size,this.page)
  1328. }
  1329. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  1330. this.page_size = this.videoAudioSize
  1331. this.getResourList(this.defaultIndex, this.groupId,this.videoAudioSize,this.page)
  1332. }
  1333. this.getResourceGroup()
  1334. },
  1335. methods: {
  1336. // 打开 模态框
  1337. openDialog(e){
  1338. if(!this.pop_groupId) {
  1339. this.pop_groupId = 0;
  1340. this.pop_gname = '未分组'
  1341. }
  1342. if(e == 1){
  1343. this.uploadLink = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'image'+'&tag_id='+ this.pop_groupId
  1344. this.uploadtype = 1
  1345. this.dialogTableVisible = true
  1346. }else if(e == 2){
  1347. this.uploadvideo = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'audio'+'&tag_id='+ this.pop_groupId
  1348. this.uploadtype = 2
  1349. this.dialogTableVisible = true
  1350. }else{
  1351. // 3 视频
  1352. this.uploadvideo = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'video'+'&tag_id='+ this.pop_groupId
  1353. this.uploadtype = 3
  1354. this.dialogTableVisible = true
  1355. }
  1356. },
  1357. // 上传组件
  1358. submitUpload(){ // 切换生成链接
  1359. if(this.videoimg == null){
  1360. this.iploadTetxshow = true
  1361. }else{
  1362. setTimeout(()=>{
  1363. this.uploadInitShow = false
  1364. this.uploadWinShow = true
  1365. this.iploadTetxshow = false
  1366. this.copyLinkShow = true
  1367. this.iploadShow = false
  1368. this.putbackInitShow = true
  1369. },1000)
  1370. }
  1371. },
  1372. // 初始化 上传视频 音频模板
  1373. initList(){
  1374. this.dataList = [];
  1375. this.uploadInitShow = true
  1376. this.uploadWinShow = false
  1377. this.iploadTetxshow = true
  1378. this.copyLinkShow = false
  1379. this.iploadShow = true
  1380. this.putbackInitShow = false
  1381. this.videoimg = null
  1382. this.iploadTetxshow = false
  1383. },
  1384. // 点击返回按钮
  1385. cilckShow(){
  1386. this.initList()
  1387. },
  1388. // 点击复制
  1389. clickCopyUrl(data){
  1390. let url = data;
  1391. let oInput = document.createElement('input');
  1392. oInput.value = url;
  1393. document.body.appendChild(oInput);
  1394. oInput.select(); // 选择对象;
  1395. console.log(oInput.value)
  1396. document.execCommand("Copy"); // 执行浏览器复制命令
  1397. this.$message({
  1398. message: '已成功复制',
  1399. type: 'success'
  1400. });
  1401. oInput.remove()
  1402. },
  1403. closeDialog(){ // 关闭dialog回掉
  1404. // this.iploadTetxshow = false
  1405. this.initList()
  1406. this.dataList = [] //清空数组
  1407. if(this.defaultIndex == 1) {
  1408. this.page_size = 15
  1409. this.getResourList(this.defaultIndex, this.groupId,this.page_size,this.page)
  1410. }
  1411. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  1412. this.page_size = this.videoAudioSize
  1413. this.getResourList(this.defaultIndex, this.groupId,this.videoAudioSize,this.page)
  1414. }
  1415. this.getResourceGroup()
  1416. },
  1417. // 上传成成功回调 图片
  1418. handleSucesss(response, file, fileLis){
  1419. if(response.result == 1) {
  1420. // this.getResourceGroup()
  1421. // let newdataList = []
  1422. this.videoloading = false;
  1423. if(response.data.url !== undefined){
  1424. this.dataList.push(response.data.url)
  1425. this.dataList.reverse();
  1426. }
  1427. this.getResourceGroup();
  1428. // this.groupingClick(this.groupId, this.gname, )
  1429. // console.log( '成功', this.dataList)
  1430. }else {
  1431. this.$message({
  1432. message: response.msg,
  1433. type: 'error'
  1434. });
  1435. }
  1436. },
  1437. // 上传成功回调 视频 音频
  1438. onSuccess(response){
  1439. if(response.result == 1) {
  1440. this.audioName = response.data.name
  1441. // console.log( this.audioName,'onSuccess')
  1442. this.videoloading = false
  1443. this.videoimg = response.data.url
  1444. this.copyTextLink = response.data.url
  1445. this.getResourceGroup()
  1446. this.$message({
  1447. message: '上传成功',
  1448. type: 'success'
  1449. });
  1450. }else {
  1451. this.$message({
  1452. message: response.msg,
  1453. type: 'error'
  1454. });
  1455. }
  1456. },
  1457. // 文件上传时 钩子
  1458. onProgress(event, file, fileList){
  1459. this.videoloading = true
  1460. },
  1461. handlePreview(file){
  1462. this.videoloading = true
  1463. console.log('handlePreview',file)
  1464. },
  1465. // 获取分组列表
  1466. getResourceGroup() {
  1467. // console.log('getResourceGroup',1)
  1468. let that = this
  1469. this.$http.post("{!! yzWebFullUrl('setting.media.tags') !!}", {
  1470. source_type: this.defaultIndex
  1471. }).then(response => {
  1472. if (response.data.result) {
  1473. that.groupList = response.data.data
  1474. // console.log( that.groupList,'getResourceGroup')
  1475. this.resourceTotal = this.groupList[0].source_count
  1476. this.loadingData = true
  1477. } else {
  1478. this.$message({
  1479. message: response.data.msg,
  1480. type: 'error'
  1481. });
  1482. }
  1483. }, response => {
  1484. this.$message({
  1485. message: response.data.msg,
  1486. type: 'error'
  1487. });
  1488. });
  1489. },
  1490. // 获取资源列表
  1491. getResourList(sourceType, tagId,page_size,page, scrollbar) {
  1492. // console.log(tagId, 'getResourList全部',)
  1493. if(tagId === undefined){
  1494. tagId = ''
  1495. }
  1496. let arr = []
  1497. let filterDate={
  1498. year:null,
  1499. month:null
  1500. }
  1501. if(this.filterTime){
  1502. let d=new Date(this.filterTime);
  1503. filterDate.year=d.getFullYear();
  1504. filterDate.month=d.getMonth()+1;
  1505. }
  1506. this.$http.post("{!! yzWebFullUrl('setting.media.source') !!}", {
  1507. source_type: Number(sourceType),
  1508. tag_id: tagId,
  1509. pageSize:page_size,
  1510. page:page,
  1511. date:filterDate
  1512. }).then(response => {
  1513. if (response.data.result) {
  1514. this.resourceList = response.data.data.data
  1515. // console.log(response.data,'测试')
  1516. // 跨域测试
  1517. // https://img.alicdn.com/imgextra/i2/54199406/O1CN012JLzreAxzn1xhNP_!!54199406.jpg
  1518. // this.resourceList[0].attachment = 'http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/image/1032968d4848e9614ef96a7420d90622.png'
  1519. // console.log(this.resourceList,'this.resourceList')
  1520. this.page_total= response.data.data.total
  1521. // this.page_size = response.data.per_page;
  1522. this.current_page = response.data.current_page;
  1523. this.resourceList.forEach((item, index) => {
  1524. item['is_choose'] = 0
  1525. });
  1526. this.listLoading = true
  1527. } else {
  1528. this.$message({
  1529. message: response.data.msg,
  1530. type: 'error'
  1531. });
  1532. }
  1533. }, response => {
  1534. this.$message({
  1535. message: response.data.msg,
  1536. type: 'error'
  1537. });
  1538. });
  1539. },
  1540. // 添加分组
  1541. addGroup(sourceType, groupName) {
  1542. this.$http.post("{!! yzWebFullUrl('setting.media.addTag') !!}", {
  1543. source_type: this.defaultIndex,
  1544. title: groupName
  1545. }).then(response => {
  1546. if (response.data.result) {
  1547. this.closePopover()
  1548. this.$message({
  1549. message: '添加分组成功',
  1550. type: 'success'
  1551. });
  1552. } else {
  1553. this.$message({
  1554. message: response.data.msg,
  1555. type: 'error'
  1556. });
  1557. }
  1558. }, response => {
  1559. this.$message({
  1560. message: response.data.msg,
  1561. type: 'error'
  1562. });
  1563. });
  1564. },
  1565. // 分组重新命名
  1566. renameGroup(title,id) {
  1567. this.$http.post("{!! yzWebFullUrl('setting.media.renameTag') !!}", {
  1568. title: title,
  1569. id:id
  1570. }).then(response => {
  1571. if (response.data.result) {
  1572. this.closePopover()
  1573. this.$message({
  1574. message: '分组重新命名成功',
  1575. type: 'success'
  1576. });
  1577. } else {
  1578. this.$message({
  1579. message: response.data.msg,
  1580. type: 'error'
  1581. });
  1582. }
  1583. }, response => {
  1584. this.$message({
  1585. message: response.data.msg,
  1586. type: 'error'
  1587. });
  1588. });
  1589. },
  1590. // 资源重命名
  1591. resourceRename(newName,id) {
  1592. this.$http.post("{!! yzWebFullUrl('setting.media.rename') !!}", {
  1593. filename: newName,
  1594. id:id
  1595. }).then(response => {
  1596. if (response.data.result) {
  1597. this.closePopover()
  1598. this.$message({
  1599. message: '资源重新命名成功',
  1600. type: 'success'
  1601. });
  1602. } else {
  1603. this.$message({
  1604. message: response.data.msg,
  1605. type: 'error'
  1606. });
  1607. }
  1608. }, response => {
  1609. this.$message({
  1610. message: response.data.msg,
  1611. type: 'error'
  1612. });
  1613. });
  1614. },
  1615. // 分组移动
  1616. moveGroup() {
  1617. this.$http.post("{!! yzWebFullUrl('setting.media.batchMove') !!}", {
  1618. tag_id: newName,
  1619. ids:id
  1620. }).then(response => {
  1621. if (response.data.result) {
  1622. this.closePopover()
  1623. this.$message({
  1624. message: '资源重新命名成功',
  1625. type: 'success'
  1626. });
  1627. } else {
  1628. this.$message({
  1629. message: response.data.msg,
  1630. type: 'error'
  1631. });
  1632. }
  1633. }, response => {
  1634. this.$message({
  1635. message: response.data.msg,
  1636. type: 'error'
  1637. });
  1638. });
  1639. },
  1640. // resourceIdArr资源id数组
  1641. // groIdArr 分组id数组
  1642. // date时间字符串 all year half_year three_month month
  1643. // sourceType 资源类型,必选
  1644. detel(resourceIdArr,groIdArr,date,sourceType) {
  1645. this.$http.post("{!! yzWebFullUrl('setting.media.batchDelete') !!}", {
  1646. ids:resourceIdArr,
  1647. tags:groIdArr,
  1648. date:date,
  1649. source_type:sourceType
  1650. }).then(response => {
  1651. if (response.data.result) {
  1652. // this.closePopover()
  1653. this.$message({
  1654. message: '删除成功',
  1655. type: 'success'
  1656. });
  1657. } else {
  1658. this.$message({
  1659. message: response.data.msg,
  1660. type: 'error'
  1661. });
  1662. }
  1663. }, response => {
  1664. this.$message({
  1665. message: response.data.msg,
  1666. type: 'error'
  1667. });
  1668. });
  1669. },
  1670. // 批量移动分组
  1671. // tag_id:分组id
  1672. // ids 资源id arrry类型
  1673. removeGroup(groId,id) {
  1674. this.$http.post("{!! yzWebFullUrl('setting.media.batchMove') !!}", {
  1675. tag_id:groId,
  1676. ids:id
  1677. }).then(response => {
  1678. if (response.data.result) {
  1679. this.$message({
  1680. message: response.data.msg,
  1681. type: 'success'
  1682. });
  1683. this.closePopover()
  1684. } else {
  1685. this.$message({
  1686. message: response.data.msg,
  1687. type: 'error'
  1688. });
  1689. }
  1690. }, response => {
  1691. this.$message({
  1692. message: response.data.msg,
  1693. type: 'error'
  1694. });
  1695. });
  1696. },
  1697. // 删除分组
  1698. // id 分组id 必选
  1699. // moveOrDelete 1移动 2删除 必选
  1700. detelGroup(ids,val) {
  1701. this.$http.post("{!! yzWebFullUrl('setting.media.deleteTag') !!}", {
  1702. id:ids,
  1703. moveOrDelete:val
  1704. }).then(response => {
  1705. if (response.data.result) {
  1706. this.closePopover()
  1707. this.$message({
  1708. message: '删除成功',
  1709. type: 'success'
  1710. });
  1711. } else {
  1712. this.$message({
  1713. message: response.data.msg,
  1714. type: 'error'
  1715. });
  1716. }
  1717. }, response => {
  1718. this.$message({
  1719. message: response.data.msg,
  1720. type: 'error'
  1721. });
  1722. });
  1723. },
  1724. // 拖拽分组进行排序
  1725. // dragGroup(sort,id) {
  1726. // this.$http.post('{!! yzWebFullUrl('setting.media.sortTag') !!}', {
  1727. // id:ids,
  1728. // moveOrDelete:val
  1729. // }).then(response => {
  1730. // if (response.data.result) {
  1731. // } else {
  1732. // this.$message({
  1733. // message: response.data.msg,
  1734. // type: 'error'
  1735. // });
  1736. // }
  1737. // }, response => {
  1738. // this.$message({
  1739. // message: response.data.msg,
  1740. // type: 'error'
  1741. // });
  1742. // });
  1743. // },
  1744. // 顶部选项卡的切换事件
  1745. tabClick(typeId) {
  1746. this.filterTime=null; //* 清除选择的筛选日期
  1747. this.defaultIndex = typeId
  1748. window.sessionStorage.setItem('typeId', typeId)
  1749. if(this.defaultIndex == 1) {
  1750. this.page_size = 15
  1751. this.getResourList(this.defaultIndex, '',this.page_size,this.page)
  1752. }
  1753. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  1754. this.page_size = this.videoAudioSize
  1755. this.getResourList(this.defaultIndex, '',this.videoAudioSize,this.page)
  1756. }
  1757. this.getResourceGroup()
  1758. window.sessionStorage.removeItem('groupTag')
  1759. this.groupId = ''
  1760. this.gname = ''
  1761. this.pop_groupId = 0;
  1762. this.pop_gname = '未分组'
  1763. },
  1764. groupingClick(id, title, index, scrollbar) {
  1765. if(scrollbar == 'scrollbar'){
  1766. this.initList();
  1767. this.pop_groupId = id
  1768. this.pop_gname = title
  1769. console.log(id,'tagId',this.defaultIndex)
  1770. this.uploadLink = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'image'+'&tag_id='+ id
  1771. if(this.defaultIndex == 2){
  1772. this.uploadvideo = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'audio'+'&tag_id='+ id
  1773. // console.log(this.uploadvideo,'adasd')
  1774. }else if(this.defaultIndex == 3){
  1775. this.uploadvideo = "{!! yzWebFullUrl('upload.uploadV3.upload') !!}"+'&upload_type='+'video'+'&tag_id='+ id
  1776. }
  1777. return;
  1778. }else {
  1779. this.groupId = id
  1780. this.gname = title
  1781. }
  1782. let groJson = {id:id,gname:title}
  1783. window.sessionStorage.setItem('groupTag', JSON.stringify(groJson))
  1784. if(this.defaultIndex == 1) {
  1785. this.page_size = 15
  1786. this.getResourList(this.defaultIndex, id,this.page_size,this.page, scrollbar)
  1787. }
  1788. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  1789. this.page_size = this.videoAudioSize
  1790. this.getResourList(this.defaultIndex, id,this.page_size,this.page, scrollbar)
  1791. }
  1792. this.groDialogVisible = false
  1793. },
  1794. renameClick(id) {
  1795. this.renameStatus = !this.renameStatus
  1796. this.moreDot = false
  1797. this.renameId = id
  1798. this.$nextTick(() => {
  1799. this.$refs.renameInput[0].focus()
  1800. this.$refs.renameInput[0].select()
  1801. });
  1802. },
  1803. inpNewName(e) {
  1804. this.rName = e
  1805. },
  1806. blurInput(e,id){
  1807. console.log(e,'12345678')
  1808. if(e.target.value == '') {
  1809. this.$message({
  1810. message: '分组名不能为空',
  1811. type: 'error'
  1812. });
  1813. return
  1814. }
  1815. this.renameId = ''
  1816. this.resourceRename(e.target.value,id)
  1817. },
  1818. handleClose(done) {
  1819. this.DialogViedoUrl = ''
  1820. this.groId = null
  1821. done()
  1822. },
  1823. adminClick() {
  1824. this.adminDialogVisible = true
  1825. },
  1826. screenViewClick(url) {
  1827. this.fullImgUrl = url,
  1828. this.fullImg = true
  1829. },
  1830. // 分组下拉
  1831. pullDownClick() {
  1832. this.groDialogVisible = true
  1833. },
  1834. handClickImg(val,id) {
  1835. this.moreDot = false
  1836. },
  1837. into(id) {
  1838. this.intoId = id
  1839. },
  1840. out(id) {
  1841. this.moreDot = false
  1842. },
  1843. // 多个选择
  1844. handChecked($event,ind,attachment){
  1845. this.selectIndexArr.push(ind)
  1846. this.checked =$event
  1847. if(this.checked) {
  1848. this.screenAndDot = true
  1849. } else {
  1850. this.screenAndDot = false
  1851. }
  1852. let is_all = 0;
  1853. this.resourceList.some((item, index) => {
  1854. if (item.is_choose == 1) {
  1855. is_all = true;
  1856. } else {
  1857. is_all = false;
  1858. return true;
  1859. }
  1860. })
  1861. this.is_all_choose = is_all //全选
  1862. this.$forceUpdate()
  1863. this.getPitchData()
  1864. },
  1865. //全选
  1866. allChoose($event){
  1867. if($event) {
  1868. this.resourceList.forEach((item, index) => {
  1869. item.is_choose = true;
  1870. })
  1871. } else {
  1872. this.resourceList.forEach((item, index) => {
  1873. item.is_choose = false;
  1874. })
  1875. }
  1876. this.$forceUpdate()
  1877. this.getPitchData()
  1878. },
  1879. // 取消选择
  1880. cancelSelect(){
  1881. this.resourceList.forEach((item, index) => {
  1882. item.is_choose = false;
  1883. this.is_all_choose = false
  1884. })
  1885. this.idArr = []
  1886. this.$forceUpdate()
  1887. },
  1888. // 获取选中的数据 权武
  1889. getPitchData() {
  1890. let idArr = []
  1891. // let dataList = []
  1892. this.resourceList.forEach(item => {
  1893. if(item.is_choose == true) {
  1894. idArr.push(item.id)
  1895. // dataList.push(item)
  1896. // console.log(dataList)
  1897. }
  1898. })
  1899. this.idArr = idArr
  1900. // this.dataList = dataList
  1901. },
  1902. dialogPlay(url) {
  1903. this.DialogViedoUrl = url
  1904. this.VideoDialogPlay = true;
  1905. },
  1906. changeName() {
  1907. this.renameStatus = false
  1908. },
  1909. renameGroupEdit(id) {
  1910. this.noneGroup = id
  1911. this.renameGroupStatus = true
  1912. },
  1913. detelClick(id) {
  1914. },
  1915. removeClick(id) {
  1916. // let arr = []
  1917. // arr.push(id)
  1918. this.groupName = ''
  1919. this.removeResourcesIdArr = [id]
  1920. },
  1921. // 新建分组
  1922. handAddGroup() {
  1923. if (this.newGroupName == '') {
  1924. this.$message({
  1925. message: '分组名不能为空',
  1926. type: 'error'
  1927. });
  1928. return
  1929. }
  1930. this.addGroup(this.defaultIndex, this.newGroupName)
  1931. this.newGroupName = ''
  1932. setTimeout(() => {
  1933. this.getResourceGroup()
  1934. }, 800);
  1935. },
  1936. handCancelGroup() {
  1937. this.closePopover()
  1938. this.newGroupName = ''
  1939. },
  1940. // 分组重新命名
  1941. EditGroup(id,title) {
  1942. this.adminRnameGroup = title;
  1943. this.groId = id
  1944. this.$nextTick(() => {
  1945. this.$refs.input[0].focus()
  1946. this.$refs.input[0].select()
  1947. });
  1948. },
  1949. handBlur(e) {
  1950. this.groId = null
  1951. },
  1952. closePopover() {
  1953. if (document.all) {
  1954. document.getElementById('multimedia-material').click();
  1955. } else {// 其它浏览器
  1956. var e = document.createEvent('MouseEvents')
  1957. e.initEvent('click', true, true)
  1958. document.getElementById('multimedia-material').dispatchEvent(e)
  1959. }
  1960. },
  1961. getGroId(id) {
  1962. this.manageId = id
  1963. },
  1964. sure() {
  1965. this.detel(this.manageId,this.labelStatus)
  1966. this.closePopover()
  1967. },
  1968. cancel() {
  1969. this.groId = null
  1970. this.adminDialogVisible = false
  1971. this.closePopover()
  1972. },
  1973. inpName($event) {
  1974. console.log($event)
  1975. this.adminRnameGroup = $event;
  1976. if($event == '') {
  1977. }
  1978. this.rName = $event
  1979. },
  1980. changeGroupName(value) {
  1981. this.adminRnameGroup = value;
  1982. },
  1983. inputBlur() {
  1984. // this.groId = null
  1985. },
  1986. sureName(id) {
  1987. this.groId = id;
  1988. let title = this.adminRnameGroup
  1989. console.log(this.groId,title);
  1990. if(title == '' ) {
  1991. this.$message({
  1992. message: '分组名不能为空',
  1993. type: 'error'
  1994. });
  1995. } else {
  1996. this.renameGroup(title,id)
  1997. setTimeout(() => {
  1998. this.getResourceGroup()
  1999. this.groId = null
  2000. }, 100);
  2001. }
  2002. this.groId = null
  2003. },
  2004. popoverSureClick() {
  2005. this.closePopover()
  2006. this.moreOperation = null
  2007. },
  2008. popoverCancelClick() {
  2009. this.closePopover()
  2010. this.moreOperation = null
  2011. },
  2012. handOperation(status) {
  2013. this.moreOperation = true
  2014. this.moreStatus = status
  2015. },
  2016. enter(e,id) {
  2017. this.resourceRename(e.target.value,id)
  2018. this.renameId = ''
  2019. },
  2020. moveGroupClick(id,title) {
  2021. this.moveGroupId = id
  2022. this.groupName = title
  2023. },
  2024. batchMove() {
  2025. this.groupName = ''
  2026. this.batchMoveStatus = true
  2027. },
  2028. // 移动分组的确定
  2029. removeSure(){
  2030. if(this.moveGroupId === '') {
  2031. this.$message({
  2032. message: '请选择其他分组',
  2033. })
  2034. this.closePopover()
  2035. return
  2036. }
  2037. if(this.batchMoveStatus) {//批量移动
  2038. this.removeGroup(this.moveGroupId,this.idArr)
  2039. setTimeout(() => {
  2040. this.getResourceGroup()
  2041. this.getAgain()
  2042. this.resourceList.forEach((item, index) => {
  2043. item.is_choose = 0
  2044. });
  2045. this.$forceUpdate()
  2046. this.allSelectStatus = false
  2047. this.idArr = []
  2048. }, 800);
  2049. this.closePopover()
  2050. return
  2051. }
  2052. // console.log(this.removeResourcesIdArr)
  2053. this.removeGroup(this.moveGroupId,this.removeResourcesIdArr)
  2054. setTimeout(() => {
  2055. this.getResourceGroup()
  2056. this.getAgain()
  2057. },800)
  2058. },
  2059. slectRadio($event) {
  2060. this.labelStatus = $event
  2061. },
  2062. // 分页
  2063. currentChange(val) {
  2064. this.valPage = val
  2065. if(this.defaultIndex == 1) {
  2066. this.page_size = 15
  2067. // this.groupId = this.groupId?this.groupId:''
  2068. this.getResourList(this.defaultIndex, this.groupId,this.page_size,val)
  2069. }
  2070. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  2071. this.page_size = this.videoAudioSize
  2072. this.groupId = this.groupId?this.groupId:''
  2073. this.getResourList(this.defaultIndex, this.groupId,this.videoAudioSize,val)
  2074. }
  2075. this.is_all_choose = false
  2076. },
  2077. // 单选删除
  2078. sureDetel(id,item) {
  2079. let arr = []
  2080. arr.push(id)
  2081. this.detel(arr,'','',this.defaultIndex)
  2082. this.closePopover()
  2083. // setTimeout(() => {
  2084. // this.resourceList = this.resourceList.filter(item => item.id != id)
  2085. // }, 800);
  2086. },
  2087. // 批量删除选中的资源 权武
  2088. sureSelectDetel() {
  2089. // console.log(this.idArr,'sureSelectDetel' ,this.defaultIndex)
  2090. this.detel(this.idArr,'','',this.defaultIndex)
  2091. this.getAgain()
  2092. this.idArr = []
  2093. this.getResourceGroup()
  2094. this.closePopover()
  2095. },
  2096. // 批量下载功能
  2097. packageImages(){
  2098. },
  2099. rangeChange(val){
  2100. this.timeSelect= val
  2101. },
  2102. // 批量删除的选择分组
  2103. moreSelectGro(arr) {
  2104. // console.log(arr,'141234134566');
  2105. this.checkList = arr
  2106. },
  2107. // 批量开始删除
  2108. startDetel() {
  2109. if(this.checkList.length <= 0) {
  2110. this.$message({
  2111. message: '请选择分组',
  2112. type: 'error'
  2113. })
  2114. return
  2115. }
  2116. if(this.timeSelect == '') {
  2117. this.$message({
  2118. message: '请选择时间范围',
  2119. type: 'error'
  2120. })
  2121. return
  2122. }
  2123. this.detel('',this.checkList,this.timeSelect,this.defaultIndex)
  2124. this.detelDialogVisible = false
  2125. setTimeout(() => {
  2126. this.getAgain()
  2127. this.getResourceGroup()
  2128. },800)
  2129. // location.reload(true)
  2130. },
  2131. ManageSureDetel() {
  2132. if(this.labelStatus == '') {
  2133. this.$message({
  2134. message: '请选择删除类型',
  2135. type: 'error'
  2136. })
  2137. return
  2138. }
  2139. this.detelGroup(this.manageId,this.labelStatus)
  2140. setTimeout(() => {
  2141. this.getResourceGroup()
  2142. }, 800);
  2143. this.groId = null
  2144. },
  2145. // 重新获取资源
  2146. getAgain() {
  2147. if(this.defaultIndex == 1) {
  2148. this.page_size = 15
  2149. this.groupId = this.groupId?this.groupId:''
  2150. this.getResourList(this.defaultIndex, this.groupId,this.page_size,this.valPage)
  2151. }
  2152. if(this.defaultIndex == 3 || this.defaultIndex == 2) {
  2153. this.page_size = this.videoAudioSize
  2154. this.groupId = this.groupId?this.groupId:''
  2155. this.getResourList(this.defaultIndex, this.groupId,this.videoAudioSize,this.valPage)
  2156. }
  2157. },
  2158. TableDetel(id) {
  2159. },
  2160. tableDetel(id) {
  2161. let arr = []
  2162. arr.push(id)
  2163. this.detel(arr,'','',this.defaultIndex)
  2164. },
  2165. aduioClick(scope,id,ind,is_choose) {
  2166. // console.log(scope,'1234134543514')
  2167. this.playOrPuse = ind
  2168. var myAudio = document.querySelectorAll(".myAudio")
  2169. if(is_choose == 0) {
  2170. let arr = this.resourceList.map(item => {
  2171. if(item.id == id) {
  2172. item.is_choose = 1
  2173. }
  2174. return item
  2175. })
  2176. this.resourceList = arr
  2177. myAudio[ind].load()
  2178. let playPromise = myAudio[ind].play()
  2179. if (playPromise !== undefined) {
  2180. playPromise.then(() => {
  2181. myAudio[ind].play()
  2182. // console.log(myAudio[ind].paused,'000000000000000000')
  2183. }).catch(()=> {
  2184. })
  2185. }
  2186. } else {
  2187. let arr = this.resourceList.map(item => {
  2188. if(item.id == id) {
  2189. item.is_choose = 0
  2190. }
  2191. return item
  2192. })
  2193. this.resourceList = arr
  2194. setTimeout(() => {
  2195. myAudio[ind].pause()
  2196. // console.log(myAudio[ind].paused,'1231413413432432')
  2197. }, 500);
  2198. }
  2199. },
  2200. //设置禁止拖拽
  2201. setJY() {
  2202. this.disabled = true;
  2203. },
  2204. //设置启用拖拽
  2205. setQY() {
  2206. this.disabled = false;
  2207. },
  2208. onStart() {
  2209. this.drag = true;
  2210. },
  2211. //开始拖拽事件
  2212. onStart() {
  2213. this.drag = true;
  2214. },
  2215. //拖拽结束事件
  2216. onEnd() {
  2217. this.drag = false;
  2218. // console.log(this.groupList);
  2219. this.dragId = []
  2220. this.groupList.map(item => {
  2221. this.dragId.push(item.id)
  2222. })
  2223. },
  2224. //move回调方法
  2225. onMove(e) {
  2226. //不允许停靠
  2227. if (e.relatedContext.element.id == '' || e.relatedContext.element.id == 0) return false;
  2228. //不允许拖拽
  2229. if (e.draggedContext.element.id == '' || e.draggedContext.element.id == 0 ) return false;
  2230. return true;
  2231. },
  2232. // 转换音视频的时间
  2233. convertTime() {
  2234. },
  2235. // 上传组件 方法 参数
  2236. // changeProp(val) {
  2237. // if(val == true) {
  2238. // this.uploadShow = false;
  2239. // }
  2240. // else {
  2241. // this.uploadShow = true;
  2242. // }
  2243. // },
  2244. // sureImg(name, image, imageUrl){
  2245. // // 数据上传成功 刷新数据
  2246. // this.getAgain()
  2247. // this.$message({
  2248. // message: '添加成功',
  2249. // type: 'success'
  2250. // });
  2251. // console.log(name, image, imageUrl,'sureImg')
  2252. // },
  2253. // openUpload(str,type,sel){
  2254. // // console.log('openUpload')
  2255. // this.chooseImgName = str;
  2256. // this.uploadShow = true;
  2257. // this.type = type;
  2258. // // this.selNum = sel;
  2259. // }
  2260. // //模拟上传
  2261. // changeProp(val,file) {
  2262. // if(val == true) {
  2263. // this.uploadShow = false;
  2264. // }
  2265. // else {
  2266. // this.uploadShow = true;
  2267. // }
  2268. // },
  2269. // // 接受子组件传送过来的视频地址
  2270. // handleVideo(url) {
  2271. // console.log(url);
  2272. // },
  2273. // sureImg(val,file) {
  2274. // console.log(file)
  2275. // if(val == true) {
  2276. // this.uploadShow = false;
  2277. // }
  2278. // else {
  2279. // this.uploadShow = true;
  2280. // }
  2281. // },
  2282. // openUploadImg(type){
  2283. // // 把值传到子组件
  2284. // this.uploadShow = true
  2285. // this.type = type;
  2286. // },
  2287. },
  2288. });
  2289. /**
  2290. require.config({
  2291. paths: {
  2292. jszip : "/addons/yun_shop/resources/views/setting/media/js/jszip",
  2293. FileSaver: "/addons/yun_shop/resources/views/setting/media/js/FileSaver",
  2294. },
  2295. });
  2296. // 微擎版多了 /addons/yun_shop
  2297. require(['jszip', 'FileSaver',], function (JSZip, FileSaver){
  2298. function packageImages(newImgs) {
  2299. var imgs = newImgs
  2300. var imgsSrc = [];
  2301. var imgBase64 = [];
  2302. var imageSuffix = [];//图片后缀
  2303. var zip = new JSZip();
  2304. var img = zip.folder("images"); // 文件存放名字
  2305. for (var i = 0; i < imgs.length; i++) { //遍历所有图片
  2306. var src = imgs[i]
  2307. var suffix = src.substring(src.lastIndexOf(".")); // 后缀名
  2308. imageSuffix.push(suffix); // 存放数字
  2309. getBase64(imgs[i])
  2310. .then(function (base64) {
  2311. imgBase64.push(base64.substring(22));
  2312. }, function (err) {
  2313. console.log(err,'err');//打印异常信息
  2314. });
  2315. }
  2316. function tt() {
  2317. setTimeout(function () {
  2318. if (imgs.length == imgBase64.length) {
  2319. for (var i = 0; i < imgs.length; i++) {
  2320. img.file(i + imageSuffix[i], imgBase64[i], { base64: true });
  2321. }
  2322. zip.generateAsync(
  2323. { type: 'blob',}
  2324. ).then(function (content) {
  2325. saveAs(content, "images.zip");
  2326. }).catch(function(err){
  2327. console.log(err,'报错了嘛')
  2328. })
  2329. } else {
  2330. tt();
  2331. }
  2332. }, 100);
  2333. }
  2334. //传入图片路径,返回base64
  2335. function getBase64(img) {
  2336. function getBase64Image(img, width, height) {//width、height调用时传入具体像素值,控制大小 ,不传则默认图像大小
  2337. var canvas = document.createElement("canvas");
  2338. canvas.width = width ? width : img.width;
  2339. canvas.height = height ? height : img.height;
  2340. var ctx = canvas.getContext("2d");
  2341. ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
  2342. var dataURL = canvas.toDataURL();
  2343. return dataURL;
  2344. }
  2345. var image = new Image();
  2346. image.crossOrigin = 'Anonymous';
  2347. image.src = img;
  2348. var deferred = $.Deferred();
  2349. if (img) {
  2350. image.onload = function () {
  2351. deferred.resolve(getBase64Image(image));//将base64传给done上传处理
  2352. }
  2353. return deferred.promise(); //问题要让onload完成后再return sessionStorage['imgTest']
  2354. }
  2355. }
  2356. tt();
  2357. newImgList = []
  2358. }
  2359. $("body").on('click', '#packageImages',function(){
  2360. var newImgList = []
  2361. vm.$confirm('确定要下载选中的素材吗', '提示', {
  2362. confirmButtonText: '确定',
  2363. cancelButtonText: '取消',
  2364. }).then(() => {
  2365. vm.$message({
  2366. type: 'success',
  2367. message: '正在下载请稍等!'
  2368. });
  2369. $.each(vm.$data.resourceList,function(index,item){
  2370. if(item.is_choose == true){
  2371. newImgList.push(item.attachment)
  2372. packageImages(newImgList)
  2373. }
  2374. })
  2375. }).catch(() => {
  2376. vm.$message({
  2377. type: 'info',
  2378. message: '已取消下载'
  2379. });
  2380. });
  2381. })
  2382. });
  2383. */
  2384. </script>
  2385. @include('public.admin.uploadMultimediaImg')
  2386. @endsection