xiatian 5 years ago
parent
commit
449ee5e7d6
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/modules/examwork/view/notice.vue

+ 8 - 0
src/modules/examwork/view/notice.vue

@@ -282,12 +282,14 @@
               v-show="this.operateType != 'view'"
               type="primary"
               @click="saveNotice(2)"
+              :loading="this.noticeFormLoading"
               >确认发送</el-button
             >
             <el-button
               v-show="this.operateType != 'view'"
               type="primary"
               @click="saveNotice(1)"
+              :loading="this.noticeFormLoading"
               >保 存</el-button
             >
             <el-button @click="cancel">关 闭</el-button>
@@ -499,6 +501,7 @@ export default {
   components: { ckeditor },
   data() {
     return {
+      noticeFormLoading: false,
       formSearch: {
         title: ""
       },
@@ -889,6 +892,7 @@ export default {
               return;
             }
           }
+          this.noticeFormLoading = true;
           //修改
           if ("edit" == this.operateType) {
             this.$httpWithMsg
@@ -897,10 +901,12 @@ export default {
                 () => {
                   this.success("修改成功!");
                   this.searchForm();
+                  this.noticeFormLoading = false;
                   this.editNoticeDialogVisible = false;
                 },
                 () => {
                   this.editNoticeDialogVisible = true;
+                  this.noticeFormLoading = false;
                   // this.searchForm();
                   // this.editNoticeDialogVisible = false;
                 }
@@ -914,10 +920,12 @@ export default {
                 () => {
                   this.success("新增成功!");
                   this.editNoticeDialogVisible = false;
+                  this.noticeFormLoading = false;
                   this.searchForm();
                 },
                 () => {
                   this.editNoticeDialogVisible = true;
+                  this.noticeFormLoading = false;
                   // this.editNoticeDialogVisible = false;
                   // return this.searchForm();
                 }