From 758d8c0d17aef8a1c6046e2f2bb7aa9ff9f45706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 19 Jul 2019 23:07:16 +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 --- .../src/modules/tpm/newshixuns/Newshixuns.js | 64 ++++++++++++------- .../modules/tpm/newshixuns/css/Newshixuns.css | 5 ++ 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 192bfdd8b..b5054472c 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -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 { > {/*
*/}
-
  • +
  • -
  • +
    {this.state.languagewritetype===true?"请填写该镜像语言":""}
    +
  • - -
  • +
    {this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}
    +
  • @@ -973,8 +986,8 @@ class Newshixuns extends Component { placeholder="请填写该镜像中测试代码运行方式" id="demand_info">
  • - -
  • +
    {this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}
    +
  • +
    + {this.state.attachmentidstype===true?"请上传附件":""} +
  • this.sendhideModaly()} diff --git a/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css b/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css index b902c94ae..ab1727e6d 100644 --- a/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css +++ b/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css @@ -376,4 +376,9 @@ a.white-btn.use_scope-btn:hover{ color:#FFF !important; } +.shixunspanred{ + margin-left: 142px; + margin-top: 5px; + margin-bottom: 5px; +}