issues25489
杨树林 5 years ago
parent 975bd891b0
commit 497802afb6

@ -1,7 +1,9 @@
import React,{ Component } from "react";
import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
import {Modal, Checkbox, Upload, Button, Icon, message, Input, Form} from "antd";
import { WordNumberTextarea } from 'educoder';
import './Newshixunmodel.css'
//调分
class ModulationModal extends Component{
constructor(props){
super(props);
@ -16,12 +18,12 @@ class ModulationModal extends Component{
Saves=()=>{
let {textareaval,Inputsval}=this.state;
if(textareaval===""||textareaval===undefined){
this.setState({
textareavaltype:true
})
return
}
// if(textareaval===""||textareaval===undefined){
// this.setState({
// textareavaltype:true
// })
// return
// }
this.setState({
textareavaltype: false
})
@ -69,60 +71,120 @@ class ModulationModal extends Component{
footer={null}
destroyOnClose={true}
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 mb20">
<span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
</p>
<div className="clearfix">
{/*<textarea*/}
{/*className="winput-100-150"*/}
{/*placeholder="请填写您对作品调分的原因"*/}
{/*value={textareaval}*/}
{/*onInput={this.settextarea}*/}
{/*></textarea>*/}
<div className="clearfix" style={{
display: "-webkit-flex",
flexDirection: "column",
alignItems: "center",
}}>
<div style={{
marginTop: " 27px",
display: "flex",
flexDirection: "initial",
}}>
<span style={{
width: "70px",
textAlign: "center",
lineHeight: " 40px",
}}>*调分</span>
<Input style={{
width: "335px",
height: "40px",
}}
placeholder="请填写分数"
value={Inputsval}
onInput={this.setInputs}/>
<span className="ml10"
style={{
width: "70px",
textAlign: "center",
lineHeight: " 40px",
}}
></span>
</div>
<div style={{
display: "flex",
flexDirection: "initial",
}}>
<span style={{width: "70px"}}></span>
<p className=" mt3">调分后该学生的最终成绩将不会按照评分规则进行计算</p>
</div>
<div style={{
display: "flex",
flexDirection: "initial",
}}>
<span style={{width: "70px", marginTop: "6px"}}>调分原因</span>
<WordNumberTextarea
style={{width: "335px"}}
placeholder={"请填写您对作品调分的原因"}
onInput={(e)=>this.settextarea(e)}
onInput={(e) => this.settextarea(e)}
value={textareaval}
maxlength={100}
/>
</div>
<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>
</div>
<style>
{
`
.pdl10{
padding-left:10px;
}
`
}
</style>
<li className={"pdl10"}>
<Input style={{
width: '20%',
}}
placeholder="请填写分数"
value={Inputsval}
onInput={this.setInputs}/> <span className="ml10"></span>
</li>
<li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
<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 task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div>
</div>
</Modal>
</Modal>
</div>
)
}
}
export default ModulationModal;
export default ModulationModal;
// <div className="task-popup-content">
// <p className="task-popup-text-center font-16 mb20">
//
// <span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
//
// </p>
//
//
// <div className="clearfix">
// {/*<textarea*/}
// {/*className="winput-100-150"*/}
// {/*placeholder="请填写您对作品调分的原因"*/}
// {/*value={textareaval}*/}
// {/*onInput={this.settextarea}*/}
// {/*></textarea>*/}
//
// <WordNumberTextarea
// placeholder={"请填写您对作品调分的原因"}
// onInput={(e)=>this.settextarea(e)}
// value={textareaval}
// maxlength={100}
// />
//
// {/*<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>*/}
// <div style={{height:"20px",lineHeight:"20px"}}></div>
// </div>
//
// <style>
// {
//
// `
// .pdl10{
// padding-left:10px;
// }
// `
// }
// </style>
//
// <li className={"pdl10"}>
//
// </li>
// <li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
// <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 task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
{/* </div>*/
}
{/*</div>*/
}

@ -266,4 +266,54 @@
.padding13-30 {
padding: 13px 30px;
box-sizing: border-box;
}
}
.displaymodulat {
display: flex;
display: -webkit-flex;
flex-direction: column;
align-items: center;
}
.WordNumberTextarea {
outline: none; /* 去掉输入字符时的默认样式 */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-color: white;
text-shadow: none;
-webkit-writing-mode: horizontal-tb !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
resize: none; /*禁止拉伸*/
border: none; /*去掉默认边框*/
width: 100%;
height: 130px;
border: none;
display: block;
}
.WordNumbernote {
padding: 0;
margin: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
overflow: hidden;
height: auto;
border: 1px solid rgba(234, 234, 234, 1);
border-radius: 0.125rem;
margin: 10px 10px 0px 10px;
padding: 10px 10px 5px 10px;
backgroud: rgba(234, 234, 234, 1);
width: 335px;
}
.WordNumberTextarea-count {
display: inline-block;
float: right;
font-size: 16px;
color: #adadad;
padding-right: 0.25rem;
}

@ -1173,7 +1173,8 @@ class Listofworksstudentone extends Component {
className: 'font-14',
render: (text, record) => (
record.submitstate === "未提交" ?
<span style={{color: '#9A9A9A'}} onClick={() => this.Viewstudenttraininginformations()}>调分</span> :
<span style={{textAlign: "center", cursor: "pointer"}} className="color-blue"
onClick={() => this.Adjustment(record)}>调分</span> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformationt(record)}>查看</a>
@ -1504,7 +1505,8 @@ class Listofworksstudentone extends Component {
className: 'font-14',
render: (text, record) => (
record.submitstate === "未提交" ?
<span style={{color: '#9A9A9A'}} onClick={() => this.Viewstudenttraininginformations()}>调分</span> :
<span style={{textAlign: "center", cursor: "pointer"}} className="color-blue"
onClick={() => this.Adjustment(record)}>调分</span> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
@ -2801,14 +2803,14 @@ class Listofworksstudentone extends Component {
this.setState({visible: false})
}
// 调分
Viewstudenttraininginformations = (e) => {
// console.log("Viewstudenttraininginformations2");
Adjustment = (e) => {
// console.log("Adjustment");
// console.log(e.myid);
this.setState({
visible: true,
userid: e.myid,
// Tune
})
}
//确定
saveModulationModal = (value, num) => {
@ -3232,7 +3234,7 @@ class Listofworksstudentone extends Component {
<div className=" clearfix " style={{margin: "auto", minWidth: "1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
Cancel={() => this.cancelModulationModel()}
Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""}

Loading…
Cancel
Save