未职业认证-链接进入题库跳转

dev_hss
caicai8 6 years ago
parent fa6258ea3e
commit e7474bd4ab

@ -87,7 +87,7 @@ class Completetaskpage extends Component {
this.setState({ this.setState({
banksMenu:menuData banksMenu:menuData
}) })
this.props.initPublic(crumbData); this.props.initPublic(crumbData,response.data);
}catch (e) { }catch (e) {
} }

@ -82,7 +82,7 @@ class CompletetopicdePage extends Component {
this.setState({ this.setState({
banksMenu:menuData banksMenu:menuData
}) })
this.props.initPublic(crumbData); this.props.initPublic(crumbData,response.data);
}catch (e) { }catch (e) {
} }

@ -92,7 +92,7 @@ class GroupjobbankPage extends Component {
this.setState({ this.setState({
banksMenu:menuData banksMenu:menuData
}) })
this.props.initPublic(crumbData); this.props.initPublic(crumbData,response.data);
}catch (e) { }catch (e) {
} }

@ -302,7 +302,7 @@ class PollNewQuestbank extends Component {
{content:'编辑'} {content:'编辑'}
] ]
} }
this.props.initPublic(crumbData); this.props.initPublic(crumbData,response.data);
}catch (e) { }catch (e) {
} }

@ -93,7 +93,7 @@ class Generaljobbankdetails extends Component {
this.setState({ this.setState({
banksMenu:menuData banksMenu:menuData
}) })
this.props.initPublic(crumbData); this.props.initPublic(crumbData,response.data);
}catch (e) { }catch (e) {
} }

@ -85,7 +85,10 @@ class BanksIndex extends Component{
} }
initPublic = (crumbData) =>{ initPublic = (crumbData,data) =>{
if(data && data.status && data.status == -2){
this.props.history.push(`/topicbank/publicly`);
}
this.setState({ this.setState({
crumbData crumbData
}) })

@ -31,11 +31,11 @@ class BanksTabIndex extends Component{
} }
} }
initPublic = (crumbData,menuData) =>{ initPublic = (crumbData,menuData,data) =>{
this.setState({ this.setState({
banksMenu:menuData banksMenu:menuData
}) })
this.props.initPublic(crumbData); this.props.initPublic(crumbData,data);
} }
render(){ render(){

@ -36,7 +36,7 @@ class ExerciseBanksDetail extends Component{
type:this.props.match.params.type, type:this.props.match.params.type,
authorize:result && result.data && result.data.authorize, authorize:result && result.data && result.data.authorize,
} }
this.props.initPublic(crumbData,menuData); this.props.initPublic(crumbData,menuData,result.data);
} }
render(){ render(){

@ -29,7 +29,7 @@ class ExerciseBanksEdit extends Component {
{content:'编辑'} {content:'编辑'}
] ]
} }
this.props.initPublic(crumbData); this.props.initPublic(crumbData,responseData.data);
} }
render(){ render(){

@ -29,7 +29,7 @@ class GtaskBanksEdit extends Component {
{content:'编辑'} {content:'编辑'}
] ]
} }
this.props.initPublic(crumbData); this.props.initPublic(crumbData,result.data);
result.data.isEdit = true; result.data.isEdit = true;
this.setState({ data:result.data}) this.setState({ data:result.data})
this.newWorkFormRef.initValue(result.data); this.newWorkFormRef.initValue(result.data);

@ -12,7 +12,6 @@ class GtopicBanksEdit extends Component{
} }
componentDidMount = () =>{ componentDidMount = () =>{
let bankId = this.props.match.params.bankId; let bankId = this.props.match.params.bankId;
this.initData(bankId); this.initData(bankId);
} }
@ -28,7 +27,7 @@ class GtopicBanksEdit extends Component{
{content:'编辑'} {content:'编辑'}
] ]
} }
this.props.initPublic(crumbData); this.props.initPublic(crumbData,result.data);
this.GraduateTopicNewFromRef.initValue(result); this.GraduateTopicNewFromRef.initValue(result);
} }

@ -30,7 +30,7 @@ class HomeworkBanksEdit extends Component {
{content:'编辑'} {content:'编辑'}
] ]
} }
this.props.initPublic(crumbData); this.props.initPublic(crumbData,result.data);
result.data.isEdit = true; result.data.isEdit = true;
result.data.ref_attachments = result.data.reference_attachments result.data.ref_attachments = result.data.reference_attachments
// this.setState({ isGroup: result.data.min_num || result.data.max_num }) // this.setState({ isGroup: result.data.min_num || result.data.max_num })

@ -47,7 +47,7 @@ class PollBanksContent extends Component{
type:this.props.match.params.type, type:this.props.match.params.type,
authorize:result && result.data && result.data.authorize, authorize:result && result.data && result.data.authorize,
} }
this.props.initPublic(crumbData,menuData); this.props.initPublic(crumbData,menuData,result.data);
this.setState({ this.setState({
pollDetail pollDetail
}) })

Loading…
Cancel
Save