first commit
This commit is contained in:
@@ -0,0 +1,732 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Cron表达式生成器</title>
|
||||
<link href="${base}/assets/platform/cron/css/easyui.min.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.line {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.imp {
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.col {
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
li {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: center; /*IE*/
|
||||
text-align: -moz-center; /*Firefox*/
|
||||
text-align: -webkit-center; /*Chrome*/
|
||||
}
|
||||
</style>
|
||||
<script nonce="${cspNonce!}">
|
||||
var base = "${base!}"
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="easyui-layout" style="width: 830px; height: 560px; border: 1px rgb(202, 196, 196) solid; border-radius: 5px">
|
||||
<div style="height: 100%">
|
||||
<div class="easyui-tabs" data-options="fit:true,border:false">
|
||||
<div title="秒">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="second" onclick="everyTime(this)" />
|
||||
每秒 允许的通配符[, - * /]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="second" onclick="cycle(this)" />
|
||||
周期从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:58" value="1" id="secondStart_0" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:59" value="2" id="secondEnd_0" />
|
||||
秒
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="second" onclick="startOn(this)" />
|
||||
从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:0,max:59" value="0" id="secondStart_1" />
|
||||
秒开始,每
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:59" value="1" id="secondEnd_1" />
|
||||
秒执行一次
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="second" id="sencond_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="0" />
|
||||
00
|
||||
<input type="checkbox" value="1" />
|
||||
01
|
||||
<input type="checkbox" value="2" />
|
||||
02
|
||||
<input type="checkbox" value="3" />
|
||||
03
|
||||
<input type="checkbox" value="4" />
|
||||
04
|
||||
<input type="checkbox" value="5" />
|
||||
05
|
||||
<input type="checkbox" value="6" />
|
||||
06
|
||||
<input type="checkbox" value="7" />
|
||||
07
|
||||
<input type="checkbox" value="8" />
|
||||
08
|
||||
<input type="checkbox" value="9" />
|
||||
09
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="10" />
|
||||
10
|
||||
<input type="checkbox" value="11" />
|
||||
11
|
||||
<input type="checkbox" value="12" />
|
||||
12
|
||||
<input type="checkbox" value="13" />
|
||||
13
|
||||
<input type="checkbox" value="14" />
|
||||
14
|
||||
<input type="checkbox" value="15" />
|
||||
15
|
||||
<input type="checkbox" value="16" />
|
||||
16
|
||||
<input type="checkbox" value="17" />
|
||||
17
|
||||
<input type="checkbox" value="18" />
|
||||
18
|
||||
<input type="checkbox" value="19" />
|
||||
19
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="20" />
|
||||
20
|
||||
<input type="checkbox" value="21" />
|
||||
21
|
||||
<input type="checkbox" value="22" />
|
||||
22
|
||||
<input type="checkbox" value="23" />
|
||||
23
|
||||
<input type="checkbox" value="24" />
|
||||
24
|
||||
<input type="checkbox" value="25" />
|
||||
25
|
||||
<input type="checkbox" value="26" />
|
||||
26
|
||||
<input type="checkbox" value="27" />
|
||||
27
|
||||
<input type="checkbox" value="28" />
|
||||
28
|
||||
<input type="checkbox" value="29" />
|
||||
29
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="30" />
|
||||
30
|
||||
<input type="checkbox" value="31" />
|
||||
31
|
||||
<input type="checkbox" value="32" />
|
||||
32
|
||||
<input type="checkbox" value="33" />
|
||||
33
|
||||
<input type="checkbox" value="34" />
|
||||
34
|
||||
<input type="checkbox" value="35" />
|
||||
35
|
||||
<input type="checkbox" value="36" />
|
||||
36
|
||||
<input type="checkbox" value="37" />
|
||||
37
|
||||
<input type="checkbox" value="38" />
|
||||
38
|
||||
<input type="checkbox" value="39" />
|
||||
39
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="40" />
|
||||
40
|
||||
<input type="checkbox" value="41" />
|
||||
41
|
||||
<input type="checkbox" value="42" />
|
||||
42
|
||||
<input type="checkbox" value="43" />
|
||||
43
|
||||
<input type="checkbox" value="44" />
|
||||
44
|
||||
<input type="checkbox" value="45" />
|
||||
45
|
||||
<input type="checkbox" value="46" />
|
||||
46
|
||||
<input type="checkbox" value="47" />
|
||||
47
|
||||
<input type="checkbox" value="48" />
|
||||
48
|
||||
<input type="checkbox" value="49" />
|
||||
49
|
||||
</div>
|
||||
<div class="imp secondList">
|
||||
<input type="checkbox" value="50" />
|
||||
50
|
||||
<input type="checkbox" value="51" />
|
||||
51
|
||||
<input type="checkbox" value="52" />
|
||||
52
|
||||
<input type="checkbox" value="53" />
|
||||
53
|
||||
<input type="checkbox" value="54" />
|
||||
54
|
||||
<input type="checkbox" value="55" />
|
||||
55
|
||||
<input type="checkbox" value="56" />
|
||||
56
|
||||
<input type="checkbox" value="57" />
|
||||
57
|
||||
<input type="checkbox" value="58" />
|
||||
58
|
||||
<input type="checkbox" value="59" />
|
||||
59
|
||||
</div>
|
||||
</div>
|
||||
<div title="分钟">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="min" onclick="everyTime(this)" />
|
||||
分钟 允许的通配符[, - * /]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="min" onclick="cycle(this)" />
|
||||
周期从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:58" value="1" id="minStart_0" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:59" value="2" id="minEnd_0" />
|
||||
分钟
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="min" onclick="startOn(this)" />
|
||||
从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:0,max:59" value="0" id="minStart_1" />
|
||||
分钟开始,每
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:59" value="1" id="minEnd_1" />
|
||||
分钟执行一次
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="min" id="min_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="0" />
|
||||
00
|
||||
<input type="checkbox" value="1" />
|
||||
01
|
||||
<input type="checkbox" value="2" />
|
||||
02
|
||||
<input type="checkbox" value="3" />
|
||||
03
|
||||
<input type="checkbox" value="4" />
|
||||
04
|
||||
<input type="checkbox" value="5" />
|
||||
05
|
||||
<input type="checkbox" value="6" />
|
||||
06
|
||||
<input type="checkbox" value="7" />
|
||||
07
|
||||
<input type="checkbox" value="8" />
|
||||
08
|
||||
<input type="checkbox" value="9" />
|
||||
09
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="10" />
|
||||
10
|
||||
<input type="checkbox" value="11" />
|
||||
11
|
||||
<input type="checkbox" value="12" />
|
||||
12
|
||||
<input type="checkbox" value="13" />
|
||||
13
|
||||
<input type="checkbox" value="14" />
|
||||
14
|
||||
<input type="checkbox" value="15" />
|
||||
15
|
||||
<input type="checkbox" value="16" />
|
||||
16
|
||||
<input type="checkbox" value="17" />
|
||||
17
|
||||
<input type="checkbox" value="18" />
|
||||
18
|
||||
<input type="checkbox" value="19" />
|
||||
19
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="20" />
|
||||
20
|
||||
<input type="checkbox" value="21" />
|
||||
21
|
||||
<input type="checkbox" value="22" />
|
||||
22
|
||||
<input type="checkbox" value="23" />
|
||||
23
|
||||
<input type="checkbox" value="24" />
|
||||
24
|
||||
<input type="checkbox" value="25" />
|
||||
25
|
||||
<input type="checkbox" value="26" />
|
||||
26
|
||||
<input type="checkbox" value="27" />
|
||||
27
|
||||
<input type="checkbox" value="28" />
|
||||
28
|
||||
<input type="checkbox" value="29" />
|
||||
29
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="30" />
|
||||
30
|
||||
<input type="checkbox" value="31" />
|
||||
31
|
||||
<input type="checkbox" value="32" />
|
||||
32
|
||||
<input type="checkbox" value="33" />
|
||||
33
|
||||
<input type="checkbox" value="34" />
|
||||
34
|
||||
<input type="checkbox" value="35" />
|
||||
35
|
||||
<input type="checkbox" value="36" />
|
||||
36
|
||||
<input type="checkbox" value="37" />
|
||||
37
|
||||
<input type="checkbox" value="38" />
|
||||
38
|
||||
<input type="checkbox" value="39" />
|
||||
39
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="40" />
|
||||
40
|
||||
<input type="checkbox" value="41" />
|
||||
41
|
||||
<input type="checkbox" value="42" />
|
||||
42
|
||||
<input type="checkbox" value="43" />
|
||||
43
|
||||
<input type="checkbox" value="44" />
|
||||
44
|
||||
<input type="checkbox" value="45" />
|
||||
45
|
||||
<input type="checkbox" value="46" />
|
||||
46
|
||||
<input type="checkbox" value="47" />
|
||||
47
|
||||
<input type="checkbox" value="48" />
|
||||
48
|
||||
<input type="checkbox" value="49" />
|
||||
49
|
||||
</div>
|
||||
<div class="imp minList">
|
||||
<input type="checkbox" value="50" />
|
||||
50
|
||||
<input type="checkbox" value="51" />
|
||||
51
|
||||
<input type="checkbox" value="52" />
|
||||
52
|
||||
<input type="checkbox" value="53" />
|
||||
53
|
||||
<input type="checkbox" value="54" />
|
||||
54
|
||||
<input type="checkbox" value="55" />
|
||||
55
|
||||
<input type="checkbox" value="56" />
|
||||
56
|
||||
<input type="checkbox" value="57" />
|
||||
57
|
||||
<input type="checkbox" value="58" />
|
||||
58
|
||||
<input type="checkbox" value="59" />
|
||||
59
|
||||
</div>
|
||||
</div>
|
||||
<div title="小时">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="hour" onclick="everyTime(this)" />
|
||||
小时 允许的通配符[, - * /]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="hour" onclick="cycle(this)" />
|
||||
周期从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:0,max:23" value="0" id="hourStart_0" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:23" value="2" id="hourEnd_1" />
|
||||
小时
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="hour" onclick="startOn(this)" />
|
||||
从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:0,max:23" value="0" id="hourStart_1" />
|
||||
小时开始,每
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:23" value="1" id="hourEnd_1" />
|
||||
小时执行一次
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="hour" id="hour_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp hourList">
|
||||
AM:
|
||||
<input type="checkbox" value="0" />
|
||||
00
|
||||
<input type="checkbox" value="1" />
|
||||
01
|
||||
<input type="checkbox" value="2" />
|
||||
02
|
||||
<input type="checkbox" value="3" />
|
||||
03
|
||||
<input type="checkbox" value="4" />
|
||||
04
|
||||
<input type="checkbox" value="5" />
|
||||
05
|
||||
<input type="checkbox" value="6" />
|
||||
06
|
||||
<input type="checkbox" value="7" />
|
||||
07
|
||||
<input type="checkbox" value="8" />
|
||||
08
|
||||
<input type="checkbox" value="9" />
|
||||
09
|
||||
<input type="checkbox" value="10" />
|
||||
10
|
||||
<input type="checkbox" value="11" />
|
||||
11
|
||||
</div>
|
||||
<div class="imp hourList">
|
||||
PM:
|
||||
<input type="checkbox" value="12" />
|
||||
12
|
||||
<input type="checkbox" value="13" />
|
||||
13
|
||||
<input type="checkbox" value="14" />
|
||||
14
|
||||
<input type="checkbox" value="15" />
|
||||
15
|
||||
<input type="checkbox" value="16" />
|
||||
16
|
||||
<input type="checkbox" value="17" />
|
||||
17
|
||||
<input type="checkbox" value="18" />
|
||||
18
|
||||
<input type="checkbox" value="19" />
|
||||
19
|
||||
<input type="checkbox" value="20" />
|
||||
20
|
||||
<input type="checkbox" value="21" />
|
||||
21
|
||||
<input type="checkbox" value="22" />
|
||||
22
|
||||
<input type="checkbox" value="23" />
|
||||
23
|
||||
</div>
|
||||
</div>
|
||||
<div title="日">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="day" onclick="everyTime(this)" />
|
||||
日 允许的通配符[, - * / L W]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" onclick="unAppoint(this)" />
|
||||
不指定
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" onclick="cycle(this)" />
|
||||
周期从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:31" value="1" id="dayStart_0" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:31" value="2" id="dayEnd_0" />
|
||||
日
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" onclick="startOn(this)" />
|
||||
从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:31" value="1" id="dayStart_1" />
|
||||
日开始,每
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:31" value="1" id="dayEnd_1" />
|
||||
天执行一次
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" onclick="workDay(this)" />
|
||||
每月
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:31" value="1" id="dayStart_2" />
|
||||
号最近的那个工作日
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" onclick="lastDay(this)" />
|
||||
本月最后一天
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="day" id="day_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp dayList">
|
||||
<input type="checkbox" value="1" />
|
||||
1
|
||||
<input type="checkbox" value="2" />
|
||||
2
|
||||
<input type="checkbox" value="3" />
|
||||
3
|
||||
<input type="checkbox" value="4" />
|
||||
4
|
||||
<input type="checkbox" value="5" />
|
||||
5
|
||||
<input type="checkbox" value="6" />
|
||||
6
|
||||
<input type="checkbox" value="7" />
|
||||
7
|
||||
<input type="checkbox" value="8" />
|
||||
8
|
||||
<input type="checkbox" value="9" />
|
||||
9
|
||||
<input type="checkbox" value="10" />
|
||||
10
|
||||
<input type="checkbox" value="11" />
|
||||
11
|
||||
<input type="checkbox" value="12" />
|
||||
12
|
||||
<input type="checkbox" value="13" />
|
||||
13
|
||||
<input type="checkbox" value="14" />
|
||||
14
|
||||
<input type="checkbox" value="15" />
|
||||
15
|
||||
<input type="checkbox" value="16" />
|
||||
16
|
||||
</div>
|
||||
<div class="imp dayList">
|
||||
<input type="checkbox" value="17" />
|
||||
17
|
||||
<input type="checkbox" value="18" />
|
||||
18
|
||||
<input type="checkbox" value="19" />
|
||||
19
|
||||
<input type="checkbox" value="20" />
|
||||
20
|
||||
<input type="checkbox" value="21" />
|
||||
21
|
||||
<input type="checkbox" value="22" />
|
||||
22
|
||||
<input type="checkbox" value="23" />
|
||||
23
|
||||
<input type="checkbox" value="24" />
|
||||
24
|
||||
<input type="checkbox" value="25" />
|
||||
25
|
||||
<input type="checkbox" value="26" />
|
||||
26
|
||||
<input type="checkbox" value="27" />
|
||||
27
|
||||
<input type="checkbox" value="28" />
|
||||
28
|
||||
<input type="checkbox" value="29" />
|
||||
29
|
||||
<input type="checkbox" value="30" />
|
||||
30
|
||||
<input type="checkbox" value="31" />
|
||||
31
|
||||
</div>
|
||||
</div>
|
||||
<div title="月">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="mouth" onclick="everyTime(this)" />
|
||||
月 允许的通配符[, - * /]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="mouth" onclick="unAppoint(this)" />
|
||||
不指定
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="mouth" onclick="cycle(this)" />
|
||||
周期从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:12" value="1" id="mouthStart_0" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:12" value="2" id="mouthEnd_0" />
|
||||
月
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="mouth" onclick="startOn(this)" />
|
||||
从
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:12" value="1" id="mouthStart_1" />
|
||||
日开始,每
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:12" value="1" id="mouthEnd_1" />
|
||||
月执行一次
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="mouth" id="mouth_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp mouthList">
|
||||
<input type="checkbox" value="1" />
|
||||
1
|
||||
<input type="checkbox" value="2" />
|
||||
2
|
||||
<input type="checkbox" value="3" />
|
||||
3
|
||||
<input type="checkbox" value="4" />
|
||||
4
|
||||
<input type="checkbox" value="5" />
|
||||
5
|
||||
<input type="checkbox" value="6" />
|
||||
6
|
||||
<input type="checkbox" value="7" />
|
||||
7
|
||||
<input type="checkbox" value="8" />
|
||||
8
|
||||
<input type="checkbox" value="9" />
|
||||
9
|
||||
<input type="checkbox" value="10" />
|
||||
10
|
||||
<input type="checkbox" value="11" />
|
||||
11
|
||||
<input type="checkbox" value="12" />
|
||||
12
|
||||
</div>
|
||||
</div>
|
||||
<div title="周">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="week" onclick="everyTime(this)" />
|
||||
周 允许的通配符[, - * / L #]
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="week" onclick="unAppoint(this)" />
|
||||
不指定
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="week" onclick="startOn(this)" />
|
||||
周期 从星期
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:7" id="weekStart_0" value="1" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:2,max:7" value="2" id="weekEnd_0" />
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="week" onclick="weekOfDay(this)" />
|
||||
第
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:4" value="1" id="weekStart_1" />
|
||||
周 的星期
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:7" id="weekEnd_1" value="1" />
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="week" onclick="lastWeek(this)" />
|
||||
本月最后一个星期
|
||||
<input class="numberspinner" style="width: 60px" data-options="min:1,max:7" id="weekStart_2" value="1" />
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="week" id="week_appoint" />
|
||||
指定
|
||||
</div>
|
||||
<div class="imp weekList">
|
||||
<input type="checkbox" value="1" />
|
||||
1
|
||||
<input type="checkbox" value="2" />
|
||||
2
|
||||
<input type="checkbox" value="3" />
|
||||
3
|
||||
<input type="checkbox" value="4" />
|
||||
4
|
||||
<input type="checkbox" value="5" />
|
||||
5
|
||||
<input type="checkbox" value="6" />
|
||||
6
|
||||
<input type="checkbox" value="7" />
|
||||
7
|
||||
</div>
|
||||
</div>
|
||||
<div title="年">
|
||||
<div class="line">
|
||||
<input type="radio" checked="checked" name="year" onclick="unAppoint(this)" />
|
||||
不指定 允许的通配符[, - * /] 非必填
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="year" onclick="everyTime(this)" />
|
||||
每年
|
||||
</div>
|
||||
<div class="line">
|
||||
<input type="radio" name="year" onclick="cycle(this)" />
|
||||
周期 从
|
||||
<input class="numberspinner" style="width: 90px" data-options="min:2018,max:3000" id="yearStart_0" value="2018" />
|
||||
-
|
||||
<input class="numberspinner" style="width: 90px" data-options="min:2020,max:3000" id="yearEnd_0" value="2020" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-options="region:'south',border:false" style="height: 250px">
|
||||
<fieldset style="border-radius: 3px; height: 220px">
|
||||
<legend>表达式</legend>
|
||||
<table style="height: 100px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center">秒</td>
|
||||
<td align="center">分钟</td>
|
||||
<td align="center">小时</td>
|
||||
<td align="center">日</td>
|
||||
<td align="center">
|
||||
月
|
||||
<br />
|
||||
</td>
|
||||
<td align="center">星期</td>
|
||||
<td align="center">年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>表达式字段:</td>
|
||||
<td>
|
||||
<input type="text" name="v_second" class="col" value="*" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_min" class="col" value="*" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_hour" class="col" value="*" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_day" class="col" value="*" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_mouth" class="col" value="*" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_week" class="col" value="?" readonly="readonly" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="v_year" class="col" readonly="readonly" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cron 表达式:</td>
|
||||
<td colspan="6"><input type="text" name="cron" style="width: 100%" value="* * * * * ?" id="cron" /></td>
|
||||
<td><input type="button" value="反解析到UI " id="btnFan" onclick="btnFan()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8">最近5次运行时间:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" id="runTime"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<script src="${base}/assets/platform/plugins/jquery/jquery.js" type="text/javascript"></script>
|
||||
<script src="${base}/assets/platform/cron/js/cron.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,326 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="openAdd" size="medium" type="primary">
|
||||
<i class="ti-plus"></i>
|
||||
新建任务
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%">
|
||||
<el-table-column sortable prop="name" label="任务名称" header-align="center"></el-table-column>
|
||||
<el-table-column prop="jobClass" label="执行类" header-align="center" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="data" label="执行参数" header-align="center" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="cron" label="定时规则" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="exeAt" label="执行时间" header-align="center" align="center">
|
||||
<template slot-scope="scope">{{formatAt(scope.row.exeAt)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="启用状态" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.disabled" class="fa fa-circle text-danger ml5"></i>
|
||||
<i v-if="!scope.row.disabled" class="fa fa-circle text-success ml5"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'enable',id:scope.row.id,name:scope.row.name,row:scope.row}">启用</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'disable',id:scope.row.id,name:scope.row.name,row:scope.row}">
|
||||
禁用
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided :command="{type:'edit',id:scope.row.id}">修改</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',id:scope.row.id,name:scope.row.name}">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新建任务" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="50%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item prop="name" label="任务名称">
|
||||
<el-input maxlength="100" placeholder="任务名称" v-model="formData.name" auto-complete="off" tabindex="1" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="jobClass" label="执行类">
|
||||
<el-input placeholder="执行类" v-model="formData.jobClass" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="cron" label="执行周期">
|
||||
<el-input placeholder="Cron表达式" v-model="formData.cron" auto-complete="off" tabindex="3" type="text">
|
||||
<template slot="append">
|
||||
<a href="${base}/platform/sys/task/cron" style="color: #409eff" target="_blank">表达式生成器</a>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="data" label="执行参数(Json)">
|
||||
<el-input type="textarea" v-model="formData.data" placeholder="{}" tabindex="4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改任务" :visible.sync="editDialogVisible" :close-on-click-modal="false" width="50%">
|
||||
<el-form :model="formData" ref="editForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item prop="name" label="任务名称">
|
||||
<el-input maxlength="100" placeholder="任务名称" v-model="formData.name" auto-complete="off" tabindex="1" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="jobClass" label="执行类">
|
||||
<el-input placeholder="执行类" v-model="formData.jobClass" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="cron" label="执行周期">
|
||||
<el-input placeholder="Cron表达式" v-model="formData.cron" auto-complete="off" tabindex="3" type="text">
|
||||
<template slot="append">
|
||||
<a href="${base}/platform/sys/task/cron" style="color: #409eff" target="_blank">表达式生成器</a>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="data" label="执行参数(Json)">
|
||||
<el-input type="textarea" v-model="formData.data" placeholder="{}" tabindex="4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
formData: {
|
||||
id: ""
|
||||
},
|
||||
formRules: {
|
||||
name: [{ required: true, message: "任务名称", trigger: "blur" }],
|
||||
jobClass: [{ required: true, message: "执行类", trigger: "blur" }],
|
||||
cron: [{ required: true, message: "执行周期", trigger: "blur" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageOrder: function (column) {
|
||||
//按字段排序
|
||||
this.pageForm.pageOrderName = column.prop
|
||||
this.pageForm.pageOrderBy = column.order
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange: function (val) {
|
||||
//页码更新操作
|
||||
this.pageForm.pageNumber = val
|
||||
this.pageData()
|
||||
},
|
||||
pageSizeChange: function (val) {
|
||||
//分页大小更新操作
|
||||
this.pageForm.pageSize = val
|
||||
this.pageData()
|
||||
},
|
||||
pageData: function () {
|
||||
//加载分页数据
|
||||
var self = this
|
||||
$.post(
|
||||
base + "/platform/sys/task/data",
|
||||
self.pageForm,
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.list
|
||||
self.pageForm.totalCount = data.data.totalCount
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
},
|
||||
formatAt: function (val) {
|
||||
if (val && val > 0) return moment(val).format("YYYY-MM-DD HH:mm:ss")
|
||||
return ""
|
||||
},
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
openAdd: function () {
|
||||
var self = this
|
||||
this.addDialogVisible = true
|
||||
this.formData = {} //打开新增窗口,表单先清空
|
||||
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
|
||||
},
|
||||
doAdd: function () {
|
||||
var self = this
|
||||
self.$refs["addForm"].validate(function (valid) {
|
||||
if (valid) {
|
||||
$.post(
|
||||
base + "/platform/sys/task/addDo",
|
||||
self.formData,
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "success"
|
||||
})
|
||||
self.addDialogVisible = false
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
self.pageData() //添加失败也可以入库,所以加载一下看看
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
doEdit: function () {
|
||||
var self = this
|
||||
self.$refs["editForm"].validate(function (valid) {
|
||||
if (valid) {
|
||||
$.post(
|
||||
base + "/platform/sys/task/editDo",
|
||||
self.formData,
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "success"
|
||||
})
|
||||
self.doSearch() //查询是带条件的,加载新建用户选择的单位用户数据
|
||||
//self.pageData();
|
||||
self.editDialogVisible = false
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
dropdownCommand: function (command) {
|
||||
//监听下拉框事件
|
||||
var self = this
|
||||
if ("enable" == command.type || "disable" == command.type) {
|
||||
$.post(
|
||||
base + "/platform/sys/task/" + command.type + "/" + command.id,
|
||||
{},
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "success"
|
||||
})
|
||||
if ("disable" == command.type) {
|
||||
command.row.disabled = true
|
||||
}
|
||||
if ("enable" == command.type) {
|
||||
command.row.disabled = false
|
||||
}
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
if ("edit" == command.type) {
|
||||
$.post(
|
||||
base + "/platform/sys/task/edit/" + command.id,
|
||||
{},
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.formData = data.data //加载后台表单数据
|
||||
self.editDialogVisible = true //打开编辑窗口
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
if ("delete" == command.type) {
|
||||
self.$confirm("此操作将删除 " + command.name, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
//确认后再执行
|
||||
$.post(
|
||||
base + "/platform/sys/task/delete/" + command.id,
|
||||
{},
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "success"
|
||||
})
|
||||
self.doSearch()
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user