|  |  | @ -270,34 +270,53 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       return fileType && isLt1M; | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     uploadHttpRequest(file) { | 
			
		
	
		
			
				
					|  |  |  |     async uploadHttpRequest(file) { | 
			
		
	
		
			
				
					|  |  |  |       this.importLoading = true; | 
			
		
	
		
			
				
					|  |  |  |       this.importBtnTitle = "正在上传中..."; | 
			
		
	
		
			
				
					|  |  |  |       this.$message({ | 
			
		
	
		
			
				
					|  |  |  |         showClose: true, | 
			
		
	
		
			
				
					|  |  |  |         message: '导入中,请到系统管理-导入记录中查看进度', | 
			
		
	
		
			
				
					|  |  |  |         duration: 0 | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 | 
			
		
	
		
			
				
					|  |  |  |       formData.append("file", file.file); //添加文件对象 | 
			
		
	
		
			
				
					|  |  |  |       axios({ | 
			
		
	
		
			
				
					|  |  |  |         url: | 
			
		
	
		
			
				
					|  |  |  |           window.SITE_CONFIG["apiURL"] + | 
			
		
	
		
			
				
					|  |  |  |           "/heart/iccommunityselforganization/importcommunityselforganization", | 
			
		
	
		
			
				
					|  |  |  |         method: "post", | 
			
		
	
		
			
				
					|  |  |  |         data: formData, | 
			
		
	
		
			
				
					|  |  |  |         // responseType: "blob", | 
			
		
	
		
			
				
					|  |  |  |       await this.$http | 
			
		
	
		
			
				
					|  |  |  |         .post('/heart/iccommunityselforganization/importcommunityselforganization', formData).then(res => { | 
			
		
	
		
			
				
					|  |  |  |           console.log('res-up', res) | 
			
		
	
		
			
				
					|  |  |  |           if (res.data.code == 0 && res.data.msg == 'success') { | 
			
		
	
		
			
				
					|  |  |  |             this.$message.success('导入成功') | 
			
		
	
		
			
				
					|  |  |  |             this.getTableData() | 
			
		
	
		
			
				
					|  |  |  |           } else this.$message.error(res.data.msg) | 
			
		
	
		
			
				
					|  |  |  |         }).catch(err => { | 
			
		
	
		
			
				
					|  |  |  |           console.log('失败', err) | 
			
		
	
		
			
				
					|  |  |  |           file.onError() //上传失败的文件会从文件列表中删除 | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error('导入失败') | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |         .then((res) => { | 
			
		
	
		
			
				
					|  |  |  |           this.importLoading = false; | 
			
		
	
		
			
				
					|  |  |  |           this.importBtnTitle = "excel导入"; | 
			
		
	
		
			
				
					|  |  |  |           console.log("resresresresresresres", res); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |           this.getTableData(); | 
			
		
	
		
			
				
					|  |  |  |           if (res.data.code == 0) { | 
			
		
	
		
			
				
					|  |  |  |             return this.$message.success(res.data.data || "导入成功"); | 
			
		
	
		
			
				
					|  |  |  |           } else { | 
			
		
	
		
			
				
					|  |  |  |             return this.$message.error(res.data.msg); | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |         .catch((err) => { | 
			
		
	
		
			
				
					|  |  |  |           console.log("失败", err); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |       // axios({ | 
			
		
	
		
			
				
					|  |  |  |       //   url: | 
			
		
	
		
			
				
					|  |  |  |       //     window.SITE_CONFIG["apiURL"] + | 
			
		
	
		
			
				
					|  |  |  |       //     "/heart/iccommunityselforganization/importcommunityselforganization", | 
			
		
	
		
			
				
					|  |  |  |       //   method: "post", | 
			
		
	
		
			
				
					|  |  |  |       //   data: formData, | 
			
		
	
		
			
				
					|  |  |  |       //   // responseType: "blob", | 
			
		
	
		
			
				
					|  |  |  |       // }) | 
			
		
	
		
			
				
					|  |  |  |       //   .then((res) => { | 
			
		
	
		
			
				
					|  |  |  |       //     this.importLoading = false; | 
			
		
	
		
			
				
					|  |  |  |       //     this.importBtnTitle = "excel导入"; | 
			
		
	
		
			
				
					|  |  |  |       //     console.log("resresresresresresres", res); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |       //     this.getTableData(); | 
			
		
	
		
			
				
					|  |  |  |       //     if (res.data.code == 0) { | 
			
		
	
		
			
				
					|  |  |  |       //       return this.$message.success(res.data.data || "导入成功"); | 
			
		
	
		
			
				
					|  |  |  |       //     } else { | 
			
		
	
		
			
				
					|  |  |  |       //       return this.$message.error(res.data.msg); | 
			
		
	
		
			
				
					|  |  |  |       //     } | 
			
		
	
		
			
				
					|  |  |  |       //   }) | 
			
		
	
		
			
				
					|  |  |  |       //   .catch((err) => { | 
			
		
	
		
			
				
					|  |  |  |       //     console.log("失败", err); | 
			
		
	
		
			
				
					|  |  |  |       //   }); | 
			
		
	
		
			
				
					|  |  |  |         this.importLoading = false | 
			
		
	
		
			
				
					|  |  |  |       this.importBtnTitle = 'excel导入' | 
			
		
	
		
			
				
					|  |  |  |       this.$refs.upload.clearFiles(); | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |