project.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('重点工程列表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="formId">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <label>工程名称:</label>
  15. <input type="text" name="projectName"/>
  16. </li>
  17. <li>
  18. <label>摄像头名称:</label>
  19. <input type="text" name="cameraName"/>
  20. </li>
  21. <li>
  22. <label>唯一标识:</label>
  23. <input type="text" name="cameraCode"/>
  24. </li>
  25. <li>
  26. <label>预置号:</label>
  27. <input type="text" name="presetPoints"/>
  28. </li>
  29. <li>
  30. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  31. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  32. </li>
  33. </ul>
  34. </div>
  35. </form>
  36. </div>
  37. <div class="btn-group-sm" id="toolbar" role="group">
  38. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:project:add">
  39. <i class="fa fa-plus"></i> 添加
  40. </a>
  41. <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:project:edit">
  42. <i class="fa fa-edit"></i> 修改
  43. </a>
  44. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:project:remove">
  45. <i class="fa fa-remove"></i> 删除
  46. </a>
  47. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:project:export">
  48. <i class="fa fa-download"></i> 导出
  49. </a>
  50. </div>
  51. <div class="col-sm-12 select-table table-striped">
  52. <table id="bootstrap-table"></table>
  53. </div>
  54. </div>
  55. </div>
  56. <th:block th:include="include :: footer" />
  57. <script th:inline="javascript">
  58. var editFlag = [[${@permission.hasPermi('system:project:edit')}]];
  59. var removeFlag = [[${@permission.hasPermi('system:project:remove')}]];
  60. var prefix = ctx + "system/project";
  61. $(function() {
  62. var options = {
  63. url: prefix + "/list",
  64. createUrl: prefix + "/add",
  65. updateUrl: prefix + "/edit/{id}",
  66. removeUrl: prefix + "/remove",
  67. exportUrl: prefix + "/export",
  68. modalName: "重点工程",
  69. columns: [{
  70. checkbox: true
  71. },
  72. {
  73. field: 'id',
  74. title: '',
  75. visible: false
  76. },
  77. {
  78. field: 'projectName',
  79. title: '工程名称'
  80. },
  81. {
  82. field: 'cameraName',
  83. title: '摄像头名称'
  84. },
  85. {
  86. field: 'cameraCode',
  87. title: '唯一标识'
  88. },
  89. {
  90. field: 'presetPoints',
  91. title: '预置号'
  92. },
  93. {
  94. title: '操作',
  95. align: 'center',
  96. formatter: function(value, row, index) {
  97. var actions = [];
  98. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  99. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  100. return actions.join('');
  101. }
  102. }]
  103. };
  104. $.table.init(options);
  105. });
  106. </script>
  107. </body>
  108. </html>