浏览代码

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-3/examcloud-web-admin

weiwenhai 6 年之前
父节点
当前提交
7f4d0197a4

+ 1 - 1
src/modules/basic/view/campus.vue

@@ -458,7 +458,7 @@ export default {
           message: "请选择要启用的机构"
         });
       } else {
-        this.$confirm("是否启这些机构?", "提示", {
+        this.$confirm("是否启这些机构?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"

+ 4 - 4
src/modules/basic/view/course.vue

@@ -196,7 +196,7 @@
             <el-row>
               <el-form-item label="课程状态" prop="enable">
                 <el-radio-group class="pull_length" v-model="courseForm.enable">
-                  <el-radio label="true">启</el-radio>
+                  <el-radio label="true">启</el-radio>
                   <el-radio label="false">禁用</el-radio>
                 </el-radio-group>
               </el-form-item>
@@ -945,7 +945,7 @@ export default {
       if (this.selectedCourseIds.length === 0) {
         this.$notify({
           type: "warning",
-          message: "请选择要启的课程"
+          message: "请选择要启的课程"
         });
       } else {
         this.$confirm("是否启用这些课程?", "提示", {
@@ -957,7 +957,7 @@ export default {
           this.$httpWithMsg.put(url, {}).then(() => {
             this.$notify({
               type: "success",
-              message: "启成功!"
+              message: "启成功!"
             });
             this.searchForm();
           });
@@ -974,7 +974,7 @@ export default {
         this.$httpWithMsg.put(url, {}).then(() => {
           this.$notify({
             type: "success",
-            message: "启成功!"
+            message: "启成功!"
           });
           this.searchForm();
         });

+ 1 - 1
src/modules/basic/view/school.vue

@@ -462,7 +462,7 @@ export default {
           message: "请选择要启用的机构"
         });
       } else {
-        this.$confirm("是否启这些机构?", "提示", {
+        this.$confirm("是否启这些机构?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"

+ 3 - 0
src/modules/basic/view/specially.vue

@@ -908,6 +908,9 @@ export default {
   margin-top: 10px;
 }
 
+.input_width_lg {
+  width: 180px;
+}
 .pull_center {
   margin-left: 120px;
 }

+ 3 - 3
src/modules/basic/view/user.vue

@@ -879,7 +879,7 @@ export default {
       if (this.selectedUserIds.length === 0) {
         this.$notify({
           type: "warning",
-          message: "请选择要启的用户"
+          message: "请选择要启的用户"
         });
       } else {
         this.$confirm("是否启用这些用户?", "提示", {
@@ -891,7 +891,7 @@ export default {
           this.$httpWithMsg.put(url, {}).then(() => {
             this.$notify({
               type: "success",
-              message: "启成功!"
+              message: "启成功!"
             });
             return this.search();
           });
@@ -908,7 +908,7 @@ export default {
         this.$httpWithMsg.put(url, {}).then(() => {
           this.$notify({
             type: "success",
-            message: "启成功!"
+            message: "启成功!"
           });
           this.search();
         });

+ 4 - 0
src/modules/examwork/view/examStudent.vue

@@ -733,6 +733,7 @@
                         size="mini"
                         type="danger"
                         plain
+                        icon="el-icon-delete"
                         @click="deleteExamStudent(scope.row)"
                         >删除
                       </el-button></el-dropdown-item
@@ -742,6 +743,7 @@
                         size="mini"
                         type="primary"
                         plain
+                        icon="el-icon-picture"
                         @click="showPhoto(scope.row)"
                       >
                         查看照片
@@ -757,6 +759,7 @@
                         size="mini"
                         type="primary"
                         plain
+                        icon="el-icon-check"
                         @click="enableExamStudent(scope.row)"
                         >启用
                       </el-button>
@@ -767,6 +770,7 @@
                         size="mini"
                         type="primary"
                         plain
+                        icon="el-icon-close"
                         @click="disableExamStudent(scope.row)"
                         >禁用
                       </el-button>

+ 96 - 18
src/modules/examwork/view/onlineExam.vue

@@ -16,18 +16,10 @@
             label-position="right"
           >
             <div style="margin-bottom: 10px;">
-              <el-button
-                type="primary"
-                size="small"
-                icon="el-icon-document"
-                @click="saveExam"
+              <el-button type="primary" size="small" @click="saveExam"
                 >保 存</el-button
               >
-              <el-button
-                type="primary"
-                size="small"
-                @click="back"
-                icon="el-icon-arrow-left"
+              <el-button type="primary" size="small" @click="back"
                 >返 回</el-button
               >
             </div>
@@ -315,10 +307,10 @@
                   </el-form-item>
                 </el-row>
               </el-tab-pane>
-              <el-tab-pane label="生物检测设置" name="tab4">
+              <el-tab-pane label="身份检测设置" name="tab4">
                 <el-row>
                   <el-form-item
-                    label="开启生物检测"
+                    label="开启身份检测"
                     :label-width="style.label_width_tab4"
                   >
                     <el-radio-group
@@ -587,7 +579,7 @@ let validateFreezeTime = (rule, value, callback) => {
       _this.toActiveName = "tab2";
       _this.activeName = "tab2";
     }
-  } else if (duration != "" && freezeTime > duration) {
+  } else if (duration != "" && parseInt(freezeTime) > parseInt(duration)) {
     callback(new Error("交卷冻结时长不能大于考试时长"));
     if (!_this.toActiveName) {
       _this.toActiveName = "tab2";
@@ -640,7 +632,10 @@ let validateSnapshotInterval = (rule, value, callback) => {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";
       }
-    } else if (duration != "" && snapshotnterval > duration) {
+    } else if (
+      duration != "" &&
+      parseInt(snapshotnterval) > parseInt(duration)
+    ) {
       callback(new Error("抓拍间隔不能大于考试时长"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
@@ -665,9 +660,9 @@ let validateWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= warnThreshold ||
-      !warnThreshold.toString().match(/^[1-9]\d*$/)
+      !warnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
-      callback(new Error("只能是整数"));
+      callback(new Error("只能是非负整数"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";
@@ -691,13 +686,82 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= livingWarnThreshold ||
-      !livingWarnThreshold.toString().match(/^[1-9]\d*$/)
+      !livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
+      callback(new Error("只能是非负整数"));
+      if (!_this.toActiveName) {
+        _this.toActiveName = "tab4";
+        _this.activeName = "tab4";
+      }
+    } else {
+      callback();
+    }
+  } else {
+    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 != "" && parseInt(v) > parseInt(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 != "" && parseInt(v) < parseInt(start)) {
+      callback(new Error("活体检测结束分钟数不能小于活体检测开始分钟数"));
+      if (!_this.toActiveName) {
+        _this.toActiveName = "tab4";
+        _this.activeName = "tab4";
+      }
+    } else if (freezeTime != "" && parseInt(v) > parseInt(freezeTime)) {
+      callback(new Error("活体检测结束分钟数不能大于交卷冻结时长"));
+      if (!_this.toActiveName) {
+        _this.toActiveName = "tab4";
+        _this.activeName = "tab4";
+      }
     } else {
       callback();
     }
@@ -717,7 +781,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 +865,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,

+ 2 - 2
src/modules/examwork/view/practiceExam.vue

@@ -301,7 +301,7 @@ let validateFreezeTime = (rule, value, callback) => {
       _this.toActiveName = "tab2";
       _this.activeName = "tab2";
     }
-  } else if (duration != "" && freezeTime > duration) {
+  } else if (duration != "" && parseInt(freezeTime) > parseInt(duration)) {
     callback(new Error("交卷冻结时长不能大于考试时长"));
     if (!_this.toActiveName) {
       _this.toActiveName = "tab2";
@@ -482,4 +482,4 @@ export default {
 .input {
   width: 440px;
 }
-</style>
+</style>

+ 7 - 0
src/modules/examwork/view/student.vue

@@ -94,6 +94,7 @@
           v-if="rolePrivileges.reset_student_password"
           size="small"
           type="danger"
+          icon="el-icon-refresh"
           :disabled="noBatchSelected"
           @click="resetPassword('')"
           >重置密码
@@ -102,6 +103,7 @@
           v-if="rolePrivileges.change_student_availability"
           size="small"
           type="danger"
+          icon="el-icon-check"
           :disabled="noBatchSelected"
           @click="enableStudent('')"
           >启用
@@ -110,6 +112,7 @@
           v-if="rolePrivileges.change_student_availability"
           size="small"
           type="danger"
+          icon="el-icon-close"
           :disabled="noBatchSelected"
           @click="disableStudent('')"
         >
@@ -266,6 +269,7 @@
                       size="mini"
                       type="danger"
                       plain
+                      icon="el-icon-refresh"
                       @click="resetPassword(scope.row)"
                       >重置密码
                     </el-button>
@@ -275,6 +279,7 @@
                       size="mini"
                       type="primary"
                       plain
+                      icon="el-icon-document"
                       @click="showStuExamDialog(scope.row)"
                       >考试记录
                     </el-button>
@@ -284,6 +289,7 @@
                       size="mini"
                       type="danger"
                       plain
+                      icon="el-icon-refresh"
                       @click="unbindStudentCode(scope.row)"
                       >解绑学号
                     </el-button>
@@ -293,6 +299,7 @@
                       size="mini"
                       type="danger"
                       plain
+                      icon="el-icon-refresh"
                       @click="unbindSecurityPhone(scope.row)"
                       >解绑安全手机
                     </el-button>

+ 20 - 1
src/modules/portal/views/home/main/HomeMain.vue

@@ -11,8 +11,9 @@
           :class="['module-card', index % 2 ? 'float-left' : 'float-right']"
           @click="() => $router.push('/' + menu.ext4 + '/tips')"
         >
-          <div>
+          <div style="position: relative">
             <img :class="['module-image', menu.ext4 + '-main-module']" />
+            <div class="cover"></div>
           </div>
           <div
             class="align-self-left d-flex d-flex flex-column align-items-start module-desc"
@@ -135,6 +136,24 @@ export default {
   box-shadow: 0px 5px 20px 0px #55bfff;
   color: #4d7cc4 !important;
 }
+.module-card .cover {
+  width: 100px;
+  height: 116px;
+  position: absolute;
+  top: -13px;
+  left: 0px;
+  transition: all 1s ease-in-out;
+  border-top-left-radius: 10px;
+  border-bottom-left-radius: 10px;
+  background-color: rgba(255, 255, 255, 0.8);
+}
+.module-card:hover .cover {
+  /* background-color: transparent !important; */
+  /* left: -100px; */
+  width: 0px !important;
+  left: -80px !important;
+  /* transition: all 2s ease-in-out; */
+}
 .module-desc {
   background-color: white;
   padding: 10px;