|  |  | @ -1,6 +1,6 @@ | 
			
		
	
		
			
				
					|  |  |  | import React, { useEffect, useState } from 'react'; | 
			
		
	
		
			
				
					|  |  |  | import { connect } from 'react-redux'; | 
			
		
	
		
			
				
					|  |  |  | import { Spin, Table, Popconfirm, Button, Input } from 'antd'; | 
			
		
	
		
			
				
					|  |  |  | import { Spin, Table, Popconfirm, Button, Input, Row, Col } from 'antd'; | 
			
		
	
		
			
				
					|  |  |  | import { ButtonGroup } from '$components'; | 
			
		
	
		
			
				
					|  |  |  | import moment from 'moment'; | 
			
		
	
		
			
				
					|  |  |  | import FileSaver from 'file-saver'; | 
			
		
	
	
		
			
				
					|  |  | @ -207,12 +207,17 @@ const FilesTable = (props) => { | 
			
		
	
		
			
				
					|  |  |  |                 let resourceApplicationsRecords = metadataResourceApplications.filter(ra => | 
			
		
	
		
			
				
					|  |  |  |                     ra.applyBy == user.id && ra.resourceName === record.name); | 
			
		
	
		
			
				
					|  |  |  |                 return <ButtonGroup> | 
			
		
	
		
			
				
					|  |  |  |                     {user.role == '数据消费者' ? null : | 
			
		
	
		
			
				
					|  |  |  |                         <> | 
			
		
	
		
			
				
					|  |  |  |                             <a style={{ marginLeft: 10 }} onClick={() => onEdit(record)}>编辑</a> | 
			
		
	
		
			
				
					|  |  |  |                             <Popconfirm | 
			
		
	
		
			
				
					|  |  |  |                                 title="是否确认删除该元数据?" | 
			
		
	
		
			
				
					|  |  |  |                                 onConfirm={() => confirmDelete(record)} | 
			
		
	
		
			
				
					|  |  |  |                     > <a style={{ marginLeft: 10 }}>删除</a></Popconfirm> | 
			
		
	
		
			
				
					|  |  |  |                             ><a style={{ marginLeft: 10 }}>删除</a></Popconfirm> | 
			
		
	
		
			
				
					|  |  |  |                             <a style={{ marginLeft: 10 }} onClick={() => marking(record.id)}>打标</a> | 
			
		
	
		
			
				
					|  |  |  |                         </> | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                     {user.role == '系统管理员' ? '' : resourceApplicationsRecords.length === 0 ? | 
			
		
	
		
			
				
					|  |  |  |                         <a style={{ marginLeft: 10 }} onClick={() => applyResources(record)}>申请资源</a> : | 
			
		
	
		
			
				
					|  |  |  |                         <span style={{ marginLeft: 10, color: "#c0c0c0" }} title='已存在资源申请'>申请资源</span>} | 
			
		
	
	
		
			
				
					|  |  | @ -298,7 +303,9 @@ const FilesTable = (props) => { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |     return <Spin spinning={isRequesting}> | 
			
		
	
		
			
				
					|  |  |  |         <div style={{ marginBottom: 16 }}> | 
			
		
	
		
			
				
					|  |  |  |         <Row style={{ marginBottom: 16 }}> | 
			
		
	
		
			
				
					|  |  |  |             <Col span={12}> | 
			
		
	
		
			
				
					|  |  |  |                 {user.role == '数据消费者' ? null : <> | 
			
		
	
		
			
				
					|  |  |  |                     <Button type='primary' onClick={() => { | 
			
		
	
		
			
				
					|  |  |  |                         dispatch(metadataManagement.getMetadataModels({ modelTypes: '文件' })).then(res => { | 
			
		
	
		
			
				
					|  |  |  |                             if (res.success) { | 
			
		
	
	
		
			
				
					|  |  | @ -314,11 +321,16 @@ const FilesTable = (props) => { | 
			
		
	
		
			
				
					|  |  |  |                                 : <Popconfirm title={'是否导出全部?'} onConfirm={() => handleExport(true)} okText="确定" cancelText="取消"> | 
			
		
	
		
			
				
					|  |  |  |                                     <Button disabled={tableDataCount == 0} style={{ marginLeft: 16 }}> 导出</Button> | 
			
		
	
		
			
				
					|  |  |  |                                 </Popconfirm> | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             <Button type='primary' style={{ marginLeft: 16, float: 'right' }} onClick={onSearch}>查询</Button> | 
			
		
	
		
			
				
					|  |  |  |             <Input style={{ width: 220, float: 'right' }} placeholder="名称/类型" | 
			
		
	
		
			
				
					|  |  |  |                     }</>} | 
			
		
	
		
			
				
					|  |  |  |             </Col> | 
			
		
	
		
			
				
					|  |  |  |             <Col span={12} style={{ display: 'flex', justifyContent: 'flex-end' }}> | 
			
		
	
		
			
				
					|  |  |  |                 <Input style={{ width: 220 }} placeholder="名称/类型" | 
			
		
	
		
			
				
					|  |  |  |                     allowClear onPressEnter={onSearch} onChange={e => setKeywords(e.target.value || '')} /> | 
			
		
	
		
			
				
					|  |  |  |         </div > | 
			
		
	
		
			
				
					|  |  |  |                 <Button type='primary' style={{ marginLeft: 16 }} onClick={onSearch}>查询</Button> | 
			
		
	
		
			
				
					|  |  |  |             </Col> | 
			
		
	
		
			
				
					|  |  |  |         </Row> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         <Table | 
			
		
	
		
			
				
					|  |  |  |             scroll={{ y: clientHeight - 320 }} | 
			
		
	
		
			
				
					|  |  |  |             rowKey='id' | 
			
		
	
	
		
			
				
					|  |  | 
 |