杨树林 6 years ago
commit c6f7e9dd99

@ -22,6 +22,7 @@ class Associationmodel extends Component{
projects:undefined, projects:undefined,
projectvalue:undefined, projectvalue:undefined,
projectvaluetype:false, projectvaluetype:false,
searchtypes:false
} }
} }
@ -38,10 +39,10 @@ class Associationmodel extends Component{
search: search search: search
} }
}).then((result)=>{ }).then((result)=>{
console.log(result)
if(result.status===200){ if(result.status===200){
this.setState({ this.setState({
projects:result.data.projects projects:result.data.projects,
searchtypes:search===undefined&&result.data.projects.length==0?true:false
}) })
} }
@ -58,13 +59,11 @@ class Associationmodel extends Component{
goback=()=>{ goback=()=>{
this.props.funlist()
this.props.Cancel()
console.log(this.props)
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
this.props.funlist()
this.props.Cancel()
} }
@ -80,13 +79,13 @@ class Associationmodel extends Component{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
this.setState({ // this.setState({
Modalstype:true, // Modalstype:true,
Modalstopval:result.data.message, // Modalstopval:result.data.message,
ModalSave:this.goback, // ModalSave:this.goback,
loadtype:true // loadtype:true
}) // })
this.props.funlist() this.goback
} }
} }
@ -96,7 +95,9 @@ class Associationmodel extends Component{
}) })
} }
Saves=()=>{ Saves=()=>{
let {projectvalue}=this.state; let {projectvalue,searchtypes}=this.state
if(searchtypes===false){
if(projectvalue===undefined||projectvalue===""){ if(projectvalue===undefined||projectvalue===""){
this.setState({ this.setState({
projectvaluetype:true, projectvaluetype:true,
@ -114,29 +115,25 @@ class Associationmodel extends Component{
project_id: projectvalue project_id: projectvalue
} }
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.is_relate===false){ if(result.data.is_relate===false){
this.setSaves() this.setSaves()
}else{ }else{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"该项目已被"+result.data.relate_user+"关联", Modalstopval:"该项目已被"+result.data.relate_user+"关联",
ModalSave:this.ModalSave, ModalSave:this.ModalSave,
loadtype:true loadtype:true
}) })
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
}else{
this.goback()
}
} }
onChange = (e) => { onChange = (e) => {
@ -190,7 +187,7 @@ class Associationmodel extends Component{
destroyOnClose={true} destroyOnClose={true}
> >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16"> {this.state.searchtypes===false? <p className="task-popup-text-center font-16">
<Search <Search
placeholder="请输入项目名称进行搜索" placeholder="请输入项目名称进行搜索"
@ -201,31 +198,55 @@ class Associationmodel extends Component{
autoComplete="off" autoComplete="off"
></Search> ></Search>
</p> </p>:""}
<style>
<div className={"Association mb20"}> {
`
.project_namestyle{
width: 470px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
`
}
</style>
{this.state.searchtypes===false?<div className={"Association mb20"} style={{
paddingLeft:'0px'
}}>
<RadioGroup onChange={this.onChange} value={projectvalue}> <RadioGroup onChange={this.onChange} value={projectvalue}>
{projects&&projects.map((item,key)=>{ {projects&&projects.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px',
height: '30px' height: '30px'
}}> }}>
<Radio value={item.project_id} className="fl "></Radio> <Radio value={item.project_id} className="fl "></Radio>
<div className={"fl ml5"}>{item.project_name}</div> <div className={"fl ml5 project_namestyle"}>{item.project_name}</div>
</div> </div>
) )
})} })}
</RadioGroup> </RadioGroup>
</div>:
<div style={{
paddingLeft:'0px'
}}>
<div style={{
margin:'0px 20%'
}}>
你当前尚未管理任何项目请先 <span><a style={{color:'#1890ff'}} href={"/projects/new"}>创建项目</a> </span>
</div> </div>
</div>}
{projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""} {projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""}
<div className="clearfix mt30 edu-txt-center mb10"> <div className="clearfix mt25 edu-txt-center mb10">
<a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a> <a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a> <a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a>
</div> </div>

