diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index 1f10caa5f..9af795931 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -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} >
-

+ {this.state.searchtypes===false?

-

- -
+

:""} + + {this.state.searchtypes===false?
{projects&&projects.map((item,key)=>{ return(
-
{item.project_name}
+
{item.project_name}
) })}
-
+
: + +
+ +
+ 你当前尚未管理任何项目,请先 创建项目 再关联 +
+
} {projectvaluetype===true?请先选择项目:""} -
+
取消 确认
diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index a5c42cd69..eca0c53d5 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -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; } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index a36917df2..a4202b6da 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -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?"": -
+
@@ -653,9 +657,7 @@ class GraduationTasksSubmitedit extends Component{ }) } disabled={item.commit_status===true?true:false} className="fl "> - -
{item.user_name}
-
+
{item.user_name}
{item.group_name}
{item.student_id}
{item.commit_status===false?已提交 :""}
@@ -680,12 +682,10 @@ class GraduationTasksSubmitedit extends Component{ height: '30px', display:item.user_name===undefined?"none":"" }}> - -
{item.user_name}
-
+
{item.user_name}
{item.group_name}
{item.student_id}
- {key>0?
this.delecttask_status(item.user_id)}>
:""} + {key>0?
this.delecttask_status(item.user_id)}>
:""}
) })} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index b68458e3f..52ac6ae61 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -550,7 +550,9 @@ render(){ {workslist&&workslist.task_type===1?"": -
+
{memberslist===undefined?"":memberslist.members.length===0? @@ -626,9 +629,7 @@ render(){ }) } disabled={item.commit_status===true?true:false} className="fl "> - -
{item.user_name}
-
+
{item.user_name}
{item.group_name}
{item.student_id}
{item.commit_status===true?已提交 :""}
@@ -657,12 +658,10 @@ render(){ height: '30px', display:item.user_name===undefined?"none":"" }}> - -
{item.user_name}
-
+
{item.user_name}
{item.group_name}
{item.student_id}
- {key>0?
this.delecttask_status(item.user_id)}>
:""} + {key>0?
this.delecttask_status(item.user_id)}>
:""}
) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index ccbaa8646..fec4248df 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -309,12 +309,10 @@ class GraduationTasksnew extends Component { (选择确认后,无法修改)
- + {getFieldDecorator('name', { - rules: [{required: true, message: "不能为空"}], - })()} + rules: [{ required: true, message: "请输入标题" }], + })()}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index e75a08b3a..ebb221902 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -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( @@ -1346,13 +1345,15 @@ class GraduationTaskssettinglist extends Component{ />:""} {/*关联项目*/} - {visibles===true?this.Cancel()} taskid={taskslistdata&&taskslistdata.task_id} - funlist={this.searchValue()} - />:""} + funlist={()=>this.searchValue()} + /> + :""} {taskslistdata&&taskslistdata? // 教师列表 @@ -1572,13 +1573,13 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata&&taskslistdata.uncommit_count} 未交 - + {taskslistdata&&taskslistdata.left_time.status===null?"": {taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.time} - + }
:""} @@ -1833,13 +1834,13 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata&&taskslistdata.uncommit_count} 未交 - + {taskslistdata&&taskslistdata.left_time.status===null?"": {taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.time} - + }
:""}