diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 382283fee..a2f57a8e1 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -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); diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index aaf02498b..5731c3b73 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{ {this.props.isAdmin?
实训详情 - {this.props.isClassManagement?this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名:""} + {this.props.isAdminOrTeacher()?this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名:""} 设置
:""}