|
|
|
@ -66,6 +66,7 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
this.state = {
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
donwloading:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
initWorkDetailCommonState = (data) => {
|
|
|
|
@ -104,17 +105,11 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url,child){
|
|
|
|
|
let params = {}
|
|
|
|
|
if (isListModule) {
|
|
|
|
|
// TODO
|
|
|
|
|
if(child!=undefined) {
|
|
|
|
|
params = child._getRequestParams() !== undefined ? child._getRequestParams() : {};
|
|
|
|
|
}
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
axios.get(url+ '&export=true').then((response) => {
|
|
|
|
|
if(response===undefined){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
axios.get(url+ '&export=true',{
|
|
|
|
|
params
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
@ -138,7 +133,6 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
this.setState({ donwloading: true })
|
|
|
|
|
downloadFile({
|
|
|
|
|
url: url,
|
|
|
|
|
params,
|
|
|
|
|
successCallback: (url) => {
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
console.log('successCallback')
|
|
|
|
@ -324,13 +318,13 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.confirmysl(exportResultUrl,this.child)}
|
|
|
|
|
onClick={() => this.confirmysl(exportResultUrl)}
|
|
|
|
|
>导出成绩</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.confirmysl(exportUrl,this.child)}
|
|
|
|
|
onClick={() => this.confirmysl(exportUrl)}
|
|
|
|
|
>导出作品附件</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|