dev_forum
杨树明 5 years ago
parent ffa647be48
commit 5c7dcf9c97

@ -467,6 +467,7 @@ class GraduationTasksSubmitedit extends Component{
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let work_Id=this.props.match.params.work_Id
const uploadProps = { const uploadProps = {
width: 600, width: 600,
fileList, 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( return(
<React.Fragment> <React.Fragment>
@ -530,9 +526,9 @@ class GraduationTasksSubmitedit extends Component{
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+work_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -466,6 +466,7 @@ render(){
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let task_Id=this.props.match.params.task_Id
const uploadProps = { const uploadProps = {
width: 600, width: 600,
fileList, fileList,
@ -488,10 +489,6 @@ render(){
// console.log(this.props) // 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( return(
@ -531,9 +528,9 @@ render(){
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -164,7 +164,7 @@ class GraduationTasksappraise extends Component{
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
<Link to={"/courses/"+courseId} className="color-grey-9 fl">{datalist&&datalist.course_name}</Link> <Link to={"/courses/"+courseId+"/students"} className="color-grey-9 fl">{datalist&&datalist.course_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl ,bytesToSize} from 'educoder'; import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -105,7 +105,9 @@ class GraduationTasksedit extends Component{
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(fileList) // console.log(fileList)
// } // }
this.setState({ fileList }); this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
} }
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
@ -143,10 +145,10 @@ class GraduationTasksedit extends Component{
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
debugger
this.cancelAttachment(); this.cancelAttachment();
// const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json` // const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -281,7 +283,7 @@ class GraduationTasksedit extends Component{
width: 600, width: 600,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
showUploadList: false, // showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -414,12 +416,7 @@ class GraduationTasksedit extends Component{
)} )}
</Form.Item> </Form.Item>
<input type="hidden" id='descriptiontypes' /> <input type="hidden" id='descriptiontypes' />
<Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5">
<Button className="uploadBtn">
<Icon type="upload" /> 上传附件
</Button>
(单个文件150M以内)
</Upload>
{attachments&&attachments.map((item,key)=>{ {attachments&&attachments.map((item,key)=>{
return( return(
@ -448,37 +445,43 @@ class GraduationTasksedit extends Component{
</div> </div>
) )
})} })}
<style> <Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5">
{ <Button className="uploadBtn">
` <Icon type="upload" /> 上传附件
.maxwidth500{ </Button>
max-width:500px; (单个文件150M以内)
overflow: hidden; </Upload>
text-overflow: ellipsis; {/*<style>*/}
white-space: nowrap; {/*{*/}
color: #05101a; {/*`*/}
} {/*.maxwidth500{*/}
` {/*max-width:500px;*/}
} {/*overflow: hidden;*/}
</style> {/*text-overflow: ellipsis;*/}
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ {/*white-space: nowrap;*/}
return( {/*color: #05101a;*/}
<p className="color-grey mt10" key={key} > {/*}*/}
<a className="color-grey fl"> {/*`*/}
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> {/*}*/}
</a> {/*</style>*/}
<span className="mr12 color9B9B maxwidth500 fl" length="58"> {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/}
{item.name} {/*return(*/}
</span> {/*<p className="color-grey mt10" key={key} >*/}
<span className="color656565 mt2 color-grey-6 font-12 mr8"> {/*<a className="color-grey fl">*/}
{item.response===undefined?"":bytesToSize(item.size)} {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
</span> {/*</a>*/}
<i className="font-14 iconfont icon-guanbi " {/*<span className="mr12 color9B9B maxwidth500 fl" length="58">*/}
id={item.response===undefined?"":item.response.id} {/*{item.name}*/}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i> {/*</span>*/}
</p> {/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
) {/*{item.response===undefined?"":bytesToSize(item.size)}*/}
})} {/*</span>*/}
{/*<i className="font-14 iconfont icon-guanbi "*/}
{/*id={item.response===undefined?"":item.response.id}*/}
{/*aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>*/}
{/*</p>*/}
{/*)*/}
{/*})}*/}
{/*{attachments&&attachments.map((item,key)=>{*/} {/*{attachments&&attachments.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}

@ -2,7 +2,7 @@ import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import {WordsBtn, getUrl,bytesToSize} from 'educoder'; import {WordsBtn, getUrl,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -130,7 +130,9 @@ class GraduationTasksnew extends Component {
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(list) // console.log(list)
// } // }
this.setState({fileList}); this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
} }
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
@ -167,8 +169,8 @@ class GraduationTasksnew extends Component {
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
// const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json` // const url = `/attachments/${file}.json`
axios.delete(url, {}) axios.delete(url, {})
.then((response) => { .then((response) => {
if (response.data) { if (response.data) {
@ -257,7 +259,7 @@ class GraduationTasksnew extends Component {
multiple: true, multiple: true,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
showUploadList: false, // showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -423,44 +425,41 @@ class GraduationTasksnew extends Component {
)} )}
</Form.Item> </Form.Item>
<input type="hidden" id='descriptiontypes'/> <input type="hidden" id='descriptiontypes'/>
<Upload {...uploadProps} className="upload_1 ml5">
<Button className="uploadBtn">
<Icon type="upload"/> 上传附件
</Button>
(单个文件150M以内)
</Upload>
<style> <style>
{ {
` `
.maxwidth500{ .upload_1 .ant-upload-list{
max-width:500px; width: 560px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
} }
` `
} }
</style> </style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ <Upload {...uploadProps} className="upload_1 ml5">
return( <Button className="uploadBtn">
<p className="color-grey mt10" key={key} > <Icon type="upload"/> 上传附件
<a className="color-grey fl"> </Button>
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> (单个文件150M以内)
</a> </Upload>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span> {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/}
<span className="color656565 mt2 color-grey-6 font-12 mr8"> {/*return(*/}
{item.response===undefined?"":bytesToSize(item.size)} {/*<p className="color-grey mt10" key={key} >*/}
</span> {/*<a className="color-grey fl">*/}
<i className="font-14 iconfont icon-guanbi " {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
id={item.response===undefined?"":item.response.id} {/*</a>*/}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i> {/*<span className="mr12 color9B9B maxwidth500 fl" length="58">*/}
</p> {/*{item.name}*/}
) {/*</span>*/}
})} {/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
{/*{item.response===undefined?"":bytesToSize(item.size)}*/}
{/*</span>*/}
{/*<i className="font-14 iconfont icon-guanbi "*/}
{/*id={item.response===undefined?"":item.response.id}*/}
{/*aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>*/}
{/*</p>*/}
{/*)*/}
{/*})}*/}
</div> </div>

@ -645,8 +645,12 @@ class ShixunStudentWork extends Component {
<span className={"startfont"}> <span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异 正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span> </span>
<NoneData></NoneData>
</li> </li>
<div className="justify break_full_word new_li edu-back-white" style={{minHeight: '480px',display:duplicatechecking===true?"":"none"}}>
<NoneData></NoneData>
</div>
<style> <style>
{` {`
.newbutton{ .newbutton{

Loading…
Cancel
Save