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

dev_cs
杨树明 5 years ago
commit b83f130c54

@ -253,7 +253,7 @@ class ApplicationController < ActionController::Base
# 测试版前端需求
logger.info("subdomain:#{request.subdomain}")
if request.subdomain == "pre-newweb"
if request.subdomain == "test-newweb"
if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除
User.current = User.find 81403
elsif params[:debug] == 'student'

@ -426,7 +426,7 @@ class CoursesController < ApplicationController
active_student_exist = CourseMember.where(user_id: user[:user_id], role: 4, course_id: @course.id, is_active: 1).any?
is_active = active_student_exist ? 0 : 1
user_id = User.find(user[:user_id]).id
existing_teacher = CourseMember.find_by(course_id: @course.id, user_id: user_id, role: role)
existing_teacher = CourseMember.find_by(course_id: @course.id, user_id: user_id, role: %i[CREATOR PROFESSOR ASSISTANT_PROFESSOR])
if existing_teacher.blank?
teacher_ids << user_id
member = CourseMember.create(course_id: @course.id, graduation_group_id: @graduation_group_id, user_id: user_id, role: role, is_active: is_active)
@ -812,43 +812,37 @@ class CoursesController < ApplicationController
# 搜索添加学生
def add_students_by_search
student_ids = []
ActiveRecord::Base.transaction do
begin
user_ids = params[:user_ids]
course_group_id = params[:course_group_id].to_i
if course_group_id != 0
course_group = CourseGroup.find(course_group_id)
course_group_id = course_group.id
end
user_ids = params[:user_ids]
course_group_id = params[:course_group_id].to_i
if course_group_id != 0
course_group = CourseGroup.find(course_group_id)
course_group_id = course_group.id
end
student_ids = []
user_ids.each do |user_id|
existing_course_member = @course.course_members.find_by(user_id: user_id.to_i)
new_student = CourseMember.new(user_id: user_id.to_i, course_id: @course.id, course_group_id: course_group_id, role: 4)
user_ids.each do |user_id|
existing_course_member = @course.course_members.find_by(user_id: user_id.to_i)
new_student = CourseMember.new(user_id: user_id.to_i, course_id: @course.id, course_group_id: course_group_id, role: 4)
if existing_course_member.present?
if existing_course_member.STUDENT?
existing_course_member.update_attributes(course_group_id: course_group_id)
else
new_student.is_active = 0 if existing_course_member.is_active
new_student.save!
student_ids << user_id
end
if existing_course_member.present?
if existing_course_member.STUDENT?
existing_course_member.update_attributes(course_group_id: course_group_id)
else
new_student.is_active = 0 if existing_course_member.is_active
new_student.save!
student_ids << user_id
end
else
new_student.save!
student_ids << user_id
end
CourseAddStudentCreateWorksJob.perform_later(@course.id, student_ids) if student_ids.present?
TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, 10, student_ids) if student_ids.present?
normal_status(0, "添加成功")
rescue => e
uid_logger(e.message)
tip_exception("添加失败")
raise ActiveRecord::Rollback
end
end
CourseAddStudentCreateWorksJob.perform_later(@course.id, student_ids) if student_ids.present?
TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, 10, student_ids) if student_ids.present?
normal_status(0, "添加成功")
end
# 获取历史课堂,即用户管理的所有课堂以及课堂下的分班(去除当前课堂)

@ -326,7 +326,7 @@ class GraduationTasksController < ApplicationController
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
@course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
ActiveRecord::Base.transaction do
# ActiveRecord::Base.transaction do
begin
tasks = @course.graduation_tasks.where(id: params[:task_ids], status: 0).
where("publish_time is null or publish_time > '#{Time.now}'")
@ -350,7 +350,7 @@ class GraduationTasksController < ApplicationController
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end
# end
end
def end_task

