diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js index c071024bb..18870a1be 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js @@ -7,14 +7,14 @@ import Loading from '../../../../Loading'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import axios from 'axios'; import HomeworkModal from "../../coursesPublic/HomeworkModal"; - +import AccessoryModal from "../../coursesPublic/AccessoryModal"; +import Associationmodel from '../../coursesPublic/Associationmodel'; import CoursesListType from '../../coursesPublic/CoursesListType'; import moment from 'moment'; import "../../css/members.css" import "../../css/Courses.css" - -import Trialapplication from '../../../login/Trialapplication' +import Modals from '../../../modals/Modals'; //毕设描述 @@ -52,7 +52,13 @@ class GraduationTaskDetail extends Component{ Botvalleft:undefined, course_groupslist:undefined, course_groups:undefined, - questionslist:undefined + questionslist:undefined, + tab:"list", + visibles:undefined, + Modalstype:undefined, + Modalstopval:undefined, + ModalCancel:undefined, + ModalSave:undefined } } componentDidMount(){ @@ -126,8 +132,7 @@ class GraduationTaskDetail extends Component{ if (response.data.status == 0) { this.getdatas() this.props.showNotification(response.data.message); - this.searchValue(); - + this.setState({ // Modalstopval:response.data.message, // ModalSave:this.cancelmodel, @@ -140,6 +145,13 @@ class GraduationTaskDetail extends Component{ }) } + + // 刷新 + resetList=()=>{ + this.getdatas(); + this.child && this.child.searchValue(); + } + // 立即截止 end=()=>{ // this.homeworkstart() @@ -176,14 +188,93 @@ class GraduationTaskDetail extends Component{ }) } + setTab = (tab) =>{ + this.setState({ + tab + }) + } + // 关联项目 + AssociationItems=()=>{ + this.setState({ + visibles:true + }) + } + Cancel=()=>{ + this.setState({ + visibles:false + }) + } + // 取消关联 + cannelAssociation=()=>{ + this.setState({ + Modalstype:true, + Modalstopval:"确定要取消该项目关联?", + ModalCancel:this.cannerassocition, + ModalSave:this.savetassociton + }) + } + savetassociton=()=>{ + this.cannerassocition(); + let {questionslist}=this.state; + let url = "/graduation_tasks/"+questionslist.task_id+"/graduation_works/cancel_relate_project.json"; + console.log(url) + axios.get(url).then((result)=>{ + if(result.data.status===0){ + this.resetList(); + } + }).catch((error)=>{ + console.log(error) + }) + + } + cannerassocition=()=>{ + this.setState({ + Modalstype:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + loadtype:false, + visibles:false + }) + } + // 补交附件 + handaccessory=()=>{ + // let {taskslistdata}=this.state; + // 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 + }) + } + Cancelvisible=()=>{ + this.setState({ + avisible:false + }) + } + + bindRef = ref => { this.child = ref } ; render(){ let courseId=this.props.match.params.coursesId; let category_id=this.props.match.params.category_id; let task_Id=this.props.match.params.task_Id; - let { tab } = this.props; - let { questionslist } = this.state + let { + questionslist , + tab , + visibles , + Modalstype, + Modalstopval, + ModalCancel, + ModalSave + } = this.state + + const commom = { + setTab:this.setTab + } return(
{ @@ -208,7 +299,38 @@ class GraduationTaskDetail extends Component{ modaltype={this.state.modaltype} getcourse_groupslist={(id) => this.getcourse_groupslist(id)} /> - + {/*关联项目*/} + {visibles===true? + this.Cancel()} + taskid={ questionslist && questionslist.task_id } + funlist={this.resetList} + /> + :""} + + {this.state.avisible===true?:""} + {/*提示*/} +

{questionslist.course_name} > @@ -226,7 +348,7 @@ class GraduationTaskDetail extends Component{ 返回

-
+
任务列表 毕设描述 @@ -261,7 +383,10 @@ class GraduationTaskDetail extends Component{ } .drop_down_menu li .color-dark{ color: #666 !important; - } + } + .linbox{ + height: 26px; + } `} {this.props.isAdmin()?
  • @@ -271,6 +396,21 @@ class GraduationTaskDetail extends Component{
  • this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件
  • :""} + {questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{ + return( + + {item==="提交作品"?提交作品:""} + {item==="补交作品"?补交作品:""} + {item==="修改作品"?修改作品:""} + {item==="查看作品"?查看作品 :""} + {item==="创建项目"?创建项目:""} + {item==="关联项目"?关联项目:""} + {item==="取消关联"?取消关联:""} + {item==="补交附件"?补交附件:""} + + + ) + })} {/*项目在线质量检测*/} { this.props.isAdmin() ? questionslist.status===1 ? { this.end()} }>立即截止 : "" : "" } @@ -283,19 +423,19 @@ class GraduationTaskDetail extends Component{ () + (props) => () } > () + (props) => () } > () + (props) => () }> diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index ffd9f57e6..95d7a64cd 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -151,7 +151,11 @@ class GraduationTaskssettingapp extends Component{ this.getsettings(); if(this.props.isAdmin()===true&&isNaN(id)){ this.editSetting() - } + } + + let tab = this.props.tab; + this.props.setTab && this.props.setTab(tab); + } @@ -406,46 +410,6 @@ class GraduationTaskssettingapp extends Component{ opergrade:e.target.checked }) } - //立即发布 - publish=()=>{ - let starttime= this.props.getNowFormatDates(1,1); - let endtime=this.props.getNowFormatDates(2,1); - // this.homeworkstart() - this.setState({ - modalname:"立即发布", - visibles:true, - Topval:"学生将立即收到毕设任务", - // Botvalleft:"点击修改", - // Botval:`本操作只对"未发布"的分班有效`, - starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , - starttimes:this.props.getNowFormatDates(1), - typs:"start", - endtime:endtime, - Cancelname:"暂不发布", - Savesname:"立即发布", - Cancel:this.cancelmodel, - Saves:this.homepublish, - }) - - } - //立即发布 - homeworkstart=()=>{ - let coursesId=this.props.match.params.coursesId; - let url="/courses/"+coursesId+"/all_course_groups.json"; - - axios.get(url).then((response) => { - - if(response.status===200){ - this.setState({ - modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, - course_groups:response.data.course_groups, - }) - } - }).catch((error) => { - console.log(error) - }); - - } homepublish=(ids,endtime)=>{ let task_Id=this.props.match.params.task_Id; @@ -771,43 +735,12 @@ class GraduationTaskssettingapp extends Component{ }) } - goback=()=>{ - // let courseId=this.props.match.params.coursesId; - // if(courseId===undefined){ - // this.props.history.push("/courses"); - // }else{ - // this.props.history.push(this.props.current_user.first_category_url); - // } - // this.props.history.goBack() - // this.props.history.replace(this.props.current_user.first_category_url); - this.props.history.replace(`/courses/${this.state.settingdata.course_id}/graduation_tasks/${this.state.settingdata.graduation_id}`); - - } - isgoback=()=>{ this.getsettings(); this.setState({ flagPageEdit: false, }) } - end=()=>{ - - this.setState({ - modalname:"立即截止", - visibles:true, - Topval:"学生将不能再提交作品", - // Botvalleft:"暂不截止", - // Botval:`本操作只对"提交中"的分班有效`, - Cancelname:"暂不截止", - Savesname:"立即截止", - Cancel:this.cancelmodel, - Saves:this.coursetaskend, - typs:"end", - }) - // this.homeworkstart() - } - - cancelmodel=()=>{ this.setState({ @@ -996,7 +929,7 @@ class GraduationTaskssettingapp extends Component{ return( - {settingdata&&settingdata?
    + { settingdata && settingdata ?
    {/*提示*/} - - {/*/!*立即发布*!/*/} - {/**/} -
    -
    - - {/*

    - {coursename} - > - 毕设任务 - > */} - - {/*{taskname===""?"":*/} - {/**/} - {/*{taskname}*/} - {/*>*/} - {/**/} - {/*}*/} - - {/* 任务详情 -

    */} - - {/*
    -

    - {taskname} -

    - - 返回 -
    */} - - - {/*
    -
    */} - - {/* 任务列表 - 毕设描述 - 设置 */} - - {/*导出*/} - {/* - {this.props.isAdmin()?
  • - 导出 - -
  • :""} */} - - {/*{this.props.isAdmin()?导出成绩:""}*/} - {/*{this.props.isAdmin()?导出作品附件:""}*/} - {/*项目在线质量检测*/} - {/* {this.props.isAdmin()?settingdata.status===1? { this.end()} }>立即截止:"":""} - {this.props.isAdmin()?settingdata.status===0? { this.publish()} }>立即发布:"":""} - {this.props.isAdmin()?编辑任务:""} -
    -
    */} - - -
    { !flagPageEdit && this.props.isAdmin() === true ? @@ -1313,11 +1139,6 @@ class GraduationTaskssettingapp extends Component{
    - {/*
    */} - {/*
    项目质量检测
    */} - - - {/*
    */}
    评分设置
    @@ -1444,14 +1265,8 @@ class GraduationTaskssettingapp extends Component{ {/*取消*/} 取消
    :"":""} -
    -
    - - +
    :""} - - -
    ) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index e0ba1e95a..047946a6e 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1,7 +1,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd"; import {Link} from 'react-router-dom'; -import { getImageUrl,WordsBtn } from 'educoder'; +import { getImageUrl , NoneData } from 'educoder'; import axios from 'axios'; import moment from 'moment'; import HomeworkModal from "../../coursesPublic/HomeworkModal"; @@ -13,6 +13,7 @@ import AllocationModal from "../../coursesPublic/AllocationModal"; import Associationmodel from '../../coursesPublic/Associationmodel'; import AccessoryModal from "../../coursesPublic/AccessoryModal"; + const CheckboxGroup = Checkbox.Group; const Search = Input.Search; const qs = require('qs'); @@ -54,8 +55,18 @@ class GraduationTaskssettinglist extends Component{ } componentDidMount(){ + let tab = this.props.tab; + this.props.setTab && this.props.setTab(tab); + + let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); + + try{ + this.props.triggerRef(this) + }catch(e){ + + } } goback=()=>{ @@ -837,36 +848,22 @@ class GraduationTaskssettinglist extends Component{
    {this.props.isAdmin()?operation.map((tag,key) => { return( -
    - {/*调整学生最终成绩
    */} - {/*其它历史评分将全部失效:""}>*/} - - {/*{tag.name==="评阅"?tag.status===0?"--":*/} - {/*{tag.name}*/} - {/**/} - {/*:*/} - {/*this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>*/} - {/*{tag.status===0?"":tag.name}*/} - {/**/} - {/*}*/} - - {/*
    */} - 调整学生最终成绩
    - 其它历史评分将全部失效:""}> - - {tag.name==="评阅"? - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> - {tag.name} - - } - -
    -
    + + { + tag.name && + 调整学生最终成绩
    其它历史评分将全部失效:""}> + {tag.name==="评阅"? + {tag.name} + + : + this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> + {tag.name} + + } +
    + } +
    ) }):""} { @@ -963,9 +960,6 @@ class GraduationTaskssettinglist extends Component{ text-overflow: ellipsis; white-space: nowrap; } - .linbox{ - height: 26px; - } .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ padding: 16px 10px } @@ -1090,12 +1084,12 @@ class GraduationTaskssettinglist extends Component{ /> - { taskslistdata && taskslistdata? + { taskslistdata && taskslistdata ? // 教师列表 - this.props.isAdmin()? + this.props.isAdmin() ?
    -