Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/tpm/newshixuns/Newshixuns.js
dev_forum
杨树林 6 years ago
commit 0770901bf7

@ -122,6 +122,11 @@ class GraduationTasksSubmitedit extends Component{
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
} }
if (info.file.status === 'done') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
}
} }
//onAttachmentRemove = (file) => { //onAttachmentRemove = (file) => {

@ -117,10 +117,17 @@ class GraduationTasksSubmitnew extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
debugger
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
} }
if (info.file.status === 'done') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {

@ -160,6 +160,8 @@ function disabledDateTime() {
// disabledSeconds: () => [0, 60], // disabledSeconds: () => [0, 60],
}; };
} }
class Newshixuns extends Component { class Newshixuns extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -195,6 +197,10 @@ class Newshixuns extends Component {
testcoderunmode:undefined, testcoderunmode:undefined,
file:undefined, file:undefined,
deleteisnot:true, deleteisnot:true,
languagewritetype:false,
systemenvironmenttype:false,
testcoderunmodetype:false,
attachmentidstype:false
} }
} }
@ -502,8 +508,6 @@ class Newshixuns extends Component {
} }
sendsure_apply = () => { sendsure_apply = () => {
let {languagewrite,systemenvironment,testcoderunmode} = this.state; let {languagewrite,systemenvironment,testcoderunmode} = this.state;
// debugger
// console.log("点击确定") // console.log("点击确定")
// console.log("languagewrite"+languagewrite); // console.log("languagewrite"+languagewrite);
// console.log("systemenvironment"+systemenvironment); // console.log("systemenvironment"+systemenvironment);
@ -516,21 +520,26 @@ class Newshixuns extends Component {
// }) // })
// } // }
if(languagewrite === undefined || languagewrite === "" ){ if(languagewrite === undefined || languagewrite === "" ){
this.props.showNotification(`请填写该镜像是基于什么语言`); // this.props.showNotification(`请填写该镜像是基于什么语言`);
this.setState({
languagewritetype:true
})
return return
} }
if(systemenvironment === undefined || systemenvironment === ""){ if(systemenvironment === undefined || systemenvironment === ""){
this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
this.setState({
systemenvironmenttype:true
})
return; return;
} }
if(testcoderunmode === undefined || testcoderunmode === "") { if(testcoderunmode === undefined || testcoderunmode === "") {
this.props.showNotification(`请填写该镜像中测试代码运行方式`); // this.props.showNotification(`请填写该镜像中测试代码运行方式`);
this.setState({
testcoderunmodetype:true
})
return; return;
} }
var attachment_ids=undefined; var attachment_ids=undefined;
if (this.state.fileList) { if (this.state.fileList) {
@ -538,17 +547,20 @@ class Newshixuns extends Component {
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
} }
// debugger
if( attachment_ids === undefined || attachment_ids.length===0){
notification.open( if( attachment_ids === undefined || attachment_ids.length===0){
{
message: '提示',
description:
'请上传附件!',
} // notification.open(
) // {
// message: '提示',
// description:
// '请上传附件!',
//
// }
// )
this.setState({
attachmentidstype:true
})
return; return;
} }
// console.log("attachment_ids"+attachment_ids); // console.log("attachment_ids"+attachment_ids);
@ -941,7 +953,7 @@ class Newshixuns extends Component {
> >
{/*<Form onSubmit={this.handleSubmit}>*/} {/*<Form onSubmit={this.handleSubmit}>*/}
<div> <div>
<li className="clearfix mb15 ml85" > <li className="clearfix ml85" >
<label className="fl mt10 "><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
@ -951,7 +963,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像是基于什么语言示例Python" placeholder="请填写该镜像是基于什么语言示例Python"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<li className="clearfix mb15"> <div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix">
<label className="panel-form-label fl ml50"><span <label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
@ -961,8 +974,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境" placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}</div>
<li className="clearfix mb15"> <li className="clearfix">
<label className="fl mt10" ><span <label className="fl mt10" ><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
@ -973,8 +986,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像中测试代码运行方式" placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}</div>
<li className="clearfix mb15 ml50"> <li className="clearfix ml50">
<label className="panel-form-label fl mt-5"><span <label className="panel-form-label fl mt-5"><span
className="color-red fl">*</span>&nbsp;&nbsp;</label> className="color-red fl">*</span>&nbsp;&nbsp;</label>
<div className="mt10" style={{ <div className="mt10" style={{
@ -1009,6 +1022,9 @@ class Newshixuns extends Component {
</div> </div>
</li> </li>
<div className={"color-red shixunspanred"}>
{this.state.attachmentidstype===true?"请上传附件":""}
</div>
<li className="edu-txt-center clearfix "> <li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30" <a className="pop_close task-btn mr30"
onClick={() => this.sendhideModaly()} onClick={() => this.sendhideModaly()}

@ -376,4 +376,9 @@ a.white-btn.use_scope-btn:hover{
color:#FFF !important; color:#FFF !important;
} }
.shixunspanred{
margin-left: 142px;
margin-top: 5px;
margin-bottom: 5px;
}

Loading…
Cancel
Save