@ -927,18 +927,10 @@ class HomeworkCommonsController < ApplicationController
unless params[:category_id].blank?
@category = @course.course_second_categories.find_by(id: params[:category_id], category_type: "shixun_homework")
end
ActiveRecord::Base.transaction do
begin
shixuns.each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, @category, current_user
@homework_ids << homework.id
CreateStudentWorkJob.perform_later(homework.id)
end
rescue Exception => e
uid_logger(e.message)
tip_exception("创建失败")
raise ActiveRecord::Rollback
end
shixuns.each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, @category, current_user
@homework_ids << homework.id
CreateStudentWorkJob.perform_later(homework.id)
end
end
@ -1019,29 +1011,21 @@ class HomeworkCommonsController < ApplicationController
none_shixun_ids = ShixunSchool.where("school_id != #{current_user.school_id}").pluck(:shixun_id)
course_module = @course.course_modules.find_by(module_type: "shixun_homework")
ActiveRecord::Base.transaction do
begin
subjects.each do |subject|
subjects.each do |subject|
subject.stages.each do |stage|
subject.stages.each do |stage|
# 为实训作业创建与stage同名的子目录
category = CourseSecondCategory.find_by(name: stage.name, course_id: @course.id, category_type: "shixun_homework") ||
CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework",
course_module_id: course_module.id, position: course_module.course_second_categories.count + 1)
# 为实训作业创建与stage同名的子目录
category = CourseSecondCategory.find_by(name: stage.name, course_id: @course.id, category_type: "shixun_homework") ||
CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework",
course_module_id: course_module.id, position: course_module.course_second_categories.count + 1)
# 去掉不对当前用户的单位公开的实训,已发布的实训
stage.shixuns.where.not(shixuns: {id: none_shixun_ids}).unhidden.each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
@homework_ids << homework.id
CreateStudentWorkJob.perform_later(homework.id)
end
end
# 去掉不对当前用户的单位公开的实训,已发布的实训
stage.shixuns.where.not(shixuns: {id: none_shixun_ids}).unhidden.each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
@homework_ids << homework.id
CreateStudentWorkJob.perform_later(homework.id)
end
rescue Exception => e
uid_logger(e.message)
tip_exception("创建失败")
raise ActiveRecord::Rollback
end
end
end
@ -1070,7 +1054,7 @@ class HomeworkCommonsController < ApplicationController
charge_group_ids = @course.charge_group_ids(current_user)
publish_groups = charge_group_ids & params[:group_ids] if params[:group_ids]
ActiveRecord::Base.transaction do
# ActiveRecord::Base.transaction do
begin
homeworks.each do |homework|
# 作业未发布时
@ -1141,7 +1125,7 @@ class HomeworkCommonsController < ApplicationController
tip_exception("发布失败")
raise ActiveRecord::Rollback
end
end
# end
end
def end_groups
@ -1170,9 +1154,9 @@ class HomeworkCommonsController < ApplicationController
charge_group_ids = @course.charge_group_ids(current_user)
end_groups = charge_group_ids & params[:group_ids] if params[:group_ids]
ActiveRecord::Base.transaction do
begin
homeworks.each do |homework|
begin
homeworks.each do |homework|
ActiveRecord::Base.transaction do
homework_detail_manual = homework.homework_detail_manual
# 分组设置
@ -1187,7 +1171,7 @@ class HomeworkCommonsController < ApplicationController
none_end_settings.update_all(end_time: time)
student_works = homework.student_works.where(user_id: course_students.where(course_group_id: none_end_settings.
pluck(:course_group_id)).pluck(:user_id)).has_committed if homework.homework_type == "practice"
pluck(:course_group_id)).pluck(:user_id)).has_committed if homework.homework_type == "practice"
homework.end_time = homework.max_group_end_time
if homework.end_time > time && homework_detail_manual.try(:comment_status) > 1
@ -1210,40 +1194,40 @@ class HomeworkCommonsController < ApplicationController
student_works.joins(:myshixun).where("myshixuns.status != 1").update_all(late_penalty: homework.late_penalty) if homework.allow_late
=begin
student_works.where("work_status != 0").includes(:myshixun).each do |student_work|
unless student_work.myshixun.is_complete?
student_work.update_attributes(work_status: 2, late_penalty: homework.late_penalty)
student_work.late_penalty = homework.late_penalty
end
HomeworksService.new.set_shixun_final_score student_work, student_work.myshixun, homework_detail_manual.answer_open_evaluation,
homework_challenge_settings
student_works.where("work_status != 0").includes(:myshixun).each do |student_work|
unless student_work.myshixun.is_complete?
student_work.update_attributes(work_status: 2, late_penalty: homework.late_penalty)
student_work.late_penalty = homework.late_penalty
end
HomeworksService.new.set_shixun_final_score student_work, student_work.myshixun, homework_detail_manual.answer_open_evaluation,
homework_challenge_settings
end
student_works.where("work_status = 0").each do |student_work|
myshixun = Myshixun.where(shixun_id: shixun.id, user_id: student_work.user_id).first
if myshixun.present?
student_work.update_attributes(work_status: (myshixun.is_complete? ? 1 : 2),
late_penalty: myshixun.is_complete? ? 0 : homework.late_penalty,
commit_time: myshixun.created_at, myshixun_id: myshixun.id)
student_work.late_penalty = myshixun.is_complete? ? 0 : homework.late_penalty
HomeworksService.new.set_shixun_final_score student_work, myshixun, homework_detail_manual.answer_open_evaluation,
homework_challenge_settings
end
student_works.where("work_status = 0").each do |student_work|
myshixun = Myshixun.where(shixun_id: shixun.id, user_id: student_work.user_id).first
if myshixun.present?
student_work.update_attributes(work_status: (myshixun.is_complete? ? 1 : 2),
late_penalty: myshixun.is_complete? ? 0 : homework.late_penalty,
commit_time: myshixun.created_at, myshixun_id: myshixun.id)
student_work.late_penalty = myshixun.is_complete? ? 0 : homework.late_penalty
HomeworksService.new.set_shixun_final_score student_work, myshixun, homework_detail_manual.answer_open_evaluation,
homework_challenge_settings
end
end
=end
# 更新所有学生的效率分(重新取homework确保是更新后的)
HomeworkEndUpdateScoreJob.perform_later(homework.id) if !homework.allow_late && homework.end_time <= time
end
end
homework.save!
end
normal_status(0, "更新成功")
rescue Exception => e
uid_logger(e.message)
tip_exception("操作失败")
raise ActiveRecord::Rollback
HomeworkEndUpdateScoreJob.perform_later(homework.id) if !homework.allow_late && homework.end_time <= time
end
normal_status(0, "更新成功")
rescue Exception => e
uid_logger(e.message)
tip_exception("操作失败")
raise ActiveRecord::Rollback
end
end

