diff --git a/web/tpl/task_setTime.html b/web/tpl/task_setTime.html index a69463f124a..a026d17e746 100644 --- a/web/tpl/task_setTime.html +++ b/web/tpl/task_setTime.html @@ -30,14 +30,14 @@

设置定时

- +
- ~ - 秒 + ~ +
@@ -70,8 +70,12 @@

设置定时

if ($('#randtimezonesw')[0].checked == true){ sendData['tz1'] = parseInt($('#randtimezone1')[0].value); sendData['tz2'] = parseInt($('#randtimezone2')[0].value); - if (sendData['tz1'] > sendData['tz2']){ - $('#run-result').html("

随机值错误

开启随机时tz1 不能小于 tz2
").show(); + if (sendData['tz1'] >= sendData['tz2']){ + $('#run-result').html("

随机值错误

开启随机时tz1 需大于 tz2
").show(); + return false; + } + if (sendData['tz1'] > 604800 || sendData['tz2'] > 604800){ + $('#run-result').html("

随机值错误

随机值不能大于604800
").show(); return false; } sendData['randsw'] = true; diff --git a/web/tpl/taskmulti.html b/web/tpl/taskmulti.html index b94749a4c2d..f0bed2a9213 100644 --- a/web/tpl/taskmulti.html +++ b/web/tpl/taskmulti.html @@ -57,11 +57,11 @@
- +
- ~ - 秒 + ~ +
{% endif %} @@ -145,6 +145,14 @@ // 'cron_sec' : $('#cron_sec')[0].value, } data['settime'] = JSON.stringify(settime_tmp); + if (settime_tmp['randtimezone1'] >= settime_tmp['randtimezone2']){ + $('#run-result').html("

随机值错误

开启随机时tz1 需大于 tz2
").show(); + return false; + } + if (settime_tmp['randtimezone1'] > 604800 || settime_tmp['randtimezone2'] > 604800){ + $('#run-result').html("

随机值错误

随机值不能大于604800
").show(); + return false; + } } NProgress.inc();