list.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
  4. <head th:replace="admin/common/html/head :: head_Normal(~{::title},~{::link},~{::style})">
  5. <title th:text=${title}></title>
  6. <!-- 这儿引用单独的css link -->
  7. <!-- Ladda for Bootstrap 3按钮加载进度插件 -->
  8. <link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
  9. <!-- bootstrap-table表单样式 -->
  10. <link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
  11. <style type="text/css">
  12. /**
  13. *这里写单独的css样式
  14. */
  15. </style>
  16. </head>
  17. <body id="listbody">
  18. <!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
  19. <!-- 右边内容 -->
  20. <div class="wrap-fluid">
  21. <div class="container-fluid paper-wrap bevel tlbr">
  22. <!-- 内容 -->
  23. <!--标题 通用-->
  24. <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
  25. </div>
  26. <!-- 结束标题 通用-->
  27. <div class="content-wrap">
  28. <!-- 结束内容 -->
  29. <div class="row">
  30. <div class="col-sm-12">
  31. <!-- 搜索条件 -->
  32. <div class="nest" id="inlineClose">
  33. <div class="title-alt">
  34. <h6>搜索条件</h6>
  35. <div class="titleClose">
  36. <a class="gone" href="#inlineClose">
  37. <span class="entypo-cancel"></span>
  38. </a>
  39. </div>
  40. <div class="titleToggle">
  41. <a class="nav-toggle-alt" href="#search_div" >
  42. <span class="entypo-down-open"></span>
  43. </a>
  44. </div>
  45. </div>
  46. <div class="body-nest" id="search_div" style="display: none">
  47. <div class="form_left">
  48. <form role="form" class="form-inline">
  49. <div class="form-group">
  50. <label for="exampleInputEmail2" class="sr-only">搜索标题</label>
  51. <input type="text" name="searchText" placeholder="搜索标题"class="form-control">
  52. </div>
  53. <button onclick="$.table.search(this)" class="btn btn-success" type="button"><i class="fa fa-search"></i>&nbsp;搜索</button>
  54. </form>
  55. </div>
  56. </div>
  57. </div>
  58. <!-- END搜索条件 -->
  59. <!-- 空白页开始-->
  60. <div class="nest" id="Blank_PageClose">
  61. <div class="title-alt">
  62. <h6>表单</h6>
  63. <div class="titleClose">
  64. <a class="gone" href="#Blank_PageClose">
  65. <span class="entypo-cancel"></span>
  66. </a>
  67. </div>
  68. <div class="titleToggle">
  69. <a class="nav-toggle-alt" href="#Blank_Page_Content">
  70. <span class="entypo-up-open"></span>
  71. </a>
  72. </div>
  73. </div>
  74. <div class="body-nest" id="Blank_Page_Content">
  75. <!-- 工具条 -->
  76. <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
  77. <button onclick="$.operate.add()" type="button" class="btn btn-primary">
  78. <span class="entypo-plus-squared"></span>&nbsp;&nbsp;新增
  79. </button>
  80. <button onclick="$.operate.batRemove()" type="button" class="btn btn-info">
  81. <span class="entypo-trash"></span>&nbsp;&nbsp;删除
  82. </button>
  83. </div>
  84. <!-- 工具条 end-->
  85. <table id="dataTable" class="table-striped footable-res footable metro-blue" data-page-size="6">
  86. </table>
  87. </div>
  88. </div>
  89. </div>
  90. <!-- 空白页结束 -->
  91. </div>
  92. <!-- 结束内容 -->
  93. </div>
  94. </div>
  95. </div>
  96. <!-- 结束右边内容 -->
  97. <!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 END# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
  98. <!-- 右侧隐藏滑块内容 -->
  99. <div th:include="admin/common/html/rightHide :: rightHide">
  100. </div>
  101. <!-- END 右侧隐藏滑块内容-->
  102. <!-- 通用js -->
  103. <div th:include="admin/common/html/js :: onload_js">
  104. </div>
  105. <!-- bootstarp 表格 -->
  106. <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
  107. <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
  108. <script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
  109. <!-- jquery-export 表格导出插件 -->
  110. <script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/bootstrap-table-export.js}" type="text/javascript"></script>
  111. <script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/tableExport.js}" type="text/javascript"></script>
  112. <!-- 弹窗 -->
  113. <script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
  114. <!-- 遮罩层 -->
  115. <script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
  116. <script type="text/javascript" th:inline="javascript">
  117. var types = [[${@dict.getType('sys_notice_type')}]];
  118. var dataUrl=window.rootPath+"/SysNoticeController/list";
  119. var removeUrl=window.rootPath+"/SysNoticeController/remove";
  120. var createUrl=window.rootPath+"/SysNoticeController/add";
  121. var updateUrl=window.rootPath+"/SysNoticeController/edit/{id}";
  122. var exportUrl=window.rootPath+"/SysNoticeController/export";
  123. var options = {
  124. dataUrl: dataUrl,
  125. createUrl: createUrl,
  126. updateUrl: updateUrl,
  127. removeUrl:removeUrl,
  128. exportUrl: exportUrl,
  129. sortName: "roleSort",
  130. modalName: "公告",
  131. search: false,
  132. dataColumns: [
  133. {
  134. checkbox: true
  135. },
  136. {
  137. field: 'id',
  138. title: '序号',
  139. visible: false, //隐藏
  140. //searchable: false,//搜索
  141. //sortable:false,//设置true为允许列可以排序
  142. //order: asc //排序顺序
  143. },
  144. {
  145. field: 'title',
  146. title: '标题',
  147. //visible: false, //隐藏
  148. //searchable: false,//搜索
  149. //sortable:false,//设置true为允许列可以排序
  150. //order: asc //排序顺序
  151. },
  152. {
  153. field: 'content',
  154. title: '内容',
  155. formatter: function (value, row, index) {
  156. var actions = [];
  157. var len=value.length;
  158. if(len>10){
  159. actions.push(value.substring(0,8)+"...");
  160. }else{
  161. actions.push(value);
  162. }
  163. return actions.join('');
  164. }
  165. //visible: false, //隐藏
  166. //searchable: false,//搜索
  167. //sortable:false,//设置true为允许列可以排序
  168. //order: asc //排序顺序
  169. },
  170. {
  171. field: 'type',
  172. title: '类型',
  173. formatter: function (value, row, index) {
  174. return $.table.selectDictLabel(types, value);
  175. }
  176. //visible: false, //隐藏
  177. //searchable: false,//搜索
  178. //sortable:false,//设置true为允许列可以排序
  179. //order: asc //排序顺序
  180. },
  181. {
  182. field: 'createUsername',
  183. title: '创建人',
  184. //visible: false, //隐藏
  185. //searchable: false,//搜索
  186. //sortable:false,//设置true为允许列可以排序
  187. //order: asc //排序顺序
  188. },
  189. {
  190. field: 'createTime',
  191. title: '创建时间',
  192. //visible: false, //隐藏
  193. //searchable: false,//搜索
  194. //sortable:false,//设置true为允许列可以排序
  195. //order: asc //排序顺序
  196. },
  197. /*
  198. 参照修改注释
  199. {
  200. field: 'xxstate',
  201. title: 'xx状态',
  202. formatter: function (value, row, index) {
  203. var actions = [];
  204. if(value==0){
  205. actions.push('<span class="label label-primary">关闭</span>');
  206. }else if(value==1){
  207. actions.push('<span class="label label-danger">开启</span>');
  208. }
  209. return actions.join('');
  210. }
  211. }
  212. */
  213. {
  214. title: '操作',
  215. formatter: function (value, row, index) {
  216. var id = row.id;
  217. var actions = [];
  218. actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  219. return actions.join('');
  220. }
  221. }]
  222. };
  223. $(function(){
  224. var oTab=$.table.oTableInit(options);
  225. oTab.Init();
  226. })
  227. $.modal.open=function(title, url, width, height) {
  228. if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
  229. width = "auto";
  230. height = "auto";
  231. }
  232. if ($.common.isEmpty(title)) {
  233. title = false;
  234. }
  235. if ($.common.isEmpty(url)) {
  236. url = "404.html";
  237. }
  238. if ($.common.isEmpty(width)) {
  239. width = 800;
  240. }
  241. if ($.common.isEmpty(height)) {
  242. height = ($(window).height() - 50);
  243. }
  244. var perContent =layer.open({
  245. type: 2,
  246. area: ['100%', '100%'],
  247. fix: false,
  248. maxmin: true,
  249. shade: 0.3,
  250. title: title,
  251. content: url
  252. })
  253. layer.full(perContent);
  254. }
  255. </script>
  256. </body>
  257. </html>