|
@@ -458,7 +458,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
maxlength="5"
|
|
|
- v-model.trim.number="form.properties.WARN_THRESHOLD"
|
|
|
+ v-model="form.properties.WARN_THRESHOLD"
|
|
|
auto-complete="off"
|
|
|
class="input"
|
|
|
>
|
|
@@ -476,7 +476,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
maxlength="5"
|
|
|
- v-model.number="form.properties.LIVING_WARN_THRESHOLD"
|
|
|
+ v-model="form.properties.LIVING_WARN_THRESHOLD"
|
|
|
auto-complete="off"
|
|
|
class="input"
|
|
|
>
|
|
@@ -809,8 +809,8 @@ let validateWarnThreshold = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (!warnThreshold.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
- callback(new Error("只能是非负整数"));
|
|
|
+ } else if (!warnThreshold.toString().match(/^(0|([1-9]\d?)|100)$/)) {
|
|
|
+ callback(new Error("只能是0到100的整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
@@ -832,8 +832,8 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
|
}
|
|
|
- } else if (!livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)) {
|
|
|
- callback(new Error("只能是非负整数"));
|
|
|
+ } else if (!livingWarnThreshold.toString().match(/^(0|([1-9]\d?)|100)$/)) {
|
|
|
+ callback(new Error("只能是0到100的整数"));
|
|
|
if (!_this.toActiveName) {
|
|
|
_this.toActiveName = "tab4";
|
|
|
_this.activeName = "tab4";
|
|
@@ -1024,7 +1024,11 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
WARN_THRESHOLD: [
|
|
|
- { required: true, validator: validateWarnThreshold, trigger: "blur" }
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validateWarnThreshold,
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
FACE_VERIFY_START_MINUTE: [
|
|
|
{
|
|
@@ -1044,7 +1048,7 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
validator: validateLivingWarnThreshold,
|
|
|
- trigger: "blur"
|
|
|
+ trigger: "change"
|
|
|
}
|
|
|
]
|
|
|
}
|