@ -203,26 +203,24 @@ class SubjectsController < ApplicationController
stages = @subject.stages.where(id: @subject.stage_shixuns.where(shixun_id: params[:shixun_ids]).pluck(:stage_id))
course_module = @course.course_modules.where(module_type: "shixun_homework").first
homework_ids = []
ActiveRecord::Base.transaction do
begin
# 将实训课程下的所有已发布实训按顺序发送到课堂,同时创建与章节同名的实训作业目录
stages.each do |stage|
category = CourseSecondCategory.where(name: stage.name, course_id: @course.id, category_type: "shixun_homework").first ||
CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework",
course_module_id: course_module.id, position: course_module.course_second_categories.count + 1)
stage.shixuns.where(id: params[:shixun_ids], status: 2).each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
CreateStudentWorkJob.perform_later(homework.id)
end
# 将实训课程下的所有已发布实训按顺序发送到课堂,同时创建与章节同名的实训作业目录
stages.each do |stage|
category = CourseSecondCategory.where(name: stage.name, course_id: @course.id, category_type: "shixun_homework").first ||
CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework",
course_module_id: course_module.id, position: course_module.course_second_categories.count + 1)
stage.shixuns.where(id: params[:shixun_ids], status: 2).each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
homework_ids << homework.id
end
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end
homework_ids.each do |homework_id|
CreateStudentWorkJob.perform_later(homework_id)
end
end
def publish

@ -82,6 +82,7 @@ class Course < ApplicationRecord
scope :ended, ->(is_end = true) { where(is_end: is_end) }
scope :processing, -> { where(is_end: false) }
scope :not_deleted, -> { where(is_delete: 0) }
scope :not_excellent, -> { where(excellent: 0) }
scope :deleted, ->(is_delete = 1) { where(is_delete: is_delete) }
scope :by_user, ->(user) { joins(:course_members).where('course_members.user_id = ?', user.id).order(updated_at: :desc) }
scope :by_keywords, lambda { |keywords|
@ -356,7 +357,7 @@ class Course < ApplicationRecord
def my_subject_progress
my_challenge_count = Game.joins(:challenge).where(user_id: User.current.id, status: 2, challenges: {shixun_id: shixuns.published_closed}).
pluck(:challenge_id).uniq.size
course_challeng_count = course.shixuns.pluck(:challenges_count).sum
course_challeng_count = shixuns.pluck(:challenges_count).sum
count = course_challeng_count == 0 ? 0 : ((my_challenge_count.to_f / course_challeng_count).round(2) * 100).to_i
end

@ -11,7 +11,7 @@ class Users::CourseService
end
def call
courses = category_scope_courses.not_deleted
courses = category_scope_courses.not_deleted.not_excellent
courses = status_filter(courses)

@ -8,4 +8,4 @@ json.start_learning @start_learning
json.learned @start_learning ? @course.my_subject_progress : 0
json.last_shixun @start_learning ? last_subject_shixun(@user.id, @subject) : ""
json.last_shixun @start_learning ? last_subject_shixun(@user.id, @course) : ""

@ -0,0 +1,18 @@
class MigrateShixunStudentWork < ActiveRecord::Migration[5.2]
def change
homework_commons = HomeworkCommon.where(homework_type: 4).where("created_at > '2019-07-01 00:00:00'")
attrs = %i[homework_common_id user_id created_at updated_at]
StudentWork.bulk_insert(*attrs) do |worker|
homework_commons.each do |homework|
course = homework.course
if course && homework.student_works.count != course.students.count
course.students.each do |student|
next if StudentWork.where(homework_common_id: homework.id, user_id: student.user_id).any?
same_attrs = {user_id: student.user_id}
worker.add same_attrs.merge(homework_common_id: homework.id)
end
end
end
end
end
end

@ -305,7 +305,7 @@ module.exports = {
warnings: false,
compress: {
drop_debugger: true,
drop_console: true
// drop_console: true
}
}
}),

