add.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <meta charset="utf-8">
  4. <head th:include="include :: header"></head>
  5. <link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
  6. <body class="white-bg">
  7. <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  8. <form class="form-horizontal m" id="form-job-add">
  9. <div class="form-group">
  10. <label class="col-sm-3 control-label">任务名称:</label>
  11. <div class="col-sm-8">
  12. <input class="form-control" type="text" name="jobName" id="jobName">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-3 control-label">任务组名:</label>
  17. <div class="col-sm-8">
  18. <input class="form-control" type="text" name="jobGroup" id="jobGroup">
  19. </div>
  20. </div>
  21. <div class="form-group">
  22. <label class="col-sm-3 control-label ">方法名称:</label>
  23. <div class="col-sm-8">
  24. <input class="form-control" type="text" name="methodName" id="methodName"/>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-sm-3 control-label ">方法参数:</label>
  29. <div class="col-sm-8">
  30. <input class="form-control" type="text" name="methodParams" id="methodParams"/>
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-sm-3 control-label ">cron表达式:</label>
  35. <div class="col-sm-8">
  36. <input class="form-control" type="text" name="cronExpression" id="cronExpression"/>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="col-sm-3 control-label">执行策略:</label>
  41. <div class="col-sm-8">
  42. <label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="1" /> 继续执行 </label>
  43. <label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="2" /> 一次执行 </label>
  44. <label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <label class="col-sm-3 control-label">状态:</label>
  49. <div class="col-sm-8" th:with="type=${@dict.getType('sys_job_status')}">
  50. <div th:each="dict : ${type}" th:class="${dict['cssClass']}">
  51. <input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
  52. <label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-sm-3 control-label">备注:</label>
  58. <div class="col-sm-8">
  59. <input id="remark" name="remark" class="form-control" type="text">
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <div class="form-control-static col-sm-offset-9">
  64. <button type="submit" class="btn btn-primary">提交</button>
  65. <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  66. </div>
  67. </div>
  68. </form>
  69. </div>
  70. <div th:include="include::footer"></div>
  71. <script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
  72. <script type="text/javascript">
  73. var prefix = ctx + "monitor/job"
  74. $("#form-job-add").validate({
  75. rules:{
  76. jobName:{
  77. required:true,
  78. },
  79. jobGroup:{
  80. required:true,
  81. },
  82. cronExpression:{
  83. required:true,
  84. },
  85. },
  86. submitHandler:function(form){
  87. $.operate.save(prefix + "/add", $('#form-job-add').serialize());
  88. }
  89. });
  90. </script>
  91. </body>
  92. </html>