Przeglądaj źródła

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

weiwenhai 6 lat temu
rodzic
commit
ccda3b7cb4

+ 17 - 39
src/modules/examwork/view/examInfo.vue

@@ -263,26 +263,15 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = EXAM_WORK_API + "/exam/enable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(response => {
-            console.log(response);
-            this.$notify({
-              type: "success",
-              message: "开启成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.body.desc,
-                type: "error"
-              });
-            }
+        let url = EXAM_WORK_API + "/exam/enable/" + row.id;
+        this.$httpWithMsg.put(url, {}).then(response => {
+          console.log(response);
+          this.$notify({
+            type: "success",
+            message: "开启成功!"
           });
+          this.searchForm();
+        });
       });
     },
     disableById(row) {
@@ -292,25 +281,14 @@ export default {
         type: "error"
       }).then(() => {
         var url = EXAM_WORK_API + "/exam/disable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(response => {
-            console.log(response);
-            this.$notify({
-              type: "success",
-              message: "禁用成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.body.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.put(url, {}).then(response => {
+          console.log(response);
+          this.$notify({
+            type: "success",
+            message: "禁用成功!"
           });
+          this.searchForm();
+        });
       });
     },
     handleCurrentChange(val) {
@@ -337,7 +315,7 @@ export default {
         "?" +
         param;
       this.loading = true;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         console.log(response);
         this.tableData = response.data.list;
         this.total = response.data.total;
@@ -401,7 +379,7 @@ export default {
         privilegeCodes: Object.keys(this.rolePrivileges).toString()
       });
       let url = CORE_API + "/rolePrivilege/checkPrivileges?" + params;
-      this.$http.post(url).then(response => {
+      this.$httpWithMsg.post(url).then(response => {
         this.rolePrivileges = response.data;
       });
     }

+ 17 - 17
src/modules/examwork/view/examStudent.vue

@@ -1060,7 +1060,7 @@ export default {
       } else if ("copyTo" == where) {
         this.queryExams4CopyToLoading = true;
       }
-      this.$http
+      this.$httpWithMsg
         .get(EXAM_WORK_API + "/exam/queryByNameLike?name=" + name)
         .then(response => {
           if ("search" == where) {
@@ -1114,7 +1114,7 @@ export default {
 
       var url =
         CORE_API + "/org/query?" + new URLSearchParams({ name: orgName });
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           if ("search" == where) {
@@ -1145,7 +1145,7 @@ export default {
         row.rootOrgId +
         "&studentId=" +
         row.studentId;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         if (response.data.photoPath) {
           this.photo.url = response.data.photoPath;
           this.photoDialog = true;
@@ -1212,7 +1212,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.tableData = response.data.list;
         this.total = response.data.total;
         this.loading = false;
@@ -1221,7 +1221,7 @@ export default {
     //查询所有课程
     getSpecialtys() {
       var orgId = this.user.orgId;
-      this.$http
+      this.$httpWithMsg
         .get(CORE_API + "/specialty/all?orgId=" + orgId)
         .then(response => {
           console.log(response);
@@ -1232,7 +1232,7 @@ export default {
       query = query.split(" - ")[0];
       if (query) {
         this.courseLoading4Search = true;
-        this.$http
+        this.$httpWithMsg
           .get(CORE_API + "/course/query?name=" + query)
           .then(response => {
             this.courseList4Search = response.data;
@@ -1246,7 +1246,7 @@ export default {
       query = query.split(" - ")[0];
       if (query) {
         this.courseLoading4InsertOrUpdate = true;
-        this.$http
+        this.$httpWithMsg
           .get(CORE_API + "/course/query?name=" + query)
           .then(response => {
             this.courseList4InsertOrUpdate = response.data;
@@ -1261,7 +1261,7 @@ export default {
       var url = EXAM_WORK_API + "/exam_student";
       this.$refs.addingStudentForm.validate(valid => {
         if (valid) {
-          this.$http.put(url, this.examStudentForm).then(response => {
+          this.$httpWithMsg.put(url, this.examStudentForm).then(response => {
             console.log(response);
             this.$notify({
               type: "success",
@@ -1280,7 +1280,7 @@ export default {
       var url = EXAM_WORK_API + "/exam_student";
       this.$refs.updateStudentForm.validate(valid => {
         if (valid) {
-          this.$http.put(url, this.examStudentForm).then(response => {
+          this.$httpWithMsg.put(url, this.examStudentForm).then(response => {
             console.log(response);
             this.$notify({
               type: "success",
@@ -1302,7 +1302,7 @@ export default {
         type: "error"
       }).then(() => {
         var url = EXAM_WORK_API + "/exam_student/" + row.id;
-        this.$http.delete(url).then(response => {
+        this.$httpWithMsg.delete(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -1327,7 +1327,7 @@ export default {
         type: "error"
       }).then(() => {
         var url = EXAM_WORK_API + "/exam_student/" + this.examStuIds;
-        this.$http.delete(url).then(response => {
+        this.$httpWithMsg.delete(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -1361,7 +1361,7 @@ export default {
             let delExamStudentDone = done;
             let url =
               EXAM_WORK_API + "/exam_student/exam/" + this.formSearch.examId;
-            this.$http.delete(url).then(response => {
+            this.$httpWithMsg.delete(url).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",
@@ -1462,7 +1462,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = EXAM_WORK_API + "/exam_student/disable/" + row.id;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -1480,7 +1480,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = EXAM_WORK_API + "/exam_student/enable/" + row.id;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -1535,7 +1535,7 @@ export default {
             });
 
           this.fileLoading = true;
-          this.$http.post(url, {}).then(response => {
+          this.$httpWithMsg.post(url, {}).then(response => {
             console.log(response);
             this.$notify({
               type: "success",
@@ -1662,7 +1662,7 @@ export default {
         CORE_API +
         "/rolePrivilege/checkPrivileges?" +
         new URLSearchParams(params);
-      this.$http.post(url).then(response => {
+      this.$httpWithMsg.post(url).then(response => {
         this.rolePrivileges = response.data;
       });
     },
@@ -1684,7 +1684,7 @@ export default {
       this.formSearch.rootOrgId = this.user.rootOrgId;
       if (this.pureLC) {
         var url = CORE_API + "/user/" + this.user.userId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           var userInfo = response.data;
           this.lc_id = userInfo.orgId;
           this.lc_name = userInfo.orgName;

+ 3 - 10
src/modules/examwork/view/examStudentImport.vue

@@ -319,20 +319,13 @@ export default {
     queryExams(name) {
       console.log("queryExams; name: " + name);
       this.queryExamsLoading = true;
-      this.$http
+      this.$httpWithMsg
         .get(EXAM_WORK_API + "/exam/queryByNameLike?name=" + name)
         .then(response => {
           this.queryExamsLoading = false;
           this.examList = response.data;
         })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
+        .catch(() => {
           this.queryExamsLoading = false;
         });
     },
@@ -343,7 +336,7 @@ export default {
         (this.currentPage - 1) +
         "/" +
         this.pageSize;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         console.log(response);
         _this.tableData = response.data.list;
         _this.total = response.data.total;

+ 4 - 4
src/modules/examwork/view/offlineExam.vue

@@ -196,7 +196,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -206,7 +206,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$http.get(url).then(response => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -238,7 +238,7 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$http.put(url, this.form).then(response => {
+            this.$httpWithMsg.put(url, this.form).then(response => {
               if (200 != response.status) {
                 this.$notify({
                   type: "error",
@@ -252,7 +252,7 @@ export default {
               });
             });
           } else {
-            this.$http.post(url, this.form).then(response => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",

+ 5 - 5
src/modules/examwork/view/offlineExamOrgSettings.vue

@@ -331,7 +331,7 @@ export default {
     getOrgList4Search(name) {
       this.loadingOrg4Search = true;
       var url = CORE_API + "/org/query?" + new URLSearchParams({ name: name });
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           this.orgList4Search = response.data;
@@ -345,7 +345,7 @@ export default {
     getOrgList4InsertOrUpdate(name) {
       this.loadingOrg4InsertOrUpdate = true;
       var url = CORE_API + "/org/query?" + new URLSearchParams({ name: name });
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           this.orgList4InsertOrUpdate = response.data;
@@ -362,7 +362,7 @@ export default {
       this.$refs.updateOrgSettingForm.validate(valid => {
         if (valid) {
           let url = EXAM_WORK_API + "/exam/examOrgSettings";
-          this.$http.post(url, this.orgSetting).then(response => {
+          this.$httpWithMsg.post(url, this.orgSetting).then(response => {
             console.log(response);
             this.$notify({
               type: "success",
@@ -382,7 +382,7 @@ export default {
       this.$refs.addOrgSettingForm.validate(valid => {
         if (valid) {
           let url = EXAM_WORK_API + "/exam/examOrgSettings";
-          this.$http.put(url, this.orgSetting).then(response => {
+          this.$httpWithMsg.put(url, this.orgSetting).then(response => {
             console.log(response);
             this.$notify({
               type: "success",
@@ -459,7 +459,7 @@ export default {
         "?" +
         param;
       this.loading4FormSearch = true;
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           console.log(response);

+ 4 - 4
src/modules/examwork/view/onlineExam.vue

@@ -758,7 +758,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -767,7 +767,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$http.get(url).then(response => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -798,7 +798,7 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$http.put(url, this.form).then(response => {
+            this.$httpWithMsg.put(url, this.form).then(response => {
               if (200 != response.status) {
                 this.$notify({
                   type: "error",
@@ -812,7 +812,7 @@ export default {
               });
             });
           } else {
-            this.$http.post(url, this.form).then(response => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",

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

@@ -403,7 +403,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -412,7 +412,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$http.get(url).then(response => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -437,7 +437,7 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$http.put(url, this.form).then(response => {
+            this.$httpWithMsg.put(url, this.form).then(response => {
               if (200 != response.status) {
                 this.$notify({
                   type: "error",
@@ -451,7 +451,7 @@ export default {
               });
             });
           } else {
-            this.$http.post(url, this.form).then(response => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",

+ 4 - 4
src/modules/examwork/view/printExam.vue

@@ -167,7 +167,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -176,7 +176,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$http.get(url).then(response => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -198,7 +198,7 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$http.put(url, this.form).then(response => {
+            this.$httpWithMsg.put(url, this.form).then(response => {
               if (200 != response.status) {
                 this.$notify({
                   type: "error",
@@ -212,7 +212,7 @@ export default {
               });
             });
           } else {
-            this.$http.post(url, this.form).then(response => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",

+ 13 - 24
src/modules/examwork/view/student.vue

@@ -545,7 +545,7 @@ export default {
       if ("search" == where) {
         this.queryExams4SearchLoading = true;
       }
-      this.$http
+      this.$httpWithMsg
         .get(EXAM_WORK_API + "/exam/queryByNameLike?name=" + name)
         .then(response => {
           if ("search" == where) {
@@ -588,7 +588,7 @@ export default {
         this.stuExamPageSize +
         "?" +
         param;
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           this.stuExamList = response.data.list;
@@ -662,21 +662,10 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http
-        .get(url)
-        .then(response => {
-          this.tableData = response.data.list;
-          this.total = response.data.total;
-        })
-        .catch(function(response) {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.body.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.get(url).then(response => {
+        this.tableData = response.data.list;
+        this.total = response.data.total;
+      });
     },
     exportStudent() {
       var param = new URLSearchParams(this.formSearch);
@@ -714,7 +703,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/student/unbindStudentCode/" + stuIds;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -733,7 +722,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/student/unbindSecurityPhone/" + stuIds;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -753,7 +742,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/student/resetPass/" + stuIds;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -774,7 +763,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/student/disable/" + stuIds;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -795,7 +784,7 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/student/enable/" + stuIds;
-        this.$http.put(url).then(response => {
+        this.$httpWithMsg.put(url).then(response => {
           console.log(response);
           this.$notify({
             type: "success",
@@ -888,7 +877,7 @@ export default {
         privilegeCodes: Object.keys(this.rolePrivileges).toString()
       });
       let url = CORE_API + "/rolePrivilege/checkPrivileges?" + params;
-      this.$http.post(url).then(response => {
+      this.$httpWithMsg.post(url).then(response => {
         this.rolePrivileges = response.data;
       });
     },
@@ -904,7 +893,7 @@ export default {
 
       var url = CORE_API + "/org/getRootOrgList";
 
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.rootOrgList = response.data;
         this.formSearch.rootOrgId = this.user.rootOrgId;
         this.searchForm();

+ 4 - 11
src/modules/examwork/view/traditionExam.vue

@@ -167,7 +167,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$http.get(url).then(response => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -176,7 +176,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$http.get(url).then(response => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -198,21 +198,14 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$http.put(url, this.form).then(response => {
-              if (200 != response.status) {
-                this.$notify({
-                  type: "error",
-                  message: response.body.desc
-                });
-                return;
-              }
+            this.$httpWithMsg.put(url, this.form).then(() => {
               this.$notify({
                 type: "success",
                 message: "保存成功"
               });
             });
           } else {
-            this.$http.post(url, this.form).then(response => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",

+ 36 - 7
src/modules/oe/views/captureDetail.vue

@@ -75,28 +75,34 @@
               <el-table :data="examAuditData" border>
                 <el-table-column
                   sortable
-                  label="校验次数"
+                  label="校验(次)"
                   prop="faceTotalCount"
                   width="110"
                 ></el-table-column>
                 <el-table-column
                   sortable
-                  label="成功次数"
+                  label="成功(次)"
                   prop="faceSuccessCount"
                   width="110"
                 ></el-table-column>
                 <el-table-column
                   sortable
-                  label="陌生人"
+                  label="陌生人(次)"
                   prop="faceStrangerCount"
                   width="110"
                 ></el-table-column>
                 <el-table-column
                   width="120"
                   sortable
-                  label="成功率(%)"
+                  label="人脸比对(%)"
                   prop="faceSuccessPercent"
                 ></el-table-column>
+                <el-table-column
+                  width="120"
+                  sortable
+                  label="真实性(%)"
+                  prop="baiduFaceLivenessSuccessPercent"
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="违纪类型"
@@ -126,10 +132,16 @@
               v-for="item in capturesList"
               class="photocol"
             >
-              <div class="photo-nopass" v-show="item.pass">通过</div>
+              <div class="photo-pass" v-show="item.pass">通过</div>
               <div class="photo-nopass" v-show="!item.pass">不通过</div>
               <img class="photo" :src="item.fileUrl" alt width="200" />
               <div class="photo-stranger" v-show="item.stranger">陌生人</div>
+              <div
+                class="photo-facelivenessPass"
+                v-show="!item.isFacelivenessPass"
+              >
+                <i class="el-icon-warning"></i>
+              </div>
             </el-col>
           </el-row>
         </el-col>
@@ -294,14 +306,14 @@ export default {
 }
 .photocol {
   position: relative;
-  margin: 10px 10px 0 10px;
+  margin: 20px 10px 0 10px;
 }
 .photo {
   display: block;
   width: 208px;
   height: 159px;
 }
-.photo-nopass {
+.photo-pass {
   position: absolute;
   top: 2px;
   width: 208px;
@@ -310,6 +322,15 @@ export default {
   font-size: 12px;
   background-color: rgba(10, 10, 10, 0.4);
 }
+.photo-nopass {
+  position: absolute;
+  top: 2px;
+  width: 208px;
+  text-align: center;
+  color: red;
+  font-size: 12px;
+  background-color: rgba(10, 10, 10, 0.4);
+}
 .photo-stranger {
   position: absolute;
   top: 140px;
@@ -319,4 +340,12 @@ export default {
   font-size: 12px;
   background-color: rgba(10, 10, 10, 0.4);
 }
+.photo-facelivenessPass {
+  position: absolute;
+  top: 160px;
+  width: 208px;
+  font-size: 14px;
+  text-align: center;
+  color: red;
+}
 </style>

+ 2 - 1
src/modules/portal/views/home/HomeSide.vue

@@ -15,7 +15,7 @@
         type="text"
         class="float-right"
         size="mini"
-        style="padding: 0; padding-right: 12px;"
+        style="padding: 0; padding-right: 16px; outline: none;"
         @click="toggoleSidebar"
       >
         <v-icon name="bars" scale="1.6" />
@@ -186,6 +186,7 @@ export default {
 <style scoped>
 .el-menu-vertical-demo {
   height: calc(100vh - 60px - 70px);
+  border-right: none;
 }
 
 .el-menu-vertical-demo:not(.el-menu--collapse) {