@ -45,6 +45,7 @@ export function initAxiosInterceptors(props) {
proxy="http://47.96.87.25:48080"
// wy
proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net"
// wy
// proxy="http://192.168.2.63:3001"

@ -527,14 +527,14 @@ class CoursesIndex extends Component{
></Route>
{/* 新建作品 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/works/new"
<Route path="/courses/:coursesId/graduation_tasks/:category_id/works/:task_Id/new"
render={
(props) => (<GraduationTasksSubmitnewApp {...this.props} {...props} {...this.state} {...common}/>)
}
></Route>
{/* 修改作品 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:work_Id/works/edit"
<Route path="/courses/:coursesId/graduation_tasks/:category_id/works/:work_Id/edit"
render={
(props) => (<GraduationTasksSubmiteditApp {...this.props} {...props} {...this.state} {...common}/>)
}

@ -131,7 +131,6 @@ class CommonWorkPost extends Component{
let coursesId=this.props.match.params.coursesId;
window.location.href="courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
// window.location.href="/courses/"+coursesId+"/graduation/graduation_tasks/"+workId+"/"+workId+"/works/edit";
}
handleSubmit=(e) => {

@ -302,7 +302,7 @@ class GraduateTaskItem extends Component{
{item==="提交作品"?
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.taskid+"/works/new"}>提交作品</a>
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>提交作品</a>
</WordsBtn>
:""}
@ -310,7 +310,7 @@ class GraduateTaskItem extends Component{
{item==="补交作品"?
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.taskid+"/works/new"}>补交作品</a>
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>补交作品</a>
</WordsBtn>
:""}
@ -318,7 +318,7 @@ class GraduateTaskItem extends Component{
{item==="修改作品"?
<WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.workid+"/works/edit"}>修改作品</a>
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.workid+"/edit"}>修改作品</a>
</WordsBtn>
:""}

@ -168,8 +168,29 @@ class GraduationTaskDetail extends Component{
typs:"end",
})
}
coursetaskend=()=>{
const coursesId = this.props.match.params.coursesId;
const task_Id = this.props.match.params.task_Id;
let url = `/courses/${coursesId}/graduation_tasks/end_task.json`;
axios.post(url,{
task_ids:[task_Id],
group_ids: this.state.course_groupslist,
}).then((response)=>{
if (response.data.status == 0) {
this.props.showNotification(response.data.message);
this.cancelmodel();
this.getdatas();
this.child && this.child.reInit();
}
}).catch((error)=>{
})
}
// 取消
cancelmodel=()=>{
debugger
this.setState({
Modalstype:false,
Loadtype:false,
@ -255,6 +276,7 @@ class GraduationTaskDetail extends Component{
avisible:false
})
}
bindRef = ref => { this.child = ref } ;
render(){
@ -391,21 +413,21 @@ class GraduationTaskDetail extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{
return(
<span key={key}>
{item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
{item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+questionslist.work_id+"/works/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+questionslist.work_id+"/works/edit"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'} target="_blank">创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
{item==="补交附件"?<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>:""}
<span key={key} className="fr mt20">
{item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
{item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a>:""}
{item==="补交附件"?<a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a>:""}
</span>
)
@ -428,13 +450,13 @@ class GraduationTaskDetail extends Component{
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting"
render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} tab={`setting`}/>)
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`setting`}/>)
}
></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions"
render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} tab={`questions`}/>)
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`questions`}/>)
}></Route>
</Switch>

@ -496,7 +496,8 @@ class GraduationTasksSubmitedit extends Component{
Modalstype,Modalstopval,ModalCancel,ModalSave,memberslist,task_status,selectmemberslist,shixunsreplace} =this.state;
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let task_Id=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id;
let work_Id=this.props.match.params.work_Id
const uploadProps = {
width: 600,
@ -570,7 +571,7 @@ class GraduationTasksSubmitedit extends Component{
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+work_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/graduation_tasks/${workslist && workslist.graduation_id}/detail/${workslist && workslist.task_id}/list`} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}
@ -580,7 +581,7 @@ class GraduationTasksSubmitedit extends Component{
</p>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{workslist&&workslist.task_name}</p>
<p className=" fl color-black mt25 summaryname">{ workslist && workslist.task_name }</p>
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div>
@ -768,7 +769,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"fl ml5 fonthidden width100"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
})}

@ -81,7 +81,6 @@ class GraduationTasksSubmitnew extends Component{
let coursesId=this.props.match.params.coursesId;
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
// window.location.href="/courses/"+coursesId+"/graduation/graduation_tasks/"+task_Id+"/"+workId+"/works/edit";
}
handleSubmit=(e) => {

@ -83,6 +83,10 @@ class GraduationTaskssettingapp extends Component{
}
}
reInit=()=>{
this.getsettings();
}
getsettings=()=>{
let task_Id=this.props.match.params.task_Id;
@ -155,7 +159,11 @@ class GraduationTaskssettingapp extends Component{
let tab = this.props.tab;
this.props.setTab && this.props.setTab(tab);
try{
this.props.triggerRef(this)
}catch(e){
}
}
@ -846,6 +854,8 @@ class GraduationTaskssettingapp extends Component{
}
/// 确认是否下载
confirmysl(url){
debugger;
console.log(3);
axios.get(url + '?export=true' ).then((response) => {
if(response === undefined){
return

@ -81,6 +81,15 @@ class GraduationTaskssettinglist extends Component{
this.props.history.replace(`/courses/${this.state.taskslistdata.course_id}/graduation_tasks/${this.state.taskslistdata.graduation_id}`);
}
reInit=()=>{
this.setState({
course_groupslist:[],
checkAllValue:false
})
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);
}
seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{
let{page,limit}=this.state;
// console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search)
@ -97,7 +106,7 @@ class GraduationTaskssettinglist extends Component{
order:order===null?undefined:order,
b_order:b_order===null?undefined:b_order,
search:search===null?undefined:search,
page:pages===null?undefined:pages,
page:pages===null?undefined:page,
limit:20,
},
paramsSerializer: function(params) {
@ -646,6 +655,8 @@ class GraduationTaskssettinglist extends Component{
/// 确认是否下载
confirmysl(url){
debugger;
console.log(1);
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
let params ={

@ -35,8 +35,18 @@ class GraduationTasksquestions extends Component{
let tab = this.props.tab;
this.props.setTab && this.props.setTab(tab);
this.getdatas()
this.getdatas();
try{
this.props.triggerRef(this)
}catch(e){
}
}
reInit=()=>{
this.getdatas();
}
getdatas=()=>{
const task_Id = this.props.match.params.task_Id;
let url="/graduation_tasks/"+task_Id+".json";
@ -46,7 +56,6 @@ class GraduationTasksquestions extends Component{
this.setState({
questionslist:result.data
})
}
}).catch((error)=>{
console.log(error)
@ -204,6 +213,8 @@ class GraduationTasksquestions extends Component{
/// 确认是否下载
confirmysl(url){
debugger;
console.log(2);
axios.get(url + '?export=true').then((response) => {
if(response === undefined){
return
@ -299,82 +310,6 @@ class GraduationTasksquestions extends Component{
/>
{questionslist&&questionslist?<div className="newMain clearfix">
<div className={"educontent mb20"}>
{/* <p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+questionslist.graduation_id} className="color-grey-9 fl">{questionslist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-6">任务详情</span>
</p>
<div className="clearfix mt20 mb20 lineh-25 linbox">
<p className=" fl color-black summaryname">
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-3">{questionslist.task_name}</Link>
</p>
<CoursesListType
typelist={questionslist.task_status}
/>
<a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
</div> */}
{/* <div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20"> */}
{/* <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}></Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link> */}
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>:""}*/}
{/* <style>
{ `
.drop_down_menu{
height: 118px;
left:0px;
width: 121px;
}
.drop_down_menu li {
overflow: visible;
width: 121px;
}
.drop_down_menu li a{
padding: 0px;
font-size: 14px;
}
.mt19{
margin-top:19px;
}
.drop_down_menu, .drop_down_normal{
padding-top: 10px;
padding-bottom: 8px;
}
.drop_down_menu li .color-dark{
color: #666 !important;
}
`}
</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""} */}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{/* {this.props.isAdmin()?questionslist.status===1? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }></a>:"":""}
{this.props.isAdmin()?questionslist.status===0? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a>:"":""}
{this.props.isAdmin()?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>:""}
</div>
</div> */}
<div className="justify break_full_word new_li markdown-body edu-back-white"
id="challenge_editorMd_description">
<p id="ReactMarkdown">
@ -390,22 +325,6 @@ class GraduationTasksquestions extends Component{
}
<div>
{/*{questionslist&&questionslist.attachments.map((item,key)=>{*/}
{/*return(*/}
{/*<div className="color-grey mt5">*/}
{/*<a className="color-grey">*/}
{/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
{/*</a>*/}
{/*<a href={item.url}*/}
{/*className="mr12" length="58">*/}
{/*{item.title}*/}
{/*</a>*/}
{/*<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>*/}
{/*</div>*/}
{/*)*/}
{/*})}*/}
<AttachmentList {...this.props} {...this.state} attachments={questionslist&&questionslist.attachments}></AttachmentList>
</div>

@ -215,10 +215,10 @@ class AddStudentModal extends Component{
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'学号'}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{''}</label></span>
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>{'姓名'}</span>
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>{'学号'}</span>
<span className="fl task-hide with35" style={{"maxWidth":"208px;"}}>{'单位'}</span>
<span className="fl task-hide with10" style={{"maxWidth":"48px;"}}>{''}</span>
</p>
<Spin size="large" spinning={isSpin}>
@ -239,24 +239,21 @@ class AddStudentModal extends Component{
return (
<p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} key={candidate.id} disabled={candidate.added}></Checkbox>
<span className="fl with25">
<span className="fl task-hide with25 ml5" style={{"maxWidth":"208px;"}}>
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>
{ candidate.name ?
<a href={`/users/${candidate.login}`} target="_blank" style={{"maxWidth":"208px;"}}>
<a href={`/users/${candidate.login}`} target="_blank">
{ candidate.name }
</a> : <span> </span> }
</label>
</ConditionToolTip>
</span>
<span className="fl with25">
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>
<ConditionToolTip title={candidate.student_id} condition={candidate.student_id && candidate.student_id.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.student_id || ' '}</label>
{candidate.student_id || ' '}
</ConditionToolTip>
</span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl"
style={{"maxWidth":"48px", color: theme.foreground_select }}>{candidate.added ? '已加入' : ''}</label></span>
<span className="fl task-hide with35" style={{"maxWidth":"208px;"}}>{candidate.school_name}</span>
<span className="fl task-hide with10" style={{"maxWidth":"48px", color: theme.foreground_select }}>{candidate.added ? '已加入' : ''}</span>
</p>
)

@ -109,6 +109,11 @@ class AddTeacherModal extends Component{
checkBoxValues: []
})
}
this.setState({
name:undefined,
graduationGroup:undefined,
courseGroup:undefined
})
}
onSendOk = () => {
@ -259,10 +264,10 @@ class AddTeacherModal extends Component{
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'昵称'}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>{'姓名'}</span>
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>{'昵称'}</span>
<span className="fl task-hide with35" style={{"maxWidth":"208px;"}}>{'单位'}</span>
<span className="fl task-hide with10" style={{"maxWidth":"48px"}}>{''}</span>
</p>
{ loading || candidates.length ? <div>
@ -281,26 +286,22 @@ class AddTeacherModal extends Component{
{ candidates && candidates.map( candidate => {
return (
<p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} key={candidate.id}></Checkbox>
<span className="fl with25">
<Checkbox className="fl" value={candidate.id} key={candidate.id} disabled={candidate.added}></Checkbox>
<span className="fl task-hide with25 ml5" style={{"maxWidth":"208px;"}}>
{/* "color":"#4c4c4c" */}
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}
>
<a href={`/users/${candidate.login}`} target="_blank"
style={{}}
>{candidate.name}</a>
</label>
<a href={`/users/${candidate.login}`} target="_blank"
style={{}}
>{candidate.name}</a>
</ConditionToolTip>
</span>
<span className="fl with25">
<span className="fl task-hide with25" style={{"maxWidth":"208px;"}}>
<ConditionToolTip title={candidate.nickname} condition={candidate.nickname && candidate.nickname.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname || ' '}</label>
{candidate.nickname || ' '}
</ConditionToolTip>
</span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{candidate.added ? '已加入' : ''}</label></span>
<span className="fl task-hide with35" style={{"maxWidth":"208px;"}}>{candidate.school_name}</span>
<span className="fl task-hide with10 color-blue" style={{"maxWidth":"48px;"}}>{candidate.added ? '已加入' : ''}</span>
</p>
)
}) }

@ -7,7 +7,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText'
import { WordsBtn, trigger, on, off, getUrl, downloadFile } from 'educoder'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
import Modals from "../../modals/Modals";
import axios from 'axios'
import _ from 'lodash'
@ -17,8 +17,9 @@ import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
const Search =Input.Search;
const buildColumns = (that) => {
const { course_groups } = that.state
const buildColumns = (that,isParent) => {
const { course_groups , sortedInfo } = that.state
let showSorter = isParent==true
const columns=[{
title: '序号',
dataIndex: 'id',
@ -59,6 +60,9 @@ const buildColumns = (that) => {
align:'center',
width:"10%",
className:"color-grey-6",
sorter: true,
sortDirections: sortDirections,
sortOrder: sortedInfo.columnKey === 'student_id' && sortedInfo.order,
render: (student_id, record) => {
return <span className="color-dark overflowHidden1 " title={student_id && student_id.length > 10 ? student_id : ''}
style={{maxWidth: '160px'}} >{student_id}</span>
@ -71,7 +75,10 @@ const buildColumns = (that) => {
key: 'course_group_name',
align:'center',
width:"40%",
className:"color-grey-6"
className:"color-grey-6",
sorter:showSorter,
sortDirections: sortDirections,
sortOrder: sortedInfo.columnKey === 'course_group_name' && sortedInfo.order,
})
}
const isAdminOrStudent = that.props.isAdminOrStudent()
@ -124,6 +131,7 @@ class studentsList extends Component{
isSpin:false,
DownloadType:false,
DownloadMessageval:undefined,
sortedInfo: {order:'ascend',columnKey: 'student_id'}
}
}
/// 确认是否下载
@ -319,8 +327,19 @@ class studentsList extends Component{
this.setState({ page: argPage })
}
let page = argPage || this.state.page
let { order, searchValue }=this.state
let url=`/courses/${id}/students.json?order=${order}&page=${page}&limit=20&course_group_id=${course_group_id}`;
let { searchValue , sortedInfo }=this.state
let order = 1;
if (sortedInfo.columnKey == 'student_id') {
order = 1;
} else if (sortedInfo.columnKey == 'course_group_name') {
order = 2;
}
let sort = 'desc';
if (sortedInfo.order == 'ascend') {
sort = 'asc'
}
let url=`/courses/${id}/students.json?order=${order}&sort=${sort}&page=${page}&limit=20&course_group_id=${course_group_id}`;
if(!!searchValue){
url+='&search='+searchValue;
}
@ -494,6 +513,15 @@ class studentsList extends Component{
this.props.showNotification('复制成功')
}
onTableChange = (pagination, filters, sorter) =>{
this.setState({
sortedInfo: sorter,
}, () => {
this.fetchAll();
});
}
render(){
const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin()
@ -653,7 +681,7 @@ class studentsList extends Component{
{isAdmin && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>}
<div className="studentList_operation_ul">
{isAdmin && <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>}
{isAdmin && <li className="li_line drop_down">
{isAdmin && <li className="drop_down">
移动到...<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset", minWidth: '160px', maxHeight: '324px', overflowY: 'auto'}}>
{
@ -687,7 +715,7 @@ class studentsList extends Component{
</ul>
</li>}
<li className="drop_down">
{/* <li className="drop_down">
{currentOrderName}
{ course_groups && !!course_groups.length &&
<React.Fragment>
@ -698,13 +726,13 @@ class studentsList extends Component{
</ul>
</React.Fragment>
}
</li>
</li> */}
</div>
</div>
<Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table">
{!this.state.isSpin && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={buildColumns(this)} dataSource={students} pagination={false}></Table>
<Table columns={buildColumns(this,isParent)} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> }
</div>
</Spin>

@ -48,7 +48,7 @@ function startechart(data){
xAxis: [
{
type : 'value',
name: '学生排名',
name: '学生效率位置',
scale:true,
axisLabel : {
formatter: ' ',

@ -1,172 +1,172 @@
.winput-300-35{
width: 300px;
height: 35px;
padding: 5px;
box-sizing: border-box;
}
.library_nav li {
float: left;
cursor: pointer;
margin-right: 30px;
position: relative;
color: #05101A;
height: 40px;
line-height: 20px;
font-size: 16px;
}
.library_nav li.active a, .library_nav li:hover a{
color: #4cacff!important;
}
.library_list {
margin-bottom: 30px;
}
.library_list_item:hover {
box-shadow: 0px 4px 8px rgba(158,158,158,0.16);
}
.library_list_item {
background: #fff;
padding: 20px 30px;
margin-bottom: 30px;
display: flex;
}
.library_list_item .library_l_name {
max-width: 600px;
float: left;
}
.edu-activity-red {
background-color: #FC2B6A;
color: #fff!important;
cursor: pointer;
border: 1px solid #FC2B6A;
line-height: 17px;
}
.edu-activity-green {
background-color: green;
color: #fff!important;
cursor: pointer;
border: 1px solid green;
line-height: 17px;
}
.edu-activity-orange {
background-color: #ff6800;
color: #fff!important;
cursor: pointer;
border: 1px solid #ff6800;
line-height: 17px;
}
.edu-activity-blue {
background-color: #4CACFF;
color: #fff!important;
cursor: pointer;
border: 1px solid #4CACFF;
line-height: 17px;
}
.edu-activity-orange-sub {
background-color: #FF781B;
color: #fff!important;
cursor: pointer;
border: 1px solid #ff6800;
line-height: 17px;
}
.pointsBtn {
width: 70px;
height: 70px;
background-color: #4cacff;
border-radius: 50%;
color: #fff;
text-align: center;
margin: 0 auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 2px 0;
cursor: pointer;
line-height: 22px;
padding-top: 12px;
}
.pointedBtn{
background: #BCD1E3;
cursor: default
}
.pointsBtn span{
display: block;
}
.upload_Title {
position: relative;
margin-right: 20px;
float: left;
line-height: 35px;
font-size: 16px;
width: 56px;
color:rgba(0, 0, 0, 0.85);
text-align: center
}
.upload_Title.must:before {
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
.upload_Title:after{
content: ':';
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
}
.libraries_tab li {
width: 120px;
height: 35px;
line-height: 33px;
border-radius: 18px;
border: 1px solid #4C98FF;
color: #4C98FF;
cursor: pointer;
margin-right: 30px;
float: left;
text-align: center;
}
.libraries_tab li.active {
background: #4C98FF;
color: #fff;
}
.librariesField .ant-upload{
width: 100%;
background: #F2F9FF;
justify-content: center;
align-items: center;
display: -webkit-flex;
text-align: center;
height: 120px!important;
border-radius: 4px;
border: 1px dashed #4cacff!important;
display: block;
cursor: pointer;
}
.librariesField .ant-upload.ant-upload-drag{
border:none!important;
}
.uploadImage .ant-upload.ant-upload-select-picture-card{
width:120px;
height: 90px;
}
.uploadImage .ant-upload.ant-upload-select-picture-card > .ant-upload{
padding:0px!important;
}
.successPage {
justify-content: center;
align-items: center;
display: -webkit-flex;
height: 570px;
text-align: center;
margin-bottom: 50px;
}
.changebtn {
width:166px;
font-size: 16px;
height: 45px;
line-height: 45px;
.winput-300-35{
width: 300px;
height: 35px;
padding: 5px;
box-sizing: border-box;
}
.library_nav li {
float: left;
cursor: pointer;
margin-right: 30px;
position: relative;
color: #05101A;
height: 40px;
line-height: 20px;
font-size: 16px;
}
.library_nav li.active a, .library_nav li:hover a{
color: #4cacff!important;
}
.library_list {
margin-bottom: 30px;
}
.library_list_item:hover {
box-shadow: 0px 4px 8px rgba(158,158,158,0.16);
}
.library_list_item {
background: #fff;
padding: 20px 30px;
margin-bottom: 30px;
display: flex;
}
.library_list_item .library_l_name {
max-width: 600px;
float: left;
}
.edu-activity-red {
background-color: #FC2B6A;
color: #fff!important;
cursor: pointer;
border: 1px solid #FC2B6A;
line-height: 17px;
}
.edu-activity-green {
background-color: green;
color: #fff!important;
cursor: pointer;
border: 1px solid green;
line-height: 17px;
}
.edu-activity-orange {
background-color: #ff6800;
color: #fff!important;
cursor: pointer;
border: 1px solid #ff6800;
line-height: 17px;
}
.edu-activity-blue {
background-color: #4CACFF;
color: #fff!important;
cursor: pointer;
border: 1px solid #4CACFF;
line-height: 17px;
}
.edu-activity-orange-sub {
background-color: #FF781B;
color: #fff!important;
cursor: pointer;
border: 1px solid #ff6800;
line-height: 17px;
}
.pointsBtn {
width: 70px;
height: 70px;
background-color: #4cacff;
border-radius: 50%;
color: #fff;
text-align: center;
margin: 0 auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 2px 0;
cursor: pointer;
line-height: 22px;
padding-top: 12px;
}
.pointedBtn{
background: #BCD1E3;
cursor: default
}
.pointsBtn span{
display: block;
}
.upload_Title {
position: relative;
margin-right: 20px;
float: left;
line-height: 35px;
font-size: 16px;
/*width: 56px;*/
color:rgba(0, 0, 0, 0.85);
text-align: center
}
.upload_Title.must:before {
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
.upload_Title:after{
content: ':';
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
}
.libraries_tab li {
width: 120px;
height: 35px;
line-height: 33px;
border-radius: 18px;
border: 1px solid #4C98FF;
color: #4C98FF;
cursor: pointer;
margin-right: 30px;
float: left;
text-align: center;
}
.libraries_tab li.active {
background: #4C98FF;
color: #fff;
}
.librariesField .ant-upload{
width: 100%;
background: #F2F9FF;
justify-content: center;
align-items: center;
display: -webkit-flex;
text-align: center;
height: 120px!important;
border-radius: 4px;
border: 1px dashed #4cacff!important;
display: block;
cursor: pointer;
}
.librariesField .ant-upload.ant-upload-drag{
border:none!important;
}
.uploadImage .ant-upload.ant-upload-select-picture-card{
width:120px;
height: 90px;
}
.uploadImage .ant-upload.ant-upload-select-picture-card > .ant-upload{
padding:0px!important;
}
.successPage {
justify-content: center;
align-items: center;
display: -webkit-flex;
height: 570px;
text-align: center;
margin-bottom: 50px;
}
.changebtn {
width:166px;
font-size: 16px;
height: 45px;
line-height: 45px;
}

@ -421,7 +421,11 @@ class AccountBasic extends Component {
identity
}=this.state;
const { getFieldDecorator } = this.props.form;
let{basicInfo}=this.props
let{ basicInfo }=this.props
// 已职业认证的账户不能修改职业,学校/单位,院系/部门产品还未确定先默认为false--可以更改
// basicInfo && basicInfo.professional_certification == "certified"
const professionalFlag = false;
// form合并了
const propsWithoutForm = Object.assign({}, this.props)
@ -607,7 +611,7 @@ class AccountBasic extends Component {
message: '请先选择职业',
}],
})(
<Select style={{width:"190px",marginRight:"20px"}} onChange={this.changeJob}>
<Select style={{width:"190px",marginRight:"20px"}} onChange={this.changeJob} disabled={professionalFlag}>
<Option value="teacher">教师</Option>
<Option value="student">学生</Option>
<Option value="professional">专业人士</Option>
@ -628,7 +632,7 @@ class AccountBasic extends Component {
message: '请先输入学号',
}],
})(
<Input type="text" placeholder="请输入学号" style={{width:"190px"}}></Input>
<Input type="text" placeholder="请输入学号" style={{width:"190px"}} disabled={professionalFlag}></Input>
)}
</Form.Item>
}
@ -646,7 +650,7 @@ class AccountBasic extends Component {
message: '请先选择职称',
}],
})(
<Select style={{width:"190px"}}>
<Select style={{width:"190px"}} disabled={professionalFlag}>
<Option value="教授">教授</Option>
<Option value="副教授">副教授</Option>
<Option value="讲师">讲师</Option>
@ -669,7 +673,7 @@ class AccountBasic extends Component {
message: '请先选择职称',
}],
})(
<Select style={{width:"190px"}}>
<Select style={{width:"190px"}} disabled={professionalFlag}>
<Option value="企业管理者">企业管理者</Option>
<Option value="部门管理者">部门管理者</Option>
<Option value="高级工程师">高级工程师</Option>
@ -703,7 +707,7 @@ class AccountBasic extends Component {
}],
})(
<AutoComplete width={400} showSearch onSearch={this.filterList} onChange={this.changeList}>
<AutoComplete width={400} showSearch onSearch={this.filterList} onChange={this.changeList} disabled={professionalFlag}>
{
filterSchoolList && filterSchoolList.map((item,key)=>{
return(<Option value={item.name} key={item.id}>{item.name}</Option>)
@ -741,7 +745,7 @@ class AccountBasic extends Component {
// }
}],
})(
<AutoComplete width={400} showSearch onSearch={this.searchDepartment} onChange={this.changeDepartment}>
<AutoComplete width={400} showSearch onSearch={this.searchDepartment} onChange={this.changeDepartment} disabled={professionalFlag}>
{
filterDepartments && filterDepartments.map((item,key)=>{
return(

Loading…
Cancel
Save