合并题库

dev_new_shixunsrepository
杨树林 5 years ago
commit 15246a407c

@ -426,8 +426,8 @@ class Paperreview_item extends Component {
}}> }}>
<div className="w100s sortinxdirection"> <div className="w100s sortinxdirection">
<div className="w70s sortinxdirection"> <div className="w70s sortinxdirection">
<p className="questionstishu lh34">题数{this.props.all_score}</p> <p className="questionstishu lh34">题数{this.props.all_questions_count}</p>
<p className="ml58 questionstotal lh34">总分{this.props.all_questions_count}</p> <p className="ml58 questionstotal lh34">总分{this.props.all_score}</p>
</div> </div>
<div className="w30s xaxisreverseorder"> <div className="w30s xaxisreverseorder">
<div className="jixuxuanti xiaoshou" onClick={() => this.props.setnewmyshixunmodelbool(true)}> <div className="jixuxuanti xiaoshou" onClick={() => this.props.setnewmyshixunmodelbool(true)}>

@ -59,8 +59,8 @@ class Paperreview_items extends Component {
let {paperreviewsingleindex,paperreviewsinglename,typenames,indexs,object,typenamesn}=this.props; let {paperreviewsingleindex,paperreviewsinglename,typenames,indexs,object,typenamesn}=this.props;
// console.log(object); // console.log(object);
console.log("Paperreview_items"); // console.log("Paperreview_items");
console.log(object.item_id); // console.log(object.item_id);
return ( return (
<div> <div>
{ {

@ -17,6 +17,7 @@ import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData'; import NoneData from './component/NoneData';
import './questioncss/questioncom.css'; import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css'; import '../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../common/quillForEditor";
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -69,13 +70,42 @@ class Paperreview_single extends Component {
render() { render() {
let {questions, totalscore, total, items} = this.state; let {questions, totalscore, total, items} = this.state;
let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props; let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
var itemssname="";
try {
itemssname= JSON.parse(objectsingle.name);
}catch (e) {
}
if(itemssname===undefined){
itemssname=objectsingle.name
}
return ( return (
<div key={indexxy} <div key={indexxy}
className={ "w100s borderwdswuh mb20 pd20 "} className={ "w100s borderwdswuh mb20 pd20 "}
onMouseEnter={() => this.props.showparagraphs(indexxy,name)} style={{ onMouseEnter={() => this.props.showparagraphs(indexxy,name)} style={{
minHeight: "114px", minHeight: "114px",
}}> }}>
<style>{
`
.programquill .ql-editor{
padding: 0px;
}
.programquill .ql-editor p{
line-height: 28px;
}
.programquills .ql-editor{
padding: 0px;
}
.programquills .ql-editor p{
line-height: 20px;
}
`
}</style>
{/*顶部*/} {/*顶部*/}
<div className="w100s sortinxdirection "> <div className="w100s sortinxdirection ">
<div className=" sortinxdirection "> <div className=" sortinxdirection ">
@ -99,9 +129,35 @@ class Paperreview_single extends Component {
` `
} }
</style> </style>
<div className=" lh28 listjihetixingstit markdown-body cretitlecolrlist" style={{wordBreak: "break-word"}} {
dangerouslySetInnerHTML={{__html: markdownToHTML(`${objectsingle.score}分) ` + objectsingle.name).replace(/▁/g, "▁▁▁")}}> objectsingle.item_type==="PROGRAM"?
</div> <div className="w100s sortinxdirection">
<div className=" tites lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word"}}
>
({objectsingle.score})
</div>
<div className="ml10 lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
:
<div className="w100s sortinxdirection">
<div className="tites lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word"}}
>
({objectsingle.score})
</div>
<div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{wordBreak: "break-word"}}
>
<QuillForEditor
readOnly={true}
value={itemssname}
/>
</div>
</div>
}
</div> </div>
{/*内容*/} {/*内容*/}
<div className="w100s sortinxdirection"> <div className="w100s sortinxdirection">
@ -114,7 +170,7 @@ class Paperreview_single extends Component {
objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => {
return ( return (
<p className={index === 1 ? "sortinxdirection ml10" : "sortinxdirection "}> <p className={index === 1 ? "sortinxdirection ml10" : "sortinxdirection "}>
<Radio checked={object.is_answer}> <Radio disabled={false}>
{object.choice_text} {object.choice_text}
</Radio> </Radio>
</p> </p>
@ -126,8 +182,17 @@ class Paperreview_single extends Component {
objectsingle.item_type === "PROGRAM" ? objectsingle.item_type === "PROGRAM" ?
<p className="w100s listjihetixingstitssy sortinxdirection "> <p className="w100s listjihetixingstitssy sortinxdirection ">
<p className={"sortinxdirection mt15"}> <p className={"sortinxdirection mt15"}>
<p style={{wordBreak: "break-word"}} {
dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle.program_attr.description).replace(/▁/g, "▁▁▁")}}></p> objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description?
<p className="programquill" style={{wordBreak: "break-word"}}
>
<QuillForEditor
readOnly={true}
value={JSON.parse(objectsingle.program_attr.description)}
/>
</p>
:
""}
</p> </p>
</p> </p>
: :
@ -137,8 +202,21 @@ class Paperreview_single extends Component {
return ( return (
<p className={index === 0 ? "sortinxdirection" : "sortinxdirection mt15"}> <p className={index === 0 ? "sortinxdirection" : "sortinxdirection mt15"}>
{tagArray[index]} {tagArray[index]}
<p style={{wordBreak: "break-word"}} <p className="programquills" style={{wordBreak: "break-word"}}>
dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p> {object ?
object.choice_text === undefined || object.choice_text=== null || object.choice_text === "" ?
""
:
object.choice_text.length>0?
<QuillForEditor
readOnly={true}
value={JSON.parse(object.choice_text)}
/>
:""
:
""
}
</p>
</p> </p>
) )
}) })

@ -234,9 +234,15 @@ class ChoquesEditor extends Component{
// 处理编辑器内容为空 // 处理编辑器内容为空
texts=""; texts="";
} else { } else {
// 提交到后台的内容需要处理一下; if(_text.length>=101){
value = JSON.stringify(value) var result = _text.substring(0,100);
texts=value; texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
// 提交到后台的内容需要处理一下;
value = JSON.stringify(value);
texts=value;
}
} }
let question_choices = this.state.question_choices.slice(0); let question_choices = this.state.question_choices.slice(0);
question_choices[index] = texts; question_choices[index] = texts;
@ -270,9 +276,17 @@ class ChoquesEditor extends Component{
}) })
} else { } else {
// 提交到后台的内容需要处理一下; // 提交到后台的内容需要处理一下;
value = JSON.stringify(value) var texts="";
if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value = JSON.stringify(value)
texts=value;
}
this.setState({ this.setState({
question_titleysl:value question_titleysl:texts
}) })
} }
} }
@ -286,9 +300,17 @@ class ChoquesEditor extends Component{
}) })
} else { } else {
// 提交到后台的内容需要处理一下; // 提交到后台的内容需要处理一下;
value = JSON.stringify(value) var texts="";
if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value = JSON.stringify(value)
texts=value;
}
this.setState({ this.setState({
question_titlesysl:value question_titleysl:texts
}) })
} }
} }

