Forráskód Böngészése

定时任务支持在线生成cron表达式

RuoYi 3 éve
szülő
commit
4ec04eda71

+ 149 - 0
ruoyi-admin/src/main/resources/static/css/zen-checkbox.css

@@ -0,0 +1,149 @@
+@font-face {
+	font-family:ZenIcon;src:url(../fonts/zenicon.woff?v=2.2.0) format('woff')
+}
+
+.checkbox-primary,.radio-primary {
+	position: relative;
+	display: block
+}
+
+.checkbox-primary>input,.radio-primary>input {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: 3;
+	width: 100%;
+	width: 20px;
+	height: 100%;
+	margin: 0;
+	opacity: 0
+}
+
+.checkbox-primary>label,.radio-primary>label {
+	padding-left: 25px;
+	font-weight: 400;
+	cursor: pointer
+}
+
+.checkbox-primary>label:after,.checkbox-primary>label:before,.radio-primary>label:after,.radio-primary>label:before {
+	position: absolute;
+	top: 2px;
+	right: 0;
+	left: 0;
+	display: block;
+	width: 16px;
+	height: 16px;
+	line-height: 16px;
+	text-align: center;
+	content: ' ';
+	border-radius: 2px
+}
+
+.checkbox-primary>label:after,.radio-primary>label:after {
+	z-index: 1;
+	border: 1px solid gray;
+	-webkit-transition: .4s cubic-bezier(.175,.885,.32,1);
+	-o-transition: .4s cubic-bezier(.175,.885,.32,1);
+	transition: .4s cubic-bezier(.175,.885,.32,1);
+	-webkit-transition-property: border,background-color;
+	-o-transition-property: border,background-color;
+	transition-property: border,background-color
+}
+
+.checkbox-primary>label:before,.radio-primary>label:before {
+	top: 3px;
+	z-index: 2;
+	font-family: ZenIcon;
+	font-size: 14px;
+	font-style: normal;
+	font-weight: 400;
+	font-variant: normal;
+	line-height: 1;
+	text-transform: none;
+	content: '\e60d';
+	opacity: 0;
+	-webkit-transition: .2s cubic-bezier(.175,.885,.32,1);
+	-o-transition: .2s cubic-bezier(.175,.885,.32,1);
+	transition: .2s cubic-bezier(.175,.885,.32,1);
+	-webkit-transition-property: opacity,-webkit-transform;
+	-o-transition-property: opacity,-o-transform;
+	transition-property: opacity,-webkit-transform;
+	transition-property: opacity,transform;
+	transition-property: opacity,transform,-webkit-transform,-o-transform;
+	-webkit-transform: scale(0);
+	-ms-transform: scale(0);
+	-o-transform: scale(0);
+	transform: scale(0);
+	speak: none;
+	-webkit-font-smoothing: antialiased;
+	-moz-osx-font-smoothing: grayscale
+}
+
+.checkbox-primary.checked>label:after,.checkbox-primary>input:checked+label:after,.radio-primary.checked>label:after,.radio-primary>input:checked+label:after {
+	background-color: #3280fc;
+	border-color: #3280fc;
+	border-width: 4px
+}
+
+.checkbox-primary.checked>label:before,.checkbox-primary>input:checked+label:before,.radio-primary.checked>label:before,.radio-primary>input:checked+label:before {
+	color: #fff;
+	opacity: 1;
+	-webkit-transform: scale(1);
+	-ms-transform: scale(1);
+	-o-transform: scale(1);
+	transform: scale(1)
+}
+
+.checkbox-primary.focus>label:after,.checkbox-primary>input:focus+label:after,.radio-primary.focus>label:after,.radio-primary>input:focus+label:after {
+	border-color: #3280fc;
+	-webkit-box-shadow: 0 0 8px #3280fc;
+	box-shadow: 0 0 8px #3280fc
+}
+
+.checkbox-primary input:disabled+label:after,.checkbox-primary.disabled>label:after,.radio-primary input:disabled+label:after,.radio-primary.disabled>label:after {
+	background-color: #e5e5e5;
+	border-color: #bbb
+}
+
+.checkbox-primary input:disabled:checked+label:after,.checkbox-primary.checked.disabled>label:after,.radio-primary input:disabled:checked+label:after,.radio-primary.checked.disabled>label:after {
+	background-color: #bbb
+}
+
+.radio-primary>label:after {
+	border-radius: 50%
+}
+
+.radio-primary>label:before {
+	top: 7px;
+	left: 5px;
+	width: 6px;
+	height: 6px;
+	content: ' ';
+	border: 0;
+	border-radius: 50%
+}
+
+.radio-primary.checked>label:after,.radio-primary>input:checked+label:after {
+	background-color: transparent;
+	border-color: #3280fc;
+	border-width: 2px
+}
+
+.radio-primary.checked>label:before,.radio-primary>input:checked+label:before {
+	background-color: #3280fc
+}
+
+.radio-primary input:disabled:checked+label:after,.radio-primary.checked.disabled>label:after {
+	background-color: transparent;
+	border-color: #bbb
+}
+
+.radio-primary input:disabled:checked+label:before,.radio-primary.checked.disabled>label:before {
+	background-color: #bbb
+}
+
+.tab-cron .tab-pane .tabsecondchk .checkbox-primary,.tab-qqskey .tab-pane .tabsecondchk .checkbox-primary {
+	width: 50px;
+	display: inline-block;
+	margin-bottom: 10px
+}

BIN
ruoyi-admin/src/main/resources/static/fonts/zenicon.woff


+ 926 - 0
ruoyi-admin/src/main/resources/static/js/cron.js

