1 Star 0 Fork 2

江月夜/cronConfig

forked from RinoNing/cronConfig 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cronConfigEdit.html 139.68 KB
一键复制 编辑 原始数据 按行查看 历史
Huilong.Ning 提交于 2020-06-18 15:23 . 首次提交
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467
<!DOCTYPE html>
<html>
<head>
<title>Quartz定时表达式生成器</title>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no cache"/>
<meta http-equiv="Expires" content="0"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no"/>
<link rel="stylesheet" type="text/css" href="css/jquery.jsonview.min.css" />
<link rel="stylesheet" type="text/css" href="css/formSelects-v4.css" />
<link rel="stylesheet" type="text/css" href="css/layui.css" />
<style type="text/css">
.laydate-theme-hide-header .layui-laydate-header,
.laydate-theme-hide-header .laydate-ym-show i.laydate-next-y, .laydate-theme-hide-header .laydate-ym-show i.laydate-prev-y {
display: none !important;
}
.laydate-theme-hide-header .layui-laydate-content{
padding: 0;
height: 135px;
}
.laydate-theme-hide-header .laydate-month-list > li{
margin: 0;
}
.laydate-theme-hide-header table{
display: none;
}
.laydate-theme-hide-header .laydate-month-list .layui-this,
.laydate-month-list .layui-selected,
.laydate-month-list .layui-this.layui-selected {
background-color: #1E9FFF !important;
color: #fff !important;
border: 1px solid #fff;
}
.select-text {
float: left;
line-height: 20px;
padding: 9px 15px;
}
.layui-this .layui-form-checked[lay-skin=primary] i {
border: 1px solid #fff;
background-color: #0099E6;
border-color: #fff;
font-weight: bold;
}
.layui-form-checked[lay-skin=primary] i {
border-color: #0099E6;
background-color: #0099E6;
color: #fff;
}
.layui-this .layui-form-checkbox[lay-skin=primary] span {
color: #fff;
}
.layui-timeline-item{
padding-bottom: 0;
}
.footer{
height: 10%;
width: 100%;
position: fixed;
bottom: 0;
z-index:999;
}
body{
overflow: auto;
margin-bottom:5%;
}
.xm-select-parent .xm-select{
min-height:33px;
height:33px;
}
#weekday-between{
margin-left:20px;
}
#weekday-in,#weekday-last,#weekday-week{
margin-left:-10px;
}
.layui-form-select dl {
min-height:150px
}
</style>
</head>
<body>
<!-- 表单 -->
<form class="layui-form" id="cronForm">
<div class="layui-col-xs7" style="margin-bottom:15%;">
<div class="layui-card">
<div class="layui-card-body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>定时规则生成</legend>
</fieldset>
<div class="layui-tab-content">
<div class="layui-form-item">
<label class="layui-form-label">每天执行</label>
<div class="layui-input-block">
<input type="radio" lay-filter="daily" name="rule[enable][daily]" value="yes" title="是">
<input type="radio" lay-filter="daily" name="rule[enable][daily]" value="no" title="否">
</div>
</div>
<div id="ruleOther" style="display: none">
<div class="layui-form-item">
<label class="layui-form-label">月份规则</label>
<div class="layui-input-inline">
<select name="cron[month][use]" lay-filter="month-rule">
<option value="every">每月</option>
<option value="in">多选月份</option>
<option value="between">指定月份范围</option>
<option value="interval">从 x 月开始执行,之后每间 x 月执行一次</option>
</select>
<input type="hidden" name="cron[month][every]" value="?">
</div>
<div class="layui-input-inline" id="month-in" style="display: none">
<div class="layui-hide">
<select name="cron[month][in][]" multiple>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div id="multi-month" readonly class="layui-laydate-main"></div>
</div>
<div class="layui-inline" id="month-between" style="display:none;">
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[month][between][start]" lay-search="">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 80px;margin-right: 0;">
<select name="cron[month][between][end]" lay-search="">
<option value="1">1月</option>
<option value="2">2月</option>
<option value="3">3月</option>
<option value="4">4月</option>
<option value="5">5月</option>
<option value="6">6月</option>
<option value="7">7月</option>
<option value="8">8月</option>
<option value="9">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</div>
</div>
<div class="layui-inline" id="month-interval" style="display: none">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[month][interval][start]" lay-search="">
<option value="1">1月</option>
<option value="2">2月</option>
<option value="3">3月</option>
<option value="4">4月</option>
<option value="5">5月</option>
<option value="6">6月</option>
<option value="7">7月</option>
<option value="8">8月</option>
<option value="9">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</div>
<span class="select-text">开始,每</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[month][interval][value]" lay-search="">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<span class="select-text">个月(不能跨年)</span>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">特殊规则</label>
<div class="layui-input-block">
<input type="radio" name="rule[enable][dayWeekday]" lay-filter="dayWeekday" checked value="day" title="月份天数规则">
<input type="radio" name="rule[enable][dayWeekday]" lay-filter="dayWeekday" value="weekday" title="月份星期规则">
</div>
</div>
</div>
<div class="layui-form-item" id="rule-weekday" style="display: none">
<div class="layui-inline">
<label class="layui-form-label">星期规则</label>
<div class="layui-input-inline">
<select name="cron[weekday][use]" lay-filter="weekday-rule" style="width: 260px">
<option value="between">指定星期范围</option>
<option value="in">指定星期(可多选)</option>
<option value="last">月份规则下最后一个指定的星期</option>
<option value="week">月份规则下第 x 周的星期 x</option>
</select>
</div>
</div>
<div class="layui-inline" id="weekday-in" style="display: none">
<span class="select-text">星期</span>
<div class="layui-input-inline">
<select name="cron[weekday][in][]" xm-select="weekInSelect">
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5"></option>
<option value="6"></option>
<option value="7"></option>
<option value="1"></option>
</select>
</div>
</div>
<div class="layui-inline" id="weekday-between">
<div class="layui-input-inline" style="width: 90px;margin-right: 0;">
<select name="cron[weekday][between][start]">
<option value="2">星期一</option>
<option value="3">星期二</option>
<option value="4">星期三</option>
<option value="5">星期四</option>
<option value="6">星期五</option>
<option value="7">星期六</option>
<option value="1">星期日</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 90px;margin-right: 0;">
<select name="cron[weekday][between][end]">
<option value="2">星期一</option>
<option value="3">星期二</option>
<option value="4">星期三</option>
<option value="5">星期四</option>
<option value="6">星期五</option>
<option value="7">星期六</option>
<option value="1">星期日</option>
</select>
</div>
</div>
<div class="layui-inline" id="weekday-last" style="display: none">
<span class="select-text">月份规则下最后一个</span>
<div class="layui-input-inline" style="width: 90px;margin-right: 0;">
<select name="cron[weekday][last]">
<option value="2L">星期一</option>
<option value="3L">星期二</option>
<option value="4L">星期三</option>
<option value="5L">星期四</option>
<option value="6L">星期五</option>
<option value="7L">星期六</option>
<option value="1L">星期日</option>
</select>
</div>
</div>
<div class="layui-inline" id="weekday-week" style="display: none">
<span class="select-text">月份规则下</span>
<div class="layui-input-inline" style="width: 90px;margin-right: 0;">
<select name="cron[weekday][week][at]">
<option value="1">第 1 周</option>
<option value="2">第 2 周</option>
<option value="3">第 3 周</option>
<option value="4">第 4 周</option>
<option value="5">第 5 周</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 90px;margin-right: 0;">
<select name="cron[weekday][week][weekday]">
<option value="2">星期一</option>
<option value="3">星期二</option>
<option value="4">星期三</option>
<option value="5">星期四</option>
<option value="6">星期五</option>
<option value="7">星期六</option>
<option value="1">星期日</option>
</select>
</div>
</div>
</div>
<div class="layui-form-item" id="rule-day">
<div class="layui-inline">
<label class="layui-form-label">天数规则</label>
<div class="layui-input-inline" style="width: 300px">
<select name="cron[day][use]" lay-filter="day-rule">
<option value="interval">月份规则下指定从 x 号开始,每 x 天执行一次</option>
<option value="in">月份规则下指定一天或多天</option>
<option value="between">月份规则下指定多天(范围选择)</option>
<option value="last">月份规则下最后一天</option>
<option value="lastWorkday">月份规则下最后一个工作日</option>
<option value="recentWorkday">月份规则下指定一天最近的工作日(不能跨月)</option>
</select>
</div>
<input type="hidden" name="cron[day][last]" value="L">
<input type="hidden" name="cron[day][lastWorkday]" value="LW">
</div>
<div class="layui-inline" id="day-in" style="display: none">
<span class="select-text">月份规则的</span>
<div class="layui-input-inline" style="width: 200px;margin-left: 80px;">
<select name="cron[day][in][]" xm-select="dayInSelect">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="day-recentWorkday" style="display: none">
<span class="select-text">月份规则</span>
<div class="layui-input-inline" style="width: 100px;margin-right: 0;">
<select name="cron[day][recentWorkday]">
<option value="1W">1</option>
<option value="2W">2</option>
<option value="3W">3</option>
<option value="4W">4</option>
<option value="5W">5</option>
<option value="6W">6</option>
<option value="7W">7</option>
<option value="8W">8</option>
<option value="9W">9</option>
<option value="10W">10</option>
<option value="11W">11</option>
<option value="12W">12</option>
<option value="13W">13</option>
<option value="14W">14</option>
<option value="15W">15</option>
<option value="16W">16</option>
<option value="17W">17</option>
<option value="18W">18</option>
<option value="19W">19</option>
<option value="20W">20</option>
<option value="21W">21</option>
<option value="22W">22</option>
<option value="23W">23</option>
<option value="24W">24</option>
<option value="25W">25</option>
<option value="26W">26</option>
<option value="27W">27</option>
<option value="28W">28</option>
<option value="29W">29</option>
<option value="30W">30</option>
<option value="31W">31</option>
</select>
</div>
<span class="select-text">号最近的工作日(不能跨月)</span>
</div>
<div class="layui-inline" id="day-between" style="display: none">
<span class="select-text">月份规则从</span>
<div class="layui-input-inline" style="width: 80px;margin-left: 80px;">
<select name="cron[day][between][start]">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</div>
<span class="select-text">号到</span>
<div class="layui-input-inline" style="width: 80px;margin-right: 0;">
<select name="cron[day][between][end]">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="day-interval" style="margin-left:13%">
<span class="select-text">月份规则从</span>
<div class="layui-input-inline" style="width: 80px;margin-right: 0;">
<select name="cron[day][interval][start]">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</div>
<span class="select-text">号开始,每</span>
<div class="layui-input-inline" style="width: 80px;margin-right: 0;">
<select name="cron[day][interval][value]">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</div>
<span class="select-text"></span>
</div>
</div>
</div>
<div id="ruleEveryDay" style="display: none;">
<div class="layui-form-item">
<label class="layui-form-label">小时规则</label>
<div class="layui-input-inline">
<select name="cron[hour][use]" lay-filter="hour-rule">
<option value="at">指定小时</option>
<option value="in">指定小时(可多选)</option>
<option value="between">指定小时范围(0-23)</option>
<option value="interval">从 x 小时开始执行,之后每 x 小时执行一次</option>
</select>
</div>
<div class="layui-inline" id="hour-at">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select lay-filter="hour-every" name="cron[hour][at]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="hour-in" style="display: none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 200px;margin-right: 0;">
<select name="cron[hour][in][]" xm-select="hourInSelect">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text">小时</span>
</div>
<div class="layui-inline" id="hour-between" style="display: none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[hour][between][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[hour][between][end]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text">小时</span>
</div>
<div class="layui-inline" id="hour-interval" style="display: none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select lay-filter="hour-interval-start" name="cron[hour][interval][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text">小时开始,每</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select layer-filter="hour-interval-value" name="cron[hour][interval][value]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</div>
<span class="select-text">小时</span>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">分钟规则</label>
<div class="layui-input-inline">
<select name="cron[minute][use]" lay-filter="minute-rule">
<option value="at">指定分钟</option>
<option value="in">指定分钟(可多选)</option>
<option value="between">指定分钟范围(0-59)</option>
<option value="interval">从 x 分钟开始执行,之后每间 x 分钟执行一次</option>
</select>
</div>
<div class="layui-inline" id="minute-at">
<span class="select-text">&nbsp;&nbsp;</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select lay-filter="minute-at" name="cron[minute][at]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="minute-in" style="display:none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 200px;margin-right: 0;">
<select name="cron[minute][in][]" xm-select="minuteInSelect">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text">分钟</span>
</div>
<div class="layui-inline" id="minute-between" style="display:none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[minute][between][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[minute][between][end]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text">分钟</span>
</div>
<div class="layui-inline" id="minute-interval" style="display: none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[minute][interval][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text">分钟开始,每</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[minute][interval][value]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text">分钟</span>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">秒规则</label>
<div class="layui-input-inline">
<select name="cron[seconds][use]" lay-filter="seconds-rule">
<option value="at">指定秒</option>
<option value="in">指定秒(可多选)</option>
<option value="between">指定秒范围(0-59)</option>
<option value="interval">从 x 秒开始执行,之后每 x 秒执行一次</option>
</select>
</div>
<div class="layui-inline" id="seconds-at">
<span class="select-text">&nbsp;&nbsp;</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[seconds][at]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="seconds-in" style="display:none;">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 200px;margin-right: 0;">
<select name="cron[seconds][in][]" xm-select="secondsInSelect">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="seconds-between" style="display: none">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[seconds][between][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[seconds][between][end]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
</div>
<div class="layui-inline" id="seconds-interval" style="display: none">
<span class="select-text"></span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[seconds][interval][start]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text">秒开始,每</span>
<div class="layui-input-inline" style="width: 66px;margin-right: 0;">
<select name="cron[seconds][interval][value]" lay-search="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</div>
<span class="select-text"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-xs5">
<div class="layui-card">
<div class="layui-card-body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>生成结果</legend>
</fieldset>
<div class="layui-form layui-form-pane">
<div class="layui-form-item">
<label class="layui-form-label">cron表达式</label>
<div class="layui-input-block">
<input id="cron" autocomplete="off" class="layui-input" type="text" style="height:2.7em;" disabled>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">表达式描述</label>
<p class="layui-textarea" id="cronDesc" style="height:150px;min-height:50px" placeholder="待生成"></p>
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-xs5">
<div class="layui-card">
<div class="layui-card-body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>调试数据</legend>
</fieldset>
<div class="layui-form layui-form-pane">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">调试数据</label>
<span class="layui-textarea" id="cronData"></span>
</div>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript" src="js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-1.11.1.js"></script>
<script type="text/javascript" src="layui/layui.all.js"></script>
<script type="text/javascript" src="js/jquery/jquery.jsonview.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.serializejson.min.js"></script>
<script type="text/javascript" src="layui/formSelects-v4.js"></script>
<script type="text/html" id="executePreviewTpl">
{{# layui.each(d, function(index, item){
if(item.length > 0){ }}
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">{{item}}</div>
</div>
</li>
{{# }
}) }}
</script>
<script type="text/javascript">
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
var hasNull = false;
function syncCron(json){
var data = $('#cronForm').serializeJSON({
customTypes:{
"cron[hour][in]": "array",
"cron[month][in]": "array",
"cron[weekday][in]": "array",
"cron[day][in]": "array",
"cron[minute][in]":"array",
"cron[seconds][in]":"array"
}
}), cron = '', cronDesc = '';
var rule = data.rule, cron = data.cron;
//修改数据
if(!!json){
var jsonData = JSON.parse(json);
for(var key in jsonData){
var value=jsonData[key];
var newArray=new Array();
newArray.push(value);
if(key=="hourIn"){
cron.hour.in=newArray;
}else if(key=="minuteIn"){
cron.minute.in=newArray;
}else if(key=="secondsIn"){
cron.seconds.in=newArray;
}else if(key=="dayIn"){
cron.day.in=newArray;
}else if(key=="weekdayIn"){
cron.weekday.in=newArray.toString().split(",");
}
}
}
var expression = {
seconds: null,
minute: null,
hour: null,
day: null,
month: null,
weekday: null,
year: '*'
};
var desc = {
seconds: null,
minute: null,
hour: null,
day: null,
month: null,
weekday: null,
year: null
};
switch (cron.month.use) {
case 'every':
expression.month = '*';
desc.month = '每月';
desc.year = null;
break;
case 'in':
if (cron.month.in instanceof Array && cron.month.in.length > 0) {
expression.month = cron.month.in.join(',');
desc.month = expression.month + '月的 ';
}
break;
case 'between':
expression.month = cron.month.between.start + '-' + cron.month.between.end;
if(cron.month.between.start == cron.month.between.end){
desc.month = cron.month.between.start + '月的 ';
} else {
desc.month = cron.month.between.start + '月到' + cron.month.between.end + '月的 ';
}
break;
case 'interval':
expression.month = cron.month.interval.start + '/' + cron.month.interval.value;
var count = Number(cron.month.interval.value) == 1 ? '' : cron.month.interval.value;
desc.month = '' + cron.month.interval.start + '月开始,每' + count + '个月的 ';
break;
}
if(rule.enable.daily == 'yes'){
expression.day = "*";
expression.weekday = "?";
expression.month = "*";
desc.day = '每天的';
desc.weekday = null;
desc.month = null;
}else{
if(cron.month.use != 'every'){
desc.year = '每年的 ';
}
//月份天数规则
if(rule.enable.dayWeekday == 'day'){
expression.weekday = "?";
desc.weekday = null;
switch (cron.day.use) {
case 'interval':
expression.day = cron.day.interval.start + '/' + cron.day.interval.value;
var count = Number(cron.day.interval.value) == 1 ? '' : cron.day.interval.value;
desc.day = '' + cron.day.interval.start + '号开始,每' + count + '天的 ';
break;
case 'in':
if (cron.day.in instanceof Array && cron.day.in.length > 0) {
expression.day = cron.day.in.join(',');
desc.day = expression.day + '号的 ';
}
break;
case 'between':
expression.day = cron.day.between.start + '-' + cron.day.between.end;
if(cron.day.between.start == cron.day.between.end){
desc.day = cron.day.between.start + "";
} else {
desc.day = cron.day.between.start + '号到' + cron.day.between.end + '号的 ';
}
break;
case 'last':
expression.day = 'L';
desc.day = '月末(最后一天)的 ';
break;
case 'lastWorkday':
expression.day = 'LW';
desc.day = '当月的最后一个工作日的 ';
break;
case 'recentWorkday':
expression.day = cron.day.recentWorkday;
desc.day = '当月' + parseInt(expression.day) + '号的最近的一个工作日的 ';
break;
}
} else {
//月份星期规则
expression.day = "?";
desc.day = null;
var weekDesc = {
"1": "星期日",
"2": "星期一",
"3": "星期二",
"4": "星期三",
"5": "星期四",
"6": "星期五",
"7": "星期六"
};
switch (cron.weekday.use) {
case 'between':
expression.weekday = cron.weekday.between.start + '-' + cron.weekday.between.end;
if(cron.weekday.between.start == cron.weekday.between.end){
desc.weekday = weekDesc[cron.weekday.between.start] + "";
} else {
desc.weekday = weekDesc[cron.weekday.between.start] + '' + weekDesc[cron.weekday.between.end] + "";
}
break;
case 'in':
if(cron.weekday.in.length==1){
cron.weekday.in=cron.weekday.in.toString().split(",");
}
if (cron.weekday.in instanceof Array && cron.weekday.in.length > 0) {
expression.weekday = cron.weekday.in.join(',');
desc.weekday = $.map(cron.weekday.in, function (value) {
return weekDesc[value]
}).join(' ',) + "";
}
break;
case 'last':
expression.weekday = cron.weekday.last;
desc.weekday = '当月最后一个' + weekDesc[parseInt(expression.weekday)] + "";
break;
case 'week':
expression.weekday = cron.weekday.week.at + '/' + cron.weekday.week.weekday;
desc.weekday = '当月第 ' + cron.weekday.week.at + " 周的" + weekDesc[cron.weekday.week.weekday] + "";
break;
}
}
}
switch (cron.hour.use) {
case 'at':
expression.hour = cron.hour.at;
desc.hour = cron.hour.at + '';
break;
case 'in':
if (cron.hour.in instanceof Array && cron.hour.in.length > 0) {
expression.hour = cron.hour.in.join(',');
desc.hour = expression.hour + '点的 ';
}
break;
case 'between':
expression.hour = cron.hour.between.start + '-' + cron.hour.between.end;
if(cron.hour.between.start == cron.hour.between.end){
desc.hour = cron.hour.between.start + '点的 ';
} else {
desc.hour = cron.hour.between.start + '点到' + cron.hour.between.end + '点的 ';
}
break;
case 'interval':
expression.hour = cron.hour.interval.start + '/' + cron.hour.interval.value;
desc.hour = '' + cron.hour.interval.start + ' 点开始,每' + cron.hour.interval.value + '个小时的 ';
break;
}
switch (cron.minute.use) {
case 'at':
expression.minute = cron.minute.at;
desc.minute = cron.minute.at + '';
break;
case 'in':
if (cron.minute.in instanceof Array && cron.minute.in.length > 0) {
expression.minute = cron.minute.in.join(',');
desc.minute = expression.minute + '分的 ';
}
break;
case 'between':
expression.minute = cron.minute.between.start + '-' + cron.minute.between.end;
if(cron.minute.between.start == cron.minute.between.end){
desc.minute = cron.minute.between.start + '分的 ';
} else {
desc.minute = cron.minute.between.start + '分到' + cron.minute.between.end + '分的 ';
}
break;
case 'interval':
expression.minute = cron.minute.interval.start + '/' + cron.minute.interval.value;
desc.minute = '' + cron.minute.interval.start + '分开始,每' + cron.minute.interval.value + '分钟的 ';
break;
}
switch (cron.seconds.use) {
case 'at':
expression.seconds = cron.seconds.at;
desc.seconds = cron.seconds.at + '秒 触发一次';
break;
case 'in':
if (cron.seconds.in instanceof Array && cron.seconds.in.length > 0) {
expression.seconds = cron.seconds.in.join(',');
desc.seconds = expression.seconds + '秒 触发一次';
}
break;
case 'between':
expression.seconds = cron.seconds.between.start + '-' + cron.seconds.between.end;
if(cron.seconds.between.start == cron.seconds.between.end){
desc.seconds = cron.seconds.between.start + '秒 触发一次';
} else {
desc.seconds = cron.seconds.between.start + '秒到' + cron.seconds.between.end + '秒 触发一次';
}
break;
case 'interval':
expression.seconds = cron.seconds.interval.start + '/' + cron.seconds.interval.value;
desc.seconds = '' + cron.seconds.interval.start + '秒开始,每' + cron.seconds.interval.value + '秒 触发一次';
break;
}
var cronArr = [], cronDescArr = [];
cronArr.push(expression.seconds);
cronArr.push(expression.minute);
cronArr.push(expression.hour);
cronArr.push(expression.day);
cronArr.push(expression.month);
cronArr.push(expression.weekday);
cronArr.push(expression.year);
if (desc.year != null) {
cronDescArr.push(desc.year);
}
if (desc.month != null) {
cronDescArr.push(desc.month);
}
if (desc.weekday != null) {
cronDescArr.push(desc.weekday);
}
if (desc.day != null) {
cronDescArr.push(desc.day);
}
cronDescArr.push(desc.hour);
cronDescArr.push(desc.minute);
cronDescArr.push(desc.seconds);
hasNull=false;
$.each(cronArr, function (i, v) {
if(v == null || v == ""){
hasNull = true;
}
});
var cronStr = cronArr.join(' ');
cronDesc = cronDescArr.join(' ');
if(hasNull){
top.layer.msg('您使用了多选规则,请至少选择一项');
} else {
if (cronStr != $('#cron').val()) {
$.support.cors = true;
$('#cron').val(cronStr);
$('#cronDesc').text(cronDesc);
$('#cronData').JSONView(data);
}
}
}
layui.use(['form', 'laydate', 'laytpl'], function () {
var form = layui.form, formSelects = layui.formSelects, laydate = layui.laydate, laytpl = layui.laytpl;
var monthInput = '#multi-month';
layui.laydate.render({
elem: monthInput,
theme: 'hide-header',
type: 'month',
format: 'M',
position: 'static',
showBottom: false,
ready: function (date) {
$('.laydate-set-ym').html('<span>可以选择多个月份</span>');
$('.laydate-month-list li').removeClass('layui-this');
},
change: function (value, date, endDate) {
var select = $('#month-in select');
var ele = $('.laydate-month-list li:eq(' + (date.month - 1) + ')');
var remove = ele.hasClass('layui-selected');
ele.toggleClass('layui-selected').removeClass("layui-this");
var months = $(monthInput).data('selected');
if (months == null) {
months = [];
}
if (remove) {
months.splice($.inArray(date.month, months), 1);
} else {
months.push(date.month);
}
months = months.sort(function (a, b) {
return Number(a) - Number(b)
});
months = $.unique(months);
if (months.length > 0) {
select.children('option').each(function () {
var selected = $.inArray(Number(this.value), months) != -1;
$(this).prop('selected', selected);
});
} else {
select.children('option').prop('selected', false);
}
$(monthInput).data('selected', months);
syncCron(null);
}
});
form.on('radio(daily)', function (d) {
if (d.value == 'yes') {
$('#ruleOther').hide();
$('#ruleEveryDay').show();
} else if (d.value == 'no') {
$('#ruleOther').show();
$('#ruleEveryDay').show();
} else {
layer.msg('请选择是否每天执行');
}
});
form.on('radio(dayWeekday)', function (d) {
if (d.value == 'weekday') {
$('#rule-weekday').show();
$('#rule-day').hide();
} else if (d.value == 'day') {
$('#rule-day').show();
$('#rule-weekday').hide();
}
});
form.on('select(month-rule)', function (d) {
$('[id^="month-"]').hide();
$('#month-select').hide();
switch (d.value) {
case 'in':
$('#month-in').show();
$('#month-input').show();
$('#month-select').show();
break;
case 'between':
$('#month-between').show();
break;
case 'interval':
$('#month-interval').show();
break;
}
});
form.on('select(weekday-rule)', function (d) {
$('[id^="weekday-"]').hide();
switch (d.value) {
case 'in':
$('#weekday-in').show();
break;
case 'between':
$('#weekday-between').show();
break;
case 'last':
$('#weekday-last').show();
break;
case 'week':
$('#weekday-week').show();
break;
}
});
form.on('select(day-rule)', function (d) {
$('[id^="day-"]').hide();
switch (d.value) {
case 'in':
$('#day-in').show();
break;
case 'recentWorkday':
$('#day-recentWorkday').show();
break;
case 'between':
$('#day-between').show();
break;
case 'interval':
$('#day-interval').show();
break;
}
});
form.on('select(hour-rule)', function (d) {
$('[id^="hour-"]').hide();
switch (d.value) {
case 'at':
$('#hour-at').show();
break;
case 'in':
$('#hour-in').show();
break;
case 'between':
$('#hour-between').show();
break;
case 'interval':
$('#hour-interval').show();
break;
}
});
form.on('select(minute-rule)', function (d) {
$('[id^="minute-"]').hide();
switch (d.value) {
case 'at':
$('#minute-at').show();
break;
case 'in':
$('#minute-in').show();
break;
case 'between':
$('#minute-between').show();
break;
case 'interval':
$('#minute-interval').show();
break;
}
});
form.on('select(seconds-rule)', function (d) {
$('[id^="seconds-"]').hide();
switch (d.value) {
case 'at':
$('#seconds-at').show();
break;
case 'in':
$('#seconds-in').show();
break;
case 'between':
$('#seconds-between').show();
break;
case 'interval':
$('#seconds-interval').show();
break;
}
});
form.on('select', function (data) {
syncCron(null);
});
form.on('radio', function (data) {
syncCron(null);
});
formSelects.on("hourInSelect",function(id, vals, val, isAdd, isDisabled){
var newValue;
var oldValue=layui.formSelects.value("hourInSelect","val");
if(isAdd){
oldValue.push(val.value);
newValue=oldValue.join(",");
}else{
if(oldValue.indexOf(val.value)>=0){
oldValue.remove(val.value);
}
newValue=oldValue.join(",");
}
var json="{\"hourIn\":\""+newValue+"\"}";
syncCron(json);
});
formSelects.on("minuteInSelect",function(id, vals, val, isAdd, isDisabled){
var newValue;
var oldValue=layui.formSelects.value("minuteInSelect","val");
if(isAdd){
oldValue.push(val.value);
newValue=oldValue.join(",");
}else{
if(oldValue.indexOf(val.value)>=0){
oldValue.remove(val.value);
}
newValue=oldValue.join(",");
}
var json="{\"minuteIn\":\""+newValue+"\"}";
syncCron(json);
});
formSelects.on("secondsInSelect",function(id, vals, val, isAdd, isDisabled){
var newValue;
var oldValue=layui.formSelects.value("secondsInSelect","val");
if(isAdd){
oldValue.push(val.value);
newValue=oldValue.join(",");
}else{
if(oldValue.indexOf(val.value)>=0){
oldValue.remove(val.value);
}
newValue=oldValue.join(",");
}
var json="{\"secondsIn\":\""+newValue+"\"}";
syncCron(json);
});
formSelects.on("dayInSelect",function(id, vals, val, isAdd, isDisabled){
var newValue;
var oldValue=layui.formSelects.value("dayInSelect","val");
if(isAdd){
oldValue.push(val.value);
newValue=oldValue.join(",");
}else{
if(oldValue.indexOf(val.value)>=0){
oldValue.remove(val.value);
}
newValue=oldValue.join(",");
}
var json="{\"dayIn\":\""+newValue+"\"}";
syncCron(json);
});
formSelects.on("weekInSelect",function(id, vals, val, isAdd, isDisabled){
var newValue;
var oldValue=layui.formSelects.value("weekInSelect","val");
if(isAdd){
oldValue.push(val.value);
newValue=oldValue.join(",");
}else{
if(oldValue.indexOf(val.value)>=0){
oldValue.remove(val.value);
}
newValue=oldValue.join(",");
}
var json="{\"weekdayIn\":\""+newValue+"\"}";
syncCron(json);
});
});
var form = layui.form, layer = layui.layer,formSelects = layui.formSelects;
//根据表达式默认配置,方便系统修改时自动配置。这里可以使用自己系统的接口查询corn表达式进行改写
$(function(){
var cron="0 0 8 * * ? *";
var cronDesc="每天的 8点 0分 0秒 触发一次";
//根据cron表达式,默认配置
//拆分
var splits=cron.split(" ");
//秒
var seconds=splits[0];
//分
var minute=splits[1];
//时
var hour=splits[2];
//每月月份天数规则
var monthDay=splits[3];
//非每月月份规则
var month=splits[4];
//月份星期
var weekDay=splits[5];
//每天执行
if(cron.indexOf("* * ? *")>=0){
//每天执行按钮选中
$("input[type='radio'][value='yes']").attr("checked",true);
//展开配置项
$('#ruleOther').hide();
$('#ruleEveryDay').show();
}else{
//非每天执行
//非每天执行按钮选中
$("input[type='radio'][value='no']").attr("checked",true);
//展开配置项
$('#ruleOther').show();
$('#ruleEveryDay').show();
}
/**具体规则**/
//时规则
/**指定小时**/
//指定小时(可多选)
$('[id^="hour-"]').hide();
if(hour.indexOf(",")>=0){
$("select[name='cron[hour][use]']").find("option[value='in']").attr("selected", true);
$('#hour-in').show();
//默认选中
var hourSplits=hour.split(",");
formSelects.value('hourInSelect', hourSplits);
}else if(hour.indexOf("-")>=0){
//指定小时范围(0-23)
$("select[name='cron[hour][use]']").find("option[value='between']").attr("selected", true);
$('#hour-between').show();
//默认选中
var hourSplits=hour.split("-");
$("select[name='cron[hour][between][start]']").val(hourSplits[0]);
$("select[name='cron[hour][between][end]']").val(hourSplits[1]);
}else if(hour.indexOf("/")>=0){
//从 x 小时开始执行,之后每 x 小时执行一次
$("select[name='cron[hour][use]']").find("option[value='interval']").attr("selected", true);
$('#hour-interval').show();
//默认选中
var hourSplits=hour.split("/");
$("select[name='cron[hour][interval][start]']").val(hourSplits[0]);
$("select[name='cron[hour][interval][value]']").val(hourSplits[1]);
}else{
//指定小时
$("select[name='cron[hour][use]']").find("option[value='at']").attr("selected", true);
$('#hour-at').show();
//默认选中
$("select[name='cron[hour][at]']").val(hour);
}
/**指定小时**/
/**指定分钟**/
//指定分钟(可多选)
$('[id^="minute-"]').hide();
if(minute.indexOf(",")>=0){
$("select[name='cron[minute][use]']").find("option[value='in']").attr("selected", true);
$('#minute-in').show();
//默认选中
var minuteSplits=minute.split(",");
formSelects.value('minuteInSelect', minuteSplits);
}else if(minute.indexOf("-")>=0){
//指定分钟范围(0-59)
$("select[name='cron[minute][use]']").find("option[value='between']").attr("selected", true);
$('#minute-between').show();
//默认选中
var minuteSplits=minute.split("-");
$("select[name='cron[minute][between][start]']").val(minuteSplits[0]);
$("select[name='cron[minute][between][end]']").val(minuteSplits[1]);
}else if(minute.indexOf("/")>=0){
//从 x 分钟开始执行,之后每 x 分钟执行一次
$("select[name='cron[minute][use]']").find("option[value='interval']").attr("selected", true);
$('#minute-interval').show();
//默认选中
var minuteSplits=minute.split("/");
$("select[name='cron[minute][interval][start]']").val(minuteSplits[0]);
$("select[name='cron[minute][interval][value]']").val(minuteSplits[1]);
}else{
//指定分钟
$("select[name='cron[minute][use]']").find("option[value='at']").attr("selected", true);
$('#minute-at').show();
//默认选中
$("select[name='cron[minute][at]']").val(minute);
}
/**指定分钟**/
/**指定秒**/
$('[id^="seconds-"]').hide();
if(seconds.indexOf(",")>=0){
$("select[name='cron[seconds][use]']").find("option[value='in']").attr("selected", true);
$('#seconds-in').show();
//默认选中
var secondsSplits=seconds.split(",");
formSelects.value('secondsInSelect', secondsSplits);
}else if(seconds.indexOf("-")>=0){
//指定秒范围(0-23)
$("select[name='cron[seconds][use]']").find("option[value='between']").attr("selected", true);
$('#seconds-between').show();
//默认选中
var secondsSplits=seconds.split("-");
$("select[name='cron[seconds][between][start]']").val(secondsSplits[0]);
$("select[name='cron[seconds][between][end]']").val(secondsSplits[1]);
}else if(seconds.indexOf("/")>=0){
//从 x 秒开始执行,之后每 x 秒执行一次
$("select[name='cron[seconds][use]']").find("option[value='interval']").attr("selected", true);
$('#seconds-interval').show();
//默认选中
var secondsSplits=seconds.split("/");
$("select[name='cron[seconds][interval][start]']").val(secondsSplits[0]);
$("select[name='cron[seconds][interval][value]']").val(secondsSplits[1]);
}else{
//指定秒
$("select[name='cron[seconds][use]']").find("option[value='at']").attr("selected", true);
$('#seconds-at').show();
//默认选中
$("select[name='cron[seconds][at]']").val(seconds);
}
/**指定秒**/
/**月份规则**/
$('[id^="month-"]').hide();
$('#month-select').hide();
//每月
if(month=="*"){
$("select[name='cron[month][use]']").find("option[value='every']").attr("selected", true);
}else if(month.indexOf(",")>=0){
//多选月份
$("select[name='cron[month][use]']").find("option[value='in']").attr("selected", true);
$('#month-in').show();
$('#month-input').show();
$('#month-select').show();
//默认选中
var monthSplits=month.split(",");
for(var i=0;i<monthSplits.length;i++){
$("#month-in select").children("option[value='"+(monthSplits[i]>0?(monthSplits[i]-1):monthSplits[i])+"']").prop('selected', false);
$('#multi-month').find("li[lay-ym="+(monthSplits[i]>0?(monthSplits[i]-1):monthSplits[i])+"]").attr("class","layui-selected");
}
$('#multi-month').data('selected', monthSplits.map(Number));
}else if(month.indexOf("-")>=0){
//指定月份范围
$("select[name='cron[month][use]']").find("option[value='between']").attr("selected", true);
$('#month-between').show();
//默认选中
var monthSplits=month.split("-");
$("select[name='cron[month][between][start]']").val(monthSplits[0]);
$("select[name='cron[month][between][end]']").val(monthSplits[1]);
}else if(month.indexOf("/")>=0){
//从 x 月开始执行,之后每间 x 月执行一次
$("select[name='cron[month][use]']").find("option[value='interval']").attr("selected", true);
$('#month-interval').show();
//默认选中
var monthSplits=month.split("/");
$("select[name='cron[month][interval][start]']").val(monthSplits[0]);
$("select[name='cron[month][interval][value]']").val(monthSplits[1]);
}
/**月份规则**/
/**月份天数规则**/
$('[id^="day-"]').hide();
//月份天数规则
if(monthDay!="?"){
$('#rule-day').show();
$('#rule-weekday').hide();
$("input[type='radio'][value='day']").attr("checked",true);
//月份规则下指定从 x 号开始,每 x 天执行一次
if(monthDay.indexOf("/")>=0){
$('#day-interval').show();
//默认选中
$("select[name='cron[day][use]']").find("option[value='interval']").attr("selected", true);
var monthDaySplits=monthDay.split("/");
$("select[name='cron[day][interval][start]']").val(monthDaySplits[0]);
$("select[name='cron[day][interval][value]']").val(monthDaySplits[1]);
}else if(monthDay.indexOf(",")>=0){
//月份规则下指定一天或多天
$('#day-in').show();
//默认选中
$("select[name='cron[day][use]']").find("option[value='in']").attr("selected", true);
var monthDaySplits=monthDay.split(",");
formSelects.value('dayInSelect', monthDaySplits);
}else if(monthDay.indexOf("-")>=0){
//月份规则下指定多天(范围选择)
$('#day-between').show();
//默认选中
$("select[name='cron[day][use]']").find("option[value='between']").attr("selected", true);
var monthDaySplits=monthDay.split("-");
$("select[name='cron[day][between][start]']").val(monthDaySplits[0]);
$("select[name='cron[day][between][end]']").val(monthDaySplits[1]);
}else if(monthDay=="L"){
//月份规则下最后一天
//默认选中
$("select[name='cron[day][use]']").find("option[value='last']").attr("selected", true);
}else if(monthDay=="LW"){
//月份规则下最后一个工作日
//默认选中
$("select[name='cron[day][use]']").find("option[value='lastWorkday']").attr("selected", true);
}else if(monthDay.indexOf("W")==1){
//月份规则下指定一天最近的工作日(不能跨月)
$('#day-recentWorkday').show();
//默认选中
$("select[name='cron[day][use]']").find("option[value='recentWorkday']").attr("selected", true);
$("select[name='cron[day][recentWorkday]']").val(monthDay);
}
}else{
$('#rule-weekday').show();
$('#rule-day').hide();
//月份星期规则
$("input[type='radio'][value='weekday']").attr("checked",true);
$('[id^="weekday-"]').hide();
//指定星期范围
if(weekDay.indexOf("-")>=0){
$("select[name='cron[weekday][use]']").find("option[value='between']").attr("selected", true);
$('#weekday-between').show();
//默认值
var weekDaySplits=weekDay.split("-");
$("select[name='cron[weekday][week][start]']").val(weekDaySplits[0]);
$("select[name='cron[weekday][week][end]']").val(weekDaySplits[1]);
}else if(weekDay.indexOf(",")>=0){
//指定星期(可多选)
$("select[name='cron[weekday][use]']").find("option[value='in']").attr("selected", true);
$('#weekday-in').show();
//默认值
var weekDaySplits=weekDay.split(",");
formSelects.value('weekInSelect', weekDaySplits);
}else if(weekDay.indexOf("L")==1){
//月份规则下最后一个指定的星期
$("select[name='cron[weekday][use]']").find("option[value='last']").attr("selected", true);
$('#weekday-last').show();
//默认值
$("select[name='cron[weekday][last]']").val(weekDay);
}else if(weekDay.indexOf("/")>=0){
//月份规则下第 x 周的星期 x
$("select[name='cron[weekday][use]']").find("option[value='week']").attr("selected", true);
$('#weekday-week').show();
//默认值
var weekDaySplits=weekDay.split("/");
$("select[name='cron[weekday][week][at]']").val(weekDaySplits[0]);
$("select[name='cron[weekday][week][weekday]']").val(weekDaySplits[1]);
}
}
/**月份天数规则**/
/**具体规则*/
form.render('radio');
form.render('select');
$("#cron").val(cron);
$('#cronDesc').text(cronDesc);
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zhouatnet/cronConfig.git
[email protected]:zhouatnet/cronConfig.git
zhouatnet
cronConfig
cronConfig
master

搜索帮助