浏览代码

禁止抓拍

xiatian 1 年之前
父节点
当前提交
fa2a7f5755
共有 1 个文件被更改,包括 44 次插入6 次删除
  1. 44 6
      src/modules/examwork/view/onlineExam.vue

+ 44 - 6
src/modules/examwork/view/onlineExam.vue

@@ -695,6 +695,25 @@
                   </el-form-item>
                 </el-row>
                 <el-row v-show="form.properties.IS_FACE_ENABLE == 'true'">
+                  <el-form-item
+                    label="禁用抓拍"
+                    :label-width="style.label_width_tab4"
+                  >
+                    <el-radio-group
+                      v-model="form.properties.DISABLE_SNAPSHOT"
+                      class="input"
+                    >
+                      <el-radio label="true">是</el-radio>
+                      <el-radio label="false">否</el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                </el-row>
+                <el-row
+                  v-show="
+                    form.properties.IS_FACE_ENABLE == 'true' &&
+                    form.properties.DISABLE_SNAPSHOT == 'false'
+                  "
+                >
                   <el-form-item
                     label="抓拍间隔"
                     prop="SNAPSHOT_INTERVAL"
@@ -710,7 +729,12 @@
                     </el-input>
                   </el-form-item>
                 </el-row>
-                <el-row v-show="form.properties.IS_FACE_ENABLE == 'true'">
+                <el-row
+                  v-show="
+                    form.properties.IS_FACE_ENABLE == 'true' &&
+                    form.properties.DISABLE_SNAPSHOT == 'false'
+                  "
+                >
                   <el-form-item
                     label="预警比例"
                     prop="WARN_THRESHOLD"
@@ -726,7 +750,12 @@
                     </el-input>
                   </el-form-item>
                 </el-row>
-                <el-row v-show="form.properties.IS_FACE_ENABLE == 'true'">
+                <el-row
+                  v-show="
+                    form.properties.IS_FACE_ENABLE == 'true' &&
+                    form.properties.DISABLE_SNAPSHOT == 'false'
+                  "
+                >
                   <el-form-item
                     label="真实性预警比例"
                     prop="LIVING_WARN_THRESHOLD"
@@ -1129,7 +1158,10 @@ let validateSnapshotInterval = (rule, value, callback) => {
   let isFaceEnable = _this.form.properties.IS_FACE_ENABLE;
   let snapshotnterval = _this.form.properties.SNAPSHOT_INTERVAL;
   let duration = _this.form.duration;
-  if (isFaceEnable == "true") {
+  if (
+    isFaceEnable == "true" &&
+    _this.form.properties.DISABLE_SNAPSHOT == "false"
+  ) {
     if (snapshotnterval === "") {
       callback(new Error("请输入抓拍间隔"));
       if (!_this.toActiveName) {
@@ -1161,7 +1193,10 @@ let validateSnapshotInterval = (rule, value, callback) => {
 let validateWarnThreshold = (rule, value, callback) => {
   let isFaceEnable = _this.form.properties.IS_FACE_ENABLE;
   let warnThreshold = _this.form.properties.WARN_THRESHOLD;
-  if (isFaceEnable == "true") {
+  if (
+    isFaceEnable == "true" &&
+    _this.form.properties.DISABLE_SNAPSHOT == "false"
+  ) {
     if (warnThreshold === "") {
       callback(new Error("请输入预警阀值"));
       if (!_this.toActiveName) {
@@ -1184,7 +1219,10 @@ let validateWarnThreshold = (rule, value, callback) => {
 let validateLivingWarnThreshold = (rule, value, callback) => {
   let isFaceEnable = _this.form.properties.IS_FACE_ENABLE;
   let livingWarnThreshold = _this.form.properties.LIVING_WARN_THRESHOLD;
-  if (isFaceEnable == "true") {
+  if (
+    isFaceEnable == "true" &&
+    _this.form.properties.DISABLE_SNAPSHOT == "false"
+  ) {
     if (livingWarnThreshold === "") {
       callback(new Error("请输入真实性预警阀值"));
       if (!_this.toActiveName) {
@@ -1433,6 +1471,7 @@ export default {
           FILL_BLANK_REMARK: "",
           BOOL_ANSWER_REMARK: "",
           IS_FACE_ENABLE: "false",
+          DISABLE_SNAPSHOT: "false",
           IS_FACE_CHECK: "false",
           SNAPSHOT_INTERVAL: 30,
           WARN_THRESHOLD: 50,
@@ -1677,7 +1716,6 @@ export default {
 
             this.form.properties.IP_LIMIT =
               this.form.properties.IP_LIMIT === "true";
-
             if (this.form.properties.EXAM_CYCLE_TIME_RANGE) {
               this.examCycleTimeRangeArr = JSON.parse(
                 this.form.properties.EXAM_CYCLE_TIME_RANGE