|
|
|
@ -1,8 +1,14 @@
|
|
|
|
|
import React, {Component} from "react";
|
|
|
|
|
import {WordsBtn} from 'educoder';
|
|
|
|
|
import {WordsBtn, MarkdownToHtml} from 'educoder';
|
|
|
|
|
import {Table,Progress} from "antd";
|
|
|
|
|
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
const tagArray = [
|
|
|
|
|
'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 Exercisetablesmubus extends Component {
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -19,12 +25,17 @@ class Exercisetablesmubus extends Component {
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let {data,type,effictive_counts,choicetype}=this.props;
|
|
|
|
|
let {data,type,effictive_counts,choicetype, tableNum}=this.props;
|
|
|
|
|
let datas=[];
|
|
|
|
|
|
|
|
|
|
data&&data.forEach((item,key)=>{
|
|
|
|
|
datas.push({
|
|
|
|
|
commit_percent:{num:item.choice_position,value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,type:item.choice_right_boolean},
|
|
|
|
|
commit_percent:{
|
|
|
|
|
num:item.choice_position,
|
|
|
|
|
value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,
|
|
|
|
|
type:item.choice_right_boolean,
|
|
|
|
|
_type: type
|
|
|
|
|
},
|
|
|
|
|
min_score:{value:item.choice_users_count,type:item.choice_right_boolean},
|
|
|
|
|
max_score:item.choice_percent,
|
|
|
|
|
})
|
|
|
|
@ -40,13 +51,23 @@ class Exercisetablesmubus extends Component {
|
|
|
|
|
title: '选项',
|
|
|
|
|
dataIndex: 'commit_percent',
|
|
|
|
|
key: 'commit_percent',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{color:text.type===true? "#29BD8B":'#333333'}}>
|
|
|
|
|
{text.value!="有效填写量"&&text.value!="wrong"?text.value:false}
|
|
|
|
|
{text.value==="wrong"?"填写了错误答案":false}
|
|
|
|
|
{text.value==="有效填写量"?"有效填写量":false}
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
render: (text, record, index) => {
|
|
|
|
|
const _content = <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
|
|
|
|
|
{text.value!="有效填写量"&&text.value!="wrong" &&
|
|
|
|
|
<MarkdownToHtml content={text.value} selector={(tableNum+1) + '' + (index+1)}></MarkdownToHtml>
|
|
|
|
|
}
|
|
|
|
|
{text.value==="wrong" && "填写了错误答案" }
|
|
|
|
|
{text.value==="有效填写量" && "有效填写量" }
|
|
|
|
|
</span>
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
(text._type === 0 || text._type === 1) ? <div style={{ display: 'flex'}}>
|
|
|
|
|
{<span style={{ 'margin-right': '4px', 'margin-top': '-2px'}}>{tagArray[index]}.</span>}
|
|
|
|
|
{_content}
|
|
|
|
|
</div> : <React.Fragment>{_content}</React.Fragment>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}, {
|
|
|
|
|
title: '小计',
|
|
|
|
|
dataIndex: 'min_score',
|
|
|
|
|