qinchao 4 år sedan
förälder
incheckning
9420f38f81

+ 1 - 1
src/modules/examwork/view/examInfo.vue

@@ -234,7 +234,7 @@
                     </el-dropdown-item>
                     <el-dropdown-item>
                       <el-button
-                        :disabled="!rolePrivileges.update_exam"
+                        :disabled="!scope.row.ipLimitSettingsEnabled"
                         size="mini"
                         type="primary"
                         icon="el-icon-edit"

+ 40 - 12
src/modules/examwork/view/examIpLimit.vue

@@ -34,8 +34,8 @@
           <el-form-item label="限制类型">
             <el-select v-model="formSearch.limitType" class="input">
               <el-option label="未选择" value=""></el-option>
-              <el-option label="允许访问" value="false"></el-option>
-              <el-option label="限制访问" value="true"></el-option>
+              <el-option label="允许访问" value="0"></el-option>
+              <el-option label="禁止访问" value="1"></el-option>
             </el-select>
           </el-form-item>
 
@@ -383,6 +383,19 @@
             </el-row>
           </el-form>
         </el-dialog>
+        <!-- 导入错误信息列表 -->
+        <el-dialog title="错误提示" :visible.sync="errDialog">
+          <div
+            v-for="errMessage in errMessages"
+            :key="errMessage.lineNum"
+            class="text-danger"
+          >
+            第{{ errMessage.lineNum }}行:{{ errMessage.msg }}
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="errDialog = false">确定</el-button>
+          </span>
+        </el-dialog>
       </div>
     </div>
   </section>
@@ -478,6 +491,7 @@ export default {
       uploadAction: EXAM_WORK_API + "/exam/ipLimited/import",
       uploadData: {},
       fileLoading: false,
+      errDialog: false,
       fileList: [],
       uploadHeaders: {},
     };
@@ -599,10 +613,18 @@ export default {
       }
       this.examIpLimitForm.id = row.id;
       this.examIpLimitForm.ip = row.ip;
-      this.examIpLimitForm.limitType = row.limitType;
+      this.examIpLimitForm.limitType = this.getLimitType(row.limitType);
       this.addingIpLimitDialog = true;
       this.showIpColumn = true;
     },
