From 3c989da8990fee89f3f76fa06242d2d4391f68b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 5 Jan 2020 20:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E7=BC=96=E8=BE=91=E8=AF=95?= =?UTF-8?q?=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/Questionitem_banks.js | 1 - .../question/component/Itembankstop.js | 74 +- .../component/Paperreview_itemModel.js | 3 +- .../comthetestpaper/Comthetestpaperst.js | 97 ++- .../modules/testpaper/Paperlibraryeditid.js | 71 +- .../component/Paperlibraryseeid_item.js | 70 -- .../component/Paperlibraryseeid_items.js | 8 +- .../component/Paperlibraryseeid_itemss.js | 790 ++++++++++++++++++ .../testpaper/component/Seeoagertits.js | 70 ++ 9 files changed, 1037 insertions(+), 147 deletions(-) create mode 100644 public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js create mode 100644 public/react/src/modules/testpaper/component/Seeoagertits.js diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 472c7043a..097528656 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -508,7 +508,6 @@ class Questionitem_banks extends Component { {/*题目头部操作*/} this.getcontentMdRef(ref)} diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index d551a4b0b..8ff1307b8 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -45,7 +45,6 @@ const options = [ class Itembankstop extends Component { constructor(props) { super(props); - this.contentMdRef = React.createRef() this.state = { page: 1, Knowpoints: [], @@ -73,6 +72,47 @@ class Itembankstop extends Component { } componentDidUpdate(prevProps) { + // 把知识点放进塞选中 ,如果是编辑 已经选中就不放进去 + if (prevProps.disciplmy !== this.props.disciplmy) { + this.setState({ + options: this.props.disciplmy + }) + } + if(prevProps.disciplinesdata!== this.props.disciplinesdata){ + try { + if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){ + const didata = this.props.disciplinesdata; + const knowledgepointsdata = []; + for (var i = 0; i < didata.length; i++) { + //方向 + if (this.props.item_banksedit.discipline.id === didata[i].id) { + const fxdidata = didata[i].sub_disciplines; + for (var j = 0; j < fxdidata.length; j++) { + //课程 + if (this.props.item_banksedit.sub_discipline.id === fxdidata[j].id) { + const zsddata = fxdidata[j].tag_disciplines; + for (var k = 0; k < zsddata.length; k++) { + //知识点 + knowledgepointsdata.push(zsddata[k]); + } + } + } + } + } + const _result =[]; + knowledgepointsdata.filter(item => { + if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) { + _result.push(item); + } + }); + this.setState({ + knowledgepoints:knowledgepointsdata, + knowledgepoints2: _result, + }) + } + }catch (e) { + } + } //编辑的时候 if (prevProps.item_banksedit !== this.props.item_banksedit) { if (this.props.item_banksedit.item_type) { @@ -89,18 +129,17 @@ class Itembankstop extends Component { }catch (e) { } + this.getdatasmys(); } - if (prevProps.disciplmy !== this.props.disciplmy) { - this.setState({ - options: this.props.disciplmy - }) - } - // 把知识点放进塞选中 ,如果是编辑 已经选中就不放进去 - if(prevProps.disciplinesdata!== this.props.disciplinesdata){ + + + } + getdatasmys=()=>{ + if(this.props.disciplinesdata){ try { if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){ - const didata = this.props.disciplinesdata; - const knowledgepointsdata = []; + var didata = this.props.disciplinesdata; + var knowledgepointsdata = []; for (var i = 0; i < didata.length; i++) { //方向 if (this.props.item_banksedit.discipline.id === didata[i].id) { @@ -117,23 +156,26 @@ class Itembankstop extends Component { } } } - const _result =[]; + var _result =[]; knowledgepointsdata.filter(item => { if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) { _result.push(item); } }); + + this.setState({ knowledgepoints:knowledgepointsdata, knowledgepoints2: _result, }) + }else{ } }catch (e) { + } } } - handdisciplinesChange =(name,title)=>{ this.setState({ rbkc:[name.id,title.id] @@ -487,7 +529,7 @@ class Itembankstop extends Component { } )(
- + @@ -501,8 +543,8 @@ class Itembankstop extends Component { {getFieldDecorator("rbzsd" )(
- - {knowledgepoints2 && knowledgepoints2.map((object, index) => { return ( @@ -552,7 +594,7 @@ class Itembankstop extends Component { rules: [{required: true, message: '请选择题型'}], } )( - + {knowledgepoints2 && knowledgepoints2.map((object, index) => { return ( diff --git a/public/react/src/modules/testpaper/Paperlibraryeditid.js b/public/react/src/modules/testpaper/Paperlibraryeditid.js index 000bb8990..ad3266362 100644 --- a/public/react/src/modules/testpaper/Paperlibraryeditid.js +++ b/public/react/src/modules/testpaper/Paperlibraryeditid.js @@ -17,10 +17,12 @@ import NoneData from './component/NoneData'; import './testioncss/testioncss.css'; import '../tpm/newshixuns/css/Newshixuns.css'; import Bottomsubmit from "../../modules/modals/Bottomsubmit"; -import Seeoagertit from "./component/Seeoagertit"; +import Seeoagertits from "./component/Seeoagertits"; import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; import Comthetestpaperst from '../question/comthetestpaper/Comthetestpaperst'; +import Paperlibraryseeid_itemss from './component/Paperlibraryseeid_itemss'; import JudquestionEditor from "../question/component/JudquestionEditor"; + //人工组卷预览 class Paperlibraryeditid extends Component { constructor(props) { @@ -28,21 +30,22 @@ class Paperlibraryeditid extends Component { this.contentMdRef = React.createRef(); this.Judquestio = React.createRef(); this.state = { - paperlibrartdata:[], + paperlibrartdata: [], disciplinesdata: [], knowledgepoints: [], disciplmy: [], - item_banksedit:[] + item_banksedit: [] } } + getJudquestio = (Ref) => { this.Judquestio = Ref; } + //初始化 componentDidMount() { - console.log("Paperlibraryseeid"); this.getdata(); let urls = `/disciplines.json`; axios.get(urls, { @@ -60,7 +63,7 @@ class Paperlibraryeditid extends Component { const didata = response.data.disciplines; for (var i = 0; i < didata.length; i++) { - const childern=[]; + const childern = []; //方向 const fxdidata = didata[i].sub_disciplines; @@ -82,7 +85,7 @@ class Paperlibraryeditid extends Component { } } - const datakec={ + const datakec = { value: didata[i].id, label: didata[i].name, children: childern, @@ -92,7 +95,7 @@ class Paperlibraryeditid extends Component { this.setState({ knowledgepoints: this.state.knowledgepoints, - disciplmy:this.state.disciplmy, + disciplmy: this.state.disciplmy, }) @@ -112,7 +115,7 @@ class Paperlibraryeditid extends Component { if (response) { this.setState({ paperlibrartdata: response.data, - item_banksedit:response.data.exam, + item_banksedit: response.data.exam, }) } }); @@ -140,8 +143,6 @@ class Paperlibraryeditid extends Component { //保存试卷 - - } @@ -150,12 +151,13 @@ class Paperlibraryeditid extends Component { } - setCohetepaperbool =(bool)=>{ + setCohetepaperbool = (bool) => { } getcontentMdRef = (Ref) => { this.contentMdRef = Ref; } + render() { let {paperlibrartdata} = this.state; const params = this.props && this.props.match && this.props.match.params; @@ -189,59 +191,44 @@ class Paperlibraryeditid extends Component { > - -
- {paperlibrartdata&&paperlibrartdata.exam&&paperlibrartdata.exam.name} -
-
- - + - this.getdata()} - single_questions={paperlibrartdata&&paperlibrartdata.single_questions&&paperlibrartdata.single_questions.questions.length>0?paperlibrartdata.single_questions:null} - multiple_questions={paperlibrartdata&&paperlibrartdata.multiple_questions - &&paperlibrartdata.multiple_questions.questions.length>0?paperlibrartdata.multiple_questions:null + getdata={() => this.getdata()} + single_questions={paperlibrartdata && paperlibrartdata.single_questions && paperlibrartdata.single_questions.questions.length > 0 ? paperlibrartdata.single_questions : null} + multiple_questions={paperlibrartdata && paperlibrartdata.multiple_questions + && paperlibrartdata.multiple_questions.questions.length > 0 ? paperlibrartdata.multiple_questions : null } - judgement_questions={paperlibrartdata&&paperlibrartdata.judgement_questions - &&paperlibrartdata.judgement_questions.questions.length>0?paperlibrartdata.judgement_questions:null + judgement_questions={paperlibrartdata && paperlibrartdata.judgement_questions + && paperlibrartdata.judgement_questions.questions.length > 0 ? paperlibrartdata.judgement_questions : null } - program_questions={paperlibrartdata&&paperlibrartdata.program_questions - &&paperlibrartdata.program_questions.questions.length>0?paperlibrartdata.program_questions:null + program_questions={paperlibrartdata && paperlibrartdata.program_questions + && paperlibrartdata.program_questions.questions.length > 0 ? paperlibrartdata.program_questions : null } - > - - - - - - - - - + >
- - -
this.setCohetepaperbool(bool)} + setCohetepaperbool={(bool) => this.setCohetepaperbool(bool)} onSubmits={() => this.preservation()} url={'/paperlibrary'}> ) diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js index 73a03c29d..538a110bd 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -218,76 +218,6 @@ class Paperreview_item extends Component { } - setmodalsTypedel = (bool, type, names) => { - if (type === 1) { - this.setState({ - modalsTypedel: bool, - titilesms: names - }) - } else { - this.setState({ - modalsTypedel: bool, - titilesms: names - }) - const url = `/item_baskets/delete_item_type.json`; - axios.delete((url), { - data: { - item_type: names - } - }) - .then((response) => { - if (response.data.status == 0) { - this.props.showNotification('大题删除成功'); - this.props.getdata({}); - this.setState({ - titilesms: "" - }) - } - }) - .catch(function (error) { - //console.log(error); - }); - - - - } - - } - - setmodalsTypedels = (bool, type) => { - if (type === 1) { - this.setState({ - modalsTypedels: bool, - }) - }else { - //确定 - const url = `/item_baskets/${this.state.item_bank_id}.json`; - axios.delete((url)) - .then((response) => { - if (response.data.status == 0) { - this.props.showNotification('试题删除成功'); - this.props.getdata({}); - } - }) - .catch(function (error) { - - }); - - this.setState({ - modalsTypedels: bool, - }) - } - - } - - showsetmodalsTypedels=(id,bool,type)=>{ - debugger - this.setState({ - item_bank_id:id, - }) - this.setmodalsTypedels(bool,type); - } - hideparagraph = (name) => { console.log("hideparagraph"); diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 83c3dbcb8..1ab987ba0 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -67,8 +67,8 @@ class Paperlibraryseeid_items extends Component { render() { let {questions, totalscore, total, items} = this.state; let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props; - console.log("objectsingle"); - console.log(objectsingle); + // console.log("objectsingle"); + // console.log(objectsingle); return (
{ return ( -

+

{object.choice_text} @@ -143,7 +143,7 @@ class Paperlibraryseeid_items extends Component { { objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { return ( -

+

{tagArray[index]}

diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js new file mode 100644 index 000000000..be9e8b54d --- /dev/null +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -0,0 +1,790 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import '../../question/questioncss/questioncom.css'; +import '../../tpm/newshixuns/css/Newshixuns.css'; +import {DragDropContext, Draggable, Droppable} from 'react-beautiful-dnd'; +import PaperDeletModel from '../../question/component/PaperDeletModel'; +import PaperDeletModels from '../../question/component/PaperDeletModels'; +import Paperreview_itemModel from '../../question/component/Paperreview_itemModel'; +import Paperreview_itemModels from '../../question/component/Paperreview_itemModels'; +import Paperreview_items from '../../question/Paperreview_items'; + + +const reorder = (list, startIndex, endIndex) => { + const result = Array.from(list); + const [removed] = result.splice(startIndex, 1); + result.splice(endIndex, 0, removed); + + return result; +}; + +//这不是唯一的 试题库还有 Paperreview_item.js +class Paperlibraryseeid_itemss extends Component { + constructor(props) { + super(props); + + this.state = { + questions: 0, + totalscore: 0, + total: 0, + modalsTypedel: false, + modalsTypey: false, + modalsTypeys: false, + modalsTypedels: false, + titilesm: "", + titilesms: "", + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex: "无", + set_scoreid:null, + item_bank_id:null + } + + } + + //初始化 + componentDidMount() { + + + } + + + getdata = (data) => { + + } + + preservation = () => { + + + } + + + setitem_type = (item_type) => { + + + } + onDragEnd = (result) => { + + const ids = this.props.single_questions.questions[result.source.index].id; + const positions = this.props.single_questions.questions[result.destination.index].position; + + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + } + + onDragEnds = (result) => { + + const ids = this.props.multiple_questions.questions[result.source.index].id; + const positions = this.props.multiple_questions.questions[result.destination.index].position; + const url =`/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + + } + + + onDragEndss = (result) => { + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + } + + onDragEndsss = (result) => { + + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + } + Singlemagazine = (name, bool) => { + if (bool === true) { + this.setState({ + modalsTypey: true, + titilesm: name + }) + } else { + this.setState({ + modalsTypey: false, + titilesm: "" + }) + } + + + } + + setDownloady = (fenshu) => { + const url = "/examination_items/batch_set_score.json"; + var data = { + exam_id:this.props.match.params.id, + 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); + }) + } + + setDownloadys=(value)=>{ + const url = `/examination_items/${this.state.set_scoreid}/set_score.json`; + var data = { + score: value, + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazines(false); + } + }).catch((error) => { + console.log(error); + }) + } + + Singlemagazines=(bool,id,name)=>{ + if(bool===true){ + this.setState({ + set_scoreid:id, + modalsTypeys:bool, + titilesm: name + }) + }else{ + this.setState({ + modalsTypeys:bool, + set_scoreid:null, + titilesm: null + }) + } + + + } + setmodalsTypedel = (bool, type, names) => { + if (type === 1) { + this.setState({ + modalsTypedel: bool, + titilesms: names + }) + } else { + this.setState({ + modalsTypedel: bool, + titilesms: names + }) + const url = `/examination_items/delete_item_type.json`; + axios.delete((url), { + data: { + exam_id:this.props.match.params.id, + item_type: names + } + }) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('大题删除成功'); + this.props.getdata({}); + this.setState({ + titilesms: "" + }) + } + }) + .catch(function (error) { + //console.log(error); + }); + + + + } + + } + + setmodalsTypedels = (bool, type) => { + if (type === 1) { + this.setState({ + modalsTypedels: bool, + }) + }else { + //确定 + const url = `/examination_items/${this.state.item_bank_id}.json`; + axios.delete((url)) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('试题删除成功'); + this.props.getdata({}); + } + }) + .catch(function (error) { + + }); + + this.setState({ + modalsTypedels: bool, + }) + } + + } + + showsetmodalsTypedels=(id,bool,type)=>{ + debugger + this.setState({ + item_bank_id:id, + }) + this.setmodalsTypedels(bool,type); + } + + hideparagraph = (name) => { + console.log("hideparagraph"); + + } + + hideparagraphs = () => { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + showparagraph = (name) => { + console.log("showparagraph"); + if (name === "SINGLE") { + this.setState({ + singlebool: true, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } else if (name === "MULTIPLE") { + this.setState({ + singlebool: false, + multiplebool: true, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + + }) + } else if (name === "JUDGMENT") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: true, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + } else if (name === "PROGRAM") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: true, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } + } + + jixuxuantioncli = () => { + this.props.history.replace("/question"); + } + + showparagraphs = (e,name) => { + console.log("showparagraphs"); + console.log(e); + this.setState({ + paperreviewsingleindex: e, + paperreviewsinglename:name, + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + + Setscore=(id)=>{ + + + } + + + + render() { + let { + questions, totalscore, total, modalsTypedel, modalsTypey, modalsTypedels, + singlebool, + multiplebool, + judgmentbool, + programbool, + paperreviewsingleindex, + modalsTypeys + } = this.state; + let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props; + return ( +
+ { + modalsTypedel === true ? + this.setmodalsTypedel(bool, type, name)}> + : "" + } + { + modalsTypey === true ? + this.setDownloady(fs)} + Singlemagazine={(name, bool) => this.Singlemagazine(name, bool)}> + : "" + } + + { + modalsTypeys === true ? + this.setDownloadys(value)} + Singlemagazines={(bool,id,name) => this.Singlemagazines(bool,id,name)}> + : "" + } + { + modalsTypedels === true ? + this.setmodalsTypedels(id,bool, type)}> + : "" + } +
+ {/*单选题*/} + { + single_questions && single_questions ? +
+ +
+
this.showparagraph("SINGLE")} onMouseLeave={() => this.hideparagraph("SINGLE")}> +

一、单选题

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

+
+ { + singlebool === true ? +
+
this.setmodalsTypedel(true, 1, "SINGLE")}>删除
+
this.Singlemagazine("单选题", true)}>批量设置得分
+
: "" + } + + + {(provided, snapshot) => ( +
+ { + single_questions && single_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ + : "" + } + + + { + multiple_questions && multiple_questions ? +
+
+
+
this.showparagraph("MULTIPLE")} + onMouseLeave={() => this.hideparagraph("MULTIPLE")}> +

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

+

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

+
+ { + multiplebool === true ? +
+
this.setmodalsTypedel(true, 1, "MULTIPLE")}>删除 +
+
this.Singlemagazine("多选题", true)}>批量设置得分
+
+ + : "" + } + + + + + {(provided, snapshot) => ( +
+ { + multiple_questions && multiple_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + { + judgement_questions && judgement_questions ? +
+
+
+
this.showparagraph("JUDGMENT")} + onMouseLeave={() => this.hideparagraph("JUDGMENT")}> +

{single_questions === null && multiple_questions === null ? "一" : single_questions === null && multiple_questions !== null ? "二" + : single_questions !== null && multiple_questions === null ? "二" + : "三"}、判断题

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

+
+ { + judgmentbool === true ? +
+
this.setmodalsTypedel(true, 1, "JUDGMENT")}>删除 +
+
this.Singlemagazine("判断题", true)}>批量设置得分
+
+ : ""} + + + + {(provided, snapshot) => ( +
+ { + judgement_questions && judgement_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+
+
+ : "" + } + + + { + program_questions && program_questions ? +
+ +
+
+
this.showparagraph("PROGRAM")} + onMouseLeave={() => this.hideparagraph("PROGRAM")}> +

+ {single_questions === null && multiple_questions === null && program_questions === null ? "一" + : single_questions === null && multiple_questions === null && program_questions !== null ? "二" + : single_questions !== null && multiple_questions === null && program_questions === null ? "二" + : single_questions === null && multiple_questions !== null && program_questions === null ? "二" + : single_questions !== null && multiple_questions !== null && program_questions === null ? "三" + : single_questions === null && multiple_questions !== null && program_questions !== null ? "三" + : single_questions !== null && multiple_questions == null && program_questions !== null ? "三" : + "四"} + 、编程题

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

+
+ { + programbool === true ? +
+
this.setmodalsTypedel(true, 1, "PROGRAM")}>删除
+
this.Singlemagazine("编程题", true)}>批量设置得分
+
+ : "" + } + + + + {(provided, snapshot) => ( +
+ { + program_questions && program_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + +
+
+ ) + + } + + +} + +export default Paperlibraryseeid_itemss + + diff --git a/public/react/src/modules/testpaper/component/Seeoagertits.js b/public/react/src/modules/testpaper/component/Seeoagertits.js new file mode 100644 index 000000000..1c2b596bf --- /dev/null +++ b/public/react/src/modules/testpaper/component/Seeoagertits.js @@ -0,0 +1,70 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Radio, + Checkbox +} from "antd"; +import './../testioncss/testioncss.css'; +class Seeoagertit extends Component { + constructor(props) { + super(props); + this.state = { + page:1, + } + } + //初始化 + componentDidMount(){ + + + } + onChange=(e)=> { + } + jixuxuantioncli = () => { + this.props.history.replace("/question"); + } + + render() { + + return ( + +
+
+
+

题数:{this.props.all_score}

+

总分:{this.props.all_questions_count}

+

难度: + {this.props.difficulty===undefined?"": + this.props.difficulty===1?"简单":this.props.difficulty===2?"适中":this.props.difficulty===3?"困难":"" + } +

+ +
+
+
this.jixuxuantioncli()}> + 继续选题 +
+
+
+
+
+
拖动试题可调整排序
+ + +
+
+ ) + + } + + + +} +export default Seeoagertit ;