Răsfoiți Sursa

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

nikang 6 ani în urmă
părinte
comite
9e7319d465

+ 2 - 2
src/modules/oe/views/awaitingAudit.vue

@@ -145,8 +145,8 @@
                 </el-button>
               </el-dropdown-item>
             </el-dropdown-menu>
-          </el-dropdown></el-col
-        >
+          </el-dropdown>
+        </el-col>
       </el-row>
       <el-row class="margin-top-10">
         <el-col :span="24">

+ 182 - 22
src/modules/oe/views/examDetail.vue

@@ -224,31 +224,89 @@
               width="120"
             >
             </el-table-column>
-            <el-table-column
-              fixed="right"
-              label="详情"
-              v-if="currentPagePrivileges.EXAM_QUERY_GETPAPER"
-              width="90"
-            >
+            <el-table-column fixed="right" label="详情" width="100">
               <template slot-scope="scope">
-                <el-button
-                  v-if="scope.row.examType == 'ONLINE'"
-                  size="mini"
-                  type="primary"
-                  icon="el-icon-view"
-                  @click="examPaperDetail(scope.row.courseId, scope.row.dataId)"
-                  >调卷
-                </el-button>
-                <el-button
+                <el-row
+                  class="operateRow"
+                  v-if="
+                    scope.row.examType == 'ONLINE' &&
+                      currentPagePrivileges.EXAM_QUERY_GETPAPER
+                  "
+                >
+                  <el-col :span="24">
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      icon="el-icon-view"
+                      plain
+                      @click="
+                        examPaperDetail(scope.row.courseId, scope.row.dataId)
+                      "
+                      >调&nbsp;卷
+                    </el-button>
+                  </el-col>
+                </el-row>
+                <el-row
+                  class="operateRow"
+                  v-if="
+                    scope.row.examType == 'ONLINE' &&
+                      currentPagePrivileges.REDO_AUDIT
+                  "
+                >
+                  <el-col :span="24">
+                    <el-dropdown>
+                      <el-button
+                        size="mini"
+                        icon="el-icon-arrow-down"
+                        type="primary"
+                        plain
+                      >
+                        重审
+                      </el-button>
+                      <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item>
+                          <el-button
+                            size="mini"
+                            type="success"
+                            @click="redoAudit(scope.row.dataId, 'pass')"
+                            icon="el-icon-success"
+                          >
+                            通 &nbsp;&nbsp;过
+                          </el-button>
+                        </el-dropdown-item>
+                        <el-dropdown-item>
+                          <el-button
+                            size="mini"
+                            type="danger"
+                            @click="redoAudit(scope.row.dataId, 'nopass')"
+                            icon="el-icon-error"
+                          >
+                            不通过
+                          </el-button>
+                        </el-dropdown-item>
+                      </el-dropdown-menu>
+                    </el-dropdown>
+                  </el-col>
+                </el-row>
+                <el-row
+                  class="operateRow"
                   v-if="
-                    scope.row.examType == 'OFFLINE' && scope.row.offlineFileUrl
+                    scope.row.examType == 'OFFLINE' &&
+                      scope.row.offlineFileUrl &&
+                      currentPagePrivileges.EXAM_QUERY_GETPAPER
                   "
-                  size="mini"
-                  type="primary"
-                  icon="el-icon-view"
-                  @click="downloadOfflineFile(scope.row.offlineFileUrl)"
-                  >调卷</el-button
                 >
+                  <el-col :span="24">
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      icon="el-icon-view"
+                      plain
+                      @click="downloadOfflineFile(scope.row.offlineFileUrl)"
+                      >调卷
+                    </el-button>
+                  </el-col>
+                </el-row>
               </template>
             </el-table-column>
           </el-table>
@@ -264,6 +322,42 @@
             >
             </el-pagination></div></el-col
       ></el-row>
+      <el-dialog title="审核" :visible.sync="dialogAuditFormVisible">
+        <el-form :model="auditForm" ref="redoAuditForm">
+          <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="dialogAuditFormVisible = false">取 消</el-button>
+            <el-button type="primary" @click="doRedoAuditNoPass"
+              >确 定</el-button
+            >
+          </div>
+        </el-form>
+      </el-dialog>
     </el-main>
   </el-container>
 </template>
@@ -317,7 +411,15 @@ export default {
       currentPagePrivileges: {
         EXAM_DETAIL_EXPORT: false, //导出
         SNAPSHOT_DETAILS: false, //详情查看
-        EXAM_QUERY_GETPAPER: false //调卷
+        EXAM_QUERY_GETPAPER: false, //调卷
+        REDO_AUDIT: false //重新审核
+      },
+      dialogAuditFormVisible: false,
+      auditForm: {
+        examRecordDataId: null,
+        disciplineType: "",
+        disciplineDetail: "",
+        isPass: null
       }
     };
   },
