diff --git a/.gitignore b/.gitignore index cb2789f9b..acaef9bd0 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ /public/react/node_modules/ /public/react/config/stats.json /public/react/stats.json +/public/react/.idea/* /public/npm-debug.log diff --git a/app/assets/javascripts/common.js b/app/assets/javascripts/common.js index fa7bef244..dc0818b64 100644 --- a/app/assets/javascripts/common.js +++ b/app/assets/javascripts/common.js @@ -1,5 +1,6 @@ function createMDEditor(element, opts){ var defaults = { + height: 600, path: '/editormd/lib/', syncScrolling: "single", tex: true, diff --git a/app/controllers/admins/base_controller.rb b/app/controllers/admins/base_controller.rb index 6f89e7afa..345df3e31 100644 --- a/app/controllers/admins/base_controller.rb +++ b/app/controllers/admins/base_controller.rb @@ -5,6 +5,8 @@ class Admins::BaseController < ApplicationController layout 'admin' + skip_before_action :verify_authenticity_token + before_action :require_login, :require_admin! after_action :rebind_event_if_ajax_render_partial diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 86d6312ab..a15e2b5ab 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -47,7 +47,7 @@ class ApplicationController < ActionController::Base # 题库的访问权限 def bank_visit_auth - tip_exception("未通过职业认证") if current_user.is_teacher? && !current_user.certification_teacher? && !current_user.admin? && @bank.user_id != current_user.id && @bank.is_public + tip_exception(-2,"未通过职业认证") if current_user.is_teacher? && !current_user.certification_teacher? && !current_user.admin? && @bank.user_id != current_user.id && @bank.is_public tip_exception(403, "无权限") unless @bank.user_id == current_user.id || current_user.admin? || (current_user.certification_teacher? && @bank.is_public) end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 10d733a94..2039dbc6f 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -303,7 +303,7 @@ class CoursesController < ApplicationController def destroy if @course.is_delete == 0 @course.delete! - Tiding.create!(user_id: @course.tea_id, trigger_user_id: 1, container_id: @course.id, + Tiding.create!(user_id: @course.tea_id, trigger_user_id: 0, container_id: @course.id, container_type: 'Course', tiding_type: 'Delete', extra: @course.name) normal_status(0, "成功") else diff --git a/app/controllers/exercise_banks_controller.rb b/app/controllers/exercise_banks_controller.rb index 160393e0c..9a35bfcdb 100644 --- a/app/controllers/exercise_banks_controller.rb +++ b/app/controllers/exercise_banks_controller.rb @@ -1,7 +1,7 @@ #encoding: UTF-8 class ExerciseBanksController < ApplicationController before_action :require_login - before_action :find_bank, except: [:choose_shixun] + before_action :find_bank, :bank_visit_auth, except: [:choose_shixun] before_action :bank_admin, only: [:update] before_action :commit_shixun_present, only: [:commit_shixun] diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 940db2883..916f09430 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -67,13 +67,20 @@ class GamesController < ApplicationController uri = "#{shixun_tomcat}/bridge/vnc/getvnc" params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}"} res = uri_post uri, params + logger.info("###############---- ") if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") end - # 无域名版本 - #@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" - # 有域名版本 - @vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" + + if request.subdomain == "pre-newweb" + # 无域名版本 + @vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" + else + # 有域名版本 + @vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" + end + + @vnc_evaluate = @shixun.vnc_evaluate rescue Exception => e Rails.logger.error(e.message) end @@ -535,13 +542,14 @@ class GamesController < ApplicationController end testCases = Base64.urlsafe_encode64(testSet.to_json) unless testSet.blank? - + # 评测类型: 0,1,2 用于webssh的评测, 3用于vnc + podType = @shixun.vnc_evaluate ? 3 : @shixun.webssh # 注意:这个地方的参数写的时候不能换行 content_modified = params[:content_modified] # 决定文件内容是否有修改,有修改如果中间层pull没有更新,则轮询等待更新 br_params = {:tpiID => "#{@myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{@game.id}", :instanceChallenge => "#{step}", :testCases => "#{testCases}", :resubmit => "#{resubmit}", - :times => params[:first].to_i, :podType => @shixun.webssh, :content_modified => content_modified, + :times => params[:first].to_i, :podType => podType, :content_modified => content_modified, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}", :persistenceName => @shixun.identifier, :tpmScript => "#{tpmScript}", :sec_key => sec_key, :timeLimit => game_challenge.exec_time, :isPublished => (@shixun.status < 2 ? 0 : 1) } diff --git a/app/controllers/gtopic_banks_controller.rb b/app/controllers/gtopic_banks_controller.rb index e0382b21a..f09a8554c 100644 --- a/app/controllers/gtopic_banks_controller.rb +++ b/app/controllers/gtopic_banks_controller.rb @@ -1,6 +1,6 @@ class GtopicBanksController < ApplicationController before_action :require_login - before_action :find_bank + before_action :find_bank, :bank_visit_auth before_action :bank_admin, only: [:edit, :update] def show diff --git a/app/controllers/helps_controller.rb b/app/controllers/helps_controller.rb new file mode 100644 index 000000000..9aefb5129 --- /dev/null +++ b/app/controllers/helps_controller.rb @@ -0,0 +1,44 @@ +class HelpsController < ApplicationController + before_action :require_login, only: [:feedback] + + helper_method :current_help + + def about + render_ok(content: current_help&.about_us) + end + + def contact + @cooperations = Cooperation.all.group(:user_type) + end + + def cooperatives + @data = { 'alliance_coop' => [], 'com_coop' => [], 'edu_coop' => [] } + @data = @data.merge CooImg.all.group_by(&:img_type) + end + + def agreement + render_ok(content: current_help&.agreement) + end + + def help_center + render_ok(content: current_help&.help_center) + end + + def feedback + content = "

[#{params[:question_kind]}]

问题页面网址:#{params[:url]}

#{params[:description]}" + + ActiveRecord::Base.transaction do + attr = { sender_id: User.current.id, receiver_id: 1, content: content, send_time: Time.now } + PrivateMessage.create!(attr.merge(user_id: User.current.id, target_id: 1, status: 1)) + PrivateMessage.create!(attr.merge(user_id: 1, target_id: User.current.id, status: 0)) + end + + render_ok + end + + private + + def current_help + @_current_help ||= Help.first + end +end \ No newline at end of file diff --git a/app/controllers/homework_banks_controller.rb b/app/controllers/homework_banks_controller.rb index 31e733245..61bded033 100644 --- a/app/controllers/homework_banks_controller.rb +++ b/app/controllers/homework_banks_controller.rb @@ -1,6 +1,6 @@ class HomeworkBanksController < ApplicationController before_action :require_login - before_action :find_bank + before_action :find_bank, :bank_visit_auth before_action :bank_params, only: [:update] before_action :bank_admin, only: [:update, :destroy, :set_public] diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index b62840200..c0da42aa8 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -82,7 +82,9 @@ class HomeworkCommonsController < ApplicationController end @task_count = @homework_commons.size - @homework_commons = @homework_commons.order("position DESC").page(page).per(15) + order_str = @homework_type == 4 ? "position DESC" : "IF(ISNULL(homework_commons.publish_time),0,1), homework_commons.publish_time DESC, + homework_commons.created_at DESC" + @homework_commons = @homework_commons.order(order_str).page(page).per(15) if @homework_type == 4 @homework_commons = @homework_commons.includes(:homework_detail_manual, :published_settings, :shixuns) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 69bd01dde..8c11e88c5 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -266,7 +266,8 @@ class MyshixunsController < ApplicationController :identifier => @sec_key, :exec_time => exec_time) uid_logger("-- game build: file update #{@sec_key}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") end - unless @hide_code + # 隐藏代码文件 和 VNC的都不需要走版本库 + unless @hide_code || @myshixun.shixun&.vnc_evaluate # 远程版本库文件内容 last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] content = params[:content] diff --git a/app/controllers/project_packages_controller.rb b/app/controllers/project_packages_controller.rb index 3cc7e79cb..c8b010b32 100644 --- a/app/controllers/project_packages_controller.rb +++ b/app/controllers/project_packages_controller.rb @@ -55,7 +55,7 @@ class ProjectPackagesController < ApplicationController package.destroy! - Tiding.create!(user_id: package.creator_id, trigger_user_id: 1, container_id: package.id, + Tiding.create!(user_id: package.creator_id, trigger_user_id: 0, container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'Destroyed', extra: package.title) render_ok diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index e7be8b395..b4e98e05f 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -265,6 +265,7 @@ class QuestionBanksController < ApplicationController # exercise.update_column(:quotes, exercise.quotes+1) # end new_exercise if new_exercise.save! + exercise.update_column(:quotes, exercise.quotes+1) end end @@ -292,6 +293,7 @@ class QuestionBanksController < ApplicationController # poll.update_column(:quotes, poll.quotes+1) # end new_poll if new_poll.save! + poll.update_column(:quotes, poll.quotes+1) end end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 221197f4e..79e182fef 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -448,6 +448,7 @@ class ShixunsController < ApplicationController ShixunMirrorRepository.create(:shixun_id => @shixun.id, :mirror_repository_id => mirror) end end + logger.info("#########shixun_params#{shixun_params}") @shixun.update_attributes(shixun_params) logger.info("##########shixun_info_params: #{shixun_info_params}") logger.info("##########params[:shixun_info][:evaluate_script]: #{params[:shixun_info][:evaluate_script]}") @@ -931,7 +932,7 @@ private raise("实训名称不能为空") if params[:shixun][:name].blank? params.require(:shixun).permit(:name, :trainee, :webssh, :can_copy, :use_scope, :vnc, :test_set_permission, :task_pass, :multi_webssh, :opening_time, :mirror_script_id, :code_hidden, - :hide_code, :forbid_copy) + :hide_code, :forbid_copy, :vnc_evaluate) end def shixun_info_params diff --git a/app/controllers/task_banks_controller.rb b/app/controllers/task_banks_controller.rb index 1d3aca955..2b1a400ef 100644 --- a/app/controllers/task_banks_controller.rb +++ b/app/controllers/task_banks_controller.rb @@ -1,6 +1,6 @@ class TaskBanksController < ApplicationController before_action :require_login - before_action :find_bank + before_action :find_bank, :bank_visit_auth before_action :bank_visit_auth before_action :bank_admin, only: [:update] @@ -35,14 +35,17 @@ class TaskBanksController < ApplicationController def gtask_bank_params tip_exception("name参数不能为空") if params[:gtask_bank][:name].blank? tip_exception("description参数不能为空") if params[:gtask_bank][:description].blank? - if @bank.homework_type == 3 + if @bank.task_type == 2 tip_exception("base_on_project参数不能为空") if params[:gtask_bank][:base_on_project].nil? tip_exception("min_num参数不能为空") if params[:gtask_bank][:min_num].blank? tip_exception("max_num参数不能为空") if params[:gtask_bank][:max_num].blank? tip_exception("最小人数不能小于1") if params[:gtask_bank][:min_num].to_i < 1 tip_exception("最大人数不能小于最小人数") if params[:gtask_bank][:max_num].to_i < params[:gtask_bank][:min_num].to_i end - params.require(:gtask_bank).permit(:name, :description) if @bank.task_type == 1 - params.require(:gtask_bank).permit(:name, :description, :min_num, :max_num, :base_on_project) if @bank.task_type == 2 + if @bank.task_type == 1 + params.require(:gtask_bank).permit(:name, :description) + else + params.require(:gtask_bank).permit(:name, :description, :min_num, :max_num, :base_on_project) + end end end diff --git a/app/controllers/users/question_banks_controller.rb b/app/controllers/users/question_banks_controller.rb index d6a2fcc88..c5b837d0b 100644 --- a/app/controllers/users/question_banks_controller.rb +++ b/app/controllers/users/question_banks_controller.rb @@ -1,11 +1,12 @@ class Users::QuestionBanksController < Users::BaseController before_action :require_login - before_action :private_user_resources! + skip_before_action :check_observed_user_exists! + # before_action :private_user_resources! before_action :check_query_params! before_action :check_user_permission! def index - service = Users::QuestionBankService.new(observed_user, query_params) + service = Users::QuestionBankService.new(User.current, query_params) question_banks = service.call @count = question_banks.count @@ -30,7 +31,7 @@ class Users::QuestionBanksController < Users::BaseController .where(commit_status: 1, exercises: { exercise_bank_id: question_bank_ids }) .group('exercises.exercise_bank_id').count when 'poll' then - PollUser.joins(:poll).where(polls: { exercise_bank_id: question_bank_ids }) + PollUser.joins(:poll).where(commit_status: 1, polls: { exercise_bank_id: question_bank_ids }) .group('polls.exercise_bank_id').count when 'gtask' then GraduationWork.has_committed.joins(:graduation_task) @@ -65,7 +66,7 @@ class Users::QuestionBanksController < Users::BaseController def check_user_permission! if params[:type] == 'publicly' - render_error("未通过职业认证") unless User.current.admin? || User.current.certification_teacher? + normal_status(-2,"未通过职业认证") unless User.current.admin? || User.current.certification_teacher? else render_forbidden unless User.current.admin? || User.current.is_teacher? end diff --git a/app/controllers/wechats/js_sdk_signatures_controller.rb b/app/controllers/wechats/js_sdk_signatures_controller.rb index 6d7b3d87d..0b66cc263 100644 --- a/app/controllers/wechats/js_sdk_signatures_controller.rb +++ b/app/controllers/wechats/js_sdk_signatures_controller.rb @@ -1,6 +1,6 @@ class Wechats::JsSdkSignaturesController < ApplicationController def create - timestamp = (Time.now.to_f * 1000).to_i + timestamp = Time.now.to_i noncestr = ('A'..'z').to_a.sample(8).join signature = Util::Wechat.js_sdk_signature(params[:url], noncestr, timestamp) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 81093dc12..df642a074 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -86,7 +86,7 @@ module TidingDecorator def teacher_join_course_content name = Course.find_by(id: container_id)&.name - I18n.t(locale_format extra) % [user.show_real_name, name] + I18n.t(locale_format extra) % [trigger_user&.show_real_name, name] end def apply_add_department_content @@ -258,7 +258,7 @@ module TidingDecorator def manager_join_project_content project = Project.find_by(id: container_id) - I18n.t(locale_format(extra)) % [user&.show_real_name, project.name] + I18n.t(locale_format(extra)) % [trigger_user&.show_real_name, project.name] end def reporter_join_project_content diff --git a/app/libs/util/wechat.rb b/app/libs/util/wechat.rb index 069322f18..1b064ba94 100644 --- a/app/libs/util/wechat.rb +++ b/app/libs/util/wechat.rb @@ -7,7 +7,8 @@ module Util::Wechat attr_accessor :appid, :secret def js_sdk_signature(url, noncestr, timestamp) - str = { jsapi_ticket: jsapi_ticket, noncestr: noncestr, timestamp: timestamp, url: url }.to_query + data = { jsapi_ticket: jsapi_ticket, noncestr: noncestr, timestamp: timestamp, url: url } + str = data.map { |k, v| "#{k}=#{v}" }.join('&') Digest::SHA1.hexdigest(str) end diff --git a/app/models/attachment.rb b/app/models/attachment.rb index e3c55242f..ae28e7d52 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -4,7 +4,7 @@ class Attachment < ApplicationRecord include Publishable include Lockable - belongs_to :container, polymorphic: true, touch: true, optional: true + belongs_to :container, polymorphic: true, optional: true belongs_to :author, class_name: "User", foreign_key: :author_id belongs_to :course, foreign_key: :container_id, optional: true has_many :attachment_group_settings, :dependent => :destroy diff --git a/app/models/course.rb b/app/models/course.rb index 5a2a065ba..54d897b07 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -337,7 +337,7 @@ class Course < ApplicationRecord #创建课程后,给该用户发送消息 def send_tiding - self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: 1, belong_container_id: id, + self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: 0, belong_container_id: id, belong_container_type: 'Course', tiding_type: 'System') end diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 674e92169..7774dbf0c 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -28,7 +28,7 @@ class CourseMessage < ApplicationRecord def send_deal_tiding deal_status # 发送申请处理结果消息 Tiding.create!( - user_id: course_message_id, trigger_user_id: 1, container_id: course_id, container_type: 'DealCourse', + user_id: course_message_id, trigger_user_id: 0, container_id: course_id, container_type: 'DealCourse', belong_container: course, extra: content.to_i == 2 ? '9' : '7', tiding_type: 'System', status: deal_status ) # 将申请消息置为已处理 diff --git a/app/models/gtopic_bank.rb b/app/models/gtopic_bank.rb index af5b267a6..609219711 100644 --- a/app/models/gtopic_bank.rb +++ b/app/models/gtopic_bank.rb @@ -1,7 +1,7 @@ class GtopicBank < ApplicationRecord belongs_to :user - belongs_to :graduation_topic - belongs_to :course_list + belongs_to :graduation_topic, optional: true + belongs_to :course_list, optional: true has_many :attachments, as: :container, dependent: :destroy has_many :graduation_topics, dependent: :nullify diff --git a/app/models/searchable/course.rb b/app/models/searchable/course.rb index 5060d9ddd..794dec0e2 100644 --- a/app/models/searchable/course.rb +++ b/app/models/searchable/course.rb @@ -24,7 +24,7 @@ module Searchable::Course author_name: teacher&.real_name, author_school_name: teacher&.school_name, visits_count: visits, - members_count: members_count, + members_count: course_members_count, is_public: is_public == 1, first_category_url: ApplicationController.helpers.module_url(none_hidden_course_modules.first, self) } diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 33d36d026..9ad3cbcdf 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -5,6 +5,9 @@ class Shixun < ApplicationRecord # hide_code: 隐藏代码窗口 # code_hidden: 隐藏代码目录 # task_pass: 跳关 + # webssh 0:不开启webssh;1:开启练习模式; 2:开启评测模式 + # trainee 实训的难度 + # vnc: VCN实训是否用于评测 has_many :challenges, -> {order("challenges.position asc")}, dependent: :destroy has_many :challenge_tags, through: :challenges has_many :myshixuns, :dependent => :destroy diff --git a/app/models/user_extension.rb b/app/models/user_extension.rb index 5a0dc8a37..98afcb165 100644 --- a/app/models/user_extension.rb +++ b/app/models/user_extension.rb @@ -1,6 +1,6 @@ class UserExtension < ApplicationRecord # identity 0: 教师教授 1: 学生, 2: 专业人士, 3: 开发者 - enum identity: { teacher: 0, student: 1, professional: 2, developer: 3 } + enum identity: { teacher: 0, student: 1, professional: 2, developer: 3, cnmooc: 4, unselect: -1 } belongs_to :user, touch: true belongs_to :school, optional: true diff --git a/app/services/libraries/agree_apply_service.rb b/app/services/libraries/agree_apply_service.rb index d452083b3..3367e4585 100644 --- a/app/services/libraries/agree_apply_service.rb +++ b/app/services/libraries/agree_apply_service.rb @@ -25,7 +25,7 @@ class Libraries::AgreeApplyService < ApplicationService private def notify_library_author! - Tiding.create!(user_id: library.user_id, trigger_user_id: 1, + Tiding.create!(user_id: library.user_id, trigger_user_id: 0, container_id: library.id, container_type: 'Library', tiding_type: 'System', status: 1) end diff --git a/app/services/libraries/refuse_apply_service.rb b/app/services/libraries/refuse_apply_service.rb index 9b249b6fa..9868c5989 100644 --- a/app/services/libraries/refuse_apply_service.rb +++ b/app/services/libraries/refuse_apply_service.rb @@ -32,7 +32,7 @@ class Libraries::RefuseApplyService < ApplicationService private def notify_library_author! - Tiding.create!(user_id: library.user_id, trigger_user_id: 1, + Tiding.create!(user_id: library.user_id, trigger_user_id: 0, container_id: library.id, container_type: 'Library', tiding_type: 'System', status: 2, extra: library_apply.reason) end diff --git a/app/services/project_packages/agree_apply_service.rb b/app/services/project_packages/agree_apply_service.rb index 7cef7f70c..3361babad 100644 --- a/app/services/project_packages/agree_apply_service.rb +++ b/app/services/project_packages/agree_apply_service.rb @@ -29,7 +29,7 @@ class ProjectPackages::AgreeApplyService < ApplicationService Tiding.where(container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'Apply', status: 0).update_all(status: 1) - Tiding.create!(user_id: package.creator_id, trigger_user_id: 1, + Tiding.create!(user_id: package.creator_id, trigger_user_id: 0, container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'System', status: 1) end diff --git a/app/services/project_packages/end_bidding_service.rb b/app/services/project_packages/end_bidding_service.rb index 6d43db949..c0d5b76da 100644 --- a/app/services/project_packages/end_bidding_service.rb +++ b/app/services/project_packages/end_bidding_service.rb @@ -16,7 +16,7 @@ class ProjectPackages::EndBiddingService < ApplicationService private def send_bidding_end_notify! - Tiding.create!(user_id: package.creator_id, trigger_user_id: 1, + Tiding.create!(user_id: package.creator_id, trigger_user_id: 0, container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'BiddingEnd') end diff --git a/app/services/project_packages/refuse_apply_service.rb b/app/services/project_packages/refuse_apply_service.rb index 142efe1e0..972a7004f 100644 --- a/app/services/project_packages/refuse_apply_service.rb +++ b/app/services/project_packages/refuse_apply_service.rb @@ -31,7 +31,7 @@ class ProjectPackages::RefuseApplyService < ApplicationService Tiding.where(container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'Apply', status: 0).update_all(status: 1) - Tiding.create!(user_id: package.creator_id, trigger_user_id: 1, + Tiding.create!(user_id: package.creator_id, trigger_user_id: 0, container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'System', status: 2, extra: apply.reason) end diff --git a/app/services/project_packages/save_service.rb b/app/services/project_packages/save_service.rb index 8385ac5dd..40d33c453 100644 --- a/app/services/project_packages/save_service.rb +++ b/app/services/project_packages/save_service.rb @@ -71,7 +71,7 @@ class ProjectPackages::SaveService < ApplicationService end def send_create_notify! - Tiding.create!(user_id: package.creator_id, trigger_user_id: 1, + Tiding.create!(user_id: package.creator_id, trigger_user_id: 0, container_id: package.id, container_type: 'ProjectPackage', tiding_type: 'Created') end diff --git a/app/services/videos/agree_apply_service.rb b/app/services/videos/agree_apply_service.rb index 50791935a..0a95961ab 100644 --- a/app/services/videos/agree_apply_service.rb +++ b/app/services/videos/agree_apply_service.rb @@ -28,7 +28,7 @@ class Videos::AgreeApplyService < ApplicationService private def notify_video_author! - Tiding.create!(user_id: video.user_id, trigger_user_id: 1, + Tiding.create!(user_id: video.user_id, trigger_user_id: 0, container_id: video.id, container_type: 'Video', tiding_type: 'System', status: 1) end diff --git a/app/services/videos/refuse_apply_service.rb b/app/services/videos/refuse_apply_service.rb index 5d796db79..5a2cc4ef9 100644 --- a/app/services/videos/refuse_apply_service.rb +++ b/app/services/videos/refuse_apply_service.rb @@ -31,7 +31,7 @@ class Videos::RefuseApplyService < ApplicationService private def notify_video_author! - Tiding.create!(user_id: video.user_id, trigger_user_id: 1, + Tiding.create!(user_id: video.user_id, trigger_user_id: 0, container_id: video.id, container_type: 'Video', tiding_type: 'System', status: 2, extra: video_apply.reason) end diff --git a/app/templates/shared/main.css b/app/templates/shared/main.css index 884f6fa37..befe7e40a 100644 --- a/app/templates/shared/main.css +++ b/app/templates/shared/main.css @@ -83,6 +83,7 @@ a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center .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;} diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 28d8bb859..048188746 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -3,6 +3,7 @@ json.(@base_date, :st, :discusses_count, :game_count, :record_onsume_time, :prev :shixun, :myshixun, :git_url) if @shixun.vnc json.vnc_url @vnc_url + json.vnc_evaluate @vnc_evaluate end json.user do json.partial! 'users/user', user: @user diff --git a/app/views/helps/contact.json.jbuilder b/app/views/helps/contact.json.jbuilder new file mode 100644 index 000000000..601aaa9a4 --- /dev/null +++ b/app/views/helps/contact.json.jbuilder @@ -0,0 +1,8 @@ +json.contacts do + json.array! @cooperations.each do |item| + json.extract! item, :name, :qq, :mail + json.type item.user_type_text + end +end + +json.address current_help.status \ No newline at end of file diff --git a/app/views/helps/cooperatives.json.jbuilder b/app/views/helps/cooperatives.json.jbuilder new file mode 100644 index 000000000..968cb4ea2 --- /dev/null +++ b/app/views/helps/cooperatives.json.jbuilder @@ -0,0 +1,11 @@ +json.data do + json.array! @data.each do |type, objs| + json.name I18n.t("enumerize.coo_img.img_type.#{type}") + json.values do + json.array! objs.sort_by(&:position).each do |obj| + json.img obj.url_states || (Util::FileManage.exist?('CooImg', obj.id) ? Util::FileManage.disk_file_url('CooImg', obj.id) : '') + json.url obj.src_states + end + end + end +end \ No newline at end of file diff --git a/app/views/shixuns/settings.json.jbuilder b/app/views/shixuns/settings.json.jbuilder index e81498058..ad29f4176 100644 --- a/app/views/shixuns/settings.json.jbuilder +++ b/app/views/shixuns/settings.json.jbuilder @@ -22,6 +22,7 @@ json.shixun do json.hide_code @shixun.hide_code # 隐藏代码窗口 json.code_hidden @shixun.code_hidden # 代码目录隐藏 json.vnc @shixun.vnc + json.vnc_evaluate @shixun.vnc_evaluate #json.exec_time @shixun.exec_time json.webssh @shixun.webssh json.multi_webssh @shixun.multi_webssh diff --git a/app/views/task_banks/show.json.jbuilder b/app/views/task_banks/show.json.jbuilder index b929fafd8..ab53399e1 100644 --- a/app/views/task_banks/show.json.jbuilder +++ b/app/views/task_banks/show.json.jbuilder @@ -1,5 +1,6 @@ json.(@bank, :id, :name, :description, :task_type, :is_public) # 附件 +json.authorize @bank.user_id == current_user.id || current_user.admin? json.attachments @bank_attachments do |attachment| json.partial! "attachments/attachment_simple", locals: {attachment: attachment} end diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index 3b70f66f1..959a96ebd 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -18,7 +18,7 @@ json.time tiding.how_long_time json.new_tiding tiding.unread?(@onclick_time) json.trigger_user do - if tiding.trigger_user_id.zero? + if tiding.trigger_user_id.zero? || (tiding.trigger_user_id == 1 && tiding.tiding_type == 'System') json.id 0 json.name "系统" json.login "" diff --git a/config/initializers/session_extenstions.rb b/config/initializers/session_extenstions.rb index 36a8ae8c7..cee3dfc06 100644 --- a/config/initializers/session_extenstions.rb +++ b/config/initializers/session_extenstions.rb @@ -1,35 +1,33 @@ -#coding=utf-8 - -module SessionExtenstions - - module EntryExtension - def compressed? - @compressed - end - - def value - if @value - begin - Marshal.load(compressed? ? Zlib::Inflate.inflate(@value) : @value) - rescue TypeError - compressed? ? Zlib::Inflate.inflate(@value) : @value - end - end - end - - def size - if @value.nil? - 0 - else - @value.bytesize - end - end - end - - -end - -ActiveSupport::Cache::Entry.const_set("DEFAULT_COMPRESS_LIMIT", 1) -ActiveSupport::Cache::Entry.send(:prepend, SessionExtenstions::EntryExtension) - - +#coding=utf-8 + +module SessionExtenstions + + module EntryExtension + def compressed? + @compressed + end + + def value + if @value + begin + Marshal.load(compressed? ? Zlib::Inflate.inflate(@value) : @value) + rescue TypeError + compressed? ? Zlib::Inflate.inflate(@value) : @value + end + end + end + + def size + if @value.nil? + 0 + else + @value.bytesize + end + end + end + + +end + +ActiveSupport::Cache::Entry.const_set("DEFAULT_COMPRESS_LIMIT", 1) +ActiveSupport::Cache::Entry.send(:prepend, SessionExtenstions::EntryExtension) diff --git a/config/routes.rb b/config/routes.rb index 4bf353226..5cf74c29a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -55,12 +55,14 @@ Rails.application.routes.draw do get :homepage_info end + get :question_banks, on: :collection, to: 'users/question_banks#index' + scope module: :users do resources :courses, only: [:index] resources :shixuns, only: [:index] resources :projects, only: [:index] resources :subjects, only: [:index] - resources :question_banks, only: [:index] + # resources :question_banks, only: [:index] resource :experience_records, only: [:show] resource :grade_records, only: [:show] resource :watch, only: [:create, :destroy] @@ -783,6 +785,17 @@ Rails.application.routes.draw do namespace :wechats do resource :js_sdk_signature, only: [:create] end + + resources :helps, only: [] do + collection do + get :about + get :contact + get :cooperatives + get :agreement + get :help_center + post :feedback + end + end end namespace :admins do diff --git a/db/migrate/20190906062930_modify_is_test_for_user.rb b/db/migrate/20190906062930_modify_is_test_for_user.rb new file mode 100644 index 000000000..f3f5bfd3b --- /dev/null +++ b/db/migrate/20190906062930_modify_is_test_for_user.rb @@ -0,0 +1,5 @@ +class ModifyIsTestForUser < ActiveRecord::Migration[5.2] + def change + change_column :users, :is_test, :integer, :limit => 1 + end +end diff --git a/db/migrate/20190906111746_gtopic_bank_is_public.rb b/db/migrate/20190906111746_gtopic_bank_is_public.rb new file mode 100644 index 000000000..193824dc4 --- /dev/null +++ b/db/migrate/20190906111746_gtopic_bank_is_public.rb @@ -0,0 +1,5 @@ +class GtopicBankIsPublic < ActiveRecord::Migration[5.2] + def change + GtopicBank.where(is_public: nil).update_all(is_public: 0) + end +end diff --git a/db/migrate/20190907014649_add_vnc_evaluate_for_shixuns.rb b/db/migrate/20190907014649_add_vnc_evaluate_for_shixuns.rb new file mode 100644 index 000000000..861c4501e --- /dev/null +++ b/db/migrate/20190907014649_add_vnc_evaluate_for_shixuns.rb @@ -0,0 +1,5 @@ +class AddVncEvaluateForShixuns < ActiveRecord::Migration[5.2] + def change + add_column :shixuns, :vnc_evaluate, :boolean, default: false + end +end diff --git a/db/migrate/20190907021100_migrate_bank_reference_id.rb b/db/migrate/20190907021100_migrate_bank_reference_id.rb new file mode 100644 index 000000000..c71034167 --- /dev/null +++ b/db/migrate/20190907021100_migrate_bank_reference_id.rb @@ -0,0 +1,31 @@ +class MigrateBankReferenceId < ActiveRecord::Migration[5.2] + def change + HomeworkBank.all.each do |bank| + if bank.homework_common + bank.homework_common.update_column("homework_bank_id", bank.id) if bank.homework_common.homework_bank_id.nil? + end + end + + GtopicBank.all.each do |bank| + if bank.graduation_topic + bank.graduation_topic.update_column("gtopic_bank_id", bank.id) if bank.graduation_topic.gtopic_bank_id.nil? + end + end + + GtaskBank.all.each do |bank| + if bank.graduation_task + bank.graduation_task.update_column("gtask_bank_id", bank.id) if bank.graduation_task.gtask_bank_id.nil? + end + end + + ExerciseBank.all.each do |bank| + if bank.container_type == 'Exercise' + exercise = Exercise.find_by(id: bank.container_id) + exercise.update_column("exercise_bank_id", bank.id) if exercise && exercise.exercise_bank_id.nil? + elsif bank.container_type == 'Poll' + poll = Poll.find_by(id: bank.container_id) + poll.update_column("exercise_bank_id", bank.id) if poll && poll.exercise_bank_id.nil? + end + end + end +end diff --git a/db/migrate/20190907061918_migrate_bank_quotes.rb b/db/migrate/20190907061918_migrate_bank_quotes.rb new file mode 100644 index 000000000..9f278860d --- /dev/null +++ b/db/migrate/20190907061918_migrate_bank_quotes.rb @@ -0,0 +1,28 @@ +class MigrateBankQuotes < ActiveRecord::Migration[5.2] + def change + HomeworkBank.all.each do |bank| + task_count = bank.homework_commons.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) + end + + GtopicBank.all.each do |bank| + task_count = bank.graduation_topics.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) + end + + GtaskBank.all.each do |bank| + task_count = bank.graduation_tasks.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) + end + + ExerciseBank.all.each do |bank| + if bank.container_type == 'Exercise' + task_count = bank.exercises.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) + elsif bank.container_type == 'Poll' + task_count = bank.polls.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) + end + end + end +end diff --git a/public/images/educoder/path.png b/public/images/educoder/path.png index 057838222..1461d47e6 100644 Binary files a/public/images/educoder/path.png and b/public/images/educoder/path.png differ diff --git a/public/javascripts/wx/jweixin-1.3.0.js b/public/javascripts/wx/jweixin-1.3.0.js index d06d2c362..1b84fe697 100644 --- a/public/javascripts/wx/jweixin-1.3.0.js +++ b/public/javascripts/wx/jweixin-1.3.0.js @@ -1 +1,2 @@ -!function(e,n){"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(this,function(e,n){function i(n,i,t){e.WeixinJSBridge?WeixinJSBridge.invoke(n,o(i),function(e){c(n,e,t)}):u(n,t)}function t(n,i,t){e.WeixinJSBridge?WeixinJSBridge.on(n,function(e){t&&t.trigger&&t.trigger(e),c(n,e,i)}):t?u(n,t):u(n,i)}function o(e){return e=e||{},e.appId=C.appId,e.verifyAppId=C.appId,e.verifySignType="sha1",e.verifyTimestamp=C.timestamp+"",e.verifyNonceStr=C.nonceStr,e.verifySignature=C.signature,e}function r(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function a(e){return e.postalCode=e.addressPostalCode,delete e.addressPostalCode,e.provinceName=e.proviceFirstStageName,delete e.proviceFirstStageName,e.cityName=e.addressCitySecondStageName,delete e.addressCitySecondStageName,e.countryName=e.addressCountiesThirdStageName,delete e.addressCountiesThirdStageName,e.detailInfo=e.addressDetailInfo,delete e.addressDetailInfo,e}function c(e,n,i){"openEnterpriseChat"==e&&(n.errCode=n.err_code),delete n.err_code,delete n.err_desc,delete n.err_detail;var t=n.errMsg;t||(t=n.err_msg,delete n.err_msg,t=s(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",C.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n));var o=t.indexOf(":");switch(t.substring(o+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function s(e,n){var i=e,t=v[i];t&&(i=t);var o="ok";if(n){var r=n.indexOf(":");"confirm"==(o=n.substring(r+1))&&(o="ok"),"failed"==o&&(o="fail"),-1!=o.indexOf("failed_")&&(o=o.substring(7)),-1!=o.indexOf("fail_")&&(o=o.substring(5)),"access denied"!=(o=(o=o.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=o||(o="permission denied"),"config"==i&&"function not exist"==o&&(o="ok"),""==o&&(o="fail")}return n=i+":"+o}function d(e){if(e){for(var n=0,i=e.length;n0){var n=e.split("?")[0],i=e.split("?")[1];return n+=".html",void 0!==i?n+"?"+i:n}}if(!e.jWeixin){var h={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},v=function(){var e={};for(var n in h)e[h[n]]=n;return e}(),S=e.document,I=S.title,y=navigator.userAgent.toLowerCase(),_=navigator.platform.toLowerCase(),w=!(!_.match("mac")&&!_.match("win")),T=-1!=y.indexOf("wxdebugger"),k=-1!=y.indexOf("micromessenger"),M=-1!=y.indexOf("android"),P=-1!=y.indexOf("iphone")||-1!=y.indexOf("ipad"),x=function(){var e=y.match(/micromessenger\/(\d+\.\d+\.\d+)/)||y.match(/micromessenger\/(\d+\.\d+)/);return e?e[1]:""}(),V={initStartTime:p(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},A={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:P?1:M?2:-1,clientVersion:x,url:encodeURIComponent(location.href)},C={},L={_completes:[]},B={state:0,data:{}};f(function(){V.initEndTime=p()});var O=!1,N=[],b={config:function(e){C=e,u("config",e);var n=!1!==C.check;f(function(){if(n)i(h.config,{verifyJsApiList:d(C.jsApiList)},function(){L._complete=function(e){V.preVerifyEndTime=p(),B.state=1,B.data=e},L.success=function(e){A.isPreVerifyOk=0},L.fail=function(e){L._fail?L._fail(e):B.state=-1};var e=L._completes;return e.push(function(){l()}),L.complete=function(n){for(var i=0,t=e.length;i0){var n=N.shift();wx.getLocalImgData(n)}},e))):N.push(e)},getNetworkType:function(e){var n=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),o=n.substring(t+1);switch(o){case"wifi":case"edge":case"wwan":e.networkType=o;break;default:e.errMsg="getNetworkType:fail"}}return e};i("getNetworkType",{},(e._complete=function(e){e=n(e)},e))},openLocation:function(e){i("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){e=e||{},i(h.getLocation,{type:e.type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){i("hideOptionMenu",{},e)},showOptionMenu:function(e){i("showOptionMenu",{},e)},closeWindow:function(e){i("closeWindow",{},e=e||{})},hideMenuItems:function(e){i("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){i("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){i("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){i("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){i("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(P){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){i(h.openAddress,{},(e._complete=function(e){e=a(e)},e))},openProductSpecificView:function(e){i(h.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,t=[],o=0,r=n.length;o0){var n=e.split("?")[0],i=e.split("?")[1];return n+=".html",void 0!==i?n+"?"+i:n}}if(!e.jWeixin){var h={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},v=function(){var e={};for(var n in h)e[h[n]]=n;return e}(),S=e.document,I=S.title,y=navigator.userAgent.toLowerCase(),_=navigator.platform.toLowerCase(),k=!(!_.match("mac")&&!_.match("win")),w=-1!=y.indexOf("wxdebugger"),T=-1!=y.indexOf("micromessenger"),M=-1!=y.indexOf("android"),P=-1!=y.indexOf("iphone")||-1!=y.indexOf("ipad"),x=function(){var e=y.match(/micromessenger\/(\d+\.\d+\.\d+)/)||y.match(/micromessenger\/(\d+\.\d+)/);return e?e[1]:""}(),A={initStartTime:p(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},V={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:P?1:M?2:-1,clientVersion:x,url:encodeURIComponent(location.href)},C={},L={_completes:[]},B={state:0,data:{}};f(function(){A.initEndTime=p()});var O=!1,E=[],N={config:function(e){C=e,u("config",e);var n=!1!==C.check;f(function(){if(n)i(h.config,{verifyJsApiList:d(C.jsApiList)},function(){L._complete=function(e){A.preVerifyEndTime=p(),B.state=1,B.data=e},L.success=function(e){V.isPreVerifyOk=0},L.fail=function(e){L._fail?L._fail(e):B.state=-1};var e=L._completes;return e.push(function(){l()}),L.complete=function(n){for(var i=0,t=e.length;i0){var n=E.shift();wx.getLocalImgData(n)}},e))):E.push(e)},getNetworkType:function(e){var n=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),o=n.substring(t+1);switch(o){case"wifi":case"edge":case"wwan":e.networkType=o;break;default:e.errMsg="getNetworkType:fail"}}return e};i("getNetworkType",{},(e._complete=function(e){e=n(e)},e))},openLocation:function(e){i("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){e=e||{},i(h.getLocation,{type:e.type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){i("hideOptionMenu",{},e)},showOptionMenu:function(e){i("showOptionMenu",{},e)},closeWindow:function(e){i("closeWindow",{},e=e||{})},hideMenuItems:function(e){i("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){i("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){i("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){i("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){i("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(P){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){i(h.openAddress,{},(e._complete=function(e){e=a(e)},e))},openProductSpecificView:function(e){i(h.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,t=[],o=0,r=n.length;obody #ajax-indicator-base { position: fixed; } .fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-aws:before{content:"\f375"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-book:before{content:"\f02d"}.fa-book-open:before{content:"\f518"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-dice:before{content:"\f522"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-excel:before{content:"\f1c3"}.fa-file-image:before{content:"\f1c5"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-fulcrum:before{content:"\f50b"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-meh:before{content:"\f11a"}.fa-memory:before{content:"\f538"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-moon:before{content:"\f186"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-old-republic:before{content:"\f510"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-r-project:before{content:"\f4f7"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-rupee-sign:before{content:"\f156"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shower:before{content:"\f2cc"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skull:before{content:"\f54c"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-spotify:before{content:"\f1bc"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toolbox:before{content:"\f552"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:Font Awesome\ 5 Free}.fa,.fas{font-weight:900} /*! Editor.md v1.5.0 | editormd.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ -@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:4px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:3px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"微软雅黑", "Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:4px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:3px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ /* 重置掉些样式 */ .tpi_content p, .tpi_content dl, .tpi_content ol, .tpi_content ul, @@ -1671,7 +1672,7 @@ html>body #ajax-indicator-base { position: fixed; } * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ /* 这里包括了 markdown里的样式 如h4等等*/ - @font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4!important;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:16px;line-height:1.6;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:0px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}} + @font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"微软雅黑","Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4!important;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:16px;line-height:1.6;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:0px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}} pre.prettyprint{padding:5px;border:1px solid #ccc;white-space: pre-wrap !important;word-break: break-all;border-radius: 3px} ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:0px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview textarea,.editormd-onlyread .editormd-toolbar{display:none}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px}.editormd-preview-theme-dark{color:#777;background:#2C2827}.editormd-preview-theme-dark .editormd-preview-container{color:#888;background-color:#2C2827}.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint{border:none}.editormd-preview-theme-dark .editormd-preview-container blockquote{color:#555;padding:.5em;background:#222;border-color:#333}.editormd-preview-theme-dark .editormd-preview-container abbr{color:#fff;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#f90}.editormd-preview-theme-dark .editormd-preview-container code{color:#fff;border:none;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#5A9600}.editormd-preview-theme-dark .editormd-preview-container table{border:none}.editormd-preview-theme-dark .editormd-preview-container .fa-emoji{color:#B4BF42}.editormd-preview-theme-dark .editormd-preview-container .katex{color:#FEC93F}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc{background:#fff;border:none}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc h1{border-color:#ddd}.editormd-preview-theme-dark .markdown-body h1,.editormd-preview-theme-dark .markdown-body h2,.editormd-preview-theme-dark .markdown-body hr{border-color:#222}.editormd-preview-theme-dark pre{color:#999;background-color:#111;background-color:rgba(0,0,0,.4)}.editormd-preview-theme-dark pre .pln{color:#999}.editormd-preview-theme-dark li.L1,.editormd-preview-theme-dark li.L3,.editormd-preview-theme-dark li.L5,.editormd-preview-theme-dark li.L7,.editormd-preview-theme-dark li.L9{background:0 0}.editormd-preview-theme-dark [class*=editormd-logo]{color:#2196F3}.editormd-preview-theme-dark .sequence-diagram text{fill:#fff}.editormd-preview-theme-dark .sequence-diagram path,.editormd-preview-theme-dark .sequence-diagram rect{color:#fff;fill:#64D1CB;stroke:#64D1CB}.editormd-preview-theme-dark .flowchart path,.editormd-preview-theme-dark .flowchart rect{stroke:#A6C6FF}.editormd-preview-theme-dark .flowchart rect{fill:#A6C6FF}.editormd-preview-theme-dark .flowchart text{fill:#5879B4}@media screen{.editormd-preview-theme-dark .str{color:#080}.editormd-preview-theme-dark .kwd{color:#f90}.editormd-preview-theme-dark .com{color:#444}.editormd-preview-theme-dark .typ{color:#606}.editormd-preview-theme-dark .lit{color:#066}.editormd-preview-theme-dark .clo,.editormd-preview-theme-dark .opn,.editormd-preview-theme-dark .pun{color:#660}.editormd-preview-theme-dark .tag{color:#f90}.editormd-preview-theme-dark .atn{color:#6C95F5}.editormd-preview-theme-dark .atv{color:#080}.editormd-preview-theme-dark .dec,.editormd-preview-theme-dark .var{color:#008BA7}.editormd-preview-theme-dark .fun{color:red}}.editormd-onlyread .CodeMirror{margin-top:0}.editormd-onlyread .editormd-preview{top:0}.editormd-fullscreen{position:fixed;top:0;left:0;border:none;margin:0 auto}.editormd-theme-dark{border-color:#1a1a17}.editormd-theme-dark .editormd-toolbar{background:#1A1A17;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a{color:#777;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a.active,.editormd-theme-dark .editormd-menu>li>a:hover{border-color:#333;background:#333}.editormd-theme-dark .editormd-menu>li.divider{border-right:1px solid #111}.editormd-theme-dark .CodeMirror{border-right:1px solid rgba(0,0,0,.1)} diff --git a/public/react/public/css/edu-common.css b/public/react/public/css/edu-common.css index 6817312ad..cd8d65e94 100755 --- a/public/react/public/css/edu-common.css +++ b/public/react/public/css/edu-common.css @@ -103,6 +103,7 @@ a:hover.link-color-grey03{color:#3498db!important;} .font-18{ font-size: 18px!important;} .font-20{ font-size: 20px!important;} .font-22{ font-size: 22px!important;} +.font-25{ font-size: 25px!important;} .font-24{ font-size: 24px!important;} .font-28{ font-size: 28px!important;} .font-30{ font-size: 30px!important;} diff --git a/public/react/public/index.html b/public/react/public/index.html index b4d6ef250..b252ccf36 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -29,7 +29,7 @@ || navigator.userAgent.indexOf('MSIE 10') != -1 ) && location.pathname.indexOf("/compatibility") == -1) { - + debugger; // location.href = './compatibility' location.href = '/compatibility.html' } diff --git a/public/react/src/App.js b/public/react/src/App.js index 3013eca7b..d156bc241 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -222,6 +222,12 @@ const InfosIndex = Loadable({ loader: () => import('./modules/user/usersInfo/InfosIndex'), loading: Loading, }) +// 题库 +const BanksIndex = Loadable({ + loader: () => import('./modules/user/usersInfo/banks/BanksIndex'), + loading: Loading, +}) + // 教学案例 const MoopCases = Loadable({ @@ -245,6 +251,17 @@ const Messagerouting= Loadable({ loader: () => import('./modules/message/js/Messagerouting'), loading: Loading, }) + +const Topicbank= Loadable({ + loader: () => import('./modules/topic_bank/Topic_bank'), + loading: Loading, +}) + +const Help = Loadable({ + loader: () => import('./modules/help/Help'), + loading: Loading, +}) + class App extends Component { constructor(props) { super(props) @@ -286,8 +303,9 @@ class App extends Component { const wx = window.wx const url = '/wechats/js_sdk_signature.json' const currentUrl = window.location.href.split('#')[0] + // window.encodeURIComponent() axios.post(url, { - url: currentUrl, + url: window.__testUrl || currentUrl, }).then((response) => { console.log('got res') const data = response.data; @@ -295,7 +313,7 @@ class App extends Component { debug: false, appId: data.appid, timestamp: data.timestamp, - nonceStr: data.nonceStr, + nonceStr: data.noncestr, signature: data.signature, jsApiList: [ 'onMenuShareTimeline',// @@ -312,7 +330,8 @@ class App extends Component { title: 'EduCoder', desc: '创新源于实践', link: currentUrl, - imgUrl: currentUrl + '/images/educoder/index/subject/subject15.jpg' + imgUrl: window.__testImageUrl + || (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'images/educoder/index/subject/subject15.jpg' }; wx.onMenuShareAppMessage(shareData);//分享给好友 @@ -402,6 +421,22 @@ class App extends Component { + {/*题库*/} + { + + return () + } + }> + {/*题库*/} + { + + return () + } + }> {/*众包创新*/} {/*认证*/} @@ -430,6 +465,13 @@ class App extends Component { } }> + { + return () + } + }> + @@ -485,6 +527,10 @@ class App extends Component { (props)=>() } > + () + }/> diff --git a/public/react/src/CustomLoadable.js b/public/react/src/CustomLoadable.js new file mode 100644 index 000000000..31e0e8a17 --- /dev/null +++ b/public/react/src/CustomLoadable.js @@ -0,0 +1,12 @@ +import Loadable from 'react-loadable'; + +import Loading from "./Loading"; + +const CustomLoadable = (loader, loading = Loading) => { + return Loadable({ + loader, + loading + }) +} + +export default CustomLoadable \ No newline at end of file diff --git a/public/react/src/common/SnackbarHOC.js b/public/react/src/common/SnackbarHOC.js index d66b697ca..fe5bc4901 100644 --- a/public/react/src/common/SnackbarHOC.js +++ b/public/react/src/common/SnackbarHOC.js @@ -48,7 +48,17 @@ export function SnackbarHOC(options = {}) { snackbarHorizontal: horizontal, }) } - + //个别情况需要走 + showNotification = (description, message = "提示", icon) => { + const data = { + message, + description + } + if (icon) { + data.icon = icon; + } + notification.open(data); + } render() { const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical } = this.state; @@ -70,7 +80,7 @@ export function SnackbarHOC(options = {}) { resumeHideDuration={2000} message={{this.state.snackbarText}} /> - + diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 3d3053805..8098e4f38 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -56,7 +56,7 @@ export function getUploadActionUrl(path, goTest) { return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` } export function getUploadActionUrlOfAuth(id) { - return `${getUrl()}/api/users/accounts/${id}/auth_attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` } export function test(path) { diff --git a/public/react/src/images/path/path.png b/public/react/src/images/path/path.png index 594358959..1461d47e6 100644 Binary files a/public/react/src/images/path/path.png and b/public/react/src/images/path/path.png differ diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index c0a5469ad..de437bbe1 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -232,7 +232,7 @@ const GraduationTasksquestions= Loadable({ //毕设任务列表 const GraduationTaskssettinglist= Loadable({ - loader: () => import('./graduation/tasks/GraduationTaskssettinglist'), + loader: () => import('./graduation/tasks/GraduationTaskDetail'), loading: Loading, }) @@ -264,34 +264,12 @@ const GraduationTasksSubmiteditApp=Loadable({ loader: () => import('./graduation/tasks/GraduationTasksSubmitedit'), loading: Loading, }) -//普通作业题库详情 -const Generaljobbankdetails =Loadable({ - loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'), - loading: Loading, -}); -//分组作业题库详情 -const GroupjobbankPage =Loadable({ - loader: () => import('../../modules/courses/groupjobbank/GroupjobbankPage'), - loading: Loading, -}); -//毕设选题详情 -const CompletetopicdePage =Loadable({ - loader: () => import('../../modules/courses/comtopicdetails/CompletetopicdePage'), - loading: Loading, -}); -//毕设任务详情 -const Completetaskpage =Loadable({ - loader: () => import('../../modules/courses/completetaskdetails/Completetaskpage'), - loading: Loading, -}); - //排序 const Ordering=Loadable({ loader: () => import('../../modules/courses/ordering/Ordering'), loading: Loading, }); - class CoursesIndex extends Component{ constructor(props) { super(props) @@ -478,37 +456,12 @@ class CoursesIndex extends Component{ // console.log(commons) return ( - {/*排序*/} - () - } - > - - {/*毕设任务题库详情*/} - () - } - > - {/*毕设内容题库详情*/} - () - } - > - {/*分组作业题库详情*/} - () - } - > - {/* 普通作业题库详情*/} - () - } - > + {/*排序*/} + () + } + > {/* 资源列表页 */} () } @@ -597,19 +550,18 @@ class CoursesIndex extends Component{ () - }> + render={ + (props) => () + }> */} - () } > - {/* 修改毕设任务 https://www.trustie.net/issues/19981 */} { - const isGroup = this.props.isGroup() - const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}` - axios.get(url, { - }) - .then((response) => { - if (response.data.course_name) { - const data = response.data; - this.setState({ - course_id: data.course_id, - course_name: data.course_name, - category: data.category, - - }) - } - }) - .catch(function (error) { - console.log(error); - }); - } - fetchWork = (workId) => { - const url = `/homework_commons/${workId}/edit.json` - axios.get(url, { - }) - .then((response) => { - if (response.data.name) { - const data = response.data; - - const contentFileList = data.attachments.map(item => { - return { - id: item.id, - uid: item.id, - name: appendFileSizeToUploadFile(item), - url: item.url, - filesize: item.filesize, - status: 'done' - } - }) - const answerFileList = data.ref_attachments.map(item => { - return { - id: item.id, - uid: item.id, - name: appendFileSizeToUploadFile(item), - url: item.url, - filesize: item.filesize, - status: 'done' - } - }) - - this.setState({ - ...data, - // course_id: data.course_id, - // course_name: data.course_name, - // category: data.category, - title_num: parseInt(data.name.length), - workLoaded: true, - init_min_num: data.min_num, - init_max_num: data.max_num, - // description: data.description, - reference_answer: data.reference_answer, - contentFileList, - answerFileList, - }, () => { - setTimeout(() => { - this.contentMdRef.current.setValue(data.description || '') - this.answerMdRef.current.setValue(data.reference_answer || '') - - }, 2000) - - this.props.form.setFieldsValue({ - title: data.name, - description: data.description || '', - reference_answer: data.reference_answer || '', - }); - - }) - - } - }) - .catch(function (error) { - console.log(error); - }); - } - - // 输入title - changeTitle=(e)=>{ - console.log(e.target.value.length); - this.setState({ - title_num: parseInt(e.target.value.length) - }) - } - handleSubmit = () => { - const courseId = this.state.course_id || this.props.match.params.coursesId ; - - this.props.form.validateFieldsAndScroll((err, values) => { - console.log(values) - const mdContnet = this.contentMdRef.current.getValue().trim(); - console.log(mdContnet) - values.description = mdContnet; - // return; - - {/* max={has_commit ? init_min_num : null } */} - {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} - // 已有提交作品,人数范围只能扩大 - const { has_commit, max_num, init_max_num, min_num, init_min_num } = this.state; - if (has_commit) { - if (max_num < init_max_num || min_num > init_min_num) { - this.props.showNotification(`已有提交作品,人数范围只能扩大(原设置为:${init_min_num} - ${init_max_num})`) - return; - } - } - - // const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet - if (!err) { - if (this.isEdit) { - this.doEdit(courseId, values) - } else { - this.doNew(courseId, values) - } - - } else { - $("html").animate({ scrollTop: $('html').scrollTop() - 100 }) - } - }) - } - doEdit = (courseId, values) => { - const workId = this.props.match.params.workId - const newUrl = `/homework_commons/${workId}.json` - - let attachment_ids = this.state.contentFileList.map(item => { - return item.response ? item.response.id : item.id - }) - let reference_attachment_ids = this.state.answerFileList.map(item => { - return item.response ? item.response.id : item.id - }) - - const { min_num, max_num, base_on_project, category } = this.state - const isGroup = this.props.isGroup() - axios.put(newUrl, { - type: isGroup ? 3 : 1, - name: values.title, - description: values.description, - reference_answer: values.reference_answer, - attachment_ids, - reference_attachment_ids, - - min_num, - max_num, - base_on_project - }) - .then((response) => { - if (response.data.status == 0) { - this.props.showNotification('保存成功') - this.props.toWorkListPage(this.props.match.params, workId) - } - }) - .catch(function (error) { - console.log(error); - }); - } - doNew = (courseId, values) => { - const newUrl = `/courses/${courseId}/homework_commons.json` - - let attachment_ids = this.state.contentFileList.map(item => { - return item.response ? item.response.id : item.id - }) - let reference_attachment_ids = this.state.answerFileList.map(item => { - return item.response ? item.response.id : item.id - }) - const isGroup = this.props.isGroup() - const { min_num, max_num, base_on_project, category } = this.state - - axios.post(newUrl, { - type: isGroup ? 3 : 1, - name: values.title, - description: values.description, - reference_answer: values.reference_answer, - attachment_ids, - reference_attachment_ids, + constructor(props){ + super(props); + this.contentMdRef = React.createRef(); + this.answerMdRef = React.createRef(); + + this.state={ + category: {}, + course_name: '' + } + } + componentDidMount () { + let {typeId, coursesId, pageType, workId}=this.props.match.params; + const isEdit = pageType === "edit" + this.isEdit = isEdit; + if (isEdit) { + this.fetchWork(workId) + } else { + this.fetchCourseData(coursesId) + } + } + fetchCourseData = (courseId) => { + const isGroup = this.props.isGroup() + const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}` + axios.get(url, { + }) + .then((response) => { + if (response.data.course_name) { + const data = response.data; + this.setState({ + course_id: data.course_id, + course_name: data.course_name, + category: data.category, + + }) + } + }) + .catch(function (error) { + console.log(error); + }); + } + fetchWork = (workId) => { + const url = `/homework_commons/${workId}/edit.json` + axios.get(url, { + }) + .then((response) => { + if (response.data.name) { + const data = response.data; + data.isEdit = this.isEdit + this.setState({ + course_id: data.course_id, + course_name: data.course_name, + category: data.category, + }) + this.newWorkFormRef.initValue(response.data) + } + }) + .catch(function (error) { + console.log(error); + }); + } + + onCancel = () => { + this.props.toListPage(this.props.match.params, this.state.category.category_id) + } + + doEdit = (params) => { + const workId = this.props.match.params.workId + const newUrl = `/homework_commons/${workId}.json` + + axios.put(newUrl, params) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('保存成功') + this.props.toWorkListPage(this.props.match.params, workId) + } + }) + .catch(function (error) { + console.log(error); + }); + } + doNew = (params) => { + const coursesId = this.props.match.params.coursesId + const newUrl = `/courses/${coursesId}/homework_commons.json` + + axios.post(newUrl, params) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('保存成功') + this.props.toWorkListPage(this.props.match.params, response.data.homework_id) + } + }) + .catch(function (error) { + console.log(error); + }); + } - min_num, - max_num, - base_on_project - }) - .then((response) => { - if (response.data.status == 0) { - this.props.showNotification('保存成功') - this.props.toWorkListPage(this.props.match.params, response.data.homework_id) - } - }) - .catch(function (error) { - console.log(error); - }); - } + handleContentUploadChange = (info) => { + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let contentFileList = info.fileList; + this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) }); + } + } + handleAnswerUploadChange = (info) => { + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let answerFileList = info.fileList; + this.setState({ answerFileList: appendFileSizeToUploadFileAll(answerFileList) }); + } + } - handleContentUploadChange = (info) => { - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - let contentFileList = info.fileList; - this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) }); - } - } - handleAnswerUploadChange = (info) => { - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - let answerFileList = info.fileList; - this.setState({ answerFileList: appendFileSizeToUploadFileAll(answerFileList) }); - } - } - - onAttachmentRemove = (file, stateName) => { + onAttachmentRemove = (file, stateName) => { if(!file.percent || file.percent == 100){ this.props.confirm({ content: '是否确认删除?', @@ -264,293 +139,69 @@ class NewWork extends Component{ return false; } - } - deleteAttachment = (file, stateName) => { - // 初次上传不能直接取uid - const url = `/attachments/${file.response ? file.response.id : file.uid}.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[stateName].indexOf(file); - const newFileList = state[stateName].slice(); - newFileList.splice(index, 1); - return { - [stateName]: newFileList, - }; - }); - } - } - }) - .catch(function (error) { - console.log(error); - }); - } - max_num_change = (val) => { - if (val < 2) { - this.setState({ - max_num: 2, - }) - return; - } - const { min_num } = this.state; - this.setState({ - max_num: val, - min_num: val <= min_num ? val - 1 : min_num - }) - } - min_num_change = (val) => { - this.setState({ min_num: val }) - } - base_on_project_change = () => { - this.setState({ base_on_project: !this.state.base_on_project }) - } + } - render(){ - let {typeId,coursesId,pageType}=this.props.match.params; - const { getFieldDecorator } = this.props.form; - const isGroup = this.props.isGroup() - const moduleName = !isGroup? "普通作业":"分组作业"; - const moduleEngName = this.props.getModuleName() - let{ - title_value, contentFileList, answerFileList, max_num, min_num, base_on_project, - init_max_num, init_min_num, - title_num, course_name, category, has_commit, has_project - }=this.state - const { current_user } = this.props + render(){ + let {typeId,coursesId,pageType}=this.props.match.params; - const courseId = this.state.course_id || this.props.match.params.coursesId ; - const isEdit = this.isEdit; - if ((isEdit == undefined || isEdit) && !this.state.workLoaded) { - return '' - } - const uploadProps = { - width: 600, - fileList: contentFileList, - multiple: true, - // https://github.com/ant-design/ant-design/issues/15505 - // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, - action: `${getUploadActionUrl()}`, - onChange: this.handleContentUploadChange, - onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), - beforeUpload: (file) => { - console.log('beforeUpload', file.name); - const isLt150M = file.size / 1024 / 1024 < 150; - if (!isLt150M) { - this.props.showNotification('文件大小必须小于150MB!'); - } - return isLt150M; - }, - }; - const answerUploadProps = { - width: 600, - fileList: answerFileList, - multiple: true, - // https://github.com/ant-design/ant-design/issues/15505 - // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, - onChange: this.handleAnswerUploadChange, - onRemove: (file) => this.onAttachmentRemove(file, 'answerFileList'), - beforeUpload: (file) => { - console.log('beforeUpload', file.name); - const isLt150M = file.size / 1024 / 1024 < 150; - if (!isLt150M) { - this.props.showNotification('文件大小必须小于150MB!'); - } - return isLt150M; - }, - }; + const isGroup = this.props.isGroup() + const moduleName = !isGroup? "普通作业":"分组作业"; + const moduleEngName = this.props.getModuleName() + let{ + course_name, category + }=this.state + const { current_user } = this.props - return( -
-
- {/*

- {course_name} - > - {typeId==1 ?"普通作业":"分组作业"} - > - {pageType==="new"?"新建":"编辑"} -

*/} - - -

