From f049d7763c066101b30ac397f8b105f2b7637f44 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 24 Jul 2019 15:40:08 +0800 Subject: [PATCH 01/34] addSuc --- .../src/modules/user/account/AccountBasicEdit.js | 11 ++++++++++- .../src/modules/user/modal/ApplyForAddOrgModal.js | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 8af24022d..13741fd5b 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -273,6 +273,14 @@ class AccountBasic extends Component { } } + addOrgSuccess = (name) => { + const schoolList = this.state.schoolList.slice(0) + schoolList.push({ id: schoolList.length + 2000, name: name}) + this.setState({ schoolList }) + this.props.form.setFieldsValue({ + name: name + }) + } showApplyForAddOrgModal = () => { this.applyForAddOrgForm.setVisible(true) @@ -309,7 +317,8 @@ class AccountBasic extends Component { return (
this.applyForAddOrgForm = form} schoolName={school} - {...propsWithoutForm}> + {...propsWithoutForm} addOrgSuccess={this.addOrgSuccess} + > this.applyForAddChildOrgForm = form} > diff --git a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js index 95cfa9105..72ae542c6 100644 --- a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js +++ b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js @@ -48,6 +48,7 @@ class ApplyForAddOrgModal extends Component{ }).then((result)=>{ if(result){ this.props.showNotification("新增学校/单位成功!"); + this.props.addOrgSuccess(values.schoolName) this.setVisible(false); } }).catch((error)=>{ From 7a65ebaf7632d0851f75f357adf55d592f10f078 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Jul 2019 17:54:14 +0800 Subject: [PATCH 02/34] =?UTF-8?q?=E9=99=84=E4=BB=B6=E7=9A=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 33 ++++++++++++++++++++++- app/models/user.rb | 2 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 014262aea..8eb7ffebc 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -2,7 +2,7 @@ # # 文件上传 class AttachmentsController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login, :check_auth, except: [:show] before_action :find_file, only: %i[show destroy] include ApplicationHelper @@ -10,6 +10,8 @@ class AttachmentsController < ApplicationController def show # 1. 优先跳到cdn # 2. 如果没有cdn,send_file + candown = attachment_candown @file + tip_exception("您没有权限下载该附件") if !candown if @file.cloud_url.present? update_downloads(@file) redirect_to @file.cloud_url and return @@ -157,4 +159,33 @@ class AttachmentsController < ApplicationController end edu_setting('public_cdn_host') + "/" + path end + + def attachment_candown attachment + return true if current_user.admin? || current_user.business? + candown = false + if attachment.container && current_user.logged? + # 课堂资源、作业、毕设相关资源的权限判断 + if attachment.container.is_a?(Course) + course = attachment.container + candown = current_user.member_of_course?(course) || attachment.is_public == 1 + elsif attachment.container.is_a?(HomeworkCommon) || attachment.container.is_a?(GraduationTask) || attachment.container.is_a?(GraduationTopic) + course = attachment.container&.course + elsif attachment.container.is_a?(StudentWork) + course = attachment.container&.homework_common&.course + elsif attachment.container.is_a?(StudentWorksScore) + course = attachment.container&.student_work&.homework_common&.course + elsif attachment.container.is_a?(GraduationWork) + course = attachment.container&.graduation_task&.course + elsif attachment.container.is_a?(GraduationWorkScore) + course = attachment.container&.graduation_work&.graduation_task&.course + else + candown = true + end + + candown = !candown && course.present? ? current_user.member_of_course?(course) : candown + else + candown = true + end + candown + end end diff --git a/app/models/user.rb b/app/models/user.rb index 03c97b9f3..34576db66 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -250,7 +250,7 @@ class User < ApplicationRecord # 课堂成员 def member_of_course?(course) - course.course_members.exists?(user_id: id) + course&.course_members.exists?(user_id: id) end # 实训路径管理员:创建者或admin From 91bcb7bba46f7fb40981400102a04afed502814c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Jul 2019 17:54:38 +0800 Subject: [PATCH 03/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cc1fc167e..c80ca2348 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -232,6 +232,14 @@ class ApplicationController < ActionController::Base User.current = User.find 12 end + if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除 + User.current = User.find 81403 + elsif params[:debug] == 'student' + User.current = User.find 8686 + elsif params[:debug] == 'admin' + User.current = User.find 1 + end + # User.current = User.find 81403 end From 42c2cc50cb2099dd8630806ebc3da9bff0e087fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 24 Jul 2019 18:02:32 +0800 Subject: [PATCH 04/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 149f9bc27..87b6c63ab 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -46,7 +46,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("") if (coursesId != undefined) { let url = "/courses/" + coursesId + "/settings.json" axios.get(url).then((result) => { @@ -85,8 +86,7 @@ class CoursesNew extends Component { }) } - this.getschool("") - this.Searchvalue("") + } componentDidUpdate(prevProps){ @@ -292,7 +292,8 @@ class CoursesNew extends Component { search:value }).then((result)=>{ // console.log(result.data) - if (result.data.status===0) { + if (result.data.message===undefined) { + this.setState({ searchlist: result.data.course_lists, // course:value, @@ -357,7 +358,9 @@ class CoursesNew extends Component { }; getschool=(value)=>{ - + this.props.form.setFieldsValue({ + school: value + }) let url="/schools/school_list.json"; axios.get(url,{ params: { @@ -369,9 +372,7 @@ class CoursesNew extends Component { searchlistscholl: result.data.school_names, school: value }) - this.props.form.setFieldsValue({ - school: value - }) + } }).catch((error)=>{ console.log(error) @@ -389,7 +390,7 @@ class CoursesNew extends Component { const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => ); // console.log(this.props.current_user.user_school) // form合并了 - // console.log(optionschool) + console.log(options) return ( From ab1039df4963e724248c773097f47f082bfb8083 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Jul 2019 18:02:44 +0800 Subject: [PATCH 05/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=95=99=E5=B8=88?= =?UTF-8?q?=E5=92=8C=E5=8A=A9=E6=95=99=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index bb0737128..f5830adff 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -29,10 +29,10 @@ class CoursesController < ApplicationController :transfer_to_course_group, :delete_from_course, :search_users, :add_students_by_search, :get_historical_courses, :add_teacher_popup, :add_teacher] before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, :change_course_admin, - :set_course_group, :delete_course_teacher, :create_group_by_importing_file] + :set_course_group, :create_group_by_importing_file] before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group, :change_course_teacher, :export_member_scores_excel, :course_group_list, - :teacher_application_review, :apply_teachers] + :teacher_application_review, :apply_teachers, :delete_course_teacher] before_action :validate_course_name, only: [:create, :update] before_action :find_board, only: :board_list before_action :validate_page_size, only: :mine From 4b388e090b74a950e4dfb5be88fb29ba1d4d90e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 18:02:59 +0800 Subject: [PATCH 06/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/Interestpage.js | 2 ++ public/react/src/modules/user/InterestpageMax.js | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js index dbca5a242..1054d620e 100644 --- a/public/react/src/modules/user/Interestpage.js +++ b/public/react/src/modules/user/Interestpage.js @@ -192,6 +192,8 @@ class InterestpageComponent extends Component { ints.push(this.state.gouxuans4[i].id); } } + console.log("195195"); + console.log(ints); if(ints.length<1){ this.openNotification("请至少选择一个您感兴趣的内容"); return diff --git a/public/react/src/modules/user/InterestpageMax.js b/public/react/src/modules/user/InterestpageMax.js index e0585ed33..6dc182154 100644 --- a/public/react/src/modules/user/InterestpageMax.js +++ b/public/react/src/modules/user/InterestpageMax.js @@ -182,10 +182,6 @@ class InterestpageMax extends Component { //兴趣页面点击 Interestcompletionpage(){ - - this.setState({ - setpagecomplet:true - }) if(this.state.gouxuans.length === 0){ this.openNotification("请选择职业"); return @@ -197,6 +193,8 @@ class InterestpageMax extends Component { ints.push(this.state.gouxuans4[i].id); } } + console.log("200200"); + console.log(ints); if(ints.length<1){ this.openNotification("请至少选择一个您感兴趣的内容"); return @@ -302,7 +300,7 @@ class InterestpageMax extends Component { ) })}
- + From 47c6b5446d7f53069ccf7bb089f4c2c5825c9471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 24 Jul 2019 18:04:47 +0800 Subject: [PATCH 07/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/new/CoursesNew.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 87b6c63ab..6e996297b 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -152,7 +152,7 @@ class CoursesNew extends Component { } if(values.school===""||values.school===undefined){ - this.scrollToAnchor("isschool") + // this.scrollToAnchor("isschool") return } @@ -220,7 +220,7 @@ class CoursesNew extends Component { return } if(values.school===""||values.school===undefined){ - this.scrollToAnchor("isschool") + // this.scrollToAnchor("isschool") return } From 3d316e2e4e381eb4c58504e15c1af08bdd880d55 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 24 Jul 2019 18:06:43 +0800 Subject: [PATCH 08/34] account --- .../modules/user/account/AccountBasicEdit.js | 148 +++++++++++++++--- .../user/modal/ApplyForAddChildOrgModal.js | 8 +- 2 files changed, 132 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 13741fd5b..c3b150229 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { SnackbarHOC, getImageUrl, City, ConditionToolTip } from 'educoder'; -import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd' +import { Form, Button, Input, Radio, Select, Tooltip, Icon, AutoComplete } from 'antd' import ApplyForAddOrgModal from '../modal/ApplyForAddOrgModal' import ApplyForAddChildOrgModal from '../modal/ApplyForAddChildOrgModal' import axios from 'axios' @@ -84,14 +84,29 @@ class AccountBasic extends Component { } // 获取学校、单位 - getSchoolList=(basicInfo)=>{ + getSchoolList=(basicInfo, selectedName)=>{ let url=`/schools/for_option.json`; axios.get(url).then((result)=>{ if(result){ this.setState({ schoolList:result.data.schools }) - if(basicInfo && basicInfo.school_name){ + if (selectedName) { + let school_id + result.data.schools.reverse().some( item => { + if (item.name == selectedName) { + school_id = item.id + return true; + } + }) + this.props.form.setFieldsValue({ + org: selectedName + }) + this.setState({ + school_id, + school: selectedName + }) + } else if(basicInfo && basicInfo.school_name){ this.setState({ school:basicInfo.school_name, filterSchoolList:this.state.schoolList.filter(function(item){ @@ -119,6 +134,15 @@ class AccountBasic extends Component { console.log(values); let {basicInfo}=this.props; if(!err ){ + if (!this.state.school_id) { + this.props.showNotification('请先请先选择学校/单位') + return; + } + if (!this.state.department_id) { + this.props.showNotification('请先选择院系/部门') + return; + } + let url=`/users/accounts/${basicInfo.id}.json` axios.put((url),{ nickname:values.nickname, @@ -187,6 +211,10 @@ class AccountBasic extends Component { school:e, filterSchoolList:arr }) + } else { + this.setState({ + school: '', + }) } // else{ // let {school}=this.state; @@ -208,17 +236,30 @@ class AccountBasic extends Component { filterDepartments:arr, departmentsName:e }) + } else { + this.setState({ + filterDepartments: this.state.departments + }) } } // 选择部门、学院 changeDepartment=(e)=>{ - let arr= this.state.departments && this.state.departments.filter ? this.state.departments.filter(function(item){ + let arr = this.state.departments && this.state.departments.filter ? this.state.departments.filter(function(item){ return item.name == e; }) : []; + if (!arr[0]) { + this.setState({ + department_id: '', + departmentsName: e, + }) + this.this_department_id = '' + return; + } + this.this_department_id = arr[0].id this.setState({ departmentsName:e, - department_id:arr[0].id + department_id: arr[0].id }) } @@ -231,20 +272,57 @@ class AccountBasic extends Component { let arr=this.state.schoolList.filter(function(item){ return item.name == e; }); + if (!arr[0]) { + // 没找到学校,清空部门 + this.setState({ + departments: [], + filterDepartments: [], + school_id: '', + department_id: '', + }) + this.this_school_id = '' + this.props.form.setFieldsValue({ + org2: '' + }) + return; + } + this.props.form.setFieldsValue({ + org: arr[0].name + }) + this.filterList(e) // 保存选择的学校id + this.this_school_id = arr[0].id this.setState({ - school_id:arr[0].id, + school_id: arr[0].id, school:e, }) - let url=`/schools/${arr[0].id}/departments/for_option.json`; + this._getDepartments(arr[0].id, flag) + } + _getDepartments = (schoolId, flag, selectedName) => { + let url=`/schools/${schoolId || this.state.school_id}/departments/for_option.json`; axios.get(url).then((result)=>{ if(result){ this.setState({ departments:result.data.departments, filterDepartments:result.data.departments }) - // 切换学校后,部门默认选择第一个 - if(result.data.departments && result.data.departments.length>0 && flag==true){ + if (selectedName) { + let department_id + result.data.departments.reverse().some( item => { + if (item.name == selectedName) { + department_id = item.id + return true; + } + }) + this.props.form.setFieldsValue({ + org2: selectedName + }) + this.setState({ + department_id, + // school: selectedName + }) + } else if(result.data.departments && result.data.departments.length>0 && flag==true){ + // 切换学校后,部门默认选择第一个 this.props.form.setFieldsValue({ org2:result.data.departments[0].name }) @@ -274,14 +352,23 @@ class AccountBasic extends Component { } addOrgSuccess = (name) => { - const schoolList = this.state.schoolList.slice(0) - schoolList.push({ id: schoolList.length + 2000, name: name}) - this.setState({ schoolList }) + // const schoolList = this.state.schoolList.slice(0) + // schoolList.push({ id: schoolList.length + 2000, name: name}) + // this.setState({ schoolList }) + + this.getSchoolList(this.props.basicInfo, name); + this.props.form.setFieldsValue({ name: name }) } + addChildOrgSuccess = (deptName) => { + + this._getDepartments(this.state.school_id, false, deptName); + + } + showApplyForAddOrgModal = () => { this.applyForAddOrgForm.setVisible(true) } @@ -320,17 +407,19 @@ class AccountBasic extends Component { {...propsWithoutForm} addOrgSuccess={this.addOrgSuccess} > this.applyForAddChildOrgForm = form} > + {...propsWithoutForm} wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form} + addChildOrgSuccess={this.addChildOrgSuccess} + >
基本信息
From d6ff838b0cf6357bcd6a9e32ed8a6daad6c6c453 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 24 Jul 2019 18:57:45 +0800 Subject: [PATCH 17/34] =?UTF-8?q?=E8=AF=B7=E5=85=88=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=AD=A6=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/account/AccountBasicEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 850f74c89..9ebc4da02 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -135,7 +135,7 @@ class AccountBasic extends Component { let {basicInfo}=this.props; if(!err ){ if (!this.state.school_id) { - this.props.showNotification('请先请先选择学校/单位') + this.props.showNotification('请先选择学校/单位') return; } if (!this.state.department_id) { From 7dd4d74b46e1cb89dead481f7302c9dab22a8b5e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 24 Jul 2019 19:00:48 +0800 Subject: [PATCH 18/34] retryAndRefresh --- public/react/src/modules/page/MainContentContainer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index 947aadaa5..829b84b16 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -236,6 +236,9 @@ class MainContentContainer extends Component { // arg_path 点击文件目录树时,传入的点击节点对应的path fetchRepositoryCode( props, arg_path, type, isRetry, retryAndRefresh) { + if (retryAndRefresh) { + this.retryAndRefresh = retryAndRefresh + } const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props; if (shixun.vnc == true) { // vnc模式下不需要加载代码 @@ -294,7 +297,7 @@ class MainContentContainer extends Component { // }) }).then((fetchRepositoryCodeResponse) => { // monaca 需要刷新,不然无法编辑 - if (retryAndRefresh && fetchRepositoryCodeResponse.data.content) { + if (this.retryAndRefresh && fetchRepositoryCodeResponse.data.content) { window.location.reload() return; } From 19e90f6255d61ea7e15a0a9a84f283f30152565a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 24 Jul 2019 20:28:26 +0800 Subject: [PATCH 19/34] =?UTF-8?q?=E8=B4=A6=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=82=B9=E5=87=BB=E4=BF=9D=E5=AD=98=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E6=8F=90=E7=A4=BA=E9=80=89=E6=8B=A9=E5=AD=A6=E6=A0=A1?= =?UTF-8?q?/=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/account/AccountBasicEdit.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 9ebc4da02..9a37f866e 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -70,14 +70,15 @@ class AccountBasic extends Component { job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者", }) }, 100) - //if(basicInfo.nickname){ this.setState({ forDisable: true, nameLength:basicInfo.nickname?basicInfo.nickname.length:0, showRealName:basicInfo.show_realname, realName: basicInfo.name, - identity:basicInfo.identity + identity:basicInfo.identity, + school_id:basicInfo.school_id, + department_id:basicInfo.department_id }) //} } From 01f19b9bcfdcf0e4ac05a1aed0b9fdb7c8b1d1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 20:34:19 +0800 Subject: [PATCH 20/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/user/modal/ApplyForAddOrgModal.js | 353 +++++++++--------- 1 file changed, 177 insertions(+), 176 deletions(-) diff --git a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js index 72ae542c6..afa613f9d 100644 --- a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js +++ b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js @@ -1,176 +1,177 @@ -import React, { Component } from "react"; -import { Modal, Button, Input, Form, } from "antd"; -import axios from 'axios' -import ModalWrapper from "../../courses/common/ModalWrapper" -import { City } from 'educoder' -import '../account/common.css' - -const { TextArea } = Input; -const Search = Input.Search -class ApplyForAddOrgModal extends Component{ - constructor(props){ - super(props); - this.state={ - - } - } - - componentDidUpdate=(prevState)=>{ - if(this.props.schoolName && prevState.schoolName != this.props.schoolName){ - this.props.form.setFieldsValue({ - schoolName:this.props.schoolName - }) - } - } - componentDidMount=()=>{ - if(this.props.schoolName){ - this.props.form.setFieldsValue({ - schoolName:this.props.schoolName - }) - } - } - - setVisible = (visible) => { - this.refs.modalWrapper.setVisible(visible) - } - - onSendOk = () => { - this.props.form.validateFieldsAndScroll((err, values) => { - console.log(values); - if(!err){ - let url=`/add_school_applies.json`; - axios.post(url,{ - name:values.schoolName, - province:values.city && values.city[0], - city:values.city && values.city[1], - address:values.address, - remarks:values.remarks - }).then((result)=>{ - if(result){ - this.props.showNotification("新增学校/单位成功!"); - this.props.addOrgSuccess(values.schoolName) - this.setVisible(false); - } - }).catch((error)=>{ - console.log(error); - }) - } - }) - } - - onOk = () => { - this.onSendOk() - } - - render(){ - const { course_lists, checkBoxValues, searchValue, loading, hasMore } = this.state - const { moduleName } = this.props - const { getFieldDecorator } = this.props.form; - return( - - -
- - {getFieldDecorator('schoolName', { - rules: [{ - // initialValue: this.state.cityDefaultValue, - required: true, - message: '请输入学校或工作单位', - }], - })( - - )} -
-
  • 示例:
  • -
      -
    • - - 国防科学技术大学 -
    • -
    • - - 国防科学技术大学开福校区 -
    • -
    -
    -
    - - - {getFieldDecorator('city', { - rules: [], - })( - - )} - - - - {getFieldDecorator('address', { - rules: [], - })( - - )} - - - - {getFieldDecorator('remarks', { - })( - - )} - - -
    - - -
    - ) - } -} -const WrappedApplyForAddOrgModal = Form.create({ name: 'ApplyForAddOrgModal' })(ApplyForAddOrgModal); - -export default WrappedApplyForAddOrgModal; - - +import React, { Component } from "react"; +import { Modal, Button, Input, Form, } from "antd"; +import axios from 'axios' +import ModalWrapper from "../../courses/common/ModalWrapper" +import { City } from 'educoder' +import '../account/common.css' + +const { TextArea } = Input; +const Search = Input.Search +class ApplyForAddOrgModal extends Component{ + constructor(props){ + super(props); + this.state={ + + } + } + + componentDidUpdate=(prevState)=>{ + if(this.props.schoolName && prevState.schoolName != this.props.schoolName){ + this.props.form.setFieldsValue({ + schoolName:this.props.schoolName + }) + } + } + componentDidMount=()=>{ + if(this.props.schoolName){ + this.props.form.setFieldsValue({ + schoolName:this.props.schoolName + }) + } + } + + setVisible = (visible) => { + this.refs.modalWrapper.setVisible(visible) + } + + onSendOk = () => { + this.props.form.validateFieldsAndScroll((err, values) => { + console.log(values); + if(!err){ + let url=`/add_school_applies.json`; + axios.post(url,{ + name:values.schoolName, + province:values.city && values.city[0], + city:values.city && values.city[1], + address:values.address, + remarks:values.remarks + }).then((result)=>{ + if(result){ + this.props.showNotification("新增学校/单位成功!"); + this.setVisible(false); + this.props.addOrgSuccess(values.schoolName) + + } + }).catch((error)=>{ + console.log(error); + }) + } + }) + } + + onOk = () => { + this.onSendOk() + } + + render(){ + const { course_lists, checkBoxValues, searchValue, loading, hasMore } = this.state + const { moduleName } = this.props + const { getFieldDecorator } = this.props.form; + return( + + +
    + + {getFieldDecorator('schoolName', { + rules: [{ + // initialValue: this.state.cityDefaultValue, + required: true, + message: '请输入学校或工作单位', + }], + })( + + )} +
    +
  • 示例:
  • +
      +
    • + + 国防科学技术大学 +
    • +
    • + + 国防科学技术大学开福校区 +
    • +
    +
    +
    + + + {getFieldDecorator('city', { + rules: [], + })( + + )} + + + + {getFieldDecorator('address', { + rules: [], + })( + + )} + + + + {getFieldDecorator('remarks', { + })( + + )} + + +
    + + +
    + ) + } +} +const WrappedApplyForAddOrgModal = Form.create({ name: 'ApplyForAddOrgModal' })(ApplyForAddOrgModal); + +export default WrappedApplyForAddOrgModal; + + From 92337c947934e0071603db24190d367716bb6bd0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 09:11:54 +0800 Subject: [PATCH 21/34] =?UTF-8?q?user=5Finfo=E4=B8=AD=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=AF=BE=E5=A0=82=E7=9A=84=E7=AC=AC=E4=B8=80=E4=B8=AA=E6=A8=A1?= =?UTF-8?q?=E5=9D=97url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/get_user_info.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index fbb9778e2..164c943d0 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -14,6 +14,7 @@ if @course if params[:group_info] json.group_info @course.teacher_group(@user.id) if @course_identity < Course::STUDENT end + json.first_category_url module_url(@course.none_hidden_course_modules.first, @course) end if params[:school] From 4745a3b2804301403431d168fb98b6991a25ae73 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 25 Jul 2019 10:00:55 +0800 Subject: [PATCH 22/34] 40px --- .../modules/user/account/AccountBasicEdit.js | 6 ++-- .../src/modules/user/account/AccountSecure.js | 6 ++-- .../react/src/modules/user/account/common.css | 30 +++++++++++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 9a37f866e..1755ca365 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -448,9 +448,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 +574,7 @@ class AccountBasic extends Component { {getFieldDecorator('student_No', { @@ -680,6 +679,7 @@ class AccountBasic extends Component { {getFieldDecorator('org2', { rules: [{ diff --git a/public/react/src/modules/user/account/AccountSecure.js b/public/react/src/modules/user/account/AccountSecure.js index 29abf22e4..e5b03e36b 100644 --- a/public/react/src/modules/user/account/AccountSecure.js +++ b/public/react/src/modules/user/account/AccountSecure.js @@ -335,7 +335,7 @@ class AccountSecure extends Component { -
    +
    @@ -398,7 +398,7 @@ class AccountSecure extends Component { { !secondsFlag ? "获取验证码":`重新发送${seconds}s`} -
    +
    @@ -471,7 +471,7 @@ class AccountSecure extends Component { )} -
    +
    diff --git a/public/react/src/modules/user/account/common.css b/public/react/src/modules/user/account/common.css index 113b39e07..908948710 100644 --- a/public/react/src/modules/user/account/common.css +++ b/public/react/src/modules/user/account/common.css @@ -51,3 +51,33 @@ button.ant-btn.ant-btn-primary.grayBtn { .basicForm .ant-form-item-label label { color: #979797 } */ + + +.basicForm .ant-select-show-search { + height: 40px; +} +.basicForm .ant-select-auto-complete.ant-select .ant-input { + height: 40px; +} +.basicForm .ant-select-search__field__mirror { + height: 40px; +} +.basicForm .ant-input-lg { + height: 40px; +} +.basicForm .ant-select-selection--single { + height: 40px; +} +.basicForm .ant-select-auto-complete.ant-select .ant-select-selection--single { + height: 40px +} +.basicForm .ant-input-affix-wrapper { + height: 40px; +} +/* 职业 */ +.basicForm .ant-select-selection-selected-value { + line-height: 38px +} +.basicForm input { + height: 40px; +} \ No newline at end of file From af7c74c2a44e567d66a3d9b7d6d78cf65d31534f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 10:33:39 +0800 Subject: [PATCH 23/34] Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun # Conflicts: # app/controllers/application_controller.rb # public/react/src/AppConfig.js --- .../tasks/GraduationTasksSubmitedit.js | 24 ++++++++++--------- .../tasks/GraduationTasksSubmitnew.js | 13 ++++++---- .../tasks/GraduationTasksappraise.js | 8 ++++++- .../graduation/tasks/GraduationTasksedit.js | 17 +++++++------ .../graduation/tasks/GraduationTasksnew.js | 13 +++++----- .../tasks/GraduationTaskssetting.js | 10 ++++---- .../tasks/GraduationTaskssettinglist.js | 10 +++++--- .../tasks/GraduationTaskssettingquestions.js | 9 +++++-- .../src/modules/courses/new/CoursesNew.js | 17 ++++--------- public/react/src/modules/home/shixunsHome.js | 20 ++++++++-------- .../react/src/modules/paths/ShixunPathCard.js | 2 +- 11 files changed, 80 insertions(+), 63 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 044d0a3ae..fbaa5b7c3 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -78,12 +78,12 @@ class GraduationTasksSubmitedit extends Component{ } setedit=()=>{ - let coursesId=this.props.match.params.coursesId; - let workId=this.props.match.params.work_Id; - let {workslist}=this.state - let task_id=workslist&&workslist.task_id; + // let coursesId=this.props.match.params.coursesId; + // let workId=this.props.match.params.work_Id; + // let {workslist}=this.state + // let task_id=workslist&&workslist.task_id; // window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit"; - window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise"; + this.goback() } @@ -96,11 +96,13 @@ class GraduationTasksSubmitedit extends Component{ } goback=()=>{ - let courseId=this.props.match.params.coursesId; - let work_Id=this.props.match.params.work_Id; - // window.location.href="/courses/"+courseId+"/graduation/graduation_tasks/"+category_id; - window.location.href="/courses/"+courseId+"/graduation_tasks/"+work_Id+"/appraise"; + 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); + } } @@ -568,7 +570,7 @@ class GraduationTasksSubmitedit extends Component{

    {/* {workslist&&workslist.course_name}*/} {/*>*/} - 毕设任务 + 毕设任务 > 任务详情 > @@ -825,7 +827,7 @@ class GraduationTasksSubmitedit extends Component{

    - 取消 + 取消
    {/**/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 50f2a4fde..dddb11e53 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -100,9 +100,12 @@ class GraduationTasksSubmitnew extends Component{ goback=()=>{ let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } - window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; } @@ -438,7 +441,7 @@ class GraduationTasksSubmitnew extends Component{ spinnings:false }) if(response!==undefined){ - this.setedit(response.data.work_id) + this.goback() } // if(response.status===200) { // GraduationTasksnewtype=false; @@ -567,7 +570,7 @@ render(){

    {/* {workslist&&workslist.course_name}*/} {/*>*/} - 毕设任务 + 毕设任务 > 任务详情 > @@ -802,7 +805,7 @@ render(){

    - 取消 + 取消
    {/**/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 971152781..7aa1530af 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -70,7 +70,13 @@ class GraduationTasksappraise extends Component{ // let category_id=this.props.match.params.category_id; // // window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; - window.history.go(-1) + 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); + } + } Cancelvisible=()=>{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 2e9efba0c..2b55e0737 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -81,10 +81,13 @@ class GraduationTasksedit extends Component{ goback=()=>{ - // let courseId=this.props.match.params.coursesId; - // window.location.href="/courses/"+courseId+"/graduation_tasks/"+this.state.data.graduation_id; - // goback = () => { - window.history.go(-1) + + 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); + } } @@ -233,8 +236,8 @@ class GraduationTasksedit extends Component{ // console.log(response) // GraduationTasksedittype=false; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; - // this.goback() - this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); + this.goback() + //this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); } }).catch((error) => { console.log(error) @@ -333,7 +336,7 @@ class GraduationTasksedit extends Component{

    - {this.props.current_user&&this.props.current_user.course_name} + {this.props.current_user&&this.props.current_user.course_name} > 毕设任务 > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index 90f67a984..e27d8382b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -91,7 +91,7 @@ class GraduationTasksnew extends Component { // GraduationTasksnewtype = false; // this.goback(); if(response!==undefined){ - this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting"); + this.goback() } // } }).catch((error) => { @@ -108,9 +108,11 @@ class GraduationTasksnew extends Component { goback = () => { let courseId = this.props.match.params.coursesId; - let category_id = this.props.match.params.category_id; - - window.location.href = "/courses/" + courseId + "/graduation_tasks/" + category_id; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } } @@ -307,8 +309,7 @@ class GraduationTasksnew extends Component {

    - {this.props.current_user && this.props.current_user.course_name} + {this.props.current_user && this.props.current_user.course_name} > 毕设任务 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 983231167..5bbbe1a14 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -761,9 +761,11 @@ class GraduationTaskssettingapp extends Component{ goback=()=>{ let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; - - window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } } isgoback=()=>{ @@ -1046,7 +1048,7 @@ class GraduationTaskssettingapp extends Component{

    - {coursename} + {coursename} > 毕设任务 > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 291095008..d773d8411 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -57,11 +57,15 @@ class GraduationTaskssettinglist extends Component{ let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); } + goback=()=>{ // window.history.back(-1) let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; - window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } } @@ -1058,7 +1062,7 @@ class GraduationTaskssettinglist extends Component{

    - {taskslistdata.course_name} + {taskslistdata.course_name} > {taskslistdata.graduation_name} > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index dee8f0c91..1bf6eb962 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -55,7 +55,12 @@ class GraduationTasksquestions extends Component{ // let courseId=this.props.match.params.coursesId; // let category_id=this.props.match.params.category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; - window.history.go(-1) + 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); + } } end=()=>{ @@ -300,7 +305,7 @@ class GraduationTasksquestions extends Component{

    - {questionslist.course_name} + {questionslist.course_name} > {questionslist.graduation_name} > diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 6e996297b..fce6cd732 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -28,6 +28,7 @@ function disabledDateTime() { }; } + class CoursesNew extends Component { constructor(props) { @@ -191,17 +192,7 @@ class CoursesNew extends Component { ).then((response) => { // debugger if (response.data.status === 0) { - // this.setState({ - // Modalstype: true, - // Modalstopval: response.data.message, - // ModalSave: this.cancelmodel, - // Loadtype: true, - // checkBoxValues: [], - // checkAllValue: false, - // // Realnamecertification : authentication, - // // professional_certification: values.Professionalcertification - // }) - window.location.href = "/courses/" + coursesId+"/students"; + this.goback } }).catch((error) => { console.log(error) @@ -262,7 +253,7 @@ class CoursesNew extends Component { if(this.props.match.params.coursesId===undefined){ this.props.history.push("/courses"); }else{ - this.props.history.push(`/courses/${this.props.match.params.coursesId}`); + this.props.history.push(this.props.current_user.first_category_url); } // window.history.go(-1) } @@ -390,7 +381,7 @@ class CoursesNew extends Component { const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => ); // console.log(this.props.current_user.user_school) // form合并了 - console.log(options) + return ( diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index 92f3c9f44..9c166f43f 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -93,7 +93,7 @@ class ShixunsHome extends Component { const CustomNextArrow = props => { return (

    - +
    ); }; @@ -101,7 +101,7 @@ class ShixunsHome extends Component { const CustomPrevArrow = props => { return (
    - +
    ); }; @@ -374,7 +374,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -388,7 +388,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -402,7 +402,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -418,7 +418,7 @@ class ShixunsHome extends Component { return (
  • - + {item.username}
  • @@ -450,7 +450,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -464,7 +464,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -478,7 +478,7 @@ class ShixunsHome extends Component {
  • - + {item.username}
  • @@ -494,7 +494,7 @@ class ShixunsHome extends Component { return (
  • - + {item.username}
  • diff --git a/public/react/src/modules/paths/ShixunPathCard.js b/public/react/src/modules/paths/ShixunPathCard.js index 9260b9f46..1b0759d1f 100644 --- a/public/react/src/modules/paths/ShixunPathCard.js +++ b/public/react/src/modules/paths/ShixunPathCard.js @@ -38,7 +38,7 @@ class ShixunPathCard extends Component{
    {/*target="_blank"*/} - 13?1543211263 + 13?1543211263

    From 56bfc47444874ef9a74634993d1193ffe98c4dd8 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 25 Jul 2019 10:57:43 +0800 Subject: [PATCH 24/34] 40 --- .../modules/user/account/AccountBasicEdit.js | 5 +++-- .../user/account/AccountCertification.js | 22 ++++++++----------- .../react/src/modules/user/account/common.css | 18 +++++++-------- .../user/modal/ApplyForAddChildOrgModal.js | 4 ++-- .../modules/user/modal/ApplyForAddOrgModal.js | 6 ++--- .../user/modal/RealNameCertificationModal.js | 4 ++-- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 1755ca365..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{ >
    - + 登录 注册 @@ -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/commontwo.css b/public/react/src/modules/user/commontwo.css index d25b888c8..ee43d5834 100644 --- a/public/react/src/modules/user/commontwo.css +++ b/public/react/src/modules/user/commontwo.css @@ -270,4 +270,7 @@ .bth100{ width: 100px; margin: 0 auto; +} +.ysllw100{ + width: 100%; } \ No newline at end of file From f2097f2a11721a2d24a2e7ee3a314850b70947d0 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 25 Jul 2019 11:07:00 +0800 Subject: [PATCH 27/34] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...725024516_modify_attachment_url_for_challenge_answer.rb | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 db/migrate/20190725024516_modify_attachment_url_for_challenge_answer.rb diff --git a/db/migrate/20190725024516_modify_attachment_url_for_challenge_answer.rb b/db/migrate/20190725024516_modify_attachment_url_for_challenge_answer.rb deleted file mode 100644 index 41840bac1..000000000 --- a/db/migrate/20190725024516_modify_attachment_url_for_challenge_answer.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ModifyAttachmentUrlForChallengeAnswer < ActiveRecord::Migration[5.2] - def change - ChallengeChoose.find_each do |cc| - cc.update_column(:subject, cc.subject.gsub("(/attachments/download", "(/api/attachments")) if cc.subject.present? - end - end -end From 11cd50eb7574877ec34df50421fd7d42b5af0eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 11:10:29 +0800 Subject: [PATCH 28/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunHomeworkPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 91639d240..9b053f03b 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -132,7 +132,7 @@ class ShixunHomeworkPage extends Component {

    - this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} + this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} > - this.gotohome()}>返回 + this.gotohome()}>返回 实训详情 From 20e85d513f777ad1e3baa9112d88e44187c77762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 11:18:17 +0800 Subject: [PATCH 29/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Testpapersettinghomepage.js | 20 +++++++++++++++---- .../tasks/GraduationTasksappraise.js | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) 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} > From e57317351d8877329dcbdf1fac3b72f8b1e65263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 11:21:37 +0800 Subject: [PATCH 30/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/poll/PollDetailIndex.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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()}>返回

    From fc9bb34eec4a128df6181e4397573558d03280eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 11:40:00 +0800 Subject: [PATCH 31/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Testpapersettinghomepage.js | 4 ++-- .../react/src/modules/courses/poll/PollNew.js | 20 ++++++++++++------- .../courses/shixunHomework/CommitSummary.js | 20 ++++++++++++------- .../shixunHomework/ShixunHomeworkPage.js | 6 +++--- .../shixunHomework/ShixunWorkReport.js | 19 ++++++++++++------ .../courses/shixunHomework/shixunHomework.js | 8 ++++++++ .../modules/user/LoginRegisterComponent.js | 6 +++--- 7 files changed, 55 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 4868171a1..845caacbc 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -247,9 +247,9 @@ class Testpapersettinghomepage extends Component{

    - this.gotohome()}>{this.props.coursedata.name} + this.gotohome()}>{this.props.coursedata.name} > - 试卷 + 试卷 > 试卷详情

    diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index cf415aa28..0c4109ceb 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2319,7 +2319,14 @@ class PollNew extends Component { } } - + 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 { @@ -2373,19 +2380,18 @@ class PollNew extends Component { /> : ""}

    - {this.props.coursedata.name} + this.gotohome()}>{this.props.coursedata.name} > - 问卷 + 问卷 > {this.props.match.params.news === undefined ? "新建" : this.props.match.params.news === "new" ? "新建" : "编辑"}

    {this.props.match.params.news === undefined ? "新建问卷" : this.props.match.params.news === "new" ? "新建问卷" : "编辑问卷"}

    - 返回 + this.gotohome()} + className=" fr font-16">返回
    {/**/} diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index af8bda0dc..b40cb3536 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -70,7 +70,14 @@ class CommitSummary extends Component{ const mdContnet = this.refs[`md${1}`].getValue().trim(); console.log(mdContnet) } - + 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); + } + } asdasdsad=()=>{ this.setState({ contents:"" @@ -123,20 +130,19 @@ class CommitSummary extends Component{ }} >

    - {data === undefined ? "" :data.course_name===undefined?"": data.course_name} + this.gotohome()}>{data === undefined ? "" :data.course_name===undefined?"": data.course_name} > - {data === undefined ? "" :data.category===undefined?"":data.category.category_name} + {data === undefined ? "" :data.category===undefined?"":data.category.category_name} > - 作业详情 + 作业详情

    {/*educontentbox*/}
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 9b053f03b..e2285a7a6 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -132,11 +132,11 @@ class ShixunHomeworkPage extends Component {

    - this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} + this.gotohome()}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} > - {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name} + href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name} > 作业详情

    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 3c2367942..91f6f3001 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -101,6 +101,14 @@ class ShixunWorkReport extends Component { } } } + 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{data} =this.state; let category_id=data===undefined?"":data.category===null?"":data.category.category_id; @@ -119,16 +127,15 @@ class ShixunWorkReport extends Component { modalsType={this.state.DownloadType} />

    - - + this.gotohome()}> {data&&data.course_name} - + > - + {data===undefined?"":data.category===null?"":data.category.category_name} - + > - 作业详情 + 作业详情 > {data&&data.username}

    diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 504dd9c57..61133acd2 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -875,6 +875,14 @@ class ShixunHomework extends Component{ let data={id:parseInt(datas.category_id),name:name} trigger('editshixunname', data) } + 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 { modalname, diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index ff3eba33d..b27fe8cec 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -46,7 +46,7 @@ class LoginRegisterComponent extends Component { readAgreement: false, getverificationcodes: true, dragOk: false, - Agreetotheterms: false, + Agreetotheterms: true, login: "", password: "", logins: "", @@ -81,7 +81,7 @@ class LoginRegisterComponent extends Component { readAgreement: false, getverificationcodes: true, dragOk: false, - Agreetotheterms: false, + Agreetotheterms: true, login: "", password: "", logins: "", @@ -944,7 +944,7 @@ class LoginRegisterComponent extends Component { } 我已阅读并同意 From 23f61a9c950f677d0794cf8c73657754c3137f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 11:45:22 +0800 Subject: [PATCH 32/34] 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 --- .../src/modules/courses/new/CoursesNew.js | 6 +- .../modules/courses/poll/PollDetailIndex.js | 400 +++++++++--------- .../paths/PathDetail/DetailCardsEditAndAdd.js | 2 +- 3 files changed, 198 insertions(+), 210 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index fce6cd732..c8b090b8b 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -192,7 +192,7 @@ class CoursesNew extends Component { ).then((response) => { // debugger if (response.data.status === 0) { - this.goback + this.goback() } }).catch((error) => { console.log(error) @@ -235,9 +235,7 @@ class CoursesNew extends Component { } ).then((response) => { if (response.status === 200) { - if (response.data.course_id != undefined) { - window.location.href = "/courses/" + response.data.course_id+"/students"; - } + this.goback() } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index cbcdd1533..8e3f78d5c 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -22,179 +22,169 @@ import axios from 'axios' const map={1:"未发布",2:"提交中",3:"已截止",4:"已结束"} class PollDetailIndex extends Component{ - constructor(props){ - super(props); - this.state={ - tab:["0"], - pollDetail:undefined, - user_permission:undefined, - DownloadType:false, - DownloadMessageval:undefined, - } - } - - getPollInfo=()=>{ - console.log(this.props); - let pollId=this.props.match.params.pollId; - let url=`/polls/${pollId}/common_header.json` - axios.get(url).then((result)=>{ - if(result.status==200){ - this.setState({ - pollDetail:result.data, - user_permission:result.data.user_permission - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - - componentDidMount(){ - const query =this.props.location.search; - if(query.indexOf("?")!=-1){ - const type = query.split('?'); - let name = type[1].split("tab="); - name = String(name).split(","); - name = decodeURI(name[1]); - if(name!=undefined && name!="" && name!="undefined"){ - this.setState({ - tab:[name] - }) - } - } - - this.getPollInfo(); - } - - //切换tab - changeTab=(e)=>{ - this.setState({ - tab:e.key - }) - } - - /// 确认是否下载 - confirmysl(url){ - axios.get(url).then((response) => { - if(response.data.status&&response.data.status===-1){ - - }else if(response.data.status&&response.data.status===-2){ - if(response.data.message === "100"){ - // 已超出文件导出的上限数量(100 ),建议: - - this.setState({ - DownloadType:true, - DownloadMessageval:100 - }) - }else { - //因附件资料超过500M - this.setState({ - DownloadType:true, - DownloadMessageval:500 - }) - } - }else { - this.props.showNotification(`正在下载中`); - window.open("/api"+url, '_blank'); - } - }).catch((error) => { - console.log(error) - }); - } - - Downloadcal=()=>{ - this.setState({ - 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); + constructor(props){ + super(props); + this.state={ + tab:["0"], + pollDetail:undefined, + user_permission:undefined, + DownloadType:false, + DownloadMessageval:undefined, } + } + + getPollInfo=()=>{ + console.log(this.props); + let pollId=this.props.match.params.pollId; + let url=`/polls/${pollId}/common_header.json` + axios.get(url).then((result)=>{ + if(result.status==200){ + this.setState({ + pollDetail:result.data, + user_permission:result.data.user_permission + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + + componentDidMount(){ + const query =this.props.location.search; + if(query.indexOf("?")!=-1){ + const type = query.split('?'); + let name = type[1].split("tab="); + name = String(name).split(","); + name = decodeURI(name[1]); + if(name!=undefined && name!="" && name!="undefined"){ + this.setState({ + tab:[name] + }) + } + } + + this.getPollInfo(); + } + + //切换tab + changeTab=(e)=>{ + this.setState({ + tab:e.key + }) + } + + /// 确认是否下载 + confirmysl(url){ + axios.get(url).then((response) => { + if(response.data.status&&response.data.status===-1){ + + }else if(response.data.status&&response.data.status===-2){ + if(response.data.message === "100"){ + // 已超出文件导出的上限数量(100 ),建议: + + this.setState({ + DownloadType:true, + DownloadMessageval:100 + }) + }else { + //因附件资料超过500M + this.setState({ + DownloadType:true, + DownloadMessageval:500 + }) + } + }else { + this.props.showNotification(`正在下载中`); + window.open("/api"+url, '_blank'); + } + }).catch((error) => { + console.log(error) + }); + } + Downloadcal=()=>{ + this.setState({ + DownloadType:false, + DownloadMessageval:undefined + }) } - render(){ - let {tab,pollDetail,user_permission}=this.state; - - const isAdmin =this.props.isAdmin(); - const isStudent = this.props.isStudent(); - return( -
    - -
    -

    - this.goback()}>{this.props.coursedata.name} - > - 问卷 - > - 问卷详情 -

    -

    - {pollDetail && pollDetail.polls_name} - + render(){ + let {tab,pollDetail,user_permission}=this.state; + + const isAdmin =this.props.isAdmin(); + const isStudent = this.props.isStudent(); + return( +

    + +
    +

    + {this.props.coursedata.name} + > + 问卷 + > + 问卷详情 +

    +

    + {pollDetail && pollDetail.polls_name} + - this.goback()}>返回 -

    -
    -
    -
    - - 答题列表 - { - (isAdmin || (isStudent && pollDetail && pollDetail.show_result == 1 && pollDetail.polls_status == 3 && user_permission && user_permission.current_status==1)) && 统计结果 - } - { isAdmin && 问卷预览 } - 设置 - -
    - { - isAdmin && - + this.props.history.goBack()}>返回 +

    +
    +
    +
    + + 答题列表 + { + (isAdmin || (isStudent && pollDetail && pollDetail.show_result == 1 && pollDetail.polls_status == 3 && user_permission && user_permission.current_status==1)) && 统计结果 + } + { isAdmin && 问卷预览 } + 设置 + +
    + { + isAdmin && + 编辑问卷 - {/* 立即发布 */} - { - user_permission && user_permission.poll_unpublish_count > 0 ? -
  • - -
  • - :"" - } - {/* 立即截止、撤销发布 */} - { - user_permission && user_permission.poll_publish_count > 0 ? -
  • - -
  • - :"" - } - {/* { + {/* 立即发布 */} + { + user_permission && user_permission.poll_unpublish_count > 0 ? +
  • + +
  • + :"" + } + {/* 立即截止、撤销发布 */} + { + user_permission && user_permission.poll_publish_count > 0 ? +
  • + +
  • + :"" + } + {/* { user_permission && user_permission.poll_publish_count>0 ?
  • :"" } */} - this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计 + this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计 - } - { - isStudent && - + } + { + isStudent && + { - user_permission && user_permission.current_status!=3 ? - - { user_permission && user_permission.current_status ==0 ? "继续答题" : user_permission.current_status == 1 ? "查看答题" : "开始答题" } - - :"" - } + user_permission && user_permission.current_status!=3 ? + + { user_permission && user_permission.current_status ==0 ? "继续答题" : user_permission.current_status == 1 ? "查看答题" : "开始答题" } + + :"" + } - } - -
  • - - { - // 答题列表 - parseInt(tab[0])==0 && - } - { - // 统计结果 - parseInt(tab[0])==1 && - } - - { - //问卷预览 - parseInt(tab[0])==2 && - } - { - //设置 - parseInt(tab[0])==3 && - } - -
    -
    -
    - ) - } + } + +
    + + { + // 答题列表 + parseInt(tab[0])==0 && + } + { + // 统计结果 + parseInt(tab[0])==1 && + } + + { + //问卷预览 + parseInt(tab[0])==2 && + } + { + //设置 + parseInt(tab[0])==3 && + } + +
    +
    +
    + ) + } } export default PollDetailIndex \ No newline at end of file diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 5534dd415..1c6ee09e6 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -402,7 +402,7 @@ class DetailCardsEditAndAdd extends Component{
    *
    - +
    名称不能为空
    必填项
    From bbad22274c447e5e8d992656216f6a0a8f222364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 11:45:47 +0800 Subject: [PATCH 33/34] 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 --- .../react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 1c6ee09e6..340505655 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -402,7 +402,7 @@ class DetailCardsEditAndAdd extends Component{
    *
    - +
    名称不能为空
    必填项
    From 1aec807d6b368fe701b694f2cd8f0447e7d63530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 11:47:41 +0800 Subject: [PATCH 34/34] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/Testpapersettinghomepage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index a54f5a6e2..31f127af1 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -265,9 +265,9 @@ class Testpapersettinghomepage extends Component{

    - {this.props.coursedata.name} + {this.props.coursedata.name} > - 试卷 + 试卷 > 试卷详情