|
|
|
@ -72,7 +72,6 @@ class Question extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
chakanjiexibool=(index)=>{
|
|
|
|
|
debugger
|
|
|
|
|
if(this.state.chakanjiexiboolindex===index){
|
|
|
|
|
this.setState({
|
|
|
|
|
chakanjiexiboolindex:"无",
|
|
|
|
@ -163,37 +162,8 @@ class Question extends Component {
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
|
|
|
|
|
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
|
|
|
|
|
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
|
|
|
|
|
let {defaultActiveKey} = this.state;
|
|
|
|
|
var defaultActiveKeys=defaultActiveKey;
|
|
|
|
|
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
|
|
|
|
|
defaultActiveKeys="0"
|
|
|
|
|
}else{
|
|
|
|
|
defaultActiveKeys="1"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
|
public: defaultActiveKeys,
|
|
|
|
|
page:1,
|
|
|
|
|
per_page:10,
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
defaultActiveKey:defaultActiveKeys
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let url = `/users/get_navigation_info.json`;
|
|
|
|
|
axios.get(url, {}).then((response) => {
|
|
|
|
|
// ////console.log("开始请求/get_navigation_info.json");
|
|
|
|
|
// ////console.log(response);
|
|
|
|
|
if (response != undefined) {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
this.setState({
|
|
|
|
@ -203,9 +173,7 @@ class Question extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
|
|
|
|
|
//获取题库筛选资料
|
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
|
axios.get(urls, {params: {
|
|
|
|
|