|
|
|
@ -8,7 +8,7 @@ import { CNotificationHOC } from '../common/CNotificationHOC'
|
|
|
|
|
import { RouteHOC } from './common'
|
|
|
|
|
|
|
|
|
|
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
|
|
|
|
import { WordsBtn, MarkdownToHtml, trigger, queryString } from 'educoder';
|
|
|
|
|
import { WordsBtn, MarkdownToHtml, trigger, queryString, downloadFile } from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
@ -18,6 +18,8 @@ import '../css/Courses.css'
|
|
|
|
|
import CBreadcrumb from '../common/CBreadcrumb'
|
|
|
|
|
import DownloadMessageysl from "../../modals/DownloadMessageysl";
|
|
|
|
|
|
|
|
|
|
import { Spin } from 'antd'
|
|
|
|
|
|
|
|
|
|
//引入对应跳转的组件
|
|
|
|
|
|
|
|
|
|
//新建分组/普通作业
|
|
|
|
@ -64,6 +66,7 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
this.state = {
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
donwloading: false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
initWorkDetailCommonState = (data) => {
|
|
|
|
@ -123,7 +126,20 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
|
|
|
|
|
this.setState({ donwloading: true })
|
|
|
|
|
downloadFile({
|
|
|
|
|
url: url,
|
|
|
|
|
successCallback: (url) => {
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
console.log('successCallback')
|
|
|
|
|
},
|
|
|
|
|
failCallback: (responseHtml, url) => {
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
console.log('failCallback')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// window.open("/api"+url, '_blank');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -244,7 +260,7 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{ noTab !== true && <div className="stud-class-set bor-bottom-greyE">
|
|
|
|
|
{ noTab !== true && <div className="stud-class-set bor-bottom-greyE floatSpinParent">
|
|
|
|
|
<div className="mt10 clearfix edu-back-white poll_list pl5">
|
|
|
|
|
<Link
|
|
|
|
|
onClick={() => this.setState({moduleName: '作品列表'})}
|
|
|
|
@ -283,18 +299,30 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.floatSpinParent .ant-spin-nested-loading {
|
|
|
|
|
float: right;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
|
|
|
|
|
{this.props.isAdmin()? <Spin spinning={this.state.donwloading} style={{ }}>
|
|
|
|
|
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
|
|
|
|
|
<li><a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.confirmysl(exportResultUrl, exportParams)}
|
|
|
|
|
>导出成绩</a></li>
|
|
|
|
|
<li><a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
>导出成绩</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.confirmysl(exportUrl, exportParams)}
|
|
|
|
|
>导出作品附件</a></li>
|
|
|
|
|
>导出作品附件</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>:""}
|
|
|
|
|
</li>
|
|
|
|
|
</Spin>:""}
|
|
|
|
|
|
|
|
|
|
{/* {isAdmin && <a className={"fr color-blue font-16"} href={exportUrl}>导出作品附件</a>}
|
|
|
|
|
{isAdmin && <a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a>} */}
|
|
|
|
|