layout-content.blade.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="icon" type="image/png" sizes="16x16" href="/images/icons/SL-icon.png">
  8. <title>{{ isset($title) ? $title : '后台管理' }}</title>
  9. <link rel="stylesheet" href="/plugins/layui-admin/layui/css/layui.css">
  10. <link rel="stylesheet" href="/plugins/fontawesome/css/all.min.css">
  11. <link rel="stylesheet" href="https://at.alicdn.com/t/font_2167475_2x5tvqp7zzu.css">
  12. <link rel="stylesheet" href="/plugins/circle-process-bar/circleProcessBar.min.css">
  13. {{-- <link rel="stylesheet" href="/css/style.css">--}}
  14. <script src="/plugins/jquery/jquery-3.3.1.min.js"></script>
  15. <script src="/plugins/layui-admin/layui/layui.js"></script>
  16. <script src="/plugins/zx-image-view.min.js"></script>
  17. <script src="/plugins/circle-process-bar/circleProcessBar.min.js"></script>
  18. {{--<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>--}}
  19. <style>
  20. .silent-layout-content {
  21. padding: 15px 15px 15px 15px;
  22. }
  23. .silent-layout-content .layui-form-item .layui-form-label {
  24. line-height: 38px;
  25. }
  26. .sg-card-header {
  27. color: #00b6ed;
  28. font-size: 1.1rem;
  29. }
  30. .sg-card-create {
  31. float: right;
  32. display: inline;
  33. }
  34. .layui-form-item.has-error {
  35. color: #FF5722;
  36. }
  37. .layui-form-item.has-error input {
  38. border-color: #FF5722;
  39. }
  40. .sg-create-container {
  41. padding-top: 50px;
  42. }
  43. .layui-form-item .sg-table-multi-select .layui-form-checkbox {
  44. margin-top: 0;
  45. }
  46. .sg-table-multi-select .layui-table {
  47. margin: 0;
  48. border-width: 0;
  49. }
  50. .sg-table-multi-select {
  51. width: 220px;
  52. height: 300px;
  53. overflow-y: scroll;
  54. border: 1px solid #e6e6e6;
  55. }
  56. .sg-table-multi-select::-webkit-scrollbar {
  57. display: none;
  58. }
  59. #sg-search-form .layui-inline {
  60. margin-right: 0;
  61. }
  62. /* 上传图片 */
  63. .sg-image-container-sg {
  64. display: flex;
  65. flex-wrap: wrap;
  66. }
  67. .sg-image-item-sg {
  68. position: relative;
  69. width: 100px;
  70. height: 100px;
  71. border: 2px solid #f2f2f2;
  72. display: flex;
  73. justify-content: center;
  74. align-items: center;
  75. margin-right: 10px;
  76. margin-top: 10px;
  77. overflow: hidden;
  78. }
  79. .sg-image-sg span:hover {
  80. background-color: rgba(0, 0, 0, 0.4);
  81. color: #F0F0F0;
  82. }
  83. .sg-image-sg span {
  84. transition: all 0.5s;
  85. position: absolute;
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. width: 100%;
  90. height: 100%;
  91. z-index: 1000;
  92. font-size: 3.5rem;
  93. color: transparent;
  94. }
  95. .sg-image-item-sg img {
  96. width: 100%;
  97. }
  98. .sg-image-btn-sg {
  99. font-size: 3rem;
  100. color: #c2c2c2;
  101. }
  102. /* sg-data-box */
  103. .sg-data-box {
  104. margin-bottom: 20px;
  105. }
  106. .sg-data-header {
  107. margin-bottom: 2px;
  108. padding: 15px 10px;
  109. background-color: white;
  110. color: grey;
  111. font-size: 1.1rem;
  112. font-weight: bold;
  113. }
  114. .sg-data-title {
  115. padding-left: 10px;
  116. border-left: 3px solid #1E9FFF;
  117. }
  118. .sg-data-body {
  119. display: flex;
  120. flex-wrap: wrap;
  121. }
  122. .sg-data-item {
  123. width: 25%;
  124. }
  125. .sg-data-wrapper {
  126. margin-bottom: 3px;
  127. padding: 30px 15px;
  128. margin-right: 3px;
  129. display: flex;
  130. justify-content: space-between;
  131. }
  132. .sg-data-item:nth-child(4) .sg-data-wrapper {
  133. margin-right: 0;
  134. }
  135. .sg-data-label {
  136. padding-left: 10px;
  137. }
  138. .sg-data-value {
  139. font-size: 1.2rem;
  140. color: #2F4056;
  141. font-weight: bold;
  142. }
  143. /* sg-search-box */
  144. .sg-search-box {
  145. background-color: white;
  146. margin-bottom: 20px;
  147. padding: 24px 10px 5px 30px;
  148. }
  149. .sg-red {
  150. color: #FF5722;
  151. }
  152. .layui-card .layui-table-cell {
  153. word-break: break-all;
  154. padding: 0 4px;
  155. height: auto;
  156. white-space: normal;
  157. }
  158. .layui-table-hover .layui-table-grid-down {
  159. display: none;
  160. }
  161. .help-block {
  162. color: red;
  163. margin-top: 5px;
  164. font-size: .8rem;
  165. }
  166. .sg-dark-green-bg {
  167. background: #009688;
  168. }
  169. .sg-green-bg {
  170. background: #5FB878;
  171. }
  172. .sg-blue-bg {
  173. background: #1E9FFF;
  174. }
  175. .sg-red-bg {
  176. background: #FF5722;
  177. }
  178. .sg-orange-bg {
  179. background: #FFB800;
  180. }
  181. .layui-container > .layui-col-sm8 {
  182. float: none;
  183. }
  184. .layui-container > div {
  185. float: none;
  186. }
  187. .layui-container {
  188. background: white;
  189. }
  190. </style>
  191. @yield('header')
  192. </head>
  193. <body>
  194. <div class="silent-layout-content">
  195. @yield('content')
  196. </div>
  197. <script type="text/javascript">
  198. $(function () {
  199. layui.use(['element', 'layer', 'laydate'], function () {
  200. var layer = layui.layer;
  201. @if($errors->has('sg_error_info'))
  202. layer.msg("{{ $errors->first('sg_error_info') }}", {
  203. icon: 2
  204. });
  205. @endif
  206. @if(session('sg_success_info'))
  207. layer.msg("{{ session('sg_success_info') }}", {
  208. icon: 1
  209. }, function() {
  210. });
  211. var index = parent.layer.getFrameIndex(window.name);
  212. parent.layer.close(index);
  213. @endif
  214. $('.sg-image-container-sg').on('click', '.sg-image-btn-sg', function () {
  215. var that = this,
  216. type = $(that).parent().attr('data-type');
  217. type = type === 'multi' ? 'multi' : 'single';
  218. layer.open({
  219. title: '选择图片',
  220. type: 2,
  221. area: ['90%', '90%'],
  222. content: '/admin/upload-images/index',
  223. btn: ['确认', '取消'],
  224. yes: function(index, layero) {
  225. var body = layer.getChildFrame('body', index),
  226. images = [],
  227. html = '';
  228. $(body).find('.sg-image-item.sg-selected').each(function () {
  229. images.push($(this).attr('data-path'));
  230. });
  231. if(type === 'single') {
  232. images = images.slice(0, 1);
  233. }
  234. $(that).next().val(images.join(','));
  235. $(that).parent().find('.sg-image-sg').remove();
  236. for(var i = 0; i < images.length; ++i) {
  237. html += '<div class="sg-image-item-sg sg-image-sg" data-path="' + images[i] + '"><img src="' + images[i] + '"><span><i class="fas fa-times"></i></span></div>'
  238. }
  239. $(that).before(html);
  240. layer.close(index)
  241. },
  242. btn2: function(index, layero){
  243. layer.close(index)
  244. }
  245. });
  246. }).on('click', '.sg-image-sg', function () {
  247. var $parent = $(this).parent(),
  248. images = [];
  249. $(this).remove();
  250. $parent.find('.sg-image-sg').each(function () {
  251. images.push($(this).attr('data-path')) ;
  252. });
  253. $parent.find('.sg-image-input-sg').val(images.join(','));
  254. });
  255. });
  256. })
  257. </script>
  258. @yield('footer')
  259. </body>
  260. </html>