layout-content.blade.php 8.2 KB

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