diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 1187ebafa..a51dccb6f 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -454,7 +454,7 @@ class GamesController < ApplicationController tip_exception("初始代码为空,代码重置失败") if @content.nil? # 将tpm的代码内容同步更新到tpi - update_file_content(@content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "reset_original_code") + update_file_content(@content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "reset_original_code") rescue Exception => e uid_logger_error("#{e.message}") tip_exception("初始化代码失败") @@ -471,7 +471,7 @@ class GamesController < ApplicationController # else # content # end - update_file_content(content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "game passed reset") + update_file_content(content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "game passed reset") else tip_exception("代码重置失败,代码为空") end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 7a2db0666..99cee4185 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -769,7 +769,7 @@ class ShixunsController < ApplicationController def update_file content = params[:content] - author_name = current_user.full_name + author_name = current_user.real_name author_email = current_user.git_mail @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" end diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index ad7172be5..849621259 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -502,7 +502,7 @@ class Coursesleftnav extends Component{ NavmodalValues:"名称不能为空" }) return - }else if(NavmodalValue.length>20){ + }else if(NavmodalValue.length>60){ this.setState({ NavmodalValuetype:true, NavmodalValues:"名称不能超过60个字" diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index c69b147fa..e214bd81d 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -990,8 +990,15 @@ samp { .newcourses .ant-input{ width:280px; margin-left: 11px; - height: 40px; + height: 40px !important; } + +.newcourses .ant-input{ + width:280px; + margin-left: 11px; + height: 40px !important; +} + .newcourses .ant-select-selection--single{ width: 280px; /*margin-left: 11px;*/ diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 73c1dded9..b620ba0c3 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -1,5 +1,5 @@ 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 axios from 'axios'; import "../css/Courses.css"; @@ -47,8 +47,8 @@ class CoursesNew extends Component { let coursesId = this.props.match.params.coursesId; let user_school=this.props.current_user&&this.props.current_user.user_school; - this.getschool("") - this.Searchvalue("") + // this.getschool("") + // this.Searchvalue("") if (coursesId != undefined) { let url = "/courses/" + coursesId + "/settings.json" axios.get(url).then((result) => { @@ -285,8 +285,8 @@ class CoursesNew extends Component { this.setState({ searchlist: result.data.course_lists, - // course:value, - fetching: false + // course:value, + }) } // this.props.form.setFieldsValue({ @@ -298,10 +298,11 @@ class CoursesNew extends Component { } handleSearch=(value)=>{ + if(value!=""){ this.props.form.setFieldsValue({ classroom:value, - // course:value + course:value }); this.Searchvalue(value) } @@ -311,7 +312,7 @@ class CoursesNew extends Component { handleChange=(value)=>{ this.props.form.setFieldsValue({ - // course:value, + course:value, classroom:value }) }; @@ -319,21 +320,26 @@ class CoursesNew extends Component { handleSearchschool=(value)=>{ if(value!="") { - this.props.form.setFieldsValue({ - // school: value, - fetching: true, - }); - + // this.props.form.setFieldsValue({ + // // school: value, + // fetching: true, + // }); + this.setState({ + fetching: true + }) this.getschool(value) } }; handleChangeschools=(value)=>{ - this.props.form.setFieldsValue({ - // school: value, - fetching: true, - }); + // this.props.form.setFieldsValue({ + // // school: value, + // fetching: true, + // }); + // this.setState({ + // fetching: true + // }) } handleChangeschool=(value)=>{ @@ -359,7 +365,7 @@ class CoursesNew extends Component { if (result.data.status===0) { this.setState({ searchlistscholl: result.data.school_names, - // school: value + fetching: false }) } @@ -420,8 +426,7 @@ class CoursesNew extends Component { `} -
+ {/*内容*/} - {/*
*/} - - {/*
*/}
@@ -451,18 +457,15 @@ class CoursesNew extends Component { {getFieldDecorator('course', { rules: [{required: true, message: "不能为空"}], })( - + + + {options} + )} {/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/} @@ -632,18 +635,14 @@ class CoursesNew extends Component { {getFieldDecorator('school', { rules: [{required: true, message: "不能为空"}], })( - + {optionschool} + )} {/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/} @@ -651,7 +650,7 @@ class CoursesNew extends Component {
- {searchlistscholl.length===0?
+ {searchlistscholl.length===0&&this.state.fetching===true?
未找到包含“{school}”的高校, 申请新增 diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index 9c166f43f..003724ede 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -217,7 +217,7 @@ class ShixunsHome extends Component {
- {item.name} + {item.tag_name}
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index f6af871dd..b89990420 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1869,6 +1869,7 @@ export default class TPMsettings extends Component { placeholder="请选择开启时间" value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} onChange={this.onChangeTimePicker} + dropdownClassName="hideDisable" /> diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index c15269c5a..346be3351 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -1287,6 +1287,7 @@ class Newshixuns extends Component { placeholder="请选择开启时间" onChange={this.onChangeTimePicker} disabledTime={disabledDateTime} + dropdownClassName="hideDisable" />