|
@@ -706,6 +706,75 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+let validateFaceVerifyStartMinute = (rule, value, callback) => {
|
|
|
+ let isFaceVerify = _this.form.properties.IS_FACE_VERIFY;
|
|
|
+ let freezeTime = _this.form.properties.FREEZE_TIME;
|
|
|
+ let v = _this.form.properties.FACE_VERIFY_START_MINUTE;
|
|
|
+ if (isFaceVerify == "true") {
|
|
|
+ if (v === "") {
|
|
|
+ callback(new Error("请输入活体检测开始分钟数"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else if (0 >= v || !v.toString().match(/^[1-9]\d*$/)) {
|
|
|
+ callback(new Error("只能是正整数"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else if (freezeTime != "" && v > freezeTime) {
|
|
|
+ callback(new Error("活体检测开始分钟数不能大于交卷冻结时长"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+let validateFaceVerifyEndMinute = (rule, value, callback) => {
|
|
|
+ let isFaceVerify = _this.form.properties.IS_FACE_VERIFY;
|
|
|
+ let freezeTime = _this.form.properties.FREEZE_TIME;
|
|
|
+ let start = _this.form.properties.FACE_VERIFY_START_MINUTE;
|
|
|
+ let v = _this.form.properties.FACE_VERIFY_END_MINUTE;
|
|
|
+ if (isFaceVerify == "true") {
|
|
|
+ if (v === "") {
|
|
|
+ callback(new Error("请输入活体检测结束分钟数"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else if (0 >= v || !v.toString().match(/^[1-9]\d*$/)) {
|
|
|
+ callback(new Error("只能是正整数"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else if (start != "" && v < start) {
|
|
|
+ callback(new Error("活体检测结束分钟数不能小于活体检测开始分钟数"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else if (freezeTime != "" && v > freezeTime) {
|
|
|
+ callback(new Error("活体检测结束分钟数不能大于交卷冻结时长"));
|
|
|
+ if (!_this.toActiveName) {
|
|
|
+ _this.toActiveName = "tab4";
|
|
|
+ _this.activeName = "tab4";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
ckeditor,
|
|
@@ -717,7 +786,7 @@ export default {
|
|
|
label_width_tab1: "80px",
|
|
|
label_width_tab2: "110px",
|
|
|
label_width_tab3: "120px",
|
|
|
- label_width_tab4: "160px",
|
|
|
+ label_width_tab4: "170px",
|
|
|
label_width_tab5: "80px",
|
|
|
label_width_tab6: "120px"
|
|
|
},
|
|
@@ -801,6 +870,20 @@ export default {
|
|
|
WARN_THRESHOLD: [
|
|
|
{ required: true, validator: validateWarnThreshold, trigger: "blur" }
|
|
|
],
|
|
|
+ FACE_VERIFY_START_MINUTE: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validateFaceVerifyStartMinute,
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ FACE_VERIFY_END_MINUTE: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validateFaceVerifyEndMinute,
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ],
|
|
|
LIVING_WARN_THRESHOLD: [
|
|
|
{
|
|
|
required: true,
|