diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 76b9ecd71..dc4639c62 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -130,6 +130,9 @@ class Trainingjobsetting extends Component { work_efficiencys: false, task_pass: false, //是否允许跳关 CalculateMax: 100,//总分值 + borredszf:"ml10 color-grey-9", + borredszfl:true, + borredszfls:'' } // console.log("获取到的值") // console.log("Trainingjobsetting") @@ -1161,21 +1164,35 @@ class Trainingjobsetting extends Component { } //总比分 Totalscorecalculation = (value) => { + console.log("Totalscorecalculation"); + console.log(value.length); + this.setState({ + CalculateMax: value, + }) if (value === "" || value === undefined) { + this.setState({ + borredszf:"ml10 color-grey-9 bor-reds ", + borredszfls:"不能为空", + borredszfl:false, + }) return } var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/ var nubmer = value; if (!re.test(nubmer)) { - this.props.showNotification(`请输入正确的数字`); - this.setState({ - CalculateMax: 0 + borredszf:"ml10 color-grey-9 bor-reds ", + borredszfls:"请输入数字", + borredszfl:false, }) return; } - + this.setState({ + borredszf:"ml10 color-grey-9 ", + borredszfls:"", + borredszfl:true, + }) // if (nubmer > 100) { // this.props.showNotification(`请输入小于100的数`); // @@ -1194,9 +1211,7 @@ class Trainingjobsetting extends Component { this.Empiricalvalueratio(myvalues, value, true); } - this.setState({ - CalculateMax: value, - }) + } @@ -2209,7 +2224,7 @@ class Trainingjobsetting extends Component { const dataformat = 'YYYY-MM-DD HH:mm'; - let {flagPageEdit, testscripttiptype, publish_timebool, end_timebool, late_timesbool, work_efficiencys, flagPageEdits, flagPageEditstwo, flagPageEditsbox, whethertopay, handclass, flagPageEditsthrees, flagPageEditsfor, rules, rulest, unifiedsetting, group_settings, course_group, unit_e_tip, borreds, borredss, unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles, task_pass} = this.state; + let {flagPageEdit, testscripttiptype, publish_timebool, end_timebool,borredszf,borredszfl,borredszfls, late_timesbool, work_efficiencys, flagPageEdits, flagPageEditstwo, flagPageEditsbox, whethertopay, handclass, flagPageEditsthrees, flagPageEditsfor, rules, rulest, unifiedsetting, group_settings, course_group, unit_e_tip, borreds, borredss, unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles, task_pass} = this.state; // console.log(publish_timebool); // console.log(!flagPageEditstwo); const radioStyle = { @@ -2570,17 +2585,28 @@ class Trainingjobsetting extends Component { fontWeight: "bold", fontSize: "16px", }}>总分值: - this.Totalscorecalculation(e)} value={this.state.CalculateMax} /> -
+ { + borredszfl===false? +
+ {borredszfls} +
+ : +
+ +
+ } + +
关卡任务的选择和分值设置 (总分值 = 效率分+ 关卡任务总分)
diff --git a/public/react/src/modules/courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css index 1af39e7ce..c349fe166 100644 --- a/public/react/src/modules/courses/shixunHomework/style.css +++ b/public/react/src/modules/courses/shixunHomework/style.css @@ -87,4 +87,25 @@ .pd30bt{ padding: 10px 30px 0px 30px; -} \ No newline at end of file +} +.bor-reds{ + border:1px solid #FF0000!important; + border-radius: 1px!important; + border-top-left-radius: 1px!important; + border-top-right-radius: 1px!important; + border-bottom-right-radius: 1px!important; + border-bottom-left-radius: 1px!important; +} +.bor-reds input { + border:1px solid #FF0000!important; + border-radius: 1px!important; + border-top-left-radius: 1px!important; + border-top-right-radius: 1px!important; + border-bottom-right-radius: 1px!important; + border-bottom-left-radius: 1px!important; +} + +.myslHeight{ + height: 20px; + min-height: 20px; +}