Merge branch 'dev_aliyun' into develop

dev_forum
daiao 6 years ago
commit aa7f0aab0a

@ -124,11 +124,9 @@ module ShixunsHelper
if script.present? if script.present?
source_class_name = [] source_class_name = []
challenge_program_name = [] challenge_program_name = []
logger.info("########-----shixun.challenges.map(&:exec_path):#{shixun.challenges.map(&:exec_path)}")
shixun.challenges.map(&:exec_path).each do |exec_path| shixun.challenges.map(&:exec_path).each do |exec_path|
challenge_program_name << "\"#{exec_path}\"" challenge_program_name << "\"#{exec_path}\""
logger.info("----mirror_name: #{shixun.main_mirror_name.try(:first)}") if shixun.main_mirror_name == "Java"
if shixun.main_mirror_name.try(:first) == "Java"
if exec_path.nil? || exec_path.split("src/")[1].nil? if exec_path.nil? || exec_path.split("src/")[1].nil?
source = "\"\"" source = "\"\""
else else
@ -145,7 +143,6 @@ module ShixunsHelper
source_class_name << source if source.present? source_class_name << source if source.present?
end end
end end
logger.info("######source_class_name: #{source_class_name}")
script = if script.include?("sourceClassName") && script.include?("challengeProgramName") script = if script.include?("sourceClassName") && script.include?("challengeProgramName")
script.gsub(/challengeProgramNames=\(.*\)/,"challengeProgramNames=\(#{challenge_program_name.reject(&:blank?).join(" ")}\)").gsub(/sourceClassNames=\(.*\)/, "sourceClassNames=\(#{source_class_name.reject(&:blank?).join(" ")}\)") script.gsub(/challengeProgramNames=\(.*\)/,"challengeProgramNames=\(#{challenge_program_name.reject(&:blank?).join(" ")}\)").gsub(/sourceClassNames=\(.*\)/, "sourceClassNames=\(#{source_class_name.reject(&:blank?).join(" ")}\)")
else else

@ -378,7 +378,9 @@ class App extends Component {
{/*列表页*/} {/*列表页*/}
{/*<Route component={TPMShixunsIndexComponent}/>*/} {/*<Route component={TPMShixunsIndexComponent}/>*/}
{/*首页*/} {/*首页*/}
<Route component={ShixunsHome}/> <Route exact path="/" component={ShixunsHome}/>
<Route component={Shixunnopage}/>
{/*<Route component={ShixunsHome}/>*/} {/*<Route component={ShixunsHome}/>*/}
</Switch> </Switch>

@ -28,7 +28,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || '' window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
} }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

