diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 1fe9653f6..ab3722d8f 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -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 (
-
+

题数:{this.props.all_score}

总分:{this.props.all_questions_count}

@@ -85,7 +101,9 @@ class Paperreview_item extends Component { {/*单选题*/} { single_questions&&single_questions? -
+
@@ -95,13 +113,44 @@ class Paperreview_item extends Component {
删除
设置得分
+ + + {(provided, snapshot) => ( +
+ { + single_questions&&single_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ +
+ )} +
+ ) + }) + + } +
+ )} +
+
- { - single_questions&&single_questions.questions.map((object, index) => { - return ( - - ) - })}
@@ -112,9 +161,11 @@ class Paperreview_item extends Component { { multiple_questions&&multiple_questions? -
- -
+
+
+

{single_questions===null?"一":"二"}、多选题

(共{multiple_questions&&multiple_questions.questions_count}题;共{multiple_questions&&multiple_questions.questions_score}分)

@@ -125,7 +176,7 @@ class Paperreview_item extends Component { { multiple_questions&&multiple_questions.questions.map((object, index) => { return ( - + ) })} @@ -137,7 +188,9 @@ class Paperreview_item extends Component { { judgement_questions&&judgement_questions? -
+
@@ -152,7 +205,7 @@ class Paperreview_item extends Component { { judgement_questions&&judgement_questions.questions.map((object, index) => { return ( - + ) })} @@ -164,7 +217,9 @@ class Paperreview_item extends Component { { program_questions&&program_questions? -
+
@@ -186,7 +241,7 @@ class Paperreview_item extends Component { { program_questions&&program_questions.questions.map((object, index) => { return ( - + ) })} diff --git a/public/react/src/modules/question/Paperreview_judgment.js b/public/react/src/modules/question/Paperreview_judgment.js index 6a8155f2a..7e5b884be 100644 --- a/public/react/src/modules/question/Paperreview_judgment.js +++ b/public/react/src/modules/question/Paperreview_judgment.js @@ -61,7 +61,9 @@ class Paperreview_judgment extends Component { let {questions,totalscore,total,items} = this.state; // //console.log(params); return ( -
+
{/*顶部*/} @@ -87,7 +89,7 @@ class Paperreview_judgment extends Component { {/* :*/} {/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/} {/* return (*/} - {/*

*/} + {/*

*/} {/* {tagArray[index]}*/} {/*

*/} {/*

*/} diff --git a/public/react/src/modules/question/Paperreview_multlple.js b/public/react/src/modules/question/Paperreview_multlple.js index 74f100f71..9535e35c6 100644 --- a/public/react/src/modules/question/Paperreview_multlple.js +++ b/public/react/src/modules/question/Paperreview_multlple.js @@ -61,7 +61,9 @@ class Paperreview_multlple extends Component { let {questions,totalscore,total,items} = this.state; // //console.log(params); return ( -
+
{/*顶部*/} @@ -87,7 +89,7 @@ class Paperreview_multlple extends Component { {/* :*/} {/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/} {/* return (*/} - {/*

*/} + {/*

*/} {/* {tagArray[index]}*/} {/*

*/} {/*

*/} diff --git a/public/react/src/modules/question/Paperreview_program.js b/public/react/src/modules/question/Paperreview_program.js index c8f847dbe..f897915d8 100644 --- a/public/react/src/modules/question/Paperreview_program.js +++ b/public/react/src/modules/question/Paperreview_program.js @@ -61,7 +61,9 @@ class Paperreview_program extends Component { let {questions,totalscore,total,items} = this.state; // //console.log(params); return ( -
+
{/*顶部*/} @@ -87,7 +89,7 @@ class Paperreview_program extends Component { {/* :*/} {/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/} {/* return (*/} - {/*

*/} + {/*

*/} {/* {tagArray[index]}*/} {/*

*/} {/*

*/} diff --git a/public/react/src/modules/question/Paperreview_single.js b/public/react/src/modules/question/Paperreview_single.js index 83955cb94..d7c0304de 100644 --- a/public/react/src/modules/question/Paperreview_single.js +++ b/public/react/src/modules/question/Paperreview_single.js @@ -67,11 +67,13 @@ class Paperreview_single extends Component { let {objectsingle} =this.props; // //console.log(params); return ( -
+
{/*顶部*/} -
+

{objectsingle.id}

({objectsingle.score}分)

@@ -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 ( -

+

{tagArray[index]}

diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index c8c518f8c..17a32fd41 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -95,7 +95,7 @@ class Listjihe extends Component { : items === undefined ||items === null? "" : items.choices.map((object, index) => { return ( -

+

{tagArray[index]}

diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index 9eeaf832f..f0964780a 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -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; +}