fix build bug

dev_aliyun2
harry 5 years ago
parent 5be361e2ef
commit 6706cb5135

@ -73,4 +73,11 @@ module.exports = override(
}), }),
addWebpackPlugin(new MonacoWebpackPlugin({})), addWebpackPlugin(new MonacoWebpackPlugin({})),
// addWebpackPlugin(instance), // addWebpackPlugin(instance),
(config) => {
config.resolve.plugins = config.resolve.plugins.filter(plugin => !(plugin instanceof ModuleScopePlugin));
if (process.env.NODE_ENV !== "development") {
config.output.publicPath = `/react/build/`;
}
return config
}
); );

@ -2,6 +2,7 @@
"name": "h5", "name": "h5",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "/react/build/",
"dependencies": { "dependencies": {
"@loadable/component": "^5.12.0", "@loadable/component": "^5.12.0",
"@novnc/novnc": "^1.1.0", "@novnc/novnc": "^1.1.0",

@ -34,8 +34,8 @@
</script> </script>
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css"> <link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/css/css_min_all.css">
<link rel="stylesheet" type="text/css" href="/css/iconfont.css"> <link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/css/iconfont.css">
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css">
@ -50,8 +50,8 @@
<div id="root" class="page -layout-v -fit widthunit"></div> <div id="root" class="page -layout-v -fit widthunit"></div>
<div id="picture_display" style="display: none;"></div> <div id="picture_display" style="display: none;"></div>
<!-- js css合并 文件优先级的问题 --> <!-- js css合并 文件优先级的问题 -->
<script type="text/javascript" src="/js/js_min_all.js"></script> <script type="text/javascript" src="%PUBLIC_URL%/js/js_min_all.js"></script>
<script type="text/javascript" src="/js/flv.min.js"></script> <script type="text/javascript" src="%PUBLIC_URL%/js/flv.min.js"></script>
<!-- 在tpi js里加载这3个脚本 --> <!-- 在tpi js里加载这3个脚本 -->
<script> <script>
@ -68,7 +68,7 @@
} else { } else {
if (href.indexOf('/tasks/') != -1) { if (href.indexOf('/tasks/') != -1) {
document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'); document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>'); document.write('<script type="text/javascript" src="%PUBLIC_URL%/js/create_kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>'); document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
} else if (href.indexOf('/paths/') != -1) { } else if (href.indexOf('/paths/') != -1) {
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>'); document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');

@ -4,10 +4,6 @@ import '../../courses/css/Courses.css'
import './css/TPMchallengesnew.css'; import './css/TPMchallengesnew.css';
require('codemirror/lib/codemirror.css'); require('codemirror/lib/codemirror.css');
let path = '/editormd/lib/'
path = getUrl("/editormd/lib/")
const $ = window.$; const $ = window.$;

@ -1,8 +1,6 @@
import React, {Component} from 'react'; import React, { Component } from 'react';
import {getUrl,getUploadActionUrl} from 'educoder'; import { getUrl, getUploadActionUrl } from 'educoder';
let path = getUrl("/editormd/lib/");
const $ = window.$; const $ = window.$;
@ -10,7 +8,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) {
var editorName = window.editormd(id, { var editorName = window.editormd(id, {
width: width, width: width,
height: high, height: high,
path: path, // "/editormd/lib/" path: getUrl("/editormd/lib/"),
syncScrolling: "single", syncScrolling: "single",
tex: true, tex: true,
@ -78,15 +76,15 @@ export default class TPMeditorMD extends Component {
} }
questioMD=(initValue, id)=> { questioMD = (initValue, id) => {
this.contentChanged = false; this.contentChanged = false;
const placeholder = ""; const placeholder = "";
// amp; // amp;
// 编辑时要传memoId // 编辑时要传memoId
// const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`; // const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`;
const imageUrl = `${getUploadActionUrl()}`; const imageUrl = `${getUploadActionUrl()}`;
// 创建editorMd // 创建editorMd
let questio_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, () => { let questio_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, () => {
setTimeout(() => { setTimeout(() => {
@ -108,12 +106,12 @@ export default class TPMeditorMD extends Component {
} }
componentWillReceiveProps(newProps) { componentWillReceiveProps(newProps) {
this.questioMD(newProps.value,newProps.id) this.questioMD(newProps.value, newProps.id)
} }
render() { render() {
return ( return (
<div className="padding10-20 edu-back-greyf5 radius4" id="questioMD"> <div className="padding10-20 edu-back-greyf5 radius4" id="questioMD">
<textarea style={{display: 'none'}} id="questioadd" name="content"> </textarea> <textarea style={{ display: 'none' }} id="questioadd" name="content"> </textarea>
<div className="CodeMirror cm-s-defualt"> <div className="CodeMirror cm-s-defualt">
</div> </div>
</div> </div>

@ -1,67 +1,45 @@
import React, {Component} from 'react'; import React, { Component } from 'react';
import { Link } from "react-router-dom";
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
// import "antd/dist/antd.css";
import { getImageUrl, getUploadActionUrl, getUrl } from 'educoder'; import { getImageUrl, getUploadActionUrl, getUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import '../css/TPMchallengesnew.css'; import '../css/TPMchallengesnew.css';
let origin = getUrl();
let path = getUrl("/editormd/lib/")
const $ = window.$; const $ = window.$;
let timeout;
let currentValue;
const Option = Select.Option;
const RadioGroup = Radio.Group;
// 恢复数据 // 恢复数据
function md_rec_data(k,mdu,id, editor){ function md_rec_data(k, mdu, id, editor) {
if(window.sessionStorage.getItem(k+mdu) !== null){ if (window.sessionStorage.getItem(k + mdu) !== null) {
editor.setValue(window.sessionStorage.getItem(k+mdu)); editor.setValue(window.sessionStorage.getItem(k + mdu));
md_clear_data(k,mdu,id); md_clear_data(k, mdu, id);
} }
} }
// 保存数据 // 保存数据
function md_add_data(k,mdu,d){ function md_add_data(k, mdu, d) {
window.sessionStorage.setItem(k+mdu,d); window.sessionStorage.setItem(k + mdu, d);
} }
// 清空保存的数据 // 清空保存的数据
function md_clear_data(k,mdu,id){ function md_clear_data(k, mdu, id) {
window.sessionStorage.removeItem(k+mdu); window.sessionStorage.removeItem(k + mdu);
var id1 = "#e_tip_"+id; var id1 = "#e_tip_" + id;
var id2 = "#e_tips_"+id; var id2 = "#e_tips_" + id;
if(k == 'content'){ if (k == 'content') {
$(id2).html(""); $(id2).html("");
}else{ } else {
$(id1).html(""); $(id1).html("");
} }
} }
function md_elocalStorage(editor,mdu,id){ function md_elocalStorage(editor, mdu, id) {
if (window.sessionStorage){ if (window.sessionStorage) {
var oc = window.sessionStorage.getItem('content'+mdu); var oc = window.sessionStorage.getItem('content' + mdu);
if(oc !== null ){ if (oc !== null) {
console.log("#e_tips_"+id) console.log("#e_tips_" + id)
$("#e_tips_"+id).data('editor', editor); $("#e_tips_" + id).data('editor', editor);
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>'; var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\'' + mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\'' + mdu + '\',\'' + id + '\')">不恢复</a>';
$("#e_tips_"+id).html(h); $("#e_tips_" + id).html(h);
} }
setInterval(function() { setInterval(function () {
var d = new Date(); var d = new Date();
var h = d.getHours(); var h = d.getHours();
var m = d.getMinutes(); var m = d.getMinutes();
@ -69,18 +47,18 @@ function md_elocalStorage(editor,mdu,id){
h = h < 10 ? '0' + h : h; h = h < 10 ? '0' + h : h;
m = m < 10 ? '0' + m : m; m = m < 10 ? '0' + m : m;
s = s < 10 ? '0' + s : s; s = s < 10 ? '0' + s : s;
if(editor.getValue().trim() != ""){ if (editor.getValue().trim() != "") {
md_add_data("content",mdu,editor.getValue()); md_add_data("content", mdu, editor.getValue());
var id1 = "#e_tip_"+id; var id1 = "#e_tip_" + id;
var id2 = "#e_tips_"+id; var id2 = "#e_tips_" + id;
$(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); $(id1).html(" 数据已于 " + h + ':' + m + ':' + s + " 保存 ");
$(id2).html(""); $(id2).html("");
} }
},10000); }, 10000);
}else{ } else {
$("#e_tip_"+id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); $("#e_tip_" + id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!');
} }
} }
@ -89,7 +67,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) {
var editorName = window.editormd(id, { var editorName = window.editormd(id, {
width: width, width: width,
height: high, height: high,
path: path, // "/editormd/lib/" path: getUrl("/editormd/lib/"), //
syncScrolling: "single", syncScrolling: "single",
tex: true, tex: true,
@ -155,9 +133,9 @@ export default class TPManswer extends Component {
practice_url: undefined, practice_url: undefined,
go_back_url: undefined, go_back_url: undefined,
value: 1, value: 1,
answer:"", answer: "",
id:undefined, id: undefined,
checkpointId:undefined, checkpointId: undefined,
power: false, power: false,
prev_challenge: undefined, prev_challenge: undefined,
next_challenge: undefined, next_challenge: undefined,
@ -194,14 +172,14 @@ export default class TPManswer extends Component {
componentDidMount() { componentDidMount() {
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let checkpointId=this.props.match.params.checkpointId; let checkpointId = this.props.match.params.checkpointId;
let newchoice_url= "/shixuns/"+id+"/challenges/newquestion"; let newchoice_url = "/shixuns/" + id + "/challenges/newquestion";
let newpractice_url= "/shixuns/"+id+"/challenges/new"; let newpractice_url = "/shixuns/" + id + "/challenges/new";
let newgo_back_url="/shixuns/"+id+"/challenges"; let newgo_back_url = "/shixuns/" + id + "/challenges";
this.setState({ this.setState({
shixunId:id, shixunId: id,
checkpointId:checkpointId checkpointId: checkpointId
}) })
@ -210,22 +188,22 @@ export default class TPManswer extends Component {
let newprev_challenge = response.data.prev_challenge; let newprev_challenge = response.data.prev_challenge;
let next_challenge = response.data.next_challenge; let next_challenge = response.data.next_challenge;
if (newprev_challenge != undefined) { if (newprev_challenge != undefined) {
if(newprev_challenge.st===0){ if (newprev_challenge.st === 0) {
newprev_challenge = "/shixuns/" + id + "/challenges/" + newprev_challenge.id + "/editcheckpoint"; newprev_challenge = "/shixuns/" + id + "/challenges/" + newprev_challenge.id + "/editcheckpoint";
}else{ } else {
newprev_challenge = "/shixuns/" + id + "/challenges/" + newprev_challenge.id + "/editquestion"; newprev_challenge = "/shixuns/" + id + "/challenges/" + newprev_challenge.id + "/editquestion";
} }
} }
if (next_challenge != undefined) { if (next_challenge != undefined) {
if(next_challenge.st===0){ if (next_challenge.st === 0) {
next_challenge = "/shixuns/" + id + "/challenges/" + next_challenge.id+ "/editcheckpoint"; next_challenge = "/shixuns/" + id + "/challenges/" + next_challenge.id + "/editcheckpoint";
}else{ } else {
next_challenge = "/shixuns/" + id + "/challenges/" + next_challenge.id+ "/editquestion"; next_challenge = "/shixuns/" + id + "/challenges/" + next_challenge.id + "/editquestion";
} }
} }
this.setState({ this.setState({
answer:response.data.answer, answer: response.data.answer,
power: response.data.power, power: response.data.power,
choice_url: newchoice_url, // 导航中的新建选择题url choice_url: newchoice_url, // 导航中的新建选择题url
practice_url: newpractice_url, //string 导航中新建实践题url practice_url: newpractice_url, //string 导航中新建实践题url
@ -235,12 +213,12 @@ export default class TPManswer extends Component {
next_challenge: next_challenge, next_challenge: next_challenge,
}) })
if(response.data.power===false){ if (response.data.power === false) {
this.props.showSnackbar("没有权限修改"); this.props.showSnackbar("没有权限修改");
} }
if(response.data.answer===undefined||response.data.answer===null){ if (response.data.answer === undefined || response.data.answer === null) {
this.answerMD("", "answerMD"); this.answerMD("", "answerMD");
}else{ } else {
this.answerMD(response.data.answer, "answerMD"); this.answerMD(response.data.answer, "answerMD");
} }
@ -249,18 +227,18 @@ export default class TPManswer extends Component {
}); });
} }
challenge_answer_submit=()=> { challenge_answer_submit = () => {
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let{checkpointId}=this.state; let { checkpointId } = this.state;
let url = "/shixuns/"+id+"/challenges/"+checkpointId+".json"; let url = "/shixuns/" + id + "/challenges/" + checkpointId + ".json";
const answer_editormdvalue = this.answers_editormd.getValue(); const answer_editormdvalue = this.answers_editormd.getValue();
axios.put(url,{ axios.put(url, {
tab:2, tab: 2,
identifier:id, identifier: id,
id:checkpointId, id: checkpointId,
challenge:{ challenge: {
answer:answer_editormdvalue answer: answer_editormdvalue
} }
} }
).then((response) => { ).then((response) => {
@ -286,16 +264,16 @@ export default class TPManswer extends Component {
prev_challenge, prev_challenge,
next_challenge, next_challenge,
} = this.state; } = this.state;
let tab1url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/editcheckpoint"; let tab1url = "/shixuns/" + shixunId + "/challenges/" + checkpointId + "/editcheckpoint";
let tab2url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/tab=2"; let tab2url = "/shixuns/" + shixunId + "/challenges/" + checkpointId + "/tab=2";
let tab3url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/tab=3"; let tab3url = "/shixuns/" + shixunId + "/challenges/" + checkpointId + "/tab=3";
// console.log(this.props) // console.log(this.props)
return ( return (
<React.Fragment> <React.Fragment>
<div className="educontent mt30 mb30"> <div className="educontent mt30 mb30">
<div className="padding10-20 mb10 edu-back-white clearfix"> <div className="padding10-20 mb10 edu-back-white clearfix">
<span className="fl ring-blue mr10 mt7"> <span className="fl ring-blue mr10 mt7">
<img src={getImageUrl("images/educoder/icon/code.svg")} data-tip-down="实训任务" className="fl mt2 ml2"/> <img src={getImageUrl("images/educoder/icon/code.svg")} data-tip-down="实训任务" className="fl mt2 ml2" />
</span> </span>
<span className="font-16 task-hide fl TPMtaskName">{position}</span> <span className="font-16 task-hide fl TPMtaskName">{position}</span>
<Link to={go_back_url === undefined ? "" : go_back_url} <Link to={go_back_url === undefined ? "" : go_back_url}
@ -311,11 +289,11 @@ export default class TPManswer extends Component {
<a href={practice_url === undefined ? "" : practice_url} <a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4" className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}} style={{ display: this.props.status === 2 || this.props.status === 1 ? 'none' : 'block' }}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a> data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url} <a href={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4" className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}} style={{ display: this.props.status === 2 || this.props.status === 1 ? 'none' : 'block' }}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a> data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div> </div>
@ -341,7 +319,7 @@ export default class TPManswer extends Component {
<p className="color-grey-6 font-16 mb30">参考答案</p> <p className="color-grey-6 font-16 mb30">参考答案</p>
<div className="df"> <div className="df">
<div className="padding10-20 edu-back-greyf5 radius4" id="answerMD"> <div className="padding10-20 edu-back-greyf5 radius4" id="answerMD">
<textarea style={{display: 'none'}} id="evaluate_script_show" name="content"> </textarea> <textarea style={{ display: 'none' }} id="evaluate_script_show" name="content"> </textarea>
<div className="CodeMirror cm-s-defualt"> <div className="CodeMirror cm-s-defualt">
</div> </div>
</div> </div>
@ -352,7 +330,7 @@ export default class TPManswer extends Component {
</div> </div>
<div className="clearfix mt20" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}> <div className="clearfix mt20" style={{ display: this.props.identity > 4 || this.props.identity === undefined || power === false ? "none" : "block" }}>
<a className="defalutSubmitbtn fl mr20" <a className="defalutSubmitbtn fl mr20"
onClick={this.challenge_answer_submit}>提交</a> onClick={this.challenge_answer_submit}>提交</a>
{/*<a href={"/shixuns/" + shixunId + "/challenges"} className="defalutCancelbtn fl">取消</a>*/} {/*<a href={"/shixuns/" + shixunId + "/challenges"} className="defalutCancelbtn fl">取消</a>*/}

@ -1,10 +1,10 @@
import React, {Component} from 'react'; import React, { Component } from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC'; import { TPMIndexHOC } from '../TPMIndexHOC';
import {SnackbarHOC,appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder'; import { SnackbarHOC, appendFileSizeToUploadFileAll, getUploadActionUrl } from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification,Tooltip} from 'antd'; import { Input, Select, Radio, Checkbox, Modal, Icon, DatePicker, Upload, Button, message, Form, notification, Tooltip } from 'antd';
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
@ -14,12 +14,10 @@ import axios from 'axios';
import './css/Newshixuns.css'; import './css/Newshixuns.css';
import {getUrl} from 'educoder' import { getUrl } from 'educoder'
import moment from 'moment'; import moment from 'moment';
let path = getUrl("/editormd/lib/")
const $ = window.$; const $ = window.$;
let timeout; let timeout;
@ -119,7 +117,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) {
var editorName = window.editormd(id, { var editorName = window.editormd(id, {
width: width, width: width,
height: high, height: high,
path: path, // "/editormd/lib/" path: getUrl("/editormd/lib/"), //
syncScrolling: "single", syncScrolling: "single",
tex: true, tex: true,
@ -225,16 +223,16 @@ class Newshixuns extends Component {
onSearchvalue: "", onSearchvalue: "",
scope_partmenttype: false, scope_partmenttype: false,
languagewrite: undefined, languagewrite: undefined,
systemenvironment:undefined, systemenvironment: undefined,
testcoderunmode:undefined, testcoderunmode: undefined,
file:undefined, file: undefined,
deleteisnot:true, deleteisnot: true,
languagewritetype:false, languagewritetype: false,
systemenvironmenttype:false, systemenvironmenttype: false,
testcoderunmodetype:false, testcoderunmodetype: false,
attachmentidstype:false, attachmentidstype: false,
datalisttype:false, datalisttype: false,
bottonloading:false bottonloading: false
} }
} }
@ -269,7 +267,7 @@ class Newshixuns extends Component {
let newshixunUrl = `/shixuns/new.json`; let newshixunUrl = `/shixuns/new.json`;
axios.get(newshixunUrl).then((response) => { axios.get(newshixunUrl).then((response) => {
if (response.status === 200) { if (response.status === 200) {
if (response.data.message===undefined) { if (response.data.message === undefined) {
this.setState({ this.setState({
newshixunlist: response.data newshixunlist: response.data
}); });
@ -284,7 +282,7 @@ class Newshixuns extends Component {
let departmentsUrl = `/shixuns/departments.json`; let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => { axios.get(departmentsUrl).then((response) => {
if (response.status === 200) { if (response.status === 200) {
if (response.data.message===undefined) { if (response.data.message === undefined) {
this.setState({ this.setState({
departmentslist: response.data.shools_name departmentslist: response.data.shools_name
}); });
@ -295,7 +293,7 @@ class Newshixuns extends Component {
}); });
} }
setlanguagewrite = (e)=>{ setlanguagewrite = (e) => {
this.setState({ this.setState({
languagewrite: e.target.value languagewrite: e.target.value
}) })
@ -393,7 +391,7 @@ class Newshixuns extends Component {
} }
adduse_scopeinput = () => { adduse_scopeinput = () => {
let {scope_partment} = this.state; let { scope_partment } = this.state;
let array = scope_partment; let array = scope_partment;
let newarray = "" let newarray = ""
array.push(newarray) array.push(newarray)
@ -403,24 +401,24 @@ class Newshixuns extends Component {
} }
shixunScopeInput = (e, id) => { shixunScopeInput = (e, id) => {
let types=false let types = false
let {scope_partment} = this.state; let { scope_partment } = this.state;
let datalist = scope_partment; let datalist = scope_partment;
if (datalist === undefined) { if (datalist === undefined) {
datalist = [] datalist = []
} }
datalist.map((item,key)=>{ datalist.map((item, key) => {
if(e===item){ if (e === item) {
types=true types = true
this.setState({ this.setState({
datalisttype:true datalisttype: true
}) })
return return
} }
}) })
if(types===false){ if (types === false) {
datalist.push(e) datalist.push(e)
this.setState({ this.setState({
scope_partment: datalist, scope_partment: datalist,
@ -432,7 +430,7 @@ class Newshixuns extends Component {
} }
deleteScopeInput = (key) => { deleteScopeInput = (key) => {
let {scope_partment} = this.state; let { scope_partment } = this.state;
let datalist = scope_partment; let datalist = scope_partment;
datalist.splice(key, 1); datalist.splice(key, 1);
this.setState({ this.setState({
@ -443,7 +441,7 @@ class Newshixuns extends Component {
//提交数据 //提交数据
submit_new_shixun = () => { submit_new_shixun = () => {
const mdVal = this.taskpass_editormd.getValue(); const mdVal = this.taskpass_editormd.getValue();
let {can_copy, main_type, name, scope_partment, small_type, trainee, use_scope, vnc, webssh, multi_webssh, TimePickervalue} = this.state; let { can_copy, main_type, name, scope_partment, small_type, trainee, use_scope, vnc, webssh, multi_webssh, TimePickervalue } = this.state;
let Url = `/shixuns.json` let Url = `/shixuns.json`
if (name === "") { if (name === "") {
this.setState({ this.setState({
@ -496,7 +494,7 @@ class Newshixuns extends Component {
newmulti_webssh = "" newmulti_webssh = ""
} }
this.setState({ this.setState({
bottonloading:true bottonloading: true
}) })
axios.post(Url, { axios.post(Url, {
name: name, name: name,
@ -517,15 +515,15 @@ class Newshixuns extends Component {
if (response.status === 200) { if (response.status === 200) {
window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
// window.open("/shixuns/"+response.data.shixun_identifier+"/challenges"); // window.open("/shixuns/"+response.data.shixun_identifier+"/challenges");
}else{ } else {
this.setState({ this.setState({
bottonloading:false bottonloading: false
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
bottonloading:false bottonloading: false
}) })
}) })
} }
@ -541,7 +539,7 @@ class Newshixuns extends Component {
function fake() { function fake() {
let departmentsUrl = `/shixuns/departments.json?q=` + currentValue; let departmentsUrl = `/shixuns/departments.json?q=` + currentValue;
axios.get(departmentsUrl).then((response) => { axios.get(departmentsUrl).then((response) => {
if (response.data.message===undefined) { if (response.data.message === undefined) {
callback(response.data.shools_name); callback(response.data.shools_name);
} }
}).catch((error) => { }).catch((error) => {
@ -554,7 +552,7 @@ class Newshixuns extends Component {
shixunHandleSearch = (value) => { shixunHandleSearch = (value) => {
this.shixunsfetch(value, departmentslist => this.setState({departmentslist})); this.shixunsfetch(value, departmentslist => this.setState({ departmentslist }));
this.setState({ this.setState({
onSearchvalue: "" onSearchvalue: ""
@ -567,7 +565,7 @@ class Newshixuns extends Component {
}) })
} }
sendsure_apply = () => { sendsure_apply = () => {
let {languagewrite,systemenvironment,testcoderunmode} = this.state; let { languagewrite, systemenvironment, testcoderunmode } = this.state;
// console.log("点击确定") // console.log("点击确定")
// console.log("languagewrite"+languagewrite); // console.log("languagewrite"+languagewrite);
// console.log("systemenvironment"+systemenvironment); // console.log("systemenvironment"+systemenvironment);
@ -579,36 +577,36 @@ class Newshixuns extends Component {
// return item.response ? item.response.id : item.id // return item.response ? item.response.id : item.id
// }) // })
// } // }
if(languagewrite === undefined || languagewrite === "" ){ if (languagewrite === undefined || languagewrite === "") {
// this.props.showNotification(`请填写该镜像是基于什么语言`); // this.props.showNotification(`请填写该镜像是基于什么语言`);
this.setState({ this.setState({
languagewritetype:true languagewritetype: true
}) })
return return
} }
if(systemenvironment === undefined || systemenvironment === ""){ if (systemenvironment === undefined || systemenvironment === "") {
// this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
this.setState({ this.setState({
systemenvironmenttype:true systemenvironmenttype: true
}) })
return; return;
} }
if(testcoderunmode === undefined || testcoderunmode === "") { if (testcoderunmode === undefined || testcoderunmode === "") {
// this.props.showNotification(`请填写该镜像中测试代码运行方式`); // this.props.showNotification(`请填写该镜像中测试代码运行方式`);
this.setState({ this.setState({
testcoderunmodetype:true testcoderunmodetype: true
}) })
return; return;
} }
var attachment_ids=undefined; var attachment_ids = undefined;
if (this.state.fileList) { if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => { attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
} }
if( attachment_ids === undefined || attachment_ids.length===0){ if (attachment_ids === undefined || attachment_ids.length === 0) {
// notification.open( // notification.open(
// { // {
@ -619,7 +617,7 @@ class Newshixuns extends Component {
// } // }
// ) // )
this.setState({ this.setState({
attachmentidstype:true attachmentidstype: true
}) })
return; return;
} }
@ -627,39 +625,39 @@ class Newshixuns extends Component {
// alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids); // alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids);
var data={ var data = {
language:languagewrite, language: languagewrite,
runtime:systemenvironment, runtime: systemenvironment,
run_method:testcoderunmode, run_method: testcoderunmode,
attachment_id:attachment_ids[0], attachment_id: attachment_ids[0],
} }
var url =`/shixuns/apply_shixun_mirror.json`; var url = `/shixuns/apply_shixun_mirror.json`;
axios.post(url,data axios.post(url, data
).then((response) => { ).then((response) => {
try { try {
if (response.data) { if (response.data) {
// const { id } = response.data; // const { id } = response.data;
// if (id) { // if (id) {
if(this.state.file !== undefined){ if (this.state.file !== undefined) {
console.log("549"); console.log("549");
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file: undefined,
deleteisnot:true, deleteisnot: true,
languagewrite:"", languagewrite: "",
systemenvironment:"", systemenvironment: "",
testcoderunmode:"", testcoderunmode: "",
fileList:[] fileList: []
}) })
}else { } else {
this.setState({ this.setState({
file:undefined, file: undefined,
deleteisnot:true, deleteisnot: true,
languagewrite:"", languagewrite: "",
systemenvironment:"", systemenvironment: "",
testcoderunmode:"", testcoderunmode: "",
fileList:[] fileList: []
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -675,7 +673,7 @@ class Newshixuns extends Component {
// this.props.history.push(`/classrooms/${cid}/graduation_topics`); // this.props.history.push(`/classrooms/${cid}/graduation_topics`);
// } // }
} }
}catch (e) { } catch (e) {
} }
@ -686,25 +684,25 @@ class Newshixuns extends Component {
this.setState({ this.setState({
postapplyvisible: false, postapplyvisible: false,
}) })
if(this.state.file !== undefined){ if (this.state.file !== undefined) {
console.log("580"); console.log("580");
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file: undefined,
deleteisnot:true, deleteisnot: true,
languagewrite:"", languagewrite: "",
systemenvironment:"", systemenvironment: "",
testcoderunmode:"", testcoderunmode: "",
fileList:[] fileList: []
}) })
}else { } else {
this.setState({ this.setState({
file:undefined, file: undefined,
deleteisnot:true, deleteisnot: true,
languagewrite:"", languagewrite: "",
systemenvironment:"", systemenvironment: "",
testcoderunmode:"", testcoderunmode: "",
fileList:[] fileList: []
}) })
} }
} }
@ -764,14 +762,14 @@ class Newshixuns extends Component {
onChangeTimePicker = (value, dateString) => { onChangeTimePicker = (value, dateString) => {
this.setState({ this.setState({
TimePickervalue: dateString=== ""?"":moment(handleDateStrings(dateString)) TimePickervalue: dateString === "" ? "" : moment(handleDateStrings(dateString))
}) })
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let {fileList} = this.state; let { fileList } = this.state;
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1"); console.log("handleChange1");
@ -787,7 +785,7 @@ class Newshixuns extends Component {
} }
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){ if (!file.percent || file.percent == 100) {
confirm({ confirm({
title: '确定要删除这个附件吗?', title: '确定要删除这个附件吗?',
okText: '确定', okText: '确定',
@ -807,7 +805,7 @@ class Newshixuns extends Component {
} }
deleteAttachment = (file) => { deleteAttachment = (file) => {
console.log(file); console.log(file);
let id=file.response ==undefined ? file.id : file.response.id let id = file.response == undefined ? file.id : file.response.id
const url = `/attachments/${id}.json` const url = `/attachments/${id}.json`
axios.delete(url, { axios.delete(url, {
}) })
@ -824,7 +822,7 @@ class Newshixuns extends Component {
newFileList.splice(index, 1); newFileList.splice(index, 1);
return { return {
fileList: newFileList, fileList: newFileList,
deleteisnot:true deleteisnot: true
}; };
}); });
} }
@ -836,7 +834,7 @@ class Newshixuns extends Component {
} }
handleSubmit=()=>{ handleSubmit = () => {
// console.log(this.state.languagewrite) // console.log(this.state.languagewrite)
// console.log(this.state.systemenvironment) // console.log(this.state.systemenvironment)
// console.log(this.state.testcoderunmode) // console.log(this.state.testcoderunmode)
@ -869,7 +867,7 @@ class Newshixuns extends Component {
} }
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state; let { testcoderunmode, systemenvironment, languagewrite, deleteisnot, fileList, TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue } = this.state;
let options let options
if (departmentslist != undefined) { if (departmentslist != undefined) {
options = this.state.departmentslist.map((d, k) => { options = this.state.departmentslist.map((d, k) => {
@ -906,14 +904,14 @@ class Newshixuns extends Component {
} }
) )
} }
if(this.state.file !== undefined){ if (this.state.file !== undefined) {
console.log("763") console.log("763")
this.setState({ this.setState({
file:file file: file
}) })
}else { } else {
this.setState({ this.setState({
file:file file: file
}) })
} }
@ -950,8 +948,8 @@ class Newshixuns extends Component {
<div className="mb10 edu-back-white"> <div className="mb10 edu-back-white">
<p className="padding10-20 bor-bottom-greyE color-grey-3 clearfix"> <p className="padding10-20 bor-bottom-greyE color-grey-3 clearfix">
<span className="fl font-18 lineh-35">创建实训</span> <span className="fl font-18 lineh-35">创建实训</span>
{this.props.user&&this.props.user.main_site===true?<a className="fr font-16 mt3 color-blue" href="/forums/2943" {this.props.user && this.props.user.main_site === true ? <a className="fr font-16 mt3 color-blue" href="/forums/2943"
target="_blank">实训制作指南</a>:""} target="_blank">实训制作指南</a> : ""}
</p> </p>
<div className="padding30-20"> <div className="padding30-20">
@ -968,7 +966,7 @@ class Newshixuns extends Component {
placeholder="请输入实训名称最多60个字符" placeholder="请输入实训名称最多60个字符"
size="60" size="60"
type="text" type="text"
style={{width: shixun_nametype === false ? '1123px' : '93%'}} style={{ width: shixun_nametype === false ? '1123px' : '93%' }}
/> />
<span <span
className={shixun_nametype === true ? "color-orange fr mt10" : "color-orange fr none"} className={shixun_nametype === true ? "color-orange fr mt10" : "color-orange fr none"}
@ -989,7 +987,7 @@ class Newshixuns extends Component {
<div className="df"> <div className="df">
<div className="flex1 break_word show_content_grey new_li" id="memoMD"> <div className="flex1 break_word show_content_grey new_li" id="memoMD">
<textarea style={{display: 'none'}} id="evaluate_script_shows" <textarea style={{ display: 'none' }} id="evaluate_script_shows"
name="content"></textarea> name="content"></textarea>
</div> </div>
</div> </div>
@ -1005,7 +1003,7 @@ class Newshixuns extends Component {
// onMouseLeave={this.bigopens} // onMouseLeave={this.bigopens}
> >
<Select placeholder="请选择主类别" <Select placeholder="请选择主类别"
style={{width: 180}} style={{ width: 180 }}
onChange={this.bigClass} onChange={this.bigClass}
// onMouseEnter={this.bigopen} // onMouseEnter={this.bigopen}
onSelect={this.bigopens} onSelect={this.bigopens}
@ -1016,7 +1014,7 @@ class Newshixuns extends Component {
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => { newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => {
return ( return (
<Option value={item.id} key={key} > <Option value={item.id} key={key} >
<Tooltip placement="right" title={item.description=== ""?"无描述":item.description} > <Tooltip placement="right" title={item.description === "" ? "无描述" : item.description} >
{item.type_name} {item.type_name}
</Tooltip> </Tooltip>
</Option> </Option>
@ -1044,24 +1042,24 @@ class Newshixuns extends Component {
<label className="fl mt10 "><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
style={{width:'89%',height:'100px'}} style={{ width: '89%', height: '100px' }}
onInput={this.setlanguagewrite} onInput={this.setlanguagewrite}
value={languagewrite} value={languagewrite}
placeholder="请填写该镜像是基于什么语言示例Python" placeholder="请填写该镜像是基于什么语言示例Python"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div> <div className={"color-red shixunspanred"}>{this.state.languagewritetype === true ? "请填写该镜像语言" : ""}</div>
<li className="clearfix ml1"> <li className="clearfix ml1">
<label className="panel-form-label fl ml50"><span <label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
onInput={this.setsystemenvironment} onInput={this.setsystemenvironment}
style={{height:'100px'}} style={{ height: '100px' }}
value={systemenvironment} value={systemenvironment}
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境" placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}</div> <div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype === true ? "请填写该镜像语言系统环境" : ""}</div>
<li className="clearfix"> <li className="clearfix">
<label className="fl mt10" ><span <label className="fl mt10" ><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
@ -1069,11 +1067,11 @@ class Newshixuns extends Component {
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
onInput={this.settestcoderunmode} onInput={this.settestcoderunmode}
value={testcoderunmode} value={testcoderunmode}
style={{height:'100px'}} style={{ height: '100px' }}
placeholder="请填写该镜像中测试代码运行方式" placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}</div> <div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype === true ? "请填写该镜像测试代码运行方式" : ""}</div>
<li className="clearfix ml50"> <li className="clearfix ml50">
<label className="panel-form-label fl mt-5"><span <label className="panel-form-label fl mt-5"><span
className="color-red fl">*</span>&nbsp;&nbsp;</label> className="color-red fl">*</span>&nbsp;&nbsp;</label>
@ -1090,13 +1088,13 @@ class Newshixuns extends Component {
</li> </li>
<div className={"color-red shixunspanred"}> <div className={"color-red shixunspanred"}>
{this.state.attachmentidstype===true?"请上传附件":""} {this.state.attachmentidstype === true ? "请上传附件" : ""}
</div> </div>
<li className="edu-txt-center clearfix "> <li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30" <a className="pop_close task-btn mr30"
onClick={() => this.sendhideModaly()} onClick={() => this.sendhideModaly()}
>取消</a> >取消</a>
<Button type="primary" onClick={()=>this.sendsure_apply()} <Button type="primary" onClick={() => this.sendsure_apply()}
className="task-btn task-btn-orange">确定</Button> className="task-btn task-btn-orange">确定</Button>
</li> </li>
<div className="cl"></div> <div className="cl"></div>
@ -1131,7 +1129,7 @@ class Newshixuns extends Component {
// onMouseLeave={this.bigopens} // onMouseLeave={this.bigopens}
> >
<Select mode="multiple" placeholder="请选择小类别" <Select mode="multiple" placeholder="请选择小类别"
style={{minWidth: 180}} style={{ minWidth: 180 }}
onChange={this.littleClass} onChange={this.littleClass}
// onMouseEnter={this.bigopensmal} // onMouseEnter={this.bigopensmal}
onSelect={this.bigopens} onSelect={this.bigopens}
@ -1142,7 +1140,7 @@ class Newshixuns extends Component {
newshixunlist === undefined ? "" : newshixunlist.small_type.map((item, key) => { newshixunlist === undefined ? "" : newshixunlist.small_type.map((item, key) => {
return ( return (
<Option value={item.id} key={key}> <Option value={item.id} key={key}>
<Tooltip placement="right" title={item.description=== ""?"无描述":item.description} > <Tooltip placement="right" title={item.description === "" ? "无描述" : item.description} >
{item.type_name} {item.type_name}
</Tooltip> </Tooltip>
</Option> </Option>
@ -1152,7 +1150,7 @@ class Newshixuns extends Component {
</Select> </Select>
</div> </div>
<p className="fl ml10 color-grey-9 mt5">请在配置页面完成后续的评测脚本设置操作</p> <p className="fl ml10 color-grey-9 mt5">请在配置页面完成后续的评测脚本设置操作</p>
<div style={{width: '57px'}} className="ml20 fl"> <div style={{ width: '57px' }} className="ml20 fl">
<span className={main_types === true ? "color-orange fl" : "color-orange fl none"} <span className={main_types === true ? "color-orange fl" : "color-orange fl none"}
id="shixun_tech_platform_notice"><i id="shixun_tech_platform_notice"><i
className="fa fa-exclamation-circle mr3"></i></span> className="fa fa-exclamation-circle mr3"></i></span>
@ -1171,7 +1169,7 @@ class Newshixuns extends Component {
className="color-grey-9">选中则给学员提供用于练习操作的命令行窗口</span></Radio> className="color-grey-9">选中则给学员提供用于练习操作的命令行窗口</span></Radio>
<Radio className="radioStyle" value={2}><span>命令行评测窗口</span> <span <Radio className="radioStyle" value={2}><span>命令行评测窗口</span> <span
className="color-grey-9">选中则给学员提供用于关卡评测的命令行窗口</span></Radio> className="color-grey-9">选中则给学员提供用于关卡评测的命令行窗口</span></Radio>
<Checkbox style={{display: SelectTheCommandtype ? "block" : "none"}} <Checkbox style={{ display: SelectTheCommandtype ? "block" : "none" }}
className={"ml36"} checked={this.state.multi_webssh} className={"ml36"} checked={this.state.multi_webssh}
onChange={this.SelectTheCommandonChange}> onChange={this.SelectTheCommandonChange}>
多个命令行窗口<span className="color-grey-9">选中则允许学员同时开启多个命令行窗口</span> 多个命令行窗口<span className="color-grey-9">选中则允许学员同时开启多个命令行窗口</span>
@ -1192,13 +1190,13 @@ class Newshixuns extends Component {
</RadioGroup> </RadioGroup>
<div className="clearfix none" id="unit-all" <div className="clearfix none" id="unit-all"
style={{display: this.state.scopetype === false ? 'none' : 'block'}}> style={{ display: this.state.scopetype === false ? 'none' : 'block' }}>
<div className="fl ml25"> <div className="fl ml25">
<div className="fl" id="unit-input-part" style={{width: '100%'}}> <div className="fl" id="unit-input-part" style={{ width: '100%' }}>
<div id="person-unit" className="fl pr mr10"> <div id="person-unit" className="fl pr mr10">
<div className="shixunScopeInput fl"> <div className="shixunScopeInput fl">
<Select <Select
style={{width: '200px'}} style={{ width: '200px' }}
placeholder="请输入并选择单位名称" placeholder="请输入并选择单位名称"
onChange={(value) => this.shixunScopeInput(value)} onChange={(value) => this.shixunScopeInput(value)}
onSearch={this.shixunHandleSearch} onSearch={this.shixunHandleSearch}
@ -1215,18 +1213,18 @@ class Newshixuns extends Component {
</Select> </Select>
</div> </div>
<span className="color-grey-9">(搜索选中添加单位名称)</span> <span className="color-grey-9">(搜索选中添加单位名称)</span>
{this.state.datalisttype===true?<span className="color-red ml10">请勿选择重复单位</span>:""} {this.state.datalisttype === true ? <span className="color-red ml10">请勿选择重复单位</span> : ""}
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn" onClick={this.adduse_scopeinput}>+ 添加</a>*/} {/*<a className="white-btn orange-btn fl mt1 use_scope-btn" onClick={this.adduse_scopeinput}>+ 添加</a>*/}
</div> </div>
</div> </div>
<div style={{width: '100%'}}> <div style={{ width: '100%' }}>
<div className="mt20 clearfix" id="task_tag_content"> <div className="mt20 clearfix" id="task_tag_content">
{ {
scope_partment === undefined ? "" : scope_partment.map((item, key) => { scope_partment === undefined ? "" : scope_partment.map((item, key) => {
return ( return (
<li className="task_tag_span" key={key}><span>{item}</span> <li className="task_tag_span" key={key}><span>{item}</span>
<a style={{color: 'rgba(0,0,0,.25)'}} <a style={{ color: 'rgba(0,0,0,.25)' }}
onClick={() => this.deleteScopeInput(key)}>×</a> onClick={() => this.deleteScopeInput(key)}>×</a>
</li> </li>
) )
@ -1272,7 +1270,7 @@ class Newshixuns extends Component {
className="mr10 color-orange mt2 fl">*</span></span> className="mr10 color-orange mt2 fl">*</span></span>
<div className="with15 fl pr"> <div className="with15 fl pr">
<Select placeholder="请选择学员类别" <Select placeholder="请选择学员类别"
style={{width: 180}} style={{ width: 180 }}
onChange={this.Selectthestudent} onChange={this.Selectthestudent}
// onMouseEnter={this.sbigopen} // onMouseEnter={this.sbigopen}
onSelect={this.bigopens} onSelect={this.bigopens}
@ -1285,7 +1283,7 @@ class Newshixuns extends Component {
</Select> </Select>
</div> </div>
<span className="fl ml20 mt3 color-grey">实训难易度定位不限定用户群体</span> <span className="fl ml20 mt3 color-grey">实训难易度定位不限定用户群体</span>
<div style={{width: '57px'}} className="ml20 mt2 fl"> <div style={{ width: '57px' }} className="ml20 mt2 fl">
<span <span
className={trainee_types === true ? "color-orange fl" : "color-orange fl none"} className={trainee_types === true ? "color-orange fl" : "color-orange fl none"}
id="shixun_tech_platform_notice"><i id="shixun_tech_platform_notice"><i
@ -1295,19 +1293,19 @@ class Newshixuns extends Component {
</div> </div>
<li className="mb20 pl25"> <li className="mb20 pl25">
<span className="fl edu-txt-right color-grey-6 mr20" <span className="fl edu-txt-right color-grey-6 mr20"
style={{"width": "86px"}}>复制</span> style={{ "width": "86px" }}>复制</span>
<Checkbox onChange={this.Teacherscopy}></Checkbox> <Checkbox onChange={this.Teacherscopy}></Checkbox>
<label style={{top: '6px'}} className="color-grey-6 ml10">勾选则允许已认证的教师复制该实训</label> <label style={{ top: '6px' }} className="color-grey-6 ml10">勾选则允许已认证的教师复制该实训</label>
</li> </li>
<div className="clearfix pl25"> <div className="clearfix pl25">
<span className="fl edu-txt-right color-grey-6 lineh-30 mr20" <span className="fl edu-txt-right color-grey-6 lineh-30 mr20"
style={{"width": "86px"}}>开启时间</span> style={{ "width": "86px" }}>开启时间</span>
<li className="fl"> <li className="fl">
<DatePicker <DatePicker
showToday={false} showToday={false}
locale={locale} locale={locale}
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
style={{"width": "184px"}} style={{ "width": "184px" }}
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
placeholder="请选择开启时间" placeholder="请选择开启时间"
onChange={this.onChangeTimePicker} onChange={this.onChangeTimePicker}
@ -1316,7 +1314,7 @@ class Newshixuns extends Component {
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
/> />
<label style={{top: '6px'}} className="color-grey-6 ml10"> <label style={{ top: '6px' }} className="color-grey-6 ml10">
为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战 为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战
</label> </label>
</li> </li>

Loading…
Cancel
Save