diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index be8586d66..433a9c250 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -467,6 +467,7 @@ class GraduationTasksSubmitedit extends Component{ let courseId=this.props.match.params.coursesId; let category_id=this.props.match.params.category_id; + let work_Id=this.props.match.params.work_Id const uploadProps = { width: 600, fileList, @@ -487,12 +488,7 @@ class GraduationTasksSubmitedit extends Component{ }, }; - // console.log(workslist&&workslist) - // console.log(selectmemberslist&&selectmemberslist) - - let graduation_id=workslist===undefined?"":workslist.graduation_id; - let task_id=workslist===undefined?"":workslist.task_id; return( @@ -530,9 +526,9 @@ class GraduationTasksSubmitedit extends Component{

{/* {workslist&&workslist.course_name}*/} {/*>*/} - 毕设任务 + 毕设任务 > - 任务详情 + 任务详情 > {/**/} {/*{workslist&&workslist.task_name}*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 87044ee61..bbe72a740 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -466,6 +466,7 @@ 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 const uploadProps = { width: 600, fileList, @@ -488,10 +489,6 @@ render(){ // console.log(this.props) - // console.log(selectmemberslist&&selectmemberslist)、、 - - let graduation_id=workslist===undefined?"":workslist.graduation_id; - let task_id=workslist===undefined?"":workslist.task_id; return( @@ -531,9 +528,9 @@ render(){

{/* {workslist&&workslist.course_name}*/} {/*>*/} - 毕设任务 + 毕设任务 > - 任务详情 + 任务详情 > {/**/} {/*{workslist&&workslist.task_name}*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 2442bcc0a..81fdbd54b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -164,7 +164,7 @@ class GraduationTasksappraise extends Component{

- {datalist&&datalist.course_name} + {datalist&&datalist.course_name} > {datalist&&datalist.graduation_name} > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 9be6b9b06..6f98a9d19 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -2,7 +2,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl ,bytesToSize} from 'educoder'; +import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; @@ -105,7 +105,9 @@ class GraduationTasksedit extends Component{ // for(var list of fileList ){ // console.log(fileList) // } - this.setState({ fileList }); + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); } // onAttachmentRemove = (file) => { @@ -143,10 +145,10 @@ class GraduationTasksedit extends Component{ } onAttachmentRemove = (file) => { - + debugger this.cancelAttachment(); - // const url = `/attachments/${file.response ? file.response.id : file.uid}.json` - const url = `/attachments/${file}.json` + const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + // const url = `/attachments/${file}.json` axios.delete(url, { }) .then((response) => { @@ -281,7 +283,7 @@ class GraduationTasksedit extends Component{ width: 600, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - showUploadList: false, + // showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -414,12 +416,7 @@ class GraduationTasksedit extends Component{ )} - - - (单个文件150M以内) - + {attachments&&attachments.map((item,key)=>{ return( @@ -448,37 +445,43 @@ class GraduationTasksedit extends Component{

) })} - - {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ - return( -

- - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - -

- ) - })} + + + (单个文件150M以内) + + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/*

*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*

*/} + {/*)*/} + {/*})}*/} {/*{attachments&&attachments.map((item,key)=>{*/} {/*return(*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index 585986fb2..10f6a1f2b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -2,7 +2,7 @@ import React, {Component} from "React"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import {WordsBtn, getUrl,bytesToSize} from 'educoder'; +import {WordsBtn, getUrl,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; @@ -130,7 +130,9 @@ class GraduationTasksnew extends Component { // for(var list of fileList ){ // console.log(list) // } - this.setState({fileList}); + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); } // onAttachmentRemove = (file) => { @@ -167,8 +169,8 @@ class GraduationTasksnew extends Component { } onAttachmentRemove = (file) => { - // const url = `/attachments/${file.response ? file.response.id : file.uid}.json` - const url = `/attachments/${file}.json` + const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + // const url = `/attachments/${file}.json` axios.delete(url, {}) .then((response) => { if (response.data) { @@ -257,7 +259,7 @@ class GraduationTasksnew extends Component { multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - showUploadList: false, + // showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -423,6 +425,15 @@ class GraduationTasksnew extends Component { )} +