- {this.isEdit ?"编辑":"新建"}{ moduleName } - {/* history.goBack() - this.props.toListPage(this.props.match.params, category.category_id)} - */} - this.props.history.goBack()}> - 返回 - -

-
- {/* onSubmit={this.handleSubmit} */} - -
- - {getFieldDecorator('title', { - rules: [{ - required: true, message: '请输入标题' - }], - })( - - )} - - - {/* TpmQuestionEdit 这个没出现抖动 */} - { - {getFieldDecorator('description', { - rules: [{ - required: true, message: '请输入作业内容和要求' - }], - })( - - )} - } - - - (单个文件150M以内) - - - - { isGroup && - - {getFieldDecorator('personNum', { - rules: [{ - required: false - // required: true, message: '请输入最小人数和最大人数' - }], - })( -
-

- - {/* max={has_commit ? init_min_num : null } */} - - - - ~ - {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} - - - - -

-

- - 基于项目实施 - - - -

-
- )} -
- } - - {getFieldDecorator('reference_answer', { - rules: [{ - required: false - }], - })( - - )} - - - (单个文件150M以内) - - - - - - -
-
-
- ) - } + ` + } + + {this.newWorkFormRef = ref}} + > + + + + ) + } } -const WrappedBoardsNew = Form.create({ name: 'NewWork' })(NewWork); -export default WrappedBoardsNew; \ No newline at end of file + +export default NewWork; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js new file mode 100644 index 000000000..f5d4d9eb4 --- /dev/null +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -0,0 +1,529 @@ +import React,{ Component } from "react"; +import { Input, InputNumber, Form, Button, Checkbox, Upload, Icon, message, Modal } from "antd"; +import axios from 'axios' +import '../css/busyWork.css' +import '../css/Courses.css' +import { WordsBtn, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder' +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; +import CBreadcrumb from '../common/CBreadcrumb' + +const confirm = Modal.confirm; +const $ = window.$ +const MAX_TITLE_LENGTH = 60; + +/** + 需要注意的props + isGroup +*/ +class NewWorkForm extends Component{ + constructor(props){ + super(props); + this.contentMdRef = React.createRef(); + this.answerMdRef = React.createRef(); + + this.state={ + title_value:"", + title_num: 0, + contentFileList: [], + answerFileList: [], + workLoaded: false, + base_on_project: true, + category: {}, + min_num: 2, + max_num: 10, + } + } + initValue = (data) => { + if (data.isEdit) { + const contentFileList = data.attachments.map(item => { + return { + id: item.id, + uid: item.id, + name: appendFileSizeToUploadFile(item), + url: item.url, + filesize: item.filesize, + status: 'done' + } + }) + const answerFileList = data.ref_attachments.map(item => { + return { + id: item.id, + uid: item.id, + name: appendFileSizeToUploadFile(item), + url: item.url, + filesize: item.filesize, + status: 'done' + } + }) + + this.setState({ + ...data, + // course_id: data.course_id, + // course_name: data.course_name, + // category: data.category, + title_num: parseInt(data.name.length), + workLoaded: true, + init_min_num: data.min_num, + init_max_num: data.max_num, + // description: data.description, + reference_answer: data.reference_answer, + contentFileList, + answerFileList, + }, () => { + setTimeout(() => { + this.contentMdRef.current.setValue(data.description || '') + this.answerMdRef.current.setValue(data.reference_answer || '') + + }, 2000) + + this.props.form.setFieldsValue({ + title: data.name, + description: data.description || '', + reference_answer: data.reference_answer || '', + }); + + }) + } else { // new + + } + } + + + // 输入title + changeTitle=(e)=>{ + console.log(e.target.value.length); + this.setState({ + title_num: parseInt(e.target.value.length) + }) + } + handleSubmit = () => { + const courseId = this.state.course_id || this.props.match.params.coursesId ; + + this.props.form.validateFieldsAndScroll((err, values) => { + if(err && err.personNum) delete err.personNum; + console.log(values) + const mdContnet = this.contentMdRef.current.getValue().trim(); + console.log(mdContnet) + values.description = mdContnet; + // return; + + {/* max={has_commit ? init_min_num : null } */} + {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} + // 已有提交作品,人数范围只能扩大 + const { has_commit, max_num, init_max_num, min_num, init_min_num } = this.state; + const isGroup = this.props.isGroup() + if (isGroup) { + if (!min_num) { + this.props.showNotification('最小人数不能为空'); + return; + } else if (min_num < 1) { + this.props.showNotification('最小人数不能小于1'); + return; + } else if (!max_num) { + this.props.showNotification('最大人数不能为空'); + return; + } else if (max_num < min_num) { + this.props.showNotification('最大人数不能小于最小人数'); + return; + } + + if (has_commit) { + if (max_num < init_max_num || min_num > init_min_num) { + this.props.showNotification(`已有提交作品,人数范围只能扩大(原设置为:${init_min_num} - ${init_max_num})`) + return; + } + } + } + + // const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet + if (!err || Object.keys(err).length == 0) { + if (this.state.isEdit) { + this.doEdit(courseId, values) + } else { + this.doNew(courseId, values) + } + + } else { + $("html").animate({ scrollTop: $('html').scrollTop() - 100 }) + } + }) + } + doEdit = (courseId, values) => { + let attachment_ids = this.state.contentFileList.map(item => { + return item.response ? item.response.id : item.id + }) + let reference_attachment_ids = this.state.answerFileList.map(item => { + return item.response ? item.response.id : item.id + }) + + const { min_num, max_num, base_on_project, category } = this.state + const isGroup = this.props.isGroup() + + const params = { + type: isGroup ? 3 : 1, + name: values.title, + description: values.description, + reference_answer: values.reference_answer, + attachment_ids, + reference_attachment_ids, + + min_num, + max_num, + base_on_project + } + this.props.doEdit && this.props.doEdit(params) + } + doNew = (courseId, values) => { + let attachment_ids = this.state.contentFileList.map(item => { + return item.response ? item.response.id : item.id + }) + let reference_attachment_ids = this.state.answerFileList.map(item => { + return item.response ? item.response.id : item.id + }) + const isGroup = this.props.isGroup() + const { min_num, max_num, base_on_project, category } = this.state + + const params = { + type: isGroup ? 3 : 1, + name: values.title, + description: values.description, + reference_answer: values.reference_answer, + attachment_ids, + reference_attachment_ids, + + min_num, + max_num, + base_on_project + } + this.props.doNew && this.props.doNew(params) + + } + + handleContentUploadChange = (info) => { + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let contentFileList = info.fileList; + this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) }); + } + } + handleAnswerUploadChange = (info) => { + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let answerFileList = info.fileList; + this.setState({ answerFileList: appendFileSizeToUploadFileAll(answerFileList) }); + } + } + + onAttachmentRemove = (file, stateName) => { + if(!file.percent || file.percent == 100){ + this.props.confirm({ + content: '是否确认删除?', + + onOk: () => { + this.deleteAttachment(file, stateName) + }, + onCancel() { + console.log('Cancel'); + }, + }); + } + return false; + } + deleteAttachment = (file, stateName) => { + // 初次上传不能直接取uid + const url = `/attachments/${file.response ? file.response.id : file.uid}.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[stateName].indexOf(file); + const newFileList = state[stateName].slice(); + newFileList.splice(index, 1); + return { + [stateName]: newFileList, + }; + }); + } + } + }) + .catch(function (error) { + console.log(error); + }); + } + max_num_change = (val) => { + if (val < 2) { + // this.setState({ + // max_num: 2, + // }) + return; + } + const { min_num } = this.state; + this.setState({ + max_num: val, + min_num: val <= min_num ? val - 1 : min_num + }) + } + personNumValidator = (rule, value, callback) => { + const { min_num, max_num } = this.state; + const form = this.props.form; + if (!min_num) { + callback('最小人数不能为空'); + } else if (min_num < 1) { + callback('最小人数不能小于1'); + } else if (!max_num) { + callback('最大人数不能为空'); + } else if (max_num < min_num) { + callback('最大人数不能小于最小人数'); + } else { + callback(); + } + } + min_num_change = (val) => { + this.setState({ min_num: val }) + } + base_on_project_change = () => { + this.setState({ base_on_project: !this.state.base_on_project }) + } + componentDidMount() { + window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required') + } + + render(){ + let {typeId,coursesId,pageType}=this.props.match.params; + const { getFieldDecorator } = this.props.form; + const isGroup = this.props.isGroup() + let{ + title_value, contentFileList, answerFileList, max_num, min_num, base_on_project, + init_max_num, init_min_num, + title_num, course_name, category, has_commit, has_project, + + isEdit + }=this.state + const { current_user } = this.props + + const courseId = this.state.course_id || this.props.match.params.coursesId ; + + if ((isEdit) && !this.state.workLoaded) { + return '' + } + const uploadProps = { + width: 600, + fileList: contentFileList, + multiple: true, + // https://github.com/ant-design/ant-design/issues/15505 + // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // showUploadList: false, + action: `${getUrl()}/api/attachments.json`, + onChange: this.handleContentUploadChange, + onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), + beforeUpload: (file) => { + console.log('beforeUpload', file.name); + const isLt150M = file.size / 1024 / 1024 < 150; + if (!isLt150M) { + this.props.showNotification('文件大小必须小于150MB!'); + } + return isLt150M; + }, + }; + const answerUploadProps = { + width: 600, + fileList: answerFileList, + multiple: true, + // https://github.com/ant-design/ant-design/issues/15505 + // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // showUploadList: false, + action: `${getUrl()}/api/attachments.json`, + onChange: this.handleAnswerUploadChange, + onRemove: (file) => this.onAttachmentRemove(file, 'answerFileList'), + beforeUpload: (file) => { + console.log('beforeUpload', file.name); + const isLt150M = file.size / 1024 / 1024 < 150; + if (!isLt150M) { + this.props.showNotification('文件大小必须小于150MB!'); + } + return isLt150M; + }, + }; + + return( + + + +
+ + {getFieldDecorator('title', { + rules: [{ + required: true, message: '请输入标题' + }], + })( + + )} + + + + + { + {getFieldDecorator('description', { + rules: [{ + required: true, message: '请输入作业内容和要求', + },{ + max: 5000 , message:'最大限制5000个字符' + }], + })( + + )} + } + + + (单个文件150M以内) + + + + { isGroup && + + {getFieldDecorator('personNum', { + validateTrigger: 'onNone', + // rules: [{ + // required: true, + // message: '人数不能为空' + // validator: this.personNumValidator + // required: true, message: '请输入最小人数和最大人数' + // }], + })( +
+

+ + {/* max={has_commit ? init_min_num : null } */} + + + + ~ + {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} + + + + +

+

+ + 基于项目实施 + + + +

+
+ )} + +
+ } +
+ + {getFieldDecorator('reference_answer', { + rules: [{ + max: 5000 , message:'最大限制5000个字符' + }], + })( + + )} + + + + (单个文件150M以内) + +
+ +
+ + + + + ) + } +} +const WrappedWorkForm = Form.create({ name: 'NewWorkForm' })(NewWorkForm); +export default WrappedWorkForm; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/common/TabRightComponents.js b/public/react/src/modules/courses/busyWork/common/TabRightComponents.js index 34044330d..25ae55203 100644 --- a/public/react/src/modules/courses/busyWork/common/TabRightComponents.js +++ b/public/react/src/modules/courses/busyWork/common/TabRightComponents.js @@ -63,7 +63,7 @@ class TabRightComponents extends Component{ }) } }else { - this.props.slowDownload(url) + this.props.slowDownload(url); // this.props.showNotification(`正在下载中`); // window.open("/api"+url, '_blank'); } diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 584965039..f8042d476 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -76,6 +76,7 @@ class commonWork extends Component{ } componentDidUpdate(prevProps, prevState) { if (prevProps.match.path != this.props.match.path) { + this.clearSelection() this._getList() } } @@ -226,7 +227,7 @@ class commonWork extends Component{ } clearSelection = () => { - this.setState({ checkBoxValues: [] }) + this.setState({ checkBoxValues: [], checkAll: false }) } // onSetPublic = () => { diff --git a/public/react/src/modules/courses/common/ModalWrapper.js b/public/react/src/modules/courses/common/ModalWrapper.js index 44495d336..e92a508d6 100644 --- a/public/react/src/modules/courses/common/ModalWrapper.js +++ b/public/react/src/modules/courses/common/ModalWrapper.js @@ -53,7 +53,7 @@ class ModalWrapper extends Component{ {this.props.checkBoxValuestype===true?
请先选择课堂
:""} -
+ diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js index 850ed2b89..8c365022e 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js @@ -1,5 +1,6 @@ + import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { WordsBtn,on, off, trigger,MarkdownToHtml,getImageUrl} from 'educoder'; import { Button, Checkbox, @@ -13,6 +14,9 @@ import { import './completetaskdetails.css'; import GroupPackage from "../groupjobbank/GroupPackage"; import GroupPackage2 from "../groupjobbank/GroupPackage2"; +import AttachmentsList from "../../../common/components/attachment/AttachmentList"; +import NoneData from '../../courses/coursesPublic/NoneData' + class Groupjobbandetails extends Component { @@ -57,20 +61,24 @@ class Groupjobbandetails extends Component { render() { - + let{datas}=this.props; return ( -
+
-
+ { + datas.description===null||datas.description==="null"||datas.description===""? + "" + : + + } +
+ {datas.attachments === undefined || datas.attachments === null || datas.attachments === ""? "" : + } + +
- -
diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js index d7cd7a62c..9cfab4aa5 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -1,34 +1,43 @@ import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; +import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom'; +import {WordsBtn, ActionBtn,getImageUrl} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Completetaskdetails from './Completetaskdetails'; +import BanksMenu from '../../user/usersInfo/banks/banksMenu' +import Loadable from 'react-loadable'; +import Loading from '../../../Loading'; import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import '../css/busyWork.css'; import '../poll/pollStyle.css'; +const Completetaskdetails = Loadable({ + loader: () => import('./Completetaskdetails'), + loading: Loading, +}) + class Completetaskpage extends Component { //分组作业内容详情 constructor(props) { super(props); // this.answerMdRef = React.createRef(); - this.setState({ + this.state={ workid:1, isSpin:false, datas:[], - }) + visible:false, + banksMenu:undefined + } } componentDidMount() { // console.log("父组件加载框"); + this.getonedata(); + } + getonedata(){ if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, @@ -47,14 +56,41 @@ class Completetaskpage extends Component { this.setState({ isSpin:true, }) - let url = `/homework_banks/${workids}.json`; + let url = `/task_banks/${workids}.json`; // axios.get(url).then((response) => { if(response){ if(response.data){ this.setState({ - datas:response.data.informs, - }) + datas:response.data, + }); + try { + const crumbData={ + title:response && response.data && response.data.name, + is_public:response && response.data && response.data.is_public, + crumbArray:[ + {content:'详情'} + ] + }; + const menuData={ + tab:'0',//tab选中的index + menuArray:[//tab以及tab路由 + {to:`/banks/gtask/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'}, + ], + category:'gtask',//毕设选题 + tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}?tab=0`, + id:workids, + is_public:response && response.data && response.data.is_public, + type:this.props.match.params.type, + authorize:response && response.data && response.data.authorize, + } + this.setState({ + banksMenu:menuData + }) + this.props.initPublic(crumbData,response.data); + }catch (e) { + + } }else { this.setState({ datas:[], @@ -79,60 +115,35 @@ class Completetaskpage extends Component { }) }); } - - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - render() { - - const isAdmin = this.props.isAdmin(); - // console.log(119) - + let {datas} = this.state; + let{ + banksMenu + }=this.state; return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- -
- -
- - - + +
+ { + banksMenu && + + } + + { + return () + } + }> +
-
+ ) } } export default Completetaskpage; - diff --git a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css index fd1b10f51..2e63bf0ce 100644 --- a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css +++ b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css @@ -1,16 +1,18 @@ + .yslquestionbank1{ padding-top: 30px !important; padding-right: 30px !important; padding-left: 30px !important; + min-height: 500px !important; } .yslquesHeigth{ - min-height: 500px !important; + width: 100% !important; + } .yslquesmarkdowntext{ font-size: 16px; color: #707070; - } .yslquesmat26{ margin-top: 26px; @@ -55,4 +57,13 @@ .yslboomdivsys{ color: #666666; font-size: 14px; +} +.pad20{ + padding-bottom: 20px !important; +} +.mt24{ + margin-top: 24px !important ; + } +.pd30{ + margin-bottom: 30px; } \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js index cde4f5f5e..be1241163 100644 --- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -1,29 +1,32 @@ import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; +import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom'; +import {WordsBtn, ActionBtn,getImageUrl} from 'educoder'; import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Completetopicdetails from './Completetopicdetails'; +import BanksMenu from '../../user/usersInfo/banks/banksMenu' +import Loadable from 'react-loadable'; +import Loading from '../../../Loading'; import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import '../css/busyWork.css'; import '../poll/pollStyle.css'; - +const Completetopicdetails = Loadable({ + loader: () => import('./Completetopicdetails'), + loading: Loading, +}) class CompletetopicdePage extends Component { //毕设选题内容详情 constructor(props) { super(props); // this.answerMdRef = React.createRef(); - this.setState({ + this.state={ workid:1, isSpin:false, datas:[], - }) + visible:false, + banksMenu:undefined + } } @@ -48,14 +51,41 @@ class CompletetopicdePage extends Component { this.setState({ isSpin:true, }) - let url = `/homework_banks/${workids}.json`; + let url = `/gtopic_banks/${workids}.json`; // axios.get(url).then((response) => { if(response){ if(response.data){ this.setState({ - datas:response.data.informs, - }) + datas:response.data, + }); + try { + const crumbData={ + title:response && response.data && response.data.name, + is_public:response && response.data && response.data.is_public, + crumbArray:[ + {content:'详情'} + ] + } + const menuData={ + tab:'0',//tab选中的index + menuArray:[//tab以及tab路由 + {to:`/banks/gtopic/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'}, + ], + category:'gtopic',//毕设选题 + tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}?tab=0`, + id:workids, + is_public:response && response.data && response.data.is_public, + type:this.props.match.params.type, + authorize:response && response.data && response.data.authorize, + } + this.setState({ + banksMenu:menuData + }) + this.props.initPublic(crumbData,response.data); + }catch (e) { + + } }else { this.setState({ datas:[], @@ -81,58 +111,37 @@ class CompletetopicdePage extends Component { }); } - /// 确认是否下载 - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - render() { + let {tab,datas,visible} = this.state; - const isAdmin = this.props.isAdmin(); - // console.log(119) - - + let{ + banksMenu + }=this.state + // + // const common={ + // initPublic:this.initPublic, + // } return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- -
- -
- - - {/*{parseInt(tab) === 1 ? :""}*/} - + +
+ { + banksMenu && + + } + + { + return () + } + }> +
-
+ ) } } diff --git a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js index 15b4c24cf..856c0d630 100644 --- a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js +++ b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { WordsBtn,on, off, trigger,MarkdownToHtml,getImageUrl} from 'educoder'; import { Button, Checkbox, @@ -12,6 +12,8 @@ import { } from "antd"; import GroupPackage from '../groupjobbank/GroupPackage' import './completetopicde.css'; +import AttachmentsList from "../../../common/components/attachment/AttachmentList"; +import NoneData from '../../courses/coursesPublic/NoneData' class Completetopicdetails extends Component { @@ -56,52 +58,81 @@ class Completetopicdetails extends Component { render() { - + let{datas}=this.props; return (
- -
- - + { + datas.description===null? + "" + :datas.description==="null"? + "" + : + datas.description===""? + "" + : + + } + + {datas.attachment_list === undefined ? + (datas.description===undefined || datas.description===null||datas.description===""? + + : + "" + ) + : + datas.attachment_list === null ? + (datas.description===undefined || datas.description===null||datas.description===""? + + : + "" + ) + : + datas.attachment_list.length === 0 ? + (datas.description===undefined || datas.description===null||datas.description===""? + + : + "" + ) + : +
+ +
+ }

课题类型: - 设计 + {datas&&datas.topic_type===1?"设计":datas&&datas.topic_type===2?"论文":datas&&datas.topic_type===3?"创作":"无"}

课题来源: - 生产/社会实践 + {datas&&datas.topic_source===1?"生产/社会实际":datas&&datas.topic_source===2?"结合科研":datas&&datas.topic_source===3?"其它":"无"}

课题性质1: - 设计 + {datas&&datas.topic_property_first===1?"真题":datas&&datas.topic_property_first===2?"模拟题":"无"}

课题性质2: - 设计 + {datas&&datas.topic_property_second===1?"纵向课题":datas&&datas.topic_property_second===2?"横向课题":datas&&datas.topic_property_second===3?"自选":"无"}

-
+

课题重复情况: - 新需求 + {datas&&datas.topic_repeat===1?"新题":datas&&datas.topic_repeat===2?"往届题,有新要求":datas&&datas.topic_repeat===3?"往届题,无新要求":"无"}

调研或实习地点: - 长沙 + {datas&&datas.province}{datas&&datas.city}

课题单位来源: - 湖南省据C++创始人Stroustrup有限公司 + {datas&&datas.source_unit===undefined?"无":datas&&datas.source_unit===null?"无":datas&&datas.source_unit===""?"无":datas&&datas.source_unit==="null"?"无":datas.source_unit}

diff --git a/public/react/src/modules/courses/comtopicdetails/completetopicde.css b/public/react/src/modules/courses/comtopicdetails/completetopicde.css index fd566ffdc..19367b3af 100644 --- a/public/react/src/modules/courses/comtopicdetails/completetopicde.css +++ b/public/react/src/modules/courses/comtopicdetails/completetopicde.css @@ -2,10 +2,10 @@ padding-top: 30px !important; padding-right: 30px !important; padding-left: 30px !important; + min-height: 500px !important; } .yslquesHeigth{ - min-height: 500px !important; - + width: 100% !important; } .yslquesmarkdowntext{ font-size: 16px; @@ -55,4 +55,11 @@ .yslboomdivsys{ color: #666666; font-size: 14px; +} +.mb29px{ + padding-top: 14px !important; + margin-bottom: 29px !important; +} +.pd30{ + margin-bottom: 30px; } \ No newline at end of file diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js index fc9427d27..ab67dddc6 100644 --- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js +++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js @@ -94,7 +94,6 @@ class AppraiseModal extends Component{ width: 48px; height: 16px; font-size: 16px; - font-family: PingFangSC; font-weight: 400; color: rgba(5,16,26,1); line-height: 16px; @@ -102,7 +101,6 @@ class AppraiseModal extends Component{ .newfont{ height: 16px; font-size: 16px; - font-family: PingFangSC; font-weight: 400; color: rgba(5,16,26,1); line-height: 16px; diff --git a/public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js b/public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js index 68a4c6efe..cca75fc86 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js @@ -37,7 +37,7 @@ class ShixunChooseModal extends Component{ hometypepvisible:loading }) let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json"; axios.get(url, { params: { @@ -76,7 +76,7 @@ class ShixunChooseModal extends Component{ }) let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json"; axios.get(url).then((result)=>{ if(result.status===200){ diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index 3a3e20041..5c1720ace 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -25,7 +25,7 @@ class ShixunModal extends Component{ hometypepvisible:true, }) let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json"; axios.get(url).then((result)=>{ if(result.status===200){ @@ -51,7 +51,7 @@ class ShixunModal extends Component{ hometypepvisible:loading }) let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json"; axios.get(url, { params: { diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index bea982aac..45c7f00af 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1220,6 +1220,28 @@ samp { color: #FE4F4C; } + /* 毕设任务 */ + .graduationTaskMenu>a{ + display: block; + position: relative; + line-height: 72px; + font-size: 16px; + margin-right: 30px; + float: left; + } + .graduationTaskMenu>a.active:after{ + position: absolute; + left: 0px; + height: 2px; + width: 100%; + content: ''; + background: #4CACFF; + bottom: 0px; + font-weight:400; + } + .graduationTaskMenu>a.active{ + color: #4CACFF!important; + } /* end */ /* form表单,包含多个item时 */ diff --git a/public/react/src/modules/courses/elearning/Elearning.js b/public/react/src/modules/courses/elearning/Elearning.js index 2be9bd022..a1e28f672 100644 --- a/public/react/src/modules/courses/elearning/Elearning.js +++ b/public/react/src/modules/courses/elearning/Elearning.js @@ -359,23 +359,23 @@ class Elearning extends Component{ {/*简介*/} -
-
- 简介 -
-
-

-

-
+ {/*
*/} + {/*
*/} + {/* 简介*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/*

*/} + {/*
*/} -
+ {/*
*/}
-
+
{ stages===undefined||stages===JSON.stringify("[]")||stages.length===0? diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js index 2bc646fb3..7662b2c21 100644 --- a/public/react/src/modules/courses/exercise/Exercise.js +++ b/public/react/src/modules/courses/exercise/Exercise.js @@ -338,7 +338,8 @@ class Exercise extends Component{ checkBoxValues:[], Modalstypeloding:false }) - this.InitList(type,StudentList_value,page,limit) + this.InitList(type,StudentList_value,page,limit); + this.props.updataleftNavfun(); } }).catch((error)=>{ console.log(error); diff --git a/public/react/src/modules/courses/exercise/ExerciseDisplay.js b/public/react/src/modules/courses/exercise/ExerciseDisplay.js index a0296476f..42702e9cb 100644 --- a/public/react/src/modules/courses/exercise/ExerciseDisplay.js +++ b/public/react/src/modules/courses/exercise/ExerciseDisplay.js @@ -53,11 +53,17 @@ class ExerciseDisplay extends Component{ componentDidMount = () => { const Id = this.props.match.params.Id if (Id) { - const url = `/exercises/${Id}.json` + const url = `/${this.props.urlPath || 'exercises'}/${Id}.json` axios.get(url) .then((response) => { - if (response.data.status == 0) { - this.setState({...response.data}) + if (response.data.exercise) { + response.data.exercise.exercise_description = response.data.exercise.exercise_description || response.data.exercise.description + response.data.exercise.exercise_name = response.data.exercise.exercise_name || response.data.exercise.name + response.data.exercise.exercise_status = response.data.exercise.exercise_status == undefined ? 1 : response.data.exercise.exercise_status + this.setState({...response.data}) + this.props.detailFetchCallback && this.props.detailFetchCallback(response); + } else { + this.props.detailFetchCallback && this.props.detailFetchCallback(response); } }) .catch(function (error) { diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js index 017fff71e..80f837686 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNew.js +++ b/public/react/src/modules/courses/exercise/ExerciseNew.js @@ -5,440 +5,63 @@ import { Slider, Button, Upload, Icon, Rate, Checkbox, message, Row, Col, Select, Modal, Tooltip } from 'antd'; -import { Q_TYPE_SINGLE, Q_TYPE_MULTI, Q_TYPE_JUDGE, Q_TYPE_NULL, Q_TYPE_MAIN, Q_TYPE_SHIXUN } from './new/common' -import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' // import './board.css' -import "../common/formCommon.css" +// import "../common/formCommon.css" // import { RouteHOC } from './common.js' -import CBreadcrumb from '../common/CBreadcrumb' -import {getUrl, ActionBtn} from 'educoder'; -import SingleEditor from './new/SingleEditor' -import SingleDisplay from './new/SingleDisplay' -import JudgeEditor from './new/JudgeEditor' -import JudgeDisplay from './new/JudgeDisplay' -import NullEditor from './new/NullEditor' -import NullDisplay from './new/NullDisplay' -import MainEditor from './new/MainEditor' -import MainDisplay from './new/MainDisplay' -import ShixunEditor from './new/ShixunEditor' -import ShixunDisplay from './new/ShixunDisplay' +// import { Q_TYPE_SINGLE, Q_TYPE_MULTI, Q_TYPE_JUDGE, Q_TYPE_NULL, Q_TYPE_MAIN, Q_TYPE_SHIXUN } from './new/common' +// import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; +// import CBreadcrumb from '../common/CBreadcrumb' +import {getUrl, ActionBtn, CBreadcrumb} from 'educoder'; + +// import SingleEditor from './new/SingleEditor' +// import SingleDisplay from './new/SingleDisplay' +// import JudgeEditor from './new/JudgeEditor' +// import JudgeDisplay from './new/JudgeDisplay' +// import NullEditor from './new/NullEditor' +// import NullDisplay from './new/NullDisplay' +// import MainEditor from './new/MainEditor' +// import MainDisplay from './new/MainDisplay' +// import ShixunEditor from './new/ShixunEditor' +// import ShixunDisplay from './new/ShixunDisplay' -import ShixunChooseModal from '../coursesPublic/ShixunChooseModal' import update from 'immutability-helper' import './new/common.css' import '../css/Courses.css' + +import ExerciseNewCommon from './ExerciseNewCommon' const { TextArea } = Input; -const confirm = Modal.confirm; -const $ = window.$ -const { Option } = Select; -const TITLE_MAX_LENGTH = 60; + class ExerciceNew extends Component{ constructor(props){ super(props); this.state = { - exercise_questions: [], - exercise_name: '', - exercise_description: '', - exercise_types: {}, - editMode: !this.props.match.params.Id, - } - } - - // 已发布试卷编辑保存的确认弹框 - changeScore = (question_id,answerArray) =>{ - this.props.confirm({ - content:'修改了标准答案', - subContent:"是否重新计算学生答题的成绩?", - onOk:()=>{ - this.sureChangeScore(question_id,answerArray) - }, - onCancel:()=>{ - this.addSuccess(); - } - }) - } - - // 已发布试卷修改答案确认修改分数 - sureChangeScore = (question_id,answerArray) =>{ - let url=`/exercise_questions/${question_id}/update_scores.json` - axios.post((url),{ - standard_answers:answerArray - }).then((result)=>{ - if(result){ - this.props.showNotification(`${result.data.message}`); - this.addSuccess(); - } - }).catch((error)=>{ - console.log(error); - }) - } - - fetchExercise = () => { - const Id = this.props.match.params.Id - this.isEdit = !!Id - if (Id) { - const url = `/exercises/${Id}/edit.json` - axios.get(url) - .then((response) => { - if (response.data.status == 0) { - const { exercise, ...others } = response.data - this.setState({ - ...exercise, - ...others, - editMode: false - }) - } - }) - .catch(function (error) { - console.log(error); - }); - } else { - const courseId=this.props.match.params.coursesId; - - const newUrl = `/courses/${courseId}/exercises/new.json` - axios.get(newUrl) - .then((response) => { - if (response.data.status == 0) { - this.setState({ - ...response.data - }) - } - }) - .catch(function (error) { - console.log(error); - }); + } } componentDidMount = () => { - this.fetchExercise() - } - handleSubmit = (e) => { } - onSaveExercise = () => { - const { exercise_name, exercise_description } = this.state; - const exercise_id = this.props.match.params.Id - const courseId = this.props.match.params.coursesId - if (this.isEdit) { - const editUrl = `/exercises/${exercise_id}.json` - axios.put(editUrl, { - exercise_name, - exercise_description - }) - .then((response) => { - if (response.data.status == 0) { - this.setState({editMode: false}) - this.props.showNotification('试卷编辑成功') - } - }) - .catch(function (error) { - console.log(error); - }); - } else { - const url = `/courses/${courseId}/exercises.json` - axios.post(url, { - exercise_name, - exercise_description - }) - .then((response) => { - if (response.data.status == 0) { - this.setState({editMode: false}) - - this.props.showNotification('试卷新建成功') - const exercise_id = response.data.data.exercise_id; - this.isEdit = true; - - this.props.history.replace(`/courses/${courseId}/exercises/${exercise_id}/edit`); - - } - }) - .catch(function (error) { - console.log(error); - }); - } - } - exercise_name_change = (e) => { - this.setState({exercise_name: e.target.value}) - } - exercise_description_change = (e) => { - this.setState({exercise_description: e.target.value}) - } - // #问题的类型,0为单选题,1为多选题,2为判断题,3为填空题,4为主观题,5为实训题 - _checkIsEditing = () => { - if (this.editingId && $(this.editingId).length ) { - this.props.showNotification('请先保存或取消当前正在编辑的问题。') - $("html").animate({ scrollTop: $(this.editingId).offset().top - 100}) - return true - } - return false - } - onEditorCancel = () => { - this.editingId = null; - // 找到编辑或新建的item,新建就删掉item,编辑就isNew改为false - const { exercise_questions } = this.state - let index = -1; - for(let i = 0; i < exercise_questions.length; i++) { - if (exercise_questions[i].isNew == true) { - index = i; - break; - } - } - if (exercise_questions[index].question_id) { // 编辑 - this.setState( - (prevState) => ({ - exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: false}}}) - // update(prevState.exercise_questions, {$splice: [[index, 1]]}) - }) - ) - } else { // 新建 - this.setState( - (prevState) => ({ - exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) - }) - ) - } - } - addQuestion = (question_id_to_insert_after, type) => { - if (!this.isEdit) { - this.props.showNotification('请先输入试卷标题,并保存试卷') - return; - } - if (this._checkIsEditing()) { - return; - } - if (type == Q_TYPE_SHIXUN) { - this.addShixun(question_id_to_insert_after) - } else { - this.addEditingQuestion(type, question_id_to_insert_after) - } - } - chooseShixun = (array) => { - this.addEditingQuestion(Q_TYPE_SHIXUN, this.question_id_to_insert_after, { - shixun_id: array[0] - }) - } - chooseShixunSuccess = () => { - this.refs.shixunChooseModal.setVisible(false) - } - addShixun = (question_id_to_insert_after) => { - if (!this.isEdit) { - this.props.showNotification('请先输入试卷标题,并保存试卷') - return; - } - // TODO 弹框选择实训 - if (this._checkIsEditing()) { - return; - } - this.refs.shixunChooseModal.setVisible(true) - this.question_id_to_insert_after = question_id_to_insert_after; - return; - // 拉取实训items - this.addEditingQuestion(Q_TYPE_SHIXUN, question_id_to_insert_after, { - shixun_id: 50 - }) - } - editQestion = (index) => { - if (this._checkIsEditing()) { - return; - } - this.editingId = `#question_${index}` - - this.setState( - (prevState) => ({ - exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: true}}}) - }) - ) - } - onSort = (index, question_id, isUp) => { - if (this._checkIsEditing()) { - return; - } - const url = `/exercise_questions/${question_id}/up_down.json` - axios.post(url, { opr: isUp ? 'up' : 'down'}) - .then((response) => { - if (response.data.status == 0) { - // this.props.showNotification('移动成功') - this.fetchExercise() - } - }) - .catch(function (error) { - console.log(error); - }); - } - onSortDown = (index, question_id) => { - this.onSort(index, question_id, false) - } - onSortUp = (index, question_id) => { - this.onSort(index, question_id, true) - } - getInitScore = (question_type, question_id_to_insert_after) => { - /** - 1.每个题型的首个题目默认值规则如下: - 选择题:5分 01 - 判断题:2分 2 - 填空题:2分 3 - 简答题:10分 4 - 实训题:每个关卡5分 5 - */ - let init_question_score = 0; - if (question_type == 0 || question_type == 1) { - init_question_score = 5 - } else if (question_type == 2) { - init_question_score = 2 - } else if (question_type == 3) { - init_question_score = 2 - } else if (question_type == 4) { - init_question_score = 10 - } else if (question_type == 5) { - init_question_score = 5 - } - const _indexBefore = question_id_to_insert_after ? this.findIndexById(question_id_to_insert_after) : this.state.exercise_questions.length - 1 - for (let i = _indexBefore; i >= 0; i--) { - if(this.state.exercise_questions[i].question_type == question_type) { - init_question_score = this.state.exercise_questions[i].question_score - break; - } - } - return init_question_score; - } - addEditingQuestion = (question_type, question_id_to_insert_after, otherAttributes) => { - - let init_question_score = this.getInitScore(question_type, question_id_to_insert_after) - - let questionObj = { - question_type: question_type, // 需要这个通过类型判断 - init_question_score: init_question_score, - isNew: true, // 新建或编辑,用是否有id区分是新建还是编辑 - question_id_to_insert_after, - ...otherAttributes - } - const { exercise_questions } = this.state; - let new_exercise_questions = exercise_questions.slice(0) - let newIndex = new_exercise_questions.length; - - if (question_id_to_insert_after) { - const _indexBefore = this.findIndexById(question_id_to_insert_after) - new_exercise_questions.splice(_indexBefore + 1, 0, questionObj) - newIndex = _indexBefore + 1 - } else { - new_exercise_questions.push(questionObj) - } - this.editingId = `#question_${newIndex}` - this.setState({ exercise_questions: new_exercise_questions }, () => { - setTimeout(() => { - $(this.editingId).length && $("html").animate({ scrollTop: $(this.editingId).offset().top - 100}) - }, 500) - }) - } - findIndexById = (id) => { - const { exercise_questions } = this.state - for(let i = 0; i < exercise_questions.length; i++) { - if (exercise_questions[i].question_id == id) { - return i; - } - } - } - onQestionDelete = (question_id) => { - this.props.confirm({ - content: `确认要删除这个问题吗?`, - onOk: () => { - const url = `/exercise_questions/${question_id}.json` - axios.delete(url) - .then((response) => { - if (response.data.status == 0) { - this.props.showNotification('删除成功') - this.fetchExercise() - - // const { exercise_questions } = this.state - // const index = this.findIndexById(question_id) - - // this.setState( - // (prevState) => ({ - // exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) - // }) - // ) - } - }) - .catch(function (error) { - console.log(error); - }); - } - }) - } - addSuccess = () => { - this.editingId = null; - this.fetchExercise() - } - goToPreview = () => { - const exercise_id = this.props.match.params.Id - const courseId = this.props.match.params.coursesId - this.props.history.push(`/courses/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`) + initData = (data) => { + this.setState({left_banner_id: data.left_banner_id}) } render() { - let { exercise_name, exercise_description, course_id, exercise_types, - exercise_questions, left_banner_id } = this.state; - // if (this.isEdit && !exercise_types) { - // return '' - // } - // const { getFieldDecorator } = this.props.form; - const { q_counts, q_scores, q_doubles, q_doubles_scores, q_judges, q_judges_scores, - q_mains, q_mains_scores, q_nulls, q_nulls_scores, q_shixuns, q_shixuns_scores, q_singles, q_singles_scores} = exercise_types; - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - // sm: { span: 8 }, - sm: { span: 24 }, - }, - wrapperCol: { - xs: { span: 24 }, - // sm: { span: 16 }, - sm: { span: 24 }, - }, - }; + let { left_banner_id } = this.state; + const { current_user } = this.props - const isAdmin = this.props.isAdmin() + const courseId=this.props.match.params.coursesId; - const exercise_id = this.props.match.params.Id const isEdit = this.isEdit - const commonHandler = { - onQestionDelete: this.onQestionDelete, - addSuccess: this.addSuccess, - addQuestion: this.addQuestion, - onEditorCancel: this.onEditorCancel, - changeScore:this.changeScore, - editQestion: this.editQestion, - onSortDown: this.onSortDown, - onSortUp: this.onSortUp, - displayCount: exercise_questions.length, - exercise_status: this.state.exercise_status, - exerciseIsPublish: this.state.exercise_status >= 2 - } + return(
- - +
{ current_user &&

- {!this.state.editMode && } - {this.state.editMode &&
-
- - {/* {getFieldDecorator('subject', { - rules: [{ - required: true, message: '请输入标题', - }, { - max: 20, message: '最大限制为20个字符', - }], - })( */} - - - {/* )} */} - - - - {/* {getFieldDecorator('select_board_id', { - // initialValue: '3779', - })( */} - -
- } - -
- ) - }) - } -
+
) } diff --git a/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js new file mode 100644 index 000000000..dfe8ad4e7 --- /dev/null +++ b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js @@ -0,0 +1,117 @@ +import React,{ Component } from "react"; +import {Checkbox,Radio} from "antd"; + + +import '../css/members.css' +import '../css/busyWork.css' +import './pollStyle.css' + + +const map={1:"单选题",2:"多选题",3:"主观题",4:"主观题"} +class PollDetailTabThirdInfo extends Component{ + constructor(props){ + super(props); + } + render(){ + let { pollDetail }=this.props; + return( +
+ { + pollDetail && pollDetail.poll.polls_description && +

{ pollDetail.poll.polls_description }

+ } +

+ { !pollDetail || !pollDetail.question_types || pollDetail.question_types.q_counts===0 ? "" : + + { + pollDetail && pollDetail.question_types && pollDetail.question_types.q_counts > 0 && + 合计{pollDetail.question_types && pollDetail.question_types.q_counts}题: + } + { + pollDetail && pollDetail.question_types.q_singles > 0 && + 单选题{pollDetail.question_types.q_singles}题 + } + { + pollDetail && pollDetail.question_types.q_doubles > 0 && + 多选题{pollDetail.question_types.q_doubles}题 + } + { + pollDetail && pollDetail.question_types.q_mains > 0 && + 主观题{pollDetail.question_types.q_mains}题 + } + + } +

+ + { + pollDetail && pollDetail.questions && pollDetail.questions.map((item,key)=>{ + return( +
+

+ {item.question.question_number}、{map[item.question.question_type]} + { item.question.is_necessary==1 ? 必答:选答 } + { item.question.question_type == 2 && item.question.min_choices != undefined && item.question.min_choices != null && item.question.max_choices != undefined && item.question.max_choices != null ? + + { + item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : + "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" + } + :"" + } +

+
  • {item.question.question_title}
  • + { + // 单选题 + item.question.question_type==1 && + + { + item.question.answers.map((index,k)=>{ + return( +
  • + + {index.answer_text} + { + index.answer_text=="其他" ?

    :"" + } + +
  • + ) + }) + } +
    + } + { + // 多选题 + item.question.question_type==2 && + + { + item.question.answers.map((index,k)=>{ + return( +
  • + + {index.answer_text} + { + index.answer_text=="其他" ?

    :"" + } +
  • + ) + }) + } +
    + } + { + // 主观题 + item.question.question_type == 3 && +
    + +
    + } +
    + ) + }) + } +
    + ) + } +} +export default PollDetailTabThirdInfo \ No newline at end of file diff --git a/public/react/src/modules/courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js index 2476e0bc3..bb019c4a4 100644 --- a/public/react/src/modules/courses/poll/PollInfo.js +++ b/public/react/src/modules/courses/poll/PollInfo.js @@ -19,7 +19,6 @@ class PollInfo extends Component{ super(props); this.state={ courseName:undefined, - userName:undefined, poll:undefined, question_answered:undefined, question_types:undefined, @@ -73,8 +72,7 @@ class PollInfo extends Component{ getInfo=()=>{ this.setState({ - courseName:this.props.current_user.course_name, - userName:this.props.current_user.username + courseName:this.props.current_user.course_name }) let pollId=this.props.match.params.pollId; let user_id=this.props.match.params.login; @@ -291,7 +289,7 @@ class PollInfo extends Component{ render(){ let coursesId=this.props.match.params.coursesId; - let{poll,question_answered,question_types,questions,courseName,userName, + let{poll,question_answered,question_types,questions,courseName, inputArray, modalsType, modalsTopval, diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index c944da4ef..9d34b7036 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -71,6 +71,7 @@ class PollNew extends Component { first_category_url:"", left_banner_id:"", publishtimeid_int:0, + boolneweied:undefined, } // console.log("试卷新建和编辑"); // console.log(JSON.stringify(props)); @@ -380,6 +381,7 @@ class PollNew extends Component { } this.setState({ Newdisplay:true, + boolneweied:true, }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); @@ -409,6 +411,7 @@ class PollNew extends Component { } this.setState({ Newdisplay:true, + boolneweied:true, }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); @@ -432,6 +435,7 @@ class PollNew extends Component { } this.setState({ Newdisplay:true, + boolneweied:true, }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); @@ -451,15 +455,24 @@ class PollNew extends Component { adddomedit = (object,indexysl) => { // console.log("adddomedit 76"); if (this.state.q_countst > 0) { + if(this.state.boolneweied !== undefined){ + if(this.state.boolneweied===true){ + this.scrollToAnchor("publishtimeids"); + }else{ + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + } + }else{ + this.scrollToAnchor("publishtimeids"); + } this.props.showNotification(`不能同时编辑两题`); - this.scrollToAnchor("publishtimeids"); return; } var anserbool = false; this.setState({ q_countst: 1, bindingid:object.question.id, - publishtimeid_int:indexysl + publishtimeid_int:indexysl, + boolneweied:false, }) // window.scrollTo(0, this.refs.targetElement.offsetTops) let {adddom} = this.state; @@ -617,11 +630,19 @@ class PollNew extends Component { // console.log(pollid) // console.log(Insertposition) // console.log(Whether) - console.log("addMytopic"); - console.log(id); + // console.log("addMytopic"); + // console.log(id); if (this.state.q_countst > 0) { if(Whether===true){ - this.scrollToAnchor("publishtimeids"); + if(this.state.boolneweied !== undefined){ + if(this.state.boolneweied===true){ + this.scrollToAnchor("publishtimeids"); + }else{ + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + } + }else{ + this.scrollToAnchor("publishtimeids"); + } } this.props.showNotification(`不能同时编辑两题`); return; @@ -639,6 +660,7 @@ class PollNew extends Component { this.setState({ Insertposition: Insertposition, q_countst: 1, + boolneweied:false, }) // window.scrollTo(0, this.refs.targetElement.offsetTop) var arrr = this.state.adddom; @@ -847,6 +869,7 @@ class PollNew extends Component { bindingid:undefined, Newdisplay:false, newoption: false, + boolneweied:undefined }) }else{ @@ -857,6 +880,7 @@ class PollNew extends Component { problemtopicbool: false, Newdisplay:false, newoption: false, + boolneweied:undefined }) } @@ -1008,7 +1032,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); return; } } @@ -1228,7 +1252,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); return; } } @@ -1405,6 +1429,7 @@ class PollNew extends Component { adddom: newarr, problemtopic: null, problemtopicbool: false, + boolneweied:undefined // mysingles: this.state.mysingles, // mydoubles: this.state.mydoubles, // mymainsint: this.state.mymainsint @@ -1548,7 +1573,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); return; } } @@ -1759,7 +1784,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); return; } } @@ -1923,6 +1948,9 @@ class PollNew extends Component { } this.Deleteadddom(indexo); // console.log(indexo) + this.setState({ + boolneweied:undefined + }) } @@ -2771,10 +2799,10 @@ class PollNew extends Component { { this.props.match.params.news === "new" ? 返回 + className=" fr font-16"> : 返回 + className=" fr font-16"> }
    @@ -3764,9 +3792,7 @@ class PollNew extends Component { this.props.match.params.news === "new" ? this.state.Newedit === false ?
    -
    - -
    +
    this.addmysingles()}>单选题 this.addmydoubles()}> -
    -
    +
    this.addmysingles()}>单选题 this.addmydoubles()}> { + // console.log("调用了changeTopicName"); + let num = parseInt(e.target.value.length); + if (num > 60) { + return; + } + this.setState({ + addonAfter: num < 0 ? 0 : num + }); + this.setState({ + polls_nametest: e.target.value + }) + } + + + changeTopicNametwo = (e) => { + // console.log("获取的值" + e.target.value); + let num = 100 - parseInt(e.target.value.length); + this.setState({ + addonAftertwo: num < 0 ? 0 : num + }) + this.setState({ + polls_descriptiontest: e.target.value + }) + } + + // 初始化数据 + componentDidMount = () => { + // console.log("componentDidMount 50") + if (this.props.isStudent() === true) { + + this.props.history.push("/403") + + return + } + // if (this.props.match.params.news !== undefined) { + // if (this.props.match.params.news === "new") { + // this.state.Newedit === true; + // this.setState({ + // Newedit: true, + // mysave: true, + // readOnlys: "", + // cancellation: true, + // }) + // } else { + + this.Initializatio_data(); + this.state.Newedit === false; + this.setState({ + Newedit: false, + mysave: false, + readOnlys: "readOnly", + }) + // } + // } + + console.log("问卷返回"); + console.log(this.props); + try { + if (this.props.current_user !== undefined) { + this.setState({ + first_category_url: this.props.current_user.first_category_url, + }); + console.log("======================="); + console.log(this.props.current_user.first_category_url); + } + } catch (e) { + console.log("12312312312") + console.log(e); + } + + }; + componentDidUpdate = (prevProps) => { + // console.log("componentDidUpdate"); + // console.log(prevProps); + // console.log(this.props); + if (prevProps.current_user != this.props.current_user) { + if (this.props.current_user !== undefined) { + // console.log(this.props.current_user.login); + // console.log(prevProps.current_user.login); + this.setState({ + first_category_url: this.props.current_user.first_category_url, + }) + } + } + } + + //获取权限 + // getPollInfo(){ + // // console.log(this.props.match); + // let pollId=this.props.match.params.pollId; + // let url=`/polls/${pollId}/common_header.json` + // axios.get(url).then((result)=>{ + // if(result.status==200){ + // this.setState({ + // pollDetail:result.data, + // user_permission:result.data.user_permission + // }) + // } + // }).catch((error)=>{ + // console.log(error); + // }) + // } + //初始化请求网络 + Initializatio_data = () => { + console.log("Initializatio_data 582") + //课堂id + let coursesId = this.props.match.params.coursesId; + //时间id + let pollid = this.props.match.params.workid; + console.log(pollid); + // let coursesId = 557; + if (pollid === undefined) { + // console.log("没有问卷新建问卷~~~") + // let coursesId=this.props.match.params.coursesId; + // // to={`/courses/${coursesId}/polls/new`} + // + // const urll = `/courses/${coursesId}/polls/new.json` + // axios.get(urll).then((result) => { + // if (result.status === 200) { + // console.log(urll) + // console.log("问卷新建成功") + // console.log(JSON.stringify(result)) + // // var path=`/courses/${coursesId}/polls/new`; + // // + // // this.props.history.push({ pathname: path, state: { } }); + // } + // }).catch((error) => { + // console.log(error) + // }) + + // const urlls = `/courses/${coursesId}/polls.json` + // axios.post(urlls,{ + // polls_name: "这是标题", + // polls_description:"这是标题须知" + // }).then((result)=>{ + // console.log("创建问卷++++++") + // console.log(result) + // try { + // if(result.data.status===0){ + // console.log("创建问卷") + // console.log(JSON.stringify(result.data)) + // } + // }catch (e) { + // + // } + // + // }) + //没有问卷 + this.setState({ + projects: [], + polls_name: "", + polls_description: "", + poll_questions: [], + question_types: [], + pollid: undefined, + mysingles: 0, + mydoubles: 0, + mymainsint: 0, + polls_nametest: "", + polls_descriptiontest: "", + coursesId: 0, + questionnair: false + }) + } else { + const url = `/exercise_banks/${pollid}.json`; + axios.get(url).then((result) => { + if (result) { + console.log("247"); + console.log(result); + + + } + + + if (result.data) { + if (result.data.poll) { + if (result.data.poll.polls_name) { + let num = parseInt(result.data.poll.polls_name.length); + this.setState({ + addonAfter: num < 0 ? 0 : num + }) + } + } + + } + + this.setState({ + projects: result.data, + pollid: pollid, + polls_status: result.data.poll.is_public === false ? 1 : 2, + polls_name: result.data.poll.name, + polls_description: result.data.poll.description, + poll_questions: result.data.questions, + question_types: result.data.question_types, + mysingles: result.data.question_types.q_singles, + mydoubles: result.data.question_types.q_doubles, + mymainsint: result.data.question_types.q_mains, + q_counts: result.data.question_types.q_counts, + polls_nametest: result.data.poll.name, + polls_descriptiontest: result.data.poll.description, + questionnair: true, + left_banner_id: result.data.left_banner_id + }) + + if (result.data.poll.name) { + if (result.data.poll.name.length > 0) { + this.setState({ + addonAfter: result.data.poll.name.length, + }) + } + } + try { + const crumbData={ + title:'编辑', + is_public:result && result.data && result.data.is_public, + crumbArray:[ + {to:`/banks/poll/${pollid}/${this.props.match.params.type}`,content:'详情'}, + {content:'编辑'} + ] + } + this.props.initPublic(crumbData,result.data); + }catch (e) { + + } + }).catch((error) => { + console.log(error) + }) + } + + } + + //重新获取数据 + thisinitializationdatanew = () => { + var pollidsy = null; + if (this.state.pollid !== undefined) { + pollidsy = this.state.pollid; + if (pollidsy === null || pollidsy === undefined) { + pollidsy = this.props.match.params.workid; + } + } + + if (pollidsy === null || pollidsy === undefined) { + return + } + + const url = `/exercise_banks/${pollidsy}.json`; + axios.get(url).then((result) => { + if (result !== undefined) { + this.setState({ + projects: result.data, + pollid: pollidsy, + polls_status: result.data.poll.is_public === false ? 1 : 2, + polls_name: result.data.poll.name, + polls_description: result.data.poll.description, + poll_questions: result.data.questions, + question_types: result.data.question_types, + mysingles: result.data.question_types.q_singles, + mydoubles: result.data.question_types.q_doubles, + mymainsint: result.data.question_types.q_mains, + q_counts: result.data.question_types.q_counts, + polls_nametest: result.data.poll.name, + polls_descriptiontest: result.data.poll.description, + questionnair: true, + left_banner_id: result.data.left_banner_id + }); + + + if (result.data.poll.name) { + if (result.data.poll.name.length > 0) { + this.setState({ + addonAfter: result.data.poll.name.length, + }) + } + } + } + + // console.log("有问卷~~~") + + + // } + }).catch((error) => { + console.log(error) + }) + } + //新建问卷 + newword = () => { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification(`请输入标题`); + return + } + let coursesId = this.props.match.params.coursesId; + const urlls = `/courses/${coursesId}/polls.json` + axios.post(urlls, { + polls_name: this.state.polls_nametest, + polls_description: this.state.polls_descriptiontest + }).then((result) => { + if (result.data.status === 0) { + this.state.Newedit === false; + // this.props.showNotification(`试卷创建成功`); + this.setState({ + pollid: result.data.data.id, + Newedit: false, + }) + this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) + } + }) + } + //添加单选题目 + addmysingles = () => { + + if (this.state.q_countst > 0) { + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + this.props.showNotification(`不能同时编辑两题`); + + return; + } + if (this.state.newoption === true) { + this.setState({ + newoption: false + }) + } + this.setState({ + Newdisplay: true, + boolneweied:true, + }) + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 1) { + Insertposition = i; + } + + } + this.addMytopic(1, this.state.pollid, Insertposition, false, 0,0); + this.scrollToAnchor("publishtimeids"); + } + + //添加多选题目 + addmydoubles = () => { + if (this.state.q_countst > 0) { + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + this.props.showNotification(`不能同时编辑两题`); + + return; + } + if (this.state.newoption === true) { + this.setState({ + newoption: false + }) + } + this.setState({ + Newdisplay: true, + boolneweied:true, + }) + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 2) { + Insertposition = i; + } + + + } + this.addMytopic(2, this.state.pollid, Insertposition, false, 0,0); + this.scrollToAnchor("publishtimeids"); + + // } + } + + //添加主观题目 + addmymainsint = () => { + if (this.state.q_countst > 0) { + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + this.props.showNotification(`不能同时编辑两题`); + return; + } + this.setState({ + Newdisplay: true, + boolneweied:true, + }) + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 3) { + Insertposition = i; + } + + + } + + this.addMytopic(3, this.state.pollid, Insertposition, false, 0,0); + this.scrollToAnchor("publishtimeids"); + } + + //编辑方法 + adddomedit = (object,indexysl) => { + if (this.state.q_countst > 0) { + if(this.state.boolneweied !== undefined){ + if(this.state.boolneweied===true){ + this.scrollToAnchor("publishtimeids"); + }else{ + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + } + }else{ + this.scrollToAnchor("publishtimeids"); + } + this.props.showNotification(`不能同时编辑两题`); + return; + } + + var anserbool = false; + this.setState({ + q_countst: 1, + bindingid: object.question.id, + publishtimeid_int:indexysl, + boolneweied:false, + }) + // window.scrollTo(0, this.refs.targetElement.offsetTops) + let {adddom} = this.state; + // var arr =new Object(objects); + // console.log(arr) + // adddom.push(arr); + var question = {}; + var Insertposition = this.state.poll_questions.length; + if (object.question.question_type === 1) { + var answers = []; + var questiontwo = {}; + ///////////////////////////daying + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + anserbool = true; + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + + + } + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 1) { + Insertposition = i; + } + } + } else if (object.question.question_type === 2) { + //插入多选题 + var answers = []; + var questiontwo = {}; + + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + anserbool = true; + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + // try { + // if(anserbool===false){ + // let answersysltwo = { + // "answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1, + // "answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1, + // "answer_text": "其他" + // } + // answers.push(answersysltwo); + // } + // }catch (e) { + // + // } + + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 2) { + Insertposition = i; + } + } + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 3) { + Insertposition = i; + } + } + } + this.setState({ + adddom: adddom, + newoption: anserbool, + Insertposition: Insertposition + }) + + } + + //新增添加题目 有new + addMytopic = (index, pollid, Insertposition, Whether, id,inty) => { + //Whether 是否插入 + // console.log("addMytopic 90") + // console.log(index) + // console.log(pollid) + // console.log(Insertposition) + // console.log(Whether) + // console.log("addMytopic"); + // console.log(id); + + if (this.state.q_countst > 0) { + if(Whether===true){ + if(this.state.boolneweied !== undefined){ + if(this.state.boolneweied===true){ + this.scrollToAnchor("publishtimeids"); + }else{ + this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); + } + }else{ + this.scrollToAnchor("publishtimeids"); + } + } + this.props.showNotification(`不能同时编辑两题`); + return; + } + + if(Whether===true){ + this.setState({ + publishtimeid_int:inty, + }) + } + this.state.Insertposition = Insertposition; + var Whethername = null; + if (Whether === true) { + Whethername = id; + } + this.setState({ + Insertposition: Insertposition, + q_countst: 1, + boolneweied:false, + }) + // window.scrollTo(0, this.refs.targetElement.offsetTop) + var arrr = this.state.adddom; + let newarrr = [...arrr]; + + var arr = this.state.poll_questions; + let newarr = [...arr]; + + if (newarr.length > 0) { + if (index === 1) { + // 插入单选题 + // console.log(this.state.poll_questions[newarr.length - 1].question.id); + var question = {} + var questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id, + "is_necessary": 1, + "question_number": 1, + "question_title": "", + "question_type": 1, + "new": "new", + "newid": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id + 1, + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 2) { + //插入多选题 + var question = {} + var questiontwo = { + "id": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id, + "is_necessary": 1, + "question_number": 2, + "question_title": "", + "question_type": 2, + "max_choices": 0, + "min_choices": 0, + "new": "new", + "newid": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id + 1, + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 3) { + //插入主观题 + // console.log(this.state.poll_questions[newarr.length - 1].question.id); + var question = {} + var questiontwo = { + "id": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id, + "is_necessary": 1, + "question_number": 3, + "question_title": "", + "question_type": 3, + "new": "new", + "newid": Whether === true ? id : this.state.poll_questions[newarr.length - 1].question.id + 1, + "answers": [] + }; + question = {"question": questiontwo}; + newarrr.push(question); + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } + } else { + /////上面视图全部删除后 要加载的 + if (index === 1) { + // 插入单选题 + var ids; + try { + ids = this.state.poll_questions[newarr.length - 1].question.id; + } catch (e) { + ids = 1; + } + var questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": Whether === true ? id : ids, + "is_necessary": 1, + "question_number": 1, + "question_title": "", + "question_type": 1, + "new": "new", + "newid": Whether === true ? id : ids + 1, + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 2) { + //插入多选题 + var ids; + try { + ids = this.state.poll_questions[newarr.length - 1].question.id; + } catch (e) { + ids = 1; + } + var questiontwo = { + "id": Whether === true ? id : ids, + "is_necessary": 1, + "question_number": 2, + "question_title": "", + "question_type": 2, + "max_choices": 0, + "min_choices": 0, + "new": "new", + "newid": Whether === true ? id : ids + 1, + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 3) { + //插入主观题 + var ids; + try { + ids = this.state.poll_questions[newarr.length - 1].question.id; + } catch (e) { + ids = 1; + } + var questiontwo = { + "id": Whether === true ? id : ids, + "is_necessary": 1, + "question_number": 3, + "question_title": "", + "question_type": 3, + "new": "new", + "newid": Whether === true ? id : ids + 1, + "answers": [] + }; + question = {"question": questiontwo}; + newarrr.push(question); + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + } + } + } + + //删除指定条目 + Deleteadddom = (indexo, bool) => { + // console.log("deleteadddom 259") + + var arr = this.state.adddom; + let newarr = [...arr]; + newarr.splice(indexo, 1); + if (bool === true) { + this.setState({ + adddom: newarr, + q_countst: 0, + problemtopic: null, + problemtopicbool: false, + bindingid: undefined, + Newdisplay: false, + newoption: false, + boolneweied:undefined + }) + + } else { + this.setState({ + adddom: newarr, + q_countst: 0, + problemtopic: null, + problemtopicbool: false, + Newdisplay: false, + newoption: false, + boolneweied:undefined + }) + } + } + //保存并继续 + //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) + Deleteadddomtwo = (indexo, object, bool) => { + var thiss = this; + + if (object.question.question_type === 3) { + this.HandleInputTopics(this.contentMdRef.current.getValue().trim(), indexo); + + } + var poll_questionslength = this.state.poll_questions.length; + // console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\"); + // console.log(indexo); + // console.log(object); + // console.log(object.question.question_type); + let arr = this.state.adddom; + let arrpoll = this.state.poll_questions; + let newarr = [...arr]; + let newarrpoll = [...arrpoll]; + + //选项内容不能为空 + let max = 0; + let maxtie = newarr[indexo].question.answers.length; + for (var k = 0; k < newarr[indexo].question.answers.length; k++) { + try { + if (newarr[indexo].question.answers[k].answer_text != undefined) { + if (newarr[indexo].question.answers[k].answer_text === "") { + max = max + 1; + } + } + } catch (e) { + // console.log("PollNew281") + console.log(e) + } + } + if (object.question.question_type !== 3) { + if (newarr[indexo].question.question_title === "") { + this.props.showNotification(`题目不能为空`); + + return + } + } + if (max > 0) { + if (object.question.question_type === 1) { + this.props.showNotification(`选项内容不能为空`); + + return + } else if (object.question.question_type === 2) { + this.props.showNotification(`选项内容不能为空`); + + return + } + + } + + if (object.question.question_type === 1) { + if (maxtie < 2) { + this.props.showNotification(`选项不能少于2个!`); + return + } + } else if (object.question.question_type === 2) { + if (maxtie < 3) { + this.props.showNotification(`选项不能少于3个!`); + return + } + } + + + if (object.question.question_type === 2) { + if (object.question.max_choices > 0) { + // if (object.question.min_choices < 2) { + // this.props.showNotification(`可选最小不能少于2个`); + // + // return; + // + // } + } + + } + if (object.question.new === "new") { + // 根据数组里面的new 来确定是否是新增还是 修改 + //添加道数组上 + //不能共用数组 所以自己写个新数组 然后push 上面卷子中 + var question = {}; + if (object.question.question_type === 1) { + + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + // 这个是装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + + + } + + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + var insindex = null; + // if (poll_questionslength !== thiss.state.Insertposition) { + // insindex = newarrpoll[thiss.state.Insertposition].question.id; + // } + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex,0); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + + return; + } + + if(object.question.max_choices){ + if(object.question.max_choices>0){ + if(object.question.min_choices){ + if(object.question.min_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + + if(object.question.min_choices){ + if(object.question.min_choices>0){ + if(object.question.max_choices){ + if(object.question.max_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex,object.question.answers.length); + //插入多选题 + // if (object.question.max_choices > arrc.length) { + // // console.log("选择题的最大可选项不能大于选项数") + // this.props.showNotification(`选择题的最大可选项不能大于选项数`); + // + // return; + // } + // if (object.question.min_choices === 0) { + // // console.log("选择题的最大可选项不能小于2项目") + // this.props.showNotification(`选择题的最大可选项不能小于2项目`); + // + // return; + // + // } + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 3) { + // this.HandleInputTopics(this.contentMdRef.current.getValue().trim(),indexo); + //插入主观题 + var answers = []; + var questiontwo = {}; + var answerstwos = []; + var answerstwoss = []; + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwoss.push(datatwo); + } + } + } + + answers = answerstwoss.concat(answerstwos); + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": this.contentMdRef.current.getValue().trim(), + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + // var insindex = null; + // if (poll_questionslength !== thiss.state.Insertposition) { + // insindex = newarrpoll[thiss.state.Insertposition].question.id; + // } + //主观题不需要可选选项 + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex,0); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } + //////////////////////////////////////////////////////////////////////////////////////////////////// 上面是新增 + } else { + ///////////////////////////////////////////////////////////////////////////////////////////////////修改点了编辑 + // console.log("点了编辑") + var uuk = -1 + //这个地方判断 点了编辑上面题目又把他删除了 保存的时候就只能是插入新增了 + for (var uk = 0; uk < newarrpoll.length; uk++) { + if (object.question.id === newarrpoll[uk].question.id) { + uuk = uk; + } + } + + + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + //这个装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + + + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 1, arrc, null, 0, 0,0); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("他原来的删除掉了") + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id,0); + newarrpoll.push(question); + } + newarr[indexo].question.new = "new" + // console.log(newarrpoll) + } else if (object.question.question_type === 2) { + //插入多选题 + + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification('可选:最小和最大限制须同时为数值或者“--"'); + + return; + } + + if(object.question.max_choices){ + if(object.question.max_choices>0){ + if(object.question.min_choices){ + if(object.question.min_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + + if(object.question.min_choices){ + if(object.question.min_choices>0){ + if(object.question.max_choices){ + if(object.question.max_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //插入多选题 + // if (object.question.max_choices > arrc.length) { + // // console.log("选择题的最大可选项不能大于答案数") + // this.props.showNotification('选择题的最大可选项不能大于选项数!'); + // + // return; + // } + // if (object.question.min_choices === 0) { + // // console.log("选择题的最大可选项不能小于2项目") + // this.props.showNotification('选择题的最大可选项不能小于2项目!'); + // + // return; + // + // } + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("删除") + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id,object.question.answers.length); + newarrpoll.push(question); + } + // console.log(newarrpoll) + newarr[indexo].question.new = "new" + } else if (object.question.question_type === 3) { + // this.HandleInputTopics(this.contentMdRef.current.getValue().trim(),indexo); + + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": this.contentMdRef.current.getValue().trim(), + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 3, null, null, 0, 0,0); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("删除") + this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id,0); + newarrpoll.push(question); + } + // console.log(newarrpoll) + newarr[indexo].question.new = "new" + } + + } + + + //添加到上面列表中 + //改变题目总数 + if (object.question.question_type === 1) { + //单选题 + this.state.mysingles = this.state.mysingles + 1; + } else if (object.question.question_type === 2) { + //多选题 + this.state.mydoubles = this.state.mydoubles + 1; + } else if (object.question.question_type === 3) { + //主观题 + this.state.mymainsint = this.state.mymainsint + 1; + + } + if (bool === true) { + this.setState({ + q_countst: 1, + bindingid: undefined, + Newdisplay: false, + + }) + } else { + this.setState({ + q_countst: 1, + Newdisplay: false, + }) + } + this.setState({ + // poll_questions: newarrpoll, + adddom: newarr, + problemtopic: null, + problemtopicbool: false, + boolneweied:undefined + // mysingles: this.state.mysingles, + // mydoubles: this.state.mydoubles, + // mymainsint: this.state.mymainsint + }) + + } + + + //保存 后期可以考虑和保存并继续 合并 + //保存,即完成新建并退出本题编辑 + // indexo 第几个数组 + //object 单个数组数据 + Deleteadddomthree = (indexo, object, bool) => { + + this.setState({ + Newdisplay: false, + }); + if (object.question.question_type === 3) { + this.HandleInputTopics(this.contentMdRef.current.getValue().trim(), indexo); + + } + // console.log("deleteadddom 349") + var thiss = this; + let arr = this.state.adddom; + let arrpoll = this.state.poll_questions; + let newarr = [...arr]; + let newarrpoll = [...arrpoll]; + var poll_questionslength = this.state.poll_questions.length; //获取单前问题最大长度 + //选项内容不能为空 + let max = 0; + let maxtie = newarr[indexo].question.answers.length; + //判断选项值是否不为空 + for (var k = 0; k < newarr[indexo].question.answers.length; k++) { + try { + if (newarr[indexo].question.answers[k].answer_text != undefined) { + if (newarr[indexo].question.answers[k].answer_text === "") { + max = max + 1; + } + } + } catch (e) { + // console.log("PollNew281") + // console.log(e) + } + } + if (object.question.question_type !== 3) { + if (newarr[indexo].question.question_title === "") { + this.props.showNotification('题目不能为空!'); + return + } + } + if (max > 0) { + if (object.question.question_type === 1) { + this.props.showNotification('选项内容不能为空!'); + return + } else if (object.question.question_type === 2) { + this.props.showNotification('选项内容不能为空!'); + return + } + + } + if (object.question.question_type === 1) { + if (maxtie < 2) { + this.props.showNotification('选项不能少于2个!'); + return + } + } else if (object.question.question_type === 2) { + if (maxtie < 3) { + this.props.showNotification('选项不能少于3个!'); + return + } + } + + + if (object.question.question_type === 2) { + if (object.question.max_choices > 0) { + // if (object.question.min_choices < 2) { + // this.props.showNotification(`可选最小不能少于2个`); + // return; + // } + } + } + if (object.question.new === "new") { + ///////////////////////////////////////////////////////////////////新增模式 + // 根据数组里面的new 来确定是否是新增还是 修改 + //添加道数组上 + //不能共用数组 所以自己写个新数组 然后push 上面卷子中 + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + // 这个是装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题' + // var id; + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1 + // } catch (e) { + // id = 1; + // } + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //获取指定id 号 用来插入,如果不是就是在最后添加 + + //执行新增操作 + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex,0); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + + return; + } + + + if(object.question.max_choices){ + if(object.question.max_choices>0){ + if(object.question.min_choices){ + if(object.question.min_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + + if(object.question.min_choices){ + if(object.question.min_choices>0){ + if(object.question.max_choices){ + if(object.question.max_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex,object.question.answers.length); + //插入多选题 + // if (object.question.max_choices > arrc.length) { + + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 3) { + // this.HandleInputTopics(this.contentMdRef.current.getValue().trim(),indexo); + + //插入主观题 + var answers = []; + var questiontwo = {}; + var answerstwos = []; + var answerstwoss = []; + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwoss.push(datatwo); + } + } + } + answers = answerstwoss.concat(answerstwos); + + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": this.contentMdRef.current.getValue().trim(), + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //主观题不需要可选选项 + + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex,0); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } + ///////////////////////////////////////////////////////////////////新增模式 + } else { + //////////////////////////////////////////////////////////////////////////////修改模式 + //修改 + var uuk = -1 + for (var uk = 0; uk < newarrpoll.length; uk++) { + if (object.question.id === newarrpoll[uk].question.id) { + uuk = uk; + // console.log("删除了数据=-09876543234567890-111111111111") + } + } + + + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + //这个装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 1, arrc, null, 0, 0,0); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("删除") + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id,0); + newarrpoll.push(question); + } + // console.log(newarrpoll) + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + + return; + } + + + if(object.question.max_choices){ + if(object.question.max_choices>0){ + if(object.question.min_choices){ + if(object.question.min_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + + if(object.question.min_choices){ + if(object.question.min_choices>0){ + if(object.question.max_choices){ + if(object.question.max_choices===0){ + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + } + }else { + this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + return; + + } + } + + } + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //插入多选题 + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("删除") + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id,object.question.answers.length); + newarrpoll.push(question); + } + // console.log(newarrpoll) + + } else if (object.question.question_type === 3) { + // this.HandleInputTopics(this.contentMdRef.current.getValue().trim(),indexo); + + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": this.contentMdRef.current.getValue().trim(), + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 3, null, null, 0, 0,0); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("删除") + this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id,0); + newarrpoll.push(question); + } + // console.log(newarrpoll) + + } + + } + + + //添加到上面列表中 + //改变题目总数 + if (object.question.question_type === 1) { + //单选题 + this.state.mysingles = this.state.mysingles + 1; + } else if (object.question.question_type === 2) { + //多选题 + this.state.mydoubles = this.state.mydoubles + 1; + } else if (object.question.question_type === 3) { + //主观题 + this.state.mymainsint = this.state.mymainsint + 1; + + } + if (bool === true) { + this.setState({ + bindingid: undefined, + }) + } + //这里更新数据 + if (this.state.q_countst == 1) { + this.setState({ + q_countst: 0, + }) + } + this.Deleteadddom(indexo); + this.setState({ + boolneweied:undefined + }) + } + + + ////新增到服务器中 + createquestionsandanswers = (object, number, option, other, max_choices, min_choices, insert_id,length) => { + var thiss = this; + var poll_id = this.state.pollid; + var urlly = `/poll_bank_questions.json`; + var max_choicess = null; + var min_choicess = null; + try { + if (max_choices === 0 && min_choices === 0) { + max_choicess = null; + min_choicess = null; + } else { + max_choicess = max_choices; + min_choicess = min_choices; + } + }catch (e) { + max_choicess = null; + min_choicess = null; + } + var datay={}; + datay={ + exercise_bank_id: poll_id, + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + question_answers: option, + question_other_answer: null, + insert_id: insert_id + } + try { + if(number===2){ + datay={ + exercise_bank_id: poll_id, + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + max_choices: max_choicess===undefined||max_choicess===null||max_choicess===0||max_choicess==="0"?null:max_choicess, + min_choices: min_choicess===undefined||min_choicess===null||min_choicess===0||min_choicess==="0"?null:min_choicess, + question_answers: option, + question_other_answer: null, + insert_id: insert_id + } + } + }catch (e) { + + } + + axios.post(urlly,datay).then((result) => { + // try { + if (result !== undefined) { + if (result.data.status === 0) { + this.props.showNotification(`已完成`); + thiss.thisinitializationdatanew(); + // console.log("确认创建问题") + // console.log(result) + // try { + // if (result.data.status === 0) { + // console.log("确认创建问题") + // console.log(JSON.stringify(result.data)) + // } + // } catch (e) { + // + // } + } + } + // } catch (e) { + // + // } + + }) + + + } + ///编辑修改到服务器当中 + edittotheserver = (object, number, option, other, max_choices, min_choices,length) => { + // console.log("调用了edittotheserver") + var url = `/poll_bank_questions/${object.question.id}.json` + var thiss = this; + var max_choicess = null; + var min_choicess = null; + try { + if (max_choices === 0 && min_choices === 0) { + max_choicess = null; + min_choicess = null; + } else { + max_choicess = max_choices; + min_choicess = min_choices; + } + }catch (e) { + max_choicess = null; + min_choicess = null; + } + var datay={}; + datay={ + // debug: true, + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + question_answers: option, + question_other_answer: null, + }; + try { + if(number===2){ + datay={ + // debug: true, + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + max_choices: max_choicess===undefined||max_choicess===null||max_choicess===0||max_choicess==="0"?null:max_choicess, + min_choices: min_choicess===undefined||min_choicess===null||min_choicess===0||min_choicess==="0"?null:min_choicess, + question_answers: option, + question_other_answer: null, + }; + } + }catch (e) { + + } + + axios.put(url,datay).then((result) => { + try { + if (result.data.status === 0) { + this.props.showNotification(`编辑题目成功`); + thiss.thisinitializationdatanew(); + } + } catch (e) { + // console.log("调用了edittotheserver") + console.log(e) + } + }) + } + + //删除到服务器当中 + eletetoserver = (pollid, newarr, type, index) => { + // console.log("调用了eletetoserver") + var id = pollid; + var url = `/exercise_bank_questions/${id}.json` + let {mysingles, mydoubles, mymainsint} = this.state + var thiss = this; + + axios + .delete(url, {}) + .then(function (response) { + // console.log(response) + if (response === undefined) { + return; + } + if (response.data.message === "删除成功") { + thiss.props.showNotification(`删除成功`); + + newarr.splice(index, 1); + if (type === 1) { + mysingles = mysingles - 1; + } else if (type === 2) { + mydoubles = mydoubles - 1; + + } else if (type === 3) { + mymainsint = mymainsint - 1; + + } + // thiss.setState({ + // poll_questions: newarr, + // mysingles: mysingles, + // mydoubles: mydoubles, + // mymainsint: mymainsint + // }); + thiss.thisinitializationdatanew(); + } + }) + } + + //上下移到服务器中 + Upanddownmovementof = (bool, poll_question_id,index) => { + // console.log("调用了Upanddownmovementofr") + // console.log(poll_question_id) + var thiss = this; + if (bool === true) { + var url = `/exercise_bank_questions/${poll_question_id}/up_down.json`; + axios.put(url, { + opr: "up", + }).then((result) => { + + try { + if(result){ + if(result.data){ + if (result.data.status === 0) { + this.props.showNotification(`上移成功`); + // let arr = this.state.poll_questions; + // let newarr = [...arr]; + // let temp = newarr[index - 1]; + // newarr[index - 1] = newarr[index]; + // newarr[index] = temp; + // this.setState({ + // poll_questions: newarr, + // }); + thiss.thisinitializationdatanew(); + }else{ + this.props.showNotification(`上移失败`); + } + } + }else { + this.props.showNotification(`上移失败`); + } + } catch (e) { + this.props.showNotification(`上移失败`); + console.log(e) + } + + }) + } else { + var url = `/exercise_bank_questions/${poll_question_id}/up_down.json`; + axios.put(url, { + opr: "down", + }).then((result) => { + + try { + if(result){ + if(result.data){ + if (result.data.status === 0) { + // message.success("下移题目成功", 1) + this.props.showNotification(`下移成功`); + // let arr = this.state.poll_questions; + // let newarr = [...arr]; + // let temp = newarr[index + 1]; + // newarr[index + 1] = newarr[index]; + // newarr[index] = temp; + // this.setState({ + // poll_questions: newarr, + // }); + thiss.thisinitializationdatanew(); + }else { + this.props.showNotification(`下移失败`); + } + }else { + this.props.showNotification(`上移失败`); + } + } + } catch (e) { + this.props.showNotification(`上移失败`); + console.log(e) + } + }) + } + + } + + //删除编辑新增条目 + //id 条目的唯一id + //i 为要删除的子条目 + Deleteentrys = (id, i, stirngname) => { + // console.log(id) + // console.log(stirngname); + var arrtwoy = this.state.adddom; + let newarrtwoy = [...arrtwoy]; + for (var k = 0; k < newarrtwoy.length; k++) { + if (newarrtwoy[k] != undefined) { + if (newarrtwoy[k].question.id === id) { + for (var c = 0; c < newarrtwoy[k].question.answers.length; c++) { + if (c === i) { + // console.log("删除了") + // console.log(c) + newarrtwoy[k].question.answers.splice(c, 1); + } + } + } + } + } + if (stirngname === true) { + // console.log(stirngname); + this.setState({ + newoption: false, + adddom: newarrtwoy, + + }) + } else { + // console.log(stirngname); + this.setState({ + adddom: newarrtwoy, + }); + } + + + } + + + // 新增选项 + Ewoption = (id, object) => { + // console.log("ewoption 440") + // console.log("是否是新建题目还是编辑") + // console.log(object.question.new) + + + let arrtwo = this.state.adddom; + let newarrtwo = [...arrtwo]; + + + for (var k = 0; k < newarrtwo.length; k++) { + // console.log(arrtwo[k].question.id); + if (newarrtwo[k] != undefined) { + if (newarrtwo[k].question.id === id) { + var data = { + "answer_id": newarrtwo[k].question.answers.length + 1, + "answer_position": newarrtwo[k].question.answers.length + 1, + "answer_text": "" + }; + //向头部添加元素 + // newarrtwo[k].question.answers.unshift(data); + //如果有其他这一项就删除掉 + if (newarrtwo[k].question.answers.length > 0) { + for (var o = 0; o < newarrtwo[k].question.answers.length; o++) { + if (newarrtwo[k].question.answers[o].answer_text != undefined) { + if (newarrtwo[k].question.answers[o].answer_text === "其他") { + newarrtwo[k].question.answers.splice(o, 0, data); + this.setState({ + adddom: newarrtwo + }) + return + } else { + if (o === newarrtwo[k].question.answers.length - 1) { + newarrtwo[k].question.answers.push(data); + this.setState({ + adddom: newarrtwo + }) + return + } + } + } + } + } else { + newarrtwo[k].question.answers.push(data); + this.setState({ + adddom: newarrtwo + }) + } + + } + } + } + + } + + + swapArray = (arr, index1, index2) => { + arr[index1] = arr.splice(index2, 1, arr[index1])[0]; + return arr; + } + + //新增其他选项 + Addanotheroption = (id) => { + // console.log("addanotheroption 457") + let arrtwo = this.state.adddom; + let newarrtwo = [...arrtwo]; + // console.log(newarrtwo) + for (var k = 0; k < newarrtwo.length; k++) { + if (newarrtwo[k] != undefined) { + if (newarrtwo[k].question.id === id) { + var data = { + "answer_id": newarrtwo[k].question.answers.length + 1, + "answer_position": newarrtwo[k].question.answers.length + 1, + "answer_text": "其他" + }; + newarrtwo[k].question.answers.push(data); + } + } + } + this.setState({ + adddom: newarrtwo, + newoption: true, + }) + } + + + //点击向上排序按钮事件 + handleClickBySortUp = (index, object) => { + // console.log("handleClickBySortUp 521") + + // console.log(newarr) + if (index != 0) { + this.Upanddownmovementof(true, object.question.id,index); + + } + } + + //点击向下排序按钮事件 + handleClickBySortDown = (index, object) => { + // console.log("handleClickBySortDown 536") + let arr = this.state.poll_questions; + let newarr = [...arr]; + // + if (index != newarr.length - 1) { + this.Upanddownmovementof(false, object.question.id,index); + + } else { + // console.log("2222index==arr.length"); + // console.log(this.state.poll_questions); + } + } + + //点击删除按钮事件 + handleClickByDelete = (type, index, object) => { + // console.log("handleClickByDelete 556") + // console.log("object.question.id") + // console.log(object.question.id) + let arr = this.state.poll_questions; + let newarr = [...arr]; + this.eletetoserver(object.question.id, newarr, type, index) + + } + + // 数字输入监听 + //e为获取组件对象 + //i外层数组 + //k为内层数组 + HandleInputChanges = (e, i, k) => { + console.log("handleInputChanges" + " " + e); + console.log("handleInputChanges" + " " + i); + console.log("handleInputChanges" + " " + k); + // console.log("handleInputChanges 612") + + let value = e.target.value;//取到input的数据 + // console.log("handleInputChanges value is :" + value); + // console.log(k); + let arr = this.state.adddom; + let newarr = [...arr]; + + newarr[i].question.answers[k].answer_text = value + this.setState({ + adddom: newarr + }) + + } + + //标题输入监听 + HandleInputTopic = (e, i) => { + // console.log("handleInputTopic 633") + + let value = e.target.value;//取到input的数据 + // console.log("handleInputTopic value is :" + value); + // console.log(i); + let arr = this.state.adddom; + let newarr = [...arr]; + newarr[i].question.question_title = value + this.setState({ + adddom: newarr + }) + } + + HandleInputTopics = (value, i) => { + console.log("handleInputTopic 633") + console.log(value); + //取到input的数据 + // console.log("handleInputTopic value is :" + value); + // console.log(i); + let arr = this.state.adddom; + let newarr = [...arr]; + newarr[i].question.question_title = value + this.setState({ + adddom: newarr + }) + } +//最小值 + HandleGradationGroupChangee = (value, index, max, length) => { + // console.log("最小值"); + // console.log(value); + // console.log(index); + // console.log(max); + // console.log(length); + + // debugger + var minbool = false; + var maxbool = false; + let arr = this.state.adddom; + // if (parseInt(value) === 0 || parseInt(value) === "0" || parseInt(value) === null || parseInt(value) === undefined || parseInt(value) < 1) { + // minbool = true; + // } + // if (max === 0 || max === "0" || max === null || max === undefined) { + // maxbool = true; + // } + // + // if (minbool === true && maxbool === true) { + // for (var i = 0; i < arr.length; i++) { + // if (index === i) { + // arr[i].question.min_choices = parseInt(value); + // } + // } + // this.setState({ + // adddom: arr + // }) + // } else { + for (var i = 0; i < arr.length; i++) { + if (index === i) { + arr[i].question.min_choices = parseInt(value); + // arr[i].question.max_choices = length; + break; + } + } + this.setState({ + adddom: arr + }) + // } + + } + + //最大值 + HandleGradationGroupChangeee = (value, index,minchoices,length) => { + // console.log("2112"); + // console.log(value); + // console.log(minchoices); + // console.log("最大值"); + // console.log(value); + // console.log(index); + // console.log(minchoices); + // console.log(length); + let arr = this.state.adddom; + for (var i = 0; i < arr.length; i++) { + if (index === i) { + // if(parseInt(value)===0&&parseInt(minchoices)===0){ + // arr[i].question.min_choices= parseInt(0); + // arr[i].question.max_choices = parseInt(0); + // }else if(parseInt(minchoices)===0){ + // arr[i].question.min_choices= parseInt(2); + // arr[i].question.max_choices = parseInt(value); + // } + // else if(parseInt(value)===0&&parseInt(minchoices)>0){ + // arr[i].question.min_choices= parseInt(minchoices); + // arr[i].question.max_choices = parseInt(value); + // } + // else { + // arr[i].question.min_choices= minchoices===null?2:minchoices===undefined?2:minchoices===0?2:parseInt(minchoices); + arr[i].question.max_choices = parseInt(value); + // } + } + } + // console.log(2119); + // console.log(arr); + this.setState({ + adddom: arr + }) + // console.log(this.state.adddom); + } + + //提交题目//没有就创建新的题库,新建问newz题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知 + submitQuestionnaire = () => { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification("请输入标题"); + return + } + if(this.state.poll_questions&&this.state.poll_questions.length===0){ + this.props.showNotification("至少创建1个题目"); + return; + } + + this.props.history.push(`/banks/poll/${this.props.match.params.workid}/${this.props.match.params.type}`); + // this.props.initPublic(undefined); + // console.log("调用了submitQuestionnaire") + // if (this.state.Newedit === true) { + // + // this.newword(); + // + // } else { + // if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + // this.props.showNotification("请输入标题"); + // return + // } + // + // if (this.state.polls_descriptiontest.length > 100) { + // + // } + // var pollid; + // if (this.state.pollid === undefined) { + // pollid = this.props.match.params.workid; + // } else { + // pollid = this.state.pollid; + // } + // + // // if(mews ==="new"){ + // if (this.state.poll_questions && this.state.poll_questions.length === 0) { + // this.props.showNotification("至少创建1个题目"); + // return; + // } + // // } + // + // var url = `/polls/${pollid}.json`; + // axios.put(url, { + // polls_name: this.state.polls_nametest, + // polls_description: this.state.polls_descriptiontest + // }).then((result) => { + // try { + // // console.log(JSON.stringify(result)) + // if (result.data.status === 0) { + // // console.log("更新题目成功") + // // this.props.showNotification("保存成功"); + // + // } + // } catch (e) { + // + // } + // }) + // } + } + + cancelmodel = () => { + + this.setState({ + Modalstype: false, + Modalstopval: "", + ModalsBottomval: "", + }) + + } + savedelete = (question_type, index, item) => { + // console.log("savedelete"); + this.handleClickByDelete(question_type, index, item); + this.setState({ + Modalstype: false, + Modalstopval: "", + ModalsBottomval: "", + }) + } + // 问题的类型,1单选题,2为多选题,3为主观题 + showDeleteConfirm = (question_type, index, item) => { + this.setState({ + Modalstype: true, + Modalstopval: "是否确认删除?", + ModalsBottomval: "", + ModalCancel: this.cancelmodel, + ModalSave: () => this.savedelete(question_type, index, item), + }) + + } + //必答选项 + OnCheckAllChange = (e, index) => { + // console.log("onCheckAllChange"); + // console.log(e.target.checked); + // console.log(e.target.value); + let arr = this.state.adddom; + for (var i = 0; i < arr.length; i++) { + if (index === i) { + if (e.target.checked === true) { + arr[i].question.is_necessary = 1; + + } else { + arr[i].question.is_necessary = 0; + } + } + } + this.setState({ + adddom: arr + }) + } + + //重新编辑标题和须知 + adddomeditit = () => { + if (this.state.mysave === true) { + this.setState({ + mysave: false, + readOnlys: "readOnly", + storagedesc: this.state.polls_nametest, + storagedesctwo: this.state.polls_descriptiontest, + }) + } else if (this.state.mysave === false) { + this.setState({ + mysave: true, + readOnlys: "", + storagedesc: this.state.polls_nametest, + storagedesctwo: this.state.polls_descriptiontest, + }) + } + } + //取消保存 + onSaveExercisetwo = () => { + if (this.state.mysave === true) { + this.setState({ + mysave: false, + Newedit: false, + readOnlys: "readOnly", + polls_nametest: this.state.storagedesc, + polls_descriptiontest: this.state.storagedesctwo, + }) + } else { + this.setState({ + mysave: false, + Newedit: false, + readOnlys: "readOnly", + polls_nametest: this.state.storagedesc, + polls_descriptiontest: this.state.storagedesctwo, + }) + } + } + // 创建问卷 + onSaveExercise = () => { + // if (this.state.Newedit === true) { + // + // if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + // this.props.showNotification(`请输入标题`); + // return + // } + // let coursesId = this.props.match.params.coursesId; + // const urlls = `/courses/${coursesId}/polls.json` + // axios.post(urlls, { + // polls_name: this.state.polls_nametest, + // polls_description: this.state.polls_descriptiontest + // }).then((result) => { + // if (result === undefined) { + // return; + // } + // this.state.Newedit === false; + // this.props.showNotification(`问卷创建成功!`); + // this.setState({ + // pollid: result.data.data.id, + // Newedit: false, + // mysave: false, + // readOnlys: "readOnly", + // cancellation: false, + // }); + // // var currenturl = window.location.href; + // // var newUrl = (currenturl.split("?"))[0]; + // // var newr=(newUrl.slice("new"))[0]; + // // console.log(newUrl); + // // console.log("2301"); + // // console.log(newr); + // // window.history.pushState('','',newUrl+'?tab='+e); + // // window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`; + // + // }) + // } else { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification("请输入标题"); + return + } + + var pollid; + if (this.state.pollid === undefined) { + pollid = this.props.match.params.workid; + } else { + pollid = this.state.pollid; + } + + + var url = `/exercise_banks/${pollid}.json`; + axios.put(url, { + exercise_name: this.state.polls_nametest, + exercise_description: this.state.polls_descriptiontest + }).then((result) => { + if (result !== undefined) { + this.props.showNotification(`问卷更新成功!`); + this.setState({ + mysave: false, + readOnlys: "readOnly", + }) + } + + }) + // } + + } + gotohome = () => { + // const { current_user} = this.props + if (this.state.first_category_url) { + window.location.href = this.state.first_category_url; + } else { + this.props.history.goBack(); + } + + // + // let courseId=this.props.match.params.coursesId; + // if(courseId===undefined){ + // this.props.history.push("/courses"); + // }else{ + // this.props.history.push(this.props.current_user.first_category_url); + // } + } + //试图 + toWorkDetail = () => { + // console.log(this.props); + // console.log("toWorkDetail"); + this.props.history.push(`/banks/poll/${this.props.match.params.workid}/${this.props.match.params.type}`); + // this.props.initPublic(undefined); + }; + //跳转道描点的地方 + // scrollToAnchor = (anchorName) => { + // if (anchorName) { + // // 找到锚点 + // let anchorElement = document.getElementById(anchorName); + // // 如果对应id的锚点存在,就跳转到锚点 + // if(anchorElement) { anchorElement.scrollIntoView(false); } + // } + // } + + scrollToAnchor=(index)=>{ + // let name="Anchor_"+index; + console.log("scrollToAnchor"); + console.log(index); + if (index) { + let anchorElement = document.getElementById(index); + // if(anchorElement) { anchorElement.scrollIntoView(); } + $("html").animate({ scrollTop: $(anchorElement).offset().top - 150}) + } + } + render() { + let { + addonAfter, + user_permission, + polls_status, + Modalstype, + mysave, + readOnlys, + newoption, + cancellation, + left_banner_id, + addonAftertwo + } = this.state + //获取老师权限 + // console.log("[`${maps[polls_status && polls_status]}`]]"); + // console.log(polls_status); + // console.log([[`${maps[polls_status && polls_status]}`]] + ""); + + // const {getFieldDecorator} = this.props.form; + const formItemLayout = { + labelCol: { + xs: {span: 24}, + // sm: { span: 8 }, + sm: {span: 24}, + }, + wrapperCol: { + xs: {span: 24}, + // sm: { span: 16 }, + sm: {span: 24}, + }, + }; + + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + + // console.log(this.state.projects===undefined?"":this.state.projects.poll_questions) + var displaymysave = (mysave === true) ? "" : "display:none;"; + return ( +
    + {/*提示*/} + {Modalstype && Modalstype === true ? : ""} +
    + {/*

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

    */} + {/*
    */} + {/*

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

    */} + {/*

    编辑

    */} + {/*{*/} + {/* this.props.match.params.news === "new" ?*/} + {/* 返回*/} + {/* :*/} + {/**/} + {/*}*/} + {/*
    */} + + {/**/} + { + this.state.mysave === false ? +
    + +
    + +
    + : "" + } + { + this.state.mysave === true ? +
    +
    + + +
    +
    *问卷标题 +
    + { + // this.props.match.params.news === undefined ? "" : this.props.match.params.news === "new" ? + // ( + this.state.mysave === false ? + + : "" + // ) + // :"" + } + +
    + {/*suffix={String(addonAfter)}*/} + + + +
    +
    + + +
    问卷须知
    + + + {/**/} + { + this.state.Newedit === true || this.state.mysave === true ? +
    + + {cancellation === false ? + + : ""} + +
    + : "" + } + +
    + +
    : "" + } + + +

    + + + { + this.state.mysingles + this.state.mydoubles + this.state.mymainsint === 0 ? "" : +

    + + {this.state.mysingles === 0 ? "" : 单选题{this.state.mysingles === undefined ? "" : this.state.mysingles} 题} + + {this.state.mydoubles === 0 ? "" : + 多选题{this.state.mydoubles === undefined ? "" : this.state.mydoubles}题} + {this.state.mymainsint === 0 ? "" : + + 主观题{this.state.mymainsint === undefined ? "" : this.state.mymainsint}题 + + } + + + 合计 {this.state.q_counts === undefined ? "" : this.state.q_counts} +
    + + } + +

    + + +
    + + {/*自动生成修改好的获取到的*/} + {/**************************************************************************/} + {this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => { + console.log('打印this.state.poll_questions'); + console.log(this.state.poll_questions); + console.log(this.state.adddom); + let resultDom; + resultDom =
    +

    + {index + 1}、 + {item.question.question_type === 1 ? "单选题" : item.question.question_type === 2 ? "多选题" : "主观题"} + {item.question.is_necessary === 1 ? "(必答)" : item.question.question_type === 2 ? "(选答)" : "(选答)"} + { + item.question.question_type === 2? + {(item.question.min_choices === undefined && item.question.max_choices === undefined ? "" : item.question.min_choices === null && item.question.max_choices === null ? "" : item.question.min_choices === 0 && item.question.max_choices === 0 ? "": item.question.min_choices === "null" && item.question.max_choices === "null" ? "" : item.question.min_choices === item.question.max_choices && item.question.max_choices === item.question.min_choices ? "可选"+(item.question.max_choices)+"项" : "可选" +(item.question.min_choices===undefined||item.question.min_choices===null||item.question.min_choices===""||item.question.min_choices==="null"?2:item.question.min_choices) + "-" + (item.question.max_choices===undefined||item.question.max_choices===null||item.question.max_choices===""||item.question.max_choices==="null"?item.question.answers.length:item.question.max_choices) + "项")} + : "" + } + + { + polls_status === undefined || polls_status === 1 ? + + this.showDeleteConfirm(item.question.question_type, index, item)}> + {index === 0 ? "" : + this.handleClickBySortUp(index, item)}>} + {index === this.state.poll_questions.length - 1 ? "" : + this.handleClickBySortDown(index, item)}>} + this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id,index)}> + this.adddomedit(item,index)}> + : this.adddomedit(item,index)}> + } + +

    +

    {item.question.question_title}

    + {/*
    {item.question.question_title}
    */} + {item.question.question_type === 1 ? +
    + + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { + return ( +
    + + {items.answer_text} + +
    + ) + })} +
    + {/*单选题*/} + + +
    + : item.question.question_type === 2 ? +
    + + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { + return ( +
    + + {items.answer_text} +
    + ) + })} +
    + {/*多选题*/} +
    + + : item.question.question_type === 3 ? + // 主观题 + (
    + +
    ) : (
    )} +
    + + return ( +
    + {/*这里是编辑和新增的地方*/} + { + this.state.bindingid && this.state.bindingid === item.question.id ? + (this.state.Newdisplay === false ? +
    +
    + {this.state.adddom === undefined ? "" : this.state.adddom === undefined ? "" : this.state.adddom.length === 0 ? "" : item.question.id === this.state.adddom[0].question.id && this.state.adddom.map((itemo, indexo) => { + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {/*{itemo&&itemo.question&&itemo.question.question_number}、*/} + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.OnCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + + + { + itemo.question.question_type === 3 ? + + : + + + } + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + this.Deleteentrys(arrid, indext, true)}> + + : ""} +

    ) : (

    + 选项 + + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + // (itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? + // (indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // : + // "" + // ) + // "" + // : + itemo.question.answers.length > 2 &&indext>=1? + + { + indext > 1 ? + this.Deleteentrys(arrid, indext, false)}> + :"" + } + { + itemo.question.answers[itemo.question.answers.length - 1].answer_text === "其他" && itemo.question.answers.length - 2 === indext ? + + this.Ewoption(itemo.question.id, itemo)}> + : itemo.question.answers.length - 1 === indext ? + this.Ewoption(itemo.question.id, itemo)}> + : + } + + :itemo.question.answers.length === 2? + (indext ===1? + this.Ewoption(itemo.question.id, itemo)}> + :"") + // : "") + : "":""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    + {/* this.Ewoption(itemo.question.id, itemo)}>新增选项*/} +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + "" + : ""} + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)}>保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}>保存并退出 + +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} +
    + 可选 +
    + {/*可选最小1*/} + + + ~ + {/*可选最大1*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)}>保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}>保存并退出 + +
    + +
    +
    +
    + ) + + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + // ( + // this.state.polls_status === undefined || this.state.polls_status === 1 ? + //
    + // + // {/*
    this.Ewoption(itemo.question.id, itemo)}>新增选项*/} + // + // {/* {*/} + // {/* this.state.newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : ""*/} + // {/* }*/} + // + // {/*
    */} + // + // + // + // this.Deleteadddom(indexo,true)}>取消 + // this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + // this.Deleteadddomthree(indexo, itemo,true)}>保存并退出 + // + //
    + // + // + // : + //
    + // + // this.Deleteadddom(indexo,true)}>取消 + // this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + // this.Deleteadddomthree(indexo, itemo,true)}> 保存并退出 + // + //
    + // ) + "" + : itemo.question.question_type === 3 ? +
    + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)}>保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}>保存并退出 + +
    + : + ""} + + +
    +
    + + + return ( +
    + {resultDomtwo} +
    + ) + })} +
    +
    : "") + : + // 编辑 +
    + {resultDom} + {this.state.Newdisplay === false ? + +
    + {this.state.adddom === undefined ? "" : this.state.adddom === undefined ? "" : this.state.adddom.length === 0 ? "" : item.question.id === this.state.adddom[0].question.id && this.state.adddom.map((itemo, indexo) => { + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {/*{itemo&&itemo.question&&itemo.question.question_number}、*/} + + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.OnCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + + { + itemo.question.question_type === 3 ? + + : + + + } + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + // console.log("chishiyong1"); + // console.log(itemo.question.answers[itemo.question.answers.length - 1]); + // var bools=true; + // if(){ + // + // } + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + this.Deleteentrys(arrid, indext, true)}> + + : ""} +

    ) : (

    + 选项 + + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + // ( itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? + // (indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // :"") + itemo.question.answers.length > 2 && indext>=1 ? + + { + indext > 1 ? + this.Deleteentrys(arrid, indext, false)}> + :"" + } + { + itemo.question.answers[itemo.question.answers.length - 1].answer_text === "其他" && itemo.question.answers.length - 2 === indext ? + this.Ewoption(itemo.question.id, itemo)}> + : itemo.question.answers.length - 1 === indext ? + this.Ewoption(itemo.question.id, itemo)}> + : + + } + + :itemo.question.answers.length === 2 && indext ===1 ? + (indext ===1? + this.Ewoption(itemo.question.id, itemo)}> + :"") + // : "") + : "":""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    + {/* this.Ewoption(itemo.question.id, itemo)}>新增选项*/} +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + "" + : ""} + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)}>保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}>保存并退出 + +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} +
    + 可选 +
    + {/*可选最小2*/} + + + ~ + {/*可选最大2*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)} + >保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}>保存并退出 + +
    + +
    +
    +
    + ) + + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + // ( + // this.state.polls_status === undefined || this.state.polls_status === 1 ? + //
    + // + //
    this.Ewoption(itemo.question.id, itemo)}>新增选项 + // + // { + // this.state.newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : "" + // } + // + //
    + // + // + // + // this.Deleteadddom(indexo,true)}>取消 + // this.Deleteadddomtwo(indexo, itemo,true)} + // >保存并继续 + // this.Deleteadddomthree(indexo, itemo,true)}>保存并退出 + // + //
    + // + // + // : + //
    + // + // this.Deleteadddom(indexo,true)}>取消 + // this.Deleteadddomtwo(indexo, itemo,true)} + // >保存并继续 + // this.Deleteadddomthree(indexo, itemo,true)}> 保存并退出 + // + //
    + // ) + "" + + : itemo.question.question_type === 3 ? +
    + + this.Deleteadddom(indexo, true)}>取消 + this.Deleteadddomtwo(indexo, itemo, true)} + >保存并继续 + this.Deleteadddomthree(indexo, itemo, true)}> 保存并退出 + +
    + : + ""} + + +
    +
    + + + return ( +
    + {resultDomtwo} +
    + ) + })} +
    : ""} +
    + } +
    + + ) + })} + + + {/*新建单选多选2*/} +
    + { + this.state.Newdisplay === true ? +
    + {this.state.adddom === undefined ? "": this.state.adddom.map((itemo, indexo) => { + // console.log('打印this.state.adddom') + // console.log(this.state.adddom); + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {/*{itemo&&itemo.question&&itemo.question.question_number}、*/} + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.OnCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + + { + itemo.question.question_type === 3 ? + + : + + } + + + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + console.log("ceshiyong2"); + console.log(itemo.question.answers.length - 1); + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + + {polls_status === undefined || polls_status === 1 ? + + this.Deleteentrys(arrid, indext, true)}> + + : ""} +

    ) : (

    + 选项 + + + {polls_status === undefined || polls_status === 1 ? + // (itemo.question.question_type === 2&& itemo.question.answers.length === 3 ? + // (itemo.question.answers[itemo.question.answers.length-1].answer_text === "其他" &&indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // :itemo.question.answers[itemo.question.answers.length-1].answer_text === "选项" &&indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // :"") + // : + itemo.question.answers.length > 2 && indext>=1 ? + + { + indext>1? + this.Deleteentrys(arrid, indext, false)}> + :"" + } + + { + + itemo.question.answers[itemo.question.answers.length - 1].answer_text === "其他" && itemo.question.answers.length - 2 === indext ? + this.Ewoption(itemo.question.id, itemo)}> + : + itemo.question.answers.length - 1 === indext ? + this.Ewoption(itemo.question.id, itemo)}> + : + + + } + + : itemo.question.answers.length === 2? + (indext ===1? + this.Ewoption(itemo.question.id, itemo)}> + :"") + : "":""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    + {/* this.Ewoption(itemo.question.id, itemo)}>新增选项*/} +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + "" + : ""} + {this.state.polls_status === undefined ||this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} + + this.Deleteadddom(indexo)}>取消 + this.Deleteadddomtwo(indexo, itemo)} + > 保存并继续 + this.Deleteadddomthree(indexo, itemo)}>保存并退出 + +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + : "") + : ""} +
    + 可选 +
    + {/*可选最小3*/} + + + ~ + {/*可选最大3*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) + + this.Deleteadddom(indexo)}>取消 + this.Deleteadddomtwo(indexo, itemo)} + >保存并继续 + this.Deleteadddomthree(indexo, itemo)}> 保存并退出 + +
    + +
    +
    +
    + ) + + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + // ( + // polls_status === undefined || polls_status === 1 ? + //
    + // + //
    this.Ewoption(itemo.question.id, itemo)}>新增选项 + // + // { + // newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : "" + // } + // + //
    + // + // + // + // this.Deleteadddom(indexo)}>取消 + // this.Deleteadddomtwo(indexo, itemo)} + // >保存并继续 + // this.Deleteadddomthree(indexo, itemo)}> 保存并退出 + // + //
    + // + // + // : + //
    + // + // this.Deleteadddom(indexo)}>取消 + // this.Deleteadddomtwo(indexo, itemo)} + // > 保存并继续 + // this.Deleteadddomthree(indexo, itemo)}>保存并退出 + // + //
    + // ) + "" + : itemo.question.question_type === 3 ? +
    + + this.Deleteadddom(indexo)}>取消 + this.Deleteadddomtwo(indexo, itemo)} + >保存并继续 + this.Deleteadddomthree(indexo, itemo)}>保存并退出 + +
    + : + ""} + + +
    +
    + + + return ( +
    + {resultDomtwo} +
    + ) + })} +
    + : + "" + } + {polls_status === undefined || polls_status === 1 ? +
    +
    + this.addmysingles()}>单选题 + this.addmydoubles()}>多选题 + this.addmymainsint()}>主观题 +
    +
    + :
    } +
    +
    + + {/**/} +
    +
    +
    + ) + } + +} + +// RouteHOC() +export default PollNewQuestbank +{/*
    */ +} +{/* {*/ +} +{/* this.props.match.params.news === "new" ?*/ +} +{/* this.state.Newedit === false ?*/ +} +{/*
    */ +} +{/*
    */ +} + +{/*
    */ +} +{/* this.addmysingles()}>单选题*/ +} +{/* this.addmydoubles()}>多选题*/ +} +{/* this.addmymainsint()}>主观题*/ +} +{/*
    */ +} +{/*
    */ +} +{/* : ""*/ +} +{/* :*/ +} +{/*
    */ +} +{/*
    */ +} +{/*
    */ +} +{/* this.addmysingles()}>单选题*/ +} +{/* this.addmydoubles()}>多选题*/ +} +{/* this.addmymainsint()}>主观题*/ +} +{/*
    */ +} +{/*
    */ +} +{/* }*/ +} +{/*
    */ +} +{/*{*/ +} +{/* this.props.match.params.news === "new" ?*/ +} +{/* (this.state.Newedit === false ?*/ +} +{/* */ +} +{/*
  • */ +} +{/* this.props.history.goBack()}>取消*/ +} +{/* this.submitQuestionnaire(this.props.match.params.news)}>提交*/ +} +{/*
  • */ +} + + +{/*
    */ +} + +{/* : "")*/ +} +{/* :*/ +} +{/* */ +} +{/*}*/ +} \ No newline at end of file diff --git a/public/react/src/modules/courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css index a486101cd..19f1b35cd 100644 --- a/public/react/src/modules/courses/poll/pollStyle.css +++ b/public/react/src/modules/courses/poll/pollStyle.css @@ -17,7 +17,22 @@ min-height: 40px; min-line-height: 40px; } - +.ml61{ + margin-left: 61px; +} +.w64{ + width: 64px; +} +.w55{ + width: 55px!important; +} +.max1010{ + width: 1010px !important; + max-width: 1010px !important; +} +.yw18{ + min-width: 18px; +} /* 选答 */ .chooseAnswer{ display: inline-block; @@ -185,7 +200,7 @@ width: 100%; } .answerList li:hover{ - background: #F8F8F8; + background: #F0F8FF; } textarea:read-only{ background: #f3f3f3; diff --git a/public/react/src/modules/courses/questionbank/Generaljobanswer.js b/public/react/src/modules/courses/questionbank/Generaljobanswer.js index 3bfc6cd36..278cdd691 100644 --- a/public/react/src/modules/courses/questionbank/Generaljobanswer.js +++ b/public/react/src/modules/courses/questionbank/Generaljobanswer.js @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { WordsBtn,on, off, trigger,MarkdownToHtml,getImageUrl} from 'educoder'; import { Button, Checkbox, @@ -12,6 +12,8 @@ import { } from "antd"; import GroupPackage from '../groupjobbank/GroupPackage' import './questionbank.css'; +import AttachmentsList from '../../../common/components/attachment/AttachmentList'; +import NoneData from '../../courses/coursesPublic/NoneData' class Generaljobanswer extends Component { @@ -28,7 +30,7 @@ class Generaljobanswer extends Component { console.log("componentDidMount"); // let query = this.props.location.pathname; // const type = query.split('/'); - // this.setState({ + // this.setState({n // shixuntypes:type[3] // }) // this.props.triggerRef(this); @@ -55,18 +57,77 @@ class Generaljobanswer extends Component { render() { - + let{datas}=this.props; + console.log("Generaljobanswer"); + console.log(datas.reference_attachments); + console.log(datas.reference_answer); return ( -
    +
    - -
    - - + {/*{*/} + {/* datas&&(datas.reference_answer===null?*/} + {/* */} + {/* :datas.reference_answer==="null"?*/} + {/* */} + {/* :*/} + {/* datas.reference_answer===""?*/} + {/* */} + {/* :*/} + {/* */} + + {/* //
    */} + {/* )*/} + {/*}*/} + {/*/!*
    *!/*/} + {/*
    */} + {/*{datas.reference_attachments === undefined ? "" :*/} + {/* }*/} + {/*
    */} + + { + datas.reference_answer===null? + "" + :datas.reference_answer==="null"? + "" : + datas.reference_answer===""? + "" + : + + + } + + {datas.reference_attachments === undefined ? + (datas.reference_answer===undefined || datas.reference_answer===undefined|| datas.reference_answer===""? + + : + "" + ) + : + datas.reference_attachments === "" ? + (datas.reference_answer===undefined || datas.reference_answer===undefined|| datas.reference_answer===""? + + : + "" + ) + : + datas.reference_attachments === null ? + (datas.reference_answer===undefined || datas.reference_answer===undefined|| datas.reference_answer===""? + + : + "" + ) + : + datas.reference_attachments.length === 0 ? + (datas.reference_answer===undefined || datas.reference_answer===undefined|| datas.reference_answer===""? + + : + "" + ) + : +
    + +
    + }
    diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js index 29453a7b5..7aef5f743 100644 --- a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js +++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js @@ -1,20 +1,26 @@ import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; +import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom'; +import {WordsBtn, ActionBtn,getImageUrl} from 'educoder'; import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Generaljobdetails from './Generaljobdetails'; -import Generaljobanswer from './Generaljobanswer'; +import BanksMenu from '../../user/usersInfo/banks/banksMenu' +import Loadable from 'react-loadable'; +import Loading from '../../../Loading'; import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import '../css/busyWork.css'; import '../poll/pollStyle.css'; - +// 问卷内容 +const Generaljobdetails = Loadable({ + loader: () => import('./Generaljobdetails'), + loading: Loading, +}) +// 试卷详情 +const Generaljobanswer = Loadable({ + loader: () => import('./Generaljobanswer'), + loading: Loading, +}); class Generaljobbankdetails extends Component { //普通作业内容详情 constructor(props) { @@ -25,50 +31,24 @@ class Generaljobbankdetails extends Component { workid:1, isSpin:false, datas:[], + visible:false, + banksMenu:undefined } - - } - - //切换tab - ChangeTab = (e) => { - // console.log(e); - this.setState({ - tab: e - }) - try { - var currenturl = window.location.href; - var newUrl = (currenturl.split("?"))[0]; - window.history.pushState('','',newUrl+'?tab='+e); - }catch (e) { - console.log(e); - console.log("44"); - } - } - componentDidMount() { - // console.log("父组件加载框"); - const query = this.props.location.search; - const type = query.split('?tab='); - // let sum = [] - // sum.push(type[1]) - // console.log("componentDidMountcomponentDidMount"); - // console.log(type); - this.setState({ - tab: type[1], - }); + this.getonedata(); + } - console.log("Generaljobbankdetails"); - console.log(this.props); + getonedata=()=>{ if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, }) } this.getdata(this.props.match.params.workid); - } + }; //获取数据的地方 getdata=(workid)=>{ var workids= workid; @@ -86,8 +66,37 @@ class Generaljobbankdetails extends Component { if(response){ if(response.data){ this.setState({ - datas:response.data.informs, + datas:response.data, }) + try { + const crumbData={ + title:response && response.data && response.data.name, + is_public:response && response.data && response.data.is_public, + crumbArray:[ + {content:'详情'} + ] + }; + const menuData={ + tab:'0',//tab选中的index + menuArray:[//tab以及tab路由 + {to:`/banks/normal/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'}, + {to:`/banks/normal/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'} + ], + category:'normal',//毕设选题 + tos:`/banks/normal/${workids}/edit/${this.props.match.params.type}?tab=0`, + id:workids, + is_public:response && response.data && response.data.is_public, + type:this.props.match.params.type, + authorize:response && response.data && response.data.authorize, + + } + this.setState({ + banksMenu:menuData + }) + this.props.initPublic(crumbData,response.data); + }catch (e) { + + } }else { this.setState({ datas:[], @@ -111,63 +120,51 @@ class Generaljobbankdetails extends Component { isSpin:false, }) }); - } - - - bindRef = ref => { this.child = ref } -///////////////教师截止 + }; + // initPublic = (crumbData,menuData) =>{ + // this.setState({ + // banksMenu:menuData + // }) + // this.props.initPublic(crumbData); + // } render() { - let {tab} = this.state; - - const isAdmin = this.props.isAdmin(); - // console.log(119) + let {tab,datas,visible} = this.state; + let{ + banksMenu + }=this.state return ( -
    - - -
    - -
    -

    - 题库 - > - 详情 -

    -
    -
    -

    - MySQL数据库编程开发实训(基础篇) -

    - + +
    + { + banksMenu && + + } + + { + return () + } + }> + { + return () + } + }> + +
    - - - - {parseInt(tab) === 0 ? :""} - {parseInt(tab) === 1 ? :""} - -
    -
    + ) } } export default Generaljobbankdetails; - diff --git a/public/react/src/modules/courses/questionbank/Generaljobdetails.js b/public/react/src/modules/courses/questionbank/Generaljobdetails.js index 9de444123..4b916c446 100644 --- a/public/react/src/modules/courses/questionbank/Generaljobdetails.js +++ b/public/react/src/modules/courses/questionbank/Generaljobdetails.js @@ -1,5 +1,6 @@ + import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { WordsBtn,on, off, trigger,markdownToHTML, MarkdownToHtml ,getImageUrl} from 'educoder'; import { Button, Checkbox, @@ -12,15 +13,15 @@ import { } from "antd"; import GroupPackage from '../groupjobbank/GroupPackage' import './questionbank.css'; - - +import AttachmentsList from "../../../common/components/attachment/AttachmentList"; +import NoneData from '../../courses/coursesPublic/NoneData' +//内容详情 class Generaljobdetails extends Component { constructor(props) { super(props); this.state = { - } } @@ -56,21 +57,56 @@ class Generaljobdetails extends Component { render() { - + let{datas}=this.props; return ( -
    +
    - -
    - - + { + datas.description===null? + "" + :datas.description==="null"? + "" + :datas&&datas.description===""? + "" + : + + //
    + } + {datas.attachments === undefined ? + (datas.description === undefined || datas.description === undefined || datas.description === "" ? + + : + "" + ) + : + datas.attachments=== "" ? + (datas.description === undefined || datas.description === undefined || datas.description === "" ? + + : + "" + ) + : + datas.attachments=== null ? + (datas.description === undefined || datas.description === undefined || datas.description === "" ? + + : + "" + ) + : + datas.attachments.length === 0 ? + (datas.description === undefined || datas.description === undefined || datas.description === "" ? + + : + "" + ) + : +
    + +
    + }
    -
    diff --git a/public/react/src/modules/courses/questionbank/questionbank.css b/public/react/src/modules/courses/questionbank/questionbank.css index 43dcfa9c6..ce7aa7ddf 100644 --- a/public/react/src/modules/courses/questionbank/questionbank.css +++ b/public/react/src/modules/courses/questionbank/questionbank.css @@ -2,10 +2,10 @@ padding-top: 30px !important; padding-right: 30px !important; padding-left: 30px !important; + min-height: 500px !important; } .yslquesHeigth{ - min-height: 500px !important; - + width: 100% !important; } .yslquesmarkdowntext{ font-size: 16px; @@ -23,4 +23,11 @@ .ysltextcolor99999{ color: #999999; font-size: 16px; +} +.mt16px{ + margin-top: 16px; + padding-bottom: 30px; +} +.pd30{ + padding-bottom: 30px; } \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 7fef99111..2253cc1f3 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -67,7 +67,7 @@ class Listofworksstudentone extends Component { pages: 1, limit: 20, loadingstate: true, - order: "update_time", + order: "", search: null, day: 0, hour: 0, @@ -131,30 +131,30 @@ class Listofworksstudentone extends Component { {record.name === undefined ? -- : record.name === "" ? -- : record.name === null ? -- : record.name === "--" ? -- : {record.name} } @@ -167,25 +167,24 @@ class Listofworksstudentone extends Component { key: 'stduynumber', align: "center", className:'font-14 maxnamewidth110', - width:'110px', render: (text, record) => ( {record.stduynumber === undefined ? -- : record.stduynumber === null ? -- : record.stduynumber === "" ? -- : @@ -194,7 +193,7 @@ class Listofworksstudentone extends Component { className="maxnamewidth110" style={{ "color": '#9A9A9A', - "text-align": "center" + textAlign: "center" }}>{ record.stduynumber } @@ -215,7 +214,7 @@ class Listofworksstudentone extends Component { {record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom} ), @@ -230,10 +229,10 @@ class Listofworksstudentone extends Component { {record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} @@ -248,29 +247,43 @@ class Listofworksstudentone extends Component { render: (text, record) => ( {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - + }> + {record.cost_time === null? "--":record.cost_time === undefined?"--":record.cost_time === "--"?"--": + + 学员在EduCoder做实训花费的时间 +
    }> + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} + + + } + ) }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: "center", - className:'font-14', - render: (text, record) => ( - - {record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime} - - ), - }, + // { + // title: '更新时间', + // dataIndex: 'updatetime', + // key: 'updatetime', + // align: "center", + // className:'font-14', + // render: (text, record) => ( + // + // {record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime} + // + // ), + // }, { title: '完成情况', dataIndex: 'completion', @@ -279,7 +292,7 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( - {record.completion+"/"+this.state.challenges_count} + {record.completion+"/"+this.state.challenges_count} ), }, @@ -292,14 +305,14 @@ class Listofworksstudentone extends Component { render: (text, record) => ( = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" + color: '#FF6800', + textAlign: "center" + } : parseInt(record.levelscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : { + color: '#747A7F', + textAlign: "center" }}>{record.levelscore} ) @@ -320,15 +333,15 @@ class Listofworksstudentone extends Component { ) : = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + color: '#DD1717', + textAlign: "center" + } : {color: '#747A7F', textAlign: "center"}}>{record.efficiencyscore} } @@ -344,15 +357,15 @@ class Listofworksstudentone extends Component { { record.levelscore && record.levelscore === "--"? - {record.levelscore} + {record.levelscore} : =90 ? { - "color": '#DD1717', - "text-align": "center" + color: '#DD1717', + textAlign: "center" } : parseInt(record.levelscore) <= 60?{ - "color": '#FF6800', - "text-align": "center", - }: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore} + color: '#FF6800', + textAlign: "center", + }: {color: '#747A7F', textAlign: "center"}}>{record.levelscore} } @@ -379,7 +392,7 @@ class Listofworksstudentone extends Component { }, ], - orders: "update_time", + orders: "", b_order:"desc", allow_late:false, checkedValuesine: undefined, @@ -395,8 +408,8 @@ class Listofworksstudentone extends Component { course_group: null, publish_immediately: undefined, end_immediately: undefined, - mystyle: {"display": "block", "color": '#07111B', "text-align": "center"}, - mystyles: {"display": "none", "color": '#07111B', "text-align": "center"}, + mystyle: {"display": "block", "color": '#07111B', textAlign: "center"}, + mystyles: {"display": "none", "color": '#07111B', textAlign: "center"}, mystyle1: {"display": "block"}, mystyles1: {"display": "none"}, unlimited: 0, @@ -413,7 +426,7 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.number} + {record.number} ) }, @@ -425,7 +438,7 @@ class Listofworksstudentone extends Component { className:'font-14 maxnamewidth100', width:'100px', render: (text, record) => ( - {record.name} + {record.name} ) }, { @@ -434,25 +447,24 @@ class Listofworksstudentone extends Component { key: 'stduynumber', align: "center", className:'font-14 maxnamewidth110', - width:'110px', render: (text, record) => ( {record.stduynumber === undefined ? -- : record.stduynumber === null ? -- : record.stduynumber === "" ? -- : @@ -460,8 +472,8 @@ class Listofworksstudentone extends Component { title={record.stduynumber} className="maxnamewidth110" style={{ - "color": '#9A9A9A', - "text-align": "center" + color: '#9A9A9A', + textAlign: "center" }}>{ record.stduynumber } @@ -480,7 +492,7 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( - {record.classroom === undefined ? -- : record.classroom === "" ? --: record.classroom === null ? -- : {record.classroom}} + {record.classroom === undefined ? -- : record.classroom === "" ? --: record.classroom === null ? -- : {record.classroom}} ) }, @@ -492,11 +504,11 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( {record.submitstate} ) @@ -511,24 +523,47 @@ class Listofworksstudentone extends Component { render: (text, record) => ( {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - + }> + {record.cost_time === null? "--":record.cost_time === undefined?"--":record.cost_time === "--"?"--": + + 学员在EduCoder做实训花费的时间 +
    }> + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} + + + } + + // {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } + // ) }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, + // { + // title: '更新时间', + // dataIndex: 'updatetime', + // key: 'updatetime', + // align: 'center', + // className:'font-14', + // render: (text, record) => ( + // {record.updatetime} + // ), + // }, { title: '完成情况', dataIndex: 'completion', @@ -728,7 +763,6 @@ class Listofworksstudentone extends Component { key: 'stduynumber', align: "center", className:'font-14 maxnamewidth110', - width:'110px', render: (text, record) => ( {record.stduynumber === undefined ? @@ -754,8 +788,8 @@ class Listofworksstudentone extends Component { title={record.stduynumber} className="maxnamewidth110" style={{ - "color": '#9A9A9A', - "text-align": "center" + color: '#9A9A9A', + textAlign: "center" }}>{ record.stduynumber } @@ -774,7 +808,7 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( - {record.classroom === undefined ? -- : record.classroom === "" ? --: record.classroom === null ? -- : {record.classroom}} + {record.classroom === undefined ? -- : record.classroom === "" ? --: record.classroom === null ? -- : {record.classroom}} ) }, @@ -786,26 +820,26 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( {record.submitstate} ) }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, + // { + // title: '更新时间', + // dataIndex: 'updatetime', + // key: 'updatetime', + // align: 'center', + // className:'font-14', + // render: (text, record) => ( + // {record.updatetime} + // ), + // }, { title: '实战耗时', dataIndex: 'cost_time', @@ -815,13 +849,26 @@ class Listofworksstudentone extends Component { render: (text, record) => ( {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - + }> + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time === "--" ?"--": + + 学员在EduCoder做实训花费的时间 +
    }> + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} + + + } + ) - }, { title: '完成情况', @@ -835,7 +882,7 @@ class Listofworksstudentone extends Component {
    已通过{record.completion}关,共{this.state.challenges_count}关
    }> - {record.completion+"/"+this.state.challenges_count} + {record.completion+"/"+this.state.challenges_count} @@ -850,14 +897,14 @@ class Listofworksstudentone extends Component { render: (text, record) => ( = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" + color: '#FF6800', + textAlign: "center" + } : parseInt(record.levelscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : { + color: '#747A7F', + textAlign: "center" }}>{record.levelscore} ) @@ -896,15 +943,15 @@ class Listofworksstudentone extends Component { ) : = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + color: '#DD1717', + textAlign: "center" + } : {color: '#747A7F',textAlign: "center"}}>{record.efficiencyscore} } @@ -928,19 +975,19 @@ class Listofworksstudentone extends Component { record.finalscore&&record.finalscore==="--"? {record.finalscore} : = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" + color: '#FF6800', + textAlign: "center" + } : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : { + color: '#747A7F', + textAlign: "center" }}>{record.finalscore} } @@ -956,19 +1003,19 @@ class Listofworksstudentone extends Component { record.finalscore&&record.finalscore==="--"? {record.finalscore} : = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" + color: '#FF6800', + textAlign: "center" + } : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : { + color: '#747A7F', + textAlign: "center" }}>{record.finalscore} } @@ -1656,9 +1703,9 @@ class Listofworksstudentone extends Component { var homeworkid = this.props.match.params.homeworkid; let urll = `/homework_commons/${homeworkid}/works_list.json?`; var order = "asc"; - if (ordervlue === "update_time") { - order = "desc"; - } + // if (ordervlue === "update_time") { + // order = "desc"; + // } var checkedValuesines = checkedValuesine; var checkedValuesineinfos = checkedValuesineinfo; var searchtexts = searchtext @@ -2065,15 +2112,15 @@ class Listofworksstudentone extends Component { } //排序 funordert = (e) => { - if (e === "update_time") { - // 时间 - // 时间排序是从小到大 - this.setState({ - orders: "update_time", - loadingstate: true, - }) - this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); - } + // if (e === "update_time") { + // // 时间 + // // 时间排序是从小到大 + // this.setState({ + // orders: "update_time", + // loadingstate: true, + // }) + // this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); + // } if (e === "work_score") { // 成绩 @@ -2473,8 +2520,9 @@ class Listofworksstudentone extends Component { }) } }else { - this.props.showNotification(`正在下载中`); - window.open("/api"+url, '_blank'); + // this.props.showNotification(`正在下载中`); + // window.open("/api"+url, '_blank'); + this.props.slowDownload(url); } }).catch((error) => { console.log(error) @@ -2504,6 +2552,15 @@ class Listofworksstudentone extends Component { // console.log(this.props.isAdmin()); let course_is_end = this.props.current_user&&this.props.current_user.course_is_end; + // if(this.props.isAdmin() === false){ + // if(teacherdata.student_works!==undefined){ + // if(teacherdata.student_works.length>0){ + // + // + // } + // } + // + // } return ( this.props.isAdmin() === true ? ( @@ -2753,10 +2810,10 @@ class Listofworksstudentone extends Component {
    • - {orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序 + {orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序 @@ -3035,6 +3092,7 @@ class Listofworksstudentone extends Component { : // 学生能查看别人的
      + {/*双层*/}

      - + {/* {discussMessage.author.name} */} { discussMessage.author && {discussMessage.author} } {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} @@ -357,6 +357,15 @@ class ShixunhomeWorkItem extends Component{ : {discussMessage.status_time} } + { + discussMessage && discussMessage.upper_category_name && + 22 }> + { {discussMessage.upper_category_name}} + + } + + + {/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 } { discussMessage.praise_num != 0 && {discussMessage.praise_num} 点赞 } @@ -378,7 +387,7 @@ class ShixunhomeWorkItem extends Component{ ` } - {this.props.isAdmin?

      this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}> + {this.props.isAdmin?
      this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"46px","display":"block"}}> 实训详情 {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名:""} {/* 设置*/} diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index bd90db42f..bee373bd9 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -862,19 +862,19 @@ class Trainingjobsetting extends Component { var exams = parseFloat(Proportion.toFixed(1)); var intk = srorelength*exams; intkk=oushution - intk; - console.log("奇数"); - console.log(srorelength);//3 - console.log(oushution);//79 - console.log(exams);//26.3 - console.log(intk);//78.9 - console.log(intkk); + // console.log("奇数"); + // console.log(srorelength);//3 + // console.log(oushution);//79 + // console.log(exams);//26.3 + // console.log(intk);//78.9 + // console.log(intkk); }else { // 偶数 var examsy =parseFloat(Proportion.toFixed(1)); intkks=oushution - (examsy*srorelength); - console.log("偶数"); - console.log(oushution); - console.log((examsy*srorelength)); + // console.log("偶数"); + // console.log(oushution); + // console.log((examsy*srorelength)); } var mact=0; diff --git a/public/react/src/modules/courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css index f2b0c39ed..c2affa32c 100644 --- a/public/react/src/modules/courses/shixunHomework/style.css +++ b/public/react/src/modules/courses/shixunHomework/style.css @@ -38,14 +38,14 @@ .TopicDetailTable .bottomBody li:last-child{border-bottom: none;} .maxnamewidth100{ - max-width: 100px; + max-width: 145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor: default; } .maxnamewidth110{ - max-width: 110px; + max-width: 145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; diff --git a/public/react/src/modules/help/AboutUs.js b/public/react/src/modules/help/AboutUs.js new file mode 100644 index 000000000..06198418c --- /dev/null +++ b/public/react/src/modules/help/AboutUs.js @@ -0,0 +1,54 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Card } from "antd"; +import axios from 'axios'; + +import { MarkdownToHtml } from 'educoder'; + +class AboutUs extends React.Component { + constructor (props) { + super(props); + + this.state = { + loading: true, + content: null + } + } + + componentDidMount(){ + window.document.title = "关于我们"; + this.getContent(); + } + + getContent(){ + axios.get("/helps/about.json").then((result) => { + if(result){ + this.setState({ + content: result.data.content, + loading: false + }) + } + }).catch((error) => { + console.log(error); + this.setState({ loading: false }); + }) + } + + render() { + let { loading, content } = this.state; + + return ( +
      +
      + +
      + { content && } +
      +
      +
      +
      + ) + } +} + +export default AboutUs; \ No newline at end of file diff --git a/public/react/src/modules/help/Agreement.js b/public/react/src/modules/help/Agreement.js new file mode 100644 index 000000000..4e483b719 --- /dev/null +++ b/public/react/src/modules/help/Agreement.js @@ -0,0 +1,54 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Card } from "antd"; +import axios from 'axios'; + +import { MarkdownToHtml } from 'educoder'; + +class Agreement extends React.Component { + constructor (props) { + super(props); + + this.state = { + loading: true, + content: null + } + } + + componentDidMount(){ + window.document.title = "服务协议"; + this.getContent(); + } + + getContent(){ + axios.get("/helps/agreement.json").then((result) => { + if(result){ + this.setState({ + content: result.data.content, + loading: false + }) + } + }).catch((error) => { + console.log(error); + this.setState({ loading: false }); + }) + } + + render() { + let { loading, content } = this.state; + + return ( +
      +
      + +
      + { content && } +
      +
      +
      +
      + ) + } +} + +export default Agreement; \ No newline at end of file diff --git a/public/react/src/modules/help/ContactUs.css b/public/react/src/modules/help/ContactUs.css new file mode 100644 index 000000000..e516196e6 --- /dev/null +++ b/public/react/src/modules/help/ContactUs.css @@ -0,0 +1,24 @@ +.contact-us-container { + +} +.contact-us-container .contact-item { + padding: 20px 15px; + border-bottom: 1px solid #EEEEEE; +} +.contact-us-container .contact-item:first-child { + padding-top: 0; +} +.contact-us-container .contact-item:last-child { + border-bottom: unset; +} + +.contact-us-container .contact-item-label { + font-size: 16px; + padding-bottom: 10px; +} +.contact-us-container .contact-item-content { + margin-left: 10px; +} +.contact-us-container .contact-item-content .ant-row { + margin-top: 10px; +} \ No newline at end of file diff --git a/public/react/src/modules/help/ContactUs.js b/public/react/src/modules/help/ContactUs.js new file mode 100644 index 000000000..04e3404fe --- /dev/null +++ b/public/react/src/modules/help/ContactUs.js @@ -0,0 +1,89 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Card, Row, Col } from "antd"; +import axios from 'axios'; + +import './ContactUs.css'; + +class ContactUs extends React.Component { + constructor (props) { + super(props); + + this.state = { + loading: true, + contacts: null, + address: null + } + } + + componentDidMount(){ + window.document.title = "联系我们"; + this.getData(); + } + + getData(){ + axios.get("/helps/contact.json").then((result) => { + if(result){ + this.setState({ + contacts: result.data.contacts, + address: result.data.address, + loading: false + }) + } + }).catch((error) => { + console.log(error); + this.setState({ loading: false }); + }) + } + + render() { + let { loading, contacts, address } = this.state; + + return ( +
      +
      + +
      + { + contacts && contacts.map((item, _key) => { + return ( +
      +
      { item.type }
      +
      + + { item.name } + + + QQ: + { item.qq } + + + Email: + { item.mail } + +
      +
      + ) + }) + } + { + address && ( +
      +
      公司地址
      +
      + + { address } + +
      +
      + ) + } +
      +
      +
      +
      + ) + } +} + +export default ContactUs; \ No newline at end of file diff --git a/public/react/src/modules/help/Cooperatives.css b/public/react/src/modules/help/Cooperatives.css new file mode 100644 index 000000000..1ab232a26 --- /dev/null +++ b/public/react/src/modules/help/Cooperatives.css @@ -0,0 +1,17 @@ +.cooperatives-container { + +} + +.cooperatives-container .cooperative-item-title { + margin-bottom: 20px; + font-size: 16px; +} +.cooperatives-container .cooperative-item-list-item { + padding: 10px 0; + height: 60px; + border: 1px solid #eee; +} +.cooperatives-container .cooperative-item-list-item img { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/public/react/src/modules/help/Cooperatives.js b/public/react/src/modules/help/Cooperatives.js new file mode 100644 index 000000000..b64657488 --- /dev/null +++ b/public/react/src/modules/help/Cooperatives.js @@ -0,0 +1,82 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { List, Card } from "antd"; +import axios from 'axios'; +import { getImageUrl } from 'educoder'; + +import './Cooperatives.css'; + +class Cooperatives extends React.Component { + constructor (props) { + super(props); + + this.state = { + loading: true, + data: [ + { name: "产学联盟" }, + { name: "知名企业" }, + { name: "各类院校" } + ] + } + } + + componentDidMount(){ + window.document.title = "合作伙伴"; + this.getCooperatives(); + } + + getCooperatives(){ + axios.get("/helps/cooperatives.json").then((result) => { + if(result){ + this.setState({ + data: result.data.data, + loading: false + }) + } + }).catch((error) => { + console.log(error); + this.setState({ loading: false }); + }) + } + + render() { + let { loading, data } = this.state; + + return ( +
      +
      + +
      + { + data && data.length > 0 && data.map((item, _key) => { + return ( +
      +
      { item.name }
      +
      + ( + +
      + + + +
      +
      + )} + /> +
      +
      + ) + }) + } +
      +
      +
      +
      + ) + } +} + +export default Cooperatives; \ No newline at end of file diff --git a/public/react/src/modules/help/Feedback.css b/public/react/src/modules/help/Feedback.css new file mode 100644 index 000000000..081370254 --- /dev/null +++ b/public/react/src/modules/help/Feedback.css @@ -0,0 +1,7 @@ +.feedback-container { + +} +.feedback-container .feedback-message { + line-height: 26px; + color: #999999; +} \ No newline at end of file diff --git a/public/react/src/modules/help/Feedback.js b/public/react/src/modules/help/Feedback.js new file mode 100644 index 000000000..c7f13f809 --- /dev/null +++ b/public/react/src/modules/help/Feedback.js @@ -0,0 +1,51 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Link } from 'react-router-dom'; +import { Card, Form } from "antd"; + +import "./Feedback.css"; + +import FeedbackForm from './FeedbackForm'; +const NewFeedbackForm = Form.create({ name: 'feedback_form' })(FeedbackForm); + +class Feedback extends React.Component { + constructor (props) { + super(props); + } + + componentDidMount() { + window.document.title = "意见反馈"; + } + + componentDidUpdate(prevProps) { + if (prevProps.current_user !== this.props.current_user) { + if(!this.props.checkIfLogin()) { + this.props.showLoginDialog(); + } + } + } + + render() { + return ( +
      +
      + +
      +
      + 想对我们的平台提供功能建议?
      + 发现网页中的问题或bug想告诉我们?
      + 期望与我们展开合作?
      + 在这里把你想说的一切告诉我们吧? +
      +
      * 看看帮助中心是否有你想要的答案
      + + +
      +
      +
      +
      + ) + } +} + +export default Feedback; \ No newline at end of file diff --git a/public/react/src/modules/help/FeedbackForm.js b/public/react/src/modules/help/FeedbackForm.js new file mode 100644 index 000000000..ae2c4e095 --- /dev/null +++ b/public/react/src/modules/help/FeedbackForm.js @@ -0,0 +1,87 @@ +import React from 'react'; +import { Form, Input, Radio, Button } from "antd"; +import axios from 'axios'; + +const { TextArea } = Input; + +class FeedbackForm extends React.Component { + constructor (props) { + super(props); + } + + handleSubmit = e => { + e.preventDefault(); + + this.props.form.validateFields((err, fieldsValue) => { + if(err){ return } + + axios.post("/helps/feedback.json", fieldsValue) + .then((result) => { + if (result.status === 200 && result.data.status === 0) { + this.props.history.push(`/messages/${this.props.current_user.login}/message_detail?target_ids=1`); + } + }).catch((error) => { + console.log(error) + }) + }) + } + + render() { + const { getFieldDecorator } = this.props.form; + + return ( +
      +
      + + {getFieldDecorator('question_kind', { + initialValue: "登录注册", + rules: [ + { + required: true, + message: '不能为空', + }, + ], + })( + + 登录注册 + 信息认证 + 实训编程 + 实训课程 + 课堂 + 其它 + + )} + + + + {getFieldDecorator('url', { + rules: [ + { + required: true, + message: '不能为空', + }, + ], + })()} + + + + {getFieldDecorator('description', { + rules: [ + { + required: true, + message: '不能为空', + }, + ], + })(