dev_jupyter
杨树林 5 years ago
parent 8c552dea15
commit 5a590dc231

@ -82,8 +82,8 @@ export function initAxiosInterceptors(props) {
// proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net"
// proxy="https://test-jupyterweb.educoder.net"
// proxy="https://test-newweb.educoder.net"
proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -510,7 +510,7 @@ class DetailCards extends Component{
{this.props.current_user&&this.props.current_user.admin===true||this.props.current_user&&this.props.current_user.business===true?
item.shixuns_list && item.shixuns_list.map((line,index)=>{
return(
<div className="clearfix paragraph lineh-30" onMouseEnter={()=>this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
<div className="clearfix paragraph lineh-30" onMouseEnter>
<li className="fl li-width63">

@ -44,6 +44,11 @@ class Paperreview_item extends Component {
modalsTypedels: false,
titilesm: "",
titilesms: "",
singlebool: false,
multiplebool: false,
judgmentbool: false,
programbool: false,
paperreviewsingleindex: "无"
}
}
@ -52,8 +57,6 @@ class Paperreview_item extends Component {
componentDidMount() {
}
@ -64,8 +67,6 @@ class Paperreview_item extends Component {
preservation = () => {
}
@ -213,9 +214,11 @@ class Paperreview_item extends Component {
} else {
//确定
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), { data: {
axios.delete((url), {
data: {
item_type: this.state.titilesms
}})
}
})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('删除成功');
@ -236,38 +239,119 @@ class Paperreview_item extends Component {
}
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,
})
} else if (name === "MULTIPLE") {
this.setState({
singlebool: false,
multiplebool: true,
judgmentbool: false,
programbool: false,
})
} else if (name === "JUDGMENT") {
this.setState({
singlebool: false,
multiplebool: false,
judgmentbool: true,
programbool: false,
})
} else if (name === "PROGRAM") {
this.setState({
singlebool: false,
multiplebool: false,
judgmentbool: false,
programbool: true,
})
}
}
jixuxuantioncli = () => {
this.props.history.replace("/question");
}
showparagraphs = (e) => {
console.log("showparagraphs");
console.log(e);
this.setState({
paperreviewsingleindex: e,
})
}
render() {
let {questions,totalscore,total,modalsTypedel,modalsTypey,modalsTypedels} = this.state;
let {
questions, totalscore, total, modalsTypedel, modalsTypey, modalsTypedels,
singlebool,
multiplebool,
judgmentbool,
programbool,
paperreviewsingleindex
} = this.state;
let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props;
return (
<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>
<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>
<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>
<PaperDeletModels {...this.state} {...this.props}
setmodalsTypedels={(bool, type) => this.setmodalsTypedels(bool, type)}></PaperDeletModels>
: ""
}
<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>
<div className="w70s sortinxdirection">
<p className="questionstishu lh34">题数{this.props.all_score}</p>
<p className="ml58 questionstotal lh34">总分{this.props.all_questions_count}</p>
</div>
<div className="w30s xaxisreverseorder">
<div className="jixuxuanti xiaoshou" onClick={() => this.jixuxuantioncli()}>
继续选题
</div>
</div>
</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
className="pagertdstcolor w50s xaxisreverseorder">{single_questions && single_questions.questions_count}个试题
</div>
</div>
@ -279,13 +363,19 @@ class Paperreview_item extends Component {
}}>
<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
className={singlebool === true ? "w100s sortinxdirection borderwdswuhques intermediatecenterysls" : "w100s sortinxdirection intermediatecenterysls"}
onMouseEnter={() => this.showparagraph("SINGLE")} onMouseLeave={() => this.hideparagraph("SINGLE")}>
<p className={singlebool === true ? "ml18 yldxtit" : "yldxtit"}>单选题</p> <p
className="ml15 yldxtits">{single_questions && single_questions.questions_count}{single_questions && single_questions.questions_score}</p>
</div>
<div className="postitonrelatis xaxisreverseorder">
{
singlebool === true ?
<div className="postitonrelatiss xaxisreverseorder">
<div className="scd xiaoshou" onClick={() => this.setmodalsTypedel(true, 1, "SINGLE")}>删除</div>
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("单选题",true)} >设置得分</div>
</div>
<div className="szdfd xiaoshou" onClick={() => this.Singlemagazine("单选题", true)}>批量设置得分</div>
</div> : ""
}
<DragDropContext onDragEnd={this.onDragEnd}>
<Droppable droppableId={"0"}>
{(provided, snapshot) => (
@ -311,7 +401,18 @@ class Paperreview_item extends Component {
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<Paperreview_single objectsingle={object}></Paperreview_single>
<div className="xaxisreverseorder mt25 mr2">
<div className="scd xiaoshou">删除</div>
<div className="szdfd xiaoshou">设置得分</div>
</div>
<Paperreview_single paperreviewsingleindex={this.state.paperreviewsingleindex}
showparagraphs={(e) => this.showparagraphs(e)}
objectsingle={object} key={index} indexx={index + 1}
indexxy={index}
hideparagraphs={() => this.hideparagraphs()}></Paperreview_single>
</div>
)}
</Draggable>
@ -339,14 +440,27 @@ class Paperreview_item extends Component {
}}>
<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
className={multiplebool === true ? "w100s sortinxdirection mt10 borderwdswuhques intermediatecenterysls" : "w100s sortinxdirection intermediatecenterysls"}
onMouseEnter={() => this.showparagraph("MULTIPLE")}
onMouseLeave={() => this.hideparagraph("MULTIPLE")}>
<p
className={multiplebool === true ? "ml18 yldxtit" : "yldxtit"}>{single_questions === null ? "一" : "二"}多选题</p>
<p
className="ml15 yldxtits">{multiple_questions && multiple_questions.questions_count}{multiple_questions && multiple_questions.questions_score}</p>
</div>
{
multiplebool === true ?
<div className="postitonrelatisss xaxisreverseorder ">
<div className="scd xiaoshou" onClick={() => this.setmodalsTypedel(true, 1, "MULTIPLE")}>删除
</div>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"MULTIPLE")}>删除</div>
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("多选题",true)}>设置得分</div>
<div className="szdfd xiaoshou" onClick={() => this.Singlemagazine("多选题", true)}>批量设置得分</div>
</div>
: ""
}
<DragDropContext onDragEnd={this.onDragEnds}>
<Droppable droppableId={"0"}>
{(provided, snapshot) => (
@ -372,7 +486,15 @@ class Paperreview_item extends Component {
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<Paperreview_single objectsingle={object}></Paperreview_single>
<div className="xaxisreverseorder mt25 mr2">
<div className="scd xiaoshou">删除</div>
<div className="szdfd xiaoshou">设置得分</div>
</div>
<Paperreview_single paperreviewsingleindex={this.state.paperreviewsingleindex}
objectsingle={object} key={index} indexx={index + 1}
indexxy={index}
hideparagraphs={() => this.hideparagraphs()}></Paperreview_single>
</div>
)}
</Draggable>
@ -394,20 +516,29 @@ class Paperreview_item extends Component {
{
judgement_questions && judgement_questions ?
<div className="backgroudwhites" style={{
<div className={judgmentbool === true ? "backgroudwhites " : "backgroudwhites"} style={{
position: "relative",
}}>
<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?"二"
<div className="h20 lh20"></div>
<div className="w100s mb20 postitonrelati">
<div
className={judgmentbool === true ? "w100s sortinxdirection borderwdswuhques mt10 intermediatecenterysls " : "w100s sortinxdirection intermediatecenterysls "}
onMouseEnter={() => this.showparagraph("JUDGMENT")}
onMouseLeave={() => this.hideparagraph("JUDGMENT")}>
<p
className={judgmentbool === true ? "ml18 yldxtit" : "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>
: "三"}判断题</p> <p
className="ml15 yldxtits">{judgement_questions && judgement_questions.questions_count}{judgement_questions && judgement_questions.questions_score}</p>
</div>
{
judgmentbool === true ?
<div className="postitonrelatiss xaxisreverseorder">
<div className="scd xiaoshou" onClick={() => this.setmodalsTypedel(true, 1, "JUDGMENT")}>删除
</div>
<div className="postitonrelatis xaxisreverseorder">
<div className="scd xiaoshou" onClick={()=>this.setmodalsTypedel(true,1,"JUDGMENT")}>删除</div>
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("判断题",true)}>设置得分</div>
<div className="szdfd xiaoshou" onClick={() => this.Singlemagazine("判断题", true)}>批量设置得分</div>
</div>
: ""}
<DragDropContext onDragEnd={this.onDragEndss}>
<Droppable droppableId={"0"}>
@ -434,7 +565,15 @@ class Paperreview_item extends Component {
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<Paperreview_single objectsingle={object}></Paperreview_single>
<div className="xaxisreverseorder mt25 mr2">
<div className="scd xiaoshou">删除</div>
<div className="szdfd xiaoshou">设置得分</div>
</div>
<Paperreview_single paperreviewsingleindex={this.state.paperreviewsingleindex}
objectsingle={object} key={index} indexx={index + 1}
indexxy={index}
hideparagraphs={() => this.hideparagraphs()}></Paperreview_single>
</div>
)}
</Draggable>
@ -454,13 +593,17 @@ class Paperreview_item extends Component {
{
program_questions && program_questions ?
<div className="backgroudwhites" style={{
<div className={programbool === true ? "backgroudwhites " : "backgroudwhites"} style={{
position: "relative",
}}>
<div className="w100s mt20 mb20 postitonrelati">
<div className="w100s sortinxdirection">
<p className="yldxtit">
<div className="h20 lh20"></div>
<div className="w100s mb20 postitonrelati">
<div
className={programbool === true ? "w100s sortinxdirection mt10 borderwdswuhques intermediatecenterysls " : "w100s sortinxdirection intermediatecenterysls"}
onMouseEnter={() => this.showparagraph("PROGRAM")}
onMouseLeave={() => this.hideparagraph("PROGRAM")}>
<p className={programbool === true ? "ml18 yldxtit" : "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 ? "二"
@ -469,12 +612,18 @@ class Paperreview_item extends Component {
: 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>
编程题</p> <p
className="ml15 yldxtits">{program_questions && program_questions.questions_count}{program_questions && program_questions.questions_score}</p>
</div>
<div className="postitonrelatis xaxisreverseorder">
{
programbool === true ?
<div className="postitonrelatiss xaxisreverseorder">
<div className="scd xiaoshou" onClick={() => this.setmodalsTypedel(true, 1, "PROGRAM")}>删除</div>
<div className="szdfd xiaoshou" onClick={()=>this.Singlemagazine("编程题",true)}>设置得分</div>
<div className="szdfd xiaoshou" onClick={() => this.Singlemagazine("编程题", true)}>批量设置得分</div>
</div>
: ""
}
<DragDropContext onDragEnd={this.onDragEndsss}>
<Droppable droppableId={"0"}>
{(provided, snapshot) => (
@ -500,7 +649,15 @@ class Paperreview_item extends Component {
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<Paperreview_single objectsingle={object}></Paperreview_single>
<div className="xaxisreverseorder mt25 mr2">
<div className="scd xiaoshou">删除</div>
<div className="szdfd xiaoshou">设置得分</div>
</div>
<Paperreview_single paperreviewsingleindex={this.state.paperreviewsingleindex}
objectsingle={object} key={index} indexx={index + 1}
indexxy={index}
hideparagraphs={() => this.hideparagraphs()}></Paperreview_single>
</div>
)}
</Draggable>

@ -17,11 +17,13 @@ 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) {
@ -31,7 +33,6 @@ class Paperreview_single extends Component {
questions: 0,
totalscore: 0,
total: 0,
}
}
@ -40,8 +41,6 @@ class Paperreview_single extends Component {
componentDidMount() {
}
@ -52,34 +51,40 @@ class Paperreview_single extends Component {
preservation = () => {
}
setitem_type = (item_type) => {
}
showparagraph = (indexx) => {
setitem_type = (item_type) => {
}
setmodalsTypedels = () => {
}
Singlemagaziness = () => {
}
render() {
let {questions, totalscore, total, items} = this.state;
let {objectsingle} =this.props;
// //console.log(params);
const objectsingleid=objectsingle.id;
const objectsinglescore=`${objectsingle.score}分)`;
let {objectsingle, indexx, paperreviewsingleindex, indexxy} = this.props;
return (
<div className="w100s borderwdswuh mt25 mb20 pd20 " style={{
<div key={indexxy}
className={ "w100s borderwdswuh mb20 pd20 "}
onMouseEnter={() => this.props.showparagraphs(indexxy)} style={{
minHeight: "114px",
}}>
{/*顶部*/}
<div className="w100s sortinxdirection ">
{/*<div className=" sortinxdirection ">*/}
{/* <p className="cretitlecolrlis lh28">{objectsingleid}</p>、<p className="cretitlecolrlisobj lh28">{objectsinglescore}分)</p>*/}
{/*</div>*/}
<div className=" sortinxdirection ">
<p className="cretitlecolrlis lh28">{indexx}</p>
</div>
<style>
{
`
@ -98,7 +103,8 @@ class Paperreview_single extends Component {
`
}
</style>
<div className=" lh28 listjihetixingstit markdown-body cretitlecolrlist" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingleid+objectsinglescore+objectsingle.name).replace(/▁/g, "▁▁▁")}}>
<div className=" lh28 listjihetixingstit markdown-body cretitlecolrlist" style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(`${objectsingle.score}分) ` + objectsingle.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
{/*内容*/}
@ -124,7 +130,8 @@ class Paperreview_single extends Component {
objectsingle.item_type === "PROGRAM" ?
<p className="w100s listjihetixingstitssy sortinxdirection ">
<p className={"sortinxdirection mt15"}>
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle.program_attr.description).replace(/▁/g, "▁▁▁")}}></p>
<p style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle.program_attr.description).replace(/▁/g, "▁▁▁")}}></p>
</p>
</p>
:
@ -134,7 +141,8 @@ class Paperreview_single extends Component {
return (
<p className={index === 0 ? "sortinxdirection" : "sortinxdirection mt15"}>
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
<p style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>
)
})
@ -146,8 +154,6 @@ class Paperreview_single extends Component {
</div>
</div>
)

@ -688,26 +688,44 @@
right: 2px;
top: 11px;
}
.postitonrelatiss{
position: absolute;
right: 2px;
top: -41px;
}
.postitonrelatisss{
position: absolute;
right: 2px;
top: -39px;
}
.postitonrelatisssy{
position: absolute;
right: 1px;
top: 52px;
}
.mt50{
margin-top: 50px;
}
.szdfd{
width:88px;
height:34px;
width:100px;
height:40px;
background:rgba(51,189,140,1);
border-radius:4px 4px 0px 0px;
text-align: center;
color: #ffffff;
line-height: 32px;
line-height: 40px;
margin-right: 27px;
font-size:12px;
}
.scd{
width:88px;
height:34px;
width:100px;
height:40px;
background:#4CACFF;
border-radius:4px 4px 0px 0px;
text-align: center;
color: #ffffff;
line-height: 32px;
line-height: 40px;
font-size:12px;
}
@ -757,3 +775,35 @@
.mt7{
margin-top: 7px;
}
.ml18{
margin-left: 18px;
}
.btques{
width:1021px;
background:rgba(249,249,249,1);
border:1px solid rgba(221,221,221,1);
}
.borderwdswuhques {
width: 1020px !important;
background: #F9F9F9;
border: 1px solid #DDDDDD;
min-height: 42px;
}
.jixuxuanti{
width:106px;
height:34px;
background:rgba(51,189,140,1);
border-radius:4px;
color:#ffffff ;
line-height: 34px;
text-align: center;
}
.lh34{
line-height: 34px;
}
.mr2{
margin-right: 2px;
}

Loading…
Cancel
Save