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