|
|
|
@ -22,7 +22,6 @@ class Listjihe extends Component {
|
|
|
|
|
page:1,
|
|
|
|
|
name:"单选题",
|
|
|
|
|
nd:"简单",
|
|
|
|
|
chakanjiexibool:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//初始化
|
|
|
|
@ -31,18 +30,6 @@ class Listjihe extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
chakanjiexibool=()=>{
|
|
|
|
|
if(this.state.chakanjiexibool===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
chakanjiexibool:false
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
chakanjiexibool:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//选用
|
|
|
|
|
Selectingpracticaltraining=(id)=>{
|
|
|
|
|
let data={
|
|
|
|
@ -61,18 +48,41 @@ class Listjihe extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {page,name,nd,chakanjiexibool}=this.state;
|
|
|
|
|
let {defaultActiveKey,items,listjihe}=this.props;
|
|
|
|
|
let {page,name,nd}=this.state;
|
|
|
|
|
let {defaultActiveKey,items,listjihe,chakanjiexiboolindex,keindex}=this.props;
|
|
|
|
|
|
|
|
|
|
// 编程答案
|
|
|
|
|
var rightkey=null
|
|
|
|
|
|
|
|
|
|
if(items){
|
|
|
|
|
if(items.item_type){
|
|
|
|
|
if(items.item_type==="PROGRAM"){
|
|
|
|
|
}else{
|
|
|
|
|
if(items.choices){
|
|
|
|
|
if(items.choices.length>0){
|
|
|
|
|
|
|
|
|
|
var arr= items.choices;
|
|
|
|
|
for(let data of arr) {
|
|
|
|
|
if(data.is_answer===true){
|
|
|
|
|
rightkey=data.choice_text;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////console.log("Listjihe");
|
|
|
|
|
////console.log(this.props);
|
|
|
|
|
return (
|
|
|
|
|
<div className={chakanjiexibool===true?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20"}>
|
|
|
|
|
<div className={chakanjiexiboolindex===keindex?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20"}>
|
|
|
|
|
{/*顶部*/}
|
|
|
|
|
<div className="w100s sortinxdirection">
|
|
|
|
|
<div className="listjihetixingstitsy">
|
|
|
|
|
{
|
|
|
|
|
this.props.listjihe+1
|
|
|
|
|
this.props.listjihe
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="listjihetixingstitsy">
|
|
|
|
@ -174,7 +184,7 @@ class Listjihe extends Component {
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.chakanjiexibool()}>
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.chakanjiexibool(keindex)}>
|
|
|
|
|
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
|
|
|
|
|
查看解析</p>
|
|
|
|
|
}
|
|
|
|
@ -184,13 +194,13 @@ class Listjihe extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
chakanjiexibool===true?<div>
|
|
|
|
|
chakanjiexiboolindex===keindex?<div>
|
|
|
|
|
<div className="w100s questiontypeheng mt23">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className=" sortinxdirection mt15 yldxtit" >
|
|
|
|
|
<p className=" testfondex yldxtit"
|
|
|
|
|
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+items.analysis).replace(/▁/g, "▁▁▁")}}
|
|
|
|
|
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+rightkey).replace(/▁/g, "▁▁▁")}}
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|