From 191973cbf5d90ab3df3765fd8f29d31c74775f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 11 Feb 2020 20:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/question/Paperreview.js | 2 +- .../modules/question/Questionitem_banks.js | 2 +- .../modules/question/component/Contentpart.js | 7 +- .../question/component/Headplugselections.js | 29 +++++++- .../question/component/Newknledpots.js | 67 ++++++++++++++++--- .../question/questioncss/questioncom.css | 24 ++++++- .../testpaper/component/Contentpart.js | 6 +- 7 files changed, 118 insertions(+), 19 deletions(-) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 2adc77c03..bdd5f20a9 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -449,7 +449,7 @@ class Paperreview extends Component { this.setCohetepaperbool(bool)} - onSubmits={() => this.preservation()} url={'/question'}> + 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 8828bf94c..bdaa7a12a 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -466,7 +466,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 af81f43c3..6b6c57a43 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -38,7 +38,7 @@ class Contentpart extends Component { } 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; @@ -97,6 +97,7 @@ class Contentpart extends Component { render() { 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; @@ -166,14 +167,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)}> 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(
    -
    - + +
    +
    - diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index 7f164535b..3fee3fc1e 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -996,8 +996,28 @@ } .inpustred .ant-input{ - border: 1px solid #f30707; - border-radius: 5px; + 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; } .mt15{ 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)}>