|
|
|
@ -42,6 +42,14 @@ class Showoldfiles extends Component{
|
|
|
|
|
this.props.closaoldfilesprops()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showfiless=(url)=>{
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
var binaryData = [];
|
|
|
|
|
binaryData.push(result.data);
|
|
|
|
|
this.url =window.URL.createObjectURL(new Blob(binaryData, {type:"application/pdf"}));
|
|
|
|
|
window.open(this.url);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
let {visible,allfiles}=this.props;
|
|
|
|
|
|
|
|
|
@ -175,7 +183,10 @@ class Showoldfiles extends Component{
|
|
|
|
|
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={allfiles.id}>
|
|
|
|
|
|
|
|
|
|
<li className="fl fontlefts">
|
|
|
|
|
<a className={"isabox"} href={allfiles.url}>{allfiles.title}</a>
|
|
|
|
|
{allfiles.is_pdf===false?
|
|
|
|
|
<a className={"isabox"} href={"/api"+allfiles.url} >{allfiles.title}</a>:
|
|
|
|
|
<a className={"isabox"} onClick={()=>this.showfiless(allfiles.url)} >{allfiles.title}</a>
|
|
|
|
|
}
|
|
|
|
|
<span className={"newcolor-orange fl"}>当前版本</span>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
@ -191,7 +202,11 @@ class Showoldfiles extends Component{
|
|
|
|
|
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={item.id} key={key}>
|
|
|
|
|
|
|
|
|
|
<li className="fl fontlefts">
|
|
|
|
|
<a className={"isabox"} href={item.url}>{item.title}</a>
|
|
|
|
|
|
|
|
|
|
{item.is_pdf===false?
|
|
|
|
|
<a className={"isabox"} href={"/api"+item.url}>{item.title}</a>:
|
|
|
|
|
<a className={"isabox"} onClick={()=>this.showfiless(item.url)} >{item.title}</a>
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li className="fl filesves ">
|
|
|
|
|