From 1aa713a8958cd8e04a1bd62a669cd5e771df8258 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 11:59:55 +0800
Subject: [PATCH 01/15] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/ShixunWorkReport.js | 32 ++++++++++++-------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 092b038f3..508ea5ca6 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -1,8 +1,9 @@
import React, {Component} from "react";
-import {WordsBtn,markdownToHTML} from 'educoder';
+import {WordsBtn,markdownToHTML,ActionBtn,queryString,downloadFile} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios';
+
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscript';
import Coursesshixundetails from './shixunreport/Coursesshixundetails';
@@ -32,9 +33,19 @@ class ShixunWorkReport extends Component {
}
-/// 确认是否下载
- confirmysl(url){
- axios.get(url).then((response) => {
+ /// 确认是否下载
+ confirmysl(url,child){
+ let params ={}
+ if(child!=undefined){
+ params =child._getRequestParams()!==undefined?child._getRequestParams():{};
+ }
+ console.log("170");
+ console.log(params);
+ const urll=url+`?${queryString.stringify(params)}`;
+ axios.get(urll+ '&export=true').then((response) => {
+ if(response===undefined){
+ return
+ }
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
@@ -53,17 +64,16 @@ class ShixunWorkReport extends Component {
})
}
}else {
+ this.setState({ donwloading: true })
+
this.props.showNotification(`正在下载中`);
- window.open("/api"+url, '_blank');
+
+ window.open("/api"+url+'?&export=true', '_blank');
}
}).catch((error) => {
console.log(error)
});
}
- //打开pdf
- confpdf = (url) =>{
- window.open(url);
- }
Downloadcal=()=>{
this.setState({
DownloadType:false,
@@ -163,8 +173,8 @@ class ShixunWorkReport extends Component {
返回
{this.props.isAdmin() ? this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
- onClick={()=>this.confpdf(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
+ onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
+
>导出实训报告数据 : ""}
From 7977966640c70ec574f888159fa0871f6f859be5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 12:13:02 +0800
Subject: [PATCH 02/15] =?UTF-8?q?=E5=8A=A0=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/shixunHomework/ShixunWorkReport.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 508ea5ca6..b7ad2dc20 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -35,6 +35,7 @@ class ShixunWorkReport extends Component {
/// 确认是否下载
confirmysl(url,child){
+ this.setState({ isspinning: true })
let params ={}
if(child!=undefined){
params =child._getRequestParams()!==undefined?child._getRequestParams():{};
@@ -64,11 +65,9 @@ class ShixunWorkReport extends Component {
})
}
}else {
- this.setState({ donwloading: true })
-
this.props.showNotification(`正在下载中`);
-
- window.open("/api"+url+'?&export=true', '_blank');
+ window.open("/api"+url+'?export=true', '_blank');
+ this.setState({ isspinning: false })
}
}).catch((error) => {
console.log(error)
@@ -172,10 +171,9 @@ class ShixunWorkReport extends Component {
{/*{this.props.isAdmin()?导出实训报告数据:""}*/}
返回
{this.props.isAdmin() ? this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
-
- >导出实训报告数据 : ""}
+ >