|
|
@ -293,7 +293,20 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
funtaskstatus=(checkedValues)=>{
|
|
|
|
funtaskstatus=(checkedValues)=>{
|
|
|
|
let{memberslist,selectobjct}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
let{memberslist,selectobjct,workslist}=this.state;
|
|
|
|
|
|
|
|
if(selectobjct.length>workslist.max_num){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
minvalue:workslist.max_num,
|
|
|
|
|
|
|
|
setvalue:"大于",
|
|
|
|
|
|
|
|
minmaxtype:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
minmaxtype:false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
let newlist =memberslist;
|
|
|
|
let newlist =memberslist;
|
|
|
|
let newcheckedValues=checkedValues;
|
|
|
|
let newcheckedValues=checkedValues;
|
|
|
|
let selects=[];
|
|
|
|
let selects=[];
|
|
|
@ -309,6 +322,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
task_status:checkedValues,
|
|
|
|
task_status:checkedValues,
|
|
|
|
selectmemberslist:selects
|
|
|
|
selectmemberslist:selects
|
|
|
@ -347,12 +361,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
handleSubmit=(e) => {
|
|
|
|
handleSubmit=(e) => {
|
|
|
|
|
|
|
|
|
|
|
|
let {fileList,selectmemberslist,workslist}=this.state;
|
|
|
|
let {fileList,selectmemberslist,workslist}=this.state;
|
|
|
|
if(fileList.length===0){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
shixunsreplace:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Commoninterface(fileList,selectmemberslist,workslist);
|
|
|
|
this.Commoninterface(fileList,selectmemberslist,workslist);
|
|
|
|
// setTimeout(function () {
|
|
|
|
// setTimeout(function () {
|
|
|
@ -361,6 +370,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Commoninterface =(fileList,selectmemberslist,workslist)=>{
|
|
|
|
Commoninterface =(fileList,selectmemberslist,workslist)=>{
|
|
|
|
|
|
|
|
|
|
|
|
let userids=[];
|
|
|
|
let userids=[];
|
|
|
|
|
|
|
|
|
|
|
|
for(var list of selectmemberslist){
|
|
|
|
for(var list of selectmemberslist){
|
|
|
@ -386,17 +396,16 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(workslist.task_type===2){
|
|
|
|
if(workslist.task_type===2){
|
|
|
|
if(userids.length<2){
|
|
|
|
if(userids.length<workslist.min_num){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
minvalue:2,
|
|
|
|
minvalue:workslist.min_num,
|
|
|
|
setvalue:"小于",
|
|
|
|
setvalue:"小于",
|
|
|
|
minmaxtype:true
|
|
|
|
minmaxtype:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}else if(userids.length>5){
|
|
|
|
}else if(userids.length>workslist.max_num){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
minvalue:5,
|
|
|
|
minvalue:workslist.max_num,
|
|
|
|
setvalue:"大于",
|
|
|
|
setvalue:"大于",
|
|
|
|
minmaxtype:true
|
|
|
|
minmaxtype:true
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -409,6 +418,13 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
let workId=this.props.match.params.work_Id;
|
|
|
|
let workId=this.props.match.params.work_Id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(fileList.length===0){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
shixunsreplace:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let url="/graduation_works/"+workId+".json";
|
|
|
|
let url="/graduation_works/"+workId+".json";
|
|
|
|
axios.put(url, {
|
|
|
|
axios.put(url, {
|
|
|
|
description:values.description,
|
|
|
|
description:values.description,
|
|
|
@ -474,7 +490,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
multiple: true,
|
|
|
|
multiple: true,
|
|
|
|
// https://github.com/ant-design/ant-design/issues/15505
|
|
|
|
// https://github.com/ant-design/ant-design/issues/15505
|
|
|
|
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
|
|
|
|
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
|
|
|
|
showUploadList: false,
|
|
|
|
// showUploadList: false,
|
|
|
|
action: `${getUrl()}/api/attachments.json`,
|
|
|
|
action: `${getUrl()}/api/attachments.json`,
|
|
|
|
onChange: this.handleChange,
|
|
|
|
onChange: this.handleChange,
|
|
|
|
onRemove: this.onAttachmentRemove,
|
|
|
|
onRemove: this.onAttachmentRemove,
|
|
|
@ -628,37 +644,37 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
{/*<style>*/}
|
|
|
|
{
|
|
|
|
{/*{*/}
|
|
|
|
`
|
|
|
|
{/*`*/}
|
|
|
|
.maxwidth500{
|
|
|
|
{/*.maxwidth500{*/}
|
|
|
|
max-width:500px;
|
|
|
|
{/*max-width:500px;*/}
|
|
|
|
overflow: hidden;
|
|
|
|
{/*overflow: hidden;*/}
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
{/*text-overflow: ellipsis;*/}
|
|
|
|
white-space: nowrap;
|
|
|
|
{/*white-space: nowrap;*/}
|
|
|
|
color: #05101a;
|
|
|
|
{/*color: #05101a;*/}
|
|
|
|
}
|
|
|
|
{/*}*/}
|
|
|
|
`
|
|
|
|
{/*`*/}
|
|
|
|
}
|
|
|
|
{/*}*/}
|
|
|
|
</style>
|
|
|
|
{/*</style>*/}
|
|
|
|
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{
|
|
|
|
{/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/}
|
|
|
|
return(
|
|
|
|
{/*return(*/}
|
|
|
|
<p className="color-grey mt10" key={key} >
|
|
|
|
{/*<p className="color-grey mt10" key={key} >*/}
|
|
|
|
<a className="color-grey fl">
|
|
|
|
{/*<a className="color-grey fl">*/}
|
|
|
|
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
|
|
|
|
{/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
|
|
|
|
</a>
|
|
|
|
{/*</a>*/}
|
|
|
|
<span className="mr12 color9B9B maxwidth500 fl" length="58">
|
|
|
|
{/*<span className="mr12 color9B9B maxwidth500 fl" length="58">*/}
|
|
|
|
{item.name}
|
|
|
|
{/*{item.name}*/}
|
|
|
|
</span>
|
|
|
|
{/*</span>*/}
|
|
|
|
<span className="color656565 mt2 color-grey-6 font-12 mr8">
|
|
|
|
{/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
|
|
|
|
{item.response===undefined?"":bytesToSize(item.size)}
|
|
|
|
{/*{item.response===undefined?"":bytesToSize(item.size)}*/}
|
|
|
|
</span>
|
|
|
|
{/*</span>*/}
|
|
|
|
<i className="font-14 iconfont icon-guanbi "
|
|
|
|
{/*<i className="font-14 iconfont icon-guanbi "*/}
|
|
|
|
id={item.response===undefined?"":item.response.id}
|
|
|
|
{/*id={item.response===undefined?"":item.response.id}*/}
|
|
|
|
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>
|
|
|
|
{/*aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>*/}
|
|
|
|
</p>
|
|
|
|
{/*</p>*/}
|
|
|
|
)
|
|
|
|
{/*)*/}
|
|
|
|
})}
|
|
|
|
{/*})}*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -675,7 +691,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div className={"fl ml20"}>成员要求:2~5人</div>
|
|
|
|
<div className={"fl ml20"}>成员要求:{workslist&&workslist.min_num}~{workslist&&workslist.max_num}人</div>
|
|
|
|
<Search
|
|
|
|
<Search
|
|
|
|
className={"fl mt5 ml20"}
|
|
|
|
className={"fl mt5 ml20"}
|
|
|
|
style={{width:"270px"}}
|
|
|
|
style={{width:"270px"}}
|
|
|
@ -724,7 +740,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
</div>:memberslist&&memberslist.map((item,key)=>{
|
|
|
|
</div>:memberslist&&memberslist.map((item,key)=>{
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div key={key} style={{
|
|
|
|
<div key={key} style={{
|
|
|
|
width: '375px',
|
|
|
|
width: '400px',
|
|
|
|
height: '30px'
|
|
|
|
height: '30px'
|
|
|
|
}}>
|
|
|
|
}}>
|
|
|
|
<Checkbox value={item.user_id}
|
|
|
|
<Checkbox value={item.user_id}
|
|
|
@ -735,8 +751,8 @@ 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 width100"} 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 width100 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
|
|
|
|
<div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
|
|
|
|
<div className={"fl ml5 color-grey-9 fonthidden width100"} style={{width: '70px'}}>{item.student_id}</div>
|
|
|
|
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{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>
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -760,7 +776,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
height: '30px',
|
|
|
|
height: '30px',
|
|
|
|
display: item.user_name === undefined ? "none" : ""
|
|
|
|
display: item.user_name === undefined ? "none" : ""
|
|
|
|
}}>
|
|
|
|
}}>
|
|
|
|
<div className={"fl ml5 fonthidden width100"} style={{width: '50px'}}
|
|
|
|
<div className={"fl ml5 fonthidden width100"}
|
|
|
|
title={item.user_name}>{item.user_name}</div>
|
|
|
|
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 fonthidden width100 color-grey-9"}>{item.group_name}</div>
|
|
|
|
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
|
|
|
|
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
|
|
|
@ -769,6 +785,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
style={{marginTop: '-4px'}}
|
|
|
|
style={{marginTop: '-4px'}}
|
|
|
|
onClick={() => this.delecttask_status(item.user_id)}></i>
|
|
|
|
onClick={() => this.delecttask_status(item.user_id)}></i>
|
|
|
|
</div> : ""}
|
|
|
|
</div> : ""}
|
|
|
|
|
|
|
|
<div className={"both"}></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|