topic_bank
杨树林 5 years ago
parent 11cf73b11a
commit 49220499fa

@ -75,7 +75,7 @@ class Completetaskpage extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtask/${workids}/${this.props.match.params.type}`,content:'内容详情'},
{to:`/banks/gtask/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
],
category:'gtask',//毕设选题
tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`,

@ -70,7 +70,7 @@ class CompletetopicdePage extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtopic/${workids}/${this.props.match.params.type}`,content:'内容详情'},
{to:`/banks/gtopic/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
],
category:'gtopic',//毕设选题
tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`,

@ -79,8 +79,8 @@ class GroupjobbankPage extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/group/${workids}/${this.props.match.params.type}/details`,content:'内容详情'},
{to:`/banks/group/${workids}/${this.props.match.params.type}/answer`,content:'参考答案'}
{to:`/banks/group/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
{to:`/banks/group/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'}
],
category:'group',//毕设选题
tos:`/banks/group/${workids}/edit/${this.props.match.params.type}`,

@ -79,8 +79,8 @@ class Generaljobbankdetails extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/normal/${workids}/${this.props.match.params.type}/details`,content:'内容详情'},
{to:`/banks/normal/${workids}/${this.props.match.params.type}/answer`,content:'参考答案'}
{to:`/banks/normal/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
{to:`/banks/normal/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'}
],
category:'normal',//毕设选题
tos:`/banks/normal/${workids}/edit/${this.props.match.params.type}`,

@ -519,8 +519,8 @@ class InfosTopics extends Component{
<a title={item.name.length>55?item.name:""} className="ml10 fl mt3 font-16 color-dark maxwidth900" href={
category==="normal"?`/banks/normal/${item.id}/${types}/details`:
category==="group"?`/banks/group/${item.id}/${types}/details`:
category==="normal"?`/banks/normal/${item.id}/${types}?tab=0`:
category==="group"?`/banks/group/${item.id}/${types}?tab=0`:
category==="poll"?`/banks/poll/${item.id}/${types}`:
category==="exercise"?`/banks/exercise/${item.id}/${types}`:
category==="gtask"?`/banks/gtask/${item.id}/${types}`:

@ -27,7 +27,7 @@ class ExerciseBanksDetail extends Component{
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/exercise/${Id}/${this.props.match.params.type}`,content:'内容详情'}
{to:`/banks/exercise/${Id}/${this.props.match.params.type}?tab=0`,content:'内容详情'}
],
category:'exercise',//
tos: `/banks/exercise/${Id}/edit/${this.props.match.params.type}`,

@ -25,7 +25,7 @@ class GtaskBanksEdit extends Component {
title:'编辑',
is_public:result && result.data && result.data.is_public,
crumbArray:[
{to:`/banks/gtask/${workId}/${this.props.match.params.type}`,content:'详情'},
{to:`/banks/gtask/${workId}/${this.props.match.params.type}?tab=0`,content:'详情'},
{content:'编辑'}
]
}

@ -24,7 +24,7 @@ class GtopicBanksEdit extends Component{
title:'编辑',
is_public:result && result.data.selected_data && result.data.selected_data.is_public,
crumbArray:[
{to:`/banks/gtopic/${bankId}/${this.props.match.params.type}`,content:'详情'},
{to:`/banks/gtopic/${bankId}/${this.props.match.params.type}?tab=0`,content:'详情'},
{content:'编辑'}
]
}

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

@ -25,10 +25,32 @@ class BanksMenu extends Component{
})
}
componentDidMount() {
let { banksMenu} = this.props;
this.setState({
tab:banksMenu && banksMenu.tab?[String(banksMenu.tab)]:['0'],
})
debugger
try {
const query = this.props.location.search;
const type = query.split('?tab=');
if(type[1]===undefined){
this.setState({
tab:['0'],
});
}else{
if(type[1]==="0"){
this.setState({
tab:['0'],
});
}else if(type[1]==="1"){
this.setState({
tab:['1'],
});
}
}
}catch (e) {
this.setState({
tab:['0'],
});
}
}
topicscancelmodel=()=>{

Loading…
Cancel
Save