dev_jupyter
杨树林 5 years ago
parent 23e8134ac5
commit 75f7652d99

@ -17,6 +17,7 @@ import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
import Paperreview_single from './Paperreview_single';
import {DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
import Paperreview_multlple from './Paperreview_multlple';
import Paperreview_judgment from "./Paperreview_judgment";
import Paperreview_program from "./Paperreview_program";
@ -26,6 +27,15 @@ import ChoquesEditor from "./component/ChoquesEditor"
import JudquestionEditor from "./component/JudquestionEditor";
import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import Listjihe from "./component/Listjihe";
const reorder = (list, startIndex, endIndex) => {
const result = Array.from(list);
const [removed] = result.splice(startIndex, 1);
result.splice(endIndex, 0, removed);
return result;
};
class Paperreview_item extends Component {
constructor(props) {
super(props);
@ -64,13 +74,19 @@ class Paperreview_item extends Component {
}
onDragEnd=(result)=>{
console.log("拖拽成功了");
console.log(result);
}
render() {
let {questions,totalscore,total} = this.state;
let {single_questions,multiple_questions,judgement_questions,program_questions,all_score}=this.props;
return (
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
<div className="w100s mt20 mb20">
<div className="w100s mt20 mb20 backgroudwhites" style={{
position:"relative",
}}>
<div className="w100s sortinxdirection">
<p className="questionstishu">题数{this.props.all_score}</p>
<p className="ml58 questionstotal">总分{this.props.all_questions_count}</p>
@ -85,7 +101,9 @@ class Paperreview_item extends Component {
{/*单选题*/}
{
single_questions&&single_questions?
<div>
<div className="backgroudwhites" style={{
position: "relative",
}}>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
@ -95,13 +113,44 @@ class Paperreview_item extends Component {
<div className="scd">删除</div>
<div className="szdfd">设置得分</div>
</div>
<DragDropContext onDragEnd={this.onDragEnd} >
<Droppable droppableId={"0"}>
{(provided, snapshot) => (
<div
ref={provided.innerRef}
{...provided.droppableProps}
className={""}
onScroll={this.contentViewScrolledit}
>
{
single_questions&&single_questions.questions.map((object, index) => {
return (
<Draggable
key={object.id}
draggableId={object.id}
index={index}
className={""}
>
{(provided, snapshot) => (
<div
key={index}
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<Paperreview_single objectsingle={object}></Paperreview_single>
</div>
)}
</Draggable>
)
})
}
</div>
)}
</Droppable>
</DragDropContext>
{
single_questions&&single_questions.questions.map((object, index) => {
return (
<Paperreview_single objectsingle={object}></Paperreview_single>
)
})}
</div>
</div>
@ -112,9 +161,11 @@ class Paperreview_item extends Component {
{
multiple_questions&&multiple_questions?
<div>
<div className="w100s mt20 mb20 postitonrelati">
<div className="backgroudwhites" style={{
position: "relative",
}}>
<div className="h20 lh20"></div>
<div className="w100s mb20 postitonrelati">
<div className="w100s sortinxdirection">
<p className="yldxtit">{single_questions===null?"一":"二"}多选题</p> <p className="ml15 yldxtits">{multiple_questions&&multiple_questions.questions_count}{multiple_questions&&multiple_questions.questions_score}</p>
</div>
@ -125,7 +176,7 @@ class Paperreview_item extends Component {
{
multiple_questions&&multiple_questions.questions.map((object, index) => {
return (
<Paperreview_multlple objectsingle={object}></Paperreview_multlple>
<Paperreview_single objectsingle={object}></Paperreview_single>
)
})}
@ -137,7 +188,9 @@ class Paperreview_item extends Component {
{
judgement_questions&&judgement_questions?
<div>
<div className="backgroudwhites" style={{
position: "relative",
}}>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
@ -152,7 +205,7 @@ class Paperreview_item extends Component {
{
judgement_questions&&judgement_questions.questions.map((object, index) => {
return (
<Paperreview_judgment objectsingle={object}></Paperreview_judgment>
<Paperreview_single objectsingle={object}></Paperreview_single>
)
})}
@ -164,7 +217,9 @@ class Paperreview_item extends Component {
{
program_questions&&program_questions?
<div>
<div className="backgroudwhites" style={{
position: "relative",
}}>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
@ -186,7 +241,7 @@ class Paperreview_item extends Component {
{
program_questions&&program_questions.questions.map((object, index) => {
return (
<Paperreview_program objectsingle={object}></Paperreview_program>
<Paperreview_single objectsingle={object}></Paperreview_single>
)
})}

@ -61,7 +61,9 @@ class Paperreview_judgment extends Component {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
<div className="w100s borderwdswuh mt25 mb20 " style={{
minHeight: "114px",
}}>
{/*顶部*/}
@ -87,7 +89,7 @@ class Paperreview_judgment extends Component {
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* <p className="sortinxdirection " >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}

@ -61,7 +61,9 @@ class Paperreview_multlple extends Component {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
<div className="w100s borderwdswuh mt25 mb20 " style={{
minHeight: "114px",
}}>
{/*顶部*/}
@ -87,7 +89,7 @@ class Paperreview_multlple extends Component {
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* <p className="sortinxdirection " >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}

@ -61,7 +61,9 @@ class Paperreview_program extends Component {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
<div className="w100s borderwdswuh mt25 mb20 " style={{
minHeight: "114px",
}}>
{/*顶部*/}
@ -87,7 +89,7 @@ class Paperreview_program extends Component {
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* <p className="sortinxdirection " >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}

@ -67,11 +67,13 @@ class Paperreview_single extends Component {
let {objectsingle} =this.props;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 pd20">
<div className="w100s borderwdswuh mt25 mb20 pd20 " style={{
minHeight: "114px",
}}>
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className="w100s sortinxdirection ">
<div className=" sortinxdirection ">
<p className="cretitlecolrlis lh28">{objectsingle.id}</p><p className="cretitlecolrlisobj lh28">{objectsingle.score}</p>
</div>
@ -81,10 +83,14 @@ class Paperreview_single extends Component {
.markdown-body{
color: #333333;
font-size: 14px !important;
line-height: 28px;
}
.markdown-body p {
color: #333333;
font-size: 14px !important;
line-height: 28px;
}
`
}
@ -110,7 +116,7 @@ class Paperreview_single extends Component {
:
objectsingle === undefined ||objectsingle === null? "" : objectsingle.choices.map((object, index) => {
return (
<p className="sortinxdirection ml10" >
<p className="sortinxdirection " >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>

@ -95,7 +95,7 @@ class Listjihe extends Component {
:
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className="sortinxdirection ml10" >
<p className="sortinxdirection " >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>

@ -717,6 +717,17 @@
}
.lh28{
height: 28px;
line-height: 28px;
}
.h20{
height: 20px;
background-color: #fff;
}
.lh20{
line-height: 20px;
background-color: #fff;
}
.backgroudwhites{
background-color: #fff;
}

Loading…
Cancel
Save