From 59bbb18b376dd25f5dfc4473bb8cfdb076f3f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 18:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/AccessoryModal.js | 8 ++--- .../graduation/tasks/GraduateTaskItem.js | 32 +++++++++++++++-- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 34 +++++++++++++++---- 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js index acd583e43..df59cb4ae 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js @@ -115,10 +115,10 @@ class AccessoryModal extends Component{ newfileList.push(list.response.id) } - if (newfileList.length == 0) { - this.props.showNotification('请先上传附件') - return; - } + // if (newfileList.length == 0) { + // this.props.showNotification('请先上传附件') + // return; + // } let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" axios.post(url,{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 419f26315..519850271 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -6,6 +6,8 @@ import {Link} from 'react-router-dom'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import Associationmodel from '../../coursesPublic/Associationmodel'; +import AccessoryModal from "../../coursesPublic/AccessoryModal"; + class GraduateTaskItem extends Component{ constructor(props){ @@ -111,12 +113,26 @@ class GraduateTaskItem extends Component{ } + addAccessory=()=>{ + this.setState({ + visibles:true + }) + } + Cancel=()=>{ this.setState({ visible:false }) } - + Cancelvisible=()=>{ + this.setState({ + visibles:false + }) + } + + setupdate=()=>{ + this.props.funlist + } render(){ let { Modalstype, @@ -161,6 +177,15 @@ class GraduateTaskItem extends Component{ taskid={taskid} funlist={this.props.funlist} />:""} + {this.state.visibles===true?:""}