database_picture.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <style>
  2. #online {
  3. width: 100%;
  4. height: 224px;
  5. padding: 10px 0 0 0;
  6. }
  7. #online #imageList {
  8. width: 100%;
  9. height: 100%;
  10. overflow-x: hidden;
  11. overflow-y: auto;
  12. position: relative;
  13. margin-left: 20px;
  14. }
  15. #online ul {
  16. display: block;
  17. list-style: none;
  18. margin: 0;
  19. padding: 0;
  20. }
  21. #online li {
  22. float: left;
  23. display: block;
  24. list-style: none;
  25. padding: 0;
  26. width: 113px;
  27. height: 113px;
  28. margin: 0 0 9px 9px;
  29. background-color: #eee;
  30. overflow: hidden;
  31. cursor: pointer;
  32. position: relative;
  33. }
  34. #online li img {
  35. cursor: pointer;
  36. }
  37. #online li .icon {
  38. cursor: pointer;
  39. width: 113px;
  40. height: 113px;
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. z-index: 2;
  45. border: 0;
  46. background-repeat: no-repeat;
  47. }
  48. #online li .icon:hover {
  49. width: 107px;
  50. height: 107px;
  51. border: 3px solid #1094fa;
  52. }
  53. #online li.selected .icon {
  54. background-image: url(/static/images/success.png);
  55. background-image: url(images/success.gif)\9;
  56. background-position: 75px 75px;
  57. }
  58. #online li.clearFloat {
  59. float: none;
  60. clear: both;
  61. display: block;
  62. width: 0;
  63. height: 0;
  64. margin: 0;
  65. padding: 0;
  66. }
  67. </style>
  68. <form id="form-uploadurlimg" method="post" action="" enctype="multipart/form-data">
  69. <div class="cl mt-20" id="online">
  70. <div id="imageList">
  71. <ul class="list">
  72. <!-- <li>
  73. <img width="170" height="113" src="/storage/20220223/d5cc488e71c58bb072debe45ed06c6ad.jpg?noCache=1634567323"
  74. _src="/storage/20220223/d5cc488e71c58bb072debe45ed06c6ad.jpg">
  75. <span class="icon"></span>
  76. </li>
  77. -->
  78. <li class="clearFloat"></li>
  79. </ul>
  80. </div>
  81. </div>
  82. </form>
  83. <script type="text/javascript">
  84. function onlinepicture() {
  85. let infoid = $("input[name='infoid']").val();
  86. let cjid = $("input[name='cjid']").val();
  87. $.ajax({
  88. url: '{:url("file_manager/queryList")}',
  89. type: 'POST',
  90. async: true,
  91. cache: false,
  92. data: JSON.stringify({
  93. infoid: infoid,
  94. cjid: cjid
  95. }),
  96. processData: false,
  97. contentType: 'application/json',
  98. dataType: "json",
  99. success: function (res) {
  100. if (res.code == 0) {
  101. html_str = "";
  102. res.list.forEach(element => {
  103. html_str += '<li><img width="170" height="113" src="' + element.filepath + '?noCache=' + element.filetime + '"';
  104. html_str += '_src="' + element.filepath + '" title="'+element.title+'">';
  105. html_str += '<span class="icon"></span></li>';
  106. });
  107. $('ul.list').prepend(html_str);
  108. }
  109. }
  110. });
  111. }
  112. onlinepicture();
  113. </script>