diff --git a/public/react/src/modules/tpm/TPMsettings/LearningSettings.js b/public/react/src/modules/tpm/TPMsettings/LearningSettings.js
index 9f99ea5a0..d8caa83ee 100644
--- a/public/react/src/modules/tpm/TPMsettings/LearningSettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/LearningSettings.js
@@ -1,30 +1,185 @@
-import React, { Component } from 'react';
+import React, {Component} from 'react';
-import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification, Tooltip,Tabs} from 'antd';
+import {
+ Input,
+ Select,
+ Radio,
+ Checkbox,
+ Popconfirm,
+ message,
+ Modal,
+ Icon,
+ DatePicker,
+ Breadcrumb,
+ Upload,
+ Button,
+ notification,
+ Tooltip,
+ Tabs
+} from 'antd';
import axios from 'axios';
import './css/TPMsettings.css';
-import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder';
+import {getImageUrl, toPath, getUrl, appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder';
+import Bottomsubmit from "../../modals/Bottomsubmit";
+
+const RadioGroup = Radio.Group;
export default class Shixuninformation extends Component {
constructor(props) {
super(props)
- this.state = {
+ this.state = {}
+ }
+
+
+ componentDidMount() {
+ if (this.props.data) {
+
+ this.setState({
+ vnc: this.props.data && this.props.data.shixun.vnc,
+ use_scope: this.props.data && this.props.data.shixun.use_scope,
+ opening_time: this.props.data && this.props.data.shixun.opening_time,
+ opentime: !this.props.data && this.props.data.shixun.opening_time ? false : true,
+ oldscope_partment: this.props.data && this.props.data.shixun.scope_partment,
+ })
}
+ let departmentsUrl = `/shixuns/departments.json`;
+ axios.get(departmentsUrl).then((response) => {
+ if (response.status === 200) {
+ if (response.data.message === undefined) {
+ this.setState({
+ departmentslist: response.data.shools_name
+ });
+ }
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
}
-
render() {
-
+ console.log(this.props)
return (
-
- 1111
+
+
+
+
+ 开启图形化界面:
+
+
+
+
+
+
+
+ 命令行:
+
+
+
+
+
+
+
+
+
+
+ 命令行练习窗口 (选中则给学员提供用于练习操作的命令行,命令行的操作不会对学生的实验环境造成影响)
+ 命令行评测窗口 (选中则给学员提供用于评测操作的命令行,命令行的操作可以对学生的实验环境产生影响)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 隐藏代码窗口:
+
+
+
+
+
+
+
+ 公开版本库:
+
+
+
+
+
+
+
+ 隐藏代码目录:
+
+
+
+
+
+
+
+ 禁用复制粘贴:
+
+
+
+
+
+
+
+ 跳关:
+
+
+
+
+
+
+
+ 测试集解锁:
+
+
+
+
+
+
+
+
+
+ {this.props.identity < 5 ?
+
: ""}
);
}
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index 02ff6a660..ed04b63ab 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -127,6 +127,9 @@ export default class TPMsettings extends Component {
border-bottom: 0px;
margin-top: 30px!important;
}
+ .ant-tabs-nav{
+ margin-left:20px;
+ }
`
}
diff --git a/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css b/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css
index 9e8858596..13dc25e37 100644
--- a/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css
+++ b/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css
@@ -134,4 +134,20 @@ a.newuse_scope-btn {
.openrenyuan{
margin-top: 5px !important;
display: inline-block;
+}
+
+.ml84{
+ margin-left:84px;
+}
+
+.ml36s{
+ margin-left: 36px;
+}
+
+.ml64{
+ margin-left: 64px;
+}
+
+.ml160{
+ margin-left: 160px;
}
\ No newline at end of file
diff --git a/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js b/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js
index 7b05980e0..8688e9669 100644
--- a/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js
@@ -34,25 +34,25 @@ const confirm = Modal.confirm;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
- if (!dateString) return dateString;
- const ar = dateString.split(':')
- if (ar[1] == '00' || ar[1] == '30') {
- return dateString
- }
- const miniute = parseInt(ar[1]);
- if (miniute < 30 || miniute == 60) {
- return [ar[0], '30'].join(':')
- }
- if (miniute < 60) {
- // 加一个小时
- const tempStr = [ar[0], '00'].join(':');
- const format = "YYYY-MM-DD HH:mm";
- const _moment = moment(tempStr, format)
- _moment.add(1, 'hours')
- return _moment.format(format)
- }
-
- return dateString
+ if (!dateString) return dateString;
+ const ar = dateString.split(':')
+ if (ar[1] == '00' || ar[1] == '30') {
+ return dateString
+ }
+ const miniute = parseInt(ar[1]);
+ if (miniute < 30 || miniute == 60) {
+ return [ar[0], '30'].join(':')
+ }
+ if (miniute < 60) {
+ // 加一个小时
+ const tempStr = [ar[0], '00'].join(':');
+ const format = "YYYY-MM-DD HH:mm";
+ const _moment = moment(tempStr, format)
+ _moment.add(1, 'hours')
+ return _moment.format(format)
+ }
+
+ return dateString
}
// 恢复数据
@@ -186,28 +186,28 @@ function updatamakedown(id){
}
function range(start, end) {
- const result = [];
- for (let i = start; i < end; i++) {
- result.push(i);
- }
- return result;
+ const result = [];
+ for (let i = start; i < end; i++) {
+ result.push(i);
+ }
+ return result;
}
function disabledDateTime() {
- return {
- // disabledHours: () => range(0, 24).splice(4, 20),
- disabledMinutes: () => range(1, 30).concat(range(31, 60)),
- // disabledSeconds: () => [0, 60],
- };
+ return {
+ // disabledHours: () => range(0, 24).splice(4, 20),
+ disabledMinutes: () => range(1, 30).concat(range(31, 60)),
+ // disabledSeconds: () => [0, 60],
+ };
}
function disabledDate(current) {
- return current && current < moment().endOf('day').subtract(1, 'days');
+ return current && current < moment().endOf('day').subtract(1, 'days');
}
export default class TPMsettings extends Component {
constructor(props) {
super(props)
this.state = {
- fileList: [],
+ fileList: [],
commandLine: 0,
Openpublic: 0,
settingsData: undefined,
@@ -220,7 +220,7 @@ export default class TPMsettings extends Component {
can_copy: undefined,
task_pass: undefined,
test_set_permission: undefined,
- code_edit_permission: undefined,
+ code_edit_permission: undefined,
hide_code: undefined,
code_hidden: undefined,
forbid_copy: undefined,
@@ -265,13 +265,13 @@ export default class TPMsettings extends Component {
scope_partmenttype:false,
newuse_scope:undefined,
scope_partments:0,
- shixun_service_configs:undefined,
- shixun_service_configlist:undefined,
+ shixun_service_configs:undefined,
+ shixun_service_configlist:undefined,
pod_exist_time: undefined,
pod_exist_timetype: false,
shixunmemoMDvalue:"",
- language:"",
- deleteisnot:true
+ language:"",
+ deleteisnot:true
}
}
descriptionMD=(initValue, id)=> {
@@ -353,7 +353,7 @@ export default class TPMsettings extends Component {
task_pass: response.data.shixun.task_pass,
test_set_permission: response.data.shixun.test_set_permission,
hide_code: response.data.shixun.hide_code,
- code_edit_permission: response.data.shixun.code_edit_permission,
+ code_edit_permission: response.data.shixun.code_edit_permission,
code_hidden: response.data.shixun.code_hidden,
is_secret_repository: response.data.shixun.is_secret_repository,
init_is_secret_repository: response.data.shixun.is_secret_repository,
@@ -374,8 +374,8 @@ export default class TPMsettings extends Component {
newuse_scope:response.data.shixun.use_scope,
scope_partments: response.data.shixun.scope_partment.length,
shixunmemoMDvalue:response.data.shixun.evaluate_script,
- shixun_service_configs:response.data.shixun.shixun_service_configs,
- shixun_service_configlist:response.data.shixun.shixun_service_configs,
+ shixun_service_configs:response.data.shixun.shixun_service_configs,
+ shixun_service_configlist:response.data.shixun.shixun_service_configs,
})
// if(response.data.status===403){
@@ -427,12 +427,12 @@ export default class TPMsettings extends Component {
let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => {
if (response.status === 200) {
- if (response.data.message === undefined) {
- this.setState({
- departmentslist: response.data.shools_name
- });
- }
- }
+ if (response.data.message === undefined) {
+ this.setState({
+ departmentslist: response.data.shools_name
+ });
+ }
+ }
}).catch((error) => {
console.log(error)
});
@@ -443,37 +443,37 @@ export default class TPMsettings extends Component {
SelectshixunCommand=(e)=>{
// console.log( e.target.value)
- const webssh = e.target.value
- if (webssh == 2) {
- this.setState({
- webssh: webssh,
- SelectTheCommandtype: true,
- multi_webssh:false
- });
- } else {
- if (this.state.init_is_secret_repository && !this.state.vnc && this.state.is_secret_repository == true) {
- this.confirmDeleteSecretRepo({
- onOk: () => {
- this.setState({
- webssh: webssh,
- SelectTheCommandtype: false,
- multi_webssh:false
- });
- }
- })
- } else {
- if (!this.state.vnc) {
- this.setState({
- is_secret_repository: false,
- })
- }
- this.setState({
- webssh: webssh,
- SelectTheCommandtype: false,
- multi_webssh:false
- });
- }
- }
+ const webssh = e.target.value
+ if (webssh == 2) {
+ this.setState({
+ webssh: webssh,
+ SelectTheCommandtype: true,
+ multi_webssh:false
+ });
+ } else {
+ if (this.state.init_is_secret_repository && !this.state.vnc && this.state.is_secret_repository == true) {
+ this.confirmDeleteSecretRepo({
+ onOk: () => {
+ this.setState({
+ webssh: webssh,
+ SelectTheCommandtype: false,
+ multi_webssh:false
+ });
+ }
+ })
+ } else {
+ if (!this.state.vnc) {
+ this.setState({
+ is_secret_repository: false,
+ })
+ }
+ this.setState({
+ webssh: webssh,
+ SelectTheCommandtype: false,
+ multi_webssh:false
+ });
+ }
+ }
// this.setState({
// webssh: webssh,
@@ -549,9 +549,9 @@ export default class TPMsettings extends Component {
}
code_edit_permission = (e) => {
- this.setState({
- code_edit_permission: e.target.checked
- })
+ this.setState({
+ code_edit_permission: e.target.checked
+ })
}
code_hidden=(e)=>{
let sum = ""
@@ -566,33 +566,33 @@ export default class TPMsettings extends Component {
}
confirmDeleteSecretRepo = ({title, onOk}) => {
- confirm({
- title: title ||
-
已创建的私密版本库及其内容,将在“保存”时被删除。
-
是否确认取消勾选?
-
,
- okText: '确定',
- cancelText: '取消',
- onOk: () => {
- this.setState({ is_secret_repository: false })
- onOk && onOk()
- },
- onCancel() {
- },
- });
+ confirm({
+ title: title ||
+
已创建的私密版本库及其内容,将在“保存”时被删除。
+
是否确认取消勾选?
+
,
+ okText: '确定',
+ cancelText: '取消',
+ onOk: () => {
+ this.setState({ is_secret_repository: false })
+ onOk && onOk()
+ },
+ onCancel() {
+ },
+ });
}
is_secret_repository = (e) => {
- const checked = e.target.checked
- if (!checked) {
- if (this.state.init_is_secret_repository) {
- this.confirmDeleteSecretRepo({
- })
- } else {
- this.setState({ is_secret_repository: false })
- }
- } else {
- this.setState({ is_secret_repository: true })
- }
+ const checked = e.target.checked
+ if (!checked) {
+ if (this.state.init_is_secret_repository) {
+ this.confirmDeleteSecretRepo({
+ })
+ } else {
+ this.setState({ is_secret_repository: false })
+ }
+ } else {
+ this.setState({ is_secret_repository: true })
+ }
}
forbid_copy = (e) => {
let sum = ""
@@ -606,10 +606,10 @@ export default class TPMsettings extends Component {
});
}
shixun_vnc_evaluate=(e) => {
- this.setState({
+ this.setState({
vnc_evaluate: e.target.checked,
});
-
+
}
shixun_vnc=(e)=>{
@@ -619,34 +619,34 @@ export default class TPMsettings extends Component {
// } else if (e.target.checked === true) {
// sum = 1
// }
- const vnc = e.target.checked;
- if (!vnc) {
- if (this.state.init_is_secret_repository && this.state.webssh != 2 && this.state.is_secret_repository == true) {
- this.confirmDeleteSecretRepo({
- onOk: () => {
- this.setState({
- vnc: e.target.checked,
- vnc_evaluate: false,
- });
- }
- })
- } else {
- if (this.state.webssh != 2) {
- this.setState({
- is_secret_repository: false
- })
- }
- this.setState({
- vnc: e.target.checked,
- vnc_evaluate: false,
- });
- }
- } else {
- this.setState({
- vnc: e.target.checked,
- vnc_evaluate: false,
- });
- }
+ const vnc = e.target.checked;
+ if (!vnc) {
+ if (this.state.init_is_secret_repository && this.state.webssh != 2 && this.state.is_secret_repository == true) {
+ this.confirmDeleteSecretRepo({
+ onOk: () => {
+ this.setState({
+ vnc: e.target.checked,
+ vnc_evaluate: false,
+ });
+ }
+ })
+ } else {
+ if (this.state.webssh != 2) {
+ this.setState({
+ is_secret_repository: false
+ })
+ }
+ this.setState({
+ vnc: e.target.checked,
+ vnc_evaluate: false,
+ });
+ }
+ } else {
+ this.setState({
+ vnc: e.target.checked,
+ vnc_evaluate: false,
+ });
+ }
}
shixunsname = (e) => {
// let {shixunsstatus}=this.state;
@@ -660,43 +660,43 @@ export default class TPMsettings extends Component {
}
bigClass = (value) => {
- // choice_main_type
- // choice_small_type
- let {settingsData,shixun_service_configs,choice_main_type,choice_small_type}=this.state;
-
- let list=[]
- list.push(choice_main_type)
- choice_small_type.map((item,key)=>{
- list.push(item)
- })
-
- let newshixun_service_configs=shixun_service_configs;
-
- let newshixun_service_configsagin=[]
-
- newshixun_service_configs.map((item,key)=>{
- list.map((its,index)=>{
- if(item.mirror_repository_id===its){
- newshixun_service_configsagin.push(item)
- }
- })
- })
-
-
- settingsData.shixun.main_type.some((item,key)=> {
- if (item.id === value) {
- newshixun_service_configsagin[0]={
- mirror_repository_id:value,
- name:item.type_name,
- cpu_limit:1,
- lower_cpu_limit:0.1,
- memory_limit:1024,
- request_limit:10
- }
- return true
- }
- }
- )
+ // choice_main_type
+ // choice_small_type
+ let {settingsData,shixun_service_configs,choice_main_type,choice_small_type}=this.state;
+
+ let list=[]
+ list.push(choice_main_type)
+ choice_small_type.map((item,key)=>{
+ list.push(item)
+ })
+
+ let newshixun_service_configs=shixun_service_configs;
+
+ let newshixun_service_configsagin=[]
+
+ newshixun_service_configs.map((item,key)=>{
+ list.map((its,index)=>{
+ if(item.mirror_repository_id===its){
+ newshixun_service_configsagin.push(item)
+ }
+ })
+ })
+
+
+ settingsData.shixun.main_type.some((item,key)=> {
+ if (item.id === value) {
+ newshixun_service_configsagin[0]={
+ mirror_repository_id:value,
+ name:item.type_name,
+ cpu_limit:1,
+ lower_cpu_limit:0.1,
+ memory_limit:1024,
+ request_limit:10
+ }
+ return true
+ }
+ }
+ )
let url = `/shixuns/get_mirror_script.json?mirror_id=`+value;
axios.get(url).then((response) => {
if (response.status === 200) {
@@ -705,8 +705,8 @@ export default class TPMsettings extends Component {
choice_main_type: value,
standard_scripts:response.data,
choice_standard_scripts:null,
- shixun_service_configs:newshixun_service_configsagin,
- shixun_service_configlist:newshixun_service_configsagin,
+ shixun_service_configs:newshixun_service_configsagin,
+ shixun_service_configlist:newshixun_service_configsagin,
})
}
}).catch((error) => {
@@ -716,96 +716,96 @@ export default class TPMsettings extends Component {
}
- Deselectlittle=(value)=>{
+ Deselectlittle=(value)=>{
- let {shixun_service_configs,choice_small_type}=this.state;
- let newshixun_service_configs=shixun_service_configs;
- let newchoice_small_type=choice_small_type;
+ let {shixun_service_configs,choice_small_type}=this.state;
+ let newshixun_service_configs=shixun_service_configs;
+ let newchoice_small_type=choice_small_type;
- newshixun_service_configs.some((item,key)=> {
- if (item.mirror_repository_id === value) {
- newshixun_service_configs.splice(key, 1)
- return true
- }
- }
- )
+ 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
- }
- }
- )
+ newchoice_small_type.some((item,key)=> {
+ if (item === value) {
+ newchoice_small_type.splice(key, 1)
+ return true
+ }
+ }
+ )
- this.setState({
- choice_small_type: newchoice_small_type,
- shixun_service_configs:newshixun_service_configs,
- shixun_service_configlist:newshixun_service_configs,
- })
- }
+ this.setState({
+ choice_small_type: newchoice_small_type,
+ shixun_service_configs:newshixun_service_configs,
+ shixun_service_configlist:newshixun_service_configs,
+ })
+ }
littleClass = (value) => {
- let {settingsData,shixun_service_configs,choice_small_type,choice_main_type}=this.state;
- let newshixun_service_configs=shixun_service_configs;
- let newchoice_small_type=choice_small_type;
- // if(Array.isArray(value)===true){
- // value.map((item,key)=>{
- // settingsData.shixun.small_type.some((items,keys)=> {
- // if (items.id === item) {
- // newshixun_service_configs.push({
- // mirror_repository_id:value,
- // name:items.type_name,
- // cpu_limit:1,
- // lower_cpu_limit:0.1,
- // memory_limit:1024,
- // request_limit:10
- // })
- // return true
- // }
- // }
- // )
- // })
- // }
-
- let list=[]
- list.push(choice_main_type)
- choice_small_type.map((item,key)=>{
- list.push(item)
- })
-
- let newshixun_service_configsagin=[]
-
- newshixun_service_configs.map((item,key)=>{
- list.map((its,index)=>{
- if(item.mirror_repository_id===its){
- newshixun_service_configsagin.push(item)
- }
- })
- })
-
- settingsData.shixun.small_type.some((items,keys)=> {
- if (items.id === value) {
- newshixun_service_configsagin.push({
- mirror_repository_id:value,
- name:items.type_name,
- cpu_limit:1,
- lower_cpu_limit:0.1,
- memory_limit:1024,
- request_limit:10
- })
- return true
- }
- }
- )
-
- newchoice_small_type.push(value)
+ let {settingsData,shixun_service_configs,choice_small_type,choice_main_type}=this.state;
+ let newshixun_service_configs=shixun_service_configs;
+ let newchoice_small_type=choice_small_type;
+ // if(Array.isArray(value)===true){
+ // value.map((item,key)=>{
+ // settingsData.shixun.small_type.some((items,keys)=> {
+ // if (items.id === item) {
+ // newshixun_service_configs.push({
+ // mirror_repository_id:value,
+ // name:items.type_name,
+ // cpu_limit:1,
+ // lower_cpu_limit:0.1,
+ // memory_limit:1024,
+ // request_limit:10
+ // })
+ // return true
+ // }
+ // }
+ // )
+ // })
+ // }
+
+ let list=[]
+ list.push(choice_main_type)
+ choice_small_type.map((item,key)=>{
+ list.push(item)
+ })
+
+ let newshixun_service_configsagin=[]
+
+ newshixun_service_configs.map((item,key)=>{
+ list.map((its,index)=>{
+ if(item.mirror_repository_id===its){
+ newshixun_service_configsagin.push(item)
+ }
+ })
+ })
+
+ settingsData.shixun.small_type.some((items,keys)=> {
+ if (items.id === value) {
+ newshixun_service_configsagin.push({
+ mirror_repository_id:value,
+ name:items.type_name,
+ cpu_limit:1,
+ lower_cpu_limit:0.1,
+ memory_limit:1024,
+ request_limit:10
+ })
+ return true
+ }
+ }
+ )
+
+ newchoice_small_type.push(value)
this.setState({
choice_small_type: newchoice_small_type,
- shixun_service_configs:newshixun_service_configsagin,
- shixun_service_configlist:newshixun_service_configsagin,
+ shixun_service_configs:newshixun_service_configsagin,
+ shixun_service_configlist:newshixun_service_configsagin,
})
}
onPodExistTimeChange = (e) => {
@@ -865,12 +865,12 @@ export default class TPMsettings extends Component {
// });
// }
submit_edit_shixun = () => {
- if (this.saving == true) return;
+ if (this.saving == true) return;
this.saving = true;
- if(this.state.status===-1){
- this.props.showSnackbar("该实训已被删除,保存失败!");
- return
- }
+ if(this.state.status===-1){
+ this.props.showSnackbar("该实训已被删除,保存失败!");
+ return
+ }
let {
name, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum, vnc_evaluate,
@@ -878,15 +878,15 @@ export default class TPMsettings extends Component {
opening_time,shixunmemoMDvalue,shixun_service_configlist, is_secret_repository, code_edit_permission
} = this.state;
- let newshixun_service_configlist = shixun_service_configlist.map(v => {
- let v1 = Object.assign({},v);
- delete v1.name;
- return v1
- });
+ let newshixun_service_configlist = shixun_service_configlist.map(v => {
+ let v1 = Object.assign({},v);
+ delete v1.name;
+ return v1
+ });
// let operateauthority=
- // this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
- // this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
+ // this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
+ // this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
const description_editormd = this.description_editormd.getValue();
@@ -975,42 +975,42 @@ export default class TPMsettings extends Component {
newmulti_webssh=false
}
- //exec_time: exec_time,
+ //exec_time: exec_time,
let Url = `/shixuns/` + id + `.json`;
let data = {
- shixun:{
-
- name: name,
- webssh: webssh,
- use_scope: use_scope,
- can_copy: can_copy,
- vnc: vnc===null?undefined:vnc,
- vnc_evaluate: vnc_evaluate===null?undefined:vnc_evaluate,
- test_set_permission: test_set_permission,
- code_hidden: code_hidden,
- code_edit_permission: code_edit_permission,
- trainee: trainee,
- task_pass: task_pass,
- hide_code: hide_code,
- forbid_copy: forbid_copy,
- multi_webssh:newmulti_webssh,
- opening_time:opening_time,
- mirror_script_id:choice_standard_scriptssum===undefined?choice_standard_scripts:choice_standard_scriptssum,
- },
- shixun_info:{
- description: description_editormd,
- evaluate_script: evaluate_script_editormd,
- },
- is_secret_repository: is_secret_repository,
- main_type: choice_main_type,
- small_type: choice_small_type,
- scope_partment: scope_partment,
- shixun_service_configs:newshixun_service_configlist
+ shixun:{
+
+ name: name,
+ webssh: webssh,
+ use_scope: use_scope,
+ can_copy: can_copy,
+ vnc: vnc===null?undefined:vnc,
+ vnc_evaluate: vnc_evaluate===null?undefined:vnc_evaluate,
+ test_set_permission: test_set_permission,
+ code_hidden: code_hidden,
+ code_edit_permission: code_edit_permission,
+ trainee: trainee,
+ task_pass: task_pass,
+ hide_code: hide_code,
+ forbid_copy: forbid_copy,
+ multi_webssh:newmulti_webssh,
+ opening_time:opening_time,
+ mirror_script_id:choice_standard_scriptssum===undefined?choice_standard_scripts:choice_standard_scriptssum,
+ },
+ shixun_info:{
+ description: description_editormd,
+ evaluate_script: evaluate_script_editormd,
+ },
+ is_secret_repository: is_secret_repository,
+ main_type: choice_main_type,
+ small_type: choice_small_type,
+ scope_partment: scope_partment,
+ shixun_service_configs:newshixun_service_configlist
}
axios.put(Url, data).then((response) => {
// console.log(response)
- this.saving = false;
+ this.saving = false;
if(response.status){
if (response.data.status === -1) {
this.props.showSnackbar(response.data.message);
@@ -1022,7 +1022,7 @@ export default class TPMsettings extends Component {
}).catch((error) => {
console.log(error)
- this.saving = false;
+ this.saving = false;
})
@@ -1156,168 +1156,168 @@ export default class TPMsettings extends Component {
})
}
- setlanguagewrite = (e)=>{
- this.setState({
- languagewrite: e.target.value
- })
- }
-
- setsystemenvironment = (e) => {
- this.setState({
- systemenvironment: e.target.value
- })
- }
-
- settestcoderunmode = (e) => {
- this.setState({
- testcoderunmode: e.target.value
- })
-
- }
-
- sendsure_apply = () => {
- let {languagewrite,systemenvironment,testcoderunmode} = this.state;
- // console.log("点击确定")
- // console.log("languagewrite"+languagewrite);
- // console.log("systemenvironment"+systemenvironment);
- // console.log("testcoderunmode"+testcoderunmode);
-
- // let attachment_ids = undefined
- // if (this.state.fileList) {
- // attachment_ids = this.state.fileList.map(item => {
- // return item.response ? item.response.id : item.id
- // })
- // }
- if(languagewrite === undefined || languagewrite === "" ){
- // this.props.showNotification(`请填写该镜像是基于什么语言`);
- this.setState({
- languagewritetype:true
- })
- return
- }
- if(systemenvironment === undefined || systemenvironment === ""){
- // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
- this.setState({
- systemenvironmenttype:true
- })
- return;
-
- }
- if(testcoderunmode === undefined || testcoderunmode === "") {
- // this.props.showNotification(`请填写该镜像中测试代码运行方式`);
- this.setState({
- testcoderunmodetype:true
- })
- return;
- }
- var attachment_ids=undefined;
- if (this.state.fileList) {
- attachment_ids = this.state.fileList.map(item => {
- return item.response ? item.response.id : item.id
- })
- }
-
- if( attachment_ids === undefined || attachment_ids.length===0){
-
- // notification.open(
- // {
- // message: '提示',
- // description:
- // '请上传附件!',
- //
- // }
- // )
- this.setState({
- attachmentidstype:true
- })
- return;
- }
- // console.log("attachment_ids"+attachment_ids);
-
- // alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids);
-
- var data={
- language:languagewrite,
- runtime:systemenvironment,
- run_method:testcoderunmode,
- attachment_id:attachment_ids[0],
- }
- var url =`/shixuns/apply_shixun_mirror.json`;
- axios.post(url,data
- ).then((response) => {
-
- try {
- if (response.data) {
- // const { id } = response.data;
- // if (id) {
- if(this.state.file !== undefined){
- console.log("549");
- // this.deleteAttachment(this.state.file);
- this.setState({
- file:undefined,
- deleteisnot:true,
- languagewrite:"",
- systemenvironment:"",
- testcoderunmode:"",
- fileList:[]
- })
- }else {
- this.setState({
- file:undefined,
- deleteisnot:true,
- languagewrite:"",
- systemenvironment:"",
- testcoderunmode:"",
- fileList:[]
- })
- }
- // this.props.showNotification('提交成功!');
- notification.open(
- {
- message: '提示',
- description:
- '提交成功!',
-
- }
- )
- this.sendhideModaly()
- // this.props.history.push(`/courses/${cid}/graduation_topics`);
- // }
- }
- }catch (e) {
-
- }
-
- })
-
- }
-
- sendhideModaly = () => {
- this.setState({
- postapplyvisible: false,
- })
- if(this.state.file !== undefined){
- console.log("580");
- // this.deleteAttachment(this.state.file);
- this.setState({
- file:undefined,
- deleteisnot:true,
- languagewrite:"",
- systemenvironment:"",
- testcoderunmode:"",
- fileList:[]
- })
- }else {
- this.setState({
- file:undefined,
- deleteisnot:true,
- languagewrite:"",
- systemenvironment:"",
- testcoderunmode:"",
- fileList:[]
- })
- }
- }
+ setlanguagewrite = (e)=>{
+ this.setState({
+ languagewrite: e.target.value
+ })
+ }
+
+ setsystemenvironment = (e) => {
+ this.setState({
+ systemenvironment: e.target.value
+ })
+ }
+
+ settestcoderunmode = (e) => {
+ this.setState({
+ testcoderunmode: e.target.value
+ })
+
+ }
+
+ sendsure_apply = () => {
+ let {languagewrite,systemenvironment,testcoderunmode} = this.state;
+ // console.log("点击确定")
+ // console.log("languagewrite"+languagewrite);
+ // console.log("systemenvironment"+systemenvironment);
+ // console.log("testcoderunmode"+testcoderunmode);
+
+ // let attachment_ids = undefined
+ // if (this.state.fileList) {
+ // attachment_ids = this.state.fileList.map(item => {
+ // return item.response ? item.response.id : item.id
+ // })
+ // }
+ if(languagewrite === undefined || languagewrite === "" ){
+ // this.props.showNotification(`请填写该镜像是基于什么语言`);
+ this.setState({
+ languagewritetype:true
+ })
+ return
+ }
+ if(systemenvironment === undefined || systemenvironment === ""){
+ // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
+ this.setState({
+ systemenvironmenttype:true
+ })
+ return;
+
+ }
+ if(testcoderunmode === undefined || testcoderunmode === "") {
+ // this.props.showNotification(`请填写该镜像中测试代码运行方式`);
+ this.setState({
+ testcoderunmodetype:true
+ })
+ return;
+ }
+ var attachment_ids=undefined;
+ if (this.state.fileList) {
+ attachment_ids = this.state.fileList.map(item => {
+ return item.response ? item.response.id : item.id
+ })
+ }
+
+ if( attachment_ids === undefined || attachment_ids.length===0){
+
+ // notification.open(
+ // {
+ // message: '提示',
+ // description:
+ // '请上传附件!',
+ //
+ // }
+ // )
+ this.setState({
+ attachmentidstype:true
+ })
+ return;
+ }
+ // console.log("attachment_ids"+attachment_ids);
+
+ // alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids);
+
+ var data={
+ language:languagewrite,
+ runtime:systemenvironment,
+ run_method:testcoderunmode,
+ attachment_id:attachment_ids[0],
+ }
+ var url =`/shixuns/apply_shixun_mirror.json`;
+ axios.post(url,data
+ ).then((response) => {
+
+ try {
+ if (response.data) {
+ // const { id } = response.data;
+ // if (id) {
+ if(this.state.file !== undefined){
+ console.log("549");
+ // this.deleteAttachment(this.state.file);
+ this.setState({
+ file:undefined,
+ deleteisnot:true,
+ languagewrite:"",
+ systemenvironment:"",
+ testcoderunmode:"",
+ fileList:[]
+ })
+ }else {
+ this.setState({
+ file:undefined,
+ deleteisnot:true,
+ languagewrite:"",
+ systemenvironment:"",
+ testcoderunmode:"",
+ fileList:[]
+ })
+ }
+ // this.props.showNotification('提交成功!');
+ notification.open(
+ {
+ message: '提示',
+ description:
+ '提交成功!',
+
+ }
+ )
+ this.sendhideModaly()
+ // this.props.history.push(`/courses/${cid}/graduation_topics`);
+ // }
+ }
+ }catch (e) {
+
+ }
+
+ })
+
+ }
+
+ sendhideModaly = () => {
+ this.setState({
+ postapplyvisible: false,
+ })
+ if(this.state.file !== undefined){
+ console.log("580");
+ // this.deleteAttachment(this.state.file);
+ this.setState({
+ file:undefined,
+ deleteisnot:true,
+ languagewrite:"",
+ systemenvironment:"",
+ testcoderunmode:"",
+ fileList:[]
+ })
+ }else {
+ this.setState({
+ file:undefined,
+ deleteisnot:true,
+ languagewrite:"",
+ systemenvironment:"",
+ testcoderunmode:"",
+ fileList:[]
+ })
+ }
+ }
yeshidemodel = () => {
this.setState({
@@ -1328,7 +1328,7 @@ export default class TPMsettings extends Component {
SelectScput = (value, e) => {
this.setState({
choice_standard_scriptssum: value,
- language:e.props.name,
+ language:e.props.name,
choice_standard_scripts: {id:e.props.value,value:""},
standard_scriptsModal:true
})
@@ -1450,103 +1450,103 @@ export default class TPMsettings extends Component {
})
}
- setConfigsInputs=(e,keys,str)=>{
+ setConfigsInputs=(e,keys,str)=>{
- let {shixun_service_configs}=this.state;
+ 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,
- })
-
- }
-
- handleChange = (info) => {
- let {fileList}=this.state;
-
- if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
- console.log("handleChange1");
-
- // if(fileList.length===0){
- let fileLists = info.fileList;
- this.setState({ fileList:fileLists,
- deleteisnot:false});
- // }
- }
- }
-
- onAttachmentRemove = (file) => {
- if(!file.percent || file.percent == 100){
- confirm({
- title: '确定要删除这个附件吗?',
- okText: '确定',
- cancelText: '取消',
- // content: 'Some descriptions',
- onOk: () => {
- console.log("665")
- this.deleteAttachment(file)
- },
- onCancel() {
- console.log('Cancel');
- },
- });
- return false;
- }
-
- }
-
- deleteAttachment = (file) => {
- console.log(file);
- let id=file.response ==undefined ? file.id : file.response.id
- const url = `/attachments/${id}.json`
- axios.delete(url, {
- })
- .then((response) => {
- if (response.data) {
- const { status } = response.data;
- if (status == 0) {
- // console.log('--- success')
-
- this.setState((state) => {
-
- const index = state.fileList.indexOf(file);
- const newFileList = state.fileList.slice();
- newFileList.splice(index, 1);
- return {
- fileList: newFileList,
- deleteisnot:true
- };
- });
- }
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
-
-
- render() {
+ 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,
+ })
+
+ }
+
+ handleChange = (info) => {
+ let {fileList}=this.state;
+
+ if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
+ console.log("handleChange1");
+
+ // if(fileList.length===0){
+ let fileLists = info.fileList;
+ this.setState({ fileList:fileLists,
+ deleteisnot:false});
+ // }
+ }
+ }
+
+ onAttachmentRemove = (file) => {
+ if(!file.percent || file.percent == 100){
+ confirm({
+ title: '确定要删除这个附件吗?',
+ okText: '确定',
+ cancelText: '取消',
+ // content: 'Some descriptions',
+ onOk: () => {
+ console.log("665")
+ this.deleteAttachment(file)
+ },
+ onCancel() {
+ console.log('Cancel');
+ },
+ });
+ return false;
+ }
+
+ }
+
+ deleteAttachment = (file) => {
+ console.log(file);
+ let id=file.response ==undefined ? file.id : file.response.id
+ const url = `/attachments/${id}.json`
+ axios.delete(url, {
+ })
+ .then((response) => {
+ if (response.data) {
+ const { status } = response.data;
+ if (status == 0) {
+ // console.log('--- success')
+
+ this.setState((state) => {
+
+ const index = state.fileList.indexOf(file);
+ const newFileList = state.fileList.slice();
+ newFileList.splice(index, 1);
+ return {
+ fileList: newFileList,
+ deleteisnot:true
+ };
+ });
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+
+
+ render() {
let {
postapplyvisible,
postapplytitle,
@@ -1558,7 +1558,7 @@ export default class TPMsettings extends Component {
name,
settingsData,
webssh,
- is_secret_repository,
+ is_secret_repository,
use_scope,
shixunsID,
can_copy,
@@ -1570,10 +1570,10 @@ export default class TPMsettings extends Component {
test_set_permission,
hide_code,
forbid_copy,
- code_edit_permission,
+ code_edit_permission,
code_hidden,
vnc,
- vnc_evaluate,
+ vnc_evaluate,
scopetype,
scope_partment,
departmentslist,
@@ -1590,8 +1590,8 @@ export default class TPMsettings extends Component {
newuse_scope,
scope_partments,
shixunmemoMDvalue,delType,
- shixun_service_configs,
- fileList,
+ shixun_service_configs,
+ fileList,
} = this.state;
let options;
@@ -1603,523 +1603,523 @@ export default class TPMsettings extends Component {
)
})
}
- const uploadProps = {
- width: 600,
- fileList,
- multiple: true,
- // https://github.com/ant-design/ant-design/issues/15505
- // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
- // showUploadList: false,
- action: `${getUploadActionUrl()}`,
- onChange: this.handleChange,
- onRemove: this.onAttachmentRemove,
- beforeUpload: (file, fileList) => {
- if (this.state.fileList.length >= 1) {
- return false
- }
- // console.log('beforeUpload', file.name);
- const isLt150M = file.size / 1024 / 1024 < 50;
- if (!isLt150M) {
- // this.props.showNotification(`文件大小必须小于50MB`);
- notification.open(
- {
- message: '提示',
- description:
- '文件大小必须小于50MB',
-
- }
- )
- }
- if(this.state.file !== undefined){
- console.log("763")
- this.setState({
- file:file
- })
- }else {
- this.setState({
- file:file
- })
- }
-
- console.log("handleChange2");
- return isLt150M;
- },
- }
+ const uploadProps = {
+ width: 600,
+ fileList,
+ multiple: true,
+ // https://github.com/ant-design/ant-design/issues/15505
+ // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
+ // showUploadList: false,
+ action: `${getUploadActionUrl()}`,
+ onChange: this.handleChange,
+ onRemove: this.onAttachmentRemove,
+ beforeUpload: (file, fileList) => {
+ if (this.state.fileList.length >= 1) {
+ return false
+ }
+ // console.log('beforeUpload', file.name);
+ const isLt150M = file.size / 1024 / 1024 < 50;
+ if (!isLt150M) {
+ // this.props.showNotification(`文件大小必须小于50MB`);
+ notification.open(
+ {
+ message: '提示',
+ description:
+ '文件大小必须小于50MB',
+
+ }
+ )
+ }
+ if(this.state.file !== undefined){
+ console.log("763")
+ this.setState({
+ file:file
+ })
+ }else {
+ this.setState({
+ file:file
+ })
+ }
+
+ console.log("handleChange2");
+ return isLt150M;
+ },
+ }
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
return (
-
-
- 实训详情
- 配置
-
-
-
-
-
-
-
-
实训名称
-
-
-
*
-
-
- {settingsData === undefined ? "" :
- }
-
-
- 必填项
-
-
-
-
-
-
-
-
-
-
-
-
-
-
技术平台
-
-
-
-
*
-
-
-
- 列表中没有?
- 申请新建
-
-
-
-
-
-
-
-
-
{this.state.languagewritetype===true?"请填写该镜像语言":""}
-
-
-
-
-
{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}
-
-
-
-
-
-
{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}
-
-
-
-
-
- 上传附件
- (单个文件50M以内)
-
-
-
-
- {this.state.attachmentidstype===true?"请上传附件":""}
-
-
- this.sendhideModaly()}
- >取消
-
-
-
-
-
-
-
-
-
-
-
-
-
新建申请已提交,请等待管理员的审核
-
我们将在1-2个工作日内与您联系
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 实训详情
+ 配置
+
+
+
+
+
+
+
+
实训名称
+
+
+
*
+
+
+ {settingsData === undefined ? "" :
+ }
+
+
+ 必填项
+
+
+
+
+
+
+
+
+
+
+
+
+
+
技术平台
+
+
+
+
*
+
+
+
+ 列表中没有?
+ 申请新建
+
+
+
+
+
+
+
+
+
{this.state.languagewritetype===true?"请填写该镜像语言":""}
+
+
+
+
+
{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}
+
+
+
+
+
+
{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}
+
+
+
+
+
+ 上传附件
+ (单个文件50M以内)
+
+
+
+
+ {this.state.attachmentidstype===true?"请上传附件":""}
+
+
+ this.sendhideModaly()}
+ >取消
+
+
+
+
+
+
+
+
+
+
+
+
+
新建申请已提交,请等待管理员的审核
+
我们将在1-2个工作日内与您联系
+
+
+
+
+
+
+
+
+
+
+
必填项
-
- {/*
请在配置页面完成后续的评测脚本设置操作
*/}
-
-
-
- {/*
*/}
- {/*
*/}
-
-
评测脚本
-
-
-
-
-
原有脚本将被新的脚本覆盖,无法撤销
-
是否确认执行覆盖操作
-
-
-
-
-
-
-
-
-
-
- {
- this.props.identity<5||this.props.power==true?
-
使用自定义脚本 : ""
- }
-
-
this.testscripttip(0)}>![]({getImageUrl("images/educoder/problem.png"))
-
-
-
-
- 使用自定义模板,平台无法自动更新脚本,
- 请在关卡创建完后手动更新脚本中的必填参
- 数和以下2个数组元素:
- challengeProgramNames
- sourceClassNames
- 示例:有2个关卡的实训
- 各关卡的待编译文件为:
- src/step1/HelloWorld.java
- src/step2/Other.java
- 各关卡的编译后生成的执行文件为:
- step1.HelloWorld
- step2.Other
- 则数组元素更新如下:
- challengeProgramNames=("src/step1/
- HelloWorld.java" "src/step2/Other.java")
- sourceClassNames=("step1.HelloWorld
- " "step2.Other")
- 其它参数可按实际需求定制
-
-
-
- this.testscripttip(1)}>知道了
-
-
-
-
-
-
-
-
-
+ {/*请在配置页面完成后续的评测脚本设置操作
*/}
+
+
+
+ {/*
*/}
+ {/*
*/}
+
+
评测脚本
+
+
+
+
+
原有脚本将被新的脚本覆盖,无法撤销
+
是否确认执行覆盖操作
+
+
+
+
+
+
+
+
+
+
+ {
+ this.props.identity<5||this.props.power==true?
+
使用自定义脚本 : ""
+ }
+
+
this.testscripttip(0)}>![]({getImageUrl("images/educoder/problem.png"))
+
+
+
+
+ 使用自定义模板,平台无法自动更新脚本,
+ 请在关卡创建完后手动更新脚本中的必填参
+ 数和以下2个数组元素:
+ challengeProgramNames
+ sourceClassNames
+ 示例:有2个关卡的实训
+ 各关卡的待编译文件为:
+ src/step1/HelloWorld.java
+ src/step2/Other.java
+ 各关卡的编译后生成的执行文件为:
+ step1.HelloWorld
+ step2.Other
+ 则数组元素更新如下:
+ challengeProgramNames=("src/step1/
+ HelloWorld.java" "src/step2/Other.java")
+ sourceClassNames=("step1.HelloWorld
+ " "step2.Other")
+ 其它参数可按实际需求定制
+
+
+
+ this.testscripttip(1)}>知道了
+
+
+
+
+
+
+
+
+
- 执行命令不能为空
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
*
-
-
-
-
- {/**/}
-
-
-
-
- {/*
*/}
- {/*{evaluate_script===undefined?"":evaluate_script}*/}
-
- {/*
*/}
-
-
-
-
-
-
-
+
+
+
+
+
*
+
+
+
+
+ {/**/}
+
+
+
+
+ {/*
*/}
+ {/*{evaluate_script===undefined?"":evaluate_script}*/}
+
+ {/*
*/}
+
+
+
+
+
+
+
-
-
- {/*
*/}
- {/*
**/}
-
- {/*
程序最大执行时间
*/}
-
- {/*
秒*/}
-
- {/*
*/}
- {/*必填项*/}
- {/*
*/}
- {/*
*/}
-
- {/*
+
+
+
+
+
+
+ {/*
*/}
+ {/*
**/}
+
+ {/*
程序最大执行时间
*/}
+
+ {/*
秒*/}
+
+ {/*
*/}
+ {/*必填项*/}
+ {/*
*/}
+ {/*
*/}
+
+ {/*
*
Pod存活时间
@@ -2136,300 +2136,300 @@ export default class TPMsettings extends Component {
*/}
-
-
命令行
-
- 无命令行窗口 (选中则不给学员的实践任务提供命令窗口)
- 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口)
- 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口)
-
- 多个命令行窗口(选中则允许学员同时开启多个命令行窗口)
-
-
-
-
-
-
公开程度
-
- 对所有公开 (选中则所有已被试用授权的用户可以学习)
- 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习)
-
-
-
-
-
-
-
-
- {/*{*/}
- {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/}
- {/*return(*/}
- {/*
*/}
- {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/}
- {/*value={item}*/}
- {/*/>*/}
- {/*
*/}
-
- {/*)*/}
- {/*})*/}
- {/*}*/}
-
-
+
+
命令行
+
+ 无命令行窗口 (选中则不给学员的实践任务提供命令窗口)
+ 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口)
+ 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口)
+
+ 多个命令行窗口(选中则允许学员同时开启多个命令行窗口)
+
+
+
+
+
+
公开程度
+
+ 对所有公开 (选中则所有已被试用授权的用户可以学习)
+ 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习)
+
+
+
+
+
+
+
+
+ {/*{*/}
+ {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/}
+ {/*return(*/}
+ {/*
*/}
+ {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/}
+ {/*value={item}*/}
+ {/*/>*/}
+ {/*
*/}
+
+ {/*)*/}
+ {/*})*/}
+ {/*}*/}
+
+
请选择需要公开的单位
-
-
-
-
-
-
发布信息
-
-
-
*
-
面向学员:
-
-
-
-
-
实训难易度定位,不限定用户群体
-
+
+
+
+
+
+
发布信息
+
+
+
*
+
面向学员:
+
+
+
+
+
实训难易度定位,不限定用户群体
+
必填项
-
-
-
-
- 复制:
-
+ id="shixun_name_notice">必填项
+
+
+
+
+ 复制:
+
-
+
-
-
跳关:
-
+
+ 跳关:
+
-
-
- 测试集解锁:
-
+
+
+ 测试集解锁:
+
+ onChange={this.test_set_permission}>
-
+
- {!code_hidden && !hide_code &&
-
代码开放修改:
-
+ {!code_hidden && !hide_code &&
+ 代码开放修改:
+
+ onChange={this.code_edit_permission}>
-
}
+ }
-
-
隐藏代码窗口:
-
+
+ 隐藏代码窗口:
+
-
+
-
-
代码目录隐藏:
-
+
+ 代码目录隐藏:
+
+ onChange={this.code_hidden}>
-
+
- { (vnc || webssh == 2) &&
-
私密版本库:
-
+ { (vnc || webssh == 2) &&
+ 私密版本库:
+
+ onChange={this.is_secret_repository}>
-
}
+ }
-
-
禁用复制粘贴:
-
+
+ 禁用复制粘贴:
+
+ onChange={this.forbid_copy}>
-
+
-
-
开启时间:
-
+
+ 开启时间:
+
+ showToday={false}
+ showTime={{ format: 'HH:mm' }}
+ format="YYYY-MM-DD HH:mm"
+ width={178}
+ locale={locale}
+ disabledTime={disabledDateTime}
+ disabledDate={disabledDate}
+ placeholder="请选择开启时间"
+ value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
+ onChange={this.onChangeTimePicker}
+ dropdownClassName="hideDisable"
+ />
-
+
- {this.props.identity<3?
-
VNC图形化:
-
+ {this.props.identity<3?
+ VNC图形化:
+
-
:""}
- {this.props.identity<3 && vnc ?
- VNC图形化评测:
-
+
:""}
+ {this.props.identity<3 && vnc ?
+ VNC图形化评测:
+
-
:""}
-
-
-
-
-
- {this.props.identity<3?
-
服务配置
- { shixun_service_configs&&shixun_service_configs.map((item,key)=>{
-
- return(
-
-
-
- {item.name}
- {/*this.Deselectlittle(item.mirror_repository_id)}>*/}
-
-
-
-
- this.setConfigsInputs(e,key,1)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
-
-
-
-
-
-
- this.setConfigsInputs(e,key,2)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
-
-
-
-
-
-
- this.setConfigsInputs(e,key,3)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
-
-
-
-
-
-
- this.setConfigsInputs(e,key,4)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
-
-
-
-
-
-
- )
-
- })}
-
:""}
-
-
- {
- // this.props.identity<4&&this.props.status==0?
- this.props.identity<5?
-
:""
- }
-
-
-
-
+
:""}
+
+
+
+
+
+ {this.props.identity<3?
+
服务配置
+ { shixun_service_configs&&shixun_service_configs.map((item,key)=>{
+
+ return(
+
+
+
+ {item.name}
+ {/*this.Deselectlittle(item.mirror_repository_id)}>*/}
+
+
+
+
+ this.setConfigsInputs(e,key,1)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,2)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,3)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,4)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ )
+
+ })}
+
:""}
+
+
+ {
+ // this.props.identity<4&&this.props.status==0?
+ this.props.identity<5?
+
:""
+ }
+
+
+
+
);
}
}