|  |  |  | @ -1,6 +1,22 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 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'; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -8,23 +24,162 @@ import './css/TPMsettings.css'; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 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 ( | 
			
		
	
		
			
				
					|  |  |  |  |       <div className="educontent mb50 edu-back-white padding10-20"> | 
			
		
	
		
			
				
					|  |  |  |  |         1111 | 
			
		
	
		
			
				
					|  |  |  |  |       <div> | 
			
		
	
		
			
				
					|  |  |  |  |         <div className="educontent mb200 edu-back-white padding10-20 pdb30"> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>开启图形化界面:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则给学员的实践任务启动Ubuntu系统的图形化界面)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml64" style={{minWidth: '45px'}}>命令行:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则给学员的实践任务提供命令行窗口)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div> | 
			
		
	
		
			
				
					|  |  |  |  |                <span className="fl ml160"> | 
			
		
	
		
			
				
					|  |  |  |  |                   <RadioGroup onChange={this.SelectOpenpublic} value={this.state.use_scope}> | 
			
		
	
		
			
				
					|  |  |  |  |                     <Radio className="radioStyle font-14" value={0}><span>命令行练习窗口</span> <span | 
			
		
	
		
			
				
					|  |  |  |  |                       className="color-grey-9">(选中则给学员提供用于练习操作的命令行,命令行的操作不会对学生的实验环境造成影响)</span></Radio> | 
			
		
	
		
			
				
					|  |  |  |  |                     <Radio className="radioStyle font-14" value={1}><span>命令行评测窗口</span> <span | 
			
		
	
		
			
				
					|  |  |  |  |                       className="color-grey-9">(选中则给学员提供用于评测操作的命令行,命令行的操作可以对学生的实验环境产生影响)</span></Radio> | 
			
		
	
		
			
				
					|  |  |  |  |                   </RadioGroup> | 
			
		
	
		
			
				
					|  |  |  |  |                </span> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl ml180"> | 
			
		
	
		
			
				
					|  |  |  |  |                    <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <span className="fl mt8 ml5"> | 
			
		
	
		
			
				
					|  |  |  |  |                           <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                             checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                             onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |                           <label style={{top: '6px'}} className="color-grey-9 ml10"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <span className="color-grey-6 font-14" style={{minWidth: '45px'}}>多个命令行窗口:</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             (选中则允许学员同时开启多个命令行窗口)</label> | 
			
		
	
		
			
				
					|  |  |  |  |                         </span> | 
			
		
	
		
			
				
					|  |  |  |  |                       </div> | 
			
		
	
		
			
				
					|  |  |  |  |                </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml17" style={{minWidth: '45px'}}>隐藏代码窗口:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则学员页面不显示代码窗口)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml33" style={{minWidth: '45px'}}>公开版本库:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则允许学员修改版本库中的全部文件)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml20" style={{minWidth: '45px'}}>隐藏代码目录:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则学员页面不显示版本库目录)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml20" style={{minWidth: '45px'}}>禁用复制粘贴:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则学员页面不允许使用复制和粘贴功能)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml84" style={{minWidth: '45px'}}>跳关:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则允许学员跳关学习实训关卡任务)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           <div className="clearfix mb20"> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="color-grey-6 mt5 fl font-16 ml36s" style={{minWidth: '45px'}}>测试集解锁:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             <span className="fl mt8"> | 
			
		
	
		
			
				
					|  |  |  |  |               <Checkbox | 
			
		
	
		
			
				
					|  |  |  |  |                 checked={this.state.can_copy} | 
			
		
	
		
			
				
					|  |  |  |  |                 onChange={this.CheckboxonChange}></Checkbox> | 
			
		
	
		
			
				
					|  |  |  |  |               <label style={{top: '6px'}} className="color-grey-9 ml10">(选中则允许学员允许学员通过金币解锁查看隐藏测试集的内容)</label> | 
			
		
	
		
			
				
					|  |  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         {this.props.identity < 5 ? | 
			
		
	
		
			
				
					|  |  |  |  |           <Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`} | 
			
		
	
		
			
				
					|  |  |  |  |                         onSubmits={this.onSubmits}/> : ""} | 
			
		
	
		
			
				
					|  |  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |  |     ); | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |