Sfoglia il codice sorgente

切屏次数限制置灰

xiatian 3 anni fa
parent
commit
74f0cc8297

+ 24 - 10
src/modules/examwork/view/onlineExam.vue

@@ -420,17 +420,25 @@
                     label="切屏次数限制"
                     prop="MAX_SWITCH_SCREEN_COUNT"
                     :label-width="style.label_width_tab2"
-                  >
-                    <el-input
-                      v-model.trim.number="
-                        form.properties.MAX_SWITCH_SCREEN_COUNT
-                      "
-                      maxlength="5"
-                      auto-complete="off"
-                      class="input"
+                    ><el-tooltip
+                      :disabled="!maxSwitchScreenCountDisabled"
+                      placement="top"
+                    >
+                      <div slot="content">
+                        此设置不可用。考生端配置-防作弊设置中计算切屏次数未开启
+                      </div>
+                      <el-input
+                        v-model.trim.number="
+                          form.properties.MAX_SWITCH_SCREEN_COUNT
+                        "
+                        maxlength="5"
+                        auto-complete="off"
+                        class="input"
+                        :disabled="maxSwitchScreenCountDisabled"
+                      >
+                        <template slot="append">次</template>
+                      </el-input></el-tooltip
                     >
-                      <template slot="append">次</template>
-                    </el-input>
                   </el-form-item>
                 </el-row>
               </el-tab-pane>
@@ -1350,6 +1358,7 @@ export default {
       rootOrgWenXinAnswerEnabled: false,
       IDENTIFICATION_OF_LIVING_BODY_SCHEME: "S1",
       APP_ENABLED: false,
+      maxSwitchScreenCountDisabled: true,
       form: {
         started: false,
         name: "",
@@ -1695,6 +1704,11 @@ export default {
       this.getOrgProperty("APP_ENABLED", function (res) {
         that.APP_ENABLED = res;
       });
+      this.getOrgProperty("PREVENT_CHEATING_CONFIG", function (res) {
+        if (res && res.indexOf("RECORD_SWITCH_SCREEN") != -1) {
+          that.maxSwitchScreenCountDisabled = false;
+        }
+      });
     },
     getOrgProperty: function (propkey, callback) {
       let url =

+ 24 - 9
src/modules/examwork/view/onlineHomework.vue

@@ -392,16 +392,25 @@
                     prop="MAX_SWITCH_SCREEN_COUNT"
                     :label-width="style.label_width_tab2"
                   >
-                    <el-input
-                      v-model.trim.number="
-                        form.properties.MAX_SWITCH_SCREEN_COUNT
-                      "
-                      maxlength="5"
-                      auto-complete="off"
-                      class="input"
+                    <el-tooltip
+                      :disabled="!maxSwitchScreenCountDisabled"
+                      placement="top"
                     >
-                      <template slot="append">次</template>
-                    </el-input>
+                      <div slot="content">
+                        此设置不可用。考生端配置-防作弊设置中计算切屏次数未开启
+                      </div>
+                      <el-input
+                        v-model.trim.number="
+                          form.properties.MAX_SWITCH_SCREEN_COUNT
+                        "
+                        maxlength="5"
+                        auto-complete="off"
+                        class="input"
+                        :disabled="maxSwitchScreenCountDisabled"
+                      >
+                        <template slot="append">次</template>
+                      </el-input>
+                    </el-tooltip>
                   </el-form-item>
                 </el-row>
               </el-tab-pane>
@@ -854,6 +863,7 @@ export default {
       is_face_enable_diabled: true,
       rootOrgWenXinAnswerEnabled: false,
       IDENTIFICATION_OF_LIVING_BODY_SCHEME: "S1",
+      maxSwitchScreenCountDisabled: true,
       form: {
         started: false,
         name: "",
@@ -1139,6 +1149,11 @@ export default {
           that.form.IDENTIFICATION_OF_LIVING_BODY_SCHEME = res;
         }
       );
+      this.getOrgProperty("PREVENT_CHEATING_CONFIG", function (res) {
+        if (res && res.indexOf("RECORD_SWITCH_SCREEN") != -1) {
+          that.maxSwitchScreenCountDisabled = false;
+        }
+      });
     },
     getOrgProperty: function (propkey, callback) {
       let url =