Merge branches 'dev_aliyun' and 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_jupyter

dev_new_shixunsrepository
杨树明 5 years ago
commit 5883a4da0d

@ -8,7 +8,8 @@ import {
Table,
Pagination,
Drawer,
Input
Input,
Tooltip
} from "antd";
import Headplugselections from "./component/Headplugselections";
import QuestionModal from "./component/QuestionModal";
@ -17,8 +18,7 @@ import Contentpart from "./component/Contentpart";
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import SiderBar from "../tpm/SiderBar";
import ShixunSearchBar from "../tpm/shixuns/ShixunSearchBar";
import SiderBars from "../question/component/SiderBars";
class Question extends Component {
constructor(props) {
@ -259,10 +259,17 @@ class Question extends Component {
this.getdata(data);
}
showDrawer = () => {
this.setState({
visible: true,
});
this.getbasket_listdata();
if(this.state.visible===true){
this.setState({
visible: false,
});
}else{
this.setState({
visible: true,
});
this.getbasket_listdata();
}
};
@ -743,11 +750,23 @@ class Question extends Component {
}
<SiderBar
<style>
{
`
.-task-sidebar{
height: 30%;
}
`
}
</style>
<SiderBars
myvisible={visible}
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}/>
{/*顶部*/}
<Headplugselections
@ -800,6 +819,21 @@ class Question extends Component {
height: 100%;
background:rgba(234,234,234,1);
}
.ant-drawer-close{
height: 40px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color:#ffffff;
}
.ant-drawer-close:hover{
color:#ffffff;
}
.ant-drawer-close:active{
color:#ffffff;
}
`
}
</style>
@ -811,19 +845,21 @@ class Question extends Component {
onClose={() => this.onClose()}
visible={visible}
mask={false}
closable={true}
>
{Datacount && Datacount > 0 ?
<div>
<div className="shitilang">
试题篮
</div>
<div className="mt25 mb26">
</div>
{
single_questions_count === 0 ?
""
: <div className="sortinxdirection" >
: <div className="sortinxdirection " >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">单选题{'('}{single_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">单选题{'('}{single_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SINGLE")}></i></p>
</div>
@ -834,7 +870,7 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">多选题{'('}{multiple_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("MULTIPLE")}></i></p>
</div>
@ -845,7 +881,7 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">判断题{'('}{judgement_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("JUDGMENT")}></i></p>
</div>
@ -856,7 +892,7 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">填空题{'('}{completion_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("COMPLETION")}></i></p>
</div>
@ -867,7 +903,7 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">简答题{'('}{subjective_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SUBJECTIVE")}></i></p>
</div>
@ -878,7 +914,7 @@ class Question extends Component {
:
<div className="sortinxdirection">
<p
className="w50s intermediatecenterysls sortinxdirection font-14">实训题{'('}{practical_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
@ -889,7 +925,7 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">编程题{'('}{program_questions_count}{')'}</p>
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">编程题{'('}{program_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("PROGRAM")}></i></p>
</div>
@ -921,4 +957,12 @@ class Question extends Component {
}
export default SnackbarHOC()(TPMIndexHOC(Question));
{/*<Drawer*/}
{/* className="drawercontainer"*/}
{/* placement={placement}*/}
{/* closable={false}*/}
{/* onClose={() => this.onClose()}*/}
{/* visible={visible}*/}
{/* mask={false}*/}
{/* closable={true}*/}
{/*>*/}

@ -9,7 +9,8 @@ import {
Pagination,
Tabs,
Input,
Popover
Popover,
Tooltip
} from "antd";
import './../questioncss/questioncom.css';
import NoneDatas from '../component/NoneDatas';

@ -174,10 +174,21 @@ class Headplugselections extends Component {
<div className="edu-back-white" >
<div className="educontent">
<div >
<div className="clearfix mb10 shaiContent">
<div className="clearfix mb10 shaiContent sortinxdirection">
<span className=" fl mt3">方向</span>
<span>
<li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active ":"shaiItem shixun_repertoire "} value= "a" onClick={()=>this.shixunsearchall("a")}>全部</li>
</span>
<style>
{
`
.shaiAllItem{
max-width: 930px!important;
}
`
}
</style>
<div className="fl pr shaiAllItem ">
<li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active ":"shaiItem shixun_repertoire "} value= "a" onClick={()=>this.shixunsearchall("a")}>全部</li>
<style>
{
`
@ -214,8 +225,6 @@ class Headplugselections extends Component {
.shaiContent li.shaiItem:hover {
border-radius:16px !important;
}
`
}
</style>
@ -236,6 +245,8 @@ class Headplugselections extends Component {
</div>
</div>
</div>
{/*题型*/}

@ -77,7 +77,7 @@ class Listjihe extends Component {
return (
<div className={chakanjiexiboolindex===keindex?"w100s borderwds283 pd20 mb20 listjihecolors":"w100s borderwds pd20 mb20 listjihecolors"}>
<div key={keindex} className={chakanjiexiboolindex===keindex?"w100s borderwds283 pd20 mb20 listjihecolors":"w100s borderwds pd20 mb20 listjihecolors"}>
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className="listjihetixingstitsy">

@ -0,0 +1,175 @@
import React, { Component } from 'react';
import { getImageUrl} from 'educoder';
import {Tooltip} from 'antd';
import '../../tpm/TPMIndex.css';
const $ = window.$;
const poiindex=0;
$(window).resize(function(){
rightSlider();
});
$(window).scroll(function(){
if($(".gotop").length>0){
if($(document).scrollTop()>0){
$(".-task-sidebar .gotop").show();
$(".gotop").click(function(){
$("html,body").scrollTop(0);
});
}
if($(document).scrollTop()==0){
$(".-task-sidebar .gotop").hide();
}
}
});
function rightSlider(){
var poi=parseInt((parseInt($(window).width())- 1200 )/2)-81;
// console.log(parseInt($(window).width())+" "+poi);
if(poi>0){
$(".-task-sidebar").css("right",poi);
}else{
$(".-task-sidebar").css("right","0px");
}
$(".-task-sidebar").show();
}
function _initSider() {
var $descSide = $("<div class='-task-desc'></div>").appendTo("body");
$(".-task-sidebar>div").hover(function(){
//移入显示二维码
if($(this).hasClass("scan")){
$(".scan_ewm").show().css({right:"75px",opacity:0}).stop().animate({
right:"45px",opacity:1
})
return;
}
var $tool = $(this).attr("tooltips");
$descSide.html($tool+"<div><img src='/images/edu_user/jt.png'></div>");
$descSide.data('_dom', this)
$descSide.show().css({
left:$(this).offset().left - $descSide.width()-30,
opacity:0,
top:$(this).offset().top
}).stop().animate({
left:$(this).offset().left - $descSide.width()-5,
opacity:1
},400);
},function(){
if($(this).hasClass("scan")){
$(".scan_ewm").stop().animate({right:"75px",opacity:0},200).hide();
}
$descSide.stop().animate({
left:$(this).offset().left - $descSide.width()-30,
opacity:0
},200).hide();
});
rightSlider();
$(window).scroll(function() {
if ($descSide.height()) {
var hoverIcon = $descSide.data('_dom')
$descSide.css('top', $(hoverIcon).offset().top)
}
})
}
class SiderBars extends Component {
constructor(props) {
super(props)
}
componentDidMount() {
_initSider()
}
render() {
// console.log("SiderBar");
// console.log(this.props);
var mypath= this.props&&this.props.match&&this.props.match.path;
let{myvisible}=this.props;
return (
<div className={myvisible===true?"-task-sidebar mystask-sidebar":"-task-sidebar mystask-sidebars"} >
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
{
mypath&&mypath==="/question"?
<Tooltip placement="left" title={"试题库"}>
<div className="feedback feedbackdivcolor xiaoshou shitikus" onClick={()=>this.props.showDrawer()} >
<a target="_blank" className="color_white xiaoshou" >
<i className="iconfont icon-shitilan color-white xiaoshou"></i>
</a>
<p className="color-white font-12 xiaoshou">试题库</p>
</div>
</Tooltip>
:""
}
<Tooltip placement="right" title={"返回顶部"}>
<div className="gotop">
<a>
<i className="iconfont icon-shangjiantou color-white"></i>
</a>
</div>
</Tooltip>
<Tooltip placement="right" title={"意见反馈"}>
<div className="feedback">
<a target="_blank" className="color_white" href="/help/feedback">
<i className="iconfont icon-yijianfankui color-white font-22"></i>
</a>
</div>
</Tooltip>
<div className="scan pr">
<Tooltip placement="right" title={
<pre>
<p className="scan_ewm">
<p className="pr padding10">
<style>
{
`
.WeChatstyle{
margin-bottom: 0 !important;
}
`
}
</style>
<img src={getImageUrl("images/educoder/EWM.jpg")} width="158px" height="158px" />
<p className={"WeChatstyle wechatcenter"}>微信扫一扫</p>
<p className={"WeChatstyle wechatcenter"}>关注公众号</p>
</p>
</p>
</pre>
}>
<span className="inline erweima"><i className="iconfont icon-erweima color-white font-22 fl"></i></span>
</Tooltip>
</div>
<Tooltip placement="right" title={"在线咨询"}>
<div className="consult">
<a target="_blank" className="color_white" href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd">
<i className="iconfont icon-qqzaixianzixun color-white font-22"></i>
</a>
</div>
</Tooltip>
</div>:""}
</div>
);
}
}
export default SiderBars;

@ -253,6 +253,10 @@ class SingleEditor extends Component{
toShowMode = () => {
}
onContentChange=(e)=>{
console.log(e);
}
render() {
let { question_title, question_score, question_type, question_choices, standard_answers,question_titles} = this.state;
let { question_id, index, exerciseIsPublish,
@ -314,6 +318,7 @@ class SingleEditor extends Component{
{/* placeholder="请您输入题干"*/}
{/* value={question_title}*/}
{/* options={['code-block', 'image', 'formula']}*/}
{/* onContentChange={this.onContentChange}*/}
{/*/>*/}
<div className="mb10 sortinxdirection">

@ -858,3 +858,27 @@
.jinzhixiaoshou{
cursor:no-drop
}
.shitilang{
height: 40px;
background: #606060;
color: #FFFFFF;
position: absolute;
top: -2px;
width: 100%;
left: 0px;
font-size:14px;
text-align: center;
line-height: 40px;
}
.xiaoshoums:hover{
color:#4CACFF;
}
.shitikus{
width: 40px !important;
position: absolute;
border-radius: 4px;
top: -50%;
}

@ -98,6 +98,9 @@ class SiderBar extends Component {
<div className={"-task-sidebar"} >
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
<Tooltip placement="right" title={"返回顶部"}>
<div className="gotop">
<a>
@ -106,19 +109,6 @@ class SiderBar extends Component {
</div>
</Tooltip>
{
mypath&&mypath==="/question"?
<Tooltip placement="right" title={"试题库"}>
<div className="feedback feedbackdivcolor xiaoshou" onClick={()=>this.props.showDrawer()} >
<a target="_blank" className="color_white xiaoshou" >
<i className="iconfont icon-shitilan color-white xiaoshou"></i>
</a>
<p className="color-white font-12 xiaoshou">试题库</p>
</div>
</Tooltip>
:""
}
<Tooltip placement="right" title={"意见反馈"}>

@ -267,3 +267,9 @@ body>.-task-title {
height:1px;
background: #EEEEEE;
}
.mystask-sidebar{
right: 210px !important;
}
.mystask-sidebars{
right: 10px !important;
}

Loading…
Cancel
Save