Merge remote-tracking branch 'origin/dev_item_bank' into dev_item_bank

dev_jupyter
杨树明 5 years ago
commit 6878e3529d

@ -24,6 +24,7 @@ import JudquestionEditor from "./component/JudquestionEditor";
import Paperreview_item from "./Paperreview_item"
import Bottomsubmit from "../../modules/modals/Bottomsubmit";
//人工组卷预览
class Paperreview extends Component {
constructor(props) {
super(props);
@ -37,8 +38,20 @@ class Paperreview extends Component {
myquestion_choicesco: [],
disciplinesdata: [],
knowledgepoints: [],
disciplmy:[]
disciplmy: [],
single_questions:null,
multiple_questions:null,
judgement_questions:null,
program_questions:null,
all_score:0,
all_questions_count:0,
}
// single_questions:null, 单选题
// multiple_questions:null, 多选题
// judgement_questions:null, 判断题
// program_questions:null, 编程题
// all_score:0, 所有分数
// all_questions_count:0 所有问题数
}
@ -46,13 +59,52 @@ class Paperreview extends Component {
componentDidMount() {
var data = {}
this.getdata(data);
}
getdata = (data) => {
const url = `/item_baskets.json`;
this.setState({
booljupyterurls: true,
})
axios.get((url), {params: data}).then((response) => {
setTimeout(() => {
this.setState({
booljupyterurls: false,
})
}, 1000);
if (response === null || response === undefined) {
return
}
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
} else {
}
try {
this.setState({
Contentdata: response.data,
single_questions:response.data.single_questions.questions_count===0? null:response.data.single_questions,
multiple_questions:response.data.multiple_questions.questions_count===0? null:response.data.multiple_questions,
judgement_questions:response.data.judgement_questions.questions_count===0? null:response.data.judgement_questions,
program_questions:response.data.program_questions.questions_count===0? null:response.data.program_questions,
all_score:response.data.all_score,
all_questions_count:response.data.all_questions_count,
})
}catch (e) {
}
}).catch((error) => {
////console.log(error)
this.setState({
booljupyterurls: false,
})
});
}
getcontentMdRef = (Ref) => {
@ -89,8 +141,6 @@ class Paperreview extends Component {
//保存试卷
}
@ -118,34 +168,27 @@ class Paperreview extends Component {
`
}
</style>
<div className="w1200mss">
<div className="w1200ms">
<div className="w100s mt30">
<Breadcrumb separator=">">
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshou"} >人工组卷</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshou"}>人工组卷</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
</Breadcrumb>
</div>
<Paperreview_item>
</Paperreview_item>
<Paperreview_item {...this.state} {...this.props}>
</Paperreview_item>
</div>
</div>
{
item_type === null ?
""
:
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"保存组卷"}
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit>
}
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"保存组卷"}
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit>
</div>
)

@ -16,11 +16,16 @@ import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
import Paperreview_single from './Paperreview_single';
import Paperreview_multlple from './Paperreview_multlple';
import Paperreview_judgment from "./Paperreview_judgment";
import Paperreview_program from "./Paperreview_program";
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";
class Paperreview_item extends Component {
constructor(props) {
super(props);
@ -28,6 +33,7 @@ class Paperreview_item extends Component {
this.state = {
questions:0,
totalscore:0,
total:0,
}
@ -60,15 +66,135 @@ class Paperreview_item extends Component {
}
render() {
let {questions,totalscore} = this.state;
// //console.log(params);
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 w1200fpx mt19">
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
<div className="w100s mt20 mb20">
<div className="w100s sortinxdirection">
<p className="questionstishu">题数{questions}</p>
<p className="ml58 questionstotal">总分{totalscore}</p>
<p className="questionstishu">题数{this.props.all_score}</p>
<p className="ml58 questionstotal">总分{this.props.all_questions_count}</p>
</div>
<div className="questiontypeheng w100s mt19 mb19"></div>
<div className="w100s sortinxdirection">
<div className="pagertdstcolor w50s sortinxdirection">拖动试题可调整排序</div>
<div className="pagertdstcolor w50s xaxisreverseorder">{single_questions&&single_questions.questions_count}个试题</div>
</div>
{/*单选题*/}
{
single_questions&&single_questions?
<div>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
<p className="yldxtit">单选题</p> <p className="ml15 yldxtits">{single_questions&&single_questions.questions_count}{single_questions&&single_questions.questions_score}</p>
</div>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd">删除</div>
<div className="szdfd">设置得分</div>
</div>
{
single_questions&&single_questions.questions.map((object, index) => {
return (
<Paperreview_single objectsingle={object}></Paperreview_single>
)
})}
</div>
</div>
:""
}
{
multiple_questions&&multiple_questions?
<div>
<div className="w100s mt20 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>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd">删除</div>
<div className="szdfd">设置得分</div>
</div>
{
multiple_questions&&multiple_questions.questions.map((object, index) => {
return (
<Paperreview_multlple objectsingle={object}></Paperreview_multlple>
)
})}
</div>
</div>
:
""
}
{
judgement_questions&&judgement_questions?
<div>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
<p className="yldxtit">{single_questions===null&&multiple_questions===null?"一":single_questions===null&&multiple_questions!==null?"二"
:single_questions!==null&&multiple_questions===null?"二"
:"三"}判断题</p> <p className="ml15 yldxtits">{judgement_questions&&judgement_questions.questions_count}{judgement_questions&&judgement_questions.questions_score}</p>
</div>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd">删除</div>
<div className="szdfd">设置得分</div>
</div>
{
judgement_questions&&judgement_questions.questions.map((object, index) => {
return (
<Paperreview_judgment objectsingle={object}></Paperreview_judgment>
)
})}
</div>
</div>
:""
}
{
program_questions&&program_questions?
<div>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
<p className="yldxtit">
{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?"三":
"四"}
编程题</p> <p className="ml15 yldxtits">{program_questions&&program_questions.questions_count}{program_questions&&program_questions.questions_score}</p>
</div>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd">删除</div>
<div className="szdfd">设置得分</div>
</div>
{
program_questions&&program_questions.questions.map((object, index) => {
return (
<Paperreview_program objectsingle={object}></Paperreview_program>
)
})}
</div>
</div>
:
""
}
</div>

@ -0,0 +1,110 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input,
Button,
Breadcrumb
} from "antd";
import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
//判断题
class Paperreview_judgment extends Component {
constructor(props) {
super(props);
this.state = {
questions:0,
totalscore:0,
total:0,
}
}
//初始化
componentDidMount() {
}
getdata = (data) => {
}
preservation = () => {
}
setitem_type = (item_type) => {
}
render() {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className=" listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
{/*<div className="w100s sortinxdirection">*/}
{/* <p className="w100s listjihetixingstits sortinxdirection ">*/}
{/* {*/}
{/* items.item_type==="JUDGMENT"?*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >*/}
{/* <Radio checked={object.is_answer}>*/}
{/* {object.choice_text}*/}
{/* </Radio>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* }*/}
{/* </p>*/}
{/*</div>*/}
</div>
)
}
}
export default Paperreview_judgment

@ -0,0 +1,110 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input,
Button,
Breadcrumb
} from "antd";
import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
//多选题
class Paperreview_multlple extends Component {
constructor(props) {
super(props);
this.state = {
questions:0,
totalscore:0,
total:0,
}
}
//初始化
componentDidMount() {
}
getdata = (data) => {
}
preservation = () => {
}
setitem_type = (item_type) => {
}
render() {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className=" listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
{/*<div className="w100s sortinxdirection">*/}
{/* <p className="w100s listjihetixingstits sortinxdirection ">*/}
{/* {*/}
{/* items.item_type==="JUDGMENT"?*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >*/}
{/* <Radio checked={object.is_answer}>*/}
{/* {object.choice_text}*/}
{/* </Radio>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* }*/}
{/* </p>*/}
{/*</div>*/}
</div>
)
}
}
export default Paperreview_multlple

@ -0,0 +1,110 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input,
Button,
Breadcrumb
} from "antd";
import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
//编程题
class Paperreview_program extends Component {
constructor(props) {
super(props);
this.state = {
questions:0,
totalscore:0,
total:0,
}
}
//初始化
componentDidMount() {
}
getdata = (data) => {
}
preservation = () => {
}
setitem_type = (item_type) => {
}
render() {
let {questions,totalscore,total,items} = this.state;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className=" listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
{/*<div className="w100s sortinxdirection">*/}
{/* <p className="w100s listjihetixingstits sortinxdirection ">*/}
{/* {*/}
{/* items.item_type==="JUDGMENT"?*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >*/}
{/* <Radio checked={object.is_answer}>*/}
{/* {object.choice_text}*/}
{/* </Radio>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* :*/}
{/* items === undefined ||items === null? "" : items.choices.map((object, index) => {*/}
{/* return (*/}
{/* <p className="sortinxdirection ml10" >*/}
{/* {tagArray[index]}*/}
{/* <p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>*/}
{/* </p>*/}
{/* )*/}
{/* })*/}
{/* }*/}
{/* </p>*/}
{/*</div>*/}
</div>
)
}
}
export default Paperreview_program

@ -0,0 +1,119 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input,
Button,
Breadcrumb,
Radio
} from "antd";
import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
//单选题
class Paperreview_single extends Component {
constructor(props) {
super(props);
this.state = {
questions:0,
totalscore:0,
total:0,
}
}
//初始化
componentDidMount() {
}
getdata = (data) => {
}
preservation = () => {
}
setitem_type = (item_type) => {
}
render() {
let {questions,totalscore,total,items} = this.state;
let {objectsingle} =this.props;
// //console.log(params);
return (
<div className="w100s borderwdswuh mt25 mb20 ">
{/*顶部*/}
<div className="w100s sortinxdirection">
<div>
{objectsingle.id}{objectsingle.score}
</div>
<div className=" listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle&&objectsingle.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
<div className="w100s sortinxdirection">
<p className="w100s listjihetixingstits sortinxdirection ">
{
objectsingle.item_type==="JUDGMENT"?
objectsingle === undefined ||objectsingle === null? "" : objectsingle.choices.map((object, index) => {
return (
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<Radio checked={object.is_answer}>
{object.choice_text}
</Radio>
</p>
)
})
:
objectsingle === undefined ||objectsingle === null? "" : objectsingle.choices.map((object, index) => {
return (
<p className="sortinxdirection ml10" >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>
)
})
}
</p>
</div>
</div>
)
}
}
export default Paperreview_single

@ -824,7 +824,7 @@ class Question extends Component {
<div className="intermediatecenter verticallayout mt42">
<div className="drawerbutton" onClick={()=>this.gotopaperreview()}>
<div className="drawerbutton xiaoshou" onClick={()=>this.gotopaperreview()}>
试卷预览
</div>
</div>

@ -114,7 +114,7 @@ class Contentpart extends Component {
height: 41px;}
.xaxisreverseorder .ant-popover{
top: 348px !important;
top: 30px !important;
}
@ -135,7 +135,7 @@ class Contentpart extends Component {
</a>
:""
}
<Popover placement="bottom" content={contents} trigger="click" visible={this.props.visiblemys} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
<Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
<div className=" sortinxdirection mr10">
<div className="subjecttit">
@ -147,7 +147,7 @@ class Contentpart extends Component {
<Popover placement="bottom" content={content} trigger="click" visible={this.props.visiblemyss} onVisibleChange={()=>this.props.handleVisibleChanges(true)}>
<Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={content} onVisibleChange={()=>this.props.handleVisibleChanges(true)}>
<div className="sortinxdirection mr40">
<div className="subjecttit">
题型

@ -5,7 +5,12 @@
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.w1200wuh{
width:1062px;
background:rgba(255,255,255,1);
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.w1200dbl{
width:1062px;
min-height:60px;
@ -134,6 +139,16 @@
margin-left: 20px;
min-height:150px;
}
.borderwdswuh{
width: 1020px !important;
background: #FFFFFF;
border: 1px solid #DDDDDD;
min-height:150px;
}
.borderwdswuh:hover{
background: #F9F9F9;
}
.borderwds283{
width: 1020px !important;
min-height:283px;
@ -628,3 +643,55 @@
font-size: 14px;
}
.pagertdstcolor{
color: #888888;
font-size: 12px;
}
.mb19{
margin-bottom: 19px;
}
.yldxtit{
color: #333333;
font-size: 14px;
}
.yldxtits{
color: #888888;
font-size: 14px;
}
.mt25{
margin-top: 25px;
}
.postitonrelati{
position: relative;
}
.postitonrelatis{
position: absolute;
right: 2px;
top: 11px;
}
.szdfd{
width:88px;
height:34px;
background:rgba(51,189,140,1);
border-radius:4px 4px 0px 0px;
text-align: center;
color: #ffffff;
line-height: 32px;
margin-right: 27px;
}
.scd{
width:88px;
height:34px;
background:#4CACFF;
border-radius:4px 4px 0px 0px;
text-align: center;
color: #ffffff;
line-height: 32px;
}

Loading…
Cancel
Save