@@ -0,0 +1,926 @@
+$().ready(function () {
+    $("#unrunBtn").click(function () {
+        var str = $("#cron").val();
+        var str_arr = str.split(" ");
+        try {
+            $("#v_second").val(str_arr[0])
+            $("#v_min").val(str_arr[1])
+            $("#v_hour").val(str_arr[2])
+            $("#v_day").val(str_arr[3])
+            $("#v_month").val(str_arr[4])
+            $("#v_week").val(str_arr[5])
+            $("#v_year").val(str_arr[6])
+        } catch (e) {
+        }
+    });
+    //second
+    $("#sec_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_second").val("*");
+            gen_cron();
+        }
+    });
+    $("#sec_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_sec_circle();
+        }
+    });
+    $("#sec_circle1").change(function () {
+        if ($("#sec_circle").prop('checked')) {
+            change_sec_circle();
+        }
+    });
+    $("#sec_circle2").change(function () {
+        if ($("#sec_circle").prop('checked')) {
+            change_sec_circle();
+        }
+    });
+    $("#sec_per").click(function () {
+        if ($(this).prop('checked')) {
+            change_sec_per();
+        }
+    });
+    $("#sec_per1").change(function () {
+        if ($("#sec_per").prop('checked')) {
+            change_sec_per();
+        }
+    });
+    $("#sec_per2").change(function () {
+        if ($("#sec_per").prop('checked')) {
+            change_sec_per();
+        }
+    });
+    $("#sec_assign").click(function () {
+        if ($("#sec_assign").prop('checked')) {
+            change_sec_assign();
+        }
+    });
+    $("input[name='zd_second']").click(function () {
+        if ($("#sec_assign").prop('checked')) {
+            change_sec_assign();
+        }
+    });
+
+    //minute
+    $("#min_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_min").val("*");
+            gen_cron();
+        }
+    });
+    $("#min_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_min_circle();
+        }
+    });
+    $("#min_circle1").change(function () {
+        if ($("#min_circle").prop('checked')) {
+            change_min_circle();
+        }
+    });
+    $("#min_circle2").change(function () {
+        if ($("#min_circle").prop('checked')) {
+            change_min_circle();
+        }
+    });
+    $("#min_per").click(function () {
+        if ($(this).prop('checked')) {
+            change_min_per();
+        }
+    });
+    $("#min_per1").change(function () {
+        if ($("#min_per").prop('checked')) {
+            change_min_per();
+        }
+    });
+    $("#min_per2").change(function () {
+        if ($("#min_per").prop('checked')) {
+            change_min_per();
+        }
+    });
+    $("#min_assign").click(function () {
+        if ($("#min_assign").prop('checked')) {
+            change_min_assign();
+        }
+    });
+    $("input[name='zd_minute']").click(function () {
+        if ($("#min_assign").prop('checked')) {
+            change_min_assign();
+        }
+    });
+
+    //hour
+    $("#hour_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_hour").val("*");
+            gen_cron();
+        }
+    });
+    $("#hour_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_hour_circle();
+        }
+    });
+    $("#hour_circle1").change(function () {
+        if ($("#hour_circle").prop('checked')) {
+            change_hour_circle();
+        }
+    });
+    $("#hour_circle2").change(function () {
+        if ($("#hour_circle").prop('checked')) {
+            change_hour_circle();
+        }
+    });
+    $("#hour_per").click(function () {
+        if ($(this).prop('checked')) {
+            change_hour_per();
+        }
+    });
+    $("#hour_per1").change(function () {
+        if ($("#hour_per").prop('checked')) {
+            change_hour_per();
+        }
+    });
+    $("#hour_per2").change(function () {
+        if ($("#hour_per").prop('checked')) {
+            change_hour_per();
+        }
+    });
+    $("#hour_assign").click(function () {
+        if ($("#hour_assign").prop('checked')) {
+            change_hour_assign();
+        }
+    });
+    $("input[name='zd_hour']").click(function () {
+        if ($("#hour_assign").prop('checked')) {
+            change_hour_assign();
+        }
+    });
+
+    //day
+    $("#day_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_day").val("*");
+            gen_cron();
+        }
+    });
+    $("#day_no").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_day").val("?");
+            gen_cron();
+        }
+    });
+    $("#day_last").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_day").val("L");
+            gen_cron();
+        }
+    });
+    $("#day_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_day_circle();
+        }
+    });
+    $("#day_circle1").change(function () {
+        if ($("#day_circle").prop('checked')) {
+            change_day_circle();
+        }
+    });
+    $("#day_circle2").change(function () {
+        if ($("#day_circle").prop('checked')) {
+            change_day_circle();
+        }
+    });
+    $("#day_per").click(function () {
+        if ($(this).prop('checked')) {
+            change_day_per();
+        }
+    });
+    $("#day_per1").change(function () {
+        if ($("#day_per").prop('checked')) {
+            change_day_per();
+        }
+    });
+    $("#day_per2").change(function () {
+        if ($("#day_per").prop('checked')) {
+            change_day_per();
+        }
+    });
+    $("#day_work").click(function () {
+        if ($("#day_work").prop('checked')) {
+            change_day_work();
+        }
+    });
+    $("#day_work1").change(function () {
+        if ($("#day_work").prop('checked')) {
+            change_day_work();
+        }
+    });
+    $("#day_assign").click(function () {
+        if ($("#day_assign").prop('checked')) {
+            change_day_assign();
+        }
+    });
+    $("input[name='zd_day']").click(function () {
+        if ($("#day_assign").prop('checked')) {
+            change_day_assign();
+        }
+    });
+
+    //month
+    $("#month_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_month").val("*");
+            gen_cron();
+        }
+    });
+    $("#month_no").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_month").val("?");
+            gen_cron();
+        }
+    });
+    $("#month_last").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_month").val("L");
+            gen_cron();
+        }
+    });
+    $("#month_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_month_circle();
+        }
+    });
+    $("#month_circle1").change(function () {
+        if ($("#month_circle").prop('checked')) {
+            change_month_circle();
+        }
+    });
+    $("#month_circle2").change(function () {
+        if ($("#month_circle").prop('checked')) {
+            change_month_circle();
+        }
+    });
+    $("#month_per").click(function () {
+        if ($(this).prop('checked')) {
+            change_month_per();
+        }
+    });
+    $("#month_per1").change(function () {
+        if ($("#month_per").prop('checked')) {
+            change_month_per();
+        }
+    });
+    $("#month_per2").change(function () {
+        if ($("#month_per").prop('checked')) {
+            change_month_per();
+        }
+    });
+    $("#month_assign").click(function () {
+        if ($("#month_assign").prop('checked')) {
+            change_month_assign();
+        }
+    });
+    $("input[name='zd_month']").click(function () {
+        if ($("#month_assign").prop('checked')) {
+            change_month_assign();
+        }
+    });
+    
+    //week
+    $("#week_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_week").val("*");
+            gen_cron();
+        }
+    });
+    $("#week_no").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_week").val("?");
+            gen_cron();
+        }
+    });
+    $("#week_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_week_circle();
+        }
+    });
+    $("#week_circle1").change(function () {
+        if ($("#week_circle").prop('checked')) {
+            change_week_circle();
+        }
+    });
+    $("#week_circle2").change(function () {
+        if ($("#week_circle").prop('checked')) {
+            change_week_circle();
+        }
+    });
+    $("#week_last").click(function () {
+        if ($("#week_last").prop('checked')) {
+            change_week_last();
+        }
+    });
+    $("#week_last1").change(function () {
+        if ($("#week_last").prop('checked')) {
+            change_week_last();
+        }
+    });
+    $("#week_num").click(function () {
+        if ($("#week_num").prop('checked')) {
+            change_week_num();
+        }
+    });
+    $("#week_num1").change(function () {
+        if ($("#week_num").prop('checked')) {
+            change_week_num();
+        }
+    });
+    $("#week_num2").change(function () {
+        if ($("#week_num").prop('checked')) {
+            change_week_num();
+        }
+    });
+    $("#week_assign").click(function () {
+        if ($("#week_assign").prop('checked')) {
+            change_week_assign();
+        }
+    });
+    $("input[name='zd_week']").click(function () {
+        if ($("#week_assign").prop('checked')) {
+            change_week_assign();
+        }
+    });
+    
+    //year
+    $("#year_all").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_year").val("*");
+            gen_cron();
+        }
+    });
+    $("#year_no").click(function () {
+        if ($(this).prop('checked')) {
+            $("#v_year").val("");
+            gen_cron();
+        }
+    });
+    $("#year_circle").click(function () {
+        if ($(this).prop('checked')) {
+            change_year_circle();
+        }
+    });
+    $("#year_circle1").change(function () {
+        if ($("#year_circle").prop('checked')) {
+            change_year_circle();
+        }
+    });
+    $("#year_circle2").change(function () {
+        if ($("#year_circle").prop('checked')) {
+            change_year_circle();
+        }
+    });
+});
+
+function change_sec_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_second']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_second").val("*");
+    } else {
+        $("#v_second").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_sec_circle() {
+    var v1 = $("#sec_circle1").val();
+    var v2 = $("#sec_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#sec_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#sec_circle2").val(v2);
+    }
+    if (v2 > 59) {
+        v2 = 59;
+        $("#sec_circle2").val(v2);
+    }
+    if (v1 > 59) {
+        v1 = 59;
+        $("#sec_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#sec_circle1").val(v1);
+    }
+    if (v1 > 60 || v2 > 60) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_second").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_sec_per() {
+    var v1 = $("#sec_per1").val();
+    var v2 = $("#sec_per2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 0) {
+        v1 = 0;
+        $("#sec_per1").val(v1);
+    }
+    if (v1 > 59) {
+        v1 = 59;
+        $("#sec_per1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#sec_per2").val(v2);
+    }
+    if (v2 > 59) {
+        v2 = 59;
+        $("#sec_per2").val(v2);
+    }
+    $("#v_second").val(v1 + "/" + v2);
+    gen_cron()
+}
+
+function change_min_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_minute']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_min").val("*");
+    } else {
+        $("#v_min").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_min_circle() {
+    var v1 = $("#min_circle1").val();
+    var v2 = $("#min_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#min_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#min_circle2").val(v2);
+    }
+    if (v2 > 59) {
+        v2 = 59;
+        $("#min_circle2").val(v2);
+    }
+    if (v1 > 59) {
+        v1 = 59;
+        $("#min_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#min_circle1").val(v1);
+    }
+    if (v1 > 60 || v2 > 60) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_min").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_min_per() {
+    var v1 = $("#min_per1").val();
+    var v2 = $("#min_per2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 0) {
+        v1 = 0;
+        $("#min_per1").val(v1);
+    }
+    if (v1 > 59) {
+        v1 = 59;
+        $("#min_per1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#min_per2").val(v2);
+    }
+    if (v2 > 59) {
+        v2 = 59;
+        $("#min_per2").val(v2);
+    }
+
+    $("#v_min").val(v1 + "/" + v2);
+    gen_cron()
+}
+
+function change_hour_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_hour']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_hour").val("*");
+    } else {
+        $("#v_hour").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_hour_circle() {
+    var v1 = $("#hour_circle1").val();
+    var v2 = $("#hour_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#hour_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#hour_circle2").val(v2);
+    }
+    if (v2 > 23) {
+        v2 = 23;
+        $("#hour_circle2").val(v2);
+    }
+    if (v1 > 23) {
+        v1 = 23;
+        $("#hour_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#hour_circle1").val(v1);
+    }
+    if (v1 > 23 || v2 > 23) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_hour").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_hour_per() {
+    var v1 = $("#hour_per1").val();
+    var v2 = $("#hour_per2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 0) {
+        v1 = 0;
+        $("#hour_per1").val(v1);
+    }
+    if (v1 > 23) {
+        v1 = 23;
+        $("#hour_per1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#hour_per2").val(v2);
+    }
+    if (v2 > 23) {
+        v2 = 23;
+        $("#hour_per2").val(v2);
+    }
+
+    $("#v_hour").val(v1 + "/" + v2);
+    gen_cron()
+}
+
+function change_day_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_day']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_day").val("*");
+    } else {
+        $("#v_day").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_day_circle() {
+    var v1 = $("#day_circle1").val();
+    var v2 = $("#day_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#day_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#day_circle2").val(v2);
+    }
+    if (v2 > 31) {
+        v2 = 31;
+        $("#day_circle2").val(v2);
+    }
+    if (v1 > 31) {
+        v1 = 31;
+        $("#day_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#day_circle1").val(v1);
+    }
+    if (v1 > 31 || v2 > 31) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_day").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_day_per() {
+    var v1 = $("#day_per1").val();
+    var v2 = $("#day_per2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#day_per1").val(v1);
+    }
+    if (v1 > 31) {
+        v1 = 31;
+        $("#day_per1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#day_per2").val(v2);
+    }
+    if (v2 > 31) {
+        v2 = 31;
+        $("#day_per2").val(v2);
+    }
+
+    $("#v_day").val(v1 + "/" + v2);
+    gen_cron()
+}
+
+function change_day_work() {
+    var v1 = $("#day_work1").val();
+
+    if (v1 == null || v1 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#day_work1").val(v1);
+    }
+    if (v1 > 31) {
+        v1 = 31;
+        $("#day_work1").val(v1);
+    }
+    $("#v_day").val(v1 + "W");
+    gen_cron()
+}
+
+function change_month_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_month']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_month").val("*");
+    } else {
+        $("#v_month").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_month_circle() {
+    var v1 = $("#month_circle1").val();
+    var v2 = $("#month_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#month_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#month_circle2").val(v2);
+    }
+    if (v2 > 12) {
+        v2 = 12;
+        $("#month_circle2").val(v2);
+    }
+    if (v1 > 12) {
+        v1 = 12;
+        $("#month_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#month_circle1").val(v1);
+    }
+    if (v1 > 12 || v2 > 12) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_month").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_month_per() {
+    var v1 = $("#month_per1").val();
+    var v2 = $("#month_per2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#month_per1").val(v1);
+    }
+    if (v1 > 12) {
+        v1 = 12;
+        $("#month_per1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#month_per2").val(v2);
+    }
+    if (v2 > 12) {
+        v2 = 12;
+        $("#month_per2").val(v2);
+    }
+
+    $("#v_month").val(v1 + "/" + v2);
+    gen_cron()
+}
+
+function change_week_assign() {
+    var sec_array = new Array();
+    $("input[name='zd_week']:checked").each(function () {
+        sec_array[sec_array.length] = $(this).val();
+    });
+    sec_array = sec_array.join(",");
+    if (sec_array == null || sec_array == '') {
+        $("#v_week").val("*");
+    } else {
+        $("#v_week").val(sec_array);
+    }
+    gen_cron();
+}
+
+function change_week_circle() {
+    var v1 = $("#week_circle1").val();
+    var v2 = $("#week_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#week_circle1").val(v1);
+    }
+    if (v2 < 2) {
+        v2 = 2;
+        $("#week_circle2").val(v2);
+    }
+    if (v2 > 7) {
+        v2 = 7;
+        $("#week_circle2").val(v2);
+    }
+    if (v1 > 7) {
+        v1 = 7;
+        $("#week_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#week_circle1").val(v1);
+    }
+    if (v1 > 7 || v2 > 7) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_week").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function change_week_last() {
+    var v1 = $("#week_last1").val();
+
+    if (v1 == null || v1 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#week_last1").val(v1);
+    }
+    if (v1 > 7) {
+        v1 = 7;
+        $("#week_last1").val(v1);
+    }
+    $("#v_week").val(v1 + "L");
+    gen_cron()
+}
+
+function change_week_num() {
+    var v1 = $("#week_num1").val();
+    var v2 = $("#week_num2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 1) {
+        v1 = 1;
+        $("#week_num1").val(v1);
+    }
+    if (v2 < 1) {
+        v2 = 1;
+        $("#week_num2").val(v2);
+    }
+    if (v2 > 7) {
+        v2 = 7;
+        $("#week_num2").val(v2);
+    }
+    if (v1 > 4) {
+        v1 = 4;
+        $("#week_num1").val(v1);
+    }
+
+    $("#v_week").val(v1 + "#" + v2);
+    gen_cron();
+}
+
+function change_year_circle() {
+    var v1 = $("#year_circle1").val();
+    var v2 = $("#year_circle2").val();
+    if (v1 == null || v1 == '' || v2 == null || v2 == '') {
+        return;
+    }
+    if (v1 < 2000) {
+        v1 = 2000;
+        $("#year_circle1").val(v1);
+    }
+    if (v2 < 2000) {
+        v2 = 2000;
+        $("#year_circle2").val(v2);
+    }
+    if (v2 > 3000) {
+        v2 = 3000;
+        $("#year_circle2").val(v2);
+    }
+    if (v1 > 3000) {
+        v1 = 3000;
+        $("#year_circle1").val(v1);
+    }
+    if (v1 >= v2) {
+        v1 = v2 - 1;
+        $("#year_circle1").val(v1);
+    }
+    if (v1 > 3000 || v2 > 3000) {
+        return;
+    }
+    if (v1 > v2) {
+        return;
+    }
+    $("#v_year").val(v1 + "-" + v2);
+    gen_cron();
+}
+
+function gen_cron() {
+    var str = $("#v_second").val() + " "
+        + $("#v_min").val() + " "
+        + $("#v_hour").val() + " "
+        + $("#v_day").val() + " "
+        + $("#v_month").val() + " "
+        + $("#v_week").val() + " "
+        + $("#v_year").val();
+    $("#cron").val(str);
+}

+ 8 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java

@@ -161,6 +161,14 @@ public class BaseController
         return AjaxResult.success(message);
     }
 
+    /**
+     * 返回成功数据
+     */
+    public static AjaxResult success(Object data)
+    {
+        return AjaxResult.success("操作成功", data);
+    }
+
     /**
      * 返回失败消息
      */

+ 28 - 0
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.constant.Constants;
@@ -189,4 +190,31 @@ public class SysJobController extends BaseController
     {
         return jobService.checkCronExpressionIsValid(job.getCronExpression());
     }
+
+    /**
+     * Cron表达式在线生成
+     */
+    @GetMapping("/cron")
+    public String cron()
+    {
+        return prefix + "/cron";
+    }
+
+    /**
+     * 查询cron表达式近5次的执行时间
+     */
+    @GetMapping("/queryCronExpression")
+    @ResponseBody
+    public AjaxResult queryCronExpression(@RequestParam(value = "cronExpression", required = false) String cronExpression)
+    {
+        if (jobService.checkCronExpressionIsValid(cronExpression))
+        {
+            List<String> dateList = CronUtils.getRecentTriggerTime(cronExpression);
+            return success(dateList);
+        }
+        else
+        {
+            return error("表达式无效");
+        }
+    }
 }

+ 31 - 0
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java

@@ -1,8 +1,13 @@
 package com.ruoyi.quartz.util;
 
 import java.text.ParseException;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 import org.quartz.CronExpression;
+import org.quartz.TriggerUtils;
+import org.quartz.impl.triggers.CronTriggerImpl;
+import com.ruoyi.common.utils.DateUtils;
 
 /**
  * cron表达式工具类
@@ -60,4 +65,30 @@ public class CronUtils
             throw new IllegalArgumentException(e.getMessage());
         }
     }
+
+    /**
+     * 通过表达式获取近10次的执行时间
+     * 
+     * @param cron 表达式
+     * @return 时间列表
+     */
+    public static List<String> getRecentTriggerTime(String cron)
+    {
+        List<String> list = new ArrayList<String>();
+        try
+        {
+            CronTriggerImpl cronTriggerImpl = new CronTriggerImpl();
+            cronTriggerImpl.setCronExpression(cron);
+            List<Date> dates = TriggerUtils.computeFireTimes(cronTriggerImpl, null, 10);
+            for (Date date : dates)
+            {
+                list.add(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date));
+            }
+        }
+        catch (ParseException e)
+        {
+            return null;
+        }
+        return list;
+    }
 }

+ 1172 - 0
ruoyi-quartz/src/main/resources/templates/monitor/job/cron.html

@@ -0,0 +1,1172 @@
+<!DOCTYPE html>
+<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Cron表达式在线生成</title>
+    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
+    <link th:href="@{/css/zen-checkbox.css}" rel="stylesheet"/>
+</head>
+<body class="load-indicator">
+    <div class="container t-small-margin">
+      <div class="t-big-margin">
+        <ul class="nav nav-tabs">
+            <li class="active"><a data-toggle="tab" href="#tabSecond">秒</a></li>
+            <li><a data-toggle="tab" href="#tabMinute">分</a></li>
+            <li><a data-toggle="tab" href="#tabHour">时</a></li>
+            <li><a data-toggle="tab" href="#tabDay">日</a></li>
+            <li><a data-toggle="tab" href="#tabMonth">月</a></li>
+            <li><a data-toggle="tab" href="#tabWeek">周</a></li>
+            <li><a data-toggle="tab" href="#tabYear">年</a></li>
+        </ul>
+        <div class="tab-content tab-cron">
+            <div class="tab-pane active" id="tabSecond">
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="sec_all" name="rdoSecond"> 每秒 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" id="sec_circle" name="rdoSecond">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="sec_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="sec_circle2" class="form-control">
+                            <span class="input-group-addon">秒</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  ">
+                    <label class="custom-radio">
+                        <input type="radio" id="sec_per" name="rdoSecond">
+                        <div class="input-group">
+                            <span class="input-group-addon">从</span>
+                            <input type="number" id="sec_per1" class="form-control">
+                            <span class="input-group-addon">秒开始,每</span>
+                            <input type="number" id="sec_per2" class="form-control">
+                            <span class="input-group-addon">秒执行一次</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="sec_assign" name="rdoSecond">指定
+                        <div class="checkbox">
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond1" name="zd_second" value="1">
+                                <label for="zdSecond1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond2" name="zd_second" value="2">
+                                <label for="zdSecond2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond3" name="zd_second" value="3">
+                                <label for="zdSecond3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond4" name="zd_second" value="4">
+                                <label for="zdSecond4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond5" name="zd_second" value="5">
+                                <label for="zdSecond5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond6" name="zd_second" value="6">
+                                <label for="zdSecond6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond7" name="zd_second" value="7">
+                                <label for="zdSecond7">7</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond8" name="zd_second" value="8">
+                                <label for="zdSecond8">8</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond9" name="zd_second" value="9">
+                                <label for="zdSecond9">9</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond10" name="zd_second" value="10">
+                                <label for="zdSecond10">10</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond11" name="zd_second" value="11">
+                                <label for="zdSecond11">11</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond12" name="zd_second" value="12">
+                                <label for="zdSecond12">12</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond13" name="zd_second" value="13">
+                                <label for="zdSecond13">13</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond14" name="zd_second" value="14">
+                                <label for="zdSecond14">14</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond15" name="zd_second" value="15">
+                                <label for="zdSecond15">15</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond16" name="zd_second" value="16">
+                                <label for="zdSecond16">16</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond17" name="zd_second" value="17">
+                                <label for="zdSecond17">17</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond18" name="zd_second" value="18">
+                                <label for="zdSecond18">18</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond19" name="zd_second" value="19">
+                                <label for="zdSecond19">19</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond20" name="zd_second" value="20">
+                                <label for="zdSecond20">20</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond21" name="zd_second" value="21">
+                                <label for="zdSecond21">21</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond22" name="zd_second" value="22">
+                                <label for="zdSecond22">22</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond23" name="zd_second" value="23">
+                                <label for="zdSecond23">23</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond24" name="zd_second" value="24">
+                                <label for="zdSecond24">24</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond25" name="zd_second" value="25">
+                                <label for="zdSecond25">25</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond26" name="zd_second" value="26">
+                                <label for="zdSecond26">26</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond27" name="zd_second" value="27">
+                                <label for="zdSecond27">27</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond28" name="zd_second" value="28">
+                                <label for="zdSecond28">28</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond29" name="zd_second" value="29">
+                                <label for="zdSecond29">29</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond30" name="zd_second" value="30">
+                                <label for="zdSecond30">30</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond31" name="zd_second" value="31">
+                                <label for="zdSecond31">31</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond32" name="zd_second" value="32">
+                                <label for="zdSecond32">32</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond33" name="zd_second" value="33">
+                                <label for="zdSecond33">33</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond34" name="zd_second" value="34">
+                                <label for="zdSecond34">34</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond35" name="zd_second" value="35">
+                                <label for="zdSecond35">35</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond36" name="zd_second" value="36">
+                                <label for="zdSecond36">36</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond37" name="zd_second" value="37">
+                                <label for="zdSecond37">37</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond38" name="zd_second" value="38">
+                                <label for="zdSecond38">38</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond39" name="zd_second" value="39">
+                                <label for="zdSecond39">39</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond40" name="zd_second" value="40">
+                                <label for="zdSecond40">40</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond41" name="zd_second" value="41">
+                                <label for="zdSecond41">41</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond42" name="zd_second" value="42">
+                                <label for="zdSecond42">42</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond43" name="zd_second" value="43">
+                                <label for="zdSecond43">43</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond44" name="zd_second" value="44">
+                                <label for="zdSecond44">44</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond45" name="zd_second" value="45">
+                                <label for="zdSecond45">45</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond46" name="zd_second" value="46">
+                                <label for="zdSecond46">46</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond47" name="zd_second" value="47">
+                                <label for="zdSecond47">47</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond48" name="zd_second" value="48">
+                                <label for="zdSecond48">48</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond49" name="zd_second" value="49">
+                                <label for="zdSecond49">49</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond50" name="zd_second" value="50">
+                                <label for="zdSecond50">50</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond51" name="zd_second" value="51">
+                                <label for="zdSecond51">51</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond52" name="zd_second" value="52">
+                                <label for="zdSecond52">52</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond53" name="zd_second" value="53">
+                                <label for="zdSecond53">53</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond54" name="zd_second" value="54">
+                                <label for="zdSecond54">54</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond55" name="zd_second" value="55">
+                                <label for="zdSecond55">55</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond56" name="zd_second" value="56">
+                                <label for="zdSecond56">56</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond57" name="zd_second" value="57">
+                                <label for="zdSecond57">57</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond58" name="zd_second" value="58">
+                                <label for="zdSecond58">58</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond59" name="zd_second" value="59">
+                                <label for="zdSecond59">59</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdSecond60" name="zd_second" value="60">
+                                <label for="zdSecond60">60</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabMinute">
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="min_all" name="rdoMinute"> 每分 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio  ">
+                    <label class="custom-radio">
+                        <input type="radio" id="min_circle" name="rdoMinute">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="min_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input id="min_circle2" type="number" class="form-control">
+                            <span class="input-group-addon">分</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  ">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoMinute" id="min_per">
+                        <div class="input-group">
+                            <span class="input-group-addon">从</span>
+                            <input type="number" id="min_per1" class="form-control">
+                            <span class="input-group-addon">分开始,每</span>
+                            <input type="number" id="min_per2" class="form-control">
+                            <span class="input-group-addon">分执行一次</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="min_assign" name="rdoMinute">指定
+                        <div class="checkbox">
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute1" name="zd_minute" value="1">
+                                <label for="zdMinute1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute2" name="zd_minute" value="2">
+                                <label for="zdMinute2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute3" name="zd_minute" value="3">
+                                <label for="zdMinute3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute4" name="zd_minute" value="4">
+                                <label for="zdMinute4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute5" name="zd_minute" value="5">
+                                <label for="zdMinute5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute6" name="zd_minute" value="6">
+                                <label for="zdMinute6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute7" name="zd_minute" value="7">
+                                <label for="zdMinute7">7</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute8" name="zd_minute" value="8">
+                                <label for="zdMinute8">8</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute9" name="zd_minute" value="9">
+                                <label for="zdMinute9">9</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute10" name="zd_minute" value="10">
+                                <label for="zdMinute10">10</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute11" name="zd_minute" value="11">
+                                <label for="zdMinute11">11</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute12" name="zd_minute" value="12">
+                                <label for="zdMinute12">12</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute13" name="zd_minute" value="13">
+                                <label for="zdMinute13">13</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute14" name="zd_minute" value="14">
+                                <label for="zdMinute14">14</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute15" name="zd_minute" value="15">
+                                <label for="zdMinute15">15</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute16" name="zd_minute" value="16">
+                                <label for="zdMinute16">16</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute17" name="zd_minute" value="17">
+                                <label for="zdMinute17">17</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute18" name="zd_minute" value="18">
+                                <label for="zdMinute18">18</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute19" name="zd_minute" value="19">
+                                <label for="zdMinute19">19</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute20" name="zd_minute" value="20">
+                                <label for="zdMinute20">20</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute21" name="zd_minute" value="21">
+                                <label for="zdMinute21">21</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute22" name="zd_minute" value="22">
+                                <label for="zdMinute22">22</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute23" name="zd_minute" value="23">
+                                <label for="zdMinute23">23</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute24" name="zd_minute" value="24">
+                                <label for="zdMinute24">24</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute25" name="zd_minute" value="25">
+                                <label for="zdMinute25">25</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute26" name="zd_minute" value="26">
+                                <label for="zdMinute26">26</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute27" name="zd_minute" value="27">
+                                <label for="zdMinute27">27</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute28" name="zd_minute" value="28">
+                                <label for="zdMinute28">28</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute29" name="zd_minute" value="29">
+                                <label for="zdMinute29">29</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute30" name="zd_minute" value="30">
+                                <label for="zdMinute30">30</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute31" name="zd_minute" value="31">
+                                <label for="zdMinute31">31</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute32" name="zd_minute" value="32">
+                                <label for="zdMinute32">32</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute33" name="zd_minute" value="33">
+                                <label for="zdMinute33">33</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute34" name="zd_minute" value="34">
+                                <label for="zdMinute34">34</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute35" name="zd_minute" value="35">
+                                <label for="zdMinute35">35</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute36" name="zd_minute" value="36">
+                                <label for="zdMinute36">36</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute37" name="zd_minute" value="37">
+                                <label for="zdMinute37">37</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute38" name="zd_minute" value="38">
+                                <label for="zdMinute38">38</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute39" name="zd_minute" value="39">
+                                <label for="zdMinute39">39</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute40" name="zd_minute" value="40">
+                                <label for="zdMinute40">40</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute41" name="zd_minute" value="41">
+                                <label for="zdMinute41">41</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute42" name="zd_minute" value="42">
+                                <label for="zdMinute42">42</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute43" name="zd_minute" value="43">
+                                <label for="zdMinute43">43</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute44" name="zd_minute" value="44">
+                                <label for="zdMinute44">44</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute45" name="zd_minute" value="45">
+                                <label for="zdMinute45">45</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute46" name="zd_minute" value="46">
+                                <label for="zdMinute46">46</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute47" name="zd_minute" value="47">
+                                <label for="zdMinute47">47</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute48" name="zd_minute" value="48">
+                                <label for="zdMinute48">48</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute49" name="zd_minute" value="49">
+                                <label for="zdMinute49">49</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute50" name="zd_minute" value="50">
+                                <label for="zdMinute50">50</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute51" name="zd_minute" value="51">
+                                <label for="zdMinute51">51</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute52" name="zd_minute" value="52">
+                                <label for="zdMinute52">52</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute53" name="zd_minute" value="53">
+                                <label for="zdMinute53">53</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute54" name="zd_minute" value="54">
+                                <label for="zdMinute54">54</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute55" name="zd_minute" value="55">
+                                <label for="zdMinute55">55</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute56" name="zd_minute" value="56">
+                                <label for="zdMinute56">56</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute57" name="zd_minute" value="57">
+                                <label for="zdMinute57">57</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute58" name="zd_minute" value="58">
+                                <label for="zdMinute58">58</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute59" name="zd_minute" value="59">
+                                <label for="zdMinute59">59</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMinute60" name="zd_minute" value="60">
+                                <label for="zdMinute60">60</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabHour">
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="hour_all" name="rdoMinute"> 每小时 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" id="hour_circle" name="rdoMinute">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="hour_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="hour_circle2" class="form-control">
+                            <span class="input-group-addon">小时</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoMinute" id="hour_per">
+                        <div class="input-group">
+                            <span class="input-group-addon">从</span>
+                            <input type="number" id="hour_per1" class="form-control">
+                            <span class="input-group-addon">小时开始,每</span>
+                            <input type="number" id="hour_per2" class="form-control">
+                            <span class="input-group-addon">小时执行一次</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="hour_assign" name="rdoMinute">指定
+                        <div class="checkbox">
+                            <label>AM:</label>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour1" name="zd_hour" value="1">
+                                <label for="zdHour1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour2" name="zd_hour" value="2">
+                                <label for="zdHour2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour3" name="zd_hour" value="3">
+                                <label for="zdHour3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour4" name="zd_hour" value="4">
+                                <label for="zdHour4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour5" name="zd_hour" value="5">
+                                <label for="zdHour5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour6" name="zd_hour" value="6">
+                                <label for="zdHour6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour7" name="zd_hour" value="7">
+                                <label for="zdHour7">7</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour8" name="zd_hour" value="8">
+                                <label for="zdHour8">8</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour9" name="zd_hour" value="9">
+                                <label for="zdHour9">9</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour10" name="zd_hour" value="10">
+                                <label for="zdHour10">10</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour11" name="zd_hour" value="11">
+                                <label for="zdHour11">11</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour12" name="zd_hour" value="12">
+                                <label for="zdHour12">12</label>
+                            </div>
+                            <br>
+                            <label>PM:</label>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour13" name="zd_hour" value="13">
+                                <label for="zdHour13">13</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour14" name="zd_hour" value="14">
+                                <label for="zdHour14">14</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour15" name="zd_hour" value="15">
+                                <label for="zdHour15">15</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour16" name="zd_hour" value="16">
+                                <label for="zdHour16">16</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour17" name="zd_hour" value="17">
+                                <label for="zdHour17">17</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour18" name="zd_hour" value="18">
+                                <label for="zdHour18">18</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour19" name="zd_hour" value="19">
+                                <label for="zdHour19">19</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour20" name="zd_hour" value="20">
+                                <label for="zdHour20">20</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour21" name="zd_hour" value="21">
+                                <label for="zdHour21">21</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour22" name="zd_hour" value="22">
+                                <label for="zdHour22">22</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour23" name="zd_hour" value="23">
+                                <label for="zdHour23">23</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdHour24" name="zd_hour" value="24">
+                                <label for="zdHour24">24</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabDay">
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoDay" id="day_all"> 每小时 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoDay" id="day_no"> 不指定
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoDay" id="day_circle">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="day_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="day_circle2" class="form-control">
+                            <span class="input-group-addon">日</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoDay" id="day_per">
+                        <div class="input-group">
+                            <span class="input-group-addon">从</span>
+                            <input type="number" id="day_per1" class="form-control">
+                            <span class="input-group-addon">日开始,每</span>
+                            <input type="number" id="day_per2" class="form-control">
+                            <span class="input-group-addon">日执行一次</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoDay" id="day_work">
+                        <div class="input-group">
+                            <span class="input-group-addon">每月</span>
+                            <input type="number" id="day_work1" class="form-control">
+                            <span class="input-group-addon">号最近的那个工作日</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoDay" id="day_last"> 本月最后一日
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="day_assign" name="rdoDay">指定
+                        <div class="checkbox">
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay1" name="zd_day" value="1">
+                                <label for="zdDay1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay2" name="zd_day" value="2">
+                                <label for="zdDay2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay3" name="zd_day" value="3">
+                                <label for="zdDay3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay4" name="zd_day" value="4">
+                                <label for="zdDay4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay5" name="zd_day" value="5">
+                                <label for="zdDay5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay6" name="zd_day" value="6">
+                                <label for="zdDay6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay7" name="zd_day" value="7">
+                                <label for="zdDay7">7</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay8" name="zd_day" value="8">
+                                <label for="zdDay8">8</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay9" name="zd_day" value="9">
+                                <label for="zdDay9">9</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay10" name="zd_day" value="10">
+                                <label for="zdDay10">10</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay11" name="zd_day" value="11">
+                                <label for="zdDay11">11</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay12" name="zd_day" value="12">
+                                <label for="zdDay12">12</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay13" name="zd_day" value="13">
+                                <label for="zdDay13">13</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay14" name="zd_day" value="14">
+                                <label for="zdDay14">14</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay15" name="zd_day" value="15">
+                                <label for="zdDay15">15</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay16" name="zd_day" value="16">
+                                <label for="zdDay16">16</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay17" name="zd_day" value="17">
+                                <label for="zdDay17">17</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay18" name="zd_day" value="18">
+                                <label for="zdDay18">18</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay19" name="zd_day" value="19">
+                                <label for="zdDay19">19</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay20" name="zd_day" value="20">
+                                <label for="zdDay20">20</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay21" name="zd_day" value="21">
+                                <label for="zdDay21">21</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay22" name="zd_day" value="22">
+                                <label for="zdDay22">22</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay23" name="zd_day" value="23">
+                                <label for="zdDay23">23</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay24" name="zd_day" value="24">
+                                <label for="zdDay24">24</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay25" name="zd_day" value="25">
+                                <label for="zdDay25">25</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay26" name="zd_day" value="26">
+                                <label for="zdDay26">26</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay27" name="zd_day" value="27">
+                                <label for="zdDay27">27</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay28" name="zd_day" value="28">
+                                <label for="zdDay28">28</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay29" name="zd_day" value="29">
+                                <label for="zdDay29">29</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay30" name="zd_day" value="30">
+                                <label for="zdDay30">30</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdDay31" name="zd_day" value="31">
+                                <label for="zdDay31">31</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabMonth">
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoMonth" id="month_all"> 每月 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoMonth" id="month_no"> 不指定
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoMonth" id="month_circle">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="month_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="month_circle2" class="form-control">
+                            <span class="input-group-addon">月</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoMonth" id="month_per">
+                        <div class="input-group">
+                            <span class="input-group-addon">从</span>
+                            <input type="number" id="month_per1" class="form-control">
+                            <span class="input-group-addon">月开始,每</span>
+                            <input type="number" id="month_per2" class="form-control">
+                            <span class="input-group-addon">月执行一次</span>
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="month_assign" name="rdoMonth">指定
+                        <div class="checkbox">
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth1" name="zd_month" value="1">
+                                <label for="zdMonth1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth2" name="zd_month" value="2">
+                                <label for="zdMonth2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth3" name="zd_month" value="3">
+                                <label for="zdMonth3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth4" name="zd_month" value="4">
+                                <label for="zdMonth4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth5" name="zd_month" value="5">
+                                <label for="zdMonth5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth6" name="zd_month" value="6">
+                                <label for="zdMonth6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth7" name="zd_month" value="7">
+                                <label for="zdMonth7">7</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth8" name="zd_month" value="8">
+                                <label for="zdMonth8">8</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth9" name="zd_month" value="9">
+                                <label for="zdMonth9">9</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth10" name="zd_month" value="10">
+                                <label for="zdMonth10">10</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth11" name="zd_month" value="11">
+                                <label for="zdMonth11">11</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdMonth12" name="zd_month" value="12">
+                                <label for="zdMonth12">12</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabWeek">
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="week_all" name="rdoWeek"> 周 允许的通配符[, - * /]
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="week_no" name="rdoWeek"> 不指定
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoWeek" id="week_circle">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="week_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="week_circle2" class="form-control">
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoWeek" id="week_num">
+                        <div class="input-group">
+                            <span class="input-group-addon">第</span>
+                            <input type="number" id="week_num1" class="form-control">
+                            <span class="input-group-addon">星期的星期</span>
+                            <input type="number" id="week_num2" class="form-control">
+                        </div>
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" name="rdoWeek" id="week_last">
+                        <div class="input-group">
+                            <span class="input-group-addon">本月最后一个星期</span>
+                            <input type="number" id="week_last1" class="form-control">
+                        </div>
+                    </label>
+                </div>
+                <div class="radio  tabsecondchk">
+                    <label>
+                        <input type="radio" id="week_assign" name="rdoWeek">指定
+                        <div class="checkbox">
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek1" name="zd_week" value="1">
+                                <label for="zdWeek1">1</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek2" name="zd_week" value="2">
+                                <label for="zdWeek2">2</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek3" name="zd_week" value="3">
+                                <label for="zdWeek3">3</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek4" name="zd_week" value="4">
+                                <label for="zdWeek4">4</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek5" name="zd_week" value="5">
+                                <label for="zdWeek5">5</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek6" name="zd_week" value="6">
+                                <label for="zdWeek6">6</label>
+                            </div>
+                            <div class="checkbox-primary">
+                                <input type="checkbox" id="zdWeek7" name="zd_week" value="7">
+                                <label for="zdWeek7">7</label>
+                            </div>
+                        </div>
+                    </label>
+                </div>
+            </div>
+            <div class="tab-pane" id="tabYear">
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="year_no" name="rdoWeek"> 不指定 允许的通配符[, - * /] 非必填
+                    </label>
+                </div>
+                <div class="radio">
+                    <label>
+                        <input type="radio" id="year_all" name="rdoWeek"> 每年
+                    </label>
+                </div>
+                <div class="radio">
+                    <label class="custom-radio">
+                        <input type="radio" name="rdoWeek" id="year_circle">
+                        <div class="input-group">
+                            <span class="input-group-addon">周期从</span>
+                            <input type="number" id="year_circle1" class="form-control">
+                            <span class="input-group-addon">-</span>
+                            <input type="number" id="year_circle2" class="form-control">
+                        </div>
+                    </label>
+                </div>
+            </div>
+        </div>
+        <div class="t-big-margin">
+            <h4>表达式</h4>
+        </div>
+        <table class="table table-hover cron_table table-bordered">
+            <tbody>
+            <tr>
+                <td></td>
+                <td align="center">秒</td>
+                <td align="center">分钟</td>
+                <td align="center">小时</td>
+                <td align="center">日</td>
+                <td align="center">月</td>
+                <td align="center">星期</td>
+                <td align="center">年</td>
+            </tr>
+            <tr>
+                <td>表达式字段</td>
+                <td><input type="text" class="form-control" id="v_second" value="*" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_min" value="*" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_hour" value="*" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_day" value="*" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_month" value="*" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_week" value="?" readonly=""></td>
+                <td><input type="text" class="form-control" id="v_year" readonly=""></td>
+            </tr>
+            <tr>
+                <td>Cron 表达式</td>
+                <td colspan="7"><input type="text" class="form-control" id="cron" value="* * * * * ?"></td>
+            </tr>
+            </tbody>
+        </table>
+        <div class="text-center">
+            <button type="button" class="btn btn-primary" id="runBtn">查询最近10次运行时间</button>
+            <button type="button" class="btn btn-info" id="unrunBtn">Cron表达式转成字段</button>
+            <button type="button" class="btn btn-warning" id="checkCron">Cron表达式验证</button>
+        </div>
+        <br/>
+      </div>
+    </div>
+</div>
+<script th:src="@{/js/jquery.min.js}"></script>
+<script th:src="@{/js/bootstrap.min.js}"></script>
+<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
+<script th:src="@{/ruoyi/js/ry-ui.js?v=4.6.2}"></script>
+<script th:src="@{/js/cron.js}"></script>
+<script th:inline="javascript">
+var prefix = [[@{/}]] + "monitor/job";
+
+// 查询最近10次运行时间
+$('#runBtn').click(function() {
+    var cronExpression = $("#cron").val();
+    $.get(prefix + "/queryCronExpression", { "cronExpression": cronExpression }, function(result) {
+    	if (result.code == web_status.SUCCESS) {
+    		if (result.data.length > 0) {
+        		var time = "表达式<font color='red'>[" + cronExpression + "]</font>最近10次运行时间<br/>";
+                for (var i = 0; i < result.data.length; i++) {
+                	time += i + 1 +"、" + result.data[i] + "<br/>"
+                }
+                $.modal.alertSuccess(time);
+        	} else {
+                $.modal.alertError("表达式有误,未查询出结果");
+            }
+        } else {
+            $.modal.alertError(result.msg);
+        }
+    });
+});
+
+// Cron表达式验证
+$('#checkCron').click(function() {
+    var cronExpression = $("#cron").val();
+    $.post(prefix + "/checkCronExpressionIsValid", { "cronExpression": cronExpression }, function(result) {
+        if (result) {
+            $.modal.msgSuccess("恭喜你,格式正确");
+        } else {
+            $.modal.msgError("很遗憾,格式错误");
+        }
+    });
+});
+</script>
+</body>
+</html>

+ 16 - 0
ruoyi-quartz/src/main/resources/templates/monitor/job/job.html

@@ -47,6 +47,9 @@
 		         <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">
 		            <i class="fa fa-download"></i> 导出
 		        </a>
+		        <a class="btn btn-primary" onclick="javascript:cron()">
+		            <i class="fa fa-code"></i> 生成表达式
+		        </a>
 		        <a class="btn btn-info" onclick="javascript:jobLog()" shiro:hasPermission="monitor:job:detail">
 		            <i class="fa fa-list"></i> 日志
 		        </a>
@@ -176,6 +179,19 @@
 		    }
 		    $.modal.openTab("调度日志", url);
 		}
+		
+		/* cron表达式生成 */
+		function cron() {
+		    var url = prefix + '/cron';
+            var height = $(window).height() - 50;
+            top.layer.open({
+                title: "Cron表达式生成器",
+                type: 2,
+                area: ['800px', height + "px" ], //宽高
+                shadeClose: true,
+                content: url
+            });
+		}
 	</script>
 </body>
 </html>