@ -5,7 +5,8 @@ import FilesDownComponents from "./filesDownComponents"
import { getPage , deleteById , addDownList } from '../service' ;
import { Button , Card , message , Modal } from 'antd' ;
import FileDown from '@/utils/Download' ;
import { btnAuthority } from '@/utils/authority' ;
import { btnAuthority } from '@/utils/authority' ;
import { downloadFileObjectId } from '@/utils/DownloadUtils' ;
const filesManage : React.FC < { } > = ( ) = > {
const [ deletetcid , handledeletetcid ] = useState < any > ( ) ;
@ -45,19 +46,19 @@ const filesManage: React.FC<{}> = () => {
if ( record . props . text . sharedFile ) {
return (
< >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger onClick = { ( ) = > downList ( record ) } > 下 载 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "updateInfo" onClick = { ( ) = > updateInfo ( record ) } > 修 改 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "deleteInfo" onClick = { ( ) = > { handledeletetc ( true ) ; handledeletetcid ( record ) } } > 删 除 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "selectDownLord" onClick = { ( ) = > selectDownLord ( record ) } > 下 载 记 录 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger onClick = { ( ) = > downList ( record ) } > 下 载 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "updateInfo" onClick = { ( ) = > updateInfo ( record ) } > 修 改 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "deleteInfo" onClick = { ( ) = > { handledeletetc ( true ) ; handledeletetcid ( record ) } } > 删 除 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "selectDownLord" onClick = { ( ) = > selectDownLord ( record ) } > 下 载 记 录 < / Button >
< / >
)
} else {
return (
< >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "downLord" onClick = { ( ) = > message . error ( '未上传文档,所以暂时无法下载!' ) } > 下 载 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "updateInfo" onClick = { ( ) = > updateInfo ( record ) } > 修 改 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "deleteInfo" onClick = { ( ) = > { handledeletetc ( true ) ; handledeletetcid ( record ) } } > 删 除 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "link" danger key = "selectDownLord" onClick = { ( ) = > selectDownLord ( record ) } > 下 载 记 录 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "downLord" onClick = { ( ) = > message . error ( '未上传文档,所以暂时无法下载!' ) } > 下 载 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "updateInfo" onClick = { ( ) = > updateInfo ( record ) } > 修 改 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "deleteInfo" onClick = { ( ) = > { handledeletetc ( true ) ; handledeletetcid ( record ) } } > 删 除 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "link" danger key = "selectDownLord" onClick = { ( ) = > selectDownLord ( record ) } > 下 载 记 录 < / Button >
< / >
)
}
@ -71,7 +72,7 @@ const filesManage: React.FC<{}> = () => {
}
await addDownList ( data ) . then ( ( res ) = > {
if ( res . code == 200 ) {
window . location . href = '/api/core-service-ebtp-updownload/v1/attachment/download/bid/' + val . props . text . sharedFile
downloadFileObjectId ( val . props . text . sharedFile ) ;
}
} )
}
@ -175,7 +176,7 @@ const filesManage: React.FC<{}> = () => {
>
{ searchConfig ? . resetText }
< / Button > ,
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] ) } type = "primary" onClick = { ( ) = > toEditAdd ( [ ] ) } > 新 增 < / Button >
< Button hidden = { btnAuthority ( [ 'ebtp-system-admin' ] , '1' )} type = "primary" onClick = { ( ) = > toEditAdd ( [ ] ) } > 新 增 < / Button >
] ;
} ,
} }