dev_forum
杨树明 5 years ago
parent 6d05c363fc
commit 93fcb44a95

@ -35,6 +35,7 @@ class GraduationTasksSubmitedit extends Component{
attachments:undefined, attachments:undefined,
spinnings:false, spinnings:false,
shixunsreplace:false, shixunsreplace:false,
limit:20
} }
} }
@ -59,7 +60,7 @@ class GraduationTasksSubmitedit extends Component{
if(result.data.task_type===1){ if(result.data.task_type===1){
}else{ }else{
this.searchList("",1,10,result.data.task_id) this.searchList("",1,20,result.data.task_id)
} }
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -222,15 +223,15 @@ class GraduationTasksSubmitedit extends Component{
let {search,workslist} = this.state; let {search,workslist} = this.state;
this.searchList(search,1,10,workslist.task_id) this.searchList(search,1,20,workslist.task_id)
} }
searchList=(search,page,limit,id)=>{ searchList=(search,page,limit,id,types)=>{
let {memberslist}=this.state;
let newmemberslist=memberslist
this.setState({ this.setState({
search:search,
page:page,
limit:10
}) })
let newid=id let newid=id
if(newid===undefined){ if(newid===undefined){
@ -245,9 +246,28 @@ class GraduationTasksSubmitedit extends Component{
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
this.setState({ if(types===1){
memberslist:result.data if(result.data.members.length>0) {
}) result.data.members.map((item, key) => {
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
} }
}).catch((error)=>{ }).catch((error)=>{
@ -265,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{
let newpage=page+2 let newpage=page+2
this.searchList(search,newpage,limit,workslist.task_id) this.searchList(search,newpage,limit,workslist.task_id,1)
} }
@ -274,7 +294,7 @@ class GraduationTasksSubmitedit extends Component{
funtaskstatus=(checkedValues)=>{ funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state; let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members; let newlist =memberslist;
let newcheckedValues=checkedValues; let newcheckedValues=checkedValues;
let selects=[]; let selects=[];
@ -666,8 +686,8 @@ class GraduationTasksSubmitedit extends Component{
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.width87{ .width100{
width: 87px; width: 100px;
height: 24px; height: 24px;
} }
img.edu-nodata-img { img.edu-nodata-img {
@ -675,22 +695,25 @@ class GraduationTasksSubmitedit extends Component{
margin: 50px 90px 20px; margin: 50px 90px 20px;
display: block; display: block;
} }
.autos{
overflow: auto;
}
`}</style> `}</style>
</Form.Item> </Form.Item>
<div className={"ml20 mt10"} style={{width:"100%"}}> <div className={"ml20 mt10"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl autos"}
style={{paddingLeft: '9px'}} style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0? <div className="square-list clearfix"> {memberslist===undefined?"":memberslist.length===0? <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p> <p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div> </div>
</div>:memberslist&&memberslist.members.map((item,key)=>{ </div>:memberslist&&memberslist.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px', width: '375px',
@ -703,9 +726,9 @@ class GraduationTasksSubmitedit extends Component{
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div> <div className={"fl ml5 fonthidden width100"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width100"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
@ -719,22 +742,30 @@ class GraduationTasksSubmitedit extends Component{
<i className={"iconfont icon-youjiang fl ml20 mr20"}></i> <i className={"iconfont icon-youjiang fl ml20 mr20"}></i>
</div> </div>
<div className={"members fl"}> <div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{ {selectmemberslist&&selectmemberslist.map((item,key)=>{
return( if(item.group_name!=undefined) {
<div key={key} style={{ return (
width: '375px', <div key={key} style={{
height: '30px', width: '375px',
display:item.user_name===undefined?"none":"" height: '30px',
}}> display: item.user_name === undefined ? "none" : ""
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}} title={item.user_name}>{item.user_name}</div> }}>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100"} style={{width: '50px'}}
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> title={item.user_name}>{item.user_name}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} <div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
</div> <div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
) {key > 0 ?
<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"}
style={{marginTop: '-4px'}}
onClick={() => this.delecttask_status(item.user_id)}></i>
</div> : ""}
</div>
)
}
})} })}
</div> </div>

@ -32,7 +32,8 @@ class GraduationTasksSubmitnew extends Component{
selectobjct:undefined, selectobjct:undefined,
Loadtype:false, Loadtype:false,
spinnings:false, spinnings:false,
shixunsreplace:false shixunsreplace:false,
limit:20
} }
} }
@ -58,7 +59,7 @@ class GraduationTasksSubmitnew extends Component{
if(result.data.task_type===1){ if(result.data.task_type===1){
}else{ }else{
this.searchList("",1,10) this.searchList("",1,20)
} }
this.setState({ this.setState({
workslist:result.data, workslist:result.data,
@ -219,25 +220,42 @@ class GraduationTasksSubmitnew extends Component{
} }
searchList=(search,page,limit)=>{ searchList=(search,page,limit,types)=>{
this.setState({
search:search,
page:page,
limit:10
})
let id=this.props.match.params.task_Id; let id=this.props.match.params.task_Id;
let {memberslist}=this.state;
let newmemberslist=memberslist
let url="/graduation_tasks/"+id+"/graduation_works/search_member_list.json"; let url="/graduation_tasks/"+id+"/graduation_works/search_member_list.json";
axios.post(url,{ axios.post(url,{
search:search, search:search,
page:page, page:page,
limit:limit limit:15
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status!=403){ if(result.data.status!=403){
this.setState({ if(types===1){
memberslist:result.data if(result.data.members.length>0){
}) result.data.members.map((item,key)=>{
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
} }
} }
@ -256,7 +274,7 @@ class GraduationTasksSubmitnew extends Component{
let newpage=page+2 let newpage=page+2
this.searchList(search,newpage,limit) this.searchList(search,newpage,limit,1)
} }
@ -265,7 +283,7 @@ class GraduationTasksSubmitnew extends Component{
funtaskstatus=(checkedValues)=>{ funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state; let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members; let newlist =memberslist;
let newcheckedValues=checkedValues; let newcheckedValues=checkedValues;
let selects=[]; let selects=[];
selects.push(selectobjct) selects.push(selectobjct)
@ -318,7 +336,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state; let {search} = this.state;
this.searchList(search,1,10) this.searchList(search,1,20)
} }
} }
onSearchKeywordKeyUps= (e)=>{ onSearchKeywordKeyUps= (e)=>{
@ -648,8 +666,8 @@ render(){
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.width87{ .width100{
width: 87px; width: 100px;
height: 24px; height: 24px;
} }
img.edu-nodata-img { img.edu-nodata-img {
@ -657,21 +675,25 @@ render(){
margin: 50px 90px 20px; margin: 50px 90px 20px;
display: block; display: block;
} }
.autos{
overflow: auto;
}
`}</style> `}</style>
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl autos"}
style={{paddingLeft: '9px'}} style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0? {memberslist===undefined?"":memberslist.length===0?
<div className="square-list clearfix"> <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p> {/*<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>*/}
<p className="edu-nodata-p mb20">未找到该学生</p>
</div> </div>
</div>:memberslist&&memberslist.members.map((item,key)=>{ </div>:memberslist&&memberslist.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
@ -684,9 +706,9 @@ render(){
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} title={item.user_name} >{item.user_name}</div> <div className={"fl ml5 fonthidden width100"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width100"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
@ -704,22 +726,25 @@ render(){
white-space:nowrap white-space:nowrap
} }
`}</style> `}</style>
<div className={"members fl"}> <div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{ {selectmemberslist&&selectmemberslist.map((item,key)=>{
return( if(item.group_name!=undefined){
<div key={key} style={{ return(
width: '375px', <div key={key} style={{
height: '30px', width: '375px',
display:item.user_name===undefined?"none":"" height: '30px',
}}> display:item.user_name===undefined?"none":""
<div className={"fl ml5 fonthidden width87"} title={item.user_name}>{item.user_name}</div> }}>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> <div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} <div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
) </div>
)
}
})} })}
</div> </div>

@ -52,16 +52,17 @@ class ShixunWorkModal extends Component{
let types=false let types=false
let{group_list}=this.state; let{group_list}=this.state;
group_list.map((item,key)=>{ group_list.map((item,key)=>{
checkedValues.map((list,li)=>{ if(item!=undefined){
if(item.id===list){ checkedValues.map((list,li)=>{
if(item.works_count<2){ if(item.id===list){
this.props.showNotification(`有效作品数少于2个无法查重`) if(item.works_count<2){
types=true this.props.showNotification(`有效作品数少于2个无法查重`)
return types=true
return
}
} }
} })
}) }
}) })
if(types===false){ if(types===false){

Loading…
Cancel
Save