|
|
|
@ -224,6 +224,10 @@ class SingleEditor extends Component{
|
|
|
|
|
// [true, false, true] -> [0, 2]
|
|
|
|
|
|
|
|
|
|
const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1);
|
|
|
|
|
console.log("xuanzheshijuan");
|
|
|
|
|
console.log(answerTagArray);
|
|
|
|
|
console.log(!exerciseIsPublish);
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="padding20-30 bor-bottom-greyE signleEditor" id={qNumber}>
|
|
|
|
|
<style>{`
|
|
|
|
@ -293,16 +297,22 @@ class SingleEditor extends Component{
|
|
|
|
|
|
|
|
|
|
<div className="mb20">
|
|
|
|
|
{/* {!exerciseIsPublish && <ActionBtn style="grey" className="middle mr20" onClick={this.addOption}>新增选项</ActionBtn>} */}
|
|
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
style={{color: '#FF6800'}}>{!exerciseIsPublish ? '温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题' : ' '}</span>
|
|
|
|
|
{answerTagArray && !!answerTagArray.length ? "" :
|
|
|
|
|
<span
|
|
|
|
|
style={{color: '#FF6800'}}>{'温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题'}</span>
|
|
|
|
|
}
|
|
|
|
|
{ answerTagArray && !!answerTagArray.length ?
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div style={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "row-reverse"
|
|
|
|
|
}}>
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<span className="fr color-orange">{answerTagArray.join(' ')}</span>
|
|
|
|
|
<span className="fr">标准答案:</span>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
|
<span className="fl color-orange">温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题</span>
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|