dev_aliyun_beta
parent
d3fcf01d0e
commit
0cc4a805dc
@ -0,0 +1,66 @@
|
||||
import React, { Component } from 'react';
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
import ExerciseNewCommon from '../../../courses/exercise/ExerciseNewCommon'
|
||||
|
||||
class ExerciseBanksEdit extends Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
isPublic: undefined,
|
||||
// isGroup: false
|
||||
}
|
||||
}
|
||||
componentDidMount = () =>{
|
||||
|
||||
|
||||
}
|
||||
|
||||
initData = (responseData) =>{
|
||||
const Id = this.props.match.params.Id
|
||||
|
||||
const crumbData={
|
||||
title:'编辑',
|
||||
is_public: responseData && responseData.data && responseData.data.exercise.is_public,
|
||||
crumbArray:[
|
||||
{to:`/banks/exercise/${Id}`,content:'详情'},
|
||||
{content:'编辑'}
|
||||
]
|
||||
}
|
||||
this.props.initPublic(crumbData);
|
||||
}
|
||||
|
||||
render(){
|
||||
let { workId } = this.props.match.params
|
||||
const common = {
|
||||
// onCancel:this.onCancel,
|
||||
// isGroup: this.isGroup,
|
||||
// doNew: this.doNew,
|
||||
// doEdit: this.doEdit,
|
||||
initData: this.initData
|
||||
}
|
||||
return(
|
||||
<div className="courseForm">
|
||||
<style>
|
||||
{`
|
||||
.courseForm .ant-col-sm-24{
|
||||
text-align:left;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
<ExerciseNewCommon
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
{...common}
|
||||
wrappedComponentRef={(ref) => this.exerciseNewCommonRef = ref}
|
||||
isEdit={true}
|
||||
shixunsUrl={`/exercise_banks/choose_shixun.json`}
|
||||
exercise_url={'exercise_banks'}
|
||||
exercise_url_questions={'exercise_bank_questions'}
|
||||
></ExerciseNewCommon>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default ExerciseBanksEdit;
|
Loading…
Reference in new issue