@@ -421,6 +523,61 @@ export default {
     downloadOfflineFile(url) {
       window.open(url);
     },
+    redoAudit(examRecordDataId, isPass) {
+      if (isPass != "pass") {
+        this.dialogAuditFormVisible = true;
+        this.auditForm.examRecordDataId = examRecordDataId;
+      } else {
+        //审核通过
+        var redoAuditInfo = {
+          examRecordDataIds: [examRecordDataId],
+          isPass: true,
+          disciplineType: "",
+          disciplineDetail: ""
+        };
+        this.$http
+          .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
+          .then(() => {
+            this.$notify({
+              title: "成功",
+              message: "操作成功",
+              type: "success"
+            });
+            this.search();
+          });
+      }
+    },
+    doRedoAuditNoPass() {
+      this.$refs["redoAuditForm"].validate(valid => {
+        if (valid) {
+          var redoAuditInfo = {
+            examRecordDataIds: [this.auditForm.examRecordDataId],
+            isPass: false,
+            disciplineType: this.auditForm.disciplineType,
+            disciplineDetail: this.auditForm.disciplineDetail
+          };
+          this.$http
+            .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
+            .then(() => {
+              this.$notify({
+                title: "成功",
+                message: "操作成功",
+                type: "success"
+              });
+              this.auditForm = {
+                examRecordDataId: null,
+                disciplineType: "",
+                disciplineDetail: "",
+                isPass: null
+              };
+              this.dialogAuditFormVisible = false;
+              this.search();
+            });
+        } else {
+          return false;
+        }
+      });
+    },
     backFill() {
       var formData = this.$route.query;
       if (formData && formData.examId) {
@@ -460,5 +617,8 @@ export default {
   cursor: pointer;
   color: #409eff;
 }
+.operateRow {
+  margin-top: 2px;
+}
 </style>
 <style scoped src="../style/common.css"></style>

+ 3 - 3
src/modules/portal/views/tips/Tips.vue

@@ -94,7 +94,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "题库管理——导入试卷管理",
-          // link: "/basic/campus",
+          link: "/questions/import_paper/0",
           detail: "可以将word版试卷导入题库,由题库按课程、题型形成题库。"
         }
       ]
@@ -104,7 +104,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "卷库管理——考试试卷管理",
-          // link: "/basic/campus",
+          link: "/questions/gen_paper/0",
           detail:
             "可按需求将XX课程的所有试题,按分数、题量、题型结构、章节等多种方式进行随机组合,生成若干套试卷。"
         }
@@ -115,7 +115,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "考试管理——调卷规则",
-          // link: "/basic/campus",
+          link: "/questions/extract_paper_rule/0",
           detail: "来指定在本次考试中使用卷库中的哪一套试卷,及抽卷的比例。"
         }
       ]

+ 15 - 2
src/modules/questions/views/BluePaperStructure.vue

@@ -159,7 +159,8 @@ export default {
       formSearch: {
         name: "",
         courseNo: "",
-        type: "BLUEPRINT"
+        type: "BLUEPRINT",
+        courseName: ""
       },
       currentPage: 1,
       pageSize: 10,
@@ -246,8 +247,16 @@ export default {
         return val + "(难)";
       }
     },
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
     //修改
     editStruct(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem(
         "blue_paper_stucture",
         JSON.stringify(this.formSearch)
@@ -328,7 +337,8 @@ export default {
         this.formSearch = {
           name: "",
           courseNo: "",
-          type: "BLUEPRINT"
+          type: "BLUEPRINT",
+          courseName: ""
         };
         this.currentPage = 1;
       } else {
@@ -339,6 +349,9 @@ export default {
           sessionStorage.getItem("blue_paper_stucture_currentPage")
         );
       }
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchAll();
     }
   },

+ 1 - 1
src/modules/questions/views/CourseProperty.vue

@@ -136,7 +136,7 @@
               <el-button
                 v-if="!scope.row.enable"
                 size="mini"
-                type="success"
+                type="primary"
                 plain
                 @click="openCourseProperty(scope.row)"
               >

+ 27 - 4
src/modules/questions/views/ExtractPaperRule.vue

@@ -135,7 +135,7 @@
                 type="primary"
                 @click="updateRules(scope.row)"
                 plain
-                ><i class="el-icon-edit"></i>修改
+                ><i class="el-icon-edit"></i>编辑
               </el-button>
               <el-button
                 v-if="scope.row.ifFinish == 1"
