Merge remote-tracking branch 'origin/dev_new_shixunsrepository' into dev_new_shixunsrepository

dev_new_shixunsrepository
杨树明 5 years ago
commit 44c90c299d

@ -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);
@ -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;
}
}
}
}
}
}
}
@ -99,7 +122,7 @@ class Listjihe extends Component {
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<Radio checked={object.is_answer}>
<Radio disabled={false}>
{object.choice_text}
</Radio>
</p>
@ -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?

Loading…
Cancel
Save