|  |  | @ -293,10 +293,12 @@ class CommonWorkPost extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |   // 附件相关 START
 |  |  |  |   // 附件相关 START
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   handleChange = (info) => { |  |  |  |   handleChange = (info) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if (info.file.status === 'uploading') { | 
			
		
	
		
		
			
				
					
					|  |  |  |       let fileList = info.fileList; |  |  |  |       let fileList = info.fileList; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); |  |  |  |       this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   onAttachmentRemove = (file) => { |  |  |  |   onAttachmentRemove = (file) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     // confirm({
 |  |  |  |     // confirm({
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -587,6 +589,18 @@ render(){ | 
			
		
	
		
		
			
				
					
					|  |  |  |     onChange: this.handleChange, |  |  |  |     onChange: this.handleChange, | 
			
		
	
		
		
			
				
					
					|  |  |  |     onRemove: this.onAttachmentRemove, |  |  |  |     onRemove: this.onAttachmentRemove, | 
			
		
	
		
		
			
				
					
					|  |  |  |     beforeUpload: (file) => { |  |  |  |     beforeUpload: (file) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // TODO 文件存在则提示并退出
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let gotSameFile = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.state.fileList && this.state.fileList.some((item) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (item.name && item.name.startsWith(file.name)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           gotSameFile = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (gotSameFile) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.props.showNotification("该附件已被上传!") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('beforeUpload', file.name); |  |  |  |       console.log('beforeUpload', file.name); | 
			
		
	
		
		
			
				
					
					|  |  |  |       const isLt150M = file.size / 1024 / 1024 < 150; |  |  |  |       const isLt150M = file.size / 1024 / 1024 < 150; | 
			
		
	
		
		
			
				
					
					|  |  |  |       if (!isLt150M) { |  |  |  |       if (!isLt150M) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |