diff --git a/public/react/src/modules/courses/coursesPublic/PathModal.js b/public/react/src/modules/courses/coursesPublic/PathModal.js
index 0b69fa15d..fc6747e08 100644
--- a/public/react/src/modules/courses/coursesPublic/PathModal.js
+++ b/public/react/src/modules/courses/coursesPublic/PathModal.js
@@ -75,13 +75,13 @@ class PathModal extends Component{
if(patheditarry===undefined){
this.setState({
patheditarrytype:true,
- patheditarryvalue:"请先选择实训课程"
+ patheditarryvalue:"请先选择实践课程"
})
return
}else if(patheditarry.length===0){
this.setState({
patheditarrytype:true,
- patheditarryvalue:"请先选择实训课程"
+ patheditarryvalue:"请先选择实践课程"
})
return
}
@@ -137,7 +137,7 @@ class PathModal extends Component{
/>:""}
{
console.log("1342");
console.log(response);
- var blob = new Blob([response.data])
+ if (response.status == 200) {
+
+ var blob = new Blob([response.data])
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
- downloadElement.href = href;
- downloadElement.download = '实习报告.pdf'; //下载后文件名
- document.body.appendChild(downloadElement);
- downloadElement.click(); //点击下载
- document.body.removeChild(downloadElement); //下载完成移除元素
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
window.URL.revokeObjectURL(href); //释放掉blob对象
+ }
}).catch((error) => {
console.log(error)
});
@@ -1377,15 +1384,21 @@ class Listofworks extends Component {
},{responseType: 'blob'}).then((response) => {
console.log("1306");
console.log(response);
+ if (response.status == 200) {
var blob = new Blob([response.data])
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
- downloadElement.href = href;
- downloadElement.download = '课堂学生成绩.xlsx'; //下载后文件名
- document.body.appendChild(downloadElement);
- downloadElement.click(); //点击下载
- document.body.removeChild(downloadElement); //下载完成移除元素
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
window.URL.revokeObjectURL(href); //释放掉blob对象
+ }
}).catch((error) => {
console.log(error)
});
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index 55770c359..19343ad79 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -1607,7 +1607,7 @@ class Trainingjobsetting extends Component {
showmodel:false
})
}
-// 导出实习报告批量
+ // 导出实习报告批量
internshipreport = () => {
console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid;
@@ -1616,14 +1616,26 @@ class Trainingjobsetting extends Component {
params: {
homework_common_id: homeworkid,
}
- }).then((response) => {
- console.log("1593");
+ },{responseType: 'blob'}).then((response) => {
+ console.log("326");
console.log(response);
+ var blob = new Blob([response.data])
+ var downloadElement = document.createElement('a');
+ var href = window.URL.createObjectURL(blob); //创建下载的链接
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
+ window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => {
console.log(error)
});
-
}
// 课堂学生成绩的导出下载
@@ -1631,9 +1643,22 @@ class Trainingjobsetting extends Component {
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
- axios.get(url).then((response) => {
- console.log("1607");
+ axios.get((url),{responseType: 'blob'}).then((response) => {
+ console.log("339");
console.log(response);
+ var blob = new Blob([response.data])
+ var downloadElement = document.createElement('a');
+ var href = window.URL.createObjectURL(blob); //创建下载的链接
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
+ window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => {
console.log(error)
diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
index 28560d4fe..d341aab6b 100644
--- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
+++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
@@ -327,9 +327,22 @@ class Workquestionandanswer extends Component {
params: {
homework_common_id: homeworkid,
}
- }).then((response) => {
+ },{responseType: 'blob'}).then((response) => {
console.log("326");
console.log(response);
+ var blob = new Blob([response.data])
+ var downloadElement = document.createElement('a');
+ var href = window.URL.createObjectURL(blob); //创建下载的链接
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
+ window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => {
console.log(error)
@@ -341,9 +354,22 @@ class Workquestionandanswer extends Component {
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
- axios.get(url).then((response) => {
+ axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("339");
console.log(response);
+ var blob = new Blob([response.data])
+ var downloadElement = document.createElement('a');
+ var href = window.URL.createObjectURL(blob); //创建下载的链接
+ let filename = response.headers.get('Content-Disposition');
+ if (filename) {
+ filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
+ downloadElement.href = href;
+ downloadElement.download = filename; //下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //点击下载
+ document.body.removeChild(downloadElement); //下载完成移除元素
+ }
+ window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => {
console.log(error)
diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index e9c6103e1..ec2f5e4c0 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -1074,7 +1074,7 @@ class ShixunHomework extends Component{
{/*this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名*/}
:
this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名:""}
- {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?选用实训课程:"":""}
+ {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?选用实践课程:"":""}
{this.props.isAdmin()===true?this.createCommonWork()}>选用实训:""}
diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js
index 9ef26f7a8..9093ec22d 100644
--- a/public/react/src/modules/home/shixunsHome.js
+++ b/public/react/src/modules/home/shixunsHome.js
@@ -189,7 +189,7 @@ class ShixunsHome extends Component {
{/*实训路径*/}
-
实训课程
+
实践课程
TRAINING COURSE
更多
diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js
index 89adbc233..0575fc817 100644
--- a/public/react/src/modules/paths/PathNew.js
+++ b/public/react/src/modules/paths/PathNew.js
@@ -94,7 +94,7 @@ class PathNew extends Component{
submitNewPath=()=>{
let {pathName} = this.state;
if(pathName===""){
- this.props.showSnackbar("请输入实训课程名称");
+ this.props.showSnackbar("请输入实践课程名称");
window.location.href="#part_Name";
this.setState({
flag_name:false
@@ -103,23 +103,23 @@ class PathNew extends Component{
}
let des=this.Des_editMD.getValue();
if(des===""){
- this.props.showSnackbar("请输入实训课程的简介");
+ this.props.showSnackbar("请输入实践课程的简介");
window.location.href="#part_Des";
return;
}
if (des.length > 5000) {
- this.props.showSnackbar("实训课程的简介最大限制5000个字符");
+ this.props.showSnackbar("实践课程的简介最大限制5000个字符");
window.location.href="#part_Des";
return;
}
let point = this.Point_editMD.getValue();
if(point===""){
- this.props.showSnackbar("请输入实训课程的学习须知");
+ this.props.showSnackbar("请输入实践课程的学习须知");
window.location.href="#part_point";
return;
}
if(point.length > 500){
- this.props.showSnackbar("实训课程的学习须知最大限制500个字符");
+ this.props.showSnackbar("实践课程的学习须知最大限制500个字符");
window.location.href="#part_point";
return;
}
@@ -177,10 +177,10 @@ class PathNew extends Component{
})
const Des_editMD = create_editorMD("shixun_introduction","100%","490px"
- ,"请在此输入实训课程的简介,最大限制5000个字符","/api/attachments.json", response.data.description,"");
+ ,"请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json", response.data.description,"");
this.Des_editMD=Des_editMD;
const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px"
- ,"请在此输入实训课程的学习须知,最大限制500个字符","/api/attachments.json",response.data.learning_notes,"");
+ ,"请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json",response.data.learning_notes,"");
this.Point_editMD=Point_editMD;
}
}).catch((error)=>{
@@ -189,9 +189,9 @@ class PathNew extends Component{
} else {
this.isEditPage = false
- const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实训课程的简介,最大限制5000个字符","/api/attachments.json","","");
+ const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json","","");
this.Des_editMD=Des_editMD;
- const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实训课程的学习须知,最大限制500个字符","/api/attachments.json","","");
+ const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json","","");
this.Point_editMD=Point_editMD;
}
@@ -210,9 +210,9 @@ class PathNew extends Component{
-
创建实训课程
+
创建实践课程
-
实训课程名称
+
实践课程名称
*
@@ -233,7 +233,7 @@ class PathNew extends Component{
*
-
+
@@ -247,7 +247,7 @@ class PathNew extends Component{
*
-
+
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index c5b72946e..bf8271940 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -751,7 +751,7 @@ submittojoinclass=(value)=>{
我的课堂
{/* p 老师 l 学生 */}
我的实训
-
我的实训课程
+
我的实践课程
我的项目
账号管理
{/*
this.educoderlogin()} >登入测试接口*/}
@@ -788,7 +788,7 @@ submittojoinclass=(value)=>{