合并阿里云

issues25489
杨树林 5 years ago
parent 90bc7648b9
commit 40ac08166b

@ -33,7 +33,7 @@ class ModulationModal extends Component{
this.setState({
Inputsval: "",
Inputsvaltype: true,
Inputsvaltest: "请输入分数",
Inputsvaltest: "请填写分数",
})
return
}
@ -58,29 +58,39 @@ class ModulationModal extends Component{
setInputs=(e)=>{
console.log("setInputs");
console.log(e);
if (e === undefined || e === null || e === "") {
console.log(e.target.value);
if (e.target.value === undefined || e.target.value === null || e.target.value === "") {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: 0,
Inputsval: "",
Inputsvaltype: true,
Inputsvaltest: "请输入分数",
Inputsvaltest: "请填写分数",
})
return
}
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
var nubmer = e;
var nubmer = e.target.value;
if (!re.test(nubmer)) {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: e,
Inputsval: e.target.value,
Inputsvaltype: true,
Inputsvaltest: "请输入0-100的分数",
})
return;
}
if (parseFloat(e.target.value) > 100) {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: e.target.value,
Inputsvaltype: true,
Inputsvaltest: "请输入0-100的分数",
})
return;
}
this.setState({
Inputsval: parseFloat(e),
Inputsval: parseFloat(e.target.value),
Inputsvaltype: false,
})
}
@ -133,19 +143,36 @@ class ModulationModal extends Component{
line-height: 40px;
height: 35px;
}
`
}
</style>
<InputNumber min={0}
className={Inputsvaltype === true ? "borerinput myinputnumbers" : "myinputnumbers"}
style={{
{Inputsvaltype === true ?
<style>
{
`
.ant-input:hover {
border: 1px solid #DD1717!important;
}
.ant-input:focus {
border: 1px solid #DD1717!important;
}
}
`
}
</style>
:
""
} <Input
className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"}
style={{
width: "120px",
height: "40px",
}}
step={0.1}
onChange={(e) => this.setInputs(e)}
value={Inputsval === undefined || Inputsval === null ? 0 : Inputsval}/>
placeholder="请填写分数"
onChange={(e) => this.setInputs(e)}
value={Inputsval === undefined || Inputsval === null ? "" : Inputsval}/>
<span
style={{
textAlign: "center",

@ -344,3 +344,5 @@
border: 1px solid #eee !important;
}

@ -1243,6 +1243,9 @@ class Studentshavecompletedthelist extends Component {
exercise_status:0,
order_type: "desc",
exeuserid: 0,
subjective: 0,
objective_score: 0,
subjective_score: 0,
}
// //console.log("Studentshavecompletedthelist");
// //console.log(props.current_status);

Loading…
Cancel
Save