dev_aliyun_beta
hjm 6 years ago
parent d3fcf01d0e
commit 0cc4a805dc

@ -32,6 +32,10 @@ const HomeworkBanksEdit = Loadable({
loader: () => import('./HomeworkBanksEdit'),
loading: Loading,
});
const ExerciseBanksEdit = Loadable({
loader: () => import('./ExerciseBanksEdit'),
loading: Loading,
});
//普通作业题库详情
const Generaljobbankdetails =Loadable({
@ -134,6 +138,14 @@ class BanksIndex extends Component{
}
}></Route>
<Route path='/banks/exercise/:Id/edit'
render={
(props) => {
return (<ExerciseBanksEdit {...this.props} {...props} {...this.state} {...common}
/>)
}
}></Route>
<Route path='/banks/gtopic/:bankId/edit'
render={
(props) => {

@ -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;

@ -26,7 +26,7 @@ class HomeworkBanksEdit extends Component {
title:'编辑',
is_public:result && result.data && result.data.is_public,
crumbArray:[
{to:`/banks/${this.getModuleName()}/${workId}/edit`,content:'详情'},
{to:`/banks/${this.getModuleName()}/${workId}`,content:'详情'},
{content:'编辑'}
]
}

Loading…
Cancel
Save