@ -485,6 +485,8 @@ pop_box_new(htmlvalue, 480, 182);
resData.myshixun_manager = true resData.myshixun_manager = true
} else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) { } else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) {
resData.power = 1 resData.power = 1
// 已认证老师允许跳关
resData.myshixun_manager = true
// resData.is_teacher = true // resData.is_teacher = true
} else if (resData.user.identity === EDU_TEACHER) { } else if (resData.user.identity === EDU_TEACHER) {

@ -502,7 +502,7 @@ class Coursesleftnav extends Component{
NavmodalValues:"名称不能为空" NavmodalValues:"名称不能为空"
}) })
return return
}else if(NavmodalValue.length>20){ }else if(NavmodalValue.length>60){
this.setState({ this.setState({
NavmodalValuetype:true, NavmodalValuetype:true,
NavmodalValues:"名称不能超过60个字" NavmodalValues:"名称不能超过60个字"

@ -990,8 +990,15 @@ samp {
.newcourses .ant-input{ .newcourses .ant-input{
width:280px; width:280px;
margin-left: 11px; margin-left: 11px;
height: 40px; height: 40px !important;
} }
.newcourses .ant-input{
width:280px;
margin-left: 11px;
height: 40px !important;
}
.newcourses .ant-select-selection--single{ .newcourses .ant-select-selection--single{
width: 280px; width: 280px;
/*margin-left: 11px;*/ /*margin-left: 11px;*/

@ -1,5 +1,5 @@
import React, {Component} from "React"; import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd"; import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal'; import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios'; import axios from 'axios';
import "../css/Courses.css"; import "../css/Courses.css";
@ -47,8 +47,8 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId; let coursesId = this.props.match.params.coursesId;
let user_school=this.props.current_user&&this.props.current_user.user_school; let user_school=this.props.current_user&&this.props.current_user.user_school;
this.getschool("") // this.getschool("")
this.Searchvalue("") // this.Searchvalue("")
if (coursesId != undefined) { if (coursesId != undefined) {
let url = "/courses/" + coursesId + "/settings.json" let url = "/courses/" + coursesId + "/settings.json"
axios.get(url).then((result) => { axios.get(url).then((result) => {
@ -285,8 +285,8 @@ class CoursesNew extends Component {
this.setState({ this.setState({
searchlist: result.data.course_lists, searchlist: result.data.course_lists,
// course:value, // course:value,
fetching: false
}) })
} }
// this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
@ -298,10 +298,11 @@ class CoursesNew extends Component {
} }
handleSearch=(value)=>{ handleSearch=(value)=>{
if(value!=""){ if(value!=""){
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
classroom:value, classroom:value,
// course:value course:value
}); });
this.Searchvalue(value) this.Searchvalue(value)
} }
@ -311,7 +312,7 @@ class CoursesNew extends Component {
handleChange=(value)=>{ handleChange=(value)=>{
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
// course:value, course:value,
classroom:value classroom:value
}) })
}; };
@ -319,21 +320,26 @@ class CoursesNew extends Component {
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
if(value!="") { if(value!="") {
this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
// school: value, // // school: value,
fetching: true, // fetching: true,
}); // });
this.setState({
fetching: true
})
this.getschool(value) this.getschool(value)
} }
}; };
handleChangeschools=(value)=>{ handleChangeschools=(value)=>{
this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
// school: value, // // school: value,
fetching: true, // fetching: true,
}); // });
// this.setState({
// fetching: true
// })
} }
handleChangeschool=(value)=>{ handleChangeschool=(value)=>{
@ -359,7 +365,7 @@ class CoursesNew extends Component {
if (result.data.status===0) { if (result.data.status===0) {
this.setState({ this.setState({
searchlistscholl: result.data.school_names, searchlistscholl: result.data.school_names,
// school: value fetching: false
}) })
} }
@ -420,8 +426,7 @@ class CoursesNew extends Component {
`} `}
</style> </style>
<Form onSubmit={this.handleSubmit} <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses"}>
className={"edu-back-white newcourses"}>
{/*内容*/} {/*内容*/}
<style> <style>
{` {`
@ -435,15 +440,16 @@ class CoursesNew extends Component {
width: 280px !important; width: 280px !important;
height: 160px; height: 160px;
} }
.construction{ .construction .ant-input{
width: 280px !important; width: 280px !important;
margin-left: 10px; margin-left: 0px !important;
}
.construction {
width: 280px;
margin-left: 10px;
} }
`} `}
</style> </style>
{/*<div className="stud-class-set bor-bottom-greyE padding10200">*/}
{/*</div>*/}
<div className="stud-class-set bor-bottom-greyE padding10200 "> <div className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}> <div className={"TabsWarpcourse"}>
@ -451,18 +457,15 @@ class CoursesNew extends Component {
{getFieldDecorator('course', { {getFieldDecorator('course', {
rules: [{required: true, message: "不能为空"}], rules: [{required: true, message: "不能为空"}],
})( })(
<Select
showSearch <AutoComplete style={{ width: 280 }}
className={"fl construction "} onSearch={this.handleSearch}
placeholder="例如:数据结构" // onChange={this.handleChange}
// value={this.state.course} className={"fl construction "}
onSearch={this.handleSearch} placeholder="例如:数据结构"
onChange={this.handleChange} >
onFocus={()=>this.Searchvalue("")} {options}
allowClear={true} </AutoComplete>
>
{options}
</Select>
)} )}
<span className={"newcoursestitle fl"}> <span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/} {/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
@ -632,18 +635,14 @@ class CoursesNew extends Component {
{getFieldDecorator('school', { {getFieldDecorator('school', {
rules: [{required: true, message: "不能为空"}], rules: [{required: true, message: "不能为空"}],
})( })(
<Select <AutoComplete style={{ width: 280 }}
showSearch onSearch={this.handleSearchschool}
className={"fl construction mr10 "} // onChange={this.handleChangeschools}
placeholder="请输入并选择课本堂的所属单位" className={"fl construction mr10 "}
// value={this.state.school} placeholder="请输入并选择课本堂的所属单位"
onSearch={this.handleSearchschool}
// notFoundContent={this.state.fetching ? <Spin size="small" /> : null}
onChange={this.handleChangeschools}
allowClear={true}
> >
{optionschool} {optionschool}
</Select> </AutoComplete>
)} )}
<span className={"newcoursestitle fl"}> <span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/} {/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
@ -651,7 +650,7 @@ class CoursesNew extends Component {
<div id='isschool'></div> <div id='isschool'></div>
</Form.Item> </Form.Item>
{searchlistscholl.length===0?<div style={{height:"20px",lineHeight:"20px"}} className="ml20"> {searchlistscholl.length===0&&this.state.fetching===true?<div style={{height:"20px",lineHeight:"20px"}} className="ml20">
<span> <span>
<span style={{color: '#CDCDCD'}}>未找到包含{school}的高校</span> <span style={{color: '#CDCDCD'}}>未找到包含{school}的高校</span>
<span style={{color: '#4CACFF', cursor: 'pointer'}} onClick={this.showApplyForAddOrgModal}>申请新增</span> <span style={{color: '#4CACFF', cursor: 'pointer'}} onClick={this.showApplyForAddOrgModal}>申请新增</span>

@ -217,7 +217,7 @@ class ShixunsHome extends Component {
<div className="square-Item" key={key} id={item.id} style={{width:'286px'}}> <div className="square-Item" key={key} id={item.id} style={{width:'286px'}}>
<div className="tag-green"> <div className="tag-green">
<span className="tag-name"> {item.name}</span> <span className="tag-name"> {item.tag_name}</span>
<img style={{display:item.tag_name===null?"none":'block'}} src={require(`./tag2.png`)}/> <img style={{display:item.tag_name===null?"none":'block'}} src={require(`./tag2.png`)}/>
</div> </div>

@ -95,7 +95,8 @@ class NewHeader extends Component {
}); });
//获取游览器地址
window.sessionStorage.setItem("yslgeturls",JSON.stringify(window.location.href))
} }

@ -1869,6 +1869,7 @@ export default class TPMsettings extends Component {
placeholder="请选择开启时间" placeholder="请选择开启时间"
value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
onChange={this.onChangeTimePicker} onChange={this.onChangeTimePicker}
dropdownClassName="hideDisable"
/> />
<label style={{top:'6px'}} className="color-grey-9 ml10" >为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战</label> <label style={{top:'6px'}} className="color-grey-9 ml10" >为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战</label>
</span> </span>

@ -1287,6 +1287,7 @@ class Newshixuns extends Component {
placeholder="请选择开启时间" placeholder="请选择开启时间"
onChange={this.onChangeTimePicker} onChange={this.onChangeTimePicker}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
dropdownClassName="hideDisable"
/> />
<label style={{top: '6px'}} className="color-grey-6 ml10"> <label style={{top: '6px'}} className="color-grey-6 ml10">
为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战 为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战

@ -109,12 +109,13 @@ class LoginRegisterComponent extends Component {
return; return;
} }
//拖动滑动验证 //拖动滑动验证
if(this.state.dragOk === false){ if(this.state.pciphone===true) {
this.openNotification("拖动滑块验证"); if (this.state.dragOk === false) {
return; this.openNotification("拖动滑块验证");
return;
}
} }
if (this.state.getverificationcodes === true) { if (this.state.getverificationcodes === true) {
this.setState({ this.setState({
getverificationcodes: undefined, getverificationcodes: undefined,

@ -9,6 +9,7 @@ import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios'; import axios from 'axios';
import CheckInputysl1 from './CheckInputysl'; import CheckInputysl1 from './CheckInputysl';
import CheckInputysl2 from './CheckInputysl'; import CheckInputysl2 from './CheckInputysl';
import Notcompletedysl from './Notcompletedysl';
import './common.css' import './common.css'
import './commontwo.css' import './commontwo.css'
const { TabPane } = Tabs; const { TabPane } = Tabs;
@ -63,6 +64,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Whethertoverify:false, Whethertoverify:false,
pciphone:true, pciphone:true,
MyEduCoderModals:false,
} }
} }
@ -98,6 +100,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcodmm:undefined, Phonenumberisnotcodmm:undefined,
Whethertoverify:false, Whethertoverify:false,
pciphone:true, pciphone:true,
MyEduCoderModals:false,
} }
} }
@ -350,7 +353,11 @@ class LoginRegisterComponent extends Component {
this.setState({ this.setState({
isRender: false isRender: false
}) })
window.location.href = "/" var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls'));
if(weekArray===undefined){
weekArray="/";
}
window.location.href = weekArray;
} }
} }
@ -458,7 +465,7 @@ class LoginRegisterComponent extends Component {
passwords: "", passwords: "",
Agreetotheterms: "", Agreetotheterms: "",
}) })
this.props.history.push("/interesse"); this.setMyEduCoderModals();
} }
} }
}).catch((error) => { }).catch((error) => {
@ -589,10 +596,12 @@ class LoginRegisterComponent extends Component {
}) })
return; return;
} }
if(this.state.dragOk === false){ if(this.state.pciphone===true) {
this.openNotification("拖动滑块验证"); if (this.state.dragOk === false) {
return; this.openNotification("拖动滑块验证");
} return;
}
}
if (this.state.getverificationcodes === true) { if (this.state.getverificationcodes === true) {
this.setState({ this.setState({
@ -868,7 +877,18 @@ class LoginRegisterComponent extends Component {
return false; return false;
} }
} };
setNotcompleteds=()=>{
this.setState({
Notcompleteds:true,
MyEduCoderModals:false
})
};
setMyEduCoderModals=()=>{
this.setState({
MyEduCoderModals:true
})
};
render() { render() {
const { const {
// 登录 // 登录
@ -1018,6 +1038,11 @@ class LoginRegisterComponent extends Component {
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
<Notcompletedysl
modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
{ {
Whethertoverify===false&&pciphone===true? Whethertoverify===false&&pciphone===true?
<CheckInputysl1 <CheckInputysl1

@ -200,16 +200,17 @@ class AccountBasic extends Component {
// 过滤学校 // 过滤学校
filterList=(e)=>{ filterList=(e)=>{
const inputVal = e.trim()
let arr=[]; let arr=[];
if(e){ if(inputVal){
arr= this.state.schoolList.filter(function(item){ arr= this.state.schoolList.filter(function(item){
return item.name.indexOf(e)>-1; return item.name.indexOf(inputVal)>-1;
}); });
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
org:e org: inputVal
}) })
this.setState({ this.setState({
school:e, school: inputVal,
filterSchoolList:arr filterSchoolList:arr
}) })
} else { } else {
@ -266,7 +267,7 @@ class AccountBasic extends Component {
// 选择学校(获取对应学校的学院、部门) // 选择学校(获取对应学校的学院、部门)
changeList=(e)=>{ changeList=(e)=>{
this.getDepartments(e,true); this.getDepartments(e.trim(),true);
} }
getDepartments=(e,flag)=>{ getDepartments=(e,flag)=>{

Loading…
Cancel
Save