|
|
|
@ -8,12 +8,13 @@ import { CNotificationHOC } from '../common/CNotificationHOC'
|
|
|
|
|
import { RouteHOC } from './common'
|
|
|
|
|
|
|
|
|
|
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
|
|
|
|
import { WordsBtn, MarkdownToHtml, trigger } from 'educoder';
|
|
|
|
|
import { WordsBtn, MarkdownToHtml, trigger, queryString } from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import AccessoryModal from "../coursesPublic/AccessoryModal";
|
|
|
|
|
import PublishRightnow from './PublishRightnow'
|
|
|
|
|
import DownloadMessage from '../../modals/DownloadMessage';
|
|
|
|
|
|
|
|
|
|
import '../css/Courses.css'
|
|
|
|
|
import CBreadcrumb from '../common/CBreadcrumb'
|
|
|
|
@ -121,9 +122,17 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
|
|
|
|
|
|
let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
|
|
|
|
|
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
|
|
|
|
|
|
|
|
|
|
let exportParams = {}
|
|
|
|
|
const isListModule = childModuleName == '作品列表';
|
|
|
|
|
// 是列表页
|
|
|
|
|
let params = {}
|
|
|
|
|
if (isListModule) {
|
|
|
|
|
// TODO
|
|
|
|
|
// params = this.refs.commonWorkList._getRequestParams()
|
|
|
|
|
}
|
|
|
|
|
let exportUrl = `/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`
|
|
|
|
|
let exportResultUrl = `/homework_commons/${workId}/works_list.xlsx?${queryString.stringify(params)}`
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
|
|
|
|
@ -132,6 +141,9 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
></PublishRightnow>
|
|
|
|
|
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
|
|
|
|
|
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
|
|
|
|
|
|
|
|
|
|
<DownloadMessage ref="DownloadMessage" {...this.props} />
|
|
|
|
|
|
|
|
|
|
<div className="newMain clearfix worklist1">
|
|
|
|
|
<div className={"educontent mt20"}>
|
|
|
|
|
<style>{`
|
|
|
|
@ -189,7 +201,7 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
<div className="mt10 clearfix edu-back-white poll_list pl5">
|
|
|
|
|
<Link
|
|
|
|
|
onClick={() => this.setState({moduleName: '作品列表'})}
|
|
|
|
|
className={`${childModuleName == '作品列表' ? 'active' : '' } `}
|
|
|
|
|
className={`${isListModule ? 'active' : '' } `}
|
|
|
|
|
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
|
|
|
|
|
<Link
|
|
|
|
|
onClick={() => this.setState({moduleName: '作业问答'})}
|
|
|
|
@ -228,8 +240,12 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
{this.props.isAdmin()? <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={exportResultUrl} className="color-dark">导出成绩</a></li>
|
|
|
|
|
<li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
|
|
|
|
|
<li><a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.refs.DownloadMessage.confirmysl(exportResultUrl, exportParams)}
|
|
|
|
|
>导出成绩</a></li>
|
|
|
|
|
<li><a href={"javascript:void(0)"} className="color-dark"
|
|
|
|
|
onClick={() => this.refs.DownloadMessage.confirmysl(exportUrl, exportParams)}
|
|
|
|
|
>导出作品附件</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>:""}
|
|
|
|
|
|
|
|
|
@ -293,7 +309,7 @@ class CommonWorkDetailIndex extends Component{
|
|
|
|
|
{/* 作品列表 */}
|
|
|
|
|
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<CommonWorkList {...this.props} {...props} {...this.state} {...commonHandler}/>)
|
|
|
|
|
(props) => (<CommonWorkList ref="commonWorkList" {...this.props} {...props} {...this.state} {...commonHandler}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|