Browse Source

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

nikang 6 years ago
parent
commit
19e5cd6675

+ 20 - 32
src/modules/examwork/view/examStudent.vue

@@ -1134,18 +1134,13 @@ export default {
       this.getOrgList(orgName, "insertOrUpdate");
     },
     getOrgList(orgName, where) {
-      if (Object.prototype.toString.call(orgName) != "[object String]") {
-        return;
-      }
-      orgName = orgName.split(" - ")[0];
       if ("search" == where) {
         this.getOrgList4SearchLoading = true;
       } else if ("insertOrUpdate" == where) {
         this.getOrgList4InsertOrUpdateLoading = true;
       }
 
-      var url =
-        CORE_API + "/org/query?" + new URLSearchParams({ name: orgName });
+      let url = CORE_API + "/org/query?name=" + orgName;
       this.$httpWithMsg
         .get(url)
         .then(response => {
@@ -1253,32 +1248,22 @@ export default {
         });
     },
     getCourses4Search(query) {
-      query = query.split(" - ")[0];
-      if (query) {
-        this.courseLoading4Search = true;
-        this.$httpWithMsg
-          .get(CORE_API + "/course/query?name=" + query)
-          .then(response => {
-            this.courseList4Search = response.data;
-            this.courseLoading4Search = false;
-          });
-      } else {
-        this.courseList4Search = [];
-      }
+      this.courseLoading4Search = true;
+      this.$httpWithMsg
+        .get(CORE_API + "/course/query?name=" + query)
+        .then(response => {
+          this.courseList4Search = response.data;
+          this.courseLoading4Search = false;
+        });
     },
     getCourses4InsertOrUpdate(query) {
-      query = query.split(" - ")[0];
-      if (query) {
-        this.courseLoading4InsertOrUpdate = true;
-        this.$httpWithMsg
-          .get(CORE_API + "/course/query?name=" + query)
-          .then(response => {
-            this.courseList4InsertOrUpdate = response.data;
-            this.courseLoading4InsertOrUpdate = false;
-          });
-      } else {
-        this.courseList4InsertOrUpdate = [];
-      }
+      this.courseLoading4InsertOrUpdate = true;
+      this.$httpWithMsg
+        .get(CORE_API + "/course/query?name=" + query)
+        .then(response => {
+          this.courseList4InsertOrUpdate = response.data;
+          this.courseLoading4InsertOrUpdate = false;
+        });
     },
     //新增信息
     addStudent() {
@@ -1437,11 +1422,13 @@ export default {
       } else {
         this.examStudentForm.orgId = null;
         this.orgList4InsertOrUpdate = null;
+        this.getOrgList4InsertOrUpdate("");
       }
       this.examList4InsertOrUpdate = [];
       this.courseList4InsertOrUpdate = [];
 
       this.queryExams4InsertOrUpdate("");
+      this.getCourses4InsertOrUpdate("");
       this.addingStudentDialog = true;
     },
     //修改
@@ -1703,6 +1690,9 @@ export default {
         this.pureLC = false;
       }
 
+      this.getCourses4Search("");
+      this.getOrgList4Search("");
+      this.queryExams4Search("");
       this.formSearch.rootOrgId = this.user.rootOrgId;
       if (this.pureLC) {
         var url = CORE_API + "/user/" + this.user.userId;
@@ -1719,11 +1709,9 @@ export default {
           ];
           this.formSearch.orgId = this.lc_id;
           this.examStudentForm.orgId = this.lc_id;
-          this.queryExams4Search("");
           this.searchForm();
         });
       } else {
-        this.queryExams4Search("");
         this.searchForm();
       }
     }

+ 1 - 0
src/modules/examwork/view/onlineExamOrgSettings.vue

@@ -346,6 +346,7 @@
         <el-dialog
           title="学习中心设置导入"
           size="tiny"
+          width="500px"
           :visible.sync="orgSettingsImportDialog"
         >
           <el-form :model="orgSettingsImportForm" ref="orgSettingsImportForm">

+ 26 - 4
src/modules/oe/views/examDetail.vue

@@ -343,11 +343,11 @@
             >
             </el-input>
           </el-form-item>
-          <div class="dialog-footer">
-            <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
+          <div class="dialog-footer margin-top-10 text-center">
             <el-button type="primary" @click="doRedoAuditNoPass"
-              >确 定</el-button
-            >
+              >确 定
+            </el-button>
+            <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
           </div>
         </el-form>
       </el-dialog>
@@ -548,6 +548,17 @@ export default {
               type: "success"
             });
             this.search();
