jingquan huang 6 years ago
commit 9d34878955

@ -81,8 +81,6 @@ class AccountsController < ApplicationController
return normal_status(-2, "错误的账号或密码") return normal_status(-2, "错误的账号或密码")
end end
@user.update_column(:last_login_on, Time.now)
successful_authentication(@user) successful_authentication(@user)
session[:user_id] = @user.id session[:user_id] = @user.id
@ -124,7 +122,7 @@ class AccountsController < ApplicationController
set_autologin_cookie(user) set_autologin_cookie(user)
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip) UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
user.update_column(:last_login_on, Time.now)
# 注册完成后有一天的试用申请(先去掉) # 注册完成后有一天的试用申请(先去掉)
# UserDayCertification.create(user_id: user.id, status: 1) # UserDayCertification.create(user_id: user.id, status: 1)
end end

@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base
@user_course_identity = current_user.course_identity(@course) @user_course_identity = current_user.course_identity(@course)
if @user_course_identity > Course::STUDENT && @course.is_public == 0 if @user_course_identity > Course::STUDENT && @course.is_public == 0
tip_exception(401, "..") unless User.current.logged? tip_exception(401, "..") unless User.current.logged?
check_account
tip_exception(409, "您没有权限进入") tip_exception(409, "您没有权限进入")
end end
uid_logger("###############user_course_identity:#{@user_course_identity}") uid_logger("###############user_course_identity:#{@user_course_identity}")
@ -189,8 +190,8 @@ class ApplicationController < ActionController::Base
# 资料是否完善 # 资料是否完善
def check_account def check_account
if !current_user.profile_completed? if !current_user.profile_completed?
info_url = '/account/profile' #info_url = '/account/profile'
tip_exception(402, info_url) tip_exception(402, nil)
end end
end end

@ -1,5 +1,5 @@
class ChallengesController < ApplicationController class ChallengesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth, except: [:index]
before_action :find_shixun, only: [:new, :create, :index] before_action :find_shixun, only: [:new, :create, :index]
skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer] skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer]
before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up, before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up,
@ -155,6 +155,7 @@ class ChallengesController < ApplicationController
@editable = @shixun.status == 0 # before_action有判断权限如果没发布则肯定是管理人员 @editable = @shixun.status == 0 # before_action有判断权限如果没发布则肯定是管理人员
@user = current_user @user = current_user
@shixun.increment!(:visits)
end end
def show def show

@ -49,30 +49,12 @@ class CoursesController < ApplicationController
@user = current_user @user = current_user
# 根据分类查询课堂(全部,我的,最新,最热) # 根据分类查询课堂(全部,我的,最新,最热)
@order = params[:order].present? ? params[:order] : "all" @order = params[:order].present? ? params[:order] : "all"
order_str = @order != "course_members_count" && @order != "created_at" ? "updated_at" : @order if @order == "visits"
order_str = "courses.id = 1309 DESC, courses.visits DESC"
# if @order == "all" @courses = Course.where(is_delete: 0, is_hidden: 0)
# @course = Course.where(is_delete: 0, is_hidden: 0).select("select c.name, c.id, s.name, u.login, ifnull(concat(u.lastname,u.firstname),
# u.login), s.name from courses c, users u, user_extensions ue, schools s where c.is_delete=0 and
# c.tea_id=u.id and u.id=ue.user_id and ue.school_id=s.id")
# @courses = Course.where(is_delete: 0, is_hidden: 0)
# .order("courses.id = 1309 desc, courses.created_at desc")
# @courses = Course.where(is_delete: 0, is_hidden: 0).select("courses.id, courses.tea_id, courses.name, courses.exercises_count, courses.polls_count,
# courses.is_public, courses.is_end, courses.visits, courses.course_members_count,courses.homework_commons_count,(SELECT MAX(created_at)
# FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a")
# .order("courses.id = 1309 desc, a desc")
if @order == "mine"
tip_exception(401, "..") unless current_user.logged?
@courses = Course.joins(:course_members)
.where("is_delete = 0 AND is_hidden = 0 AND course_members.user_id = ?", @user.id).distinct
elsif @order == "created_at"
# REDO:Extension
@courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0).distinct
else else
# REDO:Extension order_str = "courses.id = 1309 DESC, courses.homepage_show DESC, courses.created_at desc"
@courses = Course.where(is_delete: 0, is_hidden: 0).distinct @courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0)
end end
# 根据搜索关键字进一步筛选 # 根据搜索关键字进一步筛选
@ -92,7 +74,7 @@ class CoursesController < ApplicationController
.where("#{sql}", keyword: "%#{params[:search]}%").distinct .where("#{sql}", keyword: "%#{params[:search]}%").distinct
end end
@courses_count = @courses.count("courses.id") @courses_count = @courses.count("courses.id")
@courses = @courses.order("courses.id = 1309 DESC, courses.#{order_str} DESC") @courses = @courses.order(order_str)
# 分页 # 分页
page = params[:page] || 1 page = params[:page] || 1

@ -1,5 +1,6 @@
class DiscussesController < ApplicationController class DiscussesController < ApplicationController
LIMIT = 10 LIMIT = 10
before_action :require_login, only: [:create, :reply, :hidden, :reward_code, :plus, :destroy]
before_action :find_container, only: [:index, :hidden] before_action :find_container, only: [:index, :hidden]
before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus] before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus]

@ -1347,6 +1347,7 @@ class HomeworkCommonsController < ApplicationController
def group_list def group_list
@page = params[:page] || 1 @page = params[:page] || 1
@limit = params[:limit] || 10 @limit = params[:limit] || 10
@course_member_count = @course.course_groups.count
@course_groups = @course.course_groups.page(@page).per(@limit) @course_groups = @course.course_groups.page(@page).per(@limit)
@ungroup_user_ids = @course.course_members.ungroup_students.pluck(:user_id) @ungroup_user_ids = @course.course_members.ungroup_students.pluck(:user_id)
end end

@ -2,7 +2,8 @@ class ShixunsController < ApplicationController
include ShixunsHelper include ShixunsHelper
include ApplicationHelper include ApplicationHelper
before_action :require_login, :check_auth, except: [:download_file, :index, :menus] before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right, :ranking_list,
:discusses, :collaborators, :fork_list, :propaedeutics]
before_action :check_account, only: [:new, :create, :shixun_exec] before_action :check_account, only: [:new, :create, :shixun_exec]

@ -1,5 +1,5 @@
class StagesController < ApplicationController class StagesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth, except: [:index]
before_action :find_subject, only: [:create, :index] before_action :find_subject, only: [:create, :index]
before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position] before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position]
before_action :allowed, except: [:index] before_action :allowed, except: [:index]
@ -18,7 +18,7 @@ class StagesController < ApplicationController
@stage.position = @subject.stages.count + 1 @stage.position = @subject.stages.count + 1
@stage.save! @stage.save!
unless params[:shixun_id].blank? unless params[:shixun_id].blank?
shixuns = Shixun.where(id: params[:shixun_id]) shixuns = Shixun.where(id: params[:shixun_id]).order("field(id, #{params[:shixun_id].join(",")})")
shixuns.each do |shixun| shixuns.each do |shixun|
StageShixun.create!(stage_id: @stage.id, subject_id: @subject.id, shixun_id: shixun.id, position: @stage.stage_shixuns.count + 1) StageShixun.create!(stage_id: @stage.id, subject_id: @subject.id, shixun_id: shixun.id, position: @stage.stage_shixuns.count + 1)
end end

@ -1,7 +1,7 @@
class SubjectsController < ApplicationController class SubjectsController < ApplicationController
before_action :require_login, :check_auth, except: [:index] before_action :require_login, :check_auth, except: [:index, :show]
# before_action :check_auth, except: [:index] # before_action :check_auth, except: [:index]
before_action :check_account, only: [:new, :create] before_action :check_account, except: [:index, :show]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage] before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish, before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report, :search_members, :add_subject_members, :statistics, :shixun_report, :school_report,

@ -17,6 +17,7 @@ module Searchable::Dependents::User
# reindex subject # reindex subject
created_subjects.each(&:reindex) created_subjects.each(&:reindex)
subjects.each(&:reindex)
end end
end end
end end

@ -27,6 +27,7 @@ module Searchable::Subject
{ {
author_name: user.real_name, author_name: user.real_name,
author_school_name: user.school_name, author_school_name: user.school_name,
member_user_names: users.map(&:real_name).join(' ')
} }
end end

@ -246,6 +246,10 @@ class Shixun < ApplicationRecord
Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count
end end
def has_web_route?
self.mirror_name.include?('JavaWeb') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web')
end
private private
def send_tiding def send_tiding

@ -29,6 +29,7 @@ module ElasticsearchAble
subject_stages: { type: 'plain' }, subject_stages: { type: 'plain' },
content: { type: 'plain' }, content: { type: 'plain' },
descendants_contents: { type: 'plain' }, descendants_contents: { type: 'plain' },
member_user_names: { type: 'plain' }
} }
} }
end end

File diff suppressed because it is too large Load Diff

@ -13,6 +13,7 @@ elsif @tab == 1
# 评测设置的编辑模式 # 评测设置的编辑模式
json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path, json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path,
:web_route, :test_set_score, :test_set_average) :web_route, :test_set_score, :test_set_average)
json.has_web_route @shixun.has_web_route?
json.test_sets @challenge.test_sets do |set| json.test_sets @challenge.test_sets do |set|
json.hidden (set.is_public ? 0 : 1) json.hidden (set.is_public ? 0 : 1)
json.(set, :input, :output, :score) json.(set, :input, :output, :score)

@ -3,6 +3,7 @@ json.candidates do
json.id user.id json.id user.id
json.name user.real_name json.name user.real_name
json.nickname user.nickname json.nickname user.nickname
json.login user.login
json.school_name user.user_extension.school.try(:name) json.school_name user.user_extension.school.try(:name)
json.school_id user.user_extension.school.try(:id) json.school_id user.user_extension.school.try(:id)
json.added @course.course_member?(user.id, [1, 2, 3]) json.added @course.course_member?(user.id, [1, 2, 3])

@ -7,7 +7,8 @@ json.group_list do
end end
end end
# 未分班展示情况放在最后 # 未分班展示情况放在最后
if @course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i if (@course_groups.count != 0 && @course_groups.count < @limit.to_i) ||
((@page.to_i - 1)*@limit.to_i == @course_member_count && @course_groups.count == 0)
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids) ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0 if ungroup_work_count > 0
json.ungroup_list do json.ungroup_list do

@ -1,5 +1,6 @@
json.memo do json.memo do
json.id memo.id json.id memo.id
json.forum_id memo.forum_id
json.subject memo.subject json.subject memo.subject
json.is_md memo.is_md json.is_md memo.is_md
json.content memo.content json.content memo.content
@ -9,6 +10,6 @@ json.memo do
json.tag memo.tag_repertoires.map(&:name) json.tag memo.tag_repertoires.map(&:name)
json.time memo.created_at json.time memo.created_at
json.replies_count memo.all_replies_count json.replies_count memo.all_replies_count
json.user_praise memo.praise_treads.user_liker(@user.try(:id)).count > 0 ? true : false json.user_praise memo.praise_treads.user_liker(@user.try(:id)).count > 0
json.memo_praise_count memo.praise_treads.liker.count json.memo_praise_count memo.praise_treads.liker.count
end end

@ -16,7 +16,7 @@ json.college_identifier @user.college_identifier
json.followed User.current.watched?(@user) json.followed User.current.watched?(@user)
if @user.logged_user? if @user.logged_user?
json.can_apply_trial @user.can_apply_trial? #json.can_apply_trial @user.can_apply_trial?
json.attendance_signed @user.attendance_signed? json.attendance_signed @user.attendance_signed?
json.tomorrow_attendance_gold @user.tomorrow_attendance_gold json.tomorrow_attendance_gold @user.tomorrow_attendance_gold
end end

@ -1,64 +1,64 @@
class SecondMofidyKeContentsForMd < ActiveRecord::Migration[5.2] class SecondMofidyKeContentsForMd < ActiveRecord::Migration[5.2]
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper
def change def change
def ke_transform_to_md content # def ke_transform_to_md content
return content if content.blank? # return content if content.blank?
s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style)) # s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />") # s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
.gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />") # .gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
#
end # end
#
# 作业 # # 作业
HomeworkCommon.find_each do |hc| # HomeworkCommon.find_each do |hc|
description = ke_transform_to_md hc.description # description = ke_transform_to_md hc.description
reference_answer = ke_transform_to_md hc.reference_answer # reference_answer = ke_transform_to_md hc.reference_answer
explanation = ke_transform_to_md hc.explanation # explanation = ke_transform_to_md hc.explanation
hc.update_attributes(description: description, reference_answer: reference_answer, explanation: explanation) # hc.update_attributes(description: description, reference_answer: reference_answer, explanation: explanation)
end # end
#
# 作业题库 # # 作业题库
HomeworkBank.find_each do |hb| # HomeworkBank.find_each do |hb|
description = ke_transform_to_md hb.description # description = ke_transform_to_md hb.description
reference_answer = ke_transform_to_md hb.reference_answer # reference_answer = ke_transform_to_md hb.reference_answer
hb.update_attributes(description: description, reference_answer: reference_answer) # hb.update_attributes(description: description, reference_answer: reference_answer)
end # end
#
# 毕业任务 # # 毕业任务
GraduationTask.find_each do |gt| # GraduationTask.find_each do |gt|
description = ke_transform_to_md gt.description # description = ke_transform_to_md gt.description
gt.update_column(:description, description) # gt.update_column(:description, description)
end # end
#
# 毕设选题 # # 毕设选题
GraduationTopic.find_each do |gt| # GraduationTopic.find_each do |gt|
description = ke_transform_to_md gt.description # description = ke_transform_to_md gt.description
gt.update_column(:description, description) # gt.update_column(:description, description)
end # end
#
# 毕设作品 # # 毕设作品
GraduationWork.find_each do |gw| # GraduationWork.find_each do |gw|
description = ke_transform_to_md gw.description # description = ke_transform_to_md gw.description
gw.update_column(:description, description) # gw.update_column(:description, description)
end # end
#
# 毕设任务题库 # # 毕设任务题库
GtaskBank.find_each do |gb| # GtaskBank.find_each do |gb|
description = ke_transform_to_md gb.description # description = ke_transform_to_md gb.description
gb.update_column(:description, description) # gb.update_column(:description, description)
end # end
#
# 毕设选题题库 # # 毕设选题题库
GtopicBank.find_each do |gb| # GtopicBank.find_each do |gb|
description = ke_transform_to_md gb.description # description = ke_transform_to_md gb.description
gb.update_column(:description, description) # gb.update_column(:description, description)
end # end
#
# 交流问答 # # 交流问答
Memo.find_each do |m| # Memo.find_each do |m|
content = ke_transform_to_md m.content # content = ke_transform_to_md m.content
m.update_column(:content, content) # m.update_column(:content, content)
end # end
end end
end end

@ -1,17 +1,17 @@
class ThirdModifyKeForStudentWork < ActiveRecord::Migration[5.2] class ThirdModifyKeForStudentWork < ActiveRecord::Migration[5.2]
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper
def change def change
def ke_transform_to_md content # def ke_transform_to_md content
return content if content.blank? # return content if content.blank?
s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style)) # s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />") # s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
.gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />") # .gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
end # end
#
# 学生的作品 过滤掉一些描述的ke图片的作品 # # 学生的作品 过滤掉一些描述的ke图片的作品
StudentWork.where("description is not null and LENGTH(description) < 1000000").find_each do |sw| # StudentWork.where("description is not null and LENGTH(description) < 1000000").find_each do |sw|
description = ke_transform_to_md sw.description # description = ke_transform_to_md sw.description
sw.update_column(:description, description) # sw.update_column(:description, description)
end # end
end end
end end

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -29,7 +29,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = { module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools. // You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
devtool: "source-map", // 开启调试 devtool: "cheap-module-eval-source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -301,8 +301,8 @@ module.exports = {
}, },
warnings: false, warnings: false,
compress: { compress: {
drop_debugger: false, drop_debugger: true,
drop_console: false drop_console: true
} }
} }
}), }),

@ -96,7 +96,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
/*块状列表*/ /*块状列表*/
.square-list{width: 100%;box-sizing: border-box;margin-top:20px} .square-list{width: 100%;box-sizing: border-box;margin-top:20px}
.square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); } .square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); }
.square-Item:hover{bottom: 3px; box-shadow: 0px 0px 12px rgba(0,0,0,0.3);} .square-Item:hover{
/*bottom: 3px;*/
box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover .closeSquare{display: block} .square-Item:hover .closeSquare{display: block}
.square-Item:nth-child(4n+0){margin-right: 0px;} .square-Item:nth-child(4n+0){margin-right: 0px;}
.square-Item .square-img{display: block;width: 100%} .square-Item .square-img{display: block;width: 100%}

@ -10,7 +10,6 @@ broadcastChannelOnmessage('refreshPage', () => {
}) })
function locationurl(list){ function locationurl(list){
debugger
if (window.location.port === "3007") { if (window.location.port === "3007") {
} else { } else {
@ -43,6 +42,10 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.educoder.net" // proxy = "http://testbdweb.educoder.net"
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080" proxy="http://47.96.87.25:48080"
// wy
// proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -8,7 +8,15 @@ class LinkAfterLogin extends Component {
} }
checkAuth = () => { checkAuth = () => {
if (this.props.checkIfLogin()) { if (this.props.checkIfLogin()) {
this.props.history.push(this.props.to) if(this.props.checkProfileComplete){
if(this.props.checkIfProfileCompleted()){
this.props.history.push(this.props.to)
}else{
this.props.showProfileCompleteDialog();
}
}else{
this.props.history.push(this.props.to)
}
} else { } else {
this.props.showLoginDialog() this.props.showLoginDialog()
} }

@ -59,4 +59,8 @@ export { default as Clappr } from './components/media/Clappr'
export { default as ImageLayerHook } from './hooks/ImageLayerHook' export { default as ImageLayerHook } from './hooks/ImageLayerHook'
// 外部
export { default as CBreadcrumb } from '../modules/courses/common/CBreadcrumb'

@ -498,7 +498,7 @@ pop_box_new(htmlvalue, 480, 182);
return resData return resData
} }
fetchAll(stageId) { fetchAll(stageId, noTimeout) {
if (window.__fetchAllFlag == true ) { if (window.__fetchAllFlag == true ) {
console.log('TPIContextProvider call fetchAll repeatly!') console.log('TPIContextProvider call fetchAll repeatly!')
@ -544,6 +544,13 @@ pop_box_new(htmlvalue, 480, 182);
return; return;
} }
if (response.data.status == 404) { if (response.data.status == 404) {
// 如果第一次发生404则隔1s后再调用一次本接口因为ucloud主从同步可能有延迟
if (!noTimeout) {
setTimeout(() => {
this.fetchAll(stageId, true)
}, 1000)
return;
}
window.location.href = '/myshixuns/not_found' window.location.href = '/myshixuns/not_found'
return; return;
} }

@ -787,17 +787,17 @@ class CoursesIndex extends Component{
{/* }*/} {/* }*/}
{/*></Route>*/} {/*></Route>*/}
{/*实训学生作品列表已公布*/} {/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist" {/* <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"*/}
render={ {/* render={*/}
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />) {/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
} {/* }*/}
></Route> {/* ></Route>*/}
{/*实训学生作品列表已公布*/} {/*/!*实训学生作品列表已公布*!/*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist" {/*<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"*/}
render={ {/* render={*/}
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />) {/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
} {/* }*/}
></Route> {/*></Route>*/}

@ -68,7 +68,7 @@ class ListPageIndex extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state={
yslGuideone:true, yslGuideone:null,
} }
} }
@ -96,8 +96,8 @@ class ListPageIndex extends Component{
} }
render() { render() {
let {yslGuideone} =this.state; let {yslGuideone} =this.state;
console.log("98"); // console.log("98");
console.log(yslGuideone); // console.log(yslGuideone);
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">

@ -85,9 +85,9 @@ function buildColumns(that, student_works) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
width: '98px', width: '74px',
margin: '0 auto' margin: '0 auto'
}} title={text}> }} title={text && text.length > 5 ? text : ''}>
{/* <Tooltip placement="bottom" title={text}> {/* <Tooltip placement="bottom" title={text}>
</Tooltip> */} </Tooltip> */}
{text} {text}
@ -104,8 +104,8 @@ function buildColumns(that, student_works) {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" <a href="javascript:;"
title={record.student_id} title={text && text.length > 12 ? text : ''}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden' style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '98px', display: 'block', overflow: 'hidden'
, margin: '0 auto', cursor: 'default'}} , margin: '0 auto', cursor: 'default'}}
>{record.student_id}</a> >{record.student_id}</a>
</span> </span>
@ -136,7 +136,7 @@ function buildColumns(that, student_works) {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#4CACFF'}}>{record.work_group}</a> <a href="javascript:void(0);" style={{color:'#4CACFF'}}>{record.work_group}</a>
</span> </span>
), ),
}) })
@ -150,8 +150,9 @@ function buildColumns(that, student_works) {
render: (project_info, record) => ( render: (project_info, record) => (
<span> <span>
{project_info && project_info.name && <a href={`/projects/${project_info.id}`} target="_blank" {project_info && project_info.name && <a href={project_info.id == -1 ? 'javascript:void(0)' : `/projects/${project_info.id}`}
className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name} target={ project_info.id == -1 ? '' : "_blank" }
className="overflowHidden1" style={{color:'#4CACFF', width: that.state.anonymous_comment ? '80px' : '130px', margin: '0 auto', display: 'block'}} title={project_info.name}
>{project_info.name}</a>} >{project_info.name}</a>}
</span> </span>
), ),
@ -184,7 +185,7 @@ function buildColumns(that, student_works) {
</span> </span>
)}, )},
}, { }, {
width: 150, width: 106,
title: '更新时间', title: '更新时间',
dataIndex: 'update_time', dataIndex: 'update_time',
key: 'update_time', key: 'update_time',
@ -249,7 +250,8 @@ function buildColumns(that, student_works) {
*/ */
columns.push({ columns.push({
width: 84, width: 84,
title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div></div>, // title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div>评分</div>,
title: <div style={{color: 'rgba(0,0,0,.85)'}}>匿评评分</div>,
key: 'student_score', key: 'student_score',
dataIndex: 'student_score', dataIndex: 'student_score',
@ -323,7 +325,7 @@ function buildColumns(that, student_works) {
} }
if (isAdminOrStudent || that.props.work_public == true) { if (isAdminOrStudent || that.props.work_public == true) {
columns.push({ columns.push({
width: 92, width: 72,
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
@ -614,6 +616,7 @@ class CommonWorkList extends Component{
ref="checkCodeModal" ref="checkCodeModal"
{...this.props} {...this.props}
></CheckCodeModal> ></CheckCodeModal>
<AccessoryModal <AccessoryModal
{...this.props} {...this.props}
modalname={"补交附件"} modalname={"补交附件"}
@ -649,6 +652,10 @@ class CommonWorkList extends Component{
position: absolute; position: absolute;
right: 18px; right: 18px;
} }
.workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td {
padding: 10px 1px;
}
`}</style> `}</style>
<div style={{ background: '#fff'}} className="workListContent"> <div style={{ background: '#fff'}} className="workListContent">
{ isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}> { isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}>
@ -742,6 +749,9 @@ class CommonWorkList extends Component{
border-bottom: none; border-bottom: none;
} }
.studentTable .ant-table-tbody { background: '#F1F9FF' } .studentTable .ant-table-tbody { background: '#F1F9FF' }
.studentTable table, .stageTable table{
font-size: 13px !important;
}
`}</style> `}</style>
{ isStudent &&StudentData===undefined?"":StudentData===undefined?"": { isStudent &&StudentData===undefined?"":StudentData===undefined?"":
<Table <Table

@ -42,6 +42,9 @@ function disabledDateTime() {
// disabledSeconds: () => [55, 56], // disabledSeconds: () => [55, 56],
}; };
} }
function disabledDateFunc(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting // 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkSetting extends Component{ class CommonWorkSetting extends Component{
@ -1093,6 +1096,7 @@ class CommonWorkSetting extends Component{
onChange={this.onChangeTimeend} onChange={this.onChangeTimeend}
disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false} disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false}
disabled={moment(this.state.init_end_time) < moment() || noAuth} disabled={moment(this.state.init_end_time) < moment() || noAuth}
disabledDate={disabledDateFunc}
// disabledDate={ (end_time) => // disabledDate={ (end_time) =>
// { // {
@ -1166,6 +1170,7 @@ class CommonWorkSetting extends Component{
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
// || moment(init_late_time) < moment() // || moment(init_late_time) < moment()
disabled={!allow_late || noAuth } disabled={!allow_late || noAuth }
disabledDate={disabledDateFunc}
// disabledDate={ (late_time) => // disabledDate={ (late_time) =>
// { // {
// const end_time = this.state.end_time // const end_time = this.state.end_time
@ -1247,6 +1252,8 @@ class CommonWorkSetting extends Component{
onChange={this.onChangeEvaluationEnd} onChange={this.onChangeEvaluationEnd}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()} disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()}
disabledDate={disabledDateFunc}
// disabledDate={ (evaluation_end) => // disabledDate={ (evaluation_end) =>
// { // {
// const evaluation_start = this.state.evaluation_start // const evaluation_start = this.state.evaluation_start
@ -1335,6 +1342,7 @@ class CommonWorkSetting extends Component{
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
disabledDate={disabledDateFunc}
showToday={false} showToday={false}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}

@ -8,7 +8,7 @@ class CBreadcrumb extends Component{
} }
render(){ render(){
let { items, className }=this.props; let { items, className, separator }=this.props;
return( return(
<p className={`clearfix mb10 ${className}`}> <p className={`clearfix mb10 ${className}`}>
{ items && items.map( (item, index) => { { items && items.map( (item, index) => {
@ -18,7 +18,10 @@ class CBreadcrumb extends Component{
if (item.to) { if (item.to) {
return <React.Fragment> return <React.Fragment>
<WordsBtn style="grey" className="fl hovercolorblue" to={item.to}>{item.name}</WordsBtn> <WordsBtn style="grey" className="fl hovercolorblue" to={item.to}>{item.name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> {separator ?
<span className="color-grey-9 fl ml3 mr3">{separator}</span> :
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
}
</React.Fragment> </React.Fragment>
} else { } else {
return <span>{item.name}</span> return <span>{item.name}</span>

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Link} from "react-router-dom"; import {Link} from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import {getImageUrl, trigger, on, off} from 'educoder'; import {getImageUrl, trigger, on, off} from 'educoder';
import { Tooltip, message,Popover} from 'antd'; import { Tooltip, message,Popover,Breadcrumb} from 'antd';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import AccountProfile from"../../user/AccountProfile"; import AccountProfile from"../../user/AccountProfile";
import Addcourses from '../coursesPublic/Addcourses'; import Addcourses from '../coursesPublic/Addcourses';
@ -353,8 +353,8 @@ class CoursesBanner extends Component {
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
@ -489,23 +489,42 @@ class CoursesBanner extends Component {
<div className="clearfix clearfixborder"> <div className="clearfix clearfixborder">
<ul className="fl color-grey-eb pathInfo pathInfobox mt10"> <ul className="fl color-grey-eb pathInfo pathInfobox mt10">
<li className={"mt7 teachersbox"} > <style>
<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}> {`
<span className="color-grey-c fl font-16">教师</span> .ant-breadcrumb-separator{
<span color: rgba(255,255,255,0.3) !important;
className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span> }
</Link> `}
</li> </style>
<Breadcrumb separator="|" className={"mt5"}>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c font-16"><span className={"mr10"}>教师</span> <span className={"mr10"}>{coursedata.teacher_count}</span></span>
</Breadcrumb.Item>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span>
</Breadcrumb.Item>
<Breadcrumb.Item>{coursedata.credit===null?"":
<span className="color-grey-c font-16"><span className={"mr10 ml10"}>学分</span> <span className={"mr10"}>{coursedata.credit}</span></span>
}</Breadcrumb.Item>
</Breadcrumb>
{/*<li className={"mt7 teachersbox"} >*/}
{/*<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}>*/}
{/*<span className="color-grey-c fl font-16">教师</span>*/}
{/*<span*/}
{/*className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span>*/}
{/*</Link>*/}
{/*</li>*/}
<li className={"mt7"}> {/*<li className={"mt7 teachersbox"}>*/}
<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}> {/*<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}>*/}
<span className="color-grey-c fl font-16">学生</span> {/*<span className="color-grey-c fl font-16">学生</span>*/}
<span {/*<span*/}
className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}> {/*className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>*/}
{coursedata.student_count} {/*{coursedata.student_count}*/}
</span> {/*</span>*/}
</Link> {/*</Link>*/}
</li> {/*</li>*/}
{/*<li className={"mt7"}>*/} {/*<li className={"mt7"}>*/}
{/*<a>*/} {/*<a>*/}
@ -514,13 +533,13 @@ class CoursesBanner extends Component {
{/*</a>*/} {/*</a>*/}
{/*</li>*/} {/*</li>*/}
{coursedata.credit===null?"":<li className={"mt7"}> {/*{coursedata.credit===null?"":<li className={"mt7"}>*/}
<a> {/*<a>*/}
<span className="color-grey-c fl font-16 mr10">学分</span> {/*<span className="color-grey-c fl font-16 mr10">学分</span>*/}
<span className="color-white fl font-16 " {/*<span className="color-white fl font-16 "*/}
>{coursedata.credit}</span> {/*>{coursedata.credit}</span>*/}
</a> {/*</a>*/}
</li>} {/*</li>}*/}
{/*{coursedata.course_end===true? <li className={"mt7"}>*/} {/*{coursedata.course_end===true? <li className={"mt7"}>*/}
{/*<span className="color-grey-c fl font-16">已结束</span>*/} {/*<span className="color-grey-c fl font-16">已结束</span>*/}

@ -16,7 +16,7 @@ class CoursesHome extends Component{
this.state = { this.state = {
limit:16, limit:16,
page:1, page:1,
order:"all", order:"created_at",
coursesHomelist:undefined, coursesHomelist:undefined,
search:"", search:"",
} }
@ -118,25 +118,25 @@ class CoursesHome extends Component{
</div> </div>
<div className="mt20 educontent mb20 clearfix"> <div className="mt20 educontent mb20 clearfix">
<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} {/*<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
onClick={ () => this.changeStatus("all")}>全部</a> {/*onClick={ () => this.changeStatus("all")}>全部</a>*/}
<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} {/*<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
onClick={ () => this.changeStatus("mine")}>我的</a> {/*onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a className={ order == "created_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} <a className={ order == "created_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("created_at")}>最新</a> onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "course_members_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} <a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("course_members_count")}>最热</a> onClick={ () => this.changeStatus("visits")}>最热</a>
<div className="fr mr5 search-new"> {/*<div className="fr mr5 search-new">*/}
{/* <Search {/*/!* <Search*/}
placeholder="课堂名称/教师姓名/学校名称" {/*placeholder="课堂名称/教师姓名/学校名称"*/}
id="subject_search_input" {/*id="subject_search_input"*/}
value={search} {/*value={search}*/}
onInput={this.inputSearchValue} {/*onInput={this.inputSearchValue}*/}
onSearch={this.searchValue} {/*onSearch={this.searchValue}*/}
autoComplete="off" {/*autoComplete="off"*/}
></Search> */} {/*></Search> *!/*/}
</div> {/*</div>*/}
</div> </div>

@ -248,7 +248,7 @@ class Addcourses extends Component{
}else{ }else{
notification.open({ response.data.message && notification.open({
message:"提示", message:"提示",
description:response.data.message description:response.data.message
}); });

@ -122,16 +122,20 @@ class PathModal extends Component{
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
const {shixunmodallist} = this.state;
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page,shixunpathlist}=this.state; if(shixunmodallist.subject_list.length===0){
let newpage=page+1 return;
this.funshixunpathlist(Searchvalue,type,true,newpage) }else{
this.setState({ let {Searchvalue,type,page,shixunpathlist}=this.state;
page:newpage let newpage=page+1
}) this.funshixunpathlist(Searchvalue,type,true,newpage)
this.setState({
page:newpage
})
}
} }
} }
@ -288,17 +292,19 @@ class PathModal extends Component{
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 newtaskhide"> <li className="fl with40 newtaskhide">
<Checkbox <Checkbox
id={"shixun_input_"+item.subject_id} value={item.subject_id} id={"shixun_input_"+item.subject_id}
value={item.subject_id}
key={item.subject_id}
className="task-hide edu-txt-left newtaskhide" className="task-hide edu-txt-left newtaskhide"
style={{"width":"280px"}} style={{"width":"280px"}}
name="shixun_homework[]" name="shixun_homework[]"
> >
<label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title="frerere">{item.subject_name}</label> <label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title={item.subject_name}>{item.subject_name}</label>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl with30 edu-txt-left task-hide pl40">{item.shixun_count}</li> <li className="fl with30 edu-txt-left task-hide pl40">{item.shixun_count}</li>
<li className="fl with10 paddingl10">{item.myshixun_count}</li> <li className="fl with10 paddingl10">{item.myshixun_count}</li>
<Tooltip title="查看详情"> <Tooltip title="新窗口查看详情">
<li className="fr with10"><a className="color-blue" href={"/paths/"+item.subject_id} target="_blank">详情</a></li> <li className="fr with10"><a className="color-blue" href={"/paths/"+item.subject_id} target="_blank">详情</a></li>
</Tooltip> </Tooltip>
</div> </div>

@ -100,17 +100,21 @@ class ShixunModal extends Component{
} }
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
const {shixunmodallist}=this.state;
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight) {
let {Searchvalue,type,page}=this.state;
let newpage=page+1 if (shixunmodallist.shixun_list.length === 0) {
this.setupdatalist(Searchvalue,type,true,newpage) return;
this.setState({ } else {
page:newpage let {Searchvalue, type, page} = this.state;
}) let newpage = page + 1
} this.setupdatalist(Searchvalue, type, true, newpage)
this.setState({
page: newpage
})
}
}
} }
//搜索 //搜索

@ -477,9 +477,9 @@ a.white-btn.use_scope-btn:hover{
} }
.pathInfobox li{ .pathInfobox li{
margin-right: 20px; margin-right: 20px;
height: 15px; height: 20px;
/*overflow: hidden;*/ /*overflow: hidden;*/
line-height: 15px; line-height: 20px;
} }
.width70f{ .width70f{
width: 70px; width: 70px;

@ -526,7 +526,7 @@ class ExerciseReviewAndAnswer extends Component{
height: 28px; height: 28px;
} }
`}</style> `}</style>
<p style={{height:"60px"}}></p> {/*<p style={{height:"60px"}}></p>*/}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}

@ -221,7 +221,7 @@ class AddStudentModal extends Component{
</p> </p>
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
{ users && users.length ? <div> { loading || users.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */} {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}> <div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll <InfiniteScroll
@ -242,7 +242,7 @@ class AddStudentModal extends Component{
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }> <ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>
{ candidate.name ? { candidate.name ?
<a href={`/users/${candidate.login}`} target="_blank"> <a href={`/users/${candidate.login}`} target="_blank" style={{"maxWidth":"208px;"}}>
{ candidate.name } { candidate.name }
</a> : <span> </span> } </a> : <span> </span> }
</label> </label>

@ -205,7 +205,7 @@ class AddTeacherModal extends Component{
{` {`
.demo-loading-container { .demo-loading-container {
position: absolute; position: absolute;
bottom: 93px; bottom: 210px;
width: 82%; width: 82%;
text-align: center; text-align: center;
} }
@ -219,8 +219,7 @@ class AddTeacherModal extends Component{
} }
.df span.label { .df span.label {
margin-right: 8px; margin-right: 8px;
text-align: right; text-align: left;
margin-left: 12px;
} }
.df .ant-input-affix-wrapper { .df .ant-input-affix-wrapper {
width: 32%; width: 32%;
@ -232,11 +231,11 @@ class AddTeacherModal extends Component{
`} `}
</style> </style>
<div className="df"> <div className="df">
<span className="firstLabel label">姓名:</span> <span className="firstLabel label" style={{ flex: '0 0 40px' }}>姓名:</span>
<Input allowClear placeholder="请输入真实姓名" value={name} onChange={(e) => {this.setState({name: e.target.value})}} <Input allowClear placeholder="请输入真实姓名" value={name} onChange={(e) => {this.setState({name: e.target.value})}}
style={{ width: '200px'}}> style={{ width: '200px', marginRight: '18px' }}>
</Input> </Input>
<span className="label" style={{ minWidth: '36px' }}>单位:</span> <span className="label" style={{ minWidth: '36px', flex: '0 0 40px' }}>单位:</span>
<SchoolSelect <SchoolSelect
value={school_name} value={school_name}
onChange={this.onOrgNameChange} onChange={this.onOrgNameChange}
@ -256,37 +255,7 @@ class AddTeacherModal extends Component{
>搜索</a> >搜索</a>
</div> </div>
{/* graduation_groups && !!graduation_groups.length */} {/* graduation_groups && !!graduation_groups.length */}
{ this.hasGraduationModule() && <div className="df" style={{ marginTop: '24px' }} >
<span className="firstLabel label">答辩组:</span>
<Select style={{ width: 457 }} onChange={this.handleGradationGroupChange} value={graduationGroup}
dropdownRender={menu => (
<div>
{menu}
<Divider style={{ margin: '4px 0' }} />
{/* <ActionBtn
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>添加答辩组</ActionBtn> */}
<div style={{ padding: '8px', cursor: 'pointer' }}
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>
<Icon type="plus" /> 添加答辩组
</div>
</div>
)}
>
{ graduation_groups && graduation_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div>}
{ course_groups && !!course_groups.length && <div className="df">
<span className="firstLabel label">管理权限:</span>
<Select style={{ width: 457 }} onChange={this.handleCourseGroupChange} value={courseGroup}>
{ course_groups && course_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div> }
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}> <p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox> <Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
@ -296,7 +265,7 @@ class AddTeacherModal extends Component{
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span> <span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
</p> </p>
{ candidates && candidates.length ? <div> { loading || candidates.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */} {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}> <div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll <InfiniteScroll
@ -314,8 +283,14 @@ class AddTeacherModal extends Component{
<p className="clearfix mb7" key={candidate.id}> <p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} ></Checkbox> <Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25"> <span className="fl with25">
{/* "color":"#4c4c4c" */}
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }> <ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}
>
<a href={`/users/${candidate.login}`} target="_blank"
style={{}}
>{candidate.name}</a>
</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with25"> <span className="fl with25">
@ -339,6 +314,40 @@ class AddTeacherModal extends Component{
</InfiniteScroll> </InfiniteScroll>
</div> </div>
</div> : <NoneData></NoneData> } </div> : <NoneData></NoneData> }
<div className="df">
{ this.hasGraduationModule() && <div className="df" style={{ marginTop: '24px' }} >
<span className="firstLabel label" style={{ flex: '0 0 96px' }}>添加至答辩组:</span>
<Select style={{ width: 218, marginRight: '18px' }} onChange={this.handleGradationGroupChange} value={graduationGroup}
dropdownRender={menu => (
<div>
{menu}
<Divider style={{ margin: '4px 0' }} />
{/* <ActionBtn
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>添加答辩组</ActionBtn> */}
<div style={{ padding: '8px', cursor: 'pointer' }}
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>
<Icon type="plus" /> 添加答辩组
</div>
</div>
)}
>
{ graduation_groups && graduation_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div>}
{ course_groups && !!course_groups.length && <div className="df">
<span className="firstLabel label">管理权限:</span>
<Select style={{ width: 218 }} onChange={this.handleCourseGroupChange} value={courseGroup}>
{ course_groups && course_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div> }
</div>
</ModalWrapper> </ModalWrapper>
) )
} }

@ -305,7 +305,7 @@ class PollInfo extends Component{
let isStudent=this.props.isStudent(); let isStudent=this.props.isStudent();
return( return(
<div className="newMain" style={{paddingTop:"0px"}}> <div className="newMain" style={{paddingTop:"0px"}}>
<p style={{height:"60px"}}></p> {/*<p style={{height:"60px"}}></p>*/}
<Modals <Modals
modalsType={modalsType} modalsType={modalsType}
modalsTopval={modalsTopval} modalsTopval={modalsTopval}

@ -122,8 +122,8 @@ class PollNew extends Component {
} }
} }
console.log("问卷返回");
// this.getPollInfo(); console.log(this.props);
} }
//获取权限 //获取权限

@ -106,7 +106,8 @@ class CommitSummary extends Component{
// console.log("提交总结接口") // console.log("提交总结接口")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
// message.success(result.data.message); // message.success(result.data.message);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`); // 这里以前是学生
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -179,7 +180,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" > <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交 提交
</Button> </Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`}>取消</a> <a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`}>取消</a>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>

@ -21,21 +21,32 @@ class Guide extends Component {
} }
componentDidMount() { componentDidMount() {
// 1366x768
// var mywidthone=7;
var mywidthone=0; var mywidthone=0;
if(window.screen.width===1024){ if(window.screen.width===1024){
mywidthone=1; mywidthone=1;
} }
if(window.screen.width===1280){ else if(window.screen.width===1280){
mywidthone=2; mywidthone=2;
} }
if(window.screen.width===1440){ else if(window.screen.width===1440){
mywidthone=3; mywidthone=3;
} }
if(window.screen.width===1680){ else if(window.screen.width===1680){
mywidthone=4; mywidthone=4;
} }
if(window.screen.width===1920){ else if(window.screen.width===1920){
mywidthone=5;
}
else if(window.screen.width===1366){
mywidthone=6;
}
else if(window.screen.width===1600){
mywidthone=7;
}
else{
mywidthone=5; mywidthone=5;
} }
this.setState({ this.setState({
@ -54,8 +65,9 @@ class Guide extends Component {
render() { render() {
let {page,mywidth}=this.state; let {page,mywidth}=this.state;
// console.log("屏幕宽度"); // console.log("屏幕宽度");
// console.log(window.screen.width); console.log(window.screen.width);
// console.log(mywidth); console.log(mywidth);
return ( return (
<div className="guide-shadow"> <div className="guide-shadow">
<style> <style>
@ -70,14 +82,14 @@ class Guide extends Component {
{ {
page===1? page===1?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv11024":mywidth===2?"ysldiv11280":mywidth===3?"ysldiv11440":mywidth===4?"ysldiv11680":"ysldiv11900"} src={guihome1} onClick={(i)=>this.thissetPage(2)} /> <img className={mywidth===1?"ysldiv11024":mywidth===2?"ysldiv11280":mywidth===3?"ysldiv11440":mywidth===4?"ysldiv11680":mywidth===5?"ysldiv11900":mywidth===6?"ysldiv11366":mywidth===7?"ysldiv11600":"ysldiv11900"} src={guihome1} onClick={(i)=>this.thissetPage(2)} />
</div> </div>
:"" :""
} }
{ {
page===2? page===2?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv21024":mywidth===2?"ysldiv21280":mywidth===3?"ysldiv21440":mywidth===4?"ysldiv21680":"ysldiv21900"} src={guihome2} onClick={(i)=>this.thissetPage(3)}/> <img className={mywidth===1?"ysldiv21024":mywidth===2?"ysldiv21280":mywidth===3?"ysldiv21440":mywidth===4?"ysldiv21680":mywidth===5?"ysldiv21900":mywidth===6?"ysldiv21366":mywidth===7?"ysldiv21600":"ysldiv21900"} src={guihome2} onClick={(i)=>this.thissetPage(3)}/>
</div> </div>
: :
"" ""
@ -85,7 +97,7 @@ class Guide extends Component {
{ {
page===3? page===3?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv31024":mywidth===2?"ysldiv31280":mywidth===3?"ysldiv31440":mywidth===4?"ysldiv31680":"ysldiv31900"} src={guihome3} onClick={(i)=>this.thissetPage(4)}/> <img className={mywidth===1?"ysldiv31024":mywidth===2?"ysldiv31280":mywidth===3?"ysldiv31440":mywidth===4?"ysldiv31680":mywidth===5?"ysldiv31900":mywidth===6?"ysldiv31366":mywidth===7?"ysldiv31600":"ysldiv31900"} src={guihome3} onClick={(i)=>this.thissetPage(4)}/>
</div> </div>
: :
"" ""
@ -93,7 +105,7 @@ class Guide extends Component {
{ {
page===4? page===4?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv41024":mywidth===2?"ysldiv41280":mywidth===3?"ysldiv41440":mywidth===4?"ysldiv41680":"ysldiv41900"} src={guihome4} onClick={(i)=>this.thissetPage(5)}/> <img className={mywidth===1?"ysldiv41024":mywidth===2?"ysldiv41280":mywidth===3?"ysldiv41440":mywidth===4?"ysldiv41680":mywidth===5?"ysldiv41900":mywidth===6?"ysldiv41366":mywidth===7?"ysldiv41600":"ysldiv41900"} src={guihome4} onClick={(i)=>this.thissetPage(5)}/>
</div> </div>
: :
"" ""
@ -101,7 +113,7 @@ class Guide extends Component {
{ {
page===5? page===5?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv51024":mywidth===2?"ysldiv51280":mywidth===3?"ysldiv51440":mywidth===4?"ysldiv51680":"ysldiv51900"} src={guihome5} onClick={(i)=>this.thissetPage(6)}/> <img className={mywidth===1?"ysldiv51024":mywidth===2?"ysldiv51280":mywidth===3?"ysldiv51440":mywidth===4?"ysldiv51680":mywidth===5?"ysldiv51900":mywidth===6?"ysldiv51366":mywidth===7?"ysldiv51600":"ysldiv51900"} src={guihome5} onClick={(i)=>this.thissetPage(6)}/>
</div> </div>
: :
"" ""
@ -109,7 +121,7 @@ class Guide extends Component {
{ {
page===6? page===6?
<div className="guide-content"> <div className="guide-content">
<img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/> <img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":mywidth===5?"ysldiv61900":mywidth===6?"ysldiv61366":mywidth===7?"ysldiv61600":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/>
</div> </div>
: :
"" ""

@ -124,10 +124,10 @@ class Listofworksstudentone extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: "center", align: "center",
className:'font-14', className:'font-14 maxnamewidth100',
width:'100px', width:'100px',
render: (text, record) => ( render: (text, record) => (
<span> <span className="maxnamewidth100">
{record.name === undefined ? {record.name === undefined ?
<span style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
@ -152,10 +152,10 @@ class Listofworksstudentone extends Component {
"text-align": "center" "text-align": "center"
}}>--</span> }}>--</span>
: :
<span style={{ <a className="maxnamewidth100" title={record.name} style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
}}>{record.name}</span> }}>{record.name}</a>
} }
</span> </span>
@ -166,13 +166,42 @@ class Listofworksstudentone extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
className:'font-14', className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => ( render: (text, record) => (
<span> <span className="maxnamewidth110">
<span style={{ {record.stduynumber === undefined ?
"color": '#9A9A9A', <span style={{
"text-align": "center" "color": '#9A9A9A',
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</span> "text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span> </span>
), ),
}, },
@ -393,23 +422,53 @@ class Listofworksstudentone extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: 'center', align: 'center',
className:'font-14', className:'font-14 maxnamewidth100',
width:'120px', width:'100px',
render: (text, record) => ( render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span> <a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
) )
}, },
{ {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: 'center', align: "center",
className:'font-14', className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => ( render: (text, record) => (
<span style={{ <span className="maxnamewidth110">
"color": '#9A9A9A', {record.stduynumber === undefined ?
"text-align": "center" <span style={{
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} "color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span> </span>
), ),
}, },
@ -420,7 +479,9 @@ class Listofworksstudentone extends Component {
align: 'center', align: 'center',
className:'font-14', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span> <span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
</span>
) )
}, },
{ {
@ -655,23 +716,53 @@ class Listofworksstudentone extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: 'center', align: 'center',
className:'font-14', className:'font-14 maxnamewidth100',
width:'120px', width:'100px',
render: (text, record) => ( render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span> <a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
) )
}, },
{ {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: 'center', align: "center",
className:'font-14', className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => ( render: (text, record) => (
<span style={{ <span className="maxnamewidth110">
"color": '#9A9A9A', {record.stduynumber === undefined ?
"text-align": "center" <span style={{
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} "color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span> </span>
), ),
}, },
@ -682,7 +773,9 @@ class Listofworksstudentone extends Component {
align: 'center', align: 'center',
className:'font-14', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span> <span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
</span>
) )
}, },
{ {
@ -1101,6 +1194,8 @@ class Listofworksstudentone extends Component {
} }
seacthdatas = (teacherdata,student_works) => { seacthdatas = (teacherdata,student_works) => {
console.log("1197");
console.log(this.props.isNotMember());
let {page, limit,work_efficiency} = this.state; let {page, limit,work_efficiency} = this.state;
let datalist = []; let datalist = [];
let datalists = []; let datalists = [];
@ -1108,17 +1203,38 @@ class Listofworksstudentone extends Component {
var arr =[]; var arr =[];
for(var i=0;i<this.state.columnsstu.length;i++){ for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i]; var item = this.state.columnsstu[i];
if (work_efficiency === false) { if(this.props.isNotMember()===true){
if(item.title==="关卡得分"){ if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
} }
else if(item.title==="效率分"){ if(item.title==="学号") {
continue
}
else{
arr.push(item);
} }
} }
else{
if (work_efficiency === false) {
if(item.title==="关卡得分"){
continue
}
else if(item.title==="效率分"){
continue
if(this.props.isNotMember()===true&&item.title==="学号") { }else{
arr.push(item);
}
}else{
arr.push(item);
}
}else{
arr.push(item);
} }
} }
let columns2= arr; let columns2= arr;
@ -1207,8 +1323,7 @@ class Listofworksstudentone extends Component {
} }
// console.log("554"); // console.log("554");
// console.log(columns2); // console.log(columns2);
// console.log(arr);
this.setState({ this.setState({
data: datalist, data: datalist,
datas: datalists, datas: datalists,
@ -1220,23 +1335,44 @@ class Listofworksstudentone extends Component {
} }
// 设置数据 // 设置数据
seacthdata = (teacherdata) => { seacthdata = (teacherdata) => {
console.log("1326");
console.log(this.props.isNotMember());
let datalist = []; let datalist = [];
var arr =[]; var arr =[];
for(var i=0;i<this.state.columnsstu.length;i++){ for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i]; var item = this.state.columnsstu[i];
if (this.state.work_efficiency === false) {
if (item.title === "关卡得分") {
} else if (item.title === "效率分") { if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
arr.push(item);
}
}else{
if (this.state.work_efficiency === false) {
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
continue
}else{
arr.push(item);
}
}else{
arr.push(item);
} }
}
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
} }
} }
let columns2= arr; let columns2= arr;
@ -1472,7 +1608,7 @@ class Listofworksstudentone extends Component {
} }
paginationonChanges = (pageNumber) => { paginationonChangestwo = (pageNumber) => {
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
loadingstate: true, loadingstate: true,
@ -1622,66 +1758,144 @@ class Listofworksstudentone extends Component {
if (work_efficiency === false) { if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分 //这里没有分班 没有 关卡得分 没有效率分
console.log("1739");
console.log(this.props.isNotMember());
for(var i=0;i< this.state.columns.length;i++){ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i]; var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{ }else{
columns2js.push(item); if(item.title==="分班"){
continue
}
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}else {
columns2js.push(item);
}
} }
} }
}else{ }else{
console.log("1767");
console.log(this.props.isNotMember());
if(course_group_info.length < 2){ if(course_group_info.length < 2){
for(var i=0;i< this.state.columns.length;i++){ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i]; var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{ }else{
columns2js.push(item); if(item.title==="分班"){
continue
}
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}
else {
columns2js.push(item);
}
} }
} }
}else { }else {
console.log("1795");
console.log(this.props.isNotMember());
for(var i=0;i< this.state.columns.length;i++){ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i]; var item = this.state.columns[i];
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{ }else{
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}else {
columns2js.push(item); columns2js.push(item);
}
} }
} }
} }
} }
}else { }else {
console.log("1821");
console.log(this.props.isNotMember());
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
for(var i=0;i< this.state.columns.length;i++){ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i]; var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{ }else{
columns2js.push(item); if(item.title==="分班"){
continue
}else{
columns2js.push(item);
}
} }
} }
@ -1689,15 +1903,34 @@ class Listofworksstudentone extends Component {
}else { }else {
console.log("1849");
console.log(this.props.isNotMember());
if(course_group_info.length < 2) { if(course_group_info.length < 2) {
for(var i=0;i< this.state.columns.length;i++){ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i]; var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{ }else{
columns2js.push(item); if(item.title==="分班"){
continue
}else{
columns2js.push(item);
}
} }
} }
} }
@ -1710,6 +1943,7 @@ class Listofworksstudentone extends Component {
// //
// console.log(datalist); // console.log(datalist);
// console.log("1712"); // console.log("1712");
this.setState({ this.setState({
datajs: datalistjs, datajs: datalistjs,
columns: columns2js, columns: columns2js,
@ -2261,7 +2495,10 @@ class Listofworksstudentone extends Component {
// console.log(datajs); // console.log(datajs);
// console.log("2202"); // console.log("2202");
// console.log(this.props.isAdmin()); // console.log(this.props.isAdmin());
// console.log("2498");
// console.log(data);
// console.log(datas);
// console.log(this.props.isAdmin());
return ( return (
this.props.isAdmin() === true ? this.props.isAdmin() === true ?
( (
@ -2492,7 +2729,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works&&teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span> className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.all_member_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style> <style>
{ {
` `
@ -2535,20 +2772,26 @@ class Listofworksstudentone extends Component {
</div> </div>
: :
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}> <div className={"justify break_full_word new_li "} style={{minHeight: "480px"}}>
<style>{` <style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;} top: 72%;}
} }
.edu-table thead th,.edu-table tbody tr:last-child td{ .edu-table thead th,.edu-table tbody tr:last-child td{
border-bottom: none!important; border-bottom: none!important;
height: 85px; height: 58px;
} }
.ant-tables .ant-table-tbody > tr > td { .ant-tables .ant-table-tbody > tr > td {
height: 85px; height: 58px;
}
.ysltableo .ant-table-thead > tr > th{
height: 58px;
}
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
} }
`}</style> `}</style>
<div className="edu-table edu-back-white ant-tables"> <div className="edu-table edu-back-white ant-tables ysltableo table1">
{datajs === undefined ? "" : <Table {datajs === undefined ? "" : <Table
dataSource={datajs} dataSource={datajs}
columns={columns} columns={columns}
@ -2687,8 +2930,8 @@ class Listofworksstudentone extends Component {
<span className="fl color-grey-6 font-12"> <span className="fl color-grey-6 font-12">
<span <span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span className="color-orange-tip">{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span> <span className="ml20">{teacherdata.left_time.status}</span>
} }
@ -2723,15 +2966,30 @@ class Listofworksstudentone extends Component {
</div> </div>
</div> </div>
<div className={"justify break_full_word new_li edu-back-white"} <div className={"justify break_full_word new_li"}
style={{minHeight: "480px"}}> style={{minHeight: "480px"}}>
<style>{` <style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;} top: 72%;}
} }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableow .ant-table-thead > tr > th{
height: 58px;
}
.ysltableow .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style> `}</style>
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ysltableow table2">
{data === undefined ? "222222" : <Table {data === undefined ? "" : <Table
dataSource={data} dataSource={data}
columns={columnsstu} columns={columnsstu}
pagination={false} pagination={false}
@ -2784,7 +3042,7 @@ class Listofworksstudentone extends Component {
} }
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="edu-back-white"> <div >
<style> <style>
{ {
` `
@ -2802,29 +3060,48 @@ class Listofworksstudentone extends Component {
</span> </span>
</li>:""} </li>:""}
<style>
<div className="edu-table edu-back-white "> {
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableows .ant-table-thead > tr > th{
height: 58px;
}
.ysltableows .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`
}
</style>
<div className="edu-table edu-back-white ysltableows table3">
{data === undefined ? "" : <Table {data === undefined ? "" : <Table
style={styletable} style={styletable}
dataSource={data} dataSource={data}
columns={columnsstu} columns={columnsstu}
pagination={false} pagination={false}
loading={false} loading={false}
showHeader={false}
/>} />}
</div> </div>
{JSON.stringify(datas) !== "[]" ? {JSON.stringify(datas) !== "[]" ?
<div> <div>
<div id="graduation_work_list" style={{ <div id="graduation_work_list" className="edu-back-white" style={{
padding: '20px 20px 10px 20px', padding: '20px 20px 10px 20px',
marginBottom: "10px" marginBottom: "10px"
}}> }}>
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"> <span className="fl color-grey-6 font-12">
<span className="color-orange-tip"> <span className="color-orange-tip">
{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count} {teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}
</span> </span>
<span className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> <span className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span>} <span className="ml20">{teacherdata.left_time.status}</span>}
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
@ -2913,14 +3190,29 @@ class Listofworksstudentone extends Component {
</div> </div>
<div className={"justify break_full_word new_li edu-back-white"} <div className={"justify break_full_word new_li"}
style={{minHeight: "480px"}}> style={{minHeight: "480px"}}>
<style>{` <style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;} top: 72%;}
} }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th{
height: 58px;
}
.ysltableowss .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style> `}</style>
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ysltableowss table4">
{datas === undefined ? "" : <Table {datas === undefined ? "" : <Table
dataSource={datas} dataSource={datas}
columns={columnsstu} columns={columnsstu}
@ -2928,16 +3220,17 @@ class Listofworksstudentone extends Component {
loading={loadingstate} loading={loadingstate}
/>} />}
</div> </div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div> </div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center ysyslxh mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChangestwo} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div> </div>
: :
<div id="forum_list" className="forum_table"> <div id="forum_list" className="forum_table">

@ -132,7 +132,7 @@ class ShixunHomeworkPage extends Component {
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}> <div className={"educontent mt20 mb20"} style={{width: "1200px"}}>
<div className="educontent mb20"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">

@ -783,7 +783,9 @@ class ShixunStudentWork extends Component {
<CheckboxGroup onChange={this.groupgroup} <CheckboxGroup onChange={this.groupgroup}
value={this.state.group_infolist} value={this.state.group_infolist}
style={{paddingTop: '4px'}}> style={{paddingTop: '4px',float: 'left',
maxWidth: '1020px'}}
>
{data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => { {data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => {
return ( return (
<span key={key}> <span key={key}>

@ -75,10 +75,15 @@ class ShixunWorkReport extends Component {
let homeworkid=this.props.match.params.homeworkid; let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json` let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => { axios.get(url).then((result) => {
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({ this.setState({
data:result.data, data:result.data,
spinning:false spinning:false
}) })
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
@ -109,8 +114,15 @@ class ShixunWorkReport extends Component {
this.props.history.push(this.props.current_user.first_category_url); this.props.history.push(this.props.current_user.first_category_url);
} }
} }
goback = () => {
this.props.history.goBack()
}
render() { render() {
let{data} =this.state; let{data} =this.state;
console.log(data)
console.log(this.props)
let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id; let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid; let homeworkid=this.props.match.params.homeworkid;
@ -147,9 +159,10 @@ class ShixunWorkReport extends Component {
{/*className="fr color-blue font-16"*/} {/*className="fr color-blue font-16"*/}
{/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/} {/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/}
{/*>导出实训报告数据</a> : ""}*/} {/*>导出实训报告数据</a> : ""}*/}
{/*<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>*/}
</div> </div>
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set">
<div className="clearfix edu-back-white poll_list"> <div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div> <div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div>

@ -305,7 +305,7 @@ class ShixunhomeWorkItem extends Component{
} }
{ {
this.props.isStudent? <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`} this.props.isStudent? <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
@ -313,7 +313,7 @@ class ShixunhomeWorkItem extends Component{
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true? this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span>
: <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`} : <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }

@ -132,13 +132,14 @@ class ShixunWorkModal extends Component{
onChange=(e)=>{ onChange=(e)=>{
let{group_list}=this.state; let{group_list}=this.state;
let {data}=this.props; let {data}=this.props;
if(e.target.checked===true){ if(e.target.checked===true){
if(data&&data.length===0){ if(data&&data.length===0){
let id=[] let id=[]
group_list.forEach((item,key)=>{ group_list.forEach((item,key)=>{
id.push(item.id) if(item.works_count!=0){
id.push(item.id)
}
}) })
this.setState({ this.setState({
group_ids:id, group_ids:id,
@ -147,7 +148,9 @@ class ShixunWorkModal extends Component{
}else{ }else{
let id=[] let id=[]
group_list.forEach((item,key)=>{ group_list.forEach((item,key)=>{
id.push(item.id) if(item.works_count!=0){
id.push(item.id)
}
}) })
this.setState({ this.setState({
group_ids:id, group_ids:id,
@ -161,6 +164,9 @@ class ShixunWorkModal extends Component{
}) })
} }
} }
@ -189,7 +195,7 @@ class ShixunWorkModal extends Component{
// message:"提示", // message:"提示",
// description: response.data.message // description: response.data.message
// }); // });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`); window.location.href=`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`;
}else if(response.data.status === -1){ }else if(response.data.status === -1){
notification.open({ notification.open({
message:"提示", message:"提示",
@ -302,6 +308,7 @@ class ShixunWorkModal extends Component{
} }
<div className={"clearfix"}> <div className={"clearfix"}>
<Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox> <Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox>
{/*<span>有效作品都为0</span>*/}
</div> </div>
<div className="clearfix mt30 edu-txt-center mb10"> <div className="clearfix mt30 edu-txt-center mb10">

@ -79,14 +79,14 @@ class TraineetraininginformationModal extends Component {
return str; return str;
} }
render() { render() {
console.log(83); // console.log(83);
console.log(this.props.boolgalist); // console.log(this.props.boolgalist);
const columns = [ const columns = [
{ {
title: '关卡', title: '关卡',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
width: 92, width:"91px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -98,7 +98,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 178, width:"150px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -113,7 +113,7 @@ class TraineetraininginformationModal extends Component {
title: '', title: '',
dataIndex: 'complete_status', dataIndex: 'complete_status',
key: 'complete_status', key: 'complete_status',
width: 100, width:"87px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -127,7 +127,7 @@ class TraineetraininginformationModal extends Component {
title: '耗时', title: '耗时',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
width: 92, width:"150px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -138,7 +138,7 @@ class TraineetraininginformationModal extends Component {
{ {
title: '经验值', title: '经验值',
key: 'classroom', key: 'classroom',
width: 92,
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
@ -147,7 +147,7 @@ class TraineetraininginformationModal extends Component {
</span> </span>
), ),
} }
] ];
const columnss = [ const columnss = [
{ {
@ -155,7 +155,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: "center", align: "center",
width: "117px", width:"119px",
render: (text, record) => ( render: (text, record) => (
<span > <span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a> <a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
@ -166,7 +166,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: "203px", width:"174px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span >
@ -179,7 +179,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
width: "117px", width:"119px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a> <a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
@ -191,14 +191,14 @@ class TraineetraininginformationModal extends Component {
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
width: "117px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a> <a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span> </span>
), ),
} }
] ];
return ( return (
<div> <div>
@ -209,6 +209,8 @@ class TraineetraininginformationModal extends Component {
visible={this.props.visible} visible={this.props.visible}
footer={null} footer={null}
onCancel={this.Cancel} onCancel={this.Cancel}
maskClosable={false}
destroyOnClose={true}
> >
<div style={{width:"100%" }} > <div style={{width:"100%" }} >
<div style={{"width": "100%","text-align": "left","clear": "both"}}> <div style={{"width": "100%","text-align": "left","clear": "both"}}>
@ -252,7 +254,18 @@ class TraineetraininginformationModal extends Component {
{ {
` .ant-table-body{ ` .ant-table-body{
overflow: hidden !important; overflow: hidden !important;
}` }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
} }
</style> </style>
@ -263,24 +276,33 @@ class TraineetraininginformationModal extends Component {
columns={columns} columns={columns}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
/>} />}
</div> </div>
: :
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div> <div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table {this.props.game_list === undefined ? "" : <Table
className="mt20" className="mt20"
dataSource={this.props.game_list} dataSource={this.props.game_list}
columns={columns} columns={columns}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }} scroll={{ y: 300 }}
/>} />}
</div> </div>
@ -302,7 +324,15 @@ class TraineetraininginformationModal extends Component {
{ {
` .ant-table-body{ ` .ant-table-body{
overflow: hidden !important; overflow: hidden !important;
}` }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
`
} }
</style> </style>
@ -313,24 +343,32 @@ class TraineetraininginformationModal extends Component {
columns={columnss} columns={columnss}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
/>} />}
</div> </div>
: :
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div> <div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table {this.props.game_list === undefined ? "" : <Table
className="mt20" className="mt20"
dataSource={this.props.game_list} dataSource={this.props.game_list}
columns={columnss} columns={columnss}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }} scroll={{ y: 300 }}
/>} />}
</div> </div>

@ -20,7 +20,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.4);
transition: all .3s ease-out; transition: all .3s ease-out;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -236,15 +236,19 @@
} }
.ysldiv11680{ .ysldiv11680{
margin-top: 11%; margin-top: 11.5%;
margin-left: 13%; margin-left: 13%;
margin-right: 10%; margin-right: 9%;
}
.ysldiv11600{
margin-top: 12%;
margin-left: 11%;
margin-right: 7%;
} }
.ysldiv11440{ .ysldiv11440{
margin-top: 14%; margin-top: 14%;
margin-left: 7%; margin-left: 7%;
margin-right: 3%; margin-right: 3%;
height: 60%;
} }
.ysldiv11280{ .ysldiv11280{
@ -253,6 +257,12 @@
margin-right: 0%; margin-right: 0%;
height: 60%; height: 60%;
} }
.ysldiv11366{
margin-top: 15%;
margin-left: 5%;
margin-right: 2%;
height: 60%;
}
.ysldiv11024{ .ysldiv11024{
margin-top: 20%; margin-top: 20%;
margin-left: 0%; margin-left: 0%;
@ -270,16 +280,19 @@
} }
.ysldiv21680{ .ysldiv21680{
margin-top: 11%; margin-top: 11.5%;
margin-left: 45%; margin-left: 45%;
margin-right: 20%;
}
.ysldiv21600{
margin-top: 12%;
margin-left: 47%;
margin-right: 20%; margin-right: 20%;
height: 24%;
} }
.ysldiv21440{ .ysldiv21440{
margin-top: 14%; margin-top: 14%;
margin-left: 47%; margin-left: 47%;
margin-right: 17%; margin-right: 17%;
height: 25%;
} }
.ysldiv21280{ .ysldiv21280{
@ -288,6 +301,12 @@
margin-right: 14%; margin-right: 14%;
height: 25%; height: 25%;
} }
.ysldiv21366{
margin-top: 15%;
margin-left: 51%;
margin-right: 14%;
height: 23%;
}
.ysldiv21024{ .ysldiv21024{
margin-top: 20%; margin-top: 20%;
margin-left: 61%; margin-left: 61%;
@ -303,12 +322,17 @@
} }
.ysldiv31680{ .ysldiv31680{
margin-top: 11%; margin-top: 11.5%;
margin-left: 14%; margin-left: 14%;
margin-right: 45%;
}
.ysldiv31600{
margin-top: 12%;
margin-left: 12%;
margin-right: 45%; margin-right: 45%;
} }
.ysldiv31440{ .ysldiv31440{
margin-top: 13%; margin-top: 13.5%;
margin-left: 8%; margin-left: 8%;
margin-right: 44%; margin-right: 44%;
} }
@ -318,6 +342,11 @@
margin-left: 3%; margin-left: 3%;
margin-right: 44%; margin-right: 44%;
} }
.ysldiv31366{
margin-top: 14%;
margin-left: 6%;
margin-right: 43%;
}
.ysldiv31024{ .ysldiv31024{
margin-top: 18%; margin-top: 18%;
margin-left: 1%; margin-left: 1%;
@ -327,27 +356,37 @@
/*目录管理*/ /*目录管理*/
.ysldiv41900{ .ysldiv41900{
margin-top: 18%; margin-top: 16%;
margin-left: 19%; margin-left: 19%;
margin-right: 28%; margin-right: 29%;
} }
.ysldiv41680{ .ysldiv41680{
margin-top: 21%; margin-top: 18%;
margin-left: 14%; margin-left: 14%;
margin-right: 24%;
}
.ysldiv41600{
margin-top: 19%;
margin-left: 12%;
margin-right: 23%; margin-right: 23%;
} }
.ysldiv41440{ .ysldiv41440{
margin-top: 24%; margin-top: 21%;
margin-left: 8%; margin-left: 8%;
margin-right: 19%; margin-right: 20%;
} }
.ysldiv41280{ .ysldiv41280{
margin-top: 27%; margin-top: 24%;
margin-left: 3%; margin-left: 3%;
margin-right: 17%; margin-right: 17%;
} }
.ysldiv41366{
margin-top: 22%;
margin-left: 6%;
margin-right: 20%;
}
.ysldiv41024{ .ysldiv41024{
margin-top: 29%; margin-top: 29%;
margin-left: 0%; margin-left: 0%;
@ -356,27 +395,37 @@
/*导航排序*/ /*导航排序*/
.ysldiv51900{ .ysldiv51900{
margin-top: 18%; margin-top: 16%;
margin-left: 18%; margin-left: 18%;
margin-right: 42%; margin-right: 42%;
} }
.ysldiv51680{ .ysldiv51680{
margin-top: 20%; margin-top: 18%;
margin-left: 13%; margin-left: 13%;
margin-right: 41%; margin-right: 40%;
}
.ysldiv51600{
margin-top: 19%;
margin-left: 11%;
margin-right: 39%;
} }
.ysldiv51440{ .ysldiv51440{
margin-top: 24%; margin-top: 21%;
margin-left: 7%; margin-left: 7%;
margin-right: 38%; margin-right: 39%;
} }
.ysldiv51280{ .ysldiv51280{
margin-top: 27%; margin-top: 24%;
margin-left: 2%; margin-left: 2%;
margin-right: 38%; margin-right: 38%;
} }
.ysldiv51366{
margin-top: 22%;
margin-left: 5%;
margin-right: 39%;
}
.ysldiv51024{ .ysldiv51024{
margin-top: 34%; margin-top: 34%;
margin-left: -1%; margin-left: -1%;
@ -395,6 +444,11 @@
margin-left: 31%; margin-left: 31%;
margin-right: 14%; margin-right: 14%;
} }
.ysldiv61600{
margin-top: 19%;
margin-left: 30%;
margin-right: 12%;
}
.ysldiv61440{ .ysldiv61440{
margin-top: 21%; margin-top: 21%;
margin-left: 28%; margin-left: 28%;
@ -407,6 +461,12 @@
margin-right: 3%; margin-right: 3%;
height: 53%; height: 53%;
} }
.ysldiv61366{
margin-top: 22%;
margin-left: 26%;
margin-right: 6%;
height: 53%;
}
.ysldiv61024{ .ysldiv61024{
margin-top: 26%; margin-top: 26%;
margin-left: 27%; margin-left: 27%;

@ -44,7 +44,7 @@ class Coursesshixundetails extends Component {
data&&data.forEach((item,key)=>{ data&&data.forEach((item,key)=>{
datas.push({ datas.push({
number: item.position, number: item.position,
name: item.output_detail name: item.output_detail=== ""||item.output_detail===null?"暂无数据":item.output_detail
}) })
}) })

@ -177,6 +177,8 @@ class OfficialAcademicTranscript extends Component {
} }
.TaskForms{ .TaskForms{
width: 500px; width: 500px;
text-align: left !important;
padding: 16px !important;
} }
.TaskForms.ant-table-header-column{ .TaskForms.ant-table-header-column{
width: 100%; width: 100%;

@ -12,6 +12,7 @@ function startechart(data){
var option = { var option = {
title: { title: {
text: '工作效率', text: '工作效率',
subtext: '工作效率=log(实训总得分/实训总耗时)'
}, },
grid:{ grid:{
left: '3%', left: '3%',
@ -61,7 +62,7 @@ function startechart(data){
yAxis: [ yAxis: [
{ {
type : "value", type : "value",
name : " 实训总得分/实训总耗时", name : " ",
nameGap: 20, nameGap: 20,
nameTextStyle: { nameTextStyle: {
color: '#000', color: '#000',
@ -169,6 +170,7 @@ function startechart(data){
var option1 = { var option1 = {
title: { title: {
text: '能力值', text: '能力值',
subtext: '能力值(实训获得经验值/实训评测次数)'
}, },
backgroundColor: '#fff', backgroundColor: '#fff',
color: [ color: [
@ -212,7 +214,7 @@ function startechart(data){
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: " 实训获得经验值/实训评测次数", name: " ",
nameLocation: 'end', nameLocation: 'end',
nameGap: 20, nameGap: 20,
nameTextStyle: { nameTextStyle: {
@ -356,7 +358,7 @@ class Shixunechart extends Component {
`} `}
</style> </style>
<div className="fl with24 ml50"> <div className="fl ml50">
<div className="bor-grey-e bor-radius4 clearfix mt100 colorE6F3FF pd10"> <div className="bor-grey-e bor-radius4 clearfix mt100 colorE6F3FF pd10">
<div className="fl with25 colorE6F3FF" style={{textAlign:"right",paddingRight:"5%"}}> <div className="fl with25 colorE6F3FF" style={{textAlign:"right",paddingRight:"5%"}}>
<li className="mt5 mb5 color-grey-9">姓名</li> <li className="mt5 mb5 color-grey-9">姓名</li>

@ -1,39 +1,56 @@
.ant-checkbox-group > div .boardsList{ .ant-checkbox-group > div .boardsList{
/* border-top: 1px solid #ebebeb; */ /* border-top: 1px solid #ebebeb; */
padding:10px 0px 20px!important; padding:10px 0px 20px!important;
} }
.ant-checkbox-group > div:first-child .boardsList{ .ant-checkbox-group > div:first-child .boardsList{
border-top: none; border-top: none;
} }
.boardsList .contentSection { .boardsList .contentSection {
flex: 1; flex: 1;
margin-left: 15px; margin-left: 15px;
} }
.ant-select-selection--single,.ant-select-selection__rendered{ .ant-select-selection--single,.ant-select-selection__rendered{
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
.ant-input:focus + .ant-input-group-addon{ .ant-input:focus + .ant-input-group-addon{
background-color: #fff!important; background-color: #fff!important;
} }
.ant-input-group-addon{ .ant-input-group-addon{
color: #666!important; color: #666!important;
font-size: 12px; font-size: 12px;
border: 1px solid #d9d9d9!important; border: 1px solid #d9d9d9!important;
border-left: none!important; border-left: none!important;
} }
.courseForm .ant-form-item-label{ .courseForm .ant-form-item-label{
margin-left: unset; margin-left: unset;
} }
/* 毕设选题列表 */ /* 毕设选题列表 */
.TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px} .TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px}
.TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;} .TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;}
.TopicDetailTable .bottomBody{padding:0px 30px} .TopicDetailTable .bottomBody{padding:0px 30px}
.TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;} .TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;}
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;} .TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
.maxnamewidth100{
max-width: 100px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth110{
max-width: 110px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.ysyslxh{
background: #fafafa;
}

@ -22,8 +22,11 @@ import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC'
import MemoDetailKEEditor from './MemoDetailKEEditor' import MemoDetailKEEditor from './MemoDetailKEEditor'
import MemoDetailMDEditor from './MemoDetailMDEditor' import MemoDetailMDEditor from './MemoDetailMDEditor'
import { bytesToSize } from 'educoder' import { bytesToSize, CBreadcrumb } from 'educoder'
import { Tooltip } from 'antd' import { Tooltip } from 'antd'
// import CBreadcrumb from '../courses/common/CBreadcrumb'
import { typeNameMap2 } from './MemoNew'
const $ = window.$ const $ = window.$
function urlStringify(params) { function urlStringify(params) {
let noParams = true; let noParams = true;
@ -682,6 +685,13 @@ class MemoDetail extends Component {
memo.isDetailPage = true; memo.isDetailPage = true;
// TODO 图片上传地址 // TODO 图片上传地址
return ( return (
<React.Fragment>
<CBreadcrumb items={[
{ to: `/forums/categories/${memo.forum_id}`, name: typeNameMap2[memo.forum_id]},
{ name: '详情' },
]}
separator={' / '}
></CBreadcrumb>
<div className="edu-back-white memoDetail" id="forum_index_list"> {/* fl with100 */} <div className="edu-back-white memoDetail" id="forum_index_list"> {/* fl with100 */}
<style>{` <style>{`
.memoDetail .commentsbtn { .memoDetail .commentsbtn {
@ -735,12 +745,12 @@ class MemoDetail extends Component {
</ul> </ul>
</div> </div>
} }
<Link className={`task-hide fr return_btn color-grey-6 mt2 ${ _current_user && (_current_user.admin === true {/* <Link className={`task-hide fr return_btn color-grey-6 mt2 ${ _current_user && (_current_user.admin === true
|| _current_user.user_id === author_info.user_id) ? '': 'no_mr'} `} to="/forums" || _current_user.user_id === author_info.user_id) ? '': 'no_mr'} `} to="/forums"
style={{ marginRight: '10px'}} style={{ marginRight: '10px'}}
> >
返回 返回
</Link> </Link> */}
</div> </div>
</div> </div>
<div className="color-grey-9 clearfix"> <div className="color-grey-9 clearfix">
@ -837,6 +847,7 @@ class MemoDetail extends Component {
</div> </div>
</div> </div>
</React.Fragment>
); );
} }
} }

@ -121,7 +121,7 @@ const typeNameMap = {
'技术分享': 5, '技术分享': 5,
'操作指南': 3, '操作指南': 3,
} }
const typeNameMap2 = { export const typeNameMap2 = {
5: '技术分享', 5: '技术分享',
3: '操作指南', 3: '操作指南',
} }

@ -308,7 +308,7 @@ class MessagSub extends Component{
//记得跳评阅页面 //记得跳评阅页面
default : default :
// 课堂-试卷列表详情 :id = container_id // 课堂-试卷列表详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}`) return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
} }
case 'StudentGraduationTopic' : case 'StudentGraduationTopic' :
//课堂-毕业选题详情 :id = parent_container_id //课堂-毕业选题详情 :id = parent_container_id

@ -20,7 +20,7 @@ class CaseItem extends Component{
libraries && libraries.map((item,key)=>{ libraries && libraries.map((item,key)=>{
return( return(
<li className="library_list_item"> <li className="library_list_item">
<img alt={item.id} className="mr15 mt3 radius4" height="90" src={getUrl(`${item.cover_url}`)} width="120" /> <img alt={item.id} className="mr15 mt3 radius4" height="90" src={getUrl(`${item.cover_url || "/images/educoder/library-default-cover.png"}`)} width="120" />
<div className="flex1"> <div className="flex1">
<p className="clearfix mb25 lineh-40"> <p className="clearfix mb25 lineh-40">
<a href={`/moop_cases/${item.id}`} className="task-hide font-22 library_l_name">{item.title}</a> <a href={`/moop_cases/${item.id}`} className="task-hide font-22 library_l_name">{item.title}</a>
@ -32,15 +32,15 @@ class CaseItem extends Component{
<span className="color-grey-c fr"> <span className="color-grey-c fr">
{ {
item.visited_count && item.visited_count != 0 ? item.visited_count && item.visited_count != 0 ?
<span className="color-grey-c mr20"><span className=" item-group-icon mr5"><i className="fa fa-eye"></i></span>{item.visited_count} </span>:"" <span className="color-grey-c ml20"><span className=" item-group-icon mr5"><i className="fa fa-eye"></i></span>{item.visited_count} </span>:""
} }
{ {
item.praise_count && item.praise_count != 0 ? item.praise_count && item.praise_count != 0 ?
<span className="color-grey-c mr20"><span className=" item-group-icon mr5"><i className="fa fa-thumbs-o-up"></i></span>{item.praise_count} </span>:"" <span className="color-grey-c ml20"><span className=" item-group-icon mr5"><i className="fa fa-thumbs-o-up"></i></span>{item.praise_count} </span>:""
} }
{ {
item.download_count && item.download_count != 0 ? item.download_count && item.download_count != 0 ?
<span className="color-grey-c" style={{"marginRight":'1px'}}><span className=" item-group-icon mr5"><i className="fa fa-download"></i></span>{item.download_count} </span>:"" <span className="color-grey-c ml20" style={{"marginRight":'1px'}}><span className=" item-group-icon mr5"><i className="fa fa-download"></i></span>{item.download_count} </span>:""
} }
</span> </span>
</p> </p>

@ -94,6 +94,7 @@ class CaseList extends Component{
render(){ render(){
let { type , search ,libraries , totalCount ,pageSize ,page } = this.state; let { type , search ,libraries , totalCount ,pageSize ,page } = this.state;
let { checkIfLogin } = this.props; let { checkIfLogin } = this.props;
return( return(
<React.Fragment> <React.Fragment>
<img src={mainImg} width="100%" /> <img src={mainImg} width="100%" />
@ -101,7 +102,9 @@ class CaseList extends Component{
<div className="edu-back-white mb30 mt30"> <div className="edu-back-white mb30 mt30">
<p className="padding20-30 clearfix bor-bottom-greyE"> <p className="padding20-30 clearfix bor-bottom-greyE">
<span className="font-18 fl color-grey-3">教学案例</span> <span className="font-18 fl color-grey-3">教学案例</span>
<LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn">发布案例</LinkAfterLogin> <LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn" checkProfileComplete = {true}
>发布案例</LinkAfterLogin>
{/* <ActionBtn style="colorBlue" className="fr" to="/moop_cases/new">发布案例</ActionBtn> */} {/* <ActionBtn style="colorBlue" className="fr" to="/moop_cases/new">发布案例</ActionBtn> */}
</p> </p>
<div className="clearfix pl30 pr30"> <div className="clearfix pl30 pr30">

@ -203,7 +203,9 @@ class CaseNew extends Component{
author_name:values.userName, author_name:values.userName,
author_school_name:values.userUnit, author_school_name:values.userUnit,
content:values.description, content:values.description,
attachment_ids:this.state.filesID, attachment_ids:this.state.contentFileList.map(item=>{
return (item.response ? item.response.id : item.id )
}),
tag_ids:this.state.casesTags, tag_ids:this.state.casesTags,
cover_id:this.state.coverID, cover_id:this.state.coverID,
publish:type == 'save' ? false : true publish:type == 'save' ? false : true
@ -436,7 +438,7 @@ class CaseNew extends Component{
<Form.Item> <Form.Item>
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
{ {
(!caseID || (CaseDetail && CaseDetail.status == "pending")) ? <Button type="primary" onClick={()=>this.handleSubmit("submit")} className="defalutSubmitbtn fl mr20">申请发布</Button> : "" (!caseID || (CaseDetail && CaseDetail.status == "pending" || CaseDetail && CaseDetail.status == "refused")) ? <Button type="primary" onClick={()=>this.handleSubmit("submit")} className="defalutSubmitbtn fl mr20">申请发布</Button> : ""
} }
<a className="defalutCancelbtn fl" onClick={()=>this.handleSubmit("save")}>保存</ a> <a className="defalutCancelbtn fl" onClick={()=>this.handleSubmit("save")}>保存</ a>
</div> </div>

@ -193,12 +193,20 @@ class DetailCards extends Component{
} }
startgameid=(id)=>{ startgameid=(id)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
return return
} }
let url = "/shixuns/" + id + "/shixun_exec.json"; let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
@ -330,8 +338,8 @@ class DetailCards extends Component{
<div> <div>
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
<Modals <Modals

@ -326,6 +326,15 @@ class PathDetailIndex extends Component{
return( return(
<div className="newContainer"> <div className="newContainer">
<style>
{
`
.head-right{
line-height: 30px;
}
`
}
</style>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}
@ -417,7 +426,7 @@ class PathDetailIndex extends Component{
</div> </div>
} }
{ {
detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" : this.props.checkIfLogin()===false?"":detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" :
<div className="edu-back-white myProgress padding40-20 mb10"> <div className="edu-back-white myProgress padding40-20 mb10">
<p className="mb20"> <p className="mb20">
<span className="font-16 mr10">我的进展</span> <span className="font-16 mr10">我的进展</span>

@ -1,216 +1,213 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Modal,Checkbox,Input } from "antd"; import { Modal,Checkbox,Input } from "antd";
import axios from 'axios'; import axios from 'axios';
const Search = Input.Search; const Search = Input.Search;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
class addCollaborators extends Component{ class addCollaborators extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
addPartner:false, addPartner:false,
page:1, page:1,
partnerList:undefined, partnerList:undefined,
search:'', search:'',
partnerListid:[], partnerListid:[],
checkAll: false, checkAll: false,
optionss:[] optionss:[]
} }
} }
addBox=()=>{ addBox=()=>{
this.setState({ this.setState({
addPartner:true, addPartner:true,
search:"", search:"",
page:1, page:1,
partnerList:undefined, partnerList:undefined,
optionss:[] optionss:[]
}) })
this.searchList("") this.searchList("")
} }
hideAddBox=()=>{ hideAddBox=()=>{
this.setState({ this.setState({
addPartner:false, addPartner:false,
optionss:[], optionss:[],
partnerListid:[] partnerListid:[]
}) })
} }
// 搜索框输入 // 搜索框输入
changeSearchValue=(e)=>{ changeSearchValue=(e)=>{
this.setState({ this.setState({
search: e.target.value search: e.target.value
}) })
} }
// 回车搜索--搜索成功后page为1 // 回车搜索--搜索成功后page为1
searchList=()=>{ searchList=()=>{
let id=this.props.match.params.pathId; let id=this.props.match.params.pathId;
let {search,page}=this.state; let {search,page}=this.state;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page; let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page;
axios.post(url).then((result)=>{ axios.post(url).then((result)=>{
if(result.status==200){ if(result.status==200){
let list=result.data.users; let list=result.data.users;
let optionss=[] let optionss=[]
for(var i=0; i<list.length;i++){ for(var i=0; i<list.length;i++){
optionss.push(list[i].user_id) optionss.push(list[i].user_id)
} }
this.setState({ this.setState({
partnerList:result.data.users, partnerList:result.data.users,
page:1, page:1,
optionss:optionss optionss:optionss
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
SaveAddBox=()=>{ SaveAddBox=()=>{
let {partnerListid} =this.state; let {partnerListid} =this.state;
let id=this.props.match.params.pathId; let id=this.props.match.params.pathId;
let url="/paths/"+id+"/add_subject_members.json" let url="/paths/"+id+"/add_subject_members.json"
axios.post(url,{ axios.post(url,{
user_ids:partnerListid user_ids:partnerListid
}).then((response) => { }).then((response) => {
if(response.status==200){ if(response.status==200){
this.setState({ this.setState({
addPartner:false, addPartner:false,
optionss:[], optionss:[],
partnerListid:[] partnerListid:[]
}) })
this.props.updatadetailInfoLists(); this.props.updatadetailInfoLists();
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
} }
addCollaboratorsid=(id)=>{ addCollaboratorsid=(id)=>{
this.setState({ this.setState({
partnerListid:id partnerListid:id
}) })
} }
onCheckAllChange = (e) => { onCheckAllChange = (e) => {
let {optionss} =this.state; let {optionss} =this.state;
if(e.target.checked===true){ if(e.target.checked===true){
this.setState({ this.setState({
checkAll: e.target.checked, checkAll: e.target.checked,
partnerListid:optionss partnerListid:optionss
}); });
}else{ }else{
this.setState({ this.setState({
checkAll: e.target.checked, checkAll: e.target.checked,
partnerListid:[] partnerListid:[]
}); });
} }
} }
contentViewScroll=(e)=>{ contentViewScroll=(e)=>{
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部"); // console.log("到达底部");
let id=this.props.match.params.pathId; let id=this.props.match.params.pathId;
let {search,page,partnerList,optionss}=this.state; let {search,page,partnerList,optionss}=this.state;
let newpage=page+1; let newpage=page+1;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage; let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage;
axios.post(url).then((result)=>{ axios.post(url).then((result)=>{
if(result.status==200){ if(result.status==200){
let list=result.data.users; let list=result.data.users;
let newlist=partnerList; let newlist=partnerList;
for(var j=0; j<list.length;j++){ for(var j=0; j<list.length;j++){
newlist.push(list[j]) newlist.push(list[j])
} }
let newoptionss=optionss let newoptionss=optionss
for(var i=0; i<list.length;i++){ for(var i=0; i<list.length;i++){
newoptionss.push(list[i].user_id) newoptionss.push(list[i].user_id)
} }
this.setState({ this.setState({
partnerList:newlist, partnerList:newlist,
page:newpage, page:newpage,
optionss:optionss optionss:optionss
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
} }
render(){ render(){
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state; let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
return( return(
<div className="edu-back-white bor-top-greyE addTeamMember"> this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
{ <div className="edu-back-white bor-top-greyE addTeamMember">
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true? <a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a> <Modal
:"" keyboard={false}
} title="添加合作者"
visible={addPartner}
<Modal closable={false}
keyboard={false} footer={null}
title="添加合作者" destroyOnClose={true}
visible={addPartner} >
closable={false} <div className="newupload_conbox clearfix">
footer={null} <div className="mb20">
destroyOnClose={true} <Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}}
> autocomplete="off"
<div className="newupload_conbox clearfix"> value={search}
<div className="mb20"> onInput={this.changeSearchValue}
<Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}} onSearch={search => this.searchList(search)} />
autocomplete="off" </div>
value={search} <p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}>
onInput={this.changeSearchValue} <Checkbox className="fl"
onSearch={search => this.searchList(search)} /> onChange={this.onCheckAllChange}
</div> checked={this.state.checkAll}
<p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}> ></Checkbox>
<Checkbox className="fl" <span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span>
onChange={this.onCheckAllChange} <span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span>
checked={this.state.checkAll} <span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span>
></Checkbox> <span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span>
<span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span> </p>
<span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span> <ul className="upload_select_box fl clearfix mb15"
<span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span> style={{"overflow-y":"auto"}}
<span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span> id="search_not_members_list"
</p>
<ul className="upload_select_box fl clearfix mb15" onScroll={this.contentViewScroll}
style={{"overflow-y":"auto"}} >
id="search_not_members_list" <CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}>
{
onScroll={this.contentViewScroll} partnerList && partnerList.map((item,key)=>{
> return(
<CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}> <li className="clearfix">
{ <Checkbox value={item.user_id} key={key} className="fl"></Checkbox>
partnerList && partnerList.map((item,key)=>{ <a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a>
return( <span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span>
<li className="clearfix"> <span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span>
<Checkbox value={item.user_id} key={key} className="fl"></Checkbox> <span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
<a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a> </li>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span> )
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span> })
<span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span> }
</li> </CheckboxGroup>
) </ul>
}) <div className="mt20 marginauto clearfix edu-txt-center">
} <a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
</CheckboxGroup> <a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
</ul> </div>
<div className="mt20 marginauto clearfix edu-txt-center"> </div>
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a> </Modal>
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a> </div>:""
</div>
</div> )
</Modal> }
</div> }
)
}
}
export default addCollaborators; export default addCollaborators;

@ -27,9 +27,27 @@ class sendPanel extends Component{
//发送至 //发送至
SentToLesson =() =>{ SentToLesson =() =>{
this.setState({ let id=this.props.detailInfoList.id;
sentShixunPath:true let url="/paths/"+id+"/choose_course.json";
}) axios.get(url).then((result)=>{
if(result.status==200){
if (result.data.status === 403||result.data.status === 402||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({
sendToCourseList:result.data,
sentShixunPath:true
})
}
}
}).catch((error)=>{
console.log(error);
})
// this.setState({
// sentShixunPath:true
// })
} }
//隐藏发送至弹框 //隐藏发送至弹框
hideSenttothevalue =()=>{ hideSenttothevalue =()=>{
@ -99,17 +117,17 @@ class sendPanel extends Component{
} }
componentDidMount(){ componentDidMount(){
let id=this.props.detailInfoList.id; // let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json"; // let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{ // axios.get(url).then((result)=>{
if(result.status==200){ // if(result.status==200){
this.setState({ // this.setState({
sendToCourseList:result.data // sendToCourseList:result.data
}) // })
} // }
}).catch((error)=>{ // }).catch((error)=>{
console.log(error); // console.log(error);
}) // })
} }
cardsModalcancel=()=>{ cardsModalcancel=()=>{

@ -14,7 +14,7 @@ class ShixunPathSearch extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
order:"publish_time", order:"updated_at",
select:0, select:0,
search:"", search:"",
page:1, page:1,
@ -126,20 +126,20 @@ class ShixunPathSearch extends Component{
</div> </div>
</div> </div>
<div className="mt20 educontent mb20 clearfix"> <div className="mt20 educontent mb20 clearfix">
<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a> {/*<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a>*/}
<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a> {/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a href="javascript:void(0)" className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a> <a className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a>
<a href="javascript:void(0)" className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a> <a className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a>
<div className="fr mr5 search-new"> {/*<div className="fr mr5 search-new">*/}
{/* <Search {/*/!* <Search*/}
placeholder="请输入路径名称进行搜索" {/*placeholder="请输入路径名称进行搜索"*/}
id="subject_search_input" {/*id="subject_search_input"*/}
value={search} {/*value={search}*/}
onInput={this.inputSearchValue} {/*onInput={this.inputSearchValue}*/}
onSearch={this.searchValue} {/*onSearch={this.searchValue}*/}
autoComplete="off" {/*autoComplete="off"*/}
></Search> */} {/*></Search> *!/*/}
</div> {/*</div>*/}
</div> </div>
<PathCard {...this.props} {...this.state}></PathCard> <PathCard {...this.props} {...this.state}></PathCard>
{ {

@ -204,14 +204,14 @@ class PackageConcent extends Component {
<div className="educontent clearfix mtf10" style={{flex: "1 0 auto"}}> <div className="educontent clearfix mtf10" style={{flex: "1 0 auto"}}>
{isRender===true?<LoginDialog {isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()} Modifyloginvalue={()=>this.Modifyloginvalue()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
<div className="stud-class-set"> <div className="stud-class-set">
<div className="news"> <div className="news">

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
// /images/educoder/icon/search.svg // /images/educoder/icon/search.svg
import { getImageUrl, toPath } from 'educoder' import { getImageUrl, toPath ,trigger,broadcastChannelPostMessage} from 'educoder'
import axios from 'axios'; import axios from 'axios';
@ -30,8 +30,6 @@ import 'antd/lib/input/style/index.css';
import './TPMIndex.css'; import './TPMIndex.css';
import { trigger, broadcastChannelPostMessage } from 'educoder';
const $ = window.$ const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用 // TODO 这部分脚本从公共脚本中直接调用
@ -316,6 +314,7 @@ class NewHeader extends Component {
// this.setState({ // this.setState({
// isRender:true // isRender:true
// }) // })
broadcastChannelPostMessage('refreshPage')
window.location.href = "/"; window.location.href = "/";
} }
}).catch((error) => { }).catch((error) => {
@ -649,7 +648,7 @@ submittojoinclass=(value)=>{
return ( return (
<div className="newHeader" id="nHeader" > <div className="newHeaders" id="nHeader" >
{isRender===true?<LoginDialog {isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()} Modifyloginvalue={()=>this.Modifyloginvalue()}
@ -659,10 +658,10 @@ submittojoinclass=(value)=>{
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
<a href="/" className={"fl mr60 ml25"}> <a href="/" className={"fl mr60 ml25 mt15"}>
<img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img> <img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
</a> </a>
@ -806,11 +805,11 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %> <%= link_to '注册', user_join_path, :className => "ml5" %>
</span>*/} </span>*/}
{ user===undefined? { user===undefined?
<span className="font-15 fr mt17 ml10 mr25"> <span className="font-15 fr mt17 ml5 mr25">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a> <a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em> <em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a> <a href={"/register"} className="mr5 color-white">注册</a>
</span> :user.login===""?<span className="font-15 fr mt17 ml20 mr25"> </span> :user.login===""?<span className="font-15 fr mt17 ml5 mr25">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a> <a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em> <em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a> <a href={"/register"} className="mr5 color-white">注册</a>
@ -881,9 +880,9 @@ submittojoinclass=(value)=>{
/>:""} />:""}
{/* /courses/join_course_multi_role */} {/* /courses/join_course_multi_role */}
{/*<li>*/} <li>
<a onClick={this.tojoinitem}>加入项目</a> <a onClick={this.tojoinitem}>加入项目</a>
{/*</li>*/} </li>
{tojoinitemtype===true?<Modal {tojoinitemtype===true?<Modal
keyboard={false} keyboard={false}
title="加入项目" title="加入项目"

@ -172,7 +172,17 @@ class TPMBanner extends Component {
* 发送至按钮 * 发送至按钮
* */ * */
Senttothe=()=>{ Senttothe=()=>{
let id = this.props.match.params.shixunId; if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json"; let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({ this.setState({
Senttothetype:true Senttothetype:true
@ -384,6 +394,11 @@ class TPMBanner extends Component {
//开始实战按钮 //开始实战按钮
startshixunCombat=(id, reset)=>{ startshixunCombat=(id, reset)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
@ -471,7 +486,22 @@ class TPMBanner extends Component {
}) })
} }
render() {
showonMouseOver=()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
}
hideonMouseOut=()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
}
render() {
let { let {
Forkvisible, Forkvisible,
Senttothetype, Senttothetype,
@ -541,21 +571,6 @@ class TPMBanner extends Component {
// } // }
// } // }
// } // }
$("#commentsStar").hover(()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
},()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
})
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -571,8 +586,8 @@ class TPMBanner extends Component {
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
@ -617,12 +632,12 @@ class TPMBanner extends Component {
</li> </li>
</ul> </ul>
<div className="pr fl" id="commentsStar"> <div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
<div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div> <div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo"> <div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/> <Rating value={star_info[0]} disabled allowHalf/>
</div> </div>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}}> <div id="ratePanel" className="showratePanel" style={{"width":"512px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div className="pr"> <div className="pr">
<span className="rateTrangle"></span> <span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}> <div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
@ -638,7 +653,7 @@ class TPMBanner extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className="fr"> <div className="fr width360">
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
@ -900,18 +915,25 @@ class TPMBanner extends Component {
</div> </div>
</div> </div>
{this.state.Senttothevcaluetype===true?<div className={"color-red"}>请选择你要发送的课堂</div>:""} {this.state.Senttothevcaluetype===true?<div className={"color-red"}>请选择你要发送的课堂</div>:""}
<div className="mt10 marginauto"> <div className="mt10 marginauto" style={{display: courses_count > 12 ? "block" : "none"}}>
<Pagination size="small" style={{display: courses_count > 12 ? "block" : "none"}} <Pagination size="small" className="mb20"
showQuickJumper defaultCurrent={1} current={pages} pageSize={12} showQuickJumper defaultCurrent={1} current={pages} pageSize={12}
total={courses_count} onChange={this.onChangesendeSenttothe}/> total={courses_count} onChange={this.onChangesendeSenttothe}/>
</div>
<a className="task-btn task-btn-orange fr margin-tp26" <div className="mt10 marginauto flexbannerright">
onClick={this.sendeSenttothevcalue} <div className={"-flex"}></div>
id="submit_send_shixun">确定</a> <div className={"-flex"}></div>
<div className={"-flex"}>
<a onClick={this.hideSenttothevcalue}
className="pop_close task-btn mr10 ml25 margin-tp26">取消</a>
<a className="task-btn task-btn-orange margin-tp26"
onClick={this.sendeSenttothevcalue}
id="submit_send_shixun">确定</a>
</div>
<a onClick={this.hideSenttothevcalue}
className="pop_close task-btn fr mr10 margin-tp26">取消</a> </div>
</div>
</div> </div>
</div> </div>

@ -10,6 +10,8 @@ import axios from 'axios';
import './TPMIndex.css' import './TPMIndex.css'
import LoginDialog from '../login/LoginDialog'; import LoginDialog from '../login/LoginDialog';
import AccountProfile from '../user/AccountProfile';
import Trialapplication from "../login/Trialapplication"; import Trialapplication from "../login/Trialapplication";
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
// import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-common.css'
@ -33,14 +35,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?7`)); .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?7`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`));
// index.html有加载 // index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?7`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
@ -76,7 +78,8 @@ export function TPMIndexHOC(WrappedComponent) {
Footerdown:undefined, Footerdown:undefined,
coursedata: {}, coursedata: {},
isRender: false isRender: false,
AccountProfiletype: false
} }
} }
@ -300,11 +303,26 @@ export function TPMIndexHOC(WrappedComponent) {
isRender: true isRender: true
}) })
} }
checkIfLogin = () => { checkIfLogin = () => {
return this.state.current_user && this.state.current_user.login != '' return this.state.current_user && this.state.current_user.login != ''
} }
hideAccountProfile = () => {
this.setState({
AccountProfiletype: false
})
}
showProfileCompleteDialog = () => {
this.setState({
AccountProfiletype: true
})
}
checkIfProfileCompleted = () => {
return this.state.current_user && this.state.current_user.profile_completed
}
render() { render() {
let{Headertop,Footerdown, isRender}=this.state; let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state;
const common = { const common = {
isSuperAdmin:this.isSuperAdmin, isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator, isAdminOrCreator:this.isAdminOrCreator,
@ -319,14 +337,21 @@ export function TPMIndexHOC(WrappedComponent) {
showLoginDialog: this.showLoginDialog, showLoginDialog: this.showLoginDialog,
checkIfLogin: this.checkIfLogin, checkIfLogin: this.checkIfLogin,
showProfileCompleteDialog: this.showProfileCompleteDialog,
checkIfProfileCompleted: this.checkIfProfileCompleted,
} }
return ( return (
<div> <div>
{isRender===true ? <LoginDialog {isRender===true ? <LoginDialog
Modifyloginvalue={()=>this.hideLoginDialog()} Modifyloginvalue={()=>this.hideLoginDialog()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/> : ""} /> : ""}
{AccountProfiletype===true ? <AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<SiderBar Headertop={Headertop}/> <SiderBar Headertop={Headertop}/>
{/* 注释掉了1440 影响到了手机屏幕的展示 */} {/* 注释掉了1440 影响到了手机屏幕的展示 */}
<style>{ <style>{
@ -336,7 +361,16 @@ export function TPMIndexHOC(WrappedComponent) {
max-width: unset; max-width: unset;
overflow: hidden; overflow: hidden;
} }
.newHeaders{
max-width: unset;
background: #24292D !important;
width: 100%;
height: 60px !important;
min-width: 1200px;
z-index: 1000;
-moz-box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
}
` `
}</style> }</style>
<NewHeader {...this.state} {...this.props}></NewHeader> <NewHeader {...this.state} {...this.props}></NewHeader>

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor'; import MonacoEditor from 'react-monaco-editor';
//MonacoDiffEditor 对比模式 //MonacoDiffEditor 对比模式
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb} from 'antd'; import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification} from 'antd';
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
@ -15,7 +15,7 @@ import axios from 'axios';
import './css/TPMsettings.css'; import './css/TPMsettings.css';
import { getImageUrl, toPath, getUrl } from 'educoder'; import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll} from 'educoder';
let origin = getUrl(); let origin = getUrl();
@ -30,7 +30,7 @@ let currentValue;
const Option = Select.Option; const Option = Select.Option;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const confirm = Modal.confirm;
// 处理整点 半点 // 处理整点 半点
// 取传入时间往后的第一个半点 // 取传入时间往后的第一个半点
export function handleDateStrings(dateString) { export function handleDateStrings(dateString) {
@ -207,6 +207,7 @@ export default class TPMsettings extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
fileList: [],
commandLine: 0, commandLine: 0,
Openpublic: 0, Openpublic: 0,
settingsData: undefined, settingsData: undefined,
@ -268,7 +269,8 @@ export default class TPMsettings extends Component {
pod_exist_time: undefined, pod_exist_time: undefined,
pod_exist_timetype: false, pod_exist_timetype: false,
shixunmemoMDvalue:"", shixunmemoMDvalue:"",
language:"" language:"",
deleteisnot:true
} }
} }
descriptionMD=(initValue, id)=> { descriptionMD=(initValue, id)=> {
@ -1011,32 +1013,168 @@ export default class TPMsettings extends Component {
}) })
} }
sendsure_apply = () => { setlanguagewrite = (e)=>{
let {sendsure_applyvalue} = this.state; this.setState({
let url = "/shixuns/apply_shixun_mirror.json"; languagewrite: e.target.value
axios.post(url, { })
note: sendsure_applyvalue }
}).then((response) => {
if (response.status === 200) {
if (response.data.status == 1) {
this.setState({
postapplyvisible: false,
postapplytitle: true
})
}
} setsystemenvironment = (e) => {
}).catch((error) => { this.setState({
console.log(error) systemenvironment: e.target.value
}); })
}
} settestcoderunmode = (e) => {
this.setState({
testcoderunmode: e.target.value
})
sendhideModaly = () => { }
this.setState({
postapplyvisible: false sendsure_apply = () => {
}) let {languagewrite,systemenvironment,testcoderunmode} = this.state;
} // console.log("点击确定")
// console.log("languagewrite"+languagewrite);
// console.log("systemenvironment"+systemenvironment);
// console.log("testcoderunmode"+testcoderunmode);
// let attachment_ids = undefined
// if (this.state.fileList) {
// attachment_ids = this.state.fileList.map(item => {
// return item.response ? item.response.id : item.id
// })
// }
if(languagewrite === undefined || languagewrite === "" ){
// this.props.showNotification(`请填写该镜像是基于什么语言`);
this.setState({
languagewritetype:true
})
return
}
if(systemenvironment === undefined || systemenvironment === ""){
// this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
this.setState({
systemenvironmenttype:true
})
return;
}
if(testcoderunmode === undefined || testcoderunmode === "") {
// this.props.showNotification(`请填写该镜像中测试代码运行方式`);
this.setState({
testcoderunmodetype:true
})
return;
}
var attachment_ids=undefined;
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
}
if( attachment_ids === undefined || attachment_ids.length===0){
// notification.open(
// {
// message: '提示',
// description:
// '请上传附件!',
//
// }
// )
this.setState({
attachmentidstype:true
})
return;
}
// console.log("attachment_ids"+attachment_ids);
// alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids);
var data={
language:languagewrite,
runtime:systemenvironment,
run_method:testcoderunmode,
attachment_id:attachment_ids[0],
}
var url =`/shixuns/apply_shixun_mirror.json`;
axios.post(url,data
).then((response) => {
try {
if (response.data) {
// const { id } = response.data;
// if (id) {
if(this.state.file !== undefined){
console.log("549");
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
// this.props.showNotification('提交成功!');
notification.open(
{
message: '提示',
description:
'提交成功!',
}
)
this.sendhideModaly()
// this.props.history.push(`/courses/${cid}/graduation_topics`);
// }
}
}catch (e) {
}
})
}
sendhideModaly = () => {
this.setState({
postapplyvisible: false,
})
if(this.state.file !== undefined){
console.log("580");
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
}
yeshidemodel = () => { yeshidemodel = () => {
this.setState({ this.setState({
@ -1198,29 +1336,80 @@ export default class TPMsettings extends Component {
}) })
} }
handleChange = (info) => {
console.log("handleChange1");
let {fileList}=this.state;
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false});
}
}
onAttachmentRemove = (file) => {
confirm({
title: '确定要删除这个附件吗?',
okText: '确定',
cancelText: '取消',
// content: 'Some descriptions',
onOk: () => {
console.log("665")
this.deleteAttachment(file)
},
onCancel() {
console.log('Cancel');
},
});
return false;
}
deleteAttachment = (file) => {
console.log(file);
let id=file.response ==undefined ? file.id : file.response.id
const url = `/attachments/${id}.json`
axios.delete(url, {
})
.then((response) => {
if (response.data) {
const { status } = response.data;
if (status == 0) {
// console.log('--- success')
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
deleteisnot:true
};
});
}
}
})
.catch(function (error) {
console.log(error);
});
}
render() { render() {
let { let {
postapplyvisible, postapplyvisible,
sendsure_applyvalue,
postapplytitle, postapplytitle,
shixunnametype, shixunnametype,
shixunmaintype, shixunmaintype,
evaluate_scripttype, evaluate_scripttype,
exec_timetype,
traineetype, traineetype,
standard_scripts, standard_scripts,
description,
evaluate_script,
name, name,
settingsData, settingsData,
webssh, webssh,
use_scope, use_scope,
shixunsstatus,
shixunsID, shixunsID,
exec_time,
pod_exist_time,
pod_exist_timetype,
can_copy, can_copy,
choice_standard_scripts, choice_standard_scripts,
Executiveordervalue, Executiveordervalue,
@ -1241,19 +1430,15 @@ export default class TPMsettings extends Component {
standard_scriptsModal, standard_scriptsModal,
standard_scriptsModals, standard_scriptsModals,
SelectTheCommandtype, SelectTheCommandtype,
status,
opers,
operss,
opersss,
testscripttiptype, testscripttiptype,
operateshixunstype, operateshixunstype,
opening_time, opening_time,
opensmail,
scope_partmenttype, scope_partmenttype,
newuse_scope, newuse_scope,
scope_partments, scope_partments,
shixunmemoMDvalue,delType, shixunmemoMDvalue,delType,
shixun_service_configs shixun_service_configs,
fileList,
} = this.state; } = this.state;
let options; let options;
@ -1265,7 +1450,45 @@ export default class TPMsettings extends Component {
) )
}) })
} }
const uploadProps = {
width: 600,
fileList,
multiple: true,
// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange,
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
// console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 50;
if (!isLt150M) {
// this.props.showNotification(`文件大小必须小于50MB`);
notification.open(
{
message: '提示',
description:
'文件大小必须小于50MB',
}
)
}
if(this.state.file !== undefined){
console.log("763")
this.setState({
file:file
})
}else {
this.setState({
file:file
})
}
console.log("handleChange2");
return isLt150M;
},
}
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false; let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
@ -1391,13 +1614,13 @@ export default class TPMsettings extends Component {
}) })
} }
</Select> </Select>
{/*<p*/} <p
{/*className="edu-txt-left font-12"*/} className="edu-txt-left font-12"
{/*style={{display:operateauthority?"block":'none'}}*/} style={{display:operateauthority?"block":'none'}}
{/*>*/} >
{/*列表中没有?*/} 列表中没有
{/*<a className="color-blue" onClick={this.post_apply}>申请新建</a>*/} <a className="color-blue" onClick={this.post_apply}>申请新建</a>
{/*</p>*/} </p>
<Modal <Modal
keyboard={false} keyboard={false}
@ -1405,26 +1628,75 @@ export default class TPMsettings extends Component {
visible={postapplyvisible} visible={postapplyvisible}
closable={false} closable={false}
footer={null} footer={null}
width={850}
heigth={720}
> >
<div> <div>
<li className="clearfix mb15"> <li className="clearfix ml82" >
<label className="panel-form-label fl"><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
style={{width:'100%'}} style={{width:'89%',height:'100px'}}
onInput={this.sendsure_applyvalues} onInput={this.setlanguagewrite}
value={sendsure_applyvalue} value={this.state.languagewrite}
placeholder="请输入新增镜像需要安装的软件及版本等信息" id="demand_info"></textarea> placeholder="请填写该镜像是基于什么语言示例Python"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix ml1">
<label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 "
onInput={this.setsystemenvironment}
style={{height:'100px'}}
value={this.state.systemenvironment}
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}</div>
<li className="clearfix">
<label className="fl mt10" ><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 "
onInput={this.settestcoderunmode}
value={this.state.testcoderunmode}
style={{height:'100px'}}
placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}</div>
<li className="clearfix ml50">
<label className="panel-form-label fl mt-5"><span
className="color-red fl">*</span>&nbsp;&nbsp;</label>
<div className="mt10" style={{
display: "inline-block"
}}>
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
</div>
</li>
<div className={"color-red shixunspanred"}>
{this.state.attachmentidstype===true?"请上传附件":""}
</div>
<li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30"
onClick={() => this.sendhideModaly()}
>取消</a>
<Button type="primary" onClick={()=>this.sendsure_apply()}
className="task-btn task-btn-orange">确定</Button>
</li> </li>
<a onClick={() => this.sendsure_apply()}
className="task-btn task-btn-orange fr mr12">确定</a>
<a className="pop_close task-btn fr mr10"
onClick={() => this.sendhideModaly()}
>取消</a>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
</Modal> </Modal>
<Modal <Modal
keyboard={false} keyboard={false}
title="提示" title="提示"

@ -100,4 +100,14 @@ a.newuse_scope-btn {
.shixunmemoMDdiv{ .shixunmemoMDdiv{
width: 99%; width: 99%;
height: 615px; height: 615px;
} }
.shixunspanred{
margin-left: 142px;
margin-top: 5px;
margin-bottom: 5px;
}
.ml82{
margin-left:82px;
}

@ -178,7 +178,9 @@ export default class TPMchallengesnew extends Component {
} }
CreatePracticesend = () => { CreatePracticesend = () => {
this.setState({
this.setState({
CreatePracticesendtype:true CreatePracticesendtype:true
}) })
@ -237,17 +239,18 @@ export default class TPMchallengesnew extends Component {
exec_time:exec_time exec_time:exec_time
}).then((response) => { }).then((response) => {
if (response.data.status === 1) { if (response.data.status === 1) {
$("html").animate({ scrollTop: 0 }) // $("html").animate({ scrollTop: 0 })
this.setState({ window.location.href=`/shixuns/${id}/challenges/${response.data.challenge_id}/editcheckpoint`;
setopen: true, // this.setState({
CreatePracticesendtype:false, // setopen: true,
tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2", // CreatePracticesendtype:false,
tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3", // tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",
}) // tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3",
// })
} }
this.props.showSnackbar(response.data.messages); // this.props.showSnackbar(response.data.messages);
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });

@ -124,7 +124,8 @@ export default class TPMevaluation extends Component {
handpathopt:false, handpathopt:false,
scorevalue:false, scorevalue:false,
markvalue:true, markvalue:true,
scoretype:undefined scoretype:undefined,
web_route:null
} }
} }
@ -215,6 +216,8 @@ export default class TPMevaluation extends Component {
position: response.data.position, //int 关卡位置,导航栏中的第几关 position: response.data.position, //int 关卡位置,导航栏中的第几关
scorevalue:response.data.test_set_score, scorevalue:response.data.test_set_score,
markvalue:response.data.test_set_average, markvalue:response.data.test_set_average,
web_route:response.data.web_route,
has_web_route:response.data.has_web_route
}) })
this.evaluationoninputvalueonload(); this.evaluationoninputvalueonload();
if(response.data.power===false){ if(response.data.power===false){
@ -579,7 +582,7 @@ export default class TPMevaluation extends Component {
$('textarea[autoHeight]').autoHeight(); $('textarea[autoHeight]').autoHeight();
} }
submitarbitrationevaluation=()=>{ submitarbitrationevaluation=()=>{
let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue}=this.state; let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue,web_route}=this.state;
let newscorevalue; let newscorevalue;
@ -647,7 +650,8 @@ export default class TPMevaluation extends Component {
expect_picture_path:shixunfilestandardpicturepath, expect_picture_path:shixunfilestandardpicturepath,
picture_path:shixunfilepicturepath, picture_path:shixunfilepicturepath,
test_set_score:newscorevalue, test_set_score:newscorevalue,
test_set_average:markvalue test_set_average:markvalue,
web_route:web_route===null?undefined:web_route
}, },
test_set:evaluationlist test_set:evaluationlist
} }
@ -741,6 +745,12 @@ export default class TPMevaluation extends Component {
}); });
} }
updatewebroute=(e)=>{
this.setState({
web_route:e.target.value
})
}
render() { render() {
let { let {
@ -768,10 +778,11 @@ export default class TPMevaluation extends Component {
next_challenge, next_challenge,
StudentTaskPapers, StudentTaskPapers,
StudentTaskDocs, StudentTaskDocs,
handpathopt, web_route,
scorevalue, scorevalue,
markvalue, markvalue,
scoretype scoretype,
has_web_route
} = this.state; } = this.state;
let tab1url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/editcheckpoint"; let tab1url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/editcheckpoint";
@ -978,6 +989,20 @@ export default class TPMevaluation extends Component {
</div> </div>
</div> </div>
{pathoptionvalue===4&&web_route!=null||pathoptionvalue===4&&has_web_route===true?<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">Web路由</p>
<div className="df">
<div className="flex1 mr20">
<input type="text" className="input-100-45 change" autoComplete="off"
id="shixun_file_picture_path" name="challenge[picture_path]"
value={web_route}
onInput={(e)=>this.updatewebroute(e)}
placeholder="网站类型实训请填写Web路由地址。例java/mypage"/>
</div>
</div>
</div>
</div>:""}
{pathoptionvalue===1||pathoptionvalue===5||pathoptionvalue===6?<div className="edu-back-white mb10 clearfix"> {pathoptionvalue===1||pathoptionvalue===5||pathoptionvalue===6?<div className="edu-back-white mb10 clearfix">
<div className="padding40-20"> <div className="padding40-20">

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC'; import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder'; import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd'; import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -635,16 +635,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -676,16 +680,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
} }
@ -752,10 +760,16 @@ class Newshixuns extends Component {
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
let {fileList}=this.state;
console.log("handleChange1"); console.log("handleChange1");
let fileList = info.fileList; if(fileList.length===0){
this.setState({ fileList:fileList, let fileLists = info.fileList;
deleteisnot:false}); this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false});
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
confirm({ confirm({
@ -837,7 +851,6 @@ class Newshixuns extends Component {
} }
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const thiss=this;
let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state; let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state;
let options let options
if (departmentslist != undefined) { if (departmentslist != undefined) {
@ -871,14 +884,13 @@ class Newshixuns extends Component {
} }
) )
} }
if(thiss.state.file !== undefined){ if(this.state.file !== undefined){
console.log("763") console.log("763")
// thiss.deleteAttachment(thiss.state.file); this.setState({
thiss.setState({
file:file file:file
}) })
}else { }else {
thiss.setState({ this.setState({
file:file file:file
}) })
} }
@ -1004,7 +1016,7 @@ class Newshixuns extends Component {
> >
{/*<Form onSubmit={this.handleSubmit}>*/} {/*<Form onSubmit={this.handleSubmit}>*/}
<div> <div>
<li className="clearfix ml85" > <li className="clearfix ml82" >
<label className="fl mt10 "><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
@ -1015,7 +1027,7 @@ class Newshixuns extends Component {
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div> <div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix"> <li className="clearfix ml1">
<label className="panel-form-label fl ml50"><span <label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
@ -1044,32 +1056,12 @@ class Newshixuns extends Component {
<div className="mt10" style={{ <div className="mt10" style={{
display: "inline-block" display: "inline-block"
}}> }}>
{/*<Form.Item>*/} <Upload {...uploadProps}>
{/* {*/} <Icon type="upload" className="fl mt3" > </Icon>
{/* getFieldDecorator('file',{*/} <span className="color-blue fl cdefault">上传附件</span>
{/* rules:[{*/} <span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
{/* }]*/}
{/* })(*/} </Upload>
{
deleteisnot=== true?
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
{/* )*/}
{/* }*/}
{/*</Form.Item>*/}
</div> </div>
</li> </li>
@ -1088,6 +1080,8 @@ class Newshixuns extends Component {
{/*</Form>*/} {/*</Form>*/}
</Modal> </Modal>
<Modal <Modal
keyboard={false} keyboard={false}
title="提示" title="提示"

@ -382,3 +382,6 @@ a.white-btn.use_scope-btn:hover{
margin-bottom: 5px; margin-bottom: 5px;
} }
.ml82{
margin-left: 82px;
}

@ -220,6 +220,13 @@ class Challenges extends Component {
//开始实战按钮 //开始实战按钮
startshixunCombat = (type, ids, id) => { startshixunCombat = (type, ids, id) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
@ -227,7 +234,7 @@ class Challenges extends Component {
return return
} }
debugger
let { ChallengesDataList } = this.state; let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId; // let id = this.props.match.params.shixunId;
this.setState({ this.setState({
@ -299,8 +306,8 @@ class Challenges extends Component {
<React.Fragment> <React.Fragment>
{AccountProfiletype===true?<AccountProfile {AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()} hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props} {...this.props}
{...this.state}
/>:""} />:""}
{loadingContent ? {loadingContent ?

@ -1,251 +1,253 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route} from "react-router-dom"; import { BrowserRouter as Router, Route} from "react-router-dom";
import { Switch ,Input,Tooltip,Icon} from 'antd'; import { Switch ,Input,Tooltip,Icon} from 'antd';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classNames from 'classnames' import classNames from 'classnames'
import 'antd/lib/switch/style/index.css' import 'antd/lib/switch/style/index.css'
import './shixunCss/ShixunCardList.css'; import './shixunCss/ShixunCardList.css';
import { on, off } from 'educoder' import { on, off } from 'educoder'
const $ = window.$; const $ = window.$;
const Search = Input.Search; const Search = Input.Search;
class ShixunCardList extends Component { class ShixunCardList extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state={
allevent:"desc", allevent:"desc",
mine:0, mine:0,
InputValue: props.keyword || "", InputValue: props.keyword || "",
typemy:0, typemy:0,
hots:0, hots:0,
news:0, news:0,
shixunid:"", shixunid:"",
upcircle:false, upcircle:false,
typekeyid:undefined, typekeyid:undefined,
} }
} }
componentDidUpdate = (prevProps, prevState) => { componentDidUpdate = (prevProps, prevState) => {
if (this.props.keyword != prevProps.keyword) { if (this.props.keyword != prevProps.keyword) {
this.setState({ this.setState({
InputValue: this.props.keyword InputValue: this.props.keyword
}) })
} }
} }
componentDidMount = () => { componentDidMount = () => {
on('searchKeywordChange', (event, data) => { on('searchKeywordChange', (event, data) => {
// console.log(data) // console.log(data)
this.Input_search(data) this.Input_search(data)
}) })
} }
componentWillUnmount = () => { componentWillUnmount = () => {
off('searchKeywordChange') off('searchKeywordChange')
} }
latestHot=(e,key)=>{ latestHot=(e,key)=>{
let{upcircle,typekeyid}=this.state; let{upcircle,typekeyid}=this.state;
let id = e.target.id; let id = e.target.id;
$("#"+id).siblings().removeClass("active"); $("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active"); $("#"+id).addClass("active");
let type; let type;
if(id==="all"){ // if(id==="all"){
type="publish_time"; // type="publish_time";
} // }
if(id==="hot"){ if(id==="hot"){
type="hot"; type="hot";
}else if(id==="new"){ }else if(id==="new"){
type="new"; type="new";
} }
if(typekeyid===key){ if(typekeyid===key){
if(upcircle===true){ if(upcircle===true){
this.setState({ this.setState({
upcircle:false, upcircle:false,
}) })
this.props.Shixunsupcircles("desc") this.props.Shixunsupcircles("desc")
}else if(upcircle===false){ }else if(upcircle===false){
this.setState({ this.setState({
upcircle:true, upcircle:true,
}) })
this.props.Shixunsupcircles("asc") this.props.Shixunsupcircles("asc")
} }
}else{ }else{
this.setState({ this.setState({
typekeyid:key typekeyid:key
}) })
} }
//allevent //allevent
this.props.ShixunsState(false,type); this.props.ShixunsState(false,type);
} }
onSwitchChange=(e,key)=>{ onSwitchChange=(e,key)=>{
let id=e.target.id let id=e.target.id
$("#"+id).siblings().removeClass("active"); $("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active"); $("#"+id).addClass("active");
let {typemy,upcircle,typekeyid}=this.state; let {typemy,upcircle,typekeyid}=this.state;
if(typekeyid===key){ if(typekeyid===key){
if(upcircle===true){ if(upcircle===true){
this.setState({ this.setState({
upcircle:false, upcircle:false,
}) })
this.props.Shixunsupcircles("desc") this.props.Shixunsupcircles("desc")
}else if(upcircle===false){ }else if(upcircle===false){
this.setState({ this.setState({
upcircle:true upcircle:true
}) })
this.props.Shixunsupcircles("asc") this.props.Shixunsupcircles("asc")
} }
}else{ }else{
this.setState({ this.setState({
typekeyid:key typekeyid:key
}) })
} }
if(typemy===0){ if(typemy===0){
this.setState({ this.setState({
typemy:1 typemy:1
}) })
}else{ }else{
this.setState({ this.setState({
typemy:0 typemy:0
}) })
} }
// allevent // allevent
this.props.ShixunsSwitch(); this.props.ShixunsSwitch();
} }
//输入框搜索 //输入框搜索
Input_search = (value) => { Input_search = (value) => {
this.setState({ this.setState({
InputValue: value InputValue: value
}) })
this.props.OnSearchInput(value,true); this.props.OnSearchInput(value,true);
} }
Input_searchs = (e) => { Input_searchs = (e) => {
this.setState({ this.setState({
InputValue: e.target.value InputValue: e.target.value
}) })
this.props.OnSearchInput(e.target.value,false); this.props.OnSearchInput(e.target.value,false);
} }
upcircles=(val)=>{ upcircles=(val)=>{
if(val==="asc"){ if(val==="asc"){
this.setState({ this.setState({
upcircle:false, upcircle:false,
}) })
this.props.Shixunsupcircles("desc") this.props.Shixunsupcircles("desc")
}else if(val==="desc"){ }else if(val==="desc"){
this.setState({ this.setState({
upcircle:true upcircle:true
}) })
this.props.Shixunsupcircles("asc") this.props.Shixunsupcircles("asc")
} }
} }
render(){ render(){
let {mine,InputValue,upcircle}=this.state; let {mine,InputValue,upcircle}=this.state;
return ( return (
<div className="educontent mt20"> <div className="educontent mt20">
<div className="clearfix"> <div className="clearfix">
<div className="fl mr20 font-16 bestChoose shixun_repertoire active" {/*<div className="fl mr20 font-16 bestChoose shixun_repertoire active"*/}
id={"all"} {/*id={"all"}*/}
onClick={(e)=>this.latestHot(e,1)}>全部 {/*onClick={(e)=>this.latestHot(e,1)}>全部*/}
</div> {/*</div>*/}
<div className="fl mr20 font-16 bestChoose shixun_repertoire" {/*<div className="fl mr20 font-16 bestChoose shixun_repertoire"*/}
id={mine} {/*id={mine}*/}
onClick={(e)=>this.onSwitchChange(e,2)}>我的 {/*onClick={(e)=>this.onSwitchChange(e,2)}>我的*/}
</div> {/*</div>*/}
<div className="fl mr20 font-16 bestChoose shixun_repertoire" <div className="fl mr20 font-16 bestChoose shixun_repertoire active"
id="hot" id="new"
onClick={(e)=>this.latestHot(e,3)}>最热 onClick={(e)=>this.latestHot(e,4)}>最新
</div> </div>
<div className="fl font-16 bestChoose shixun_repertoire"
id="new" <div className="fl font-16 bestChoose shixun_repertoire"
onClick={(e)=>this.latestHot(e,4)}>最新 id="hot"
</div> onClick={(e)=>this.latestHot(e,3)}>最热
</div>
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"
style={{display:upcircle===true?"block":"none"}}
// onClick={()=>this.upcircles("asc")} {/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
> {/*style={{display:upcircle===true?"block":"none"}}*/}
<Tooltip placement="bottom" title={"升序"}> {/*// onClick={()=>this.upcircles("asc")}*/}
<Icon type="up-circle" theme="twoTone" /> {/*>*/}
{/*<Icon type="sort-descending" />*/} {/*<Tooltip placement="bottom" title={"升序"}>*/}
</Tooltip> {/*<Icon type="up-circle" theme="twoTone" />*/}
</div> {/*/!*<Icon type="sort-descending" />*!/*/}
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1" {/*</Tooltip>*/}
// onClick={()=>this.upcircles("desc")} {/*</div>*/}
style={{display:upcircle===true?"none":"block"}} {/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
> {/*// onClick={()=>this.upcircles("desc")}*/}
<Tooltip placement="bottom" title={"降序"}> {/*style={{display:upcircle===true?"none":"block"}}*/}
<Icon type="down-circle" theme="twoTone" /> {/*>*/}
{/*<Icon type="sort-ascending" />*/} {/*<Tooltip placement="bottom" title={"降序"}>*/}
</Tooltip> {/*<Icon type="down-circle" theme="twoTone" />*/}
</div> {/*/!*<Icon type="sort-ascending" />*!/*/}
{/*</Tooltip>*/}
<div className="fr mt3"> {/*</div>*/}
{/*<Search*/}
{/*style={{ width: 300 }}*/} {/*<div className="fr mt3">*/}
{/*className="search-new-input fl"*/} {/*<Search*/}
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/} {/*style={{ width: 300 }}*/}
{/*value={InputValue}*/} {/*className="search-new-input fl"*/}
{/*onInput={this.Input_searchs}*/} {/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
{/*onSearch={value => this.Input_search(value)}*/} {/*value={InputValue}*/}
{/*enterButton*/} {/*onInput={this.Input_searchs}*/}
{/*/>*/} {/*onSearch={value => this.Input_search(value)}*/}
{/*enterButton*/}
{/* <Search {/*/>*/}
style={{ width: 300 }}
className="fl" {/* <Search
placeholder="请输入创建者/实训/关卡名称进行搜索" style={{ width: 300 }}
value={InputValue} className="fl"
onInput={this.Input_searchs} placeholder="请输入创建者/实训/关卡名称进行搜索"
onSearch={value => this.Input_search(value)} value={InputValue}
autoComplete="off" onInput={this.Input_searchs}
></Search> */} onSearch={value => this.Input_search(value)}
</div> autoComplete="off"
<div className="fr"> ></Search> */}
<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{ {/*</div>*/}
this.props.search_tags === null ? "" : this.props.search_tags {/*<div className="fr">*/}
}</span> {/*<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{*/}
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/} {/*this.props.search_tags === null ? "" : this.props.search_tags*/}
{/*/!* <div className="controlblue"></div>*/} {/*}</span>*/}
{/*<span className="controlring"></span> *!/*/} {/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
{/*<Switch*/} {/*/!* <div className="controlblue"></div>*/}
{/*className="controlbtn mr10 mt10 pr"*/} {/*<span className="controlring"></span> *!/*/}
{/*size="small"*/} {/*<Switch*/}
{/*style={{marginTop:'1px'}}*/} {/*className="controlbtn mr10 mt10 pr"*/}
{/*onChange={this.onSwitchChange}*/} {/*size="small"*/}
{/*/>*/} {/*style={{marginTop:'1px'}}*/}
{/*</div>*/} {/*onChange={this.onSwitchChange}*/}
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/} {/*/>*/}
{/*</div>*/}
</div> {/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>
</div> {/*</div>*/}
</div> {/*<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>*/}
); </div>
} </div>
} );
}
export default ShixunCardList; }
export default ShixunCardList;

@ -28,7 +28,7 @@ class ShixunsIndex extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
order_by: "publish_time", order_by: "new",
page:1, page:1,
limit:16, limit:16,
keyword:"", keyword:"",
@ -115,10 +115,9 @@ class ShixunsIndex extends Component {
} }
allUpdatashixunlist=()=>{ allUpdatashixunlist=()=>{
let{sort}=this.state; let{sort,order_by}=this.state;
this.setState({ this.setState({
order_by: 'publish_time',
tag_level: 1, tag_level: 1,
tag_id:'', tag_id:'',
page: 1, page: 1,
@ -129,7 +128,7 @@ class ShixunsIndex extends Component {
}) })
let params={ let params={
order_by: 'publish_time', order_by:order_by,
tag_level: 1, tag_level: 1,
tag_id:'', tag_id:'',
page: 1, page: 1,
@ -379,7 +378,7 @@ class ShixunsIndex extends Component {
render() { render() {
let {middleshixundata, typepvisible, pages, search_tags, keyword,parsedid,newtag_level,newpalce} = this.state; let {middleshixundata, typepvisible, pages, search_tags, keyword,parsedid,newtag_level,newpalce} = this.state;
console.log(this.state.updata) // console.log(this.state.updata)
return ( return (
<div className="newMain clearfix backFAFAFA"> <div className="newMain clearfix backFAFAFA">
{this.state.updata===undefined?"":<UpgradeModals {this.state.updata===undefined?"":<UpgradeModals

@ -84,11 +84,13 @@ a:active{text-decoration:none;}
.height39 { .height39 {
height: 39px !important; height: 39px !important;
} }
#commentsStar{ #commentsStar{
margin-top: -7px; margin-top: -7px;
width: 90px; width: 90px;
height: 80px;
} }
.startbtnModal .ant-modal-content{ .startbtnModal .ant-modal-content{
background: transparent; background: transparent;
box-shadow: 0 4px 12px transparent; box-shadow: 0 4px 12px transparent;
@ -100,4 +102,13 @@ a:active{text-decoration:none;}
.mr51{ .mr51{
margin-right:51px; margin-right:51px;
}
.flexbannerright{
display: flex;
justify-content: flex-end;
}
.width360{
width:360px;
} }

@ -342,16 +342,14 @@ class Infos extends Component{
is_current ? is_current ?
<div className="inline"> <div className="inline">
{ {
data && data.can_apply_trial == false ? data && data.attendance_signed ?
data.attendance_signed ? <React.Fragment>
<React.Fragment> <span className="user_default_btn user_grey_btn mb5">已签到</span>
<span className="user_default_btn user_grey_btn mb5">已签到</span> <p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p> </React.Fragment>
</React.Fragment>
:
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
: :
<a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a> <a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
// <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
} }
</div> </div>
: :

@ -13,10 +13,10 @@ class SearchPage extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state={
tab:"0", tab:"1",
count:0, count:0,
keywords:undefined, keywords:undefined,
type:"shixun", type:"subject",
page:1, page:1,
perpages:20, perpages:20,
data:[], data:[],
@ -25,7 +25,7 @@ class SearchPage extends Component{
} }
//切换tab //切换tab
changeTab=(e)=>{ changeTab=(e)=>{
// course 课堂, shixun 开发社区 subject 实践课程 memo 交流问答
let types =""; let types ="";
if(parseInt(e.key)===0){ if(parseInt(e.key)===0){
@ -247,8 +247,20 @@ class SearchPage extends Component{
}) })
} }
</div> </div>
<div>
{/*合作单位*/}
{item.content.member_user_names === undefined || item.content.member_user_names===0?"": item.content.member_user_names.map((item7, key7) => {
return (
<div className={"df"}>
<span style={{flex: '0 0 82px'}}>合作团队</span>
<span className={key7>1?" tzbq ":" tzbqx"}
dangerouslySetInnerHTML={{__html:item7}} />
</div>
)
})
}
</div>
<div className="mt20"> <div className="mt20">
{/* <span className="ziticor"> {/* <span className="ziticor">

@ -98,7 +98,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
/*块状列表*/ /*块状列表*/
.square-list{width: 100%;box-sizing: border-box;margin-top:20px} .square-list{width: 100%;box-sizing: border-box;margin-top:20px}
.square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); } .square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); }
.square-Item:hover{bottom: 3px; box-shadow: 0px 0px 12px rgba(0,0,0,0.3);} .square-Item:hover{
/*bottom: 3px; */
box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover .closeSquare{display: block} .square-Item:hover .closeSquare{display: block}
.square-Item:nth-child(4n+0){margin-right: 0px;} .square-Item:nth-child(4n+0){margin-right: 0px;}
.square-Item .square-img{display: block;width: 100%} .square-Item .square-img{display: block;width: 100%}

@ -169,7 +169,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} .newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ .educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ .newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/
.newMain{ padding-bottom: 120px !important; } .newMain{ padding-bottom: 120px !important; }
/*高度*/ /*高度*/

Loading…
Cancel
Save