Merge branch 'dev_aliyun' into dev_jupyter

dev_jupyter
daiao 5 years ago
commit 67197845c2

@ -0,0 +1,74 @@
$(document).on('turbolinks:load', function() {
if ($('body.admins-salesman-channels-index-page').length > 0) {
// ============= 添加销售人员 ==============
var $addMemberModal = $('.admin-add-salesman-channel-user-modal');
var $addMemberForm = $addMemberModal.find('.admin-add-salesman-channel-user-form');
var $memberSelect = $addMemberModal.find('.salesman-channel-user-select');
var $salesmanIdInput = $('.salesman-channel-list-form').find(".btn-primary");
$addMemberModal.on('show.bs.modal', function(event){
var $link = $(event.relatedTarget);
// var salesmanId = $link.data('salesman_id');
// $salesmanIdInput.val(salesmanId);
$memberSelect.select2('val', ' ');
});
$memberSelect.select2({
theme: 'bootstrap4',
placeholder: '请输入要添加的单位',
multiple: true,
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/admins/schools',
dataType: 'json',
data: function(params){
return { keyword: params.term };
},
processResults: function(data){
return { results: data.schools }
}
},
templateResult: function (item) {
if(!item.id || item.id === '') return '';
return $("<span>" + item.name + "</span>");
},
templateSelection: function(item){
if (item.id) {
}
return item.name || '';
}
});
$addMemberModal.on('click', '.submit-btn', function(){
$addMemberForm.find('.error').html('');
// var salesmanId = $salesmanIdInput.val();
var memberIds = $memberSelect.val();
if (memberIds && memberIds.length > 0) {
$.ajax({
method: 'POST',
dataType: 'json',
url: '/admins/salesman_channels/batch_add',
data: { salesman_id: $salesmanIdInput.data("salesman-id"), school_ids: memberIds },
success: function(){
$.notify({ message: '创建成功' });
$addMemberModal.modal('hide');
setTimeout(function(){
window.location.reload();
}, 500);
},
error: function(res){
var data = res.responseJSON;
$form.find('.error').html(data.message);
}
});
} else {
$addMemberModal.modal('hide');
}
});
}
});

