diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index df4390c5c..d7bd775bf 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -355,9 +355,9 @@ class Paperreview extends Component { - this.setCohetepaperbool(bool)} - onSubmits={() => this.preservation()} url={'/question'}> + this.setCohetepaperbool(bool)} + onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/question':'/paperlibrary'}> ) diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 6a5b11136..fea75a898 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -457,7 +457,7 @@ class Questionitem_banks extends Component { } if (this.state.item_type === "PROGRAM") { //编程题 跳转到 oj 中创建 - debugger + // debugger var myrbkc=[]; var Getdatasdatas=Getdatasdata[2].rbzsd; for(let myda of Getdatasdatas) { diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 9061b4bd7..e1d0f0bef 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -37,17 +37,17 @@ class Contentpart extends Component { this.props.chakanjiexibool(index); } componentDidUpdate(prevProps) { - if (prevProps.current_user !== this.props.current_user) { - debugger - const isysladmins = this.props && this.props.current_user && this.props.current_user.admin ? this.props.current_user.admin : false; - const is_teacher = this.props && this.props.current_user && this.props.current_user.is_teacher ? this.props.current_user.is_teacher : false; - const professional_certification = this.props && this.props.current_user && this.props.current_user.professional_certification ? this.props.current_user.professional_certification : false; - let { defaultActiveKey } = this.props; - var defaultActiveKeys = defaultActiveKey; - if (isysladmins === true || (is_teacher === true && professional_certification === true)) { - defaultActiveKeys = "0" - } else { - defaultActiveKeys = "1" + if(prevProps.current_user !== this.props.current_user) { + + const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; + const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; + let {defaultActiveKey} = this.props; + var defaultActiveKeys=defaultActiveKey; + if(isysladmins===true||(is_teacher===true&&professional_certification===true)){ + defaultActiveKeys="0" + }else{ + defaultActiveKeys="1" } this.props.callback(defaultActiveKeys); } @@ -95,11 +95,12 @@ class Contentpart extends Component { } render() { - let { page } = this.state; - let { defaultActiveKey, item_type, booljupyterurls } = this.props; - const isysladmins = this.props && this.props.current_user && this.props.current_user.admin ? this.props.current_user.admin : false; - const is_teacher = this.props && this.props.current_user && this.props.current_user.is_teacher ? this.props.current_user.is_teacher : false; - const professional_certification = this.props && this.props.current_user && this.props.current_user.professional_certification ? this.props.current_user.professional_certification : false; + let {page}=this.state; + let {defaultActiveKey,item_type,booljupyterurls}=this.props; + const defaultActiveKeys=defaultActiveKey+''; + const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; + const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; const content = ( @@ -165,15 +166,15 @@ class Contentpart extends Component { { - isysladmins === true || (is_teacher === true && professional_certification === true) ? - this.props.callback(e)}> - - - - - + isysladmins===true||(is_teacher===true&&professional_certification===true)? + this.props.callback(e)}> + + + + + : - this.props.callback(e)}> + this.props.callback(e)}> diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index b3da84054..51220e28c 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -80,10 +80,36 @@ class Headplugselections extends Component { }catch (e) { } + + + } + + shixunserdchAlls=(itme,id)=>{ + if(id!=undefined){ + this.setState({ + shixunsearchAllvalue:id, + }) + try { + this.props.setdiscipline_id(id); + }catch (e) { + + } + + } + console.log(itme); + console.log(itme[0]); + if(itme!=undefined){ + try { + this.props.setsub_discipline_id(id,itme[0].id); + }catch (e) { + + } + } } //获取方向 shixunsearchAll = (id) => { + //大写A //console.log("获取方向"); //console.log(id); if(id!=undefined){ @@ -141,6 +167,7 @@ class Headplugselections extends Component { } } + } render() { let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state; @@ -233,7 +260,7 @@ class Headplugselections extends Component { return( item.sub_disciplines.length>0? trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}> -
  • this.shixunsearchAll(item.id)}> +
  • this.shixunserdchAlls(item.sub_disciplines,item.id)}> {item.name}
  • diff --git a/public/react/src/modules/question/component/Newknledpots.js b/public/react/src/modules/question/component/Newknledpots.js index b299654af..5d234fd5d 100644 --- a/public/react/src/modules/question/component/Newknledpots.js +++ b/public/react/src/modules/question/component/Newknledpots.js @@ -9,7 +9,10 @@ class PaperDeletModel extends Component { constructor(props) { super(props); this.state={ - newkntypeinput:"" + newkntypeinput:"", + errores:false, + errorestit:'', + addonAfteronelens3:0, } } isNull=( str )=>{ @@ -28,12 +31,23 @@ class PaperDeletModel extends Component { // }) // //console.log(e.target.value); // //console.log(e.target.value.length); + if(this.isNull(e.target.value)===true){ this.props.showNotification('不能输入空格'); + this.setState({ + errorestit:'不能输入空格', + errores:true, + boolred:true, + }) return } + this.setState({ - newkntypeinput: e.target.value + newkntypeinput: e.target.value, + addonAfteronelens3:e.target.value.length, + errorestit:'', + errores:false, + boolred:false, }) this.props.setboolred(false); // @@ -48,7 +62,8 @@ class PaperDeletModel extends Component { // }) // } // } - } + }; + mysinputOnBlur=(e)=>{ //console.log("失去焦点了"); } @@ -57,8 +72,28 @@ class PaperDeletModel extends Component { //console.log("获取焦点"); } + NewknTypedeltyoedels=()=>{ + debugger + if(this.state.newkntypeinput.length===0){ + this.setState({ + errorestit:'请输入知识点', + errores:true, + boolred:true, + }) + return + } + if(this.isNull(this.state.newkntypeinput)===true){ + this.setState({ + errorestit:'不能输入空格', + errores:true, + boolred:true, + }) + return + } + this.props.NewknTypedeltyoedel(this.state.newkntypeinput) + } render() { - + let{errores,errorestit,addonAfteronelens3}=this.state; return(
    -
    - + +
    +
    -
    + { + errores===true? +

    {errorestit}

    + :"" + } +
    diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index d0ecf3f89..25f43a975 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -931,10 +931,29 @@ margin-left: 18px; } -.btques { - width: 1021px; - background: rgba(249, 249, 249, 1); - border: 1px solid rgba(221, 221, 221, 1); +.inpustred .ant-input{ + border: 1px solid #f30707 !important; + border-right: 0px solid #FFFFff !important; +} +.inpustredysl .ant-input:hover{ + border: 1px solid #f30707 !important; + border-right: 0px solid #FFFFff !important; +} +.inpustredysl .ant-input:active{ + border: 1px solid #f30707 !important; + border-right: 0px solid #FFFFff !important; +} +.inpustredysl .ant-input-group-addon{ + border: 1px solid #f30707 !important; + border-left: 0px solid #FFFFff !important; +} +.inpustredysl .ant-input-group-addon:hover{ + border: 1px solid #f30707 !important; + border-left: 0px solid #FFFFff !important; +} +.inpustredysl .ant-input-group-addon:active{ + border: 1px solid #f30707 !important; + border-left: 0px solid #FFFFff !important; } .borderwdswuhques { diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index e0151a2ff..7f9b4643f 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -57,7 +57,7 @@ class Contentpart extends Component { render() { let {page}=this.state; let {defaultActiveKey}=this.props; - + const defaultActiveKeys=defaultActiveKey+''; const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; @@ -108,14 +108,14 @@ class Contentpart extends Component { { isysladmins===true||(is_teacher===true&&professional_certification===true)? - this.props.callback(e)}> + this.props.callback(e)}> : - this.props.callback(e)}> + this.props.callback(e)}>