|
|
@ -30,8 +30,22 @@ class Addshixuns extends Component {
|
|
|
|
this.props.modalCancel()
|
|
|
|
this.props.modalCancel()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否为空
|
|
|
|
|
|
|
|
getshixunname( str ){
|
|
|
|
|
|
|
|
if ( str == "" ) return true;
|
|
|
|
|
|
|
|
var regu = "^[ ]+$";
|
|
|
|
|
|
|
|
var re = new RegExp(regu);
|
|
|
|
|
|
|
|
return re.test(str);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
modalSave=()=>{
|
|
|
|
modalSave=()=>{
|
|
|
|
let {shixunname}=this.state;
|
|
|
|
let {shixunname}=this.state;
|
|
|
|
|
|
|
|
if(this.getshixunname(shixunname)===true){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
shixunzero:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
if(shixunname===undefined||shixunname.length===0){
|
|
|
|
if(shixunname===undefined||shixunname.length===0){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
shixunzero:true
|
|
|
|
shixunzero:true
|
|
|
|