config.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>配置</title>
  7. <style>
  8. multiple:hover .dropdown-clear-all, .dropdown-single:hover .dropdown-clear-all {
  9. display: none;
  10. }
  11. .line {
  12. display: block;
  13. text-align: left;
  14. background-color: #fff;
  15. color: #333;
  16. border-bottom: 1px solid #0a6999;
  17. border-color: #fff;
  18. border-bottom: 1px solid #0a6999;
  19. margin-top: 10px;
  20. vertical-align: middle;
  21. padding: 4px 12px;
  22. height: 31px;
  23. line-height: 31px;
  24. font-size: 14px;
  25. font-weight: bold;
  26. }
  27. </style>
  28. </head>
  29. <body layout:fragment="content">
  30. <article class="page-container">
  31. <form class="form form-horizontal" id="form-add">
  32. <th:block th:each="item,itemStat: ${list}">
  33. <div class="row cl">
  34. <label class="form-label col-xs-4 col-sm-2">[[${item.name}]]:</label>
  35. <div class="formControls col-xs-8 col-sm-9">
  36. <input type="text" class="input-text" th:value="${item.value}" th:name="'configList['+${itemStat.index}+'].value'"/>
  37. <input type="text" hidden th:value="${item.id}" th:name="'configList['+${itemStat.index}+'].id'"/>
  38. <input type="text" hidden th:value="${item.name}" th:name="'configList['+${itemStat.index}+'].name'"/>
  39. <input type="text" hidden th:value="${item.type}" th:name="'configList['+${itemStat.index}+'].type'"/>
  40. </div>
  41. </div>
  42. </th:block>
  43. <div class="row cl text-c" style="background-color: white">
  44. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  45. <a onclick="save()" class="btn btn-secondary radius"><i class="Hui-iconfont">&#xe632;</i>保存</a>
  46. </div>
  47. </div>
  48. </form>
  49. </article>
  50. <script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
  51. <script th:inline="javascript">
  52. //保存草稿
  53. function save() {
  54. $("#form-add").ajaxSubmit({
  55. type: 'post',
  56. url: pagePath + "/land_supply/config/save",
  57. dataType: "json",
  58. data: {},
  59. success: function (data) {
  60. if (data.success) {
  61. succeedMessage(data.message);
  62. setTimeClose();
  63. } else {
  64. // $(form).find(":submit").attr("disabled", false);
  65. errorMessage(data.message);
  66. }
  67. },
  68. error: function () {
  69. errorMessage('系统错误!');
  70. }
  71. });
  72. }
  73. </script>
  74. </body>
  75. </html>