|
|
|
@ -12,15 +12,15 @@ export function RouteHOC(options = {}) {
|
|
|
|
|
return class Wrapper extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
toCreateProject = () => {
|
|
|
|
|
let url = '/projects/new'
|
|
|
|
|
if (window.location.port == 3007) {
|
|
|
|
|
// window.location.href
|
|
|
|
|
// window.location.href
|
|
|
|
|
url = '/testbdweb.educoder.net/projects/new'
|
|
|
|
|
}
|
|
|
|
|
window.open(
|
|
|
|
@ -55,8 +55,8 @@ export function RouteHOC(options = {}) {
|
|
|
|
|
} else {
|
|
|
|
|
this.props.history.push(`/courses/${_courseId}/boards/${workId}/messages/${topicId}`)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
toEditPage = (_courseId, _workId) => {
|
|
|
|
|
const secondName = this.getModuleName()
|
|
|
|
|
if (typeof _courseId == "object") {
|
|
|
|
@ -78,6 +78,19 @@ export function RouteHOC(options = {}) {
|
|
|
|
|
window.open(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
toWorkDetailPage2 = (e, _courseId, _workId, _studentWorkId) => {
|
|
|
|
|
console.log("鼠标中键点击了")
|
|
|
|
|
console.log(_studentWorkId)
|
|
|
|
|
const secondName = this.getModuleName()
|
|
|
|
|
if (typeof _courseId == "object") {
|
|
|
|
|
const workId = _courseId.workId
|
|
|
|
|
const courseId = _courseId.coursesId
|
|
|
|
|
const studentWorkId = _courseId.studentWorkId
|
|
|
|
|
window.open(`/courses/${courseId}/${secondName}/${_workId || workId}/${_studentWorkId || studentWorkId}/appraise`);
|
|
|
|
|
} else {
|
|
|
|
|
window.open(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
toNewPage = (courseId) => {
|
|
|
|
|
const secondName = this.getModuleName()
|
|
|
|
|
this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.category_id}/new`)
|
|
|
|
@ -125,8 +138,8 @@ export function RouteHOC(options = {}) {
|
|
|
|
|
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/answer`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toWorkQuestionPage = (_courseId, _workId) => {
|
|
|
|
|
|
|
|
|
|
toWorkQuestionPage = (_courseId, _workId) => {
|
|
|
|
|
const secondName = this.getModuleName()
|
|
|
|
|
if (typeof _courseId == "object") {
|
|
|
|
|
const workId = _workId || _courseId.workId
|
|
|
|
@ -148,37 +161,36 @@ export function RouteHOC(options = {}) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
render() {
|
|
|
|
|
const { snackbarOpen} = this.state;
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<WrappedComponent {...this.props}
|
|
|
|
|
toDetailPage={this.toDetailPage}
|
|
|
|
|
toEditPage={this.toEditPage}
|
|
|
|
|
toNewPage={this.toNewPage}
|
|
|
|
|
toListPage={this.toListPage}
|
|
|
|
|
toWorkDetailPage={this.toWorkDetailPage}
|
|
|
|
|
|
|
|
|
|
toWorkPostPage={this.toWorkPostPage}
|
|
|
|
|
toWorkListPage={this.toWorkListPage}
|
|
|
|
|
toWorkAnswerPage={this.toWorkAnswerPage}
|
|
|
|
|
toWorkQuestionPage={this.toWorkQuestionPage}
|
|
|
|
|
toWorkSettingPage={this.toWorkSettingPage}
|
|
|
|
|
|
|
|
|
|
toCreateProject={this.toCreateProject}
|
|
|
|
|
|
|
|
|
|
isGroup={this.isGroup}
|
|
|
|
|
getModuleName={this.getModuleName}
|
|
|
|
|
getModuleType={this.getModuleType}
|
|
|
|
|
<WrappedComponent {...this.props}
|
|
|
|
|
toDetailPage={this.toDetailPage}
|
|
|
|
|
toEditPage={this.toEditPage}
|
|
|
|
|
toNewPage={this.toNewPage}
|
|
|
|
|
toListPage={this.toListPage}
|
|
|
|
|
toWorkDetailPage={this.toWorkDetailPage}
|
|
|
|
|
toWorkDetailPage2={this.toWorkDetailPage2}
|
|
|
|
|
toWorkPostPage={this.toWorkPostPage}
|
|
|
|
|
toWorkListPage={this.toWorkListPage}
|
|
|
|
|
toWorkAnswerPage={this.toWorkAnswerPage}
|
|
|
|
|
toWorkQuestionPage={this.toWorkQuestionPage}
|
|
|
|
|
toWorkSettingPage={this.toWorkSettingPage}
|
|
|
|
|
|
|
|
|
|
toCreateProject={this.toCreateProject}
|
|
|
|
|
|
|
|
|
|
isGroup={this.isGroup}
|
|
|
|
|
getModuleName={this.getModuleName}
|
|
|
|
|
getModuleType={this.getModuleType}
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</WrappedComponent>
|
|
|
|
|
|
|
|
|
|
</WrappedComponent>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|