@@ -278,7 +278,8 @@ export default {
       isClear: 0,
       formSearch: {
         examId: "",
-        courseNo: ""
+        courseNo: "",
+        courseName: ""
       },
       tableData: [],
       currentPage: 1,
@@ -374,13 +375,25 @@ export default {
         name: "extract_paper_info_add"
       });
     },
-    //修改调卷规则
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
+    //编辑调卷规则
     updateRules(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("extract_paper_examId", row.examId);
       sessionStorage.setItem(
         "extract_paper_courseNo",
         this.formSearch.courseNo
       );
+      sessionStorage.setItem(
+        "extract_paper_courseName",
+        this.formSearch.courseName
+      );
       sessionStorage.setItem("extract_paper_currentPage", this.currentPage);
       this.$router.push({
         name: "extract_paper_info_edit",
@@ -592,6 +605,7 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
+      console.log("query:", query);
       if (query) {
         if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
           this.courseLoading = true;
@@ -599,6 +613,7 @@ export default {
             .get(CORE_API + "/course/query?name=" + query + "&enable=true")
             .then(response => {
               this.courseList = response.data;
+              console.log("this.courseList:", this.courseList);
               this.courseLoading = false;
             });
         }
@@ -629,13 +644,18 @@ export default {
         this.getExams("");
         this.formSearch = {
           examId: "",
-          courseNo: ""
+          courseNo: "",
+          courseName: ""
         };
       } else {
         this.formSearch.courseNo =
           sessionStorage.getItem("extract_paper_courseNo") == "null"
             ? ""
             : sessionStorage.getItem("extract_paper_courseNo");
+        this.formSearch.courseName =
+          sessionStorage.getItem("extract_paper_courseName") == "null"
+            ? ""
+            : sessionStorage.getItem("extract_paper_courseName");
         this.formSearch.examId =
           sessionStorage.getItem("extract_paper_examId") == ""
             ? ""
@@ -647,6 +667,9 @@ export default {
         if (this.formSearch.examId) {
           this.initialize(this.formSearch.examId);
         }
+        if (this.formSearch.courseName) {
+          this.getCourses(this.formSearch.courseName);
+        }
       }
     }
   },

+ 2 - 3
src/modules/questions/views/GenPaper.vue

@@ -632,9 +632,7 @@ export default {
     },
     openPrint(row) {
       this.dialogModel = true;
-      this.printFrom.examId = "";
       this.rowId = row.id;
-      console.log("this.examList:", this.examList);
     },
     cancel(formData) {
       this.resetForm2(formData);
@@ -650,7 +648,7 @@ export default {
         if (valid) {
           var orgId = "";
           for (let exam of this.examList) {
-            if ((exam.id = this.printFrom.examId)) {
+            if (exam.id == this.printFrom.examId) {
               orgId = exam.rootOrgId;
             }
           }
@@ -668,6 +666,7 @@ export default {
               message: "已推送",
               type: "success"
             });
+            this.resetForm2(formData);
             this.dialogModel = false;
           }
         } else {

+ 3 - 1
src/modules/questions/views/ImportPaper.vue

@@ -764,7 +764,9 @@ export default {
             ? 1
             : parseInt(sessionStorage.getItem("import_paper_currentPage"));
       }
-      this.getCourses(this.formSearch.courseName);
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchImportPaper();
     }
   },

+ 1 - 0
src/modules/questions/views/InsertPaperStructure.vue

@@ -256,6 +256,7 @@ export default {
       var paperStructStorge = sessionStorage.getItem("paperStruct");
       if (typeof paperStructStorge == "string") {
         var paperStruct = JSON.parse(paperStructStorge);
+        this.getCourses(paperStruct.courseName);
         this.paperStruct = paperStruct;
         this.paperDetailStructs = paperStruct.paperDetailStructs;
       }

+ 15 - 2
src/modules/questions/views/PaperStructure.vue

@@ -181,7 +181,8 @@ export default {
         name: "",
         creator: "",
         courseNo: "ALL",
-        type: "EXACT"
+        type: "EXACT",
+        courseName: ""
       },
       paperStructId: "",
       loading: false,
@@ -228,7 +229,15 @@ export default {
       });
       this.selectedList = selectedList;
     },
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
     editPaperStruct(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("paper_stucture", JSON.stringify(this.formSearch));
       sessionStorage.setItem("paper_stucture_currentPage", this.currentPage);
       sessionStorage.setItem("paperStruct", JSON.stringify(row));
@@ -343,7 +352,8 @@ export default {
           name: "",
           creator: "",
           courseNo: "ALL",
-          type: "EXACT"
+          type: "EXACT",
+          courseName: ""
         };
         this.currentPage = 1;
       } else {
@@ -352,6 +362,9 @@ export default {
           sessionStorage.getItem("paper_stucture_currentPage")
         );
       }
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchPaperStructs();
     }
   },