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

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

@ -32,7 +32,8 @@ class GraduationTasksSubmitnew extends Component{
selectobjct:undefined,
Loadtype:false,
spinnings:false,
shixunsreplace:false
shixunsreplace:false,
limit:20
}
}
@ -58,7 +59,7 @@ class GraduationTasksSubmitnew extends Component{
if(result.data.task_type===1){
}else{
this.searchList("",1,10)
this.searchList("",1,20)
}
this.setState({
workslist:result.data,
@ -219,26 +220,43 @@ class GraduationTasksSubmitnew extends Component{
}
searchList=(search,page,limit)=>{
this.setState({
search:search,
page:page,
limit:10
})
searchList=(search,page,limit,types)=>{
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";
axios.post(url,{
search:search,
page:page,
limit:limit
limit:15
}).then((result)=>{
if(result.status===200){
if(result.data.status!=403){
if(types===1){
if(result.data.members.length>0){
result.data.members.map((item,key)=>{
newmemberslist.push(item)
})
}
this.setState({
memberslist:result.data
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
}
}
}).catch((error)=>{
@ -256,7 +274,7 @@ class GraduationTasksSubmitnew extends Component{
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)=>{
let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members;
let newlist =memberslist;
let newcheckedValues=checkedValues;
let selects=[];
selects.push(selectobjct)
@ -318,7 +336,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state;
this.searchList(search,1,10)
this.searchList(search,1,20)
}
}
onSearchKeywordKeyUps= (e)=>{
@ -648,8 +666,8 @@ render(){
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
.width100{
width: 100px;
height: 24px;
}
img.edu-nodata-img {
@ -657,21 +675,25 @@ render(){
margin: 50px 90px 20px;
display: block;
}
.autos{
overflow: auto;
}
`}</style>
<div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"}
<div className={"members fl autos"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}>
<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="edu-tab-con-box clearfix edu-txt-center">
<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>:memberslist&&memberslist.members.map((item,key)=>{
</div>:memberslist&&memberslist.map((item,key)=>{
return(
<div key={key} style={{
@ -684,9 +706,9 @@ render(){
})
}
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 width87 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 fonthidden width100"} title={item.user_name} >{item.user_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 width100"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
@ -704,22 +726,25 @@ render(){
white-space:nowrap
}
`}</style>
<div className={"members fl"}>
<div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{
if(item.group_name!=undefined){
return(
<div key={key} style={{
width: '375px',
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 color-grey-9 fonthidden width87"}>{item.student_id}</div>
<div className={"fl ml5 fonthidden width100"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</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>

@ -52,6 +52,7 @@ class ShixunWorkModal extends Component{
let types=false
let{group_list}=this.state;
group_list.map((item,key)=>{
if(item!=undefined){
checkedValues.map((list,li)=>{
if(item.id===list){
if(item.works_count<2){
@ -61,7 +62,7 @@ class ShixunWorkModal extends Component{
}
}
})
}
})
if(types===false){

Loading…
Cancel
Save