layout.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <div class="layui-layout layui-layout-admin">
  2. <div class="layui-header">
  3. <!-- 头部区域 -->
  4. <ul class="layui-nav layui-layout-left">
  5. <li class="layui-nav-item layadmin-flexible" lay-unselect>
  6. <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
  7. <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
  8. </a>
  9. </li>
  10. <!--<li class="layui-nav-item layui-this layui-hide-xs layui-hide-sm layui-show-md-inline-block">
  11. <a lay-href="" title="">
  12. 控制台
  13. </a>
  14. </li>-->
  15. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  16. <a href="http://www.layui.com/admin/" target="_blank" title="前台">
  17. <i class="layui-icon layui-icon-website"></i>
  18. </a>
  19. </li>
  20. <li class="layui-nav-item" lay-unselect>
  21. <a href="javascript:;" layadmin-event="refresh" title="刷新">
  22. <i class="layui-icon layui-icon-refresh-3"></i>
  23. </a>
  24. </li>
  25. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  26. <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search/keywords=">
  27. </li>
  28. </ul>
  29. <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
  30. <li class="layui-nav-item" lay-unselect>
  31. <a lay-href="app/message/" layadmin-event="message">
  32. <i class="layui-icon layui-icon-notice"></i>
  33. <!-- 如果有新消息,则显示小圆点 -->
  34. <script type="text/html" template lay-url="./json/message/new.js">
  35. {{# if(d.data.newmsg){ }}
  36. <span class="layui-badge-dot"></span>
  37. {{# } }}
  38. </script>
  39. </a>
  40. </li>
  41. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  42. <a href="javascript:;" layadmin-event="theme">
  43. <i class="layui-icon layui-icon-theme"></i>
  44. </a>
  45. </li>
  46. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  47. <a href="javascript:;" layadmin-event="note">
  48. <i class="layui-icon layui-icon-note"></i>
  49. </a>
  50. </li>
  51. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  52. <a href="javascript:;" layadmin-event="fullscreen">
  53. <i class="layui-icon layui-icon-screen-full"></i>
  54. </a>
  55. </li>
  56. <li class="layui-nav-item" lay-unselect>
  57. <!--<script type="text/html" template lay-url="./json/user/session.js" -->
  58. <script type="text/html" template lay-type="post" lay-url="/login/token"
  59. lay-done="layui.element.render('nav', 'layadmin-layout-right');">
  60. <a href="javascript:;">
  61. <cite>{{ d.data.username }}</cite>
  62. </a>
  63. <dl class="layui-nav-child">
  64. <!--<dd><a lay-href="set/user/info">基本资料</a></dd>-->
  65. <dd><a lay-href="set/user/password">修改密码</a></dd>
  66. <hr>
  67. <dd layadmin-event="logout" style="text-align: center;"><a>退出</a></dd>
  68. </dl>
  69. </script>
  70. </li>
  71. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  72. <!--<a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>-->
  73. <a href="javascript:;" layadmin-event=""><i class="layui-icon layui-icon-more-vertical"></i></a>
  74. </li>
  75. <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
  76. <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
  77. </li>
  78. </ul>
  79. </div>
  80. <!-- 侧边菜单 -->
  81. <div class="layui-side layui-side-menu">
  82. <div class="layui-side-scroll">
  83. <!--<script type="text/html" template lay-url="./json/menu.js?v={{ layui.admin.v }}"-->
  84. <script type="text/html" template lay-url="/login/menu?v={{ layui.admin.v }}"
  85. lay-done="layui.element.render('nav', 'layadmin-system-side-menu');" id="TPL_layout">
  86. <!--<script type="text/html" template lay-url="/login/menu" lay-done="layui.element.render('nav', 'layadmin-system-side-menu');" id="TPL_layout">-->
  87. <div class="layui-logo" lay-href="">
  88. <!--<span>{{ layui.setter.name || 'layuiAdmin' }}</span>-->
  89. <span>宝盈车辆检测站</span>
  90. </div>
  91. <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
  92. {{#
  93. var path = layui.router().path
  94. ,pathURL = layui.admin.correctRouter(path.join('/'))
  95. ,dataName = layui.setter.response.dataName;
  96. layui.each(d[dataName], function(index, item){
  97. var hasChildren = typeof item.list === 'object' && item.list.length > 0
  98. ,classSelected = function(){
  99. var match = path[0] == item.name || (index == 0 && !path[0])
  100. || (item.jump && pathURL == layui.admin.correctRouter(item.jump)) || item.spread;
  101. if(match){
  102. return hasChildren ? 'layui-nav-itemed' : 'layui-this';
  103. }
  104. return '';
  105. }
  106. ,url = (item.jump && typeof item.jump === 'string') ? item.jump : item.name;
  107. }}
  108. <li data-name="{{ item.name || '' }}" data-jump="{{ item.jump || '' }}" class="layui-nav-item {{ classSelected() }}">
  109. <a href="javascript:;" {{ hasChildren ? '' : 'lay-href="'+ url +'"' }} lay-tips="{{ item.title }}" lay-direction="2">
  110. <i class="layui-icon {{ item.icon }}"></i>
  111. <cite>{{ item.title }}</cite>
  112. </a>
  113. {{# if(hasChildren){ }}
  114. <dl class="layui-nav-child">
  115. {{# layui.each(item.list, function(index2, item2){
  116. var hasChildren2 = typeof item2.list == 'object' && item2.list.length > 0
  117. ,classSelected2 = function(){
  118. var match = (path[0] == item.name && path[1] == item2.name)
  119. || (item2.jump && pathURL == layui.admin.correctRouter(item2.jump)) || item2.spread;
  120. if(match){
  121. return hasChildren2 ? 'layui-nav-itemed' : 'layui-this';
  122. }
  123. return '';
  124. }
  125. ,url2 = (item2.jump && typeof item2.jump === 'string')
  126. ? item2.jump
  127. : [item.name, item2.name, ''].join('/');
  128. }}
  129. <dd data-name="{{ item2.name || '' }}" data-jump="{{ item2.jump || '' }}"
  130. {{ classSelected2() ? ('class="'+ classSelected2() +'"') : '' }}>
  131. <a href="javascript:;" {{ hasChildren2 ? '' : 'lay-href="'+ url2 +'"' }}>{{ item2.title }}</a>
  132. {{# if(hasChildren2){ }}
  133. <dl class="layui-nav-child">
  134. {{# layui.each(item2.list, function(index3, item3){
  135. var match = (path[0] == item.name && path[1] == item2.name && path[2] == item3.name)
  136. || (item3.jump && pathURL == layui.admin.correctRouter(item3.jump))
  137. ,url3 = (item3.jump && typeof item3.jump === 'string')
  138. ? item3.jump
  139. : [item.name, item2.name, item3.name].join('/')
  140. }}
  141. <dd data-name="{{ item3.name || '' }}" data-jump="{{ item3.jump || '' }}"
  142. {{ match ? 'class="layui-this"' : '' }}>
  143. <a href="javascript:;" lay-href="{{ url3 }}" {{ item3.iframe ? 'lay-iframe="true"' : '' }}>{{ item3.title }}</a>
  144. </dd>
  145. {{# }); }}
  146. </dl>
  147. {{# } }}
  148. </dd>
  149. {{# }); }}
  150. </dl>
  151. {{# } }}
  152. </li>
  153. {{# }); }}
  154. </ul>
  155. </script>
  156. </div>
  157. </div>
  158. <!-- 页面标签 -->
  159. <script type="text/html" template lay-done="layui.element.render('nav', 'layadmin-pagetabs-nav')">
  160. {{# if(layui.setter.pageTabs){ }}
  161. <div class="layadmin-pagetabs" id="LAY_app_tabs">
  162. <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
  163. <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
  164. <div class="layui-icon layadmin-tabs-control layui-icon-down">
  165. <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
  166. <li class="layui-nav-item" lay-unselect>
  167. <a href="javascript:;"></a>
  168. <dl class="layui-nav-child layui-anim-fadein">
  169. <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
  170. <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
  171. <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
  172. </dl>
  173. </li>
  174. </ul>
  175. </div>
  176. <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
  177. <ul class="layui-tab-title" id="LAY_app_tabsheader">
  178. <li lay-id="/"><i class="layui-icon layui-icon-home"></i></li>
  179. </ul>
  180. </div>
  181. </div>
  182. {{# } }}
  183. </script>
  184. <!-- 主体内容 -->
  185. <div class="layui-body" id="LAY_app_body">
  186. <div class="layadmin-tabsbody-item layui-show"></div>
  187. </div>
  188. <!-- 辅助元素,一般用于移动设备下遮罩 -->
  189. <div class="layadmin-body-shade" layadmin-event="shade"></div>
  190. </div>