|
|
|
@ -29,11 +29,21 @@ class ModulationModal extends Component{
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if(Inputsval===undefined||Inputsval===""){
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsvaltype:true
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsval: "",
|
|
|
|
|
Inputsvaltype: true,
|
|
|
|
|
Inputsvaltest: "请输入分数",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.state.Inputsvaltype === true) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsvaltype: false,
|
|
|
|
|
Inputsvaltest: "",
|
|
|
|
|
})
|
|
|
|
|
this.props.Saves(textareaval,Inputsval)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -45,21 +55,34 @@ class ModulationModal extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setInputs=(e)=>{
|
|
|
|
|
debugger
|
|
|
|
|
var value=parseInt(e.target.value)
|
|
|
|
|
|
|
|
|
|
if(isNaN(value)){
|
|
|
|
|
value=0
|
|
|
|
|
value = 0;
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsval: value,
|
|
|
|
|
Inputsvaltype: true,
|
|
|
|
|
Inputsvaltest: "请输入分数",
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
if(value<0||value>100){
|
|
|
|
|
value=0
|
|
|
|
|
value = 0;
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsval: value,
|
|
|
|
|
Inputsvaltype: true,
|
|
|
|
|
Inputsvaltest: "请输入0-100的分数",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Inputsval:value
|
|
|
|
|
Inputsval: value,
|
|
|
|
|
Inputsvaltype: false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
|
|
|
|
|
let {textareaval, Inputsval, textareavaltype, Inputsvaltype, Inputsvaltest} = this.state;
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
<Modal
|
|
|
|
@ -82,6 +105,8 @@ class ModulationModal extends Component{
|
|
|
|
|
flexDirection: "initial",
|
|
|
|
|
}}>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span style={{
|
|
|
|
|
width: "70px",
|
|
|
|
|
textAlign: "center",
|
|
|
|
@ -91,7 +116,9 @@ class ModulationModal extends Component{
|
|
|
|
|
lineHeight: " 40px",
|
|
|
|
|
color: " #f5222d",
|
|
|
|
|
}}>*</span>调分:</span>
|
|
|
|
|
<Input style={{
|
|
|
|
|
<Input
|
|
|
|
|
className={Inputsvaltype === true ? "borerinput" : "borerinputs"}
|
|
|
|
|
style={{
|
|
|
|
|
width: "335px",
|
|
|
|
|
height: "40px",
|
|
|
|
|
}}
|
|
|
|
@ -108,6 +135,12 @@ class ModulationModal extends Component{
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
Inputsvaltype === true ?
|
|
|
|
|
<p style={{color: "#DD1717", width: "268px"}}>{Inputsvaltest}</p>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div style={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "initial",
|
|
|
|
|