PCqiandao
杨树明 5 years ago
parent c6d6ab0950
commit 7406f2326b

@ -69,6 +69,12 @@ class NullChildEditor extends Component{
style={{float: 'right'}} style={{float: 'right'}}
></i> ></i>
</Tooltip> } </Tooltip> }
{itemIndex === 0 && <Tooltip title="删除">
<i className="iconfont icon-htmal5icon19 font-18 color-grey-c ml10"
onClick={() => this.props.deleteChildAnswermain(index, itemIndex)}
style={{float: 'right'}}
></i>
</Tooltip> }
{ <Tooltip title={`新增参考答案`}> { <Tooltip title={`新增参考答案`}>
<i className="color-green font-16 iconfont icon-roundaddfill ml6" <i className="color-green font-16 iconfont icon-roundaddfill ml6"
onClick={() => addChildAnswer(index)} onClick={() => addChildAnswer(index)}

@ -217,6 +217,21 @@ class NullEditor extends Component{
) )
} }
deleteChildAnswermain=(index, childIndex)=>{
let newstandard_answers=this.state.standard_answers
this.props.confirm({
content: `确认要删除这个参考答案吗?`,
onOk: () => {
newstandard_answers.splice(index,1)
this.setState({
standard_answers:newstandard_answers
})
}
})
}
deleteChildAnswer = (index, childIndex) => { deleteChildAnswer = (index, childIndex) => {
if(!this.state.standard_answers[index][childIndex]) { if(!this.state.standard_answers[index][childIndex]) {
this.setState( this.setState(
@ -321,6 +336,7 @@ class NullEditor extends Component{
onAnswerChange={this.onAnswerChange} onAnswerChange={this.onAnswerChange}
addChildAnswer={this.addChildAnswer} addChildAnswer={this.addChildAnswer}
deleteChildAnswer={this.deleteChildAnswer} deleteChildAnswer={this.deleteChildAnswer}
deleteChildAnswermain={this.deleteChildAnswermain}
></NullChildEditor> ></NullChildEditor>
// answer.map((item, itemIndex) => { // answer.map((item, itemIndex) => {
// return <DMDEditor // return <DMDEditor

@ -150,6 +150,10 @@
color:#FF835C; color:#FF835C;
} }
.color909399{
color:#909399;
}
.color1890FF{ .color1890FF{
color:#1890FF; color:#1890FF;
} }
@ -186,3 +190,13 @@
.sginboxcolorFF835C .ant-select-arrow{ .sginboxcolorFF835C .ant-select-arrow{
color: #FF835C !important; color: #FF835C !important;
} }
.sginboxcolor909399 .ant-select-selection--single{
border:1px solid #909399 !important;
}
.sginboxcolor909399 .ant-select-arrow{
color: #909399 !important;
}

@ -23,12 +23,12 @@ class Signedinlist extends Component {
{id:undefined,name:"全部状态"}, {id:undefined,name:"全部状态"},
{id:"NORMAL",name:"正常签到"}, {id:"NORMAL",name:"正常签到"},
{id:"LEAVE",name:"请 假"}, {id:"LEAVE",name:"请 假"},
{id:"ABSENCE",name:"旷 课"}, {id:"ABSENCE",name:this.props.defaultActiveKey ==="2"?"旷 课":"未签到"},
], ],
newstate:[ newstate:[
{id:"NORMAL",name:"正常签到"}, {id:"NORMAL",name:"正常签到"},
{id:"LEAVE",name:"请 假"}, {id:"LEAVE",name:"请 假"},
{id:"ABSENCE",name:"旷 课"}, {id:"ABSENCE",name:this.props.defaultActiveKey ==="2"?"旷 课":"未签到"},
], ],
course_members_count:'--', course_members_count:'--',
attendance_count:'--', attendance_count:'--',
@ -36,8 +36,6 @@ class Signedinlist extends Component {
} }
componentDidMount() { componentDidMount() {
this.getdatas(this.props&&this.props.switattendance_id,1,[],undefined) this.getdatas(this.props&&this.props.switattendance_id,1,[],undefined)
// this.getpath() // this.getpath()
} }
@ -161,7 +159,6 @@ class Signedinlist extends Component {
} }
handleChangestate=(value)=>{ handleChangestate=(value)=>{
let neval let neval
if(!value){ if(!value){
neval=undefined neval=undefined
this.setState({ this.setState({
@ -214,6 +211,7 @@ class Signedinlist extends Component {
this.setState({ this.setState({
member_attendances:newmember_attendances member_attendances:newmember_attendances
}) })
this.props.mygetdatas()
} }
}) })
.catch(function (error) { .catch(function (error) {
@ -264,14 +262,14 @@ class Signedinlist extends Component {
<span> <span>
<Select key={record.index} defaultValue={record.attendance_status} <Select key={record.index} defaultValue={record.attendance_status}
// className={"Signedinlistbox"} // className={"Signedinlistbox"}
className={record.attendance_status==="NORMAL"?"color26C7C9 Signedinlistbox sginboxcolor26C7C9":record.attendance_status==="LEAVE"?"colorEAAE4E Signedinlistbox sginboxcolorEAAE4E":record.attendance_status==="ABSENCE"?"colorFF835C Signedinlistbox sginboxcolorFF835C":"Signedinlistbox"} className={record.attendance_status==="NORMAL"?"color26C7C9 Signedinlistbox sginboxcolor26C7C9":record.attendance_status==="LEAVE"?"colorEAAE4E Signedinlistbox sginboxcolorEAAE4E":record.attendance_status==="ABSENCE"?this.props.defaultActiveKey==="2"?"colorFF835C Signedinlistbox sginboxcolorFF835C":"color909399 Signedinlistbox sginboxcolor909399":"Signedinlistbox"}
style={{ width: 167 }} onChange={(e)=>this.handleChange(e,record.user_id)}> style={{ width: 167 }} onChange={(e)=>this.handleChange(e,record.user_id)}>
{ {
newstate&&newstate.map((item,key)=>{ newstate&&newstate.map((item,key)=>{
return( return(
<Option value={item.id} key={key} <Option value={item.id} key={key}
className={item.name==="正常签到"?"color26C7C9 sginbox":item.name==="请 假"?"colorEAAE4E sginbox":item.name==="旷 课"?"colorFF835C sginbox":""}>{item.name}</Option> className={item.name==="正常签到"?"color26C7C9 sginbox":item.name==="请 假"?"colorEAAE4E sginbox":item.name==="旷 课"?"colorFF835C sginbox": item.name ==="未签到"?"color909399 sginbox":""}>{item.name}</Option>
) )
}) })
} }

Loading…
Cancel
Save