| | |
| | | ref="processDetails" |
| | | :processObj="processObj" |
| | | :listData="listData" |
| | | @renew="renew" |
| | | :activeIndex='activeIndex' |
| | | @updateProcess="updateProcess" |
| | | /> |
| | | </div> |
| | | |
| | |
| | | index:null, |
| | | isPage:false, |
| | | isRenew:false, |
| | | activeIndex:'', |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | updateProcess(item,index){ |
| | | this.processObj=item; |
| | | this.activeIndex=index; |
| | | if (this.isLoading[index]) { |
| | | return true; |
| | | } |
| | | this.isLoading[index]=true; |
| | | this.$refs.processDetails.isLoading=true; |
| | | updateProcessParams({procedureId:this.listData.Procedure.ID}).then(res=>{ |
| | | if(res.code==200){ |
| | | this.isLoading[index]=false; |
| | | this.$refs.processDetails.isLoading=false; |
| | | this.$message.success('更新成功!') |
| | | this.renew(); |
| | | }else{ |
| | | this.isLoading[index]=false; |
| | | this.$refs.processDetails.isLoading=false; |
| | | this.$refs.processDetails.isUpdate=1; |
| | | } |
| | | }) |
| | | setTimeout(()=>{ |
| | | this.isLoading[index]=false; |
| | | this.$refs.processDetails.isLoading=false; |
| | | },50000) |
| | | }, |
| | | onSubmitTop() { |
| | |
| | | return {}; |
| | | }, |
| | | }, |
| | | activeIndex:{ |
| | | type:[String,Number], |
| | | default: () => { |
| | | return ''; |
| | | }, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | if (this.isLoading) { |
| | | return true; |
| | | } |
| | | this.isLoading=true; |
| | | updateProcessParams({procedureId:this.listData.Procedure.ID}).then(res=>{ |
| | | if(res.code==200){ |
| | | this.isLoading=false; |
| | | this.$message.success('更新成功!') |
| | | this.$emit('renew') |
| | | }else{ |
| | | this.isLoading=false; |
| | | this.isUpdate=1 |
| | | } |
| | | }) |
| | | setTimeout(()=>{ |
| | | this.isLoading=false; |
| | | },50000) |
| | | this.$emit('updateProcess',this.processObj,this.activeIndex) |
| | | // this.isLoading=true; |
| | | // updateProcessParams({procedureId:this.listData.Procedure.ID}).then(res=>{ |
| | | // if(res.code==200){ |
| | | // this.isLoading=false; |
| | | // this.$message.success('更新成功!') |
| | | // this.$emit('renew') |
| | | // }else{ |
| | | // this.isLoading=false; |
| | | // this.isUpdate=1 |
| | | // } |
| | | // }) |
| | | // setTimeout(()=>{ |
| | | // this.isLoading=false; |
| | | // },50000) |
| | | }, |
| | | closeClick() { |
| | | this.shutdown(); |