Bladeren bron

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

Michael Wang 6 jaren geleden
bovenliggende
commit
5cefe74233

+ 0 - 38
src/modules/oe/component/audit.vue

@@ -1,38 +0,0 @@
-<template>
-  <div>
-    <el-form :model="auditForm">
-      <el-form-item label="违纪类型">
-        <el-select v-model="auditForm.disciplineType" placeholder="请选择">
-          <el-option
-            v-for="item in disciplineTypeList"
-            :key="item.name"
-            :label="item.desc"
-            :value="item.name"
-          >
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="详情描述">
-        <el-input
-          v-model="auditForm.disciplineDetail"
-          type="textarea"
-          :autosize="{ minRows: 6, maxRows: 10 }"
-          placeholder="请输入内容"
-        >
-        </el-input>
-      </el-form-item>
-    </el-form>
-    <slot></slot>
-  </div>
-</template>
-<script>
-import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
-export default {
-  props: ["auditForm"],
-  data() {
-    return {
-      disciplineTypeList: DISCIPLINE_TYPE_LIST
-    };
-  }
-};
-</script>

+ 50 - 18
src/modules/oe/views/awaitingAudit.vue

@@ -292,12 +292,38 @@
         </el-col>
       </el-row>
       <el-dialog title="审核" :visible.sync="dialogFormVisible">
-        <auditVue :auditForm="auditForm">
+        <el-form :model="auditForm" ref="auditForm">
+          <el-form-item
+            label="违纪类型"
+            prop="disciplineType"
+            :rules="[
+              { required: true, message: '请选择违纪类型', trigger: 'change' }
+            ]"
+          >
+            <el-select v-model="auditForm.disciplineType" placeholder="请选择">
+              <el-option
+                v-for="item in disciplineTypeList"
+                :key="item.name"
+                :label="item.desc"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="详情描述" style="margin-top:15px;">
+            <el-input
+              v-model="auditForm.disciplineDetail"
+              type="textarea"
+              :autosize="{ minRows: 6, maxRows: 10 }"
+              placeholder="请输入内容"
+            >
+            </el-input>
+          </el-form-item>
           <div class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
             <el-button type="primary" @click="doAudit">确 定</el-button>
           </div>
-        </auditVue>
+        </el-form>
       </el-dialog>
     </el-main>
   </el-container>
@@ -306,11 +332,10 @@
 import { mapState } from "vuex";
 import pagePrivilege from "../mixin/pagePrivilege.js";
 import commonFormVue from "../component/commonForm.vue";
