dev_forum
杨树明 5 years ago
parent c364349eca
commit 758d8c0d17

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

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

Loading…
Cancel
Save