@ -1314,8 +1314,8 @@ a.white-btn.use_scope-btn:hover{
.Association{ .Association{
width: 100%; width: 100%;
height: 400px; height: 240px;
padding: 20px; margin-top: 14px;
overflow: auto; overflow: auto;
} }

@ -80,7 +80,8 @@ class GraduationTasksSubmitedit extends Component{
let workId=this.props.match.params.work_Id; let workId=this.props.match.params.work_Id;
let {workslist}=this.state let {workslist}=this.state
let task_id=workslist&&workslist.task_id; let task_id=workslist&&workslist.task_id;
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit"; // window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit";
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
} }
handleSubmit=(e) => { handleSubmit=(e) => {
@ -248,7 +249,7 @@ class GraduationTasksSubmitedit extends Component{
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
let {attachments,fileList}=this.state; let {attachments,fileList}=this.state;
const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json` const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -592,7 +593,9 @@ class GraduationTasksSubmitedit extends Component{
{workslist&&workslist.task_type===1?"": {workslist&&workslist.task_type===1?"":
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white"
style={{borderTop:'1px solid #ccc'}}
>
<Form.Item <Form.Item
label="小组成员" label="小组成员"
@ -632,6 +635,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"members fl"} <div className={"members fl"}
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'}}>
@ -653,9 +657,7 @@ class GraduationTasksSubmitedit extends Component{
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_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 color-grey-9 fonthidden width87"} 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>
@ -680,12 +682,10 @@ class GraduationTasksSubmitedit extends Component{
height: '30px', height: '30px',
display:item.user_name===undefined?"none":"" display:item.user_name===undefined?"none":""
}}> }}>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} style={{width: '50px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_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 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></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>
) )
})} })}

@ -550,7 +550,9 @@ render(){
{workslist&&workslist.task_type===1?"": {workslist&&workslist.task_type===1?"":
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white"
style={{borderTop:'1px solid #ccc'}}
>
<Form.Item <Form.Item
label="小组成员" label="小组成员"
@ -605,6 +607,7 @@ render(){
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl"}
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.members.length===0?
@ -626,9 +629,7 @@ render(){
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_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 color-grey-9 fonthidden width87"} 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>
@ -657,12 +658,10 @@ render(){
height: '30px', height: '30px',
display:item.user_name===undefined?"none":"" display:item.user_name===undefined?"none":""
}}> }}>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_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 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></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>
) )

@ -311,10 +311,8 @@ class GraduationTasksnew extends Component {
<Form.Item label="任务标题" > <Form.Item label="任务标题" >
{getFieldDecorator('name', { {getFieldDecorator('name', {
rules: [{required: true, message: "不能为空"}], rules: [{ required: true, message: "请输入标题" }],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle} })(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle} className="searchView searchViewAfter mb20" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)}/>)}
className="searchView searchViewAfter mb20 h40" style={{"width": "100%"}} maxLength="60"
addonAfter={String(title_num)}/>)}
</Form.Item> </Form.Item>
<input type="hidden" id='nametypes'/> <input type="hidden" id='nametypes'/>
</div> </div>

@ -560,6 +560,7 @@ class GraduationTaskssettinglist extends Component{
AssociationItems=()=>{ AssociationItems=()=>{
this.setState({ this.setState({
visibles:true visibles:true
}) })
@ -1264,8 +1265,6 @@ class GraduationTaskssettinglist extends Component{
} }
} }
console.log(columns)
return( return(
<React.Fragment> <React.Fragment>
@ -1346,13 +1345,15 @@ class GraduationTaskssettinglist extends Component{
/>:""} />:""}
{/*关联项目*/} {/*关联项目*/}
{visibles===true?<Associationmodel {visibles===true?
<Associationmodel
modalname={"关联项目"} modalname={"关联项目"}
visible={visibles} visible={visibles}
Cancel={this.Cancel} Cancel={()=>this.Cancel()}
taskid={taskslistdata&&taskslistdata.task_id} taskid={taskslistdata&&taskslistdata.task_id}
funlist={this.searchValue()} funlist={()=>this.searchValue()}
/>:""} />
:""}
{taskslistdata&&taskslistdata? {taskslistdata&&taskslistdata?
// 教师列表 // 教师列表
@ -1572,13 +1573,13 @@ class GraduationTaskssettinglist extends Component{
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count} <span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span> </span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom"> {taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}> <span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span> {taskslistdata&&taskslistdata.left_time.time}</span>
</span> </span>
</Tooltip> </Tooltip>}
</div> </div>
:""} :""}
@ -1833,13 +1834,13 @@ class GraduationTaskssettinglist extends Component{
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count} <span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span> </span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom"> {taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}> <span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span> {taskslistdata&&taskslistdata.left_time.time}</span>
</span> </span>
</Tooltip> </Tooltip>}
</div> </div>
:""} :""}

Loading…
Cancel
Save