列表页面

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>商户管理系统</title>
  6. <link rel="stylesheet" href="${basePath}/css/layui.css">
  7. <%
  8. layout("/page/tags/header.html",{}){}
  9. %>
  10. </head>
  11. <body>
  12. <table id="listGrid" class="easyui-datagrid" title="员工管理"
  13. style="height: 90%;" url="${basePath}ms/staff/findPage"
  14. pagination="true" rownumbers="true" fitColumns="true"
  15. singleSelect="true" pageSize="10" striped="true" toolbar="#toolbar">
  16. <thead>
  17. <tr>
  18. <th align="center" field="loginName" width="19%" sortable="false">登录名</th>
  19. <th align="center" field="staffName" width="23%" sortable="false">姓名</th>
  20. <th align="center" field="staffMobile" width="19%" sortable="false">电话</th>
  21. <th align="center" field="createTime" width="19%" sortable="false">创建时间</th>
  22. <th align="center" field="updateTime" width="19%" sortable="false">修改时间</th>
  23. </tr>
  24. </thead>
  25. </table>
  26. <div id="toolbar">
  27. <div style="margin-bottom: 5px">
  28. <input id="StaffNameF" name="staffNameF" type="text" placeholder="姓名">
  29. <input id="StaffMobileF" name="staffMobileF" type="text" placeholder="电话">
  30. <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true"
  31. onclick="reload()">查询</a>
  32. <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
  33. onclick="add()">新增</a>
  34. <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
  35. onclick="addSelectRowFun('listGrid',update);">修改</a>
  36. <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
  37. onclick="addSelectRowFun('listGrid',view)">查看</a>
  38. <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
  39. onclick="pubDel('listGrid','${basePath}mch/staff/delStaff?id=','id');">删除</a>
  40. </div>
  41. </div>
  42. <div id="addOrUpdateDialog" class="easyui-dialog" title="商户管理"
  43. data-options="iconCls:'icon-save'" closed="true"
  44. style="width: 820px; height: 410px; padding: 10px"
  45. buttons="#dlg-buttons"></div>
  46. <div id="dlg-buttons">
  47. <a href="#" id="subBtn" class="easyui-linkbutton" onclick="save()">保存</a>
  48. <a href="#" class="easyui-linkbutton" onclick="closeDialog()">返回</a>
  49. </div>
  50. <script type="text/javascript">
  51. //重新加载
  52. function reload() {
  53. $('#listGrid').datagrid('load', {
  54. staffName : $('#staffNameF').val(),
  55. staffMobile : $('#staffMobileF').val()
  56. });
  57. }
  58. function view(row) {
  59. openDialog('${basePath}/b/page-ms/staff_add_update?isView=true&id=' + row.id, '查看');
  60. }
  61. function add(){
  62. openDialog('${basePath}/b/page-ms/staff_add_update?isAdd=true', '添加');
  63. }
  64. function update(row) {
  65. openDialog('${basePath}/b/page-ms/staff_add_update?isEdit=true&id=' + row.id, '修改');
  66. }
  67. </script>
  68. </body>
  69. </html>

表单页面

  1. <%
  2. include("/page/tags/form_include.html"){}
  3. %>
  4. <form id="addUpdateForm" method="post">
  5. <div class="fitem">
  6. <#InputFormTag name='menuName' title='菜单名称' required='true' />
  7. <#InputFormTag name='namespace' title='Namespace' required='true' />
  8. </div>
  9. <#BigInputFormTag name='menuUrl' title='链接地址' required='true' />
  10. <div class="fitem">
  11. <#WordBookFormTag name='isDisable' title='是否禁用' code='yesOrNo' required='true' />
  12. <#WordBookFormTag name='menuState' title='是否隐藏' code='yesOrNo' required='true' />
  13. </div>
  14. <#UploadFormTag name='image' title='LOGO' placeholder="请上传菜单LOGO"/>
  15. <div class="fitem">
  16. <#SelectFormTag name='serverNameId' title='所在服务器' url='${basePath}/ms/menuServer/getData' required='true' valueField= 'id'
  17. textField= 'serverName' />
  18. <#InputFormTag name='orderIndex' title='菜单序号' required='true' dataType="n"/>
  19. </div>
  20. <div class="fitem">
  21. <#SelectFormTag name='systemId' title='子系统' url='${basePath}/ms/sysSystem/getSystemComBoxData' required='true' valueField= 'id'
  22. textField= 'text' />
  23. <#WordBookFormTag name='menuType' title='菜单类型' code='menu_type' required='true' />
  24. </div>
  25. <#HideFormTag type="hidden" name="fatherMenuId" value="${parameter.parentId}"/>
  26. <div class="fitem ">
  27. <center class="fitem-footer">
  28. <a href="#" class="easyui-linkbutton btn btn-suc" onclick="save()">保存</a>
  29. <a href="#" class="easyui-linkbutton btn btn-can" onclick="closeDialog()">返回</a>
  30. </center>
  31. </div>
  32. </form>
  33. <script>
  34. $(function () {
  35. $('#isDisable').combobox('setValue',0);
  36. $('#menuState').combobox('setValue',0);
  37. })
  38. function saveAfterSuccessHandler(){
  39. document.getElementById('left').contentWindow.reloadData();
  40. document.getElementById('rightFrame').contentWindow.reload();
  41. }
  42. </script>
  43. <%
  44. layout("/page/tags/add_update_tag.html",{'nameSpace':'sysMenu','idField':'menuId'}){}
  45. %>

参考:https://gitee.com/fhs-opensource/fhs-framework/blob/master/fhs_framework_parent/src/main/resources/META-INF/resources/page/tags/add_update_tag.html

权限控制

使用#shiro tag即可控制权限,如果没此权限则节点html 不会展示

  1. <#shiro name="staff:see">
  2. <a href="javascript:void(0)" class="easyui-linkbutton searchBTN"
  3. iconCls="icon-search" plain="true" onclick="reload()">查询</a>
  4. </#shiro>