Explorar o código

添加加载效果

zhuliu hai 1 ano
pai
achega
a34f723cdd

+ 1 - 1
src/utils/common.js

@@ -537,7 +537,7 @@ export default {
       }
       return false
     } else {
-      return true
+      return false
     }
   },
   //校验是否全部上传

+ 29 - 9
src/views/report/InvalidResponse/components/dialog/editFlowPath.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="responseDialog">
       <el-dialog  :title="(form.id?'编辑':'添加') +type.title" :visible.sync="showDialog" width="700px" :close-on-click-modal="false"  :before-close="handleClose" append-to-body>
-        <el-form  :model="form" :rules="rules" ref="form" label-width="120px" label-position="left" v-loading="loading">
+        <el-form  :model="form" :rules="rules" ref="form" label-width="120px" label-position="left">
           <el-form-item :label="type.time">
             <el-date-picker v-model="form[type.timeField]" value-format="yyyy-MM-dd" type="date"  placeholder="请选择时间" style="width: 100%;"></el-date-picker>
           </el-form-item>
@@ -60,7 +60,7 @@
   
         <span slot="footer" class="dialog-footer">
           <el-button @click="handleClose">取 消</el-button>
-          <el-button type="primary" @click="finish" >确 定</el-button>
+          <el-button type="primary" :loading="loading" @click="finish" >确 定</el-button>
         </span>
       </el-dialog>
     </div>
@@ -169,6 +169,7 @@
                       this.handleClose()
                       return false
                     }
+                    this.loading = true
                     switch(this.type.type){
                         case '0':
                             this.addOralTrail()
@@ -217,7 +218,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传口审记录
         addOralTrail() {
@@ -232,7 +235,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传无效决定书
         addInvalidDecisionFile() {
@@ -247,7 +252,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传行政诉讼书
         addAdminProceed() {
@@ -262,7 +269,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传行陈述意见书
         addStateOpinion() {
@@ -277,7 +286,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传行陈述意见书
         addAdminProceedJudgment() {
@@ -292,7 +303,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         // 上传其他文档
         addOtherDocuments() {
@@ -307,7 +320,9 @@
               this.$emit('save',true)
               this.handleClose()
             }
-          }) 
+          }).catch(error=>{
+            this.loading = false
+          })  
         },
         //修改权利要求记录
         addPatentClaimHistory() {
@@ -322,6 +337,8 @@
               this.$emit('save',true)
               this.handleClose()
             }
+          }).catch(error=>{
+            this.loading = false
           }) 
         },
         //补充证据和理由记录
@@ -337,10 +354,13 @@
               this.$emit('save',true)
               this.handleClose()
             }
+          }).catch(error=>{
+            this.loading = false
           }) 
         },
         // 关闭弹窗
         handleClose() {
+          this.loading = false
             this.showDialog=false
         },
         //切换文件