dev_forum
杨树明 5 years ago
parent da474ff992
commit ddad5986dc

@ -38,14 +38,10 @@ class Fileslistitem extends Component{
if(result.data.attachment_histories.length===0){
let link = document.createElement('a');
// link.href = window.URL.createObjectURL(new Blob([result.data.url]));
document.body.appendChild(link);
link.href = result.data.url;
let filesname=encodeURIComponent(result.data.title)
console.log(result.data.title)
link.download = decodeURIComponent(filesname)
link.download = result.data.title;
//兼容火狐浏览器
console.log(result.data.title)
document.body.appendChild(link);
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);

@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{
</style>
{this.props.isAdmin?<div className={this.props.isClassManagement?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isClassManagement?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
{this.props.isAdminOrTeacher()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
</div>:""}

Loading…
Cancel
Save