mast_item_banktwo
杨树林 5 years ago
parent dd0a431c2d
commit 191973cbf5

@ -449,7 +449,7 @@ class Paperreview extends Component {
<Bottomsubmit {...this.props} {...this.state} bottomvalue={Cohetepaperbool===false?"保存组卷":"完成"}
setCohetepaperbool={(bool)=>this.setCohetepaperbool(bool)}
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit>
onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/question':'/paperlibrary'}></Bottomsubmit>
</div>
)

@ -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) {

@ -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)?
<Tabs activeKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
<Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
<TabPane tab="我的" key="0">
</TabPane>
</Tabs>
:
<Tabs activeKey={1} onChange={(e)=>this.props.callback(e)}>
<Tabs activeKey={"1"} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
</Tabs>

@ -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?
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}>
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunsearchAll(item.id)}>
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunserdchAlls(item.sub_disciplines,item.id)}>
{item.name}
</li>
</Dropdown>

@ -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(
<Modal
keyboard={false}
@ -71,12 +106,28 @@ class PaperDeletModel extends Component {
width="442px"
>
<div className="educouddiv">
<div className={this.props.boolred===true?"tabeltext-alignleft mt10 inpustred":"tabeltext-alignleft mt10"}>
<Input onInput={this.handleChange} maxLength={15} onBlur={this.mysinputOnBlur } onFocus={this.inputOnFocus }/>
<style>
{
`
.eduinpus .ant-input{
width: 310px !important;
border-right: 0px solid #FFFFff !important;
}
`
}
</style>
<div className={this.props.boolred===true?"tabeltext-alignleft mt10 inpustred inpustredysl eduinpus":errores===true?"tabeltext-alignleft mt10 inpustred inpustredysl eduinpus":"tabeltext-alignleft mt10 eduinpus"}>
<Input className={"eduinpus"} onInput={this.handleChange} maxLength={15} onBlur={this.mysinputOnBlur } addonAfter={String(addonAfteronelens3)+"/15"} onFocus={this.inputOnFocus }/>
</div>
<div className="clearfix mt30 edu-txt-center">
{
errores===true?
<p className={"xingcolor"}>{errorestit}</p>
:""
}
<div className={errores===true?"clearfix mt10 edu-txt-center":"clearfix mt30 edu-txt-center"}>
<a className="task-btn mr30 w80" onClick={()=>this.props.NewknTypedeldel(false)}>取消</a>
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.NewknTypedeltyoedel(this.state.newkntypeinput)}>确定</a>
<a className="task-btn task-btn-orange w80" onClick={ ()=>this.NewknTypedeltyoedels()}>确定</a>
</div>
</div>
</Modal>

@ -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{

@ -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)?
<Tabs activeKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
<Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
<TabPane tab="我的" key="0">
</TabPane>
</Tabs>
:
<Tabs activeKey={1} onChange={(e)=>this.props.callback(e)}>
<Tabs activeKey={"1"} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
</Tabs>

Loading…
Cancel
Save