dev_jupyter
杨树林 5 years ago
parent b522a2f527
commit 15b77e667f

@ -171,6 +171,7 @@ class Question extends Component {
defaultActiveKey: key,
selectallquestionsonthispages:false,
difficulty:null,
page:1
})
var data = {
discipline_id:this.state.discipline_id,

@ -202,7 +202,9 @@ class Contentpart extends Component {
: this.props.Contentdata.items.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props} items={object}
<Listjihe {...this.state} {...this.props}
listjihe={index}
items={object}
key={index}
getitem_basketss={(id)=>this.props.getitem_basketss(id)}
getitem_baskets={(e)=>this.props.getitem_baskets(e)}

@ -62,7 +62,7 @@ class Listjihe extends Component {
render() {
let {page,name,nd,chakanjiexibool}=this.state;
let {defaultActiveKey,items}=this.props;
let {defaultActiveKey,items,listjihe}=this.props;
////console.log("Listjihe");
////console.log(this.props);
@ -70,44 +70,60 @@ class Listjihe extends Component {
<div className={chakanjiexibool===true?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20"}>
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className="w70s listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
<div className="listjihetixingstitsy">
{
this.props.listjihe+1
}
</div>
<div className="w30s xaxisreverseorder">
<p className="listjihetixing">难度<span className="listjihetixings">{items.difficulty===1?"简单":items.difficulty===2?"适中":items.difficulty===3?"困难":""}</span></p>
<p className="mr30 listjihetixing">题型<span className="listjihetixings">{items.item_type==="SINGLE"?"单选题":items.item_type==="MULTIPLE"?"多选题":items.item_type==="JUDGMENT"?"判断题":items.item_type==="PROGRAM"?"编程题":""}</span></p>
<div className="listjihetixingstitsy">
.
</div>
<div className="ml10 w100s listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
<div className="w100s sortinxdirection">
<div className="w100s sortinxdirection ">
{items.item_type==="JUDGMENT"?
<p className="w100s listjihetixingstits sortinxdirection ">
{
items.item_type==="JUDGMENT"?
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<Radio checked={object.is_answer}>
{object.choice_text}
</Radio>
</p>
)
})
:
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className="sortinxdirection " >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>
)
})
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<Radio checked={object.is_answer}>
{object.choice_text}
</Radio>
</p>
)
})
}
</p>
</p>:
items.item_type==="PROGRAM"?
<p className="w100s listjihetixingstitssy sortinxdirection ">
<p className={"sortinxdirection mt15"} >
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items.program_attr.description).replace(/▁/g, "▁▁▁")}}></p>
</p>
</p>
:
<p className="w100s listjihetixingstits verticallayout ">
{
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className={index===0?"sortinxdirection":"sortinxdirection mt15"} >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>
)
})
}
</p>
}
</div>
<div className="w100s sortinxdirection mt10">
<p className="listjihetixing">难度<span >{items.difficulty===1?"简单":items.difficulty===2?"适中":items.difficulty===3?"困难":""}</span></p>
<p className="ml30 listjihetixing">题型<span >{items.item_type==="SINGLE"?"单选题":items.item_type==="MULTIPLE"?"多选题":items.item_type==="JUDGMENT"?"判断题":items.item_type==="PROGRAM"?"编程题":""}</span></p>
</div>
{/*更新时间*/}
<div className="w100s sortinxdirection mt22">
<div className="w100s sortinxdirection">
<div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p>
{
@ -118,7 +134,7 @@ class Listjihe extends Component {
}
{
items.item_type==="PROGRAM"?
<p className="updatetimes lh30 ml45">编程语言null</p>
<p className="updatetimes lh30 ml45">编程语言{items.program_attr.language}</p>
:""
}
@ -172,12 +188,18 @@ class Listjihe extends Component {
<div className="w100s questiontypeheng mt23">
</div>
<p className="analysis mt22">解析</p>
<p className="mt15 testfondex"
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items.analysis).replace(/▁/g, "▁▁▁")}}
>
</p>
<div className=" sortinxdirection mt15 yldxtit" >
<p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+items.analysis).replace(/▁/g, "▁▁▁")}}
>
</p>
</div>
<div className=" sortinxdirection mt15 yldxtit" >
<p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("解析:"+items.analysis).replace(/▁/g, "▁▁▁")}}
>
</p>
</div>
</div>:""
}

@ -292,9 +292,10 @@
/*listjihe*/
.listjihetixing{
color: #888888;
font-size: 12px;
line-height: 17px;
height:17px;
font-size:12px;
color:#888888;
line-height:17px;
}
.listjihetixings{
@ -308,12 +309,24 @@
line-height: 17px;
}
.listjihetixingstitsy {
color: #333333;
font-size: 14px;
line-height: 25px;
}
.listjihetixingstits{
color: #333333;
font-size: 14px;
line-height:19px;
margin-top: 19px;
}
.listjihetixingstitssy{
color: #333333;
font-size: 14px;
line-height:19px;
}
.updatetimes{
color: #BBBBBB;
@ -655,7 +668,7 @@
}
.yldxtit{
color: #333333;
color: #333333 !important;
font-size: 14px;
}
@ -741,3 +754,6 @@
.lh35{
line-height: 35px;
}
.mt7{
margin-top: 7px;
}

Loading…
Cancel
Save