|
|
@ -18,15 +18,10 @@ import './questioncss/questioncom.css';
|
|
|
|
import '../tpm/newshixuns/css/Newshixuns.css';
|
|
|
|
import '../tpm/newshixuns/css/Newshixuns.css';
|
|
|
|
import Paperreview_single from './Paperreview_single';
|
|
|
|
import Paperreview_single from './Paperreview_single';
|
|
|
|
import {DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
|
|
|
|
import {DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
|
|
|
|
import Paperreview_multlple from './Paperreview_multlple';
|
|
|
|
import PaperDeletModel from './component/PaperDeletModel';
|
|
|
|
import Paperreview_judgment from "./Paperreview_judgment";
|
|
|
|
import PaperDeletModels from './component/PaperDeletModels';
|
|
|
|
import Paperreview_program from "./Paperreview_program";
|
|
|
|
import Paperreview_itemModel from './component/Paperreview_itemModel';
|
|
|
|
import Choicequestion from './component/Choicequestion';
|
|
|
|
|
|
|
|
import SingleEditor from "./component/SingleEditor";
|
|
|
|
|
|
|
|
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 reorder = (list, startIndex, endIndex) => {
|
|
|
|
const result = Array.from(list);
|
|
|
|
const result = Array.from(list);
|
|
|
@ -44,7 +39,11 @@ class Paperreview_item extends Component {
|
|
|
|
questions:0,
|
|
|
|
questions:0,
|
|
|
|
totalscore:0,
|
|
|
|
totalscore:0,
|
|
|
|
total:0,
|
|
|
|
total:0,
|
|
|
|
|
|
|
|
modalsTypedel:false,
|
|
|
|
|
|
|
|
modalsTypey:false,
|
|
|
|
|
|
|
|
modalsTypedels:false,
|
|
|
|
|
|
|
|
titilesm:"",
|
|
|
|
|
|
|
|
titilesms:"",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -154,11 +153,109 @@ class Paperreview_item extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Singlemagazine=(name,bool)=>{
|
|
|
|
|
|
|
|
if(bool===true){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypey:true,
|
|
|
|
|
|
|
|
titilesm:name
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypey:false,
|
|
|
|
|
|
|
|
titilesm:""
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setDownloady=(fenshu)=>{
|
|
|
|
|
|
|
|
const url ="/item_baskets/batch_set_score.json";
|
|
|
|
|
|
|
|
var data ={
|
|
|
|
|
|
|
|
score:fenshu,
|
|
|
|
|
|
|
|
item_type:this.state.titilesm==="单选题"?"SINGLE":this.state.titilesm==="多选题"?"MULTIPLE":this.state.titilesm==="判断题"?"JUDGMENT":this.state.titilesm==="编程题"?"PROGRAM":'',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
|
|
|
.then((result) => {
|
|
|
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
|
|
|
this.props.showNotification(`调分成功`);
|
|
|
|
|
|
|
|
this.props.getdata({});
|
|
|
|
|
|
|
|
this.Singlemagazine("",false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setmodalsTypedel=(bool,type,names)=>{
|
|
|
|
|
|
|
|
if(type===1){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypedel:bool,
|
|
|
|
|
|
|
|
titilesms:names
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypedel:bool,
|
|
|
|
|
|
|
|
modalsTypedels:true,
|
|
|
|
|
|
|
|
titilesms:names
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setmodalsTypedels=(bool,type)=>{
|
|
|
|
|
|
|
|
if(type===1){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypedels:bool,
|
|
|
|
|
|
|
|
titilesms:""
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
//确定
|
|
|
|
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
|
|
|
|
item_type:this.state.titilesms
|
|
|
|
|
|
|
|
}})
|
|
|
|
|
|
|
|
.then((response) => {
|
|
|
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
|
|
|
this.props.showNotification('删除成功');
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
titilesms:""
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
|
|
|
//console.log(error);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypedels:bool,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let {questions,totalscore,total} = this.state;
|
|
|
|
let {questions,totalscore,total,modalsTypedel,modalsTypey,modalsTypedels} = this.state;
|
|
|
|
let {single_questions,multiple_questions,judgement_questions,program_questions,all_score}=this.props;
|
|
|
|
let {single_questions,multiple_questions,judgement_questions,program_questions,all_score}=this.props;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
modalsTypedel===true?
|
|
|
|
|
|
|
|
<PaperDeletModel {...this.state} {...this.props} setmodalsTypedel={(bool,type,name)=>this.setmodalsTypedel(bool,type,name)}></PaperDeletModel>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
modalsTypey===true?
|
|
|
|
|
|
|
|
<Paperreview_itemModel {...this.state} {...this.props} setDownloady={(fs)=>this.setDownloady(fs)} Singlemagazine={(name,bool)=>this.Singlemagazine(name,bool)}></Paperreview_itemModel>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
modalsTypedels===true?
|
|
|
|
|
|
|
|
<PaperDeletModels {...this.state} {...this.props} setmodalsTypedels={(bool,type)=>this.setmodalsTypedels(bool,type)}></PaperDeletModels>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
<div className="w100s mt20 mb20 backgroudwhites" style={{
|
|
|
|
<div className="w100s mt20 mb20 backgroudwhites" style={{
|
|
|
|
position:"relative",
|
|
|
|
position:"relative",
|
|
|
|
}}>
|
|
|
|
}}>
|
|
|
@ -185,8 +282,8 @@ class Paperreview_item extends Component {
|
|
|
|
<p className="yldxtit">一、单选题</p> <p className="ml15 yldxtits">(共{single_questions&&single_questions.questions_count}题;共{single_questions&&single_questions.questions_score}分)</p>
|
|
|
|
<p className="yldxtit">一、单选题</p> <p className="ml15 yldxtits">(共{single_questions&&single_questions.questions_count}题;共{single_questions&&single_questions.questions_score}分)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="scd xiaoshou">删除</div>
|
|
|
|
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"SINGLE")}>删除</div>
|
|
|
|
<div className="szdfd xiaoshou" >设置得分</div>
|
|
|
|
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("单选题",true)} >设置得分</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<DragDropContext onDragEnd={this.onDragEnd} >
|
|
|
|
<DragDropContext onDragEnd={this.onDragEnd} >
|
|
|
|
<Droppable droppableId={"0"}>
|
|
|
|
<Droppable droppableId={"0"}>
|
|
|
@ -245,8 +342,8 @@ class Paperreview_item extends Component {
|
|
|
|
<p className="yldxtit">{single_questions===null?"一":"二"}、多选题</p> <p className="ml15 yldxtits">(共{multiple_questions&&multiple_questions.questions_count}题;共{multiple_questions&&multiple_questions.questions_score}分)</p>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="scd xiaoshou">删除</div>
|
|
|
|
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"MULTIPLE")}>删除</div>
|
|
|
|
<div className="szdfd xiaoshou">设置得分</div>
|
|
|
|
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("多选题",true)}>设置得分</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<DragDropContext onDragEnd={this.onDragEnds} >
|
|
|
|
<DragDropContext onDragEnd={this.onDragEnds} >
|
|
|
@ -307,8 +404,8 @@ class Paperreview_item extends Component {
|
|
|
|
:"三"}、判断题</p> <p className="ml15 yldxtits">(共{judgement_questions&&judgement_questions.questions_count}题;共{judgement_questions&&judgement_questions.questions_score}分)</p>
|
|
|
|
:"三"}、判断题</p> <p className="ml15 yldxtits">(共{judgement_questions&&judgement_questions.questions_count}题;共{judgement_questions&&judgement_questions.questions_score}分)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="scd xiaoshou">删除</div>
|
|
|
|
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"JUDGMENT")}>删除</div>
|
|
|
|
<div className="szdfd xiaoshou">设置得分</div>
|
|
|
|
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("判断题",true)}>设置得分</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<DragDropContext onDragEnd={this.onDragEndss} >
|
|
|
|
<DragDropContext onDragEnd={this.onDragEndss} >
|
|
|
@ -374,8 +471,8 @@ class Paperreview_item extends Component {
|
|
|
|
、编程题</p> <p className="ml15 yldxtits">(共{program_questions&&program_questions.questions_count}题;共{program_questions&&program_questions.questions_score}分)</p>
|
|
|
|
、编程题</p> <p className="ml15 yldxtits">(共{program_questions&&program_questions.questions_count}题;共{program_questions&&program_questions.questions_score}分)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="postitonrelatis xaxisreverseorder">
|
|
|
|
<div className="scd xiaoshou">删除</div>
|
|
|
|
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"PROGRAM")}>删除</div>
|
|
|
|
<div className="szdfd xiaoshou">设置得分</div>
|
|
|
|
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("编程题",true)}>设置得分</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<DragDropContext onDragEnd={this.onDragEndsss} >
|
|
|
|
<DragDropContext onDragEnd={this.onDragEndsss} >
|
|
|
|
<Droppable droppableId={"0"}>
|
|
|
|
<Droppable droppableId={"0"}>
|
|
|
|