dev_oauth
parent
71521968f4
commit
a62d58fb21
@ -1,108 +1,108 @@
|
|||||||
import React,{ Component } from "react";
|
import React,{ Component } from "react";
|
||||||
import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
|
import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
|
||||||
|
|
||||||
|
|
||||||
class ModulationModal extends Component{
|
class ModulationModal extends Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props);
|
super(props);
|
||||||
this.state={
|
this.state={
|
||||||
group_ids:[],
|
group_ids:[],
|
||||||
fileList:[],
|
fileList:[],
|
||||||
textareaval:undefined,
|
textareaval:undefined,
|
||||||
Inputsval:undefined
|
Inputsval:undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Saves=()=>{
|
Saves=()=>{
|
||||||
let {textareaval,Inputsval}=this.state;
|
let {textareaval,Inputsval}=this.state;
|
||||||
if(textareaval===""||textareaval===undefined){
|
if(textareaval===""||textareaval===undefined){
|
||||||
this.setState({
|
this.setState({
|
||||||
textareavaltype:true
|
textareavaltype:true
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
textareavaltype: false
|
textareavaltype: false
|
||||||
})
|
})
|
||||||
|
|
||||||
if(Inputsval===undefined||Inputsval===""){
|
if(Inputsval===undefined||Inputsval===""){
|
||||||
this.setState({
|
this.setState({
|
||||||
Inputsvaltype:true
|
Inputsvaltype:true
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.props.Saves(textareaval,Inputsval)
|
this.props.Saves(textareaval,Inputsval)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settextarea=(e)=>{
|
settextarea=(e)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
textareaval:e.target.value
|
textareaval:e.target.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setInputs=(e)=>{
|
setInputs=(e)=>{
|
||||||
var value=parseInt(e.target.value)
|
var value=parseInt(e.target.value)
|
||||||
|
|
||||||
if(isNaN(value)){
|
if(isNaN(value)){
|
||||||
value=0
|
value=0
|
||||||
}else{
|
}else{
|
||||||
if(value<0||value>100){
|
if(value<0||value>100){
|
||||||
value=0
|
value=0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
Inputsval:value
|
Inputsval:value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
render(){
|
render(){
|
||||||
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
|
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<Modal
|
<Modal
|
||||||
keyboard={false}
|
keyboard={false}
|
||||||
className={"HomeworkModal"}
|
className={"HomeworkModal"}
|
||||||
title={this.props.modalname || '调分'}
|
title={this.props.modalname || '调分'}
|
||||||
visible={this.props.visible}
|
visible={this.props.visible}
|
||||||
closable={false}
|
closable={false}
|
||||||
footer={null}
|
footer={null}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
>
|
>
|
||||||
<div className="task-popup-content">
|
<div className="task-popup-content">
|
||||||
<p className="task-popup-text-center font-16">
|
<p className="task-popup-text-center font-16 mb20">
|
||||||
|
|
||||||
<span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
|
<span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<div className="clearfix">
|
<div className="clearfix">
|
||||||
<textarea
|
<textarea
|
||||||
className="winput-100-150"
|
className="winput-100-150"
|
||||||
placeholder="请填写您对作品调分的原因"
|
placeholder="请填写您对作品调分的原因"
|
||||||
value={textareaval}
|
value={textareaval}
|
||||||
onInput={this.settextarea}
|
onInput={this.settextarea}
|
||||||
></textarea>
|
></textarea>
|
||||||
<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>
|
<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>
|
||||||
</div>
|
</div>
|
||||||
<li>
|
<li>
|
||||||
<Input style={{
|
<Input style={{
|
||||||
width: '20%',
|
width: '20%',
|
||||||
}}
|
}}
|
||||||
placeholder="请填写分数"
|
placeholder="请填写分数"
|
||||||
value={Inputsval}
|
value={Inputsval}
|
||||||
onInput={this.setInputs}/> <span className="ml10">分</span>
|
onInput={this.setInputs}/> <span className="ml10">分</span>
|
||||||
</li>
|
</li>
|
||||||
<li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
|
<li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
|
||||||
<div className="clearfix edu-txt-center">
|
<div className="clearfix edu-txt-center">
|
||||||
<a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
|
<a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
|
||||||
<a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
|
<a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default ModulationModal;
|
export default ModulationModal;
|
Loading…
Reference in new issue