analysis模块reports ARR/RRR 增加文件保存功能
This commit is contained in:
		
							parent
							
								
									0a4615e261
								
							
						
					
					
						commit
						301a42b93e
					
				|  | @ -5,7 +5,7 @@ | |||
|     </a-spin> | ||||
|     <div slot="custom-footer" style="text-align: center;"> | ||||
|       <a-space :size="20"> | ||||
|         <a-button type="primary">Export</a-button> | ||||
|         <a-button type="primary" @click="handleOk">Export</a-button> | ||||
|         <a-button @click="visible = false">Cancel</a-button> | ||||
|       </a-space> | ||||
|     </div> | ||||
|  | @ -15,6 +15,7 @@ | |||
| <script> | ||||
| import ModalMixin from '@/mixins/ModalMixin' | ||||
| import { getAction } from '../../../../api/manage' | ||||
| import { saveAs } from 'file-saver'; | ||||
| export default { | ||||
|   mixins: [ModalMixin], | ||||
|   props: { | ||||
|  | @ -76,6 +77,10 @@ export default { | |||
|       if (this.sampleId) { | ||||
|         this.getContent() | ||||
|       } | ||||
|     }, | ||||
|     handleOk() { | ||||
|       let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' }); | ||||
|       saveAs(strData, `${this.type == 1 || this.type == 3 ? 'ARR' : 'RRR'}.txt`) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user