hjm 5 years ago
commit a809a40c92

@ -113,22 +113,21 @@ module.exports = {
// First, run the linter.
// It's important to do this before Babel processes the JS.
// 上线然后要注释回来
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
// {
// test: /\.(js|jsx|mjs)$/,
// enforce: 'pre',
// use: [
// {
// options: {
// formatter: eslintFormatter,
// eslintPath: require.resolve('eslint'),
//
// },
// loader: require.resolve('eslint-loader'),
// },
// ],
// include: paths.appSrc,
// },
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall

@ -233,11 +233,7 @@ class Fileslistitem extends Component{
</Tooltip>
:""
}
{discussMessage.is_publish===true?"":<CoursesListType typelist={["未发布"]} typesylename={""}/>}
{discussMessage.is_publish===true?<CoursesListType typelist={["未发布"]} typesylename={""}/>:""}
</h6>
<style>
{

@ -903,7 +903,7 @@ class TPMBanner extends Component {
</Spin>:
<div>
<div className="task-popup-content"><p
className="task-popup-text-center font-16 pb20">复制将在后台执行<br/>平台将为你创建一个新的同名实训和内容请问是否继续</p>
className="task-popup-text-center font-16 pb20">复制将在后台执行平台将为你创建<br/>一个新的同名实训和内容请问是否继续</p>
</div>
<div className="task-popup-submit clearfix">
<a onClick={this.hideForkvisible} className="task-btn fl">取消</a>

@ -1,187 +1,190 @@
body {
overflow: auto !important;
font-family: "Microsoft YaHei";
}
#root {
/* ie兼容性 */
position: relative;
min-height: 100%;
}
body>.-task-title {
opacity: 1 !important;
}
/*<2A><><EFBFBD><EFBFBD><EFBFBD>Ŵ󾵵<C5B4><F3BEB5B5><EFBFBD><EFBFBD><EFBFBD>·Ŵ󾵵<C5B4>λ<EFBFBD><CEBB>*/
#root .search-all {
width: 219px;
}
/*Header START*/
.newHeader .logoimg {
max-height: 60px;
}
.head-right i {
font-size: 20px;
float: none !important;
}
.headIcon, #header_keyword_search {
padding-top: 13px !important;
}
.search-icon {
height: 30px !important;
}
.search-icon i {
font-size: 20px;
}
#header_keyword_search i {
color: #4cacff;
}
.ant-select-selection--multiple{
padding-bottom: 0px!important;
}
/* 先注释掉下面2个样式这样写影响范围太广了并不是所有的select都需要40px高 */
/* .ant-select-selection--single{
height:40px!important;
}
.ant-select-selection__rendered{
line-height: 40px!important;
} */
.ant-select-selection--multiple .ant-select-selection__rendered>ul>li, .ant-select-selection--multiple>ul>li{
height: 30px!important;
line-height: 28px!important;
}
/*Main START*/
.newMain {
/* 330̫<30><CCAB><EFBFBD>ˣ<EFBFBD>*/
padding-bottom: 240px !important;
}
.newContainer{
background: #fafafa!important;
}
.ant-modal-title{
font-size: 16px;
font-weight: bold !important;
color: #333;
}
.ant-modal-title{
text-align: center;
}
/*.ant-modal{*/
/*top:10rem !important;*/
/*}*/
@-moz-document url-prefix() {
.ant-radio-inner {
width: 17px !important;
height: 17px !important;
}
}
/* IE只能用padding不能用上下居中 */
.shixunDetail_top{
display: block!important;
padding-top: 48px;
}
.totalScore{
display: block!important;
padding-top: 28px;
}
.head-nav ul#header-nav li{
/*font-weight: 600;*/
}
/*.newFooter{*/
/*position: fixed !important;*/
/*}*/
.edu-menu-panel .edu-menu-listnew:hover .careersiconfont{
color: #000 !important;
}
.newHeader {
background: #24292D !important;
height: 60px !important;
}
/*-------------------个人主页:右侧提示区域--------------------------*/
.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;}
.-task-sidebar>div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;}
.-task-sidebar>div i{ color:#fff;}
.-task-sidebar>div i:hover{color: #fff!important;}
.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;}
.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center;
position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;}
.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;}
.-task-desc div img{float: left}
.-task-sidebar .scan_ewm{
position: absolute !important;
right: 45px !important;
bottom: 0px !important;
background-color: #494949 !important;
-webkit-box-sizing: border-box !important;
box-sizing: border-box !important;
font-size: 14px !important;
line-height: 16px !important;
display: none;
height: 213px !important;
}
.trangle_right{position: absolute;right: -5px;bottom: 15px;width: 0;height: 0px;border-top: 6px solid transparent;border-left: 5px solid #494949;border-bottom: 6px solid transparent}
.HeaderSearch{
margin-top: 18px;
margin-right: 20px;
}
.HeaderSearch .ant-input-search .ant-input{
height:30px;
background: #373e3f !important;
border: 1px solid #373e3f !important;
}
.ant-input-search .ant-input-affix-wrapper{
border:transparent;
}
.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
/* 比较奇怪的需求先注释掉了如果需要启用麻烦增加class限制别影响别的地方的使用 */
/* border-color: transparent; */
}
.ant-input:focus {
/*border-color: transparent;*/
border-right-width: 1px !important;
outline: 0;
-webkit-box-shadow: 0 0 0 2px transparent;
box-shadow: 0 0 0 2px transparent;
border: 1px solid #d9d9d9;
}
.HeaderSearch .ant-input-search .ant-input::-webkit-input-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input:-moz-placeholder {
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input::-moz-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input:-ms-input-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input-suffix .anticon-search {
color: #999;
}
.HeaderSearch .ant-input-search .ant-input{
color: #fff;
}
body {
overflow: auto !important;
font-family: "Microsoft YaHei";
}
#root {
/* ie兼容性 */
position: relative;
min-height: 100%;
}
body>.-task-title {
opacity: 1 !important;
}
/*<2A><><EFBFBD><EFBFBD><EFBFBD>Ŵ󾵵<C5B4><F3BEB5B5><EFBFBD><EFBFBD><EFBFBD>·Ŵ󾵵<C5B4>λ<EFBFBD><CEBB>*/
#root .search-all {
width: 219px;
}
/*Header START*/
.newHeader .logoimg {
max-height: 60px;
}
.head-right i {
font-size: 20px;
float: none !important;
}
.headIcon, #header_keyword_search {
padding-top: 13px !important;
}
.search-icon {
height: 30px !important;
}
.search-icon i {
font-size: 20px;
}
#header_keyword_search i {
color: #4cacff;
}
.ant-select-selection--multiple{
padding-bottom: 0px!important;
padding-top:3px;
}
/* 先注释掉下面2个样式这样写影响范围太广了并不是所有的select都需要40px高 */
/* .ant-select-selection--single{
height:40px!important;
}
.ant-select-selection__rendered{
line-height: 40px!important;
} */
.ant-select-selection--multiple .ant-select-selection__rendered>ul>li, .ant-select-selection--multiple>ul>li{
height: 25px!important;
line-height: 23px!important;
margin-bottom:3px;
margin-top:0px;
}
/*Main START*/
.newMain {
/* 330̫<30><CCAB><EFBFBD>ˣ<EFBFBD>*/
padding-bottom: 240px !important;
}
.newContainer{
background: #fafafa!important;
}
.ant-modal-title{
font-size: 16px;
font-weight: bold !important;
color: #333;
}
.ant-modal-title{
text-align: center;
}
/*.ant-modal{*/
/*top:10rem !important;*/
/*}*/
@-moz-document url-prefix() {
.ant-radio-inner {
width: 17px !important;
height: 17px !important;
}
}
/* IE只能用padding不能用上下居中 */
.shixunDetail_top{
display: block!important;
padding-top: 48px;
}
.totalScore{
display: block!important;
padding-top: 28px;
}
.head-nav ul#header-nav li{
/*font-weight: 600;*/
}
/*.newFooter{*/
/*position: fixed !important;*/
/*}*/
.edu-menu-panel .edu-menu-listnew:hover .careersiconfont{
color: #000 !important;
}
.newHeader {
background: #24292D !important;
height: 60px !important;
}
/*-------------------个人主页:右侧提示区域--------------------------*/
.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;}
.-task-sidebar>div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;}
.-task-sidebar>div i{ color:#fff;}
.-task-sidebar>div i:hover{color: #fff!important;}
.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;}
.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center;
position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;}
.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;}
.-task-desc div img{float: left}
.-task-sidebar .scan_ewm{
position: absolute !important;
right: 45px !important;
bottom: 0px !important;
background-color: #494949 !important;
-webkit-box-sizing: border-box !important;
box-sizing: border-box !important;
font-size: 14px !important;
line-height: 16px !important;
display: none;
height: 213px !important;
}
.trangle_right{position: absolute;right: -5px;bottom: 15px;width: 0;height: 0px;border-top: 6px solid transparent;border-left: 5px solid #494949;border-bottom: 6px solid transparent}
.HeaderSearch{
margin-top: 18px;
margin-right: 20px;
}
.HeaderSearch .ant-input-search .ant-input{
height:30px;
background: #373e3f !important;
border: 1px solid #373e3f !important;
}
.ant-input-search .ant-input-affix-wrapper{
border:transparent;
}
.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
/* 比较奇怪的需求先注释掉了如果需要启用麻烦增加class限制别影响别的地方的使用 */
/* border-color: transparent; */
}
.ant-input:focus {
/*border-color: transparent;*/
border-right-width: 1px !important;
outline: 0;
-webkit-box-shadow: 0 0 0 2px transparent;
box-shadow: 0 0 0 2px transparent;
border: 1px solid #d9d9d9;
}
.HeaderSearch .ant-input-search .ant-input::-webkit-input-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input:-moz-placeholder {
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input::-moz-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input:-ms-input-placeholder{
color: #999;
font-size: 14px;
}
.HeaderSearch .ant-input-search .ant-input-suffix .anticon-search {
color: #999;
}
.HeaderSearch .ant-input-search .ant-input{
color: #fff;
}

@ -554,28 +554,27 @@ export default class TPMsettings extends Component {
}
Deselectlittle=(value)=>{
let {settingsData,shixun_service_configs,choice_small_type}=this.state;
let {shixun_service_configs,choice_small_type}=this.state;
let newshixun_service_configs=shixun_service_configs;
let newchoice_small_type=choice_small_type;
newchoice_small_type.some((items,keys)=> {
if (items === value) {
newchoice_small_type.splice(keys, 1)
newshixun_service_configs.some((item,key)=> {
if (item.mirror_repository_id === value) {
newshixun_service_configs.splice(key, 1)
return true
}
}
)
newchoice_small_type.some((item,key)=> {
if (item === value) {
newchoice_small_type.splice(key, 1)
return true
}
}
)
settingsData.shixun.small_type.some((items,keys)=> {
if (items.id === value) {
newshixun_service_configs.splice(keys+1, 1)
return true
}
}
)
this.setState({
choice_small_type: newchoice_small_type,
shixun_service_configs:newshixun_service_configs,
@ -691,9 +690,11 @@ export default class TPMsettings extends Component {
opening_time,shixunmemoMDvalue,shixun_service_configlist
} = this.state;
shixun_service_configlist.map((item,key)=>{
delete item.name;
})
let newshixun_service_configlist = shixun_service_configlist.map(v => {
let v1 = Object.assign({},v);
delete v1.name;
return v1
});
let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
@ -788,7 +789,7 @@ export default class TPMsettings extends Component {
shixun:{
name: name,
webssh: webssh,
user_scope: use_scope,
use_scope: use_scope,
can_copy: can_copy,
vnc: vnc===null?undefined:vnc,
test_set_permission: test_set_permission,
@ -799,7 +800,7 @@ export default class TPMsettings extends Component {
forbid_copy: forbid_copy,
multi_webssh:newmulti_webssh,
opening_time:opening_time,
mirror_script_id:choice_standard_scriptssum,
mirror_script_id:choice_standard_scriptssum===undefined?choice_standard_scripts:choice_standard_scriptssum,
},
shixun_info:{
description: description_editormd,
@ -808,7 +809,7 @@ export default class TPMsettings extends Component {
main_type: choice_main_type,
small_type: choice_small_type,
scope_partment: scope_partment,
shixun_service_configs:shixun_service_configlist
shixun_service_configs:newshixun_service_configlist
}
axios.put(Url, data).then((response) => {
@ -1115,7 +1116,33 @@ export default class TPMsettings extends Component {
})
}
inputs=()=>{
setConfigsInputs=(e,keys,str)=>{
let {shixun_service_configs}=this.state;
let newshixun_service_configs=shixun_service_configs;
newshixun_service_configs.map((item,key)=>{
if(key===keys){
switch (str) {
case 1:
item.cpu_limit=e.target.value
break;
case 2:
item.lower_cpu_limit=e.target.value
break;
case 3:
item.memory_limit=e.target.value
break;
case 4:
item.request_limit=e.target.value
break;
}
}
})
this.setState({
shixun_service_configs:newshixun_service_configs,
shixun_service_configlist:newshixun_service_configs,
})
}
@ -1355,7 +1382,7 @@ export default class TPMsettings extends Component {
<div className="width15 fl pr mr20" onMouseLeave={operateauthority?this.bigopens:""}>
<Select mode="multiple" placeholder="请选择小类别"
value={choice_small_type.length===0||choice_small_type[0]===""||choice_small_type===[]?undefined:choice_small_type}
style={{width: 180}}
style={{width: 180,height:30}}
disabled={operateauthority?false:true}
// onChange={operateauthority?this.littleClass:""}
onDeselect={operateauthority?this.Deselectlittle:""}
@ -1439,9 +1466,43 @@ export default class TPMsettings extends Component {
{
this.props.identity<5||this.props.power==true?
<a onClick={this.showModal} id="define_template"
className="color-orange-tip ml20 mt5 fl">使用自定义脚本</a> : ""
className="color-orange-tip ml20 mt1 fl">使用自定义脚本</a> : ""
}
<div className="ml6 fl pr"
style={{display:operateauthority?'block':"none"}}
>
<a onClick={()=>this.testscripttip(0)}><img
src={getImageUrl("images/educoder/problem.png") }/></a>
<div className="invite-tip clearfix none " id="test_script_tip"
style={{top: '33px', right: '-6px',width: '271px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>
<span className="top-black-trangle"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">
使用自定义模板平台无法自动更新脚本<br/>
请在关卡创建完后手动更新脚本中的必填参<br/>
数和以下2个数组元素<br/>
challengeProgramNames<br/>
sourceClassNames<br/><br/>
示例有2个关卡的实训<br/><br/>
各关卡的待编译文件为<br/>
src/step1/HelloWorld.java<br/>
src/step2/Other.java<br/><br/>
各关卡的编译后生成的执行文件为<br/>
step1.HelloWorld<br/>
step2.Other<br/><br/>
则数组元素更新如下<br/>
challengeProgramNames=("src/step1/<br/>
HelloWorld.java" "src/step2/Other.java")<br/>
sourceClassNames=("step1.HelloWorld<br/>
" "step2.Other")<br/><br/>
其它参数可按实际需求定制
</p>
</div>
<p className="inviteTipbtn with100 fl">
<a onClick={()=>this.testscripttip(1)}>知道了</a>
</p>
</div>
</div>
<Modal
keyboard={false}
@ -1518,41 +1579,7 @@ export default class TPMsettings extends Component {
{/*</div>*/}
<div className="ml6 fl pr"
style={{display:operateauthority?'block':"none"}}
>
<a onClick={()=>this.testscripttip(0)}><img
src={getImageUrl("images/educoder/problem.png") }/></a>
<div className="invite-tip clearfix none " id="test_script_tip"
style={{top: '33px', right: '-6px',width: '271px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>
<span className="top-black-trangle"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">
使用自定义模板平台无法自动更新脚本<br/>
请在关卡创建完后手动更新脚本中的必填参<br/>
数和以下2个数组元素<br/>
challengeProgramNames<br/>
sourceClassNames<br/><br/>
示例有2个关卡的实训<br/><br/>
各关卡的待编译文件为<br/>
src/step1/HelloWorld.java<br/>
src/step2/Other.java<br/><br/>
各关卡的编译后生成的执行文件为<br/>
step1.HelloWorld<br/>
step2.Other<br/><br/>
则数组元素更新如下<br/>
challengeProgramNames=("src/step1/<br/>
HelloWorld.java" "src/step2/Other.java")<br/>
sourceClassNames=("step1.HelloWorld<br/>
" "step2.Other")<br/><br/>
其它参数可按实际需求定制
</p>
</div>
<p className="inviteTipbtn with100 fl">
<a onClick={()=>this.testscripttip(1)}>知道了</a>
</p>
</div>
</div>
</div>
</div>
@ -1791,32 +1818,33 @@ export default class TPMsettings extends Component {
<label style={{top:'6px'}} className="color-grey-9 ml10" >为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战</label>
</span>
</div>
<div className="clearfix mt20 ml30">
{this.props.identity<3?<div className="clearfix mt20 ml30">
<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>VNC图形化:</span>
<span className="fl mt5">
<Checkbox checked={vnc === undefined ? false : vnc} onChange={this.shixun_vnc}></Checkbox>
<label style={{top:'6px'}} className="color-grey-9 ml10" >勾选则给学员的实践任务提供Ubuntu系统图形化实践窗口否则不提供</label>
</span>
</div>
</div>:""}
</div>
</div>
{/*"name": "我是镜像名", # 镜像名称*/}
{/*"cpu_limit": 1, # cpu核*/}
{/*"lower_cpu_limit": 0.1, # 最低cpu核 浮点数*/}
{/*"memory_limit": 1024 ,#内存限制*/}
{/*"request_limit": 10, # 内存要求*/}
{/*"mirror_repository_id": 12, # 镜像id*/}
<div className="edu-back-white padding40-20 mb20">
{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{
{this.props.identity<3?<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">服务配置</p>
{ shixun_service_configs&&shixun_service_configs.map((item,key)=>{
return(
<div key={key}>
<p className="color-grey-6 font-16 mb30">服务配置</p>
<div id="5">
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
<div className="clearfix mb5">
<label className="panel-form-label fl">CPU()</label>
<div className="pr fl with80 status_con">
<input type="text" name="cpu_limit[]" value={item.cpu_limit} onInput={this.inputs}
<input type="text" value={item.cpu_limit} onInput={(e)=>this.setConfigsInputs(e,key,1)}
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
</div>
<div className="cl"></div>
@ -1824,7 +1852,7 @@ export default class TPMsettings extends Component {
<div className="clearfix mb5">
<label className="panel-form-label fl">最低CPU()</label>
<div className="pr fl with80 status_con">
<input type="text" name="lower_cpu_limit[]" value={item.lower_cpu_limit} onInput={this.inputs}
<input type="text" value={item.lower_cpu_limit} onInput={(e)=>this.setConfigsInputs(e,key,2)}
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
</div>
<div className="cl"></div>
@ -1832,7 +1860,7 @@ export default class TPMsettings extends Component {
<div className="clearfix mb5">
<label className="panel-form-label fl">内存限制(M)</label>
<div className="pr fl with80 status_con">
<input type="text" name="memory_limit[]" value={item.memory_limit} onInput={this.inputs}
<input type="text" value={item.memory_limit} onInput={(e)=>this.setConfigsInputs(e,key,3)}
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
</div>
<div className="cl"></div>
@ -1840,7 +1868,7 @@ export default class TPMsettings extends Component {
<div className="clearfix mb5">
<label className="panel-form-label fl">内存要求(M)</label>
<div className="pr fl with20 status_con">
<input type="text" name="request_limit[]" value={item.request_limit} onInput={this.inputs}
<input type="text" value={item.request_limit} onInput={(e)=>this.setConfigsInputs(e,key,4)}
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
</div>
<label className="panel-form-label fl" style={{width: '48%'}}>温馨提示纯编程类型实训建议使用默认值对于大数据等建议使用最大内存的30%</label>
@ -1850,8 +1878,8 @@ export default class TPMsettings extends Component {
</div>
)
}) :""}
</div>
})}
</div> :""}
<p>
{

@ -225,7 +225,7 @@ export default class TPManswer extends Component {
}
}
this.setState({
answer:response.data.answer,
answer:response.data.answer,
power: response.data.power,
choice_url: newchoice_url, // 导航中的新建选择题url
practice_url: newpractice_url, //string 导航中新建实践题url

Loading…
Cancel
Save