-import auditVue from "../component/audit.vue";
-
+import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
 export default {
   mixins: [pagePrivilege],
-  components: { commonFormVue, auditVue },
+  components: { commonFormVue },
   data() {
     return {
       total: 0,
@@ -358,7 +383,8 @@ export default {
         PANEING_BATCHAUDIT: false,
         PENDING_OPERATE: false,
         SNAPSHOT_DETAILS: false
-      }
+      },
+      disciplineTypeList: DISCIPLINE_TYPE_LIST
     };
   },
   computed: {
@@ -489,18 +515,24 @@ export default {
       };
     },
     doAudit() {
-      var param = new URLSearchParams(this.auditForm);
-      this.$http
-        .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
-        .then(() => {
-          this.$notify({
-            title: "成功",
-            message: "操作成功",
-            type: "success"
-          });
-          this.dialogFormVisible = false;
-          this.search();
-        });
+      this.$refs["auditForm"].validate(valid => {
+        if (valid) {
+          var param = new URLSearchParams(this.auditForm);
+          this.$http
+            .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
+            .then(() => {
+              this.$notify({
+                title: "成功",
+                message: "操作成功",
+                type: "success"
+              });
+              this.dialogFormVisible = false;
+              this.search();
+            });
+        } else {
+          return false;
+        }
+      });
     },
     /**
      * 审核通过

+ 49 - 16
src/modules/oe/views/captureDetail.vue

@@ -156,22 +156,48 @@
         </el-col>
       </el-row>
       <el-dialog title="审核" :visible.sync="dialogFormVisible">
-        <auditVue :auditForm="auditForm">
+        <el-form :model="auditForm" ref="auditForm">
+          <el-form-item
+            label="违纪类型"
+            prop="disciplineType"
+            :rules="[
+              { required: true, message: '请选择违纪类型', trigger: 'change' }
+            ]"
+          >
+            <el-select v-model="auditForm.disciplineType" placeholder="请选择">
+              <el-option
+                v-for="item in disciplineTypeList"
+                :key="item.name"
+                :label="item.desc"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="详情描述" style="margin-top:15px;">
+            <el-input
+              v-model="auditForm.disciplineDetail"
+              type="textarea"
+              :autosize="{ minRows: 6, maxRows: 10 }"
+              placeholder="请输入内容"
+            >
+            </el-input>
+          </el-form-item>
           <div class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
             <el-button type="primary" @click="doAuditNoPass">确 定</el-button>
           </div>
-        </auditVue>
+        </el-form>
       </el-dialog>
     </el-main>
   </el-container>
 </template>
 <script>
 import { mapState } from "vuex";
-import auditVue from "../component/audit.vue";
 import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
+import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
 export default {
-  components: { auditVue, LinkTitlesCustom },
+  components: { LinkTitlesCustom },
   data() {
     return {
       examRecordDataId: "",
@@ -187,7 +213,8 @@ export default {
         disciplineDetail: "",
         isPass: null
       },
-      currentPaths: ["抓拍详情"]
+      currentPaths: ["抓拍详情"],
+      disciplineTypeList: DISCIPLINE_TYPE_LIST
     };
   },
   computed: {
@@ -258,17 +285,23 @@ export default {
       };
     },
     doAuditNoPass() {
-      var param = new URLSearchParams(this.auditForm);
-      this.$http
-        .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
-        .then(() => {
-          this.$notify({
-            title: "成功",
-            message: "操作成功",
-            type: "success"
-          });
-          this.back();
-        });
+      this.$refs["auditForm"].validate(valid => {
+        if (valid) {
+          var param = new URLSearchParams(this.auditForm);
+          this.$http
+            .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
+            .then(() => {
+              this.$notify({
+                title: "成功",
+                message: "操作成功",
+                type: "success"
+              });
+              this.back();
+            });
+        } else {
+          return false;
+        }
+      });
     },
     back() {
       this.$router.back();

+ 1 - 1
src/modules/oe/views/examPaperDetail.vue

@@ -309,7 +309,7 @@ export default {
 
 <style scoped>
 #paperView {
-  background-color: #ecf0f5;
+  background-color: white;
 }
 #paperName {
   text-align: center;

+ 1 - 0
src/modules/oe/views/examScheduling.vue

@@ -546,6 +546,7 @@ export default {
           this.uploadAnswerDialogLoading = false;
           this.$refs.offlineFileInput.value = "";
           this.offlineAnswerFile = "";
+          this.search();
         })
         .catch(() => {
           this.$notify({

+ 30 - 18
src/modules/oe/views/reexamine.vue

@@ -44,8 +44,8 @@
                   type="primary"
                   @click="openReexamineDialog(scope.row.examStudentId)"
                   icon="el-icon-refresh"
-                  >设置重考</el-button
-                >
+                  >设置重考
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -62,8 +62,14 @@
             </el-pagination></div></el-col
       ></el-row>
       <el-dialog title="设置重考" :visible.sync="dialogFormVisible">
-        <el-form :model="reexamineForm">
-          <el-form-item label="重考理由">
+        <el-form :model="reexamineForm" ref="reexamineForm">
+          <el-form-item
+            prop="reexamineType"
+            label="重考理由"
+            :rules="[
+              { required: true, message: '请选择重考理由', trigger: 'change' }
+            ]"
+          >
             <el-select
               v-model="reexamineForm.reexamineType"
               placeholder="请选择"
@@ -77,7 +83,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="详情描述">
+          <el-form-item label="详情描述" style="margin-top:15px;">
             <el-input
               v-model="reexamineForm.reexamineDetail"
               type="textarea"
@@ -223,20 +229,26 @@ export default {
       };
     },
     doSetReexamine() {
-      var param = new URLSearchParams({
-        examStudentId: this.reexamineForm.examStudentId
-      });
-      this.$http
-        .post("/api/ecs_oe_admin/exam/student/reexamine", param)
-        .then(() => {
-          this.$notify({
-            title: "成功",
-            message: "操作成功",
-            type: "success"
+      this.$refs["reexamineForm"].validate(valid => {
+        if (valid) {
+          var param = new URLSearchParams({
+            examStudentId: this.reexamineForm.examStudentId
           });
-          this.dialogFormVisible = false;
-          this.search();
-        });
+          this.$http
+            .post("/api/ecs_oe_admin/exam/student/reexamine", param)
+            .then(() => {
+              this.$notify({
+                title: "成功",
+                message: "操作成功",
+                type: "success"
+              });
+              this.dialogFormVisible = false;
+              this.search();
+            });
+        } else {
+          return false;
+        }
+      });
     }
   },
   created() {}