dev_forum
杨树明 5 years ago
parent 2ad530e129
commit 59bbb18b37

@ -115,10 +115,10 @@ class AccessoryModal extends Component{
newfileList.push(list.response.id) newfileList.push(list.response.id)
} }
if (newfileList.length == 0) { // if (newfileList.length == 0) {
this.props.showNotification('请先上传附件') // this.props.showNotification('请先上传附件')
return; // return;
} // }
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
axios.post(url,{ axios.post(url,{

@ -6,6 +6,8 @@ import {Link} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import Associationmodel from '../../coursesPublic/Associationmodel'; import Associationmodel from '../../coursesPublic/Associationmodel';
import AccessoryModal from "../../coursesPublic/AccessoryModal";
class GraduateTaskItem extends Component{ class GraduateTaskItem extends Component{
constructor(props){ constructor(props){
@ -111,12 +113,26 @@ class GraduateTaskItem extends Component{
} }
addAccessory=()=>{
this.setState({
visibles:true
})
}
Cancel=()=>{ Cancel=()=>{
this.setState({ this.setState({
visible:false visible:false
}) })
} }
Cancelvisible=()=>{
this.setState({
visibles:false
})
}
setupdate=()=>{
this.props.funlist
}
render(){ render(){
let { let {
Modalstype, Modalstype,
@ -161,6 +177,15 @@ class GraduateTaskItem extends Component{
taskid={taskid} taskid={taskid}
funlist={this.props.funlist} funlist={this.props.funlist}
/>:""} />:""}
{this.state.visibles===true?<AccessoryModal
modalname={"补交附件"}
visible={this.state.visibles}
Cancelname={"取消"}
Savesname={"确认"}
Cancel={this.Cancelvisible}
categoryid={discussMessage.work_id}
setupdate={this.setupdate}
/>:""}
<style>{` <style>{`
.graduateTopicList .ant-checkbox-input { .graduateTopicList .ant-checkbox-input {
@ -325,8 +350,9 @@ class GraduateTaskItem extends Component{
{item==="补交附件"? {item==="补交附件"?
<WordsBtn className="colorblue font-16 mr20 fr mt12"> <WordsBtn className="colorblue font-16 mr20 fr mt12" onClick={this.addAccessory}>
<a className="btn colorblue " href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+discussMessage.work_id+"/appraise"}>补交附件</a> 补交附件
{/*<a className="btn colorblue " href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+discussMessage.work_id+"/appraise"}></a>*/}
</WordsBtn> </WordsBtn>
:""} :""}

@ -280,7 +280,7 @@ class GraduationTasksappraise extends Component{
<div className={"color-grey-6 h20 ml20"}> <div className={"color-grey-6 h20 ml20"}>
<span className={"color9B9B fr mr10"}>更新</span> <span className={"color9B9B fr"}>更新</span>
<span className={"fr font-13 mr10 ml10"}>{firelistdata&&firelistdata.atta_update_user}</span> <span className={"fr font-13 mr10 ml10"}>{firelistdata&&firelistdata.atta_update_user}</span>
<span className={"color9B9B fr"}> <span className={"color9B9B fr"}>
{moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')} {moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')}

@ -12,6 +12,7 @@ import CoursesListType from '../../coursesPublic/CoursesListType';
import ModulationModal from "../../coursesPublic/ModulationModal"; import ModulationModal from "../../coursesPublic/ModulationModal";
import AllocationModal from "../../coursesPublic/AllocationModal"; import AllocationModal from "../../coursesPublic/AllocationModal";
import Associationmodel from '../../coursesPublic/Associationmodel'; import Associationmodel from '../../coursesPublic/Associationmodel';
import AccessoryModal from "../../coursesPublic/AccessoryModal";
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const Search = Input.Search; const Search = Input.Search;
@ -436,12 +437,25 @@ class GraduationTaskssettinglist extends Component{
handaccessory=()=>{ handaccessory=()=>{
let {taskslistdata}=this.state; // let {taskslistdata}=this.state;
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
//
// let url="/courses/"+courseId+"/graduation_tasks/"+taskslistdata.work_id+"/appraise"
//
// window.location.href=url;
this.setState({
avisible:true
})
}
let url="/courses/"+courseId+"/graduation_tasks/"+taskslistdata.work_id+"/appraise" Cancelvisible=()=>{
this.setState({
avisible:false
})
}
window.location.href=url; setupdate=()=>{
this.searchValue()
} }
showModulationtype=(id)=>{ showModulationtype=(id)=>{
@ -1355,7 +1369,15 @@ class GraduationTaskssettinglist extends Component{
/> />
:""} :""}
{taskslistdata&&taskslistdata? {this.state.avisible===true?<AccessoryModal
modalname={"补交附件"}
visible={this.state.avisible}
Cancelname={"取消"}
Savesname={"确认"}
Cancel={this.Cancelvisible}
categoryid={taskslistdata.work_id}
setupdate={this.setupdate}
/>:""} {taskslistdata&&taskslistdata?
// 教师列表 // 教师列表
this.props.isAdmin()?<div className="newMain clearfix"> this.props.isAdmin()?<div className="newMain clearfix">
<div className={"educontent mb20"}> <div className={"educontent mb20"}>

Loading…
Cancel
Save