+          })
+          .catch(res => {
+            var errorMsg = "操作失败";
+            if (res.response && res.response.data) {
+              errorMsg = res.response.data.desc;
+            }
+            this.$notify({
+              title: "提示",
+              message: errorMsg,
+              type: "error"
+            });
           });
       }
     },
@@ -576,6 +587,17 @@ export default {
               };
               this.dialogAuditFormVisible = false;
               this.search();
+            })
+            .catch(res => {
+              var errorMsg = "操作失败";
+              if (res.response && res.response.data) {
+                errorMsg = res.response.data.desc;
+              }
+              this.$notify({
+                title: "提示",
+                message: errorMsg,
+                type: "error"
+              });
             });
         } else {
           return false;

+ 5 - 4
src/modules/print/view/CourseStatistic.vue

@@ -7,8 +7,9 @@
           :model="formSearch"
           :inline="true"
           label-position="right"
-          label-width="100px"
-          style="border-bottom: 1px solid rgb(221, 221, 221);margin-bottom: 10px"
+          label-width="90px"
+          class="el-form el-form--inline"
+          style="border-bottom: 1px solid rgb(221, 221, 221);padding-bottom: 10px;margin-bottom: 10px;"
         >
           <el-form-item label="学校">
             <el-select
@@ -83,7 +84,7 @@
             ></el-input>
           </el-form-item>
 
-          <el-form-item style="padding-left: 30px">
+          <el-form-item style="padding-left: 22px">
             <el-button
               size="small"
               type="primary"
@@ -103,7 +104,7 @@
         </el-form>
 
         <div style="margin-bottom: 5px;">
-          批量操作:
+          操作:
           <el-button
             size="small"
             type="primary"

+ 2 - 2
src/modules/print/view/ExamStructure.vue

@@ -7,8 +7,8 @@
           :model="formSearch"
           :inline="true"
           label-position="right"
-          label-width="100px"
-          style="border-bottom: 1px solid rgb(221, 221, 221);margin-bottom: 10px"
+          class="el-form el-form--inline"
+          style="border-bottom: 1px solid rgb(221, 221, 221);padding-bottom: 10px;margin-bottom: 10px;"
         >
           <el-form-item label="学校">
             <el-select

+ 6 - 5
src/modules/print/view/Project.vue

@@ -7,8 +7,9 @@
           :model="formSearch"
           :inline="true"
           label-position="right"
-          label-width="100px"
-          style="border-bottom: 1px solid rgb(221, 221, 221);margin-bottom: 10px"
+          label-width="90px"
+          class="el-form el-form--inline"
+          style="border-bottom: 1px solid rgb(221, 221, 221);padding-bottom: 10px;margin-bottom: 10px;"
         >
           <el-form-item label="学校">
             <el-select
@@ -80,7 +81,7 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item style="padding-left: 60px">
+          <el-form-item style="padding-left: 40px">
             <el-button
               size="small"
               v-show="false"
@@ -158,7 +159,7 @@
         </el-table>
 
         <!-- 分页 -->
-        <div class="page pull-right">
+        <div class="page pull-right" v-show="false">
           <el-pagination
             @current-change="handlePagerNo"
             :current-page="formSearch.pageNo"
@@ -350,7 +351,7 @@ export default {
         pmId: "",
         supplierId: "",
         pageNo: 1,
-        pageSize: 10
+        pageSize: 50
       },
       curUserRole: {},
       hasPermit: false,

+ 2 - 2
src/modules/print/view/ProjectStatistic.vue

@@ -7,8 +7,8 @@
           :model="formSearch"
           :inline="true"
           label-position="right"
-          label-width="100px"
-          style="border-bottom: 1px solid rgb(221, 221, 221);margin-bottom: 10px"
+          class="el-form el-form--inline"
+          style="border-bottom: 1px solid rgb(221, 221, 221);padding-bottom: 10px;margin-bottom: 10px;"
         >
           <el-form-item label="学校">
             <el-select

+ 2 - 2
src/modules/print/view/ProjectTemplate.vue

@@ -7,8 +7,8 @@
           :model="formSearch"
           :inline="true"
           label-position="right"
-          label-width="100px"
-          style="border-bottom: 1px solid rgb(221, 221, 221);margin-bottom: 10px"
+          class="el-form el-form--inline"
+          style="border-bottom: 1px solid rgb(221, 221, 221);padding-bottom: 10px;margin-bottom: 10px;"
         >
           <el-form-item label="学校">
             <el-select