@ -288,9 +288,17 @@ class JudquestionEditor extends Component{
}) })
} else { } else {
// 提交到后台的内容需要处理一下; // 提交到后台的内容需要处理一下;
value = JSON.stringify(value) var texts="";
if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value = JSON.stringify(value)
texts=value;
}
this.setState({ this.setState({
question_titleysl:value question_titleysl:texts
}) })
} }
} }
@ -304,9 +312,17 @@ class JudquestionEditor extends Component{
}) })
} else { } else {
// 提交到后台的内容需要处理一下; // 提交到后台的内容需要处理一下;
value = JSON.stringify(value) var texts="";
if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value =JSON.stringify(value);
texts=value;
}
this.setState({ this.setState({
question_titlesysl:value question_titleysl:texts
}) })
} }
} }

@ -255,13 +255,18 @@ class SingleEditor extends Component{
// 处理编辑器内容为空 // 处理编辑器内容为空
texts=""; texts="";
} else { } else {
// 提交到后台的内容需要处理一下; if(_text.length>=101){
value = JSON.stringify(value) var result = _text.substring(0,100);
texts=value; texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
// 提交到后台的内容需要处理一下;
value = JSON.stringify(value)
texts=value;
}
} }
let question_choices = this.state.question_choices.slice(0); let question_choices = this.state.question_choices.slice(0);
question_choices[index] = texts; question_choices[index] = texts;
console.log(question_choices);
this.setState({ question_choices }); this.setState({ question_choices });
} }
on_question_score_change = (e) => { on_question_score_change = (e) => {
@ -290,9 +295,17 @@ class SingleEditor extends Component{
}) })
} else { } else {
// 提交到后台的内容需要处理一下; // 提交到后台的内容需要处理一下;
value = JSON.stringify(value) var texts="";
if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value = JSON.stringify(value)
texts=value;
}
this.setState({ this.setState({
question_titleysl:value question_titleysl:texts
}) })
} }
} }
@ -305,10 +318,17 @@ class SingleEditor extends Component{
question_titlesysl:"" question_titlesysl:""
}) })
} else { } else {
// 提交到后台的内容需要处理一下; var texts="";
value = JSON.stringify(value) if(_text.length>=101){
var result = _text.substring(0,100);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
value = JSON.stringify(value)
texts=value;
}
this.setState({ this.setState({
question_titlesysl:value question_titleysl:texts
}) })
} }
} }

@ -948,3 +948,6 @@
.lh26{ .lh26{
line-height: 26px !important; line-height: 26px !important;
} }
.tites{
color: #888888 !important;
}

@ -258,17 +258,24 @@ class Paperlibraryeditid extends Component {
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19"> <div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
<style>
{
`
.seeoagertitscss .jixuxuanti{
background:#4CACFF;
}
`
}
</style>
<div className={"seeoagertitscss"}>
<Seeoagertits <Seeoagertits
setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}
all_score={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_questions_count} all_score={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_questions_count}
all_questions_count={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_score} all_questions_count={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_score}
difficulty={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.difficulty} difficulty={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.difficulty}
> >
</Seeoagertits> </Seeoagertits>
</div>
<Paperlibraryseeid_itemss <Paperlibraryseeid_itemss
{...this.state} {...this.state}
{...this.props} {...this.props}

@ -948,6 +948,13 @@ submittojoinclass=(value)=>{
return ( return (
<div className="newHeaders" id="nHeader" > <div className="newHeaders" id="nHeader" >
<style>{
`
body .questionbanks .ant-popover-inner-content {
padding:0px !important;
}
`
}</style>
{isRender===true?<LoginDialog {isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()} Modifyloginvalue={()=>this.Modifyloginvalue()}
@ -1036,6 +1043,7 @@ submittojoinclass=(value)=>{
.questionbanks .ant-popover-inner-content { .questionbanks .ant-popover-inner-content {
padding:0px !important; padding:0px !important;
} }
` `
} }
</style> </style>

Loading…
Cancel
Save