|
@@ -534,7 +534,7 @@ let validateDuration = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab2";
|
|
|
_this.activeName = "tab2";
|
|
|
}
|
|
|
- } else if (0 > duration || !duration.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
+ } else if (!duration.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
callback(new Error("只能是非负整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab2";
|
|
@@ -553,7 +553,7 @@ let validateExamTimes = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab2";
|
|
|
_this.activeName = "tab2";
|
|
|
}
|
|
|
- } else if (0 >= examTimes || !examTimes.toString().match(/^[1-9]\d*$/)) {
|
|
|
+ } else if (!examTimes.toString().match(/^[1-9]\d*$/)) {
|
|
|
callback(new Error("只能是正整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab2";
|
|
@@ -573,7 +573,7 @@ let validateFreezeTime = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab2";
|
|
|
_this.activeName = "tab2";
|
|
|
}
|
|
|
- } else if (0 > freezeTime || !freezeTime.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
+ } else if (!freezeTime.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
callback(new Error("只能是非负整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab2";
|
|
@@ -598,10 +598,7 @@ let validateExamReconnectTime = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab2";
|
|
|
_this.activeName = "tab2";
|
|
|
}
|
|
|
- } else if (
|
|
|
- 0 >= examReconnectTime ||
|
|
|
- !examReconnectTime.toString().match(/^[1-9]\d*$/)
|
|
|
- ) {
|
|
|
+ } else if (!examReconnectTime.toString().match(/^[1-9]\d*$/)) {
|
|
|
callback(new Error("只能是正整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab2";
|
|
@@ -623,10 +620,7 @@ let validateSnapshotInterval = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (
|
|
|
- 0 >= snapshotnterval ||
|
|
|
- !snapshotnterval.toString().match(/^[1-9]\d*$/)
|
|
|
- ) {
|
|
|
+ } else if (!snapshotnterval.toString().match(/^[1-9]\d*$/)) {
|
|
|
callback(new Error("只能是正整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
@@ -658,10 +652,7 @@ let validateWarnThreshold = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (
|
|
|
- 0 >= warnThreshold ||
|
|
|
- !warnThreshold.toString().match(/^[1-9]\d*|0$/)
|
|
|
- ) {
|
|
|
+ } else if (!warnThreshold.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
callback(new Error("只能是非负整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
@@ -684,10 +675,7 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (
|
|
|
- 0 >= livingWarnThreshold ||
|
|
|
- !livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)
|
|
|
- ) {
|
|
|
+ } else if (!livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
callback(new Error("只能是非负整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
@@ -712,7 +700,7 @@ let validateFaceVerifyStartMinute = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (0 >= v || !v.toString().match(/^[1-9]\d*$/)) {
|
|
|
+ } else if (!v.toString().match(/^[1-9]\d*$/)) {
|
|
|
callback(new Error("只能是正整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
@@ -744,7 +732,7 @@ let validateFaceVerifyEndMinute = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (0 >= v || !v.toString().match(/^[1-9]\d*$/)) {
|
|
|
+ } else if (!v.toString().match(/^[1-9]\d*$/)) {
|
|
|
callback(new Error("只能是正整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|