+    getLimitType(type) {
+      if (type === "允许访问") {
+        return 0;
+      } else if (type === "禁止访问") {
+        return 1;
+      }
+      return null;
+    },
     batchDelete() {
       this.$confirm("确定删除所选数据吗?", "提示", {
         confirmButtonText: "确定",
@@ -729,15 +751,21 @@ export default {
       this.ipLimitImportDialog = true;
       this.initUpload();
     },
-    uploadSuccess() {
-      console.log("uploadSuccess");
-      this.$notify({
-        message: "上传成功",
-        type: "success",
-      });
-      this.fileLoading = false;
-      this.ipLimitImportDialog = false;
-      this.searchForm();
+    uploadSuccess(response) {
+      if (!response.hasError) {
+        this.$notify({
+          message: "上传成功",
+          type: "success",
+        });
+        this.fileLoading = false;
+        this.ipLimitImportDialog = false;
+        this.searchForm();
+      } else {
+        this.fileLoading = false;
+        this.ipLimitImportDialog = false;
+        this.errMessages = response.failRecords;
+        this.errDialog = true;
+      }
     },
     uploadError(response) {
       console.log("uploadError");

+ 59 - 1
src/modules/oe/views/alreadyAudited.vue

@@ -158,6 +158,19 @@
           >重置</el-button
         >
       </el-col>
+      <el-row>
+        <el-col>
+          <div class="block-seperator"></div>
+          <span>操作:</span>
+          <el-button
+            type="primary"
+            size="small"
+            icon="el-icon-download"
+            @click="exportData"
+            >导出</el-button
+          >
+        </el-col>
+      </el-row>
       <el-row class="margin-top-10">
         <el-col :span="24">
           <el-table
@@ -342,7 +355,7 @@ export default {
         auditEndTime: null, //审核时间止
         ip: null, //Ip
       },
-
+      exportUrl: "/api/ecs_oe_admin/exam/audit/export/async",
       getExamCondition: {
         params: {
           name: "",
@@ -522,6 +535,51 @@ export default {
           }
         });
     },
+    exportData() {
+      if (!this.form.examId) {
+        this.$notify({
+          title: "警告",
+          message: "请选择考试",
+          type: "warning",
+          duration: 1000,
+        });
+        return false;
+      }
+
+      this.$confirm("确定执行导出?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.form.rootOrgId = this.user.rootOrgId;
+        this.form.creator = this.user.userId;
+        this.$http
+          .get(
+            this.exportUrl +
+              "?$key=" +
+              this.user.key +
+              "&$token=" +
+              this.user.token,
+            {
+              params: {
+                query: this.form,
+              },
+            }
+          )
+          .then(() => {
+            this.$notify({
+              type: "success",
+              message: "正在后台导出中,请稍后到“导出任务列表”中下载!",
+            });
+          })
+          .catch((error) => {
+            this.$notify({
+              type: "error",
+              message: error.response.data.desc,
+            });
+          });
+      });
+    },
     changeStartExamDatetimeRange(e) {
       if (e && e.length > 0) {
         this.form.startTime = e[0];

+ 10 - 1
src/modules/oe/views/awaitingAudit.vue

@@ -785,8 +785,17 @@ export default {
         });
     },
     gotoCaptureDetail(examRecordDataId) {
+      if (!this.form.examId) {
+        this.$notify({
+          title: "警告",
+          message: "请选择考试",
+          type: "warning",
+          duration: 2000,
+        });
+        return false;
+      }
       let pendingOperate = !this.currentPagePrivileges.PENDING_OPERATE;
-      let searchParam = JSON.parse(JSON.stringify(this.form));
+      let searchParam = JSON.stringify(this.form);
       this.$router.push({
         path: "/oe/captureDetail/" + examRecordDataId + "/awaitingAudit",
         // name: "captureDetail",

+ 35 - 10
src/modules/oe/views/captureDetail.vue

@@ -322,7 +322,9 @@ export default {
   created() {
     this.examRecordDataId = this.$route.params.examRecordDataId;
     this.pendingOperate = this.$route.query.pendingOperate;
-    this.searchParam = this.$route.query.searchParam;
+    if (this.$route.query.searchParam) {
+      this.searchParam = JSON.parse(this.$route.query.searchParam);
+    }
     var fromPage = this.$route.params.from;
     var currentPathJson = {
       illegalityNameList: ["违纪名单", "抓拍详情"],
@@ -418,9 +420,31 @@ export default {
             message: "操作成功",
             type: "success",
           });
-          this.openNextAuditDetail("");
+          this.auditNext();
         });
     },
+    auditNext() {
+      var url =
+        "/api/ecs_oe_admin/exam/record/waiting/audit/next?examRecordDataId=" +
+        this.examRecordDataId +
+        "&next=1";
+      this.$http.post(url, this.searchParam).then((response) => {
+        if (response.data) {
+          this.examRecordDataId = response.data;
+          this.getExamAuditData();
+          this.listExamCapture();
+          this.getDisciplineTypeList("");
+          this.getExamProcessRecordData();
+        } else {
+          this.$notify({
+            title: "成功",
+            message: "审核完毕",
+            type: "success",
+          });
+          this.back();
+        }
+      });
+    },
     /**
      * 下一条
      */
@@ -438,14 +462,15 @@ export default {
           this.getDisciplineTypeList("");
           this.getExamProcessRecordData();
         } else {
-          if (next == "") {
-            this.$notify({
-              title: "成功",
-              message: "全部审核完毕。",
-              type: "success",
-            });
-            this.back();
+          var msg = "最后";
+          if (next === "0") {
+            msg = "第";
           }
+          this.$notify({
+            title: "警告",
+            message: "当前数据为" + msg + "一条",
+            type: "warning",
+          });
         }
       });
     },
@@ -471,7 +496,7 @@ export default {
                 type: "success",
               });
               this.dialogFormVisible = false;
-              this.openNextAuditDetail("");
+              this.auditNext();
             });
         } else {
           return false;