Browse Source

Fix 多次点击事件

deason 6 years ago
parent
commit
1300cf1dbd

+ 16 - 1
src/modules/print/view/CourseStatistic.vue

@@ -137,7 +137,7 @@
           border
           @selection-change="handleSelection"
         >
-          <el-table-column type="selection" width="55"> </el-table-column>
+          <el-table-column type="selection" width="40"> </el-table-column>
           <el-table-column label="课程名称" prop="courseName" />
           <el-table-column width="150" label="课程代码" prop="courseCode" />
           <el-table-column width="80" label="试卷类型" prop="paperType" />
@@ -745,6 +745,12 @@ export default {
         if (!valid) {
           return false;
         }
+
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url =
           PRINT_API +
           "/course/paper/allot/" +
@@ -753,6 +759,7 @@ export default {
           this.allotForm.coursePaperId;
         this.$http.post(url).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               message: "试卷指定成功!",
@@ -763,6 +770,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",
@@ -787,6 +795,11 @@ export default {
           return false;
         }
 
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url =
           PRINT_API +
           "/course/paper/allot/all/" +
@@ -796,6 +809,7 @@ export default {
 
         this.$http.post(url).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               message: "试卷整体分配成功!",
@@ -806,6 +820,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",

+ 14 - 0
src/modules/print/view/ExamStructure.vue

@@ -541,9 +541,15 @@ export default {
           this.addStructureForm.examId
         );
 
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url = PRINT_API + "/examStructure/save";
         this.$http.post(url, this.addStructureForm).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               message: "考试结构新增成功!",
@@ -554,6 +560,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",
@@ -590,9 +597,15 @@ export default {
           this.cloneStructureForm.newExamId
         );
 
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url = PRINT_API + "/examStructure/clone";
         this.$http.post(url, this.cloneStructureForm).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               message: "考试结构复用成功!",
@@ -603,6 +616,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",

+ 7 - 0
src/modules/print/view/Project.vue

@@ -738,9 +738,15 @@ export default {
           this.projectSettingForm.mailEndTime
         );
 
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url = PRINT_API + "/printing/project/update";
         this.$http.post(url, this.projectSettingForm).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               type: "success",
@@ -751,6 +757,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",

+ 15 - 0
src/modules/print/view/ProjectStatistic.vue

@@ -677,9 +677,15 @@ export default {
           return false;
         }
 
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url = PRINT_API + "/project/backup/setting/save";
         this.$http.post(url, this.backupSettingForm).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               type: "success",
@@ -689,6 +695,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",
@@ -755,9 +762,16 @@ export default {
         if (!valid) {
           return false;
         }
+
+        let curLoading = this.$loading({
+          lock: true,
+          text: "数据保存中!"
+        });
+
         let url = PRINT_API + "/project/other/setting/save";
         this.$http.post(url, this.otherSettingForm).then(
           () => {
+            curLoading.close();
             this.$notify({
               title: "提示",
               type: "success",
@@ -768,6 +782,7 @@ export default {
           },
           error => {
             console.log(error.response);
+            curLoading.close();
             this.$notify({
               title: "错误",
               type: "error",