|
|
|
@ -15,6 +15,11 @@ const tagArray = [
|
|
|
|
|
'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.',
|
|
|
|
|
'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.'
|
|
|
|
|
]
|
|
|
|
|
const tagArrays = [
|
|
|
|
|
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
|
|
|
|
|
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
|
|
|
|
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
|
|
|
|
|
]
|
|
|
|
|
class Listjihe extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
@ -32,10 +37,10 @@ class Listjihe extends Component {
|
|
|
|
|
|
|
|
|
|
//选用
|
|
|
|
|
Selectingpracticaltraining=(id)=>{
|
|
|
|
|
let data={
|
|
|
|
|
item_ids:[id]
|
|
|
|
|
}
|
|
|
|
|
this.props.getitem_baskets(data);
|
|
|
|
|
let data={
|
|
|
|
|
item_ids:[id]
|
|
|
|
|
}
|
|
|
|
|
this.props.getitem_baskets(data);
|
|
|
|
|
}
|
|
|
|
|
//撤销
|
|
|
|
|
Selectingpracticaltrainings=(id)=>{
|
|
|
|
@ -57,18 +62,36 @@ class Listjihe extends Component {
|
|
|
|
|
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;
|
|
|
|
|
if(items.item_type==="JUDGMENT") {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
if (items.choices) {
|
|
|
|
|
if (items.choices.length > 0) {
|
|
|
|
|
var arr = items.choices;
|
|
|
|
|
for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
if (arr[i].is_answer === true) {
|
|
|
|
|
rightkey = i;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -94,38 +117,38 @@ class Listjihe extends Component {
|
|
|
|
|
{/*内容*/}
|
|
|
|
|
<div className="w100s sortinxdirection ">
|
|
|
|
|
{items.item_type==="JUDGMENT"?
|
|
|
|
|
<p className="w100s listjihetixingstits sortinxdirection ">
|
|
|
|
|
{
|
|
|
|
|
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 className="w100s listjihetixingstits sortinxdirection ">
|
|
|
|
|
{
|
|
|
|
|
items === undefined ||items === null? "" : items.choices.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
|
|
|
|
|
<Radio disabled={false}>
|
|
|
|
|
{object.choice_text}
|
|
|
|
|
</Radio>
|
|
|
|
|
</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 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>
|
|
|
|
|
:
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
@ -137,18 +160,18 @@ class Listjihe extends Component {
|
|
|
|
|
{/*更新时间*/}
|
|
|
|
|
<div className="w100s sortinxdirection">
|
|
|
|
|
<div className="w50s listjihetixingstit sortinxdirection">
|
|
|
|
|
<p className="updatetimes lh30">更新时间:{items.update_time}</p>
|
|
|
|
|
<p className="updatetimes lh30">更新时间:{items.update_time}</p>
|
|
|
|
|
{
|
|
|
|
|
this.props.defaultActiveKey==="0"||this.props.defaultActiveKey===0?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<p className="updatetimes lh30 ml45">创建者:{items.author.name}</p>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
<p className="updatetimes lh30 ml45">编程语言:{items.program_attr.language}</p>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
<p className="updatetimes lh30 ml45">编程语言:{items.program_attr.language}</p>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
items.program_attr.status===0?
|
|
|
|
@ -164,22 +187,22 @@ class Listjihe extends Component {
|
|
|
|
|
<i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr10"></i>
|
|
|
|
|
<span>撤销</span></p>
|
|
|
|
|
:
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
items.program_attr.status===0?
|
|
|
|
|
<p className="selectionys jinzhixiaoshou" >
|
|
|
|
|
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
|
|
|
|
|
<span className="mr15 lh30">选用</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="selection xiaoshou" onClick={()=>this.Selectingpracticaltraining(items.id)}>
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
items.program_attr.status===0?
|
|
|
|
|
<p className="selectionys jinzhixiaoshou" >
|
|
|
|
|
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
|
|
|
|
|
<span className="mr15 lh30">选用</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="selection xiaoshou" onClick={()=>this.Selectingpracticaltraining(items.id)}>
|
|
|
|
|
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
|
|
|
|
|
<span className="mr15 lh30">选用</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p className="selection xiaoshou" onClick={()=>this.Selectingpracticaltraining(items.id)}>
|
|
|
|
|
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
|
|
|
|
|
<span className="mr15 lh30">选用</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="selection xiaoshou" onClick={()=>this.Selectingpracticaltraining(items.id)}>
|
|
|
|
|
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
|
|
|
|
|
<span className="mr15 lh30">选用</span>
|
|
|
|
|
</p>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
defaultActiveKey===0||defaultActiveKey==="0"?
|
|
|
|
@ -210,17 +233,17 @@ class Listjihe extends Component {
|
|
|
|
|
items.program_attr.status===0?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.showmodels(items.id)}>
|
|
|
|
|
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
|
|
|
|
|
<span>公开</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.showmodels(items.id)}>
|
|
|
|
|
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
|
|
|
|
|
<span>公开</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.showmodels(items.id)}>
|
|
|
|
|
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
|
|
|
|
|
<span>公开</span>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -228,7 +251,7 @@ class Listjihe extends Component {
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
items.item_type==="PROGRAM"?
|
|
|
|
|
""
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.chakanjiexibool(keindex)}>
|
|
|
|
|
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
|
|
|
|
@ -245,10 +268,20 @@ class Listjihe extends Component {
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className=" sortinxdirection mt15 yldxtit" >
|
|
|
|
|
<p className=" testfondex yldxtit"
|
|
|
|
|
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+rightkey).replace(/▁/g, "▁▁▁")}}
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
items.item_type==="SINGLE" || items.item_type==="MULTIPLE"?
|
|
|
|
|
<p className=" testfondex yldxtit"
|
|
|
|
|
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+tagArrays[rightkey]).replace(/▁/g, "▁▁▁")}}
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
:
|
|
|
|
|
<p className=" testfondex yldxtit"
|
|
|
|
|
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML("答案:"+rightkey).replace(/▁/g, "▁▁▁")}}
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
items&&items.analysis?
|
|
|
|
|