database_picture.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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: left;
  60. clear: both;
  61. display: block;
  62. width: 113px;
  63. height: 113px;
  64. margin: 0 0 9px 9px;
  65. padding: 0;
  66. }
  67. </style>
  68. <div class="cl mt-20" id="online">
  69. <div id="imageList">
  70. <ul class="list">
  71. <!-- <li>
  72. <img width="170" height="113" src="/storage/20220223/d5cc488e71c58bb072debe45ed06c6ad.jpg?noCache=1634567323"
  73. _src="/storage/20220223/d5cc488e71c58bb072debe45ed06c6ad.jpg">
  74. <span class="icon"></span>
  75. </li>
  76. -->
  77. <li class="clearFloat"></li>
  78. </ul>
  79. </div>
  80. </div>
  81. <script type="text/javascript">
  82. $(function () {
  83. $.Huitab("#tab-img .tabBar span", "#tab-img .tabCon", "current", "click", "0");
  84. $(document).on("click", "#online li", function () {
  85. $("#online li").removeClass('selected');
  86. $(this).addClass('selected');
  87. img = $(this).children('img').attr('_src');
  88. $("#online_file").val(img);
  89. });
  90. });
  91. function onlinepicture() {
  92. let infoid = $("input[name='infoid']").val();
  93. let cjid = $("input[name='cjid']").val();
  94. $.ajax({
  95. url: '{:url("file_manager/queryList")}',
  96. type: 'POST',
  97. async: true,
  98. cache: false,
  99. data: JSON.stringify({
  100. infoid: infoid,
  101. cjid: cjid
  102. }),
  103. processData: false,
  104. contentType: 'application/json',
  105. dataType: "json",
  106. success: function (res) {
  107. if (res.code == 0) {
  108. html_str = "";
  109. res.list.forEach(element => {
  110. html_str += '<li><img width="170" height="113" src="' + element.filepath + '?noCache=' + element.filetime + '"';
  111. html_str += '_src="' + element.filepath + '" title="'+element.title+'">';
  112. html_str += '<span class="icon"></span></li>';
  113. });
  114. $('ul.list').prepend(html_str);
  115. }
  116. }
  117. });
  118. }
  119. onlinepicture();
  120. </script>