Переглянути джерело

Merge remote-tracking branch 'origin/master'

WANG 6 роки тому
батько
коміт
3a335c79e4

+ 2 - 1
src/modules/basic/view/course.vue

@@ -367,7 +367,7 @@
         <el-dialog
           title="添加关联专业"
           :visible.sync="addRelationDialog"
-          width="380px"
+          width="400px"
           @close="() => this.$refs.addRelationForm.clearValidate()"
         >
           <el-form
@@ -381,6 +381,7 @@
               <el-form-item label="专业" prop="specialtyId">
                 <el-select
                   class="input"
+                  style="width: 200px"
                   remote
                   :remote-method="getSpecialtyList4AddRelation"
                   @focus="e => getSpecialtyList4AddRelation(e.target.value)"

+ 2 - 1
src/modules/basic/view/specially.vue

@@ -227,7 +227,7 @@
       <!-- 添加关联 -->
       <el-dialog
         title="添加关联课程"
-        width="380px"
+        width="400px"
         :visible.sync="addRelationDialog"
         @close="() => this.$refs.addRelationForm.clearValidate()"
       >
@@ -242,6 +242,7 @@
             <el-form-item label="课程" class="pull-left" prop="courseId">
               <el-select
                 class="input"
+                style="width: 200px"
                 :remote-method="getCourses4AddRelation"
                 @focus="e => getCourses4AddRelation(e.target.value)"
                 :loading="courseLoading4AddRelation"

+ 11 - 1
src/modules/basic/view/user.vue

@@ -631,11 +631,21 @@ export default {
         this.rules.orgId = [
           {
             validator: this.validateOrg,
-            trigger: "blur,change"
+            trigger: ["blur", "change"]
           }
         ];
       } else {
         this.rules.orgId = [];
+        if (this.updateDialog) {
+          this.$refs.updateForm && this.$refs.updateForm.clearValidate("orgId");
+        } else if (this.addingDialog) {
+          this.$refs.addingForm && this.$refs.addingForm.clearValidate("orgId");
+        }
+      }
+      if (this.updateDialog) {
+        this.$refs.updateForm && this.$refs.updateForm.validateField("orgId");
+      } else if (this.addingDialog) {
+        this.$refs.addingForm && this.$refs.addingForm.validateField("orgId");
       }
     },
     rootOrgChanged4Search() {

+ 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({

+ 4 - 3
src/modules/oe/views/illegalityNameList.vue

@@ -3,7 +3,7 @@
     <el-main>
       <commonFormVue :form="form" :getExamCondition="getExamCondition">
         <el-col :span="6">
-          <el-form-item label="违纪说明">
+          <el-form-item label="违纪类型">
             <el-select
               class="form_search_width"
               size="small"
@@ -199,9 +199,10 @@ export default {
       getExamCondition: {
         params: {
           name: "",
-          examTypes: "ONLINE"
+          examTypes: "ONLINE",
+          propertyKeys: "IS_FACE_ENABLE"
         },
-        filterCondition: ""
+        filterCondition: "IS_FACE_ENABLE"
       },
       tableData: [],
       exportUrl: "/api/ecs_oe_admin/exam/audit/discipline/list/export",

+ 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() {}