杨树林 5 years ago
commit c6f7e9dd99

@ -22,6 +22,7 @@ class Associationmodel extends Component{
projects:undefined,
projectvalue:undefined,
projectvaluetype:false,
searchtypes:false
}
}
@ -38,10 +39,10 @@ class Associationmodel extends Component{
search: search
}
}).then((result)=>{
console.log(result)
if(result.status===200){
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=()=>{
this.props.funlist()
this.props.Cancel()
console.log(this.props)
this.setState({
Modalstype:false,
})
this.props.funlist()
this.props.Cancel()
}
@ -80,13 +79,13 @@ class Associationmodel extends Component{
if(result.status===200){
if(result.data.status===0){
this.setState({
Modalstype:true,
Modalstopval:result.data.message,
ModalSave:this.goback,
loadtype:true
})
this.props.funlist()
// this.setState({
// Modalstype:true,
// Modalstopval:result.data.message,
// ModalSave:this.goback,
// loadtype:true
// })
this.goback
}
}
@ -96,7 +95,9 @@ class Associationmodel extends Component{
})
}
Saves=()=>{
let {projectvalue}=this.state;
let {projectvalue,searchtypes}=this.state
if(searchtypes===false){
if(projectvalue===undefined||projectvalue===""){
this.setState({
projectvaluetype:true,
@ -114,30 +115,26 @@ class Associationmodel extends Component{
project_id: projectvalue
}
}).then((result)=>{
if(result.status===200){
if(result.data.is_relate===false){
this.setSaves()
}else{
this.setState({
Modalstype:true,
Modalstopval:"该项目已被"+result.data.relate_user+"关联",
ModalSave:this.ModalSave,
loadtype:true
})
}
}
}).catch((error)=>{
console.log(error)
})
}
}else{
this.goback()
}
}
onChange = (e) => {
@ -190,7 +187,7 @@ class Associationmodel extends Component{
destroyOnClose={true}
>
<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
placeholder="请输入项目名称进行搜索"
@ -201,31 +198,55 @@ class Associationmodel extends Component{
autoComplete="off"
></Search>
</p>
<div className={"Association mb20"}>
</p>:""}
<style>
{
`
.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}>
{projects&&projects.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
height: '30px'
}}>
<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>
)
})}
</RadioGroup>
</div>
</div>:
<div style={{
paddingLeft:'0px'
}}>
<div style={{
margin:'0px 20%'
}}>
你当前尚未管理任何项目请先 <span><a style={{color:'#1890ff'}} href={"/projects/new"}>创建项目</a> </span>
</div>
</div>}
{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 task-btn-orange" onClick={this.Saves}>确认</a>
</div>

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

@ -80,7 +80,8 @@ class GraduationTasksSubmitedit extends Component{
let workId=this.props.match.params.work_Id;
let {workslist}=this.state
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) => {
@ -248,7 +249,7 @@ class GraduationTasksSubmitedit extends Component{
onAttachmentRemove = (file) => {
let {attachments,fileList}=this.state;
const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json`
const url = `/attachments/${file}.json`
axios.delete(url, {
})
.then((response) => {
@ -592,7 +593,9 @@ class GraduationTasksSubmitedit extends Component{
{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
label="小组成员"
@ -632,6 +635,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"members fl"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}>
<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>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}}>{item.user_name}</div>
</Tooltip>
<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 ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
@ -680,12 +682,10 @@ class GraduationTasksSubmitedit extends Component{
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}}>{item.user_name}</div>
</Tooltip>
<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={"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>
)
})}

@ -550,7 +550,9 @@ render(){
{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
label="小组成员"
@ -605,6 +607,7 @@ render(){
<div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0?
@ -626,9 +629,7 @@ render(){
})
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<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 ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
@ -657,12 +658,10 @@ render(){
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<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>
{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>
)

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

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

Loading…
Cancel
Save