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

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

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

@ -62,7 +62,7 @@ class Listjihe extends Component {
render() { render() {
let {page,name,nd,chakanjiexibool}=this.state; let {page,name,nd,chakanjiexibool}=this.state;
let {defaultActiveKey,items}=this.props; let {defaultActiveKey,items,listjihe}=this.props;
////console.log("Listjihe"); ////console.log("Listjihe");
////console.log(this.props); ////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={chakanjiexibool===true?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20"}>
{/*顶部*/} {/*顶部*/}
<div className="w100s sortinxdirection"> <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>
<div className="w30s xaxisreverseorder"> <div className="listjihetixingstitsy">
<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>
<div className="ml10 w100s listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div> </div>
</div> </div>
{/*内容*/} {/*内容*/}
<div className="w100s sortinxdirection"> <div className="w100s sortinxdirection ">
{items.item_type==="JUDGMENT"?
<p className="w100s listjihetixingstits sortinxdirection "> <p className="w100s listjihetixingstits sortinxdirection ">
{ {
items.item_type==="JUDGMENT"? items === undefined ||items === null? "" : items.choices.map((object, index) => {
items === undefined ||items === null? "" : items.choices.map((object, index) => { return (
return ( <p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } > <Radio checked={object.is_answer}>
<Radio checked={object.is_answer}> {object.choice_text}
{object.choice_text} </Radio>
</Radio> </p>
</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>
)
})
} }
</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>
{/*更新时间*/} {/*更新时间*/}
<div className="w100s sortinxdirection mt22"> <div className="w100s sortinxdirection">
<div className="w50s listjihetixingstit sortinxdirection"> <div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p> <p className="updatetimes lh30">更新时间{items.update_time}</p>
{ {
@ -118,7 +134,7 @@ class Listjihe extends Component {
} }
{ {
items.item_type==="PROGRAM"? 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 className="w100s questiontypeheng mt23">
</div> </div>
<p className="analysis mt22">解析</p> <div className=" sortinxdirection mt15 yldxtit" >
<p className="mt15 testfondex" <p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items.analysis).replace(/▁/g, "▁▁▁")}} style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+items.analysis).replace(/▁/g, "▁▁▁")}}
> >
</p> </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>:"" </div>:""
} }

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

Loading…
Cancel
Save