Merge branches 'dev_aliyun' and 'master' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

# Conflicts:
#	public/react/src/modules/courses/exercise/Testpapersettinghomepage.js
dev_forum
杨树明 5 years ago
commit aebfc5dd35

@ -1,6 +1,6 @@
class DepartmentsController < ApplicationController
def for_option
render_ok(departments: current_school.departments.select(:id, :name).as_json)
render_ok(departments: current_school.departments.without_deleted.select(:id, :name).as_json)
end
private

@ -2,4 +2,6 @@ class Department < ApplicationRecord
belongs_to :school
has_many :department_members, dependent: :destroy
scope :without_deleted, -> { where(is_delete: false) }
end

@ -4,6 +4,8 @@ Rails.application.routes.draw do
require 'admin_constraint'
mount Sidekiq::Web => '/sidekiq', :constraints => AdminConstraint.new
get 'attachments/download/:id', to: 'attachments#show'
resources :edu_settings
scope '/api' do
get 'home/index'

@ -218,6 +218,20 @@ class Testpapersettinghomepage extends Component{
// DownloadMessageval:undefined
// })
// }
goback=()=>{
// let {datalist}=this.state;
// let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id;
//
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
let courseId=this.props.match.params.coursesId;
if(courseId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
render(){
let {tab,visible,Commonheadofthetestpaper}=this.state;
const isAdmin =this.props.isAdmin();
@ -251,7 +265,7 @@ class Testpapersettinghomepage extends Component{
<div className="educontent mb20" style={{width:"1200px"}}>
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<ActionBtn className=" btn colorgrey fl hovercolorblue " onClick={this.goback} >{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`} >试卷</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -274,9 +288,7 @@ class Testpapersettinghomepage extends Component{
<CoursesListType
typelist={[`${polls_status[Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status]}`]}
/>
<a className="color-grey-6 fr font-16 summaryname mr30"
href={`/courses/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`}>返回</a>
<a className="color-grey-6 fr font-16 summaryname mr30" onClick={this.goback}>返回</a>
<p className="color-grey-6 fr font-16"> </p>
</div>

@ -170,7 +170,7 @@ class GraduationTasksappraise extends Component{
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<Link to={"/courses/"+courseId+"/students"} className="color-grey-9 fl">{datalist&&datalist.course_name}</Link>
<a onClick={this.goback} className="color-grey-9 fl">{datalist&&datalist.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -107,6 +107,16 @@ class PollDetailIndex extends Component{
DownloadType:false,
DownloadMessageval:undefined
})
}
goback=()=>{
let courseId=this.props.match.params.coursesId;
if(courseId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
render(){
let {tab,pollDetail,user_permission}=this.state;
@ -123,7 +133,7 @@ class PollDetailIndex extends Component{
/>
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn>
<a style="grey" className="fl" onClick={()=>this.goback()}>{this.props.coursedata.name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -134,7 +144,7 @@ class PollDetailIndex extends Component{
<span className="mt3 fl" style={{height:"25px"}}>
<CoursesListType typelist={[`${map[pollDetail && pollDetail.polls_status]}`]} typesylename={""} />
</span>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.goback()}>返回</WordsBtn>
</p>
<div>
<div className="clearfix edu-back-white pl30 pr30 bor-bottom-greyE">

@ -111,7 +111,14 @@ class ShixunHomeworkPage extends Component {
bindRef = ref => { this.child = ref }
///////////////教师截止
gotohome=()=>{
let courseId=this.props.match.params.coursesId;
if(courseId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
render() {
let {tab, teacherdatapage, jobsettingsdatapage} = this.state;
@ -125,8 +132,7 @@ class ShixunHomeworkPage extends Component {
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}</ActionBtn>
<ActionBtn className=" btn colorgrey fl hovercolorblue " onClick={()=>this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
@ -142,8 +148,7 @@ class ShixunHomeworkPage extends Component {
<CoursesListType
typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" onClick={()=>this.gotohome()}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdatapage === undefined ? "" : teacherdatapage.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>

@ -120,6 +120,9 @@ class EducoderLogin extends Component {
})
}
gohome=()=>{
window.location.href="/"
}
Setshowbool = (e,name,pass) => {
if (e===1) {
this.setState({
@ -146,7 +149,7 @@ class EducoderLogin extends Component {
"width": "100%"
}}>
<div >
<img src={educodernet}/>
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={educodernet}/>
</div>

@ -708,7 +708,7 @@ submittojoinclass=(value)=>{
onInput={()=>this.onKeywordSearchKeyDowns()}
onSearch={(value) => this.onKeywordSearchKeyDown(value)}
// onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 300 }}
style={{ width: 300,height:32}}
autoFocus={true}
/>
</div>:""}

@ -12,6 +12,7 @@ import ReadPassword from './ReadPassword';
import axios from 'axios';
import './common.css'
import './commontwo.css'
const TabPane = Tabs.TabPane
const loginInputsyl = {
@ -27,7 +28,7 @@ class LoginRegisterComponent extends Component {
login: "",
password: "",
passwords: "",
seconds: 35,
seconds: 60,
codes: "",
getverificationcodes: true,
Phonenumberisnotcobool: false,
@ -126,7 +127,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
});
@ -144,7 +145,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
@ -600,6 +601,7 @@ class LoginRegisterComponent extends Component {
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={()=>this.dragOkCallback()}
className="ysllw100"
></DragValidator>
:
""
@ -611,6 +613,7 @@ class LoginRegisterComponent extends Component {
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={()=>this.dragOkCallback()}
className="ysllw100"
></DragValidatortwo>
:
""

@ -9,6 +9,7 @@ import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import './common.css'
import './commontwo.css'
const { TabPane } = Tabs;
const loginInputsyl = {
"width":"434px",
@ -36,7 +37,7 @@ class LoginRegisterComponent extends Component {
classpass: "text",
// 登录
passopens: passoff,
seconds: 35,
seconds: 60,
discodeBtn: false,
clearInterval: false,
autoLogin: true,
@ -71,7 +72,7 @@ class LoginRegisterComponent extends Component {
classpass: "text",
// 登录
passopens: passoff,
seconds: 35,
seconds: 60,
discodeBtn: false,
clearInterval: false,
autoLogin: true,
@ -528,7 +529,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
});
@ -546,7 +547,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
@ -718,7 +719,7 @@ class LoginRegisterComponent extends Component {
console.log(classpass);
return (
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "490px"}}>
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}>
<style>
{
`
@ -731,7 +732,7 @@ class LoginRegisterComponent extends Component {
</style>
<div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
<Menu.Item key="1" className={tab===1?"active font-18":"font-18"} >注册</Menu.Item>
</Menu>
@ -839,8 +840,9 @@ class LoginRegisterComponent extends Component {
Whethertoverify===false&&pciphone===true?
<DragValidator
height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}}
style={{ height: '38px',width: "100%"}}
dragOkCallback={this.dragOkCallback}
className="ysllw100"
></DragValidator>
:
""
@ -850,8 +852,9 @@ class LoginRegisterComponent extends Component {
Whethertoverify===true&&pciphone===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}}
style={{ height: '38px',width: "100%"}}
dragOkCallback={this.dragOkCallback}
className="ysllw100"
></DragValidatortwo>
:
""

@ -278,6 +278,7 @@ class AccountBasic extends Component {
this.setState({
departments: [],
filterDepartments: [],
departmentsName: '',
school_id: '',
department_id: '',
})
@ -412,7 +413,7 @@ class AccountBasic extends Component {
addChildOrgSuccess={this.addChildOrgSuccess}
></ApplyForAddChildOrgModal>
<div className="basicForm">
<div className="basicForm courseNormalForm">
<style>{`
.formItemInline {
display: flex;
@ -448,9 +449,7 @@ class AccountBasic extends Component {
.basicForm .cancelBtn {
margin-left: 0px;
}
.basicForm .ant-input-lg {
height: 32px;
}
.basicForm .ant-form-item-label {
width: 100px;
padding-right: 10px;
@ -576,6 +575,7 @@ class AccountBasic extends Component {
<Form.Item
label=""
className="formItemInline fl"
style={{ 'margin-top': '3px'}}
// style={{display:identity && identity=="student" ? "block":"none"}}
>
{getFieldDecorator('student_No', {
@ -680,6 +680,7 @@ class AccountBasic extends Component {
<Form.Item
label="院系/部门"
className="formItemInline mb0"
style={{ 'margin-top': '10px'}}
>
{getFieldDecorator('org2', {
rules: [{
@ -730,7 +731,7 @@ class AccountBasic extends Component {
</Form.Item> */}
</Form>
</div>
<div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
<div style={{color: '#989898', marginLeft: '20px', marginBottom: '10px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div>
);
}

@ -15,7 +15,6 @@ class AccountCertification extends Component {
}
checkBasicInfo = (index) => {
if (index == 1) {
if ( this.props.basicInfo.base_info_completed == true) {
this.showRealNameCertificationModal(index)
} else {
@ -27,9 +26,6 @@ class AccountCertification extends Component {
}
})
}
} else if (index == 2) {
this.showRealNameCertificationModal(index)
}
}

@ -335,7 +335,7 @@ class AccountSecure extends Component {
</Button>
</Form.Item>
<div className="mb20" style={{ marginLeft: '118px' }}>
<div className="mb20" style={{ marginLeft: '204px' }}>
<Button type="primary" onClick={this.onPhoneSubmit}>确定</Button>
<Button type="primary grayBtn" style={{ marginLeft: '20px'}} onClick={this.hideUpdating}>取消</Button>
</div>
@ -398,7 +398,7 @@ class AccountSecure extends Component {
{ !secondsFlag ? "获取验证码":`重新发送${seconds}s`}</Button>
</Form.Item>
<div className="mb20" style={{ marginLeft: '118px' }}>
<div className="mb20" style={{ marginLeft: '204px' }}>
<Button type="primary" onClick={this.onEmailSubmit}>确定</Button>
<Button type="primary grayBtn" style={{ marginLeft: '20px'}} onClick={this.hideUpdating}>取消</Button>
</div>
@ -471,7 +471,7 @@ class AccountSecure extends Component {
)}
</Form.Item>
<div className="mb20" style={{ marginLeft: '118px' }}>
<div className="mb20" style={{ marginLeft: '204px' }}>
<Button type="primary" onClick={this.onPasswordSubmit}>确定</Button>
<Button type="primary grayBtn" style={{ marginLeft: '20px'}} onClick={this.hideUpdating}>取消</Button>
</div>

@ -51,3 +51,33 @@ button.ant-btn.ant-btn-primary.grayBtn {
.basicForm .ant-form-item-label label {
color: #979797
} */
.courseNormalForm .ant-select-show-search {
height: 40px;
}
.courseNormalForm .ant-select-auto-complete.ant-select .ant-input {
height: 40px;
}
.courseNormalForm .ant-select-search__field__mirror {
height: 40px;
}
.courseNormalForm .ant-input-lg {
height: 40px;
}
.courseNormalForm .ant-select-selection--single {
height: 40px;
}
.courseNormalForm .ant-select-auto-complete.ant-select .ant-select-selection--single {
height: 40px
}
.courseNormalForm .ant-input-affix-wrapper {
height: 40px;
}
/* 职业 */
.courseNormalForm .ant-select-selection-selected-value {
line-height: 38px
}
.courseNormalForm input {
height: 40px;
}

@ -271,3 +271,6 @@
width: 100px;
margin: 0 auto;
}
.ysllw100{
width: 100%;
}

@ -76,7 +76,7 @@ class ApplyForAddChildOrgModal extends Component{
{...this.props }
onOk={this.onOk}
okText="保存"
className="applyForModal"
className="applyForModal courseNormalForm"
>
<style>{`
.applyForModal .ant-form-item-label {
@ -90,7 +90,7 @@ class ApplyForAddChildOrgModal extends Component{
width: 390px;
}
`}</style>
<Form>
<Form className="">
<Form.Item
label="单位名称:"
className="mt15 formItemInline hideRequireTag"

@ -74,7 +74,7 @@ class ApplyForAddOrgModal extends Component{
{...this.props }
onOk={this.onOk}
okText="保存"
className="applyForModal"
className="applyForModal courseNormalForm"
>
<style>{`
.applyForModal .ant-form-item-label {
@ -89,7 +89,7 @@ class ApplyForAddOrgModal extends Component{
}
.applyForModal .formItemInline .ant-form-item-control .ant-cascader-picker,.applyForModal .formItemInline .ant-cascader-picker-large .ant-input{
width: 100%;
height:32px!important;
height:40px!important;
}
.applyForModal .formItemInline .ant-input-lg{
font-size:14px!important;
@ -102,7 +102,7 @@ class ApplyForAddOrgModal extends Component{
width: 196px;
}
`}</style>
<Form onSubmit={this.onOk}>
<Form onSubmit={this.onOk} className="">
<Form.Item
label="单位全称:"
className="mt15 formItemInline explain"

@ -147,7 +147,7 @@ class RealNameCertificationModal extends Component{
{...this.props }
onOk={this.onOk}
okText="保存"
className="applyForModal certificationModal"
className="applyForModal certificationModal courseNormalForm"
bottomRender={
certification && certification == 1?
<div className="bottomRender">
@ -186,7 +186,7 @@ class RealNameCertificationModal extends Component{
>
<style>{`
.applyForModal .ant-form-item{
margin-bottom:15px;
margin-bottom:18px;
}
.applyForModal .ant-form-item-label {
width: 100px;

Loading…
Cancel
Save