diff --git a/app/controllers/departments_controller.rb b/app/controllers/departments_controller.rb index b6ebcb2ef..5e82b2c51 100644 --- a/app/controllers/departments_controller.rb +++ b/app/controllers/departments_controller.rb @@ -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 diff --git a/app/models/department.rb b/app/models/department.rb index 15a8a7c1b..9c4a0908b 100644 --- a/app/models/department.rb +++ b/app/models/department.rb @@ -2,4 +2,6 @@ class Department < ApplicationRecord belongs_to :school has_many :department_members, dependent: :destroy + + scope :without_deleted, -> { where(is_delete: false) } end diff --git a/config/routes.rb b/config/routes.rb index bb5bc49cc..6024201a4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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' diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index e382625b0..a54f5a6e2 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -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{

- {this.props.coursedata.name} + {this.props.coursedata.name} > 试卷 > @@ -274,9 +288,7 @@ class Testpapersettinghomepage extends Component{ - 返回 + 返回

diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 7aa1530af..5eccb2332 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -170,7 +170,7 @@ class GraduationTasksappraise extends Component{

- {datalist&&datalist.course_name} + {datalist&&datalist.course_name} > {datalist&&datalist.graduation_name} > diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index 0099c8615..cbcdd1533 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -108,6 +108,16 @@ class PollDetailIndex extends Component{ 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{ />

- {this.props.coursedata.name} + this.goback()}>{this.props.coursedata.name} > 问卷 > @@ -134,7 +144,7 @@ class PollDetailIndex extends Component{ - this.props.history.goBack()}>返回 + this.goback()}>返回

diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index d9e589bd4..9b053f03b 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -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 {

- {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} + this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} > - 返回 + this.gotohome()}>返回 实训详情 diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 14d80181a..713593100 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -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%" }}>

- + this.gohome()} src={educodernet}/>
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 20436f3c7..791110b0b 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -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} />
:""} diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 7df2d82c5..19b5a7388 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -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" > : "" @@ -611,6 +613,7 @@ class LoginRegisterComponent extends Component { height={38} successGreenColor="#29bd8b" style={{height: "38px", width: "100%"}} dragOkCallback={()=>this.dragOkCallback()} + className="ysllw100" > : "" diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index b761a910f..ff3eba33d 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -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 ( -
+
- + 登录 注册 @@ -839,8 +840,9 @@ class LoginRegisterComponent extends Component { Whethertoverify===false&&pciphone===true? : "" @@ -850,8 +852,9 @@ class LoginRegisterComponent extends Component { Whethertoverify===true&&pciphone===true? : "" diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 9a37f866e..1458862a1 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -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} > -
+
-
+ - + @@ -186,7 +186,7 @@ class RealNameCertificationModal extends Component{ >