@ -1,16 +1,16 @@
$(document).on('turbolinks:load', function() {
if ($('body.admins-salesmans-index-page').length > 0) {
if ($('body.admins-salesman-customers-index-page').length > 0) {
// ============= 添加销售人员 ==============
var $addMemberModal = $('.admin-add-salesman-customer-user-modal');
var $addMemberForm = $addMemberModal.find('.admin-add-salesman-customer-user-form');
var $memberSelect = $addMemberModal.find('.salesman-user-select');
// var $salesmanIdInput = $addMemberForm.find('input[name="salesman_id"]')
var $memberSelect = $addMemberModal.find('.salesman-customer-user-select');
var $salesmanIdInput = $('.salesman-customer-list-form').find(".btn-primary");
$addMemberModal.on('show.bs.modal', function(event){
var $link = $(event.relatedTarget);
var salesmanId = $link.data('salesman-id');
$salesmanIdInput.val(salesmanId);
// var salesmanId = $link.data('salesman_id');
// $salesmanIdInput.val(salesmanId);
$memberSelect.select2('val', ' ');
});
@ -52,7 +52,7 @@ $(document).on('turbolinks:load', function() {
method: 'POST',
dataType: 'json',
url: '/admins/salesman_customers/batch_add',
data: { user_ids: memberIds },
data: { salesman_id: $salesmanIdInput.data("salesman-id"), user_ids: memberIds },
success: function(){
$.notify({ message: '创建成功' });
$addMemberModal.modal('hide');

@ -0,0 +1,28 @@
class Admins::SalesmanChannelsController < Admins::BaseController
before_action :set_salesman
def index
@channels = SalesmanChannel.all
end
def batch_add
channel_ids = @salesman.salesman_channels.pluck(:school_id)
school_ids = params[:school_ids] - channel_ids
school_ids.each do |school_id|
school = School.find_by(id: school_id)
next if school.blank?
@salesman.salesman_channels.create!(school_id: school.id)
end
render_ok
end
def destroy
@salesman.salesman_channels.find_by!(id: params[:id]).destroy
end
private
def set_salesman
@salesman = Salesman.find params[:salesman_id]
end
end

@ -5,6 +5,21 @@ class Admins::SalesmanCustomersController < Admins::BaseController
@customers = @salesman.salesman_customers.includes(:user, :school)
end
def batch_add
customer_ids = @salesman.salesman_customers.pluck(:user_id)
user_ids = params[:user_ids] - customer_ids
user_ids.each do |user_id|
user = UserExtension.find_by(user_id: user_id)
next if user.blank?
@salesman.salesman_customers.create!(user_id: user.user_id, school_id: user.school_id)
end
render_ok
end
def destroy
@salesman.salesman_customers.find_by!(id: params[:id]).destroy
end
private
def set_salesman
@salesman = Salesman.find params[:salesman_id]

@ -4,7 +4,7 @@ class Admins::SchoolsController < Admins::BaseController
params[:sort_direction] ||= 'desc'
schools = Admins::SchoolQuery.call(params)
@total_count = schools.map(&:id).count
@schools = paginate schools
school_ids = @schools.map(&:id)

@ -49,7 +49,7 @@ class Admins::SubjectsController < Admins::BaseController
# 设为金课
def excellent
current_subject.update!(excellent: true)
current_subject.update!(excellent: true, public: 2)
render_ok
end

@ -48,6 +48,19 @@ class ApplicationController < ActionController::Base
EduSetting.get(name)
end
# 平台身份权限判断(学生用户无权限)
def identity_auth
ue = current_user.user_extension
tip_exception(403, "..") unless current_user.admin_or_business? || ue.teacher? || ue.professional?
end
# 平台已认证身份判断(已认证的老师和专业人士)
def certi_identity_auth
ue = current_user.user_extension
tip_exception(403, "..") unless current_user.admin_or_business? ||
(current_user.professional_certification && (ue.teacher? || ue.professional?))
end
def shixun_marker
unless current_user.is_shixun_marker? || current_user.admin_or_business?
tip_exception(403, "..")
@ -73,7 +86,7 @@ class ApplicationController < ActionController::Base
check_account
tip_exception(@course.excellent ? 410 : 409, "您没有权限进入")
end
if @user_course_identity > Course::CREATOR && @user_course_identity <= Course::STUDENT
if @user_course_identity > Course::CREATOR && @user_course_identity <= Course::STUDENT && @course.tea_id != current_user.id
# 实名认证和职业认证的身份判断
tip_exception(411, "你的实名认证和职业认证审核未通过") if @course.authentication &&
@course.professional_certification && (!current_user.authentication && !current_user.professional_certification)
@ -308,7 +321,7 @@ class ApplicationController < ActionController::Base
end
if !User.current.logged? && Rails.env.development?
User.current = User.find 8686
User.current = User.find 1
end

@ -16,5 +16,25 @@ module RenderExpand
send_data kit.to_pdf, filename: options[:filename], disposition: options[:disposition] || 'attachment', type: 'application/pdf'
end
ActionController.add_renderer :exam_pdf do |template, options|
file = File.open(Rails.root.join('app/templates', template << '.html.erb'))
html = ERB.new(file.read).result(binding)
kit = PDFKit.new(html)
# PDFKit初始化后再添加样式文件到stylesheets会出现在页面的<!DOCTYPE>定义不起作用文档模式为默认为BackCompat从而导致katex不起作用
# 而测试发现通过配置添加css样式文件不会有影响
PDFKit.configure do |config|
config.default_options = {
:"user-style-sheet" => Rails.root.join('app/templates', options[:stylesheets])
}
end
send_data kit.to_pdf, filename: options[:filename], disposition: options[:disposition] || 'attachment', type: 'application/pdf'
end
end
end

@ -2,7 +2,7 @@ class CourseGroupsController < ApplicationController
before_action :require_login, :check_auth
before_action :set_group, except: [:create]
before_action :find_course, only: [:create]
before_action :teacher_allowed
before_action :teacher_allowed, except: [:set_invite_code_halt]
def create
tip_exception("分班名称不能为空") if params[:name].blank?
@ -55,6 +55,15 @@ class CourseGroupsController < ApplicationController
end
end
# 邀请码停用/启用
def set_invite_code_halt
teacher = @course.teachers.find_by(user_id: current_user.id)
tip_exception(403, "无权限") unless current_user.admin_or_business? ||
(teacher.present? && (teacher.teacher_course_groups.pluck(:course_group_id).include?(@group.id) || teacher.teacher_course_groups.size == 0))
@group.update!(invite_code_halt: !@group.invite_code_halt)
normal_status(0, "成功")
end
private
def set_group

@ -1128,11 +1128,11 @@ class CoursesController < ApplicationController
return normal_status(-1, "邀请码不能为空") if params[:invite_code].blank?
invite_code = params[:invite_code]
course = Course.find_by(invite_code: invite_code, is_delete: 0, invite_code_halt: 0, laboratory_id: current_laboratory.id)
course_group = CourseGroup.find_by(invite_code: invite_code)
course_group = CourseGroup.find_by(invite_code: invite_code, invite_code_halt: 0)
if course.blank?
return normal_status(-1, "邀请码无效") if course_group.blank?
course = Course.find_by(id: course_group.course_id, is_delete: 0, invite_code_halt: 0, laboratory_id: current_laboratory.id)
course = Course.find_by(id: course_group.course_id, is_delete: 0, laboratory_id: current_laboratory.id)
return normal_status(-1, "邀请码无效") if course.blank?
end

@ -1,8 +1,10 @@
class ExaminationBanksController < ApplicationController
include PaginateHelper
before_action :require_login
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public, :revoke_item]
before_action :find_exam, except: [:index, :create]
before_action :edit_auth, only: [:update, :destroy, :set_public, :revoke_item]
before_action :identity_auth, only: [:index]
def index
exams = ExaminationBankQuery.call(params)
@ -59,7 +61,7 @@ class ExaminationBanksController < ApplicationController
def set_public
tip_exception(-1, "该试卷已公开") if @exam.public?
tip_exception(-1, "请勿重复提交申请") if ApplyAction.where(container_id: @exam.id, container_type: "ExaminationBank").exists?
tip_exception(-1, "请勿重复提交申请") if ApplyAction.where(container_id: @exam.id, container_type: "ExaminationBank", status: 0).exists?
ApplyAction.create!(container_id: @exam.id, container_type: "ExaminationBank", user_id: current_user.id)
# @exam.update_attributes!(public: 1)
render_ok

@ -1,5 +1,6 @@
class ExaminationIntelligentSettingsController < ApplicationController
before_action :require_login
before_action :certi_identity_auth, only: [:create, :optinal_items, :save_exam, :exchange_one_item, :exchange_items]
before_action :find_exam, only: [:exchange_one_item, :exchange_items, :save_exam]
def optinal_items
@ -36,16 +37,19 @@ class ExaminationIntelligentSettingsController < ApplicationController
end
def exchange_one_item
item = @exam.item_baskets.find_by!(id: params[:item_id])
item = @exam.item_baskets.find_by!(item_bank_id: params[:item_id])
exam_type_setting = @exam.examination_type_settings.find_by!(item_type: item.item_type)
# 获取可选的题
items = OptionalItemQuery.call(@exam.sub_discipline_id, @exam.tag_discipline_containers.pluck(:tag_discipline_id), @exam.difficulty, @exam.public)
# 可选题中去掉已组卷的试题
type_items = items.select{ |t_item| t_item.item_type == item.item_type }
# 如果可选的题数小于等于设置的题数则提示无可换的题
tip_exception("无可换的题") if type_items.size <= exam_type_setting.count
# 可选题中去掉已组卷的同题型试题
optional_item_ids = type_items.pluck(:id) - @exam.item_baskets.where(item_type: item.item_type).pluck(:item_bank_id)
optional_item_ids = (type_items.pluck(:id) - @exam.item_baskets.where(item_type: item.item_type).pluck(:item_bank_id)).uniq
# 如果可选的题数等于0则提示无可换的题
tip_exception("无可换的题") if optional_item_ids.size == 0
new_item = ItemBank.find optional_item_ids.sample(1).first
ActiveRecord::Base.transaction do
@exam.item_baskets << ItemBasket.new(item_bank_id: new_item.id, position: item.position, score: item.score, item_type: new_item.item_type)
@ -61,13 +65,15 @@ class ExaminationIntelligentSettingsController < ApplicationController
# 获取可选的题
items = OptionalItemQuery.call(@exam.sub_discipline_id, @exam.tag_discipline_containers.pluck(:tag_discipline_id), @exam.difficulty, @exam.public)
type_items = items.select{ |t_item| t_item.item_type == params[:item_type] }
# 如果可选的题数小于等于设置的题数则提示无可换的题
tip_exception("无可换的题") if type_items.size <= exam_type_setting.count
# 可选题中去掉已组卷的同题型试题
# 可选题中去掉已组卷的试题
choosed_item_ids = choosed_items.pluck(:item_bank_id)
optional_item_ids = type_items.pluck(:id) - choosed_item_ids
optional_item_ids = (type_items.pluck(:id) - choosed_item_ids).uniq
# 如果可选的题数等于0则提示无可换的题
tip_exception("无可换的题") if optional_item_ids.size == 0
# 如果可选题数小于设置的题数n则在原来的选题中随机选n个确保换题时能选到新的题
# 如果可选题数小于设置的题数n则在原来的选题中随机选n个确保换题时能选到新的题
if optional_item_ids.size < exam_type_setting.count
absence_count = exam_type_setting.count - optional_item_ids.size
optional_item_ids = optional_item_ids + choosed_item_ids.sample(absence_count)

@ -1,5 +1,6 @@
class ExaminationItemsController < ApplicationController
before_action :require_login
before_action :certi_identity_auth, only: [:create, :destroy, :delete_item_type, :set_score, :batch_set_score, :adjust_position]
before_action :validate_score, only: [:set_score, :batch_set_score]
before_action :find_exam, only: [:create, :batch_set_score, :delete_item_type]
before_action :find_item, except: [:create, :batch_set_score, :delete_item_type]

@ -1235,7 +1235,7 @@ class ExercisesController < ApplicationController
normal_status(0, "正在下载中")
else
set_export_cookies
render pdf: 'exercise_export/blank_exercise', filename: filename_, stylesheets: stylesheets, disposition: 'inline', type: "pdf_attachment.content_type", stream: false
render exam_pdf: 'exercise_export/blank_exercise', filename: filename_, stylesheets: stylesheets, disposition: 'inline', type: "pdf_attachment.content_type", stream: false
end
end

@ -1,8 +1,10 @@
class ItemBanksController < ApplicationController
include PaginateHelper
before_action :require_login
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public]
before_action :find_item, except: [:index, :create]
before_action :edit_auth, only: [:update, :destroy, :set_public]
before_action :identity_auth, only: [:index]
def index
items = ItemBankQuery.call(params)
@ -52,7 +54,7 @@ class ItemBanksController < ApplicationController
def set_public
tip_exception(-1, "该试题已公开") if @item.public?
tip_exception(-1, "请勿重复提交申请") if ApplyAction.where(container_id: @item.id, container_type: 'ItemBank').exists?
tip_exception(-1, "请勿重复提交申请") if ApplyAction.where(container_id: @item.id, container_type: 'ItemBank', status: 0).exists?
ApplyAction.create!(container_id: @item.id, container_type: 'ItemBank', user_id: current_user.id)
# @item.update_attributes!(public: 1)
render_ok

@ -1,5 +1,6 @@
class ItemBasketsController < ApplicationController
before_action :require_login
before_action :certi_identity_auth, only: [:create, :delete_item_type, :destroy, :set_score, :batch_set_score, :adjust_position]
before_action :validate_score, only: [:set_score, :batch_set_score]
helper_method :current_basket

@ -3,9 +3,10 @@ class SubjectsController < ApplicationController
# before_action :check_auth, except: [:index]
before_action :check_account, except: [:index, :show, :right_banner]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage, :add_shixun_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
:up_member_position, :down_member_position, :update_team_title, :statistics_info]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish, :apply_public,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
:cancel_has_public, :up_member_position, :down_member_position, :update_team_title,
:statistics_info, :cancel_public]
before_action :require_admin, only: [:copy_subject]
before_action :shixun_marker, only: [:add_shixun_to_stage]
@ -33,16 +34,16 @@ class SubjectsController < ApplicationController
laboratory_join = " AND subjects.id in #{subject_ids} "
if select
@subjects = Subject.find_by_sql("SELECT subjects.id, subjects.user_id, subjects.name, subjects.stages_count, subjects.repertoire_id, subjects.status,
@subjects = Subject.find_by_sql("SELECT subjects.id, subjects.user_id, subjects.name, subjects.stages_count, subjects.repertoire_id, subjects.status, subjects.public,
subjects.shixuns_count, subjects.excellent, sum(shixuns.myshixuns_count) AS myshixun_member_count FROM subjects join stage_shixuns
on stage_shixuns.subject_id = subjects.id join shixuns on shixuns.id = stage_shixuns.shixun_id where
subjects.hidden = 0 AND subjects.status = 2 AND subjects.name like '%#{search}%' #{laboratory_join}
subjects.hidden = 0 AND subjects.public = 2 AND subjects.name like '%#{search}%' #{laboratory_join}
AND subjects.repertoire_id = #{select} GROUP BY subjects.id ORDER BY myshixun_member_count DESC")
else
@subjects = Subject.find_by_sql("SELECT subjects.id, subjects.user_id, subjects.name, subjects.stages_count, subjects.repertoire_id, subjects.status,
@subjects = Subject.find_by_sql("SELECT subjects.id, subjects.user_id, subjects.name, subjects.stages_count, subjects.repertoire_id, subjects.status, subjects.public,
subjects.shixuns_count, subjects.excellent, sum(shixuns.myshixuns_count) AS myshixun_member_count FROM subjects join stage_shixuns
on stage_shixuns.subject_id = subjects.id join shixuns on shixuns.id = stage_shixuns.shixun_id where
subjects.hidden = 0 AND subjects.status = 2 AND subjects.name like '%#{search}%' #{laboratory_join}
subjects.hidden = 0 AND subjects.public = 2 AND subjects.name like '%#{search}%' #{laboratory_join}
GROUP BY subjects.id ORDER BY myshixun_member_count DESC")
end
else
@ -59,7 +60,7 @@ class SubjectsController < ApplicationController
elsif reorder == "publish_time"
@subjects = @subjects.unhidden
else
@subjects = @subjects.visible.unhidden
@subjects = @subjects.publiced.unhidden
end
# 类型
@ -72,7 +73,7 @@ class SubjectsController < ApplicationController
end
# 排序
order_str = (reorder == "publish_time" ? "homepage_show desc, excellent desc, status = 2 desc, publish_time asc" : "homepage_show desc, excellent desc, updated_at desc")
order_str = (reorder == "publish_time" ? "homepage_show desc, excellent desc, public = 2 desc, publish_time asc" : "homepage_show desc, excellent desc, updated_at desc")
@subjects = @subjects.reorder(order_str)
end
@ -242,7 +243,8 @@ class SubjectsController < ApplicationController
## 云上实验室过滤
@courses = @courses.where(id: current_laboratory.all_courses)
@none_shixun_ids = @subject.shixuns.joins(:shixun_schools).where("school_id != #{current_user.user_extension.try(:school_id).to_i}").where(use_scope: 1).pluck(:id)
@all_shixun_ids = @subject.shixuns.where(use_scope: 0).pluck(:id) +
@subject.shixuns.joins(:shixun_schools).where("school_id = #{current_user.user_extension.try(:school_id).to_i} and use_scope = 1").pluck(:id)
end
def send_to_course
@ -272,14 +274,44 @@ class SubjectsController < ApplicationController
end
def publish
@subject.update_attributes(status: 2)
end
def cancel_publish
begin
apply = ApplyAction.where(container_type: "ApplySubject", container_id: @subject.id).order("created_at desc").first
if apply && apply.status == 0
apply.update_attributes(status: 3)
apply.tidings.destroy_all
end
@subject.update_attributes(status: 0)
rescue => e
uid_logger_error(e.message)
tip_exception("撤销申请失败")
end
end
def cancel_has_publish
begin
@subject.update_attributes(:status => 0)
rescue => e
uid_logger_error(e.message)
tip_exception("撤销发布失败")
raise ActiveRecord::Rollback
end
end
# 申请公开
def apply_public
tip_exception(-1, "请先发布课程再申请公开") if @subject.status != 2
apply = ApplyAction.where(container_type: "ApplySubject", container_id: @subject.id).order("created_at desc").first
if apply && apply.status == 0
@status = 0
else
@subject.update_attributes(status: 1)
@subject.update_attributes(public: 1)
ApplyAction.create(container_type: "ApplySubject", container_id: @subject.id, user_id: current_user.id, status: 0)
begin
status = Educoder::Sms.send(mobile: '18711011226', send_type:'publish_subject' , name: '管理员')
Educoder::Sms.send(mobile: '18711011226', send_type:'publish_subject' , name: '管理员')
rescue => e
uid_logger_error("发送验证码出错: #{e}")
end
@ -287,28 +319,28 @@ class SubjectsController < ApplicationController
end
end
def cancel_publish
def cancel_public
begin
apply = ApplyAction.where(container_type: "ApplySubject", container_id: @subject.id).order("created_at desc").first
if apply && apply.status == 0
apply.update_attributes(status: 3)
apply.tidings.destroy_all
end
@subject.update_attributes(status: 0)
@subject.update_attributes(public: 0)
render_ok
rescue => e
uid_logger_error(e.message)
tip_exception("撤销申请失败")
raise ActiveRecord::Rollback
end
end
def cancel_has_publish
def cancel_has_public
begin
@subject.update_attributes(:status => 0)
@subject.update_attributes(:public => 0)
render_ok
rescue => e
uid_logger_error(e.message)
tip_exception("撤销发布失败")
raise ActiveRecord::Rollback
tip_exception("撤销公开失败")
end
end

@ -42,11 +42,11 @@ class Weapps::CoursesController < Weapps::BaseController
tip_exception(-1, "邀请码不能为空") if params[:invite_code].blank?
invite_code = params[:invite_code]
course = Course.find_by(invite_code: invite_code, is_delete: 0, invite_code_halt: 0)
course_group = CourseGroup.find_by(invite_code: invite_code)
course_group = CourseGroup.find_by(invite_code: invite_code, invite_code_halt: 0)
if course.blank?
tip_exception(-1, "邀请码无效") if course_group.blank?
course = Course.find_by(id: course_group.course_id, is_delete: 0, invite_code_halt: 0)
course = Course.find_by(id: course_group.course_id, is_delete: 0)
tip_exception(-1, "邀请码无效") if course.blank?
end

@ -1,11 +1,22 @@
module Admins::SubjectsHelper
def display_subject_status(subject)
style =
case subject.status
case subject.public
when 0 then 'text-secondary'
when 1 then 'text-warning'
when 2 then 'text-success'
end
raw content_tag(:span, t("subject.status.#{subject.status}"), class: style)
status =
if subject.public == 2
"publiced"
elsif subject.public == 1
"pending"
elsif subject.status == 2
"processed"
else
"editing"
end
raw content_tag(:span, t("subject.public.#{status}"), class: style)
end
end

@ -137,7 +137,7 @@ module ApplicationHelper
# 用户图像url如果不存在的话source为匿名用户即默认使用匿名用户图像
def url_to_avatar(source)
if File.exist?(disk_filename(source.class, source.id))
if File.exist?(disk_filename(source&.class, source&.id))
ctime = File.ctime(disk_filename(source.class, source.id)).to_i
if source.class.to_s == 'User'
File.join(relative_path, ["#{source.class}", "#{source.id}"]) + "?t=#{ctime}"
@ -397,6 +397,8 @@ module ApplicationHelper
raw arr.join('')
end
# 导出pdf时转化markdown为html
def to_markdown(text,origin_url)
return nil if text.blank?
@ -406,10 +408,10 @@ module ApplicationHelper
:fenced_code_blocks => true,
:lax_html_blocks => true,
:strikethrough => true,
:superscript => true,
:superscript => false,
:tables => true
}
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options)
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
m_t = markdown.render(text)
m_t&.include?("src=\"") ? m_t&.gsub("src=\"","src=\"#{origin_url}") : m_t
end

@ -12,6 +12,12 @@ module CoursesHelper
# end
end
def edit_auth group, teachers
User.current.admin_or_business? ||
teachers.select{|teacher| teacher.user_id == User.current.id &&
(teacher.teacher_course_groups.pluck(:course_group_id).include?(group.id) || teacher.teacher_course_groups.size == 0)}.size > 0
end
# 是否有切换为学生的入口
def switch_student_role is_teacher, course, user
is_teacher && course.course_members.where(user_id: user.id, role: %i(STUDENT)).exists?

@ -177,6 +177,17 @@ module HomeworkCommonsHelper
type == 2 ? student_works.size : (type == 1 ? student_works.where("work_status != 0").size : student_works.where(work_status: 0).size)
end
# 作品数统计
def calculate_work_count homework_common, member
count = {}
student_works = homework_common.teacher_works(member)
count[:commit_count] = student_works.select{|work| work.work_status != 0 }.size
count[:uncommit_count] = student_works.select{|work| work.work_status == 0 }.size
count[:compelete_count] = Myshixun.where(id: student_works.pluck(:myshixun_id).reject(&:blank?), status: 1).size
count[:all_count] = student_works.size
count
end
# 上次查重的时间
def last_review_time homework_common, course_group
review = homework_common.homework_group_reviews.where(:course_group_id => course_group.id).last

@ -152,7 +152,7 @@ module ShixunsHelper
challenge_program_name = []
shixun.challenges.map(&:exec_path).each do |exec_path|
challenge_program_name << "\"#{exec_path}\""
if shixun.main_mirror_name == "Java" || shixun.main_mirror_name == "Openjdk10/VNC"
if shixun.main_mirror_name == "Java" || shixun.main_mirror_name == "Openjdk10/VNC" || shixun.main_mirror_name == "JavaWeb"
if exec_path.nil? || exec_path.split("src/")[1].nil?
source = "\"\""
else

@ -1,12 +1,23 @@
module SubjectsHelper
# 实训路径的发布状态
def publish_status subject, is_manager, user
def publish_status subject, is_manager
status = -1
if is_manager
status = 0 if subject.status == 0
status = 1 if subject.status == 1
status = 2 if subject.status == 2 && user.admin?
status = 2 if subject.status == 2
end
status
end
# 实训路径的公开状态
def public_status subject, is_manager, user
status = -1
if is_manager
status = 0 if subject.public == 0
status = 1 if subject.public == 1
status = 2 if subject.public == 2 && user.admin?
end
status
end

@ -1,3 +1,27 @@
class SalesmanChannel < ApplicationRecord
belongs_to :salesman, :touch => true, counter_cache: true
belongs_to :school
def school_name
school.name
end
def teacher_count
UserExtension.where(school_id: school_id).where.not(identity: 1).count
end
def student_count
UserExtension.where(school_id: school_id, identity: 1).count
end
def course_count
Course.where(school_id: school_id).count
end
def shixuns_count
ShixunMember.joins("join user_extensions on user_extensions.user_id = shixun_members.user_id")
.where(user_extensions: {school_id: school_id}).pluck(:shixun_id).uniq.count
end
end

@ -40,6 +40,7 @@ class Subject < ApplicationRecord
scope :visible, lambda{where(status: 2)}
scope :published, lambda{where(status: 1)}
scope :unhidden, lambda{where(hidden: 0)}
scope :publiced, lambda{ where(public: 2) }
after_create :send_tiding
def send_tiding

@ -16,12 +16,14 @@ class Admins::SubjectQuery < ApplicationQuery
# 状态过滤
status =
case params[:status].to_s.strip
when 'pending' then 0
when 'applying' then 1
when 'published' then 2
end
subjects = subjects.where(status: status) if status
case params[:status].to_s.strip
when "editing" then {status: 0}
when "processed" then {status: 2, public: 0}
when "pending" then {public: 1}
when "publiced" then {public: 2}
end
subjects = subjects.where(status) if status
# 创建者单位
if params[:school_id].present?

@ -8,7 +8,7 @@ class Weapps::SubjectQuery < ApplicationQuery
end
def call
subjects = @current_laboratory.subjects.unhidden.visible
subjects = @current_laboratory.subjects.unhidden.publiced
# 课程体系的过滤
if params[:sub_discipline_id].present?

@ -10,7 +10,7 @@ class Admins::SubjectAuths::AgreeApplyService < ApplicationService
def call
ActiveRecord::Base.transaction do
apply.update!(status: 1, dealer_id: user.id)
subject.update!(status: 2, publish_time: Time.now)
subject.update!(public: 2, publish_time: Time.now)
deal_tiding!
end

@ -10,7 +10,7 @@ class Admins::SubjectAuths::RefuseApplyService < ApplicationService
def call
ActiveRecord::Base.transaction do
subject.update!(status: 0)
subject.update!(public: 0)
apply.update!(status: 2, reason: reason, dealer_id: user.id)
deal_tiding!

@ -41,7 +41,8 @@ class SearchService < ApplicationService
when 'shixun' then
{ where: { id: Laboratory.current.shixuns.where(public: 2, status: 2, fork_from: nil).or(Laboratory.current.shixuns.where(status: 2, id: User.current.shixuns)).pluck(:id) } }
when 'subject' then
{ where: { id: Laboratory.current.subjects.pluck(:id) } }
{ where: { id: Laboratory.current.subjects.where(public: 2, status: 2)
.or( Laboratory.current.subjects.where(status: 2, id: User.current.subjects)).pluck(:id) } }
when 'course' then
{ where: { id: Laboratory.current.all_courses.pluck(:id) } }
else

@ -17,9 +17,12 @@ class SubjectSearchService < ApplicationService
if type == "mine"
@subjects = @subjects.where(id: User.current.subjects).visible.unhidden
else
@subjects = @subjects.visible.unhidden
if User.current.admin? || User.current.business?
@subjects = @subjects.unhidden
else
@subjects = @subjects.publiced.unhidden.or(@subjects.where(id: User.current.subjects))
end
end
Subject.search(keyword, search_options)
end

@ -70,12 +70,21 @@ class Users::SubjectService
end
def manage_subject_status_filter(relations)
status = case params[:status]
when 'editing' then 0
when 'applying' then 1
when 'published' then 2
end
relations = relations.where(status: status) if status
if params[:status] == "publiced"
relations = relations.where(public: 2)
elsif params[:status] == "applying"
relations = relations.where(public: 1)
else
status = case params[:status]
when 'editing' then
0
when 'applying' then
1
when 'published' then
2
end
relations = relations.where(status: status) if status
end
relations
end

@ -3,6 +3,20 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0-rc.1/katex.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/auto-render.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.getElementById('markdown_content'), {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
})
</script>
</head>
<body>
<div class="container" style="background-color:#fff;">
@ -58,7 +72,7 @@
</div>
</div>
<div class="clearfix"></div>
<div class="mbt10">
<div class="mbt10" id="markdown_content">
<% @exercise_questions.each do |q| %>
<div class="bdc">
<div class="pbt5">

@ -1,106 +1,790 @@
body{
font-size:14px;
font-family: "微软雅黑","宋体";
}
@charset "utf-8";
body{font-size:14px; line-height:2.0;background:#fafafa!important;font-family: "微软雅黑","宋体"; color:#05101a;height: 100%;position: relative;
}
html,body{height:100%;}
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;}
table,input,textarea,select,button {outline: none;border-radius: 3px; font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9;border:1px solid #eaeaea;background: #FFFFff; color:#05101A;}
textarea{resize: none;}
/*设置input框的placehoder的字体颜色*/
input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc}
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
p{
margin:0;
}
.fs13{
font-size:13px;
}
.fs16{
font-size:16px;
}
.position-relative{
position:relative;
div,img,tr,td,table{ border:0;}
a:link,a:visited{text-decoration:none; color:#05101a;}
a:hover {color:#459be5;}
ol, ul, li {list-style-type: none;}
select:disabled,input:disabled{background-color: #EEEEEE;}
/*万能清除浮动*/
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;}
.clearfix{clear:both;zoom:1}
.cl{ clear: both; overflow: hidden;}
/*通用浮动*/
.fl{ float: left!important;}
.fr{ float: right!important;}
/*pre标签换行*/
.break-word{word-break: break-all;word-wrap: break-word;}
.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;}
/*文字左右两端对齐*/
.justify{text-align: justify}
.indent{text-indent: 2em;}
.edu-name-dark{ max-width:100px; display: block; }
.edu-info-dark{ max-width:345px; display: block; }
.edu-max-h200{ height:200px; overflow: auto;}
.edu-h260{ height:260px;}
.edu-h270{ height:270px;}
.edu-h310{ height:310px;}
.edu-position{ position: relative;}
.edu-h200-auto{ max-height:200px; overflow:auto;}
.edu-h300-auto{ max-height:300px; overflow:auto;}
.edu-h350-auto{ max-height:350px; overflow:auto;}
.edu-h280-auto{ height:280px; overflow:auto;}
.edu-txt-w240{ width:240px; display: block;}
.edu-txt-w280{ width:280px; display: block;}
.edu-txt-w320{ width:320px; display: block;}
.edu-txt-w200{ width:200px; display: block;}
a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center}
a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center}
a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center}
a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center}
a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center}
a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center}
a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center}
a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center}
a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center}
/*超过隐藏*/
.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;}
/*隐藏*/
.none{display: none}
.block{ display:block;}
.boxsizing{box-sizing: border-box}
/*字体icon均为18px*/
.iconfont{font-size: 18px!important;}
/*通用文字大小样式*/
.font-n{font-weight: normal!important;}
.font-bd{font-weight: bold;}
.font-n{font-weight: normal;}
.font-12{ font-size: 12px!important;}
.font-13{ font-size: 13px!important;}
.font-14{ font-size: 14px!important;}
.font-15{ font-size: 15px!important;}
.font-16{ font-size: 16px!important;}
.font-17{ font-size: 17px!important;}
.font-18{ font-size: 18px!important;}
.font-20{ font-size: 20px!important;}
.font-22{ font-size: 22px!important;}
.font-24{ font-size: 24px!important;}
.font-25{ font-size: 25px!important;}
.font-26{ font-size: 26px!important;}
.font-28{ font-size: 28px!important;}
.font-30{ font-size: 30px!important;}
.font-32{ font-size: 32px!important;}
.font-36{ font-size: 36px!important;}
.font-50{ font-size: 50px!important;}
.font-60{ font-size: 60px!important;}
.font-70{ font-size: 70px!important;}
/*a标签的下划线*/
a.decoration{text-decoration: underline}
/*表单*/
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; }
/*通用内外边距*/
.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;}
.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;}
.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;}
.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;}
.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;}
.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb28{ padding-bottom:28px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;}
.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;}
.pl0{ padding-left:0px!important;}.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl7{ padding-left:7px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl22{ padding-left:22px;}.pl25{ padding-left:25px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px !important;}.pl33{padding-left: 33px}.pl35{ padding-left:35px;}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl60{ padding-left:60px;}.pl70{padding-left:70px;}.pl75{padding-left:75px;}.pl80{padding-left:80px;}.pl88{ padding-left:88px;}.pl92{padding-left:92px;}.pl100{ padding-left:100px;}
.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr7{ padding-right:7px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr25{ padding-right:25px!important;}.pr30{ padding-right:30px!important;}.pr40{ padding-right:40px;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr60{padding-right:60px;}.pr75{padding-right:75px;}
.padding5-10{padding:5px 10px;box-sizing: border-box}
.padding5-20{padding:5px 20px;box-sizing: border-box}
.padding10{padding: 10px;box-sizing: border-box}
.padding15{padding: 15px;box-sizing: border-box}
.padding20{padding: 20px;box-sizing: border-box}
.padding10-20{padding: 10px 20px;box-sizing: border-box}
.padding10-15{padding: 10px 15px;box-sizing: border-box}
.padding10-25{padding: 10px 25px;box-sizing: border-box}
.padding10-30{padding: 10px 30px;box-sizing: border-box}
.padding15-20{padding: 15px 20px;box-sizing: border-box}
.padding15-25{padding: 15px 25px;box-sizing: border-box}
.padding20-40{padding: 20px 40px;box-sizing: border-box}
.padding20-30{padding: 20px 30px;box-sizing: border-box}
.padding20-15{padding: 20px 15px;box-sizing: border-box}
.padding20-10{padding: 20px 10px;box-sizing: border-box}
.padding30{padding: 30px;box-sizing: border-box}
.padding30-20{padding: 30px 20px;box-sizing: border-box}
.padding30-40{padding: 30px 40px;box-sizing: border-box}
.padding40{padding: 40px;box-sizing: border-box}
.padding40-30{padding: 40px 30px;box-sizing: border-box}
.padding40-20{padding: 40px 20px;box-sizing: border-box}
.margin10{margin:10px;}
.margin15{margin:15px;}
.margin20{margin:20px;}
/*行高*/
.lineh-12{line-height: 12px}
.lineh-15{line-height: 15px}
.lineh-17{line-height: 17px}
.lineh-20{line-height: 20px}
.lineh-25{line-height: 25px}
.lineh-30{line-height: 30px}
.lineh-35{line-height: 35px}
.lineh-40{line-height: 40px}
/*pre标签换行*/
.break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
/*定位*/
.pr{position: relative}
.df {display:flex;display: -webkit-flex;display: -ms-flex;}
.flex1{flex: 1;}
/*去掉IE input框输入时自带的清除按钮*/
input::-ms-clear{display:none;}
/*自定义滚动条宽度*/
::-webkit-scrollbar {width:7px;height:10px;background-color: #F5F5F5; }
::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);background-color: #F5F5F5;}
::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #dadada;}
.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*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/
/*高度*/
.height-100{height: 100%;}
/*文本位置*/
.edu-txt-center{ text-align: center!important;}
.edu-txt-left{ text-align: left!important;}
.edu-txt-right{ text-align: right!important;}
/*背景颜色*/
.edu-back-white{background-color:#FFFFff; }
.edu-back-greyf5{background-color: #f5f5f5!important;}
.edu-back-skyblue{background: #F4FAFF;}
.edu-back-blue{background-color:#459be6!important; }
.edu-back-blue-txt{background-color:#F7FBFF!important; }
.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}/*发送实训弹框*/
/*常用字体*/
/*红色*/
.color-red{color: #FF0000!important;}
/*白色*/
.color-white{color: #ffffff!important;}
/*黑色*/
.color-dark{color: #05101a!important;}
/*灰色*/
.color-grey-name{color: #1A0B00!important;}
.color-grey-fa{color: #FAFAFA!important;}
.color-grey-3{color: #333!important;}
.color-grey-eb{color: #EBEBEB!important;}
.color-grey-c{color: #ccc!important;}
.color-grey-cd{color: #cdcdcd!important;}
.color-grey-9{color: #999999!important;}
.color-grey-98{color: #989898!important;}
.color-grey-8{color: #888!important;}
.color-grey-6{color: #666!important;}
.color-grey-4d{color: #4d4d4d!important;}
.color-grey-B2{color: #B2B2B2!important;}
.color-grey-B3{color: #B3B3B3!important;}
.color-grey-B4{color: #B4B4B4!important;}
.color-grey-74{color: #747A7F!important;}
a.color-grey-name:hover,a.color-dark:hover,a.color-grey-6:hover,a.color-grey-3:hover{color: #4cacff!important;}
a.color-grey-9:hover,a.color-grey-8:hover,a.color-grey-c:hover{color: #111C24!important;}
/*蓝色*/
.color-blue{color: #4CACFF!important;}/*主*/
.color-blue_4C{color: #4CACFF!important;}
a.color-blue:hover,a.color-blue_4C:hover{color: #459BE6!important;}
/*橙色*/
.color-orange{color: #ff6800!important;}/*辅助文字*/
.color-orange-tip{color: #FF954C!important;}/*提示文字*/
.color-orange-tips {
color: #FF8204 !important;
}
.text-center{
/*提示文字*/
a.color-orange:hover,a.color-orange-tip:hover{color: #F06200!important;}
/*黄色*/
.color-yellow{color: #EFC003!important;}
.color-yellow-ff{color: #FFA800!important}
/*绿色*/
.color-green{color: #29BD8B!important;}
a.color-green:hover{color: #28AC7F!important;}
/*红色*/
.color-red-dd{color: #DD1717!important;}
a.color-red-dd:hover{color: #C61616!important;}
/*圆角*/
.radius{border-radius: 50%;}
.radius4{border-radius: 4px;}
.radius2{border-radius: 2px;}
/*绿色圆形--例如实训路径详情的编辑icon的背景*/
.ring-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #29BD8B;text-align: center;}
.ring-op-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: rgba(41,189,139,0.6);text-align: center;}
.ring-grey{width: 18px;height: 18px;line-height: 18px;display: block;border-radius: 50%;background-color:rgba(204,204,204,0.5);text-align: center;}
.ring-blue{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #4CACFF;text-align: center;}
.ring-orange{background-color: #FF6800;display: block;padding: 0px 3px;height: 18px;box-sizing: border-box;min-width: 18px;text-align: center;line-height: 18px;border-radius: 50%;color:#fff;font-size: 12px;}
/*左侧label内容右对齐*/
.label-right{min-width:75px;text-align: right;height: 35px;line-height: 35px;float: left; }
/*输入框样式---------宽度为百分比*/
.input-flex-30{flex: 1;height: 30px;padding: 5px;box-sizing: border-box;}
.input-flex-35{flex: 1;height: 35px;padding: 5px;box-sizing: border-box;}
.input-flex-40{flex: 1;height: 40px;padding: 5px;box-sizing: border-box;}
.input-100-35{width: 100%;height: 35px;padding: 5px;box-sizing: border-box;}
.input-100-40{width: 100%;height: 40px;padding: 5px;box-sizing: border-box;}
.input-100-45{width: 100%;height: 45px;padding: 5px;box-sizing: border-box;}
.input-90-35{width: 90%;height: 35px;padding: 5px;box-sizing: border-box;}
.input-60-40{width: 60%;height: 40px;padding: 5px;box-sizing: border-box;}
.input-60-35{width: 60%;height: 35px;padding: 5px;box-sizing: border-box;}
.input-50-35{width: 50%;height: 35px;padding: 5px;box-sizing: border-box;}
.input-50-40{width: 50%;height: 40px;padding: 5px;box-sizing: border-box;}
.input-50-45{width: 50%;height: 45px;padding: 5px;box-sizing: border-box;}
.input-48-45{width: 48%;height: 45px;padding: 5px;box-sizing: border-box;}
/*输入框为灰色背景,获取焦点时背景变白色*/
.greyInput{background-color: #F5F5F5;outline: none}
.greyInput:focus{background-color: #fff; border: 1px solid #ddd;}
/*输入框样式---------宽度为固定长度*/
.winput-240-45{width: 240px;height: 45px;padding: 5px;box-sizing: border-box;}
.winput-240-40{width: 240px;height: 40px;padding: 5px;box-sizing: border-box;}
.winput-240-35{width: 240px;height: 35px;padding: 5px;box-sizing: border-box;}
.winput-240-30{width: 240px;height: 30px;padding: 5px;box-sizing: border-box;}
.winput-190-45{width: 190px;height: 45px;padding: 5px;box-sizing: border-box;}
.winput-200-35{width: 200px;height: 35px;padding: 5px;box-sizing: border-box;}
.winput-120-40{width: 120px;height: 40px;padding: 5px;box-sizing: border-box;}
.winput-120-35{width: 120px;height: 35px;padding: 5px;box-sizing: border-box;}
.winput-120-30{width: 120px;height: 30px;padding: 5px;box-sizing: border-box;}
.winput-115-40{width: 115px;height: 40px;padding: 5px;box-sizing: border-box;}
.winput-90-40{width: 90px;height: 40px;padding: 5px;box-sizing: border-box;}
.winput-90-35{width: 90px;height: 35px;padding: 5px;box-sizing: border-box;}
.winput-240-100{width: 240px;height: 100px;padding: 5px;box-sizing: border-box;}
/*输入框样式---------高度固定*/
.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;}
.winput-100-130{width: 100%;height: 130px;padding: 5px;box-sizing: border-box;}
.winput-100-150{width: 100%;height: 150px;padding: 5px;box-sizing: border-box;}
.winput-100-200{width: 100%;height: 200px;padding: 5px;box-sizing: border-box;}
.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;}
/*百分比宽度*/
.width100{width: 100%;}
.width90{width: 90%;}
.width89{width: 89%;}
.width80{width: 80%;}
.width70{width: 70%;}
.width60{width: 60%;}
.width50{width: 50%;}
.width40{width: 40%;}
.width30{width: 30%;}
.width20{width: 20%;}
.width15{width: 15%;}
.width10{width: 10%;}
/*固定大小的宽度*/
.wid100{width: 100px;display: block}
.wid120{width: 120px;display: block}
.wid90{min-width: 90px!important;display: block}
a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center}
a.edu-txt-w200,.edu-txt-w200{ width:200px; display: inline-block;text-align: center}
a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center}
a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center}
a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center}
a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center}
a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center}
a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center}
a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center}
a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center}
a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center}
/*最小高度*/
.minH-40{min-height: 490px;}
.minH-280{min-height: 280px;}
.minH-400{min-height: 400px;}
.minH-440{min-height: 440px;}
.minH-500{min-height: 500px;}
.minH-560{min-height: 560px;}
/*超出高度出现滚动条--纵向*/
.over260{max-height: 260px;overflow-y: auto}
.over210{height: 210px;overflow-y: auto}
.over280{height: 280px;overflow-y: auto}
.over170{min-height: 170px;max-height: 170px;overflow-y: auto}
/*---------------tab公用边框-----------------*/
.border-bottom-orange{border-bottom: 2px solid #FC7033!important;}
.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;}
.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;}
.bor-left-greyE{border-left: 1px solid #EEEEEE!important;}
.bor-top-greyE{border-top: 1px solid #EEEEEE!important;}
.bor-right-greyE{border-right: 1px solid #EEEEEE!important;}
.bor-left-greyC{border-left: 1px solid #CCC!important;}
.bor-top-greyC{border-top: 1px solid #CCC!important;}
/*---------------边框-----------------*/
.bor-gray-c{border:1px solid #ccc;}
.bor-grey-e{border:1px solid #eee;}
.bor-grey-d{border:1px solid #ddd;}
.bor-grey01{border:1px solid #E6EAEB;}
.bor-orange{border:1px solid #FF7500;}
.bor-blue{border:1px solid #5faee3;}
.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}
a.decoration{text-decoration: underline!important;}
/*下拉菜单*/
.edu-menu-panel{position: relative;cursor: pointer}
.edu-menu-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 120px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9}
.edu-menu-list li{width: 100%;padding:0px 15px;box-sizing: border-box;height: 35px;line-height: 35px;cursor: pointer;}
.edu-menuSmall-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 100px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9}
.edu-menuSmall-list li{width: 100%;padding:0px 10px;box-sizing: border-box;height: 30px;line-height: 30px;cursor: pointer;font-size: 12px;}
.edu-menu-list li a,.edu-menuSmall-list li a{width: 100%;height: 100%;display: block;color: #323232;}
.edu-menu-panel:hover i,.edu-menu-panel:hover{color: #4cacff;}
.edu-menu-panel:hover .edu-menu-list,.edu-menu-panel:hover .edu-menuSmall-list{display: block}
.edu-menu-list li:hover,.edu-menuSmall-list li:hover{background: #4CACFF;}
.edu-menu-list li:hover a,.edu-menuSmall-list li:hover a{color: #fff!important;}
.currentName{display: block;width: 100%;padding:0px 15px;height: 40px;line-height: 40px;font-size: 16px;box-sizing: border-box;cursor: default}
.ul-leftline:after{position: absolute;top:0px;content: "";width: 1px;background-color: #eee;height: 100%;right: 0px;}
.overPart{width: 240px;height: 30px;position: absolute;right: 0;top: -27px;background: transparent;}
/*滑块验证*/
.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px;color: #999999; line-height: 45px; text-align: center;border-radius: 4px;}
.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;}
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;}
.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;}
.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;}
/*tip公共样式的设置*/
.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/
.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/
word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/
.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/
position: absolute;content:''; width:0; height:0;}/*5*/
.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/
border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/
.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/
.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/
border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/
.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/
.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/
border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/
.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/
.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent;
border-right: 5px solid transparent;border-top: 10px solid #000;}
.data-tip-top:before{bottom:-11px;}
/*左右两栏排列、固定左右宽度----------ul*/
ul.abouttable{margin: 0px auto;width: 440px;}
ul.abouttable li{width: 100%;}
ul.abouttable li .rz-label{min-width: 150px;height: 45px;line-height: 45px;text-align: right;color: #adadad;}
ul.abouttable li .second-label{min-width: 150px;height: 40px;line-height: 40px;text-align: right;color: #adadad;}
ul.abouttable li .minh-label{min-width: 150px;height: 28px;line-height: 28px;text-align: right;color: #adadad;}
/* table--------------------------------*/
/* table-1底部边框 */
.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default}
.edu-pop-table tr{ height:40px; }
.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;}
.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;}
.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; }
.edu-pop-table tr td{border-bottom:1px solid #eee;}
.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;}
.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;}
/*th行有背景颜色且table无边框*/
.edu-pop-table.head-color thead tr{background: #fafbfb}
.edu-pop-table.head-color{border: none}
.edu-pop-table.head-color tr:last-child td {border: none}
/*--表格行间隔背景颜色-*/
.edu-pop-table.interval-td{border-bottom: 1px solid #eee;}
.edu-pop-table.interval-td thead tr{background: #fafbfb}
.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb}
.edu-pop-table.interval-td tbody tr td{border: none}
/*--表格行间隔背景颜色(th也没有边框)-*/
.edu-pop-table.interval-all{border:none;border-bottom: 1px solid #eee;}
.edu-pop-table.interval-all thead th{border: none}
.edu-pop-table.interval-all thead tr{background: #fafbfb}
.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb}
.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px}
/*--表格行移入背景颜色-*/
.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/
.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/
/* table-2全边框 */
.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse}
.edu-pop-table-all tr{ height:30px; }
.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;}
.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; }
.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px}
/*table无边框、无背景颜色*/
.allNone{background: none!important;cursor: default;border-bottom:none!important;}
.allNone tr{height: 30px!important;}
/*数据为空公共页面*/
img.edu-nodata-img{ width:300px; margin:50px auto 20px; display: block;}
.edu-nodata-p{ font-size: 20px; text-align: center; color:#999;border-bottom:none!important;padding-left: 18px;box-sizing: border-box;}
/*输入为空或者错误的提示*/
.input-none{box-shadow: 0px 0px 2px rgba(0,0,0,0.1);}
.notice{height: 25px;margin-left: 150px;}
.input-none + .notice span{display: block}
/*列表里菜单icon移入*/
.edu-position-hide{ position: absolute; top:15px; left:-20px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); background:#fff;z-index:1001; padding:5px 0;z-index: 999999;}
.edu-position-hide li a{ display:inline-block; height: 30px; width: 100px; line-height: 30px; text-align: center; font-size:12px!important; }
.edu-position-hide li a:hover{ background:#F1F1F1; color:#05101A;}
.edu-position-hidebox i{ color:#bcbcbc;}
.edu-position-hidebox i:hover{ color:#4CACFF;}
.edu-position-hidebox a{ color:#05101A;}
.edu-position-hidebox:hover .edu-position-hide{ display: block;}
/*搜索(灰色背景、点击变白色)*/
.seekPanel > input{width: 100%;height: 30px;line-height: 30px;background-color: #f4f4f4;border:1px solid #eaeaea;padding: 0px 30px 0px 5px ;box-sizing: border-box;outline: none;}
.seekPanel > input:focus{background-color: #fff;}
.seekPanel > i{position: absolute;right: 7px;top: -1px;}
/*-------------------------------------------公用按钮以white-btn(或者edu-default-btn无padding)为基础宽度和高度可以用padding填充颜色用edu-color-btnbegin-----------------------------------------*/
/*按钮*/
/*默认按钮*/
/*长条形按钮*/
.default_btn{display: block;border-radius: 5px ;background: #f4f4f4;color: #cfcfcf!important;text-align: center;width: 102px;box-sizing: border-box}
/*正常按钮*/
.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;}
a.white-btn.orange-btn{border: 1px solid #FF7500;color: #FF7500!important;}
a.white-btn.orange-btn:hover{border: 1px solid #F06200;color: #F06200!important;}
.defalutGreyBorder{display: block;padding: 0px 10px;border:1px solid #ccc;height: 30px;line-height: 30px;border-radius: 4px;}
a.task-btn{cursor: pointer;display: inline-block;border: none;padding: 0 12px;color: #fff;background: #CDCDCD !important;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 2px; font-weight: 400;}
/*最新按钮:以个人主页为例-------------因高度和宽度都已经固定,后续不再支持使用,*/
.user_default_btn{cursor: pointer;font-size: 14px;display: block;width: 120px;text-align: center;height: 40px;line-height: 40px!important;border-radius: 4px;box-sizing: border-box}
.user_orange_btn{color: #fff!important;background-color: #FF6800;}/*橙色签到按钮*/
.user_orange_btn:hover{background-color:#F06200;}
.user_grey_btn{color: #fff!important;background-color: #CCCCCC;cursor: default}/*灰色已经签到按钮*/
.user_private_btn{color:#646464!important;background-color: #fff;border: 1px solid #989898}/*灰色私信、互相关注按钮*/
.user_private_btn:hover{color: #B2B2B2!important;border: 1px solid #B2B2B2;}
.btn_auto{border-radius: 5px ;background: #fff;padding: 0px 18px;}
/*可共用按钮需添加padding或者边框*/
.edu-default-btn{display: block;border-radius: 4px;}
a.edu-focus-btn{padding: 0px 10px;height: 30px;line-height: 30px;border: 1px solid #b2b2b2;color: #b2b2b2!important;}
a.edu-focus-btn:hover{border: 1px solid #666;color: #666!important;}
a.edu-greenback-btn{padding: 0px 10px;background: #29BD8B;color: #fff!important;border: 1px solid #29BD8B;}
a.edu-greenline-btn{padding: 0px 10px;color: #29BD8B!important;border: 1px solid #29BD8B;}
a.edu-greenback-btn:hover{background-color: #28AC7F;}
a.edu-greenline-btn:hover{border:1px solid #28AC7F;color: #28AC7F!important;}
a.edu-blueback-btn{padding: 0px 10px;background: #4CACFF;color: #fff!important;border: 1px solid #4CACFF;}
a.edu-blueline-btn{padding: 0px 10px;color: #4CACFF!important;border: 1px solid #4CACFF;}
a.edu-blueback-btn:hover{background-color: #459BE6;}
a.edu-blueline-btn:hover{border:1px solid #459BE6;color: #459BE6!important;}
a.edu-orangeback-btn{background-color: #ff7500;color: #fff!important;border:1px solid #FF7500}
a.edu-orangeback-btn:hover{background-color: #F06200;}
a.edu-orangeline-btn{color: #FF7500!important;border:1px solid #FF7500}
a.edu-orangeline-btn:hover{color: #F06200!important;border:1px solid #F06200}
a.edu-greyback-btn{padding: 0px 10px;background: #CCCCCC;color: #fff!important;border: 1px solid #CCCCCC;}
a.edu-greyback-btn:hover{background-color: #B2B2B2;}
a.edu-greyshallowline-btn{padding: 0px 10px;color: #999!important;border:1px solid #CFCFCF}
a.edu-greyline-btn{padding: 0px 10px;background: #fff;color: #666!important;border: 1px solid #eaeaea;line-height: 33px;height: 33px;}
a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B2;color:#B2B2B2!important;}
/*新建页面的提交和取消按钮*/
.defalutCancelbtn{display: block;border: 1px solid #CDCDCD;background-color: #fafafa;color: #999!important;width: 120px;text-align: center;height: 30px;line-height: 30px;border-radius: 2px;
width: 130px;
height: 40px;
background: rgba(77,124,254,0);
border: 1px solid rgba(76, 172, 255, 1);
border-radius: 4px;
line-height: 40px;
font-size: 16px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(76,172,255,1) !important;
}
.defalutCancelbtn:hover{border:1px solid #B2B2B2;color: #B2B2B2!important;}
.defalutSubmitbtn{
display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px;
width: 130px;
height: 40px;
background: rgba(76,172,255,1);
border-radius: 4px;
font-size: 16px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(255,255,255,1);
}
.defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;}
/*-------------------------------------------公用按钮以white-btn(或者edu-default-btn无padding)为基础宽度和高度可以用padding填充颜色用edu-color-btnend-----------------------------------------*/
/*可点击按钮---蓝色*/
.use_btn{background: #4cacff;color:#fff!important;}
a.task-btn-orange{background: #4CACFF!important; color:#fff!important;}
a:hover.task-btn-orange{background: #459BE6;}
/*可点击按钮---蓝色---蓝色边框*/
.user_blue_btn{border: 1px solid #4CACFF;color: #4CACFF!important;}
/*可点击按钮---蓝色---蓝色背景*/
a.user_bluebg_btn{background-color:#4CACFF;color: #fff;}
a.user_orangebg_btn{background-color:#FF6800;color: #fff;}
a.user_greybg_btn{background-color:#747A7F;color: #fff;}
/*.user_white_btn{border: 1px solid #ffffff;color: #ffffff!important;}*/
.pointer{cursor: pointer}
.cdefault{cursor: default}
/*搜索框*/
#pollingPanel{position: relative;width: 248px;height: 32px;}
#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;}
#pollingPanel > input:focus{background-color: #fff;outline: none;}
#pollingPanel > a{position: absolute;right: 10px;top:0px;}
/* 弹框 */
.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;}
.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px;}
.task-popup-text-center{ text-align: center; color: #333;}
.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px;font-weight: bold; }
.task-popup-content{ padding:15px;}
.task-popup-submit{ margin:0px auto 15px; width: 160px;}
.task-popup-sure{ margin:0px auto 15px; width: 54px;}
.task-popup-right-sure{margin:0px auto 15px;text-align: center}
.task-popup-OK{ margin:15px auto; text-align: center}
.task-popup-bggrey{ background:#fff; color:#333;}
#closeIcon{position: absolute;color:#fefefe}
/* 模板弹框 20170407byLB */
#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; }
a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;}
.task_popup_con{ padding:20px;}
/* 模板弹框 20161013byLB */
#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; }
a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;}
#muban_popup_box input,#muban_pwopup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;}
input.radio-width90{ width: 90px; }
#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;}
/*提示条*/
.alert{ padding:10px;border: 1px solid transparent; text-align: center;}
.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;}
.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;}
.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
.taskclose:hover{opacity: 0.5;}
.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;}
/*搜索的下拉列表*/
.search_down_list a{display: block;height: 28px;line-height: 28px;padding: 0px 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.search_down_list a:hover{background: #fafafa;}
/*白色色块--类似个人主页-学习-里面的tab*/
.white-panel{border-radius: 2px;width: 100%;margin: 0px auto;box-sizing: border-box;padding-left: 25px;}
.white-panel li{width: 118px;height: 48px;line-height: 48px;text-align: center;color: #05101A;float: left;cursor: pointer;border:1px solid #fff;}
.white-panel li a{display: block;width: 100%;}
.white-panel li.active{border-radius: 24px;border:1px solid #4CACFF;color:#4CACFF; }
.white-panel li.active a{color:#4CACFF; }
/* 个人主页翻页 */
.pages_user_show a:hover,.pages_user_show li.active a{ background-color:#4CACFF; color:#fff;border: 1px solid #4CACFF;}
.pages_user_show a{border-radius: 2px; display: inline-block;border:1px solid #d1d1d1;background-color:#fff; color:#888; float:left;text-align:center; padding:2px 10px; line-height:1.9; margin: 0 5px;}
.pages_user_show li{float: left; list-style-type: none;}
.pages_user_show ul li{list-style-type: none !important;}
.pages_user_show ul li a{color:#888}
.page_GO{text-align:center;width: 80px;border-radius: 2px;margin-left: 5px;height: 33px;padding: 0px 5px;box-sizing: border-box;float: left;border:1px solid #d1d1d1;}
/* 小翻页 */
.pages_little_show a:hover,.pages_little_show li.active a{ background-color:#4CACFF;; color:#fff!important;border:1px solid #4CACFF}
.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;}
.pages_little_show li{float: left;}
/*左右排版结构:参考个人主页的经验值和金币等页面*/
.leftPanel{width: 22%;float: left;}
.leftPanel li.nav{padding:10px 0px;box-sizing: border-box;}
.leftPanel li.nav a{padding-left: 40px;display: block;width: 100%;box-sizing: border-box;border-left: 2px solid #fff;height: 24px;line-height: 24px;}
.leftPanel li.nav.active a{border-left: 2px solid #4CACFF;}
.rightPanel{width:78%;float: right;}
/*个人主页,认证的圆圈*/
.ringauto{width: 20px;height: 20px;line-height: 20px;text-align: center;border-radius: 50%;background-color: #F4FAFF;margin-right:5px;}
/*-------------------个人主页:右侧提示区域--------------------------*/
.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;}
.-task-sidebar div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;}
.-task-sidebar div i{ color:#fff;}
.-task-sidebar div i:hover{color: #fff!important;}
.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;}
.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center;
position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;}
.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;}
.-task-desc div img{float: left}
/***** loading ******/
/*****载入中******/
#ajax-indicator {
position: absolute; /* fixed not supported by IE*/
background-color:#eee;
border: 1px solid #bbb;
top:35%;
left:40%;
width:20%;
/*height:5%;*/
font-weight:bold;
text-align:center;
padding:0.6em;
z-index:100000;
opacity: 0.5;
}
.bdc{
border-bottom:1px solid #eee;
}
.plr15{
padding:0 15px;
}
.pd10{
padding:10px;
}
.pbt10{
padding:10px 0;
}
.pbt5{
padding:5px 0;
}
.mbt20{
margin: 20px 0;
}
.mb10{
margin-bottom: 10px;
}
.mt8{
margin-top:7px;
}
.mt10{
margin-top:10px;
}
.mbt10{
margin: 10px 0;
}
.mt5{
margin-top:5px;
}
.pull-right{
float:right;
}
.line-34{
line-height:34px;
}
.pull-left{
float:left;
}
.text-orange{
color: #FC7033;
}
.text-red{
color:#ff3756;
}
.text-green{
color: #29BD8B;
}
.bgc{
background-color:rgb(250, 250, 250);
}
.text-black{color:#333;}
.flex-nowrap{
display:flex;
white-space: nowrap;
html>body #ajax-indicator { position: fixed; }
#ajax-indicator span{
color:#fff;
color: #333333;
background-position: 0% 40%;
background-repeat: no-repeat;
background-image: url(/images/loading.gif);
padding-left: 26px;
vertical-align: bottom;
z-index:100000;
}
/*最新、最热*/
.bestChoose.active{color: #4CACFF;}
/*实训路径选择实训*/
.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px; font-size:14px !important; text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;}
.edu-filter-cir-grey:hover{background: #4cacff; color: #ffffff!important;}
.edu-filter-cir-grey.active{background: #4cacff; color: #ffffff!important; font-size: 14px !important;}
.with10{ width: 10%;box-sizing: border-box}.with12{ width: 12%;box-sizing: border-box}.with13{ width: 13%;box-sizing: border-box}.with14{ width: 14%;box-sizing: border-box}.with15{ width: 15%;box-sizing: border-box}
.with20{ width: 20%;box-sizing: border-box}.with22{ width: 22%;box-sizing: border-box}.with23{ width: 23%;box-sizing: border-box}.with25{ width: 25%;box-sizing: border-box}
.with30{ width: 30%;box-sizing: border-box}.with35{ width: 35%;box-sizing: border-box}
.with40{ width: 40%;box-sizing: border-box}.with45{ width: 45%;box-sizing: border-box}.with49{ width: 49%;box-sizing: border-box}
.with50{ width: 50%;box-sizing: border-box}.with55{ width: 55%;box-sizing: border-box}
.with52{ width: 52%;box-sizing: border-box}.with48{ width: 48%;box-sizing: border-box}
.with60{ width: 60%;box-sizing: border-box}.with65{ width: 65%;box-sizing: border-box}
.with70{ width: 70%;box-sizing: border-box}.with73{ width: 73%;box-sizing: border-box}.with75{ width: 75%;box-sizing: border-box}.with77{ width: 77%;box-sizing: border-box}.with78{ width: 78%;box-sizing: border-box}
.with80{ width: 80%;box-sizing: border-box}.with85{ width: 85%;box-sizing: border-box}
.with87{ width: 87%;box-sizing: border-box}.with90{ width: 90%;box-sizing: border-box}.with95{ width: 95%;box-sizing: border-box}
.with100{ width: 100%;}
.transform-90{
transform:rotate(-90deg);
-ms-transform:rotate(-90deg); /* IE 9 */
-moz-transform:rotate(-90deg); /* Firefox */
-webkit-transform:rotate(-90deg); /* Safari 和 Chrome */
-o-transform:rotate(-90deg);
}
.text-blue{
color:#1890ff;
.newplayVedio{
font-size: 86px !important;
}
.text-gray{
color:#999 !important;
.icon-qizhi{
font-size:30px !important;
}
.mlr5{
margin:0 5px;
.icon-31{
font-size: 68px !important;
}
.ml20{
margin-left:20px;
/*置顶*/
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;}
.btn-cir-red{background:red;color: #fff; font-weight: normal;cursor: default}
.btn-cir-red:hover{background:red;color: #fff!important;}
.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1}
/*动态标签*/
.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;}
.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;}
.edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/
.edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/
.edu-filter-btn-green{border:1px solid #29BD8B; color:#29BD8B!important;}/*申诉中、已开启补交*/
.edu-filter-btn-appeal{border:1px solid #FF4343; color:#FF4343!important;}/*申诉中*/
.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;}
.edu-filter-btn-danger{background:#d72e36; color:#fff;}
.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;}
.edu-filter-btn-no-late{border:1px solid #747A7F;color: #747A7F;}/*未发布*/
.edu-filter-btn-end{border: 1px solid #999999;color: #999999;}/*已结束*/
/*动态按钮*/
.edu-activity-orange{background-color:#FF6800;color:#fff!important;cursor: pointer;border: 1px solid #ff6800;}/*修改作品、补交作品、立即补交、补交附件*/
.edu-activity-blue{background-color:#4CACFF;color:#fff!important;cursor: pointer;border: 1px solid #4CACFF;}/*开始实战、开始答题、继续答题、继续实战、提交作品*/
.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/
.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/
.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/
/*课堂设置页面*/
.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;}
.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative}
.course-ul-nav a.active,.course-ul-nav a:hover{color: #4CACFF;}
.course-ul-nav a.active:after{content: '';width: 94px;left: 20px;bottom: 0px;height: 2px;background-color: #4CACFF;position: absolute}
/*-----下拉框--------*/
.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;border:1px solid #eee;}
.down-select p{height: 35px;line-height: 35px;padding-left: 5px;cursor: pointer}
.down-select p:hover{background: #f3f4f6}
.paddingLeft28{padding-left:28px;}
.color656565{
color:#656565;
}
.ml10{
margin-left:10px;
.colorC8161D{
color:#C8161D;
}
.mr3{
margin-right:3px;
.bor-reds{
border:1px solid #FF0000!important;
border-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.mr8{
margin-right:8px;
.yslminHeigth{
min-height: 400px;
}
.mr15{
margin-right:15px;
p{
margin:0;
}
.main-height{
min-height:60px !important;
}
@ -343,8 +1027,104 @@ textarea{
line-height:2;
}
.fs13{
font-size:13px;
}
.fs16{
font-size:16px;
}
.position-relative{
position:relative;
}
.text-center{
text-align:center;
}
.bdc{
border-bottom:1px solid #eee;
}
.plr15{
padding:0 15px;
}
.pd10{
padding:10px;
}
.pbt10{
padding:10px 0;
}
.pbt5{
padding:5px 0;
}
.mbt20{
margin: 20px 0;
}
.mb10{
margin-bottom: 10px;
}
.mt8{
margin-top:7px;
}
.mt10{
margin-top:10px;
}
.mbt10{
margin: 10px 0;
}
.mt5{
margin-top:5px;
}
.pull-right{
float:right;
}
.line-34{
line-height:34px;
}
.pull-left{
float:left;
}
.text-orange{
color: #FC7033;
}
.text-red{
color:#ff3756;
}
.text-green{
color: #29BD8B;
}
.bgc{
background-color:rgb(250, 250, 250);
}
.text-black{color:#333;}
.flex-nowrap{
display:flex;
white-space: nowrap;
}
.text-blue{
color:#1890ff;
}
.text-gray{
color:#999 !important;
}
.mlr5{
margin:0 5px;
}
.ml20{
margin-left:20px;
}
.ml10{
margin-left:10px;
}
.mr3{
margin-right:3px;
}
.mr8{
margin-right:8px;
}
.mr15{
margin-right:15px;
}
/**** latex 公式 ****/
.katex-display, .katex-display>.katex>.katex-html, .katex-display>.katex {
display: inline !important;
}

@ -0,0 +1,2 @@
$.notify({ message: '操作成功' },{ type: 'success' });
$("<%= params[:element]%>").remove();

@ -0,0 +1,15 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb("#{@salesman.name}的渠道", admins_salesmans_path) %>
<% end %>
<div class="box search-form-container salesman-channel-list-form rig">
<div class="flex-1">
<%= javascript_void_link '新增渠道', class: 'btn btn-primary', data: {salesman_id: @salesman.id, toggle: 'modal', target: '.admin-add-salesman-channel-user-modal' } %>
</div>
</div>
<div class="box admin-list-container salesman-channel-list-container">
<%= render(partial: 'admins/salesman_channels/shared/list') %>
</div>
<%= render 'admins/salesman_channels/shared/add_salesman_channels_user_modal' %>

@ -0,0 +1,30 @@
<div class="modal fade admin-add-salesman-channel-user-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">添加渠道</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="admin-add-salesman-user-form">
<%= hidden_field_tag(:salesman_id, nil) %>
<div class="form-group d-flex">
<label class="col-form-label">单位:</label>
<div class="d-flex flex-column-reverse w-75">
<select id="user_ids" name="user_ids" class="form-control salesman-channel-user-select"></select>
</div>
</div>
<div class="error text-danger"></div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary submit-btn">确认</button>
</div>
</div>
</div>
</div>

@ -0,0 +1,42 @@
<table class="table table-hover text-center salesman-channel-list-table">
<thead class="thead-light">
<tr>
<th width="6%">序号</th>
<th width="17%" class="text-left">名称</th>
<th width="15%" class="text-left">教师数</th>
<th width="15%" class="text-left">学生数</th>
<th width="15%">课堂数</th>
<th width="15%">实训数</th>
<th width="17%">操作</th>
</tr>
</thead>
<tbody>
<% if @channels.present? %>
<% @channels.each_with_index do |channel, index| %>
<tr class="channel-item salesman-channel-item-<%= channel.id %>">
<td><%= index + 1 %></td>
<td class="text-left">
<span><%= channel.school_name %></span>
</td>
<td class="text-left">
<span><%= channel.teacher_count %></span>
</td>
<td class="text-left">
<span><%= channel.student_count %></span>
</td>
<td>
<%= channel.course_count %>
</td>
<td>
<%= channel.shixuns_count %>
</td>
<td>
<%= delete_link '删除', admins_salesman_channel_path(channel, salesman_id: channel.salesman_id, element: ".salesman-channel-item-#{channel.id}"), class: 'delete-salesman-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>

@ -0,0 +1,2 @@
$.notify({ message: '操作成功' },{ type: 'success' });
$("<%= params[:element]%>").remove();

@ -4,8 +4,9 @@
<th width="6%">序号</th>
<th width="20%" class="text-left">名称</th>
<th width="30%" class="text-left">单位</th>
<th width="22%" class="text-left">课堂数</th>
<th width="22%">实训数</th>
<th width="12%" class="text-left">课堂数</th>
<th width="12%">实训数</th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
@ -25,6 +26,9 @@
<td>
<%= customer.shixuns_count %>
</td>
<td>
<%= delete_link '删除', admins_salesman_customer_path(customer, salesman_id: customer.salesman_id, element: ".salesman-customer-item-#{customer.id}"), class: 'delete-salesman--action' %>
</td>
</tr>
<% end %>
<% else %>

@ -1,3 +1,2 @@
$.notify({ message: '操作成功' },{ type: 'success' });
console.log()
$(".salesman-item-<%= params[:id]%>").remove();

@ -0,0 +1,6 @@
json.count @total_count
json.schools do
json.array! @schools.each do |school|
json.extract! school, :id, :name
end
end

@ -6,7 +6,7 @@
<%= form_tag(admins_subjects_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
<div class="form-group mr-1">
<label for="status">状态:</label>
<% status_options = [['全部', ''], ['编辑中', 'pending'], ['审核中', 'applying'], ['已发布', 'published']] %>
<% status_options = [['全部', ''], ["编辑中", "editing"], ["已发布", 'processed'], ["待审核", 'pending'], ["已公开", 'publiced']] %>
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
</div>

@ -1,7 +1,8 @@
json.course_groups @course_groups.each do |group|
json.(group, :id, :course_members_count, :name)
json.(group, :id, :course_members_count, :name, :invite_code_halt)
json.invite_code group.invite_code if @user_course_identity < Course::STUDENT
json.member_manager member_manager(group, @teachers) if @user_course_identity < Course::NORMAL
json.edit_auth edit_auth(group, @teachers) if @user_course_identity < Course::STUDENT
end
if @user_course_identity == Course::STUDENT

@ -25,9 +25,11 @@ json.homeworks @homework_commons.each do |homework|
json.upper_category_name homework.course_second_category&.name unless params[:category]
unless curr_status[:status].include?("未发布")
json.commit_count studentwork_count homework, 1, @member
json.uncommit_count studentwork_count homework, 0, @member
json.all_count studentwork_count homework, 2, @member
work_count = calculate_work_count homework, @member
json.commit_count work_count[:commit_count]
json.uncommit_count work_count[:uncommit_count]
json.all_count work_count[:all_count]
json.compelete_count work_count[:compelete_count]
end
if homework.homework_type == "practice"

@ -171,7 +171,7 @@ elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
json.user_login @is_evaluation ? "--" : work.user.try(:login)
json.user_name @is_evaluation ? "匿名" : work.user.try(:real_name)
json.user_img url_to_avatar(@is_evaluation ? "0" : work.user)
json.user_img @is_evaluation ? "--" : url_to_avatar(work.user)
end
end

@ -0,0 +1,2 @@
json.status @status
json.message @status == 0 ? "已公开过申请,请等待管理员审核" : "公开申请已提交,请等待管理员的审核"

@ -1,2 +1,2 @@
json.status 1
json.status 0
json.subject_id @subject.id

@ -7,7 +7,7 @@ end
json.stages @subject.stages.includes(shixuns: [user: :user_extension]) do |stage|
index = 1
json.shixuns stage.shixuns do |shixun|
if shixun.status == 2 && !shixun.is_jupyter && !@none_shixun_ids.include?(shixun.id)
if shixun.status == 2 && !shixun.is_jupyter && @all_shixun_ids.include?(shixun.id)
json.shixun_id shixun.id
json.id shixun.id
json.identifier shixun.identifier

@ -1,2 +1,2 @@
json.status @status
json.message @status == 0 ? "已发布过申请,请等待管理员审核" : "发布申请已提交,请等待管理员的审核"
json.status 0
json.message "发布成功"

@ -6,7 +6,8 @@ json.subject_score @subject.all_score
json.member_count @subject.member_count
json.allow_delete (@subject.status != 2 && @is_creator) || @user.admin?
json.publish_status publish_status(@subject, @is_manager, @user)
json.publish_status publish_status(@subject, @is_manager)
json.public_status public_status(@subject, @is_manager, @user)
json.allow_statistics @is_manager
json.allow_send @user.logged?
json.allow_visit @subject.status > 1 || @is_manager

@ -3,4 +3,9 @@
status:
'0': 编辑中
'1': 审核中
'2': 已发布
'2': 已发布
public:
'editing': 编辑中
'processed': 已发布
'pending': 审核中
'publiced': 已公开

@ -406,9 +406,12 @@ Rails.application.routes.draw do
resources :subjects, path: :paths do
member do
get 'choose_subject_shixun'
get 'publish'
get 'cancel_publish'
get 'cancel_has_publish'
post 'publish'
post :apply_public
post :cancel_public
post 'cancel_publish'
post 'cancel_has_publish'
post :cancel_has_public
get 'statistics'
get 'statistics_info'
get 'shixun_report'
@ -662,6 +665,7 @@ Rails.application.routes.draw do
member do
post 'rename_group'
post 'move_category'
post 'set_invite_code_halt'
end
collection do
@ -1360,8 +1364,12 @@ Rails.application.routes.draw do
resources :salesmans, only: [:index, :create, :edit, :update, :destroy] do
post :batch_add, on: :collection
end
resources :salesman_channels, only: [:index, :create, :edit, :update, :destroy]
resources :salesman_customers, only: [:index, :create, :edit, :update, :destroy]
resources :salesman_channels, only: [:index, :create, :edit, :update, :destroy] do
post :batch_add, on: :collection
end
resources :salesman_customers, only: [:index, :create, :edit, :update, :destroy] do
post :batch_add, on: :collection
end
end
namespace :cooperative do

@ -1,6 +1,6 @@
class CreateSalesmen < ActiveRecord::Migration[5.2]
class CreateSalesmans < ActiveRecord::Migration[5.2]
def change
create_table :salesmen do |t|
create_table :salesmans do |t|
t.references :user
t.string :name
t.integer :salesman_channels_count

@ -0,0 +1,5 @@
class AddCodeHaltToCourseGroup < ActiveRecord::Migration[5.2]
def change
add_column :course_groups, :invite_code_halt, :boolean, default: false
end
end

@ -0,0 +1,5 @@
class AddPublicForSubjects < ActiveRecord::Migration[5.2]
def change
add_column :subjects, :public, :integer, :default => 0
end
end

@ -0,0 +1,7 @@
class MigrateSubjectStatus < ActiveRecord::Migration[5.2]
def change
Subject.unhidden.visible.update_all(public: 2)
Subject.where(status: 1, id: ApplyAction.where(container_type: 'ApplySubject', status: 0)
.pluck(:container_id)).update_all(status: 2, public: 1)
end
end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 393 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save