Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_cs

dev_cs
杨树林 5 years ago
commit 65b96238cb

@ -250,8 +250,9 @@ class ApplicationController < ActionController::Base
# 开放课程通过链接访问的用户 # 开放课程通过链接访问的用户
if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank? if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank?
content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}" content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}"
if Digest::MD5.hexdigest(content) == params[:chinaoocKey] if Digest::MD5.hexdigest(content) == params[:chinaoocKey]
user = User.open_class_user user = open_class_user
start_user_session(user) if user start_user_session(user) if user
User.current = user User.current = user
end end
@ -615,4 +616,27 @@ class ApplicationController < ActionController::Base
def set_export_cookies def set_export_cookies
cookies[:fileDownload] = true cookies[:fileDownload] = true
end end
# 149课程的评审用户数据创建包含创建课堂学生
def open_class_user
user = User.find_by(login: "OpenClassUser")
unless user
ActiveRecord::Base.transaction do
user_params = {status: 1, login: "OpenClassUser", lastname: "开放课程",
nickname: "开放课程", professional_certification: 1, certification: 1, grade: 0,
password: "12345678", phone: "11122223333", profile_completed: 1}
user = User.create!(user_params)
UserExtension.create!(user_id: user.id, gender: 0, school_id: 3396, :identity => 1, :student_id => "openclassuser") # 3396
subject = Subject.find_by(id: 149)
if subject
subject.courses.each do |course|
CourseMember.create!(course_id: course.id, role: 3, user_id: user.id) if !course.course_members.exists?(user_id: user.id)
end
end
end
end
user
end
end end

@ -40,8 +40,8 @@ class CollegesController < ApplicationController
def teachers def teachers
@teachers = User.find_by_sql("SELECT users.id, users.login, users.lastname, users.firstname, users.nickname, IFNULL((SELECT count(shixuns.id) FROM shixuns where shixuns.user_id =users.id group by shixuns.user_id), 0) AS publish_shixun_count, @teachers = User.find_by_sql("SELECT users.id, users.login, users.lastname, users.firstname, users.nickname, IFNULL((SELECT count(shixuns.id) FROM shixuns where shixuns.user_id =users.id group by shixuns.user_id), 0) AS publish_shixun_count,
(SELECT count(c.id) FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.role in (1,2,3) and c.school_id = #{current_school.id} AND m.user_id=users.id AND c.is_delete = 0) as course_count (SELECT count(c.id) FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.user_id=users.id AND m.role in (1,2,3) and c.school_id = #{current_school.id} AND c.is_delete = 0) as course_count
FROM `users`, user_extensions ue where users.id=ue.user_id and ue.identity=0 and ue.school_id=#{current_school.id} ORDER BY publish_shixun_count desc, course_count desc, id desc LIMIT 10") FROM `users`, user_extensions ue where ue.school_id=#{current_school.id} and users.id=ue.user_id and ue.identity=0 ORDER BY publish_shixun_count desc, course_count desc, id desc LIMIT 10")
# ).order("publish_shixun_count desc, experience desc").limit(10) # ).order("publish_shixun_count desc, experience desc").limit(10)
@teachers = @teachers =
@teachers.map do |teacher| @teachers.map do |teacher|

@ -14,7 +14,7 @@ class Ecs::StudentsController < Ecs::BaseController
end end
def import def import
success_count = Ecs::ImportStudentService.call(current_year, params[:attachment_id]) success_count = Ecs::ImportStudentService.call(current_year, params)
render_ok(success_count: success_count) render_ok(success_count: success_count)
rescue Ecs::ImportStudentService::Error => ex rescue Ecs::ImportStudentService::Error => ex
render_error(ex.message) render_error(ex.message)

@ -559,7 +559,7 @@ class GamesController < ApplicationController
secret_rep = @shixun.shixun_secret_repository secret_rep = @shixun.shixun_secret_repository
logger.info("############secret_rep: #{secret_rep}") logger.info("############secret_rep: #{secret_rep}")
if secret_rep&.repo_name if secret_rep&.repo_name
secretGitUrl = repo_url secret_rep.repo_path secretGitUrl = repo_ip_url secret_rep.repo_path
br_params.merge!({secretGitUrl: Base64.urlsafe_encode64(secretGitUrl), secretDir: secret_rep.secret_dir_path}) br_params.merge!({secretGitUrl: Base64.urlsafe_encode64(secretGitUrl), secretDir: secret_rep.secret_dir_path})
logger.info("#######br_params:#{br_params}") logger.info("#######br_params:#{br_params}")
end end

@ -168,7 +168,7 @@ class GraduationTasksController < ApplicationController
end end
end end
else else
@work_list = @work @work_list = !@task.published? ? [] : @work
@view_work = false @view_work = false
@work_count = @work_list.count @work_count = @work_list.count
@all_work_count = @work_list.count @all_work_count = @work_list.count

@ -368,7 +368,7 @@ class SubjectsController < ApplicationController
@schools.map do |s| @schools.map do |s|
school_courses = Course.where(id: course_ids, school_id: s.id) school_courses = Course.where(id: course_ids, school_id: s.id)
course_count = school_courses.count course_count = school_courses.count
student_count = StudentsForCourse.where(course_id: school_courses.pluck(:id)).count student_count = CourseMember.where(course_id: school_courses.pluck(:id), role: 4).count
homework_count = HomeworkCommon.find_by_sql("select count(*) cnt from homework_commons hc join courses c on hc.course_id = c.id homework_count = HomeworkCommon.find_by_sql("select count(*) cnt from homework_commons hc join courses c on hc.course_id = c.id
where c.school_id = #{s.id} and hc.id in(#{homework_common_id})").first.try(:cnt) where c.school_id = #{s.id} and hc.id in(#{homework_common_id})").first.try(:cnt)
s.attributes.dup.merge({name: s.name, course_count: course_count, student_count: student_count,homework_count: homework_count}) s.attributes.dup.merge({name: s.name, course_count: course_count, student_count: student_count,homework_count: homework_count})

@ -48,7 +48,7 @@ class GraduationWork < ApplicationRecord
def delete_atta atta def delete_atta atta
last_score = graduation_work_scores.where.not(score: nil).last last_score = graduation_work_scores.where.not(score: nil).last
atta.author_id == user_id && (!last_score.present? || last_score.try(:created_at) < atta.created_on) (atta.author_id == User.current.id) && (last_score.blank? || last_score.try(:created_at) < atta.created_on)
end end
# 分班名 # 分班名

@ -106,7 +106,7 @@ class StudentWork < ApplicationRecord
def delete_atta atta def delete_atta atta
last_score = student_works_scores.where.not(score: nil).last last_score = student_works_scores.where.not(score: nil).last
atta.author_id == user_id && (!last_score.present? || last_score.try(:created_at) < atta.created_on) (atta.author_id == User.current.id) && (last_score.blank? || last_score.try(:created_at) < atta.created_on)
end end
# 作品总体评价 # 作品总体评价

File diff suppressed because it is too large Load Diff

@ -1,21 +1,20 @@
class Ecs::ImportStudentService < ApplicationService class Ecs::ImportStudentService < ApplicationService
Error = Class.new(StandardError) Error = Class.new(StandardError)
attr_reader :ec_year, :attachment attr_reader :ec_year, :params
def initialize(ec_year, attachment_id) def initialize(ec_year, params)
@ec_year = ec_year @ec_year = ec_year
@attachment = Attachment.find_by(id: attachment_id) @params = params
end end
def call def call
raise Error, '文件不存在' if attachment.blank? raise Error, '文件不存在' if params[:file].blank? || !params[:file].is_a?(ActionDispatch::Http::UploadedFile)
path = attachment.diskfile excel = Ecs::ImportStudentExcel.new(params[:file].path)
excel = Ecs::ImportStudentExcel.new(path)
success_count = 0 success_count = 0
EcYearStudent.bulk_insert(:student_id, :name, :created_at, :updated_at) do |worker| EcYearStudent.bulk_insert(:ec_year_id, :student_id, :name, :created_at, :updated_at) do |worker|
excel.read_each do |student_id, name| excel.read_each do |student_id, name|
success_count += 1 success_count += 1
@ -25,7 +24,7 @@ class Ecs::ImportStudentService < ApplicationService
next next
end end
worker.add(student_id: student_id, name: name) worker.add(ec_year_id: ec_year.id, student_id: student_id, name: name)
end end
end end

@ -9,6 +9,8 @@ class Ecs::SaveGraduationCourseSupportsService < ApplicationService
end end
def call def call
set_course_supports_position!
Ecs::SaveGraduationCourseSupportForm.new(params).validate! Ecs::SaveGraduationCourseSupportForm.new(params).validate!
accepts_attributes = build_accepts_nested_attributes( accepts_attributes = build_accepts_nested_attributes(
@ -20,4 +22,10 @@ class Ecs::SaveGraduationCourseSupportsService < ApplicationService
graduation_subitem.save! graduation_subitem.save!
graduation_subitem graduation_subitem
end end
def set_course_supports_position!
params[:course_supports].each_with_index do |item, index|
item[:position] = index + 1
end
end
end end

@ -40,8 +40,8 @@ class Users::ApplyProfessionalAuthService < ApplicationService
# sms_cache = Rails.cache.read("apply_pro_certification") # sms_cache = Rails.cache.read("apply_pro_certification")
# if sms_cache.nil? # if sms_cache.nil?
# sms_notify_admin sms_notify_admin
Rails.cache.write("apply_pro_certification", 1) # Rails.cache.write("apply_pro_certification", 1)
# end # end
end end
end end

@ -27,8 +27,8 @@ class StatisticSchoolDailyReportTask
# 新增实训评测数量 # 新增实训评测数量
shixun_evaluate_count = EvaluateRecord.joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id') shixun_evaluate_count = EvaluateRecord.joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id')
.joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4') .joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4')
.joins('LEFT JOIN members ON members.user_id = evaluate_records.user_id') .joins('LEFT JOIN course_members ON course_members.user_id = evaluate_records.user_id')
.joins('LEFT JOIN courses ON members.course_id = courses.id AND hc.course_id = courses.id') .joins('LEFT JOIN courses ON course_members.course_id = courses.id AND hc.course_id = courses.id')
.where(courses: { school_id: school.id }) .where(courses: { school_id: school.id })
.where(created_at: yesterday).reorder(nil).count .where(created_at: yesterday).reorder(nil).count

@ -2,10 +2,10 @@ class StatisticSchoolReportTask
def call def call
School.find_each do |school| School.find_each do |school|
evaluate_count = Game.joins(:challenge) evaluate_count = Game.joins(:challenge)
.joins('LEFT JOIN members ON members.user_id = games.user_id') .joins('LEFT JOIN course_members ON course_members.user_id = games.user_id')
.joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = challenges.shixun_id') .joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = challenges.shixun_id')
.joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4') .joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4')
.joins('LEFT JOIN courses ON hc.course_id = courses.id AND members.course_id = courses.id') .joins('LEFT JOIN courses ON hc.course_id = courses.id AND course_members.course_id = courses.id')
.where(courses: { school_id: school.id }) .where(courses: { school_id: school.id })
.sum(:evaluate_count) .sum(:evaluate_count)

@ -53,12 +53,12 @@
<td><span class="apply-status-<%= apply.status %>"><%= apply.status_text %></span></td> <td><span class="apply-status-<%= apply.status %>"><%= apply.status_text %></span></td>
<% else %> <% else %>
<td class="action-container"> <td class="action-container">
<%= agree_link '同意', agree_admins_professional_authentication_path(apply, element: ".professional-authentication-#{apply.id}"), 'data-confirm': '确认审核通过?' %> <%= agree_link '同意', agree_admins_professional_authentication_path(apply, element: ".professional-authentication-#{apply.id}"), 'data-confirm': '确认审核通过?', 'data-disable-with': "提交中..." %>
<%= javascript_void_link('拒绝', class: 'action refuse-action', <%= javascript_void_link('拒绝', class: 'action refuse-action',
data: { data: {
toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id, toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id,
url: refuse_admins_professional_authentication_path(apply, element: ".professional-authentication-#{apply.id}") url: refuse_admins_professional_authentication_path(apply, element: ".professional-authentication-#{apply.id}")
}) %> }, 'data-disable-with': "拒绝中...") %>
</td> </td>
<% end %> <% end %>
</tr> </tr>

@ -11,7 +11,7 @@ json.update_user_name @is_evaluation ? "匿名" : @work.update_user.try(:real_na
json.update_atta @homework.late_duration && @is_author json.update_atta @homework.late_duration && @is_author
json.attachments @attachments do |atta| json.attachments @attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)} json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: false}
end end
unless @is_evaluation unless @is_evaluation

@ -0,0 +1,6 @@
class MigrateUserExtensionIndex < ActiveRecord::Migration[5.2]
def change
remove_index :user_extensions, :school_id
add_index :user_extensions, [:school_id, :user_id]
end
end

File diff suppressed because one or more lines are too long

@ -4,20 +4,6 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@ant-design/icons": {
"version": "1.2.1",
"resolved": "http://registry.npm.taobao.org/@ant-design/icons/download/@ant-design/icons-1.2.1.tgz",
"integrity": "sha1-jhkwGxQz7GfWu9DoknguKt5WH/k="
},
"@ant-design/icons-react": {
"version": "1.1.5",
"resolved": "http://registry.npm.taobao.org/@ant-design/icons-react/download/@ant-design/icons-react-1.1.5.tgz",
"integrity": "sha1-GwPajcztKku5gu97JcHSQBTDWmg=",
"requires": {
"ant-design-palettes": "^1.1.3",
"babel-runtime": "^6.26.0"
}
},
"@babel/helper-annotate-as-pure": { "@babel/helper-annotate-as-pure": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "http://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.0.0.tgz", "resolved": "http://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.0.0.tgz",
@ -95,15 +81,10 @@
"resolved": "http://registry.npm.taobao.org/@emotion/unitless/download/@emotion/unitless-0.7.3.tgz", "resolved": "http://registry.npm.taobao.org/@emotion/unitless/download/@emotion/unitless-0.7.3.tgz",
"integrity": "sha1-YxCgR/EtIaEDb7AxMXIZiSRAQW8=" "integrity": "sha1-YxCgR/EtIaEDb7AxMXIZiSRAQW8="
}, },
"@flatten/array": {
"version": "1.1.7",
"resolved": "https://registry.npm.taobao.org/@flatten/array/download/@flatten/array-1.1.7.tgz",
"integrity": "sha1-+UZZu/MtVY9pKmI0MEokcxKm+jg="
},
"@icedesign/base": { "@icedesign/base": {
"version": "0.2.7", "version": "0.2.8",
"resolved": "http://registry.npm.taobao.org/@icedesign/base/download/@icedesign/base-0.2.7.tgz", "resolved": "https://registry.npm.taobao.org/@icedesign/base/download/@icedesign/base-0.2.8.tgz",
"integrity": "sha1-cFvLHH1UQVQKYuvsJRsGh56oN+U=", "integrity": "sha1-hmlSY+17gnKJB3sbgoy446sqzAk=",
"requires": { "requires": {
"async-validator": "^1.6.7", "async-validator": "^1.6.7",
"classnames": "^2.2.3", "classnames": "^2.2.3",
@ -147,14 +128,6 @@
"csstype": "^2.2.0" "csstype": "^2.2.0"
} }
}, },
"@types/react-slick": {
"version": "0.23.3",
"resolved": "http://registry.npm.taobao.org/@types/react-slick/download/@types/react-slick-0.23.3.tgz",
"integrity": "sha1-ydFDI6dfVPRqZS+3Rf5VOq0JHOA=",
"requires": {
"@types/react": "*"
}
},
"@types/react-transition-group": { "@types/react-transition-group": {
"version": "2.9.0", "version": "2.9.0",
"resolved": "http://registry.npm.taobao.org/@types/react-transition-group/download/@types/react-transition-group-2.9.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Freact-transition-group%2Fdownload%2F%40types%2Freact-transition-group-2.9.0.tgz", "resolved": "http://registry.npm.taobao.org/@types/react-transition-group/download/@types/react-transition-group-2.9.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Freact-transition-group%2Fdownload%2F%40types%2Freact-transition-group-2.9.0.tgz",
@ -333,102 +306,6 @@
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
} }
}, },
"ant-design-palettes": {
"version": "1.1.3",
"resolved": "http://registry.npm.taobao.org/ant-design-palettes/download/ant-design-palettes-1.1.3.tgz",
"integrity": "sha1-hBGbGk2GNjrcUqONWH5lM2oKJ90=",
"requires": {
"tinycolor2": "^1.4.1"
}
},
"antd": {
"version": "3.16.2",
"resolved": "http://registry.npm.taobao.org/antd/download/antd-3.16.2.tgz",
"integrity": "sha1-o7SoRKbegubIfJb4jdojF/TYkHU=",
"requires": {
"@ant-design/icons": "~1.2.0",
"@ant-design/icons-react": "~1.1.2",
"@types/react-slick": "^0.23.3",
"array-tree-filter": "^2.1.0",
"babel-runtime": "6.x",
"classnames": "~2.2.6",
"copy-to-clipboard": "^3.0.8",
"create-react-class": "^15.6.3",
"create-react-context": "0.2.2",
"css-animation": "^1.5.0",
"dom-closest": "^0.2.0",
"enquire.js": "^2.1.6",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"omit.js": "^1.0.0",
"prop-types": "^15.6.2",
"raf": "^3.4.0",
"rc-animate": "^2.5.4",
"rc-calendar": "~9.12.1",
"rc-cascader": "~0.17.0",
"rc-checkbox": "~2.1.5",
"rc-collapse": "~1.11.1",
"rc-dialog": "~7.3.0",
"rc-drawer": "~1.7.6",
"rc-dropdown": "~2.4.1",
"rc-editor-mention": "^1.1.7",
"rc-form": "^2.4.0",
"rc-input-number": "~4.4.0",
"rc-menu": "~7.4.12",
"rc-notification": "~3.3.0",
"rc-pagination": "~1.17.7",
"rc-progress": "~2.3.0",
"rc-rate": "~2.5.0",
"rc-select": "~9.0.0",
"rc-slider": "~8.6.5",
"rc-steps": "~3.3.0",
"rc-switch": "~1.9.0",
"rc-table": "~6.4.0",
"rc-tabs": "~9.6.0",
"rc-time-picker": "~3.6.1",
"rc-tooltip": "~3.7.3",
"rc-tree": "~1.15.2",
"rc-tree-select": "~2.6.0",
"rc-trigger": "^2.6.2",
"rc-upload": "~2.6.0",
"rc-util": "^4.5.1",
"react-lazy-load": "^3.0.13",
"react-lifecycles-compat": "^3.0.4",
"react-slick": "~0.23.2",
"resize-observer-polyfill": "^1.5.0",
"shallowequal": "^1.1.0",
"warning": "~4.0.2"
},
"dependencies": {
"rc-select": {
"version": "9.0.2",
"resolved": "http://registry.npm.taobao.org/rc-select/download/rc-select-9.0.2.tgz",
"integrity": "sha1-zg0pfbX4pcfou8P8JNntW6ZIASw=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "2.x",
"component-classes": "1.x",
"dom-scroll-into-view": "1.x",
"prop-types": "^15.5.8",
"raf": "^3.4.0",
"rc-animate": "2.x",
"rc-menu": "^7.3.0",
"rc-trigger": "^2.5.4",
"rc-util": "^4.0.4",
"react-lifecycles-compat": "^3.0.2",
"warning": "^4.0.2"
}
},
"warning": {
"version": "4.0.3",
"resolved": "http://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz",
"integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=",
"requires": {
"loose-envify": "^1.0.0"
}
}
}
},
"anymatch": { "anymatch": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-1.3.2.tgz", "resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-1.3.2.tgz",
@ -520,11 +397,6 @@
"resolved": "http://registry.npm.taobao.org/array-reduce/download/array-reduce-0.0.0.tgz", "resolved": "http://registry.npm.taobao.org/array-reduce/download/array-reduce-0.0.0.tgz",
"integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys="
}, },
"array-tree-filter": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/array-tree-filter/download/array-tree-filter-2.1.0.tgz",
"integrity": "sha1-hzrAD+yDdJ8lWsjdCDgUtPYykZA="
},
"array-union": { "array-union": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz", "resolved": "http://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz",
@ -629,12 +501,9 @@
"dev": true "dev": true
}, },
"async-validator": { "async-validator": {
"version": "1.11.0", "version": "1.12.2",
"resolved": "http://registry.npm.taobao.org/async-validator/download/async-validator-1.11.0.tgz", "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.12.2.tgz",
"integrity": "sha1-9i/RS8yjNvzalubdU9vR3dP8MZg=", "integrity": "sha1-vq5nHnF00pOLe0tp0vt+cit/1yw="
"requires": {
"babel-runtime": "6.x"
}
}, },
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
@ -2825,14 +2694,6 @@
"resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", "resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
}, },
"copy-to-clipboard": {
"version": "3.1.0",
"resolved": "http://registry.npm.taobao.org/copy-to-clipboard/download/copy-to-clipboard-3.1.0.tgz",
"integrity": "sha1-CigUGJnmvSF7ncE/0WibOziCC0Q=",
"requires": {
"toggle-selection": "^1.0.6"
}
},
"core-js": { "core-js": {
"version": "2.6.5", "version": "2.6.5",
"resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.6.5.tgz", "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.6.5.tgz",
@ -2916,18 +2777,9 @@
"object-assign": "^4.1.1" "object-assign": "^4.1.1"
} }
}, },
"create-react-context": {
"version": "0.2.2",
"resolved": "http://registry.npm.taobao.org/create-react-context/download/create-react-context-0.2.2.tgz",
"integrity": "sha1-mDZUL5qqIoaM19Sm+CZn3zgBnco=",
"requires": {
"fbjs": "^0.8.0",
"gud": "^1.0.0"
}
},
"cropperjs": { "cropperjs": {
"version": "0.7.2", "version": "0.7.2",
"resolved": "http://registry.npm.taobao.org/cropperjs/download/cropperjs-0.7.2.tgz", "resolved": "https://registry.npm.taobao.org/cropperjs/download/cropperjs-0.7.2.tgz",
"integrity": "sha1-atinHbAGKbqULZzt5lKyeXXp50o=" "integrity": "sha1-atinHbAGKbqULZzt5lKyeXXp50o="
}, },
"cross-spawn": { "cross-spawn": {
@ -3494,14 +3346,6 @@
"resolved": "http://registry.npm.taobao.org/dom-align/download/dom-align-1.8.2.tgz", "resolved": "http://registry.npm.taobao.org/dom-align/download/dom-align-1.8.2.tgz",
"integrity": "sha1-/c02vOJbqNNP41gu/Vesdn30kL0=" "integrity": "sha1-/c02vOJbqNNP41gu/Vesdn30kL0="
}, },
"dom-closest": {
"version": "0.2.0",
"resolved": "http://registry.npm.taobao.org/dom-closest/download/dom-closest-0.2.0.tgz",
"integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=",
"requires": {
"dom-matches": ">=1.0.1"
}
},
"dom-converter": { "dom-converter": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "http://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz", "resolved": "http://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz",
@ -3533,11 +3377,6 @@
} }
} }
}, },
"dom-matches": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/dom-matches/download/dom-matches-2.0.0.tgz",
"integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw="
},
"dom-scroll-into-view": { "dom-scroll-into-view": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "http://registry.npm.taobao.org/dom-scroll-into-view/download/dom-scroll-into-view-1.2.1.tgz", "resolved": "http://registry.npm.taobao.org/dom-scroll-into-view/download/dom-scroll-into-view-1.2.1.tgz",
@ -3610,23 +3449,6 @@
"resolved": "http://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-4.2.0.tgz", "resolved": "http://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-4.2.0.tgz",
"integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=" "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU="
}, },
"draft-js": {
"version": "0.10.5",
"resolved": "http://registry.npm.taobao.org/draft-js/download/draft-js-0.10.5.tgz",
"integrity": "sha1-v6m+sBj+BTPbsI1mdcNxprCPp0I=",
"requires": {
"fbjs": "^0.8.15",
"immutable": "~3.7.4",
"object-assign": "^4.1.0"
},
"dependencies": {
"immutable": {
"version": "3.7.6",
"resolved": "http://registry.npm.taobao.org/immutable/download/immutable-3.7.6.tgz",
"integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
}
}
},
"duplexer": { "duplexer": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "http://registry.npm.taobao.org/duplexer/download/duplexer-0.1.1.tgz", "resolved": "http://registry.npm.taobao.org/duplexer/download/duplexer-0.1.1.tgz",
@ -4220,11 +4042,6 @@
"resolved": "http://registry.npm.taobao.org/eventemitter3/download/eventemitter3-3.1.0.tgz", "resolved": "http://registry.npm.taobao.org/eventemitter3/download/eventemitter3-3.1.0.tgz",
"integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=" "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM="
}, },
"eventlistener": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/eventlistener/download/eventlistener-0.0.1.tgz",
"integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg="
},
"events": { "events": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/events/download/events-3.0.0.tgz", "resolved": "http://registry.npm.taobao.org/events/download/events-3.0.0.tgz",
@ -5306,11 +5123,6 @@
"resolved": "http://registry.npm.taobao.org/growly/download/growly-1.3.0.tgz", "resolved": "http://registry.npm.taobao.org/growly/download/growly-1.3.0.tgz",
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE="
}, },
"gud": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/gud/download/gud-1.0.0.tgz",
"integrity": "sha1-pIlYGxfmpwvsqavjrlfeekmYUsA="
},
"gzip-size": { "gzip-size": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/gzip-size/download/gzip-size-3.0.0.tgz", "resolved": "http://registry.npm.taobao.org/gzip-size/download/gzip-size-3.0.0.tgz",
@ -5319,11 +5131,6 @@
"duplexer": "^0.1.1" "duplexer": "^0.1.1"
} }
}, },
"hammerjs": {
"version": "2.0.8",
"resolved": "http://registry.npm.taobao.org/hammerjs/download/hammerjs-2.0.8.tgz",
"integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
},
"handle-thing": { "handle-thing": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "http://registry.npm.taobao.org/handle-thing/download/handle-thing-1.2.5.tgz", "resolved": "http://registry.npm.taobao.org/handle-thing/download/handle-thing-1.2.5.tgz",
@ -6713,14 +6520,6 @@
"resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
}, },
"json2mq": {
"version": "0.2.0",
"resolved": "http://registry.npm.taobao.org/json2mq/download/json2mq-0.2.0.tgz",
"integrity": "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo=",
"requires": {
"string-convert": "^0.2.0"
}
},
"json3": { "json3": {
"version": "3.3.2", "version": "3.3.2",
"resolved": "http://registry.npm.taobao.org/json3/download/json3-3.3.2.tgz", "resolved": "http://registry.npm.taobao.org/json3/download/json3-3.3.2.tgz",
@ -7100,11 +6899,6 @@
"lodash._reinterpolate": "~3.0.0" "lodash._reinterpolate": "~3.0.0"
} }
}, },
"lodash.throttle": {
"version": "4.1.1",
"resolved": "http://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz",
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
},
"lodash.uniq": { "lodash.uniq": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", "resolved": "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz",
@ -7808,14 +7602,6 @@
"resolved": "http://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz", "resolved": "http://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz",
"integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=" "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4="
}, },
"omit.js": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/omit.js/download/omit.js-1.0.2.tgz",
"integrity": "sha1-kaFPDrqEBm36AVvzDkdMR/MLyFg=",
"requires": {
"babel-runtime": "^6.23.0"
}
},
"on-finished": { "on-finished": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", "resolved": "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz",
@ -9333,11 +9119,6 @@
"resolved": "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz", "resolved": "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz",
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks="
}, },
"prettier": {
"version": "1.17.0",
"resolved": "http://registry.npm.taobao.org/prettier/download/prettier-1.17.0.tgz",
"integrity": "sha1-U7MDZ27tIswUqfDOwJtHezAmwAg="
},
"pretty-bytes": { "pretty-bytes": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "http://registry.npm.taobao.org/pretty-bytes/download/pretty-bytes-4.0.2.tgz", "resolved": "http://registry.npm.taobao.org/pretty-bytes/download/pretty-bytes-4.0.2.tgz",
@ -9603,130 +9384,6 @@
"react-lifecycles-compat": "^3.0.4" "react-lifecycles-compat": "^3.0.4"
} }
}, },
"rc-calendar": {
"version": "9.12.4",
"resolved": "http://registry.npm.taobao.org/rc-calendar/download/rc-calendar-9.12.4.tgz",
"integrity": "sha1-aO46hXtTQdeA2Uc1QZJs/gtEkVQ=",
"requires": {
"babel-runtime": "6.x",
"classnames": "2.x",
"moment": "2.x",
"prop-types": "^15.5.8",
"rc-trigger": "^2.2.0",
"rc-util": "^4.1.1",
"react-lifecycles-compat": "^3.0.4"
}
},
"rc-cascader": {
"version": "0.17.1",
"resolved": "http://registry.npm.taobao.org/rc-cascader/download/rc-cascader-0.17.1.tgz",
"integrity": "sha1-kUSBwzcLX9j4Lk+d+bZZbf7aFNU=",
"requires": {
"array-tree-filter": "^2.1.0",
"prop-types": "^15.5.8",
"rc-trigger": "^2.2.0",
"rc-util": "^4.0.4",
"react-lifecycles-compat": "^3.0.4",
"shallow-equal": "^1.0.0",
"warning": "^4.0.1"
},
"dependencies": {
"warning": {
"version": "4.0.3",
"resolved": "http://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz",
"integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=",
"requires": {
"loose-envify": "^1.0.0"
}
}
}
},
"rc-checkbox": {
"version": "2.1.6",
"resolved": "http://registry.npm.taobao.org/rc-checkbox/download/rc-checkbox-2.1.6.tgz",
"integrity": "sha1-XcAGU+UncBjEMf7FXji5HB+XbpA=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "2.x",
"prop-types": "15.x",
"rc-util": "^4.0.4"
}
},
"rc-collapse": {
"version": "1.11.1",
"resolved": "http://registry.npm.taobao.org/rc-collapse/download/rc-collapse-1.11.1.tgz",
"integrity": "sha1-SqCXetv1Ip19tYIFZGsTkFrdcq0=",
"requires": {
"classnames": "2.x",
"css-animation": "1.x",
"prop-types": "^15.5.6",
"rc-animate": "2.x",
"react-is": "^16.7.0",
"shallowequal": "^1.1.0"
}
},
"rc-dialog": {
"version": "7.3.1",
"resolved": "http://registry.npm.taobao.org/rc-dialog/download/rc-dialog-7.3.1.tgz",
"integrity": "sha1-RQQew1v8jjN8kbZLUs6+9upc1KI=",
"requires": {
"babel-runtime": "6.x",
"rc-animate": "2.x",
"rc-util": "^4.4.0"
}
},
"rc-drawer": {
"version": "1.7.7",
"resolved": "http://registry.npm.taobao.org/rc-drawer/download/rc-drawer-1.7.7.tgz",
"integrity": "sha1-sBTR3lJFfIXE8+Hw1kelQDHdJgw=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"prop-types": "^15.5.0",
"rc-util": "^4.5.1"
}
},
"rc-dropdown": {
"version": "2.4.1",
"resolved": "http://registry.npm.taobao.org/rc-dropdown/download/rc-dropdown-2.4.1.tgz",
"integrity": "sha1-qu9us6UVLN2ZgolcKnjZtfBGzew=",
"requires": {
"babel-runtime": "^6.26.0",
"classnames": "^2.2.6",
"prop-types": "^15.5.8",
"rc-trigger": "^2.5.1",
"react-lifecycles-compat": "^3.0.2"
}
},
"rc-editor-core": {
"version": "0.8.9",
"resolved": "http://registry.npm.taobao.org/rc-editor-core/download/rc-editor-core-0.8.9.tgz",
"integrity": "sha1-9hGVLI7tll4+NI2ErnvohdrrIhw=",
"requires": {
"babel-runtime": "^6.26.0",
"classnames": "^2.2.5",
"draft-js": "^0.10.0",
"immutable": "^3.7.4",
"lodash": "^4.16.5",
"prop-types": "^15.5.8",
"setimmediate": "^1.0.5"
}
},
"rc-editor-mention": {
"version": "1.1.12",
"resolved": "http://registry.npm.taobao.org/rc-editor-mention/download/rc-editor-mention-1.1.12.tgz",
"integrity": "sha1-iWvLFyES8YgS6W/dM7pgPA/HMGo=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "^2.2.5",
"dom-scroll-into-view": "^1.2.0",
"draft-js": "~0.10.0",
"immutable": "^3.7.4",
"prop-types": "^15.5.8",
"rc-animate": "^2.3.0",
"rc-editor-core": "~0.8.3"
}
},
"rc-form": { "rc-form": {
"version": "2.4.4", "version": "2.4.4",
"resolved": "http://registry.npm.taobao.org/rc-form/download/rc-form-2.4.4.tgz", "resolved": "http://registry.npm.taobao.org/rc-form/download/rc-form-2.4.4.tgz",
@ -9759,28 +9416,6 @@
} }
} }
}, },
"rc-hammerjs": {
"version": "0.6.9",
"resolved": "http://registry.npm.taobao.org/rc-hammerjs/download/rc-hammerjs-0.6.9.tgz",
"integrity": "sha1-mk3b2hsuyPm5WWCRpqmJhCokOQc=",
"requires": {
"babel-runtime": "6.x",
"hammerjs": "^2.0.8",
"prop-types": "^15.5.9"
}
},
"rc-input-number": {
"version": "4.4.1",
"resolved": "http://registry.npm.taobao.org/rc-input-number/download/rc-input-number-4.4.1.tgz",
"integrity": "sha1-FjbPKBzejXjqTIuf/P/Xe4A1BnU=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.0",
"prop-types": "^15.5.7",
"rc-util": "^4.5.1",
"rmc-feedback": "^2.0.0"
}
},
"rc-menu": { "rc-menu": {
"version": "7.4.22", "version": "7.4.22",
"resolved": "http://registry.npm.taobao.org/rc-menu/download/rc-menu-7.4.22.tgz", "resolved": "http://registry.npm.taobao.org/rc-menu/download/rc-menu-7.4.22.tgz",
@ -9799,18 +9434,6 @@
"resize-observer-polyfill": "^1.5.0" "resize-observer-polyfill": "^1.5.0"
} }
}, },
"rc-notification": {
"version": "3.3.1",
"resolved": "http://registry.npm.taobao.org/rc-notification/download/rc-notification-3.3.1.tgz",
"integrity": "sha1-C6o+cPjUCrAVzo+njCYMSQ/HvrQ=",
"requires": {
"babel-runtime": "6.x",
"classnames": "2.x",
"prop-types": "^15.5.8",
"rc-animate": "2.x",
"rc-util": "^4.0.4"
}
},
"rc-pagination": { "rc-pagination": {
"version": "1.17.14", "version": "1.17.14",
"resolved": "http://registry.npm.taobao.org/rc-pagination/download/rc-pagination-1.17.14.tgz", "resolved": "http://registry.npm.taobao.org/rc-pagination/download/rc-pagination-1.17.14.tgz",
@ -9821,15 +9444,6 @@
"react-lifecycles-compat": "^3.0.4" "react-lifecycles-compat": "^3.0.4"
} }
}, },
"rc-progress": {
"version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/rc-progress/download/rc-progress-2.3.0.tgz",
"integrity": "sha1-z70H/5AmxFAQCYDeIJqSZQ4k8xM=",
"requires": {
"babel-runtime": "6.x",
"prop-types": "^15.5.8"
}
},
"rc-rate": { "rc-rate": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "http://registry.npm.taobao.org/rc-rate/download/rc-rate-2.5.0.tgz", "resolved": "http://registry.npm.taobao.org/rc-rate/download/rc-rate-2.5.0.tgz",
@ -9870,116 +9484,6 @@
} }
} }
}, },
"rc-slider": {
"version": "8.6.9",
"resolved": "http://registry.npm.taobao.org/rc-slider/download/rc-slider-8.6.9.tgz",
"integrity": "sha1-syFIpJjJJ8k/INwflehoLEkkv44=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"prop-types": "^15.5.4",
"rc-tooltip": "^3.7.0",
"rc-util": "^4.0.4",
"shallowequal": "^1.0.1",
"warning": "^4.0.3"
},
"dependencies": {
"warning": {
"version": "4.0.3",
"resolved": "http://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz",
"integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=",
"requires": {
"loose-envify": "^1.0.0"
}
}
}
},
"rc-steps": {
"version": "3.3.1",
"resolved": "http://registry.npm.taobao.org/rc-steps/download/rc-steps-3.3.1.tgz",
"integrity": "sha1-SHfiiXMx47/ba3ieiK6nj08V9zI=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "^2.2.3",
"lodash": "^4.17.5",
"prop-types": "^15.5.7"
}
},
"rc-switch": {
"version": "1.9.0",
"resolved": "http://registry.npm.taobao.org/rc-switch/download/rc-switch-1.9.0.tgz",
"integrity": "sha1-qyuHjycTxoE1ikUzkZdsm5WykPc=",
"requires": {
"classnames": "^2.2.1",
"prop-types": "^15.5.6",
"react-lifecycles-compat": "^3.0.4"
}
},
"rc-table": {
"version": "6.4.4",
"resolved": "http://registry.npm.taobao.org/rc-table/download/rc-table-6.4.4.tgz",
"integrity": "sha1-fOS4VuooFIRKAWQeyKzy1y7jpao=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"lodash": "^4.17.5",
"mini-store": "^2.0.0",
"prop-types": "^15.5.8",
"rc-util": "^4.0.4",
"react-lifecycles-compat": "^3.0.2",
"shallowequal": "^1.0.2",
"warning": "^3.0.0"
}
},
"rc-tabs": {
"version": "9.6.3",
"resolved": "http://registry.npm.taobao.org/rc-tabs/download/rc-tabs-9.6.3.tgz",
"integrity": "sha1-XuAoFlIXafkuKNwDYKLrEhS1MHU=",
"requires": {
"babel-runtime": "6.x",
"classnames": "2.x",
"create-react-context": "0.2.2",
"lodash": "^4.17.5",
"prop-types": "15.x",
"raf": "^3.4.1",
"rc-hammerjs": "~0.6.0",
"rc-util": "^4.0.4",
"resize-observer-polyfill": "^1.5.1",
"warning": "^3.0.0"
},
"dependencies": {
"raf": {
"version": "3.4.1",
"resolved": "http://registry.npm.taobao.org/raf/download/raf-3.4.1.tgz",
"integrity": "sha1-B0LpmkplUvRF1z4+4DKK8P8e3jk=",
"requires": {
"performance-now": "^2.1.0"
}
}
}
},
"rc-time-picker": {
"version": "3.6.3",
"resolved": "http://registry.npm.taobao.org/rc-time-picker/download/rc-time-picker-3.6.3.tgz",
"integrity": "sha1-kV2R1oAWcknTJIcZ4IoxzqpcOwE=",
"requires": {
"classnames": "2.x",
"moment": "2.x",
"prop-types": "^15.5.8",
"rc-trigger": "^2.2.0"
}
},
"rc-tooltip": {
"version": "3.7.3",
"resolved": "http://registry.npm.taobao.org/rc-tooltip/download/rc-tooltip-3.7.3.tgz",
"integrity": "sha1-KArsavyqROjf8EgPuv+eh/wArsw=",
"requires": {
"babel-runtime": "6.x",
"prop-types": "^15.5.8",
"rc-trigger": "^2.2.2"
}
},
"rc-tree": { "rc-tree": {
"version": "1.15.2", "version": "1.15.2",
"resolved": "http://registry.npm.taobao.org/rc-tree/download/rc-tree-1.15.2.tgz", "resolved": "http://registry.npm.taobao.org/rc-tree/download/rc-tree-1.15.2.tgz",
@ -10011,63 +9515,6 @@
} }
} }
}, },
"rc-tree-select": {
"version": "2.6.2",
"resolved": "http://registry.npm.taobao.org/rc-tree-select/download/rc-tree-select-2.6.2.tgz",
"integrity": "sha1-eDuvvzq9D8ZFoHaXVjA47aYwLyk=",
"requires": {
"classnames": "^2.2.1",
"dom-scroll-into-view": "^1.2.1",
"prop-types": "^15.5.8",
"raf": "^3.4.0",
"rc-animate": "^3.0.0-rc.4",
"rc-tree": "~1.15.0",
"rc-trigger": "^3.0.0-rc.2",
"rc-util": "^4.5.0",
"react-lifecycles-compat": "^3.0.4",
"shallowequal": "^1.0.2",
"warning": "^4.0.1"
},
"dependencies": {
"rc-animate": {
"version": "3.0.0-rc.6",
"resolved": "http://registry.npm.taobao.org/rc-animate/download/rc-animate-3.0.0-rc.6.tgz",
"integrity": "sha1-BCiO76EY4MriFFNsipA/+qwbw/s=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"fbjs": "^0.8.16",
"prop-types": "15.x",
"raf": "^3.4.0",
"rc-util": "^4.5.0",
"react-lifecycles-compat": "^3.0.4"
}
},
"rc-trigger": {
"version": "3.0.0-rc.3",
"resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-3.0.0-rc.3.tgz",
"integrity": "sha1-NYQt8WdNJTFeFCakSIKkyXZSJYs=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.6",
"prop-types": "15.x",
"raf": "^3.4.0",
"rc-align": "^2.4.1",
"rc-animate": "^3.0.0-rc.1",
"rc-util": "^4.4.0"
}
},
"warning": {
"version": "4.0.3",
"resolved": "http://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz",
"integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=",
"requires": {
"loose-envify": "^1.0.0"
}
}
}
},
"rc-trigger": { "rc-trigger": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-2.6.2.tgz", "resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-2.6.2.tgz",
@ -10181,17 +9628,6 @@
"text-table": "0.2.0" "text-table": "0.2.0"
} }
}, },
"react-dom": {
"version": "16.8.6",
"resolved": "http://registry.npm.taobao.org/react-dom/download/react-dom-16.8.6.tgz",
"integrity": "sha1-cdYwP2MeiwCX9WFl72CPBR/24Q8=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.13.6"
}
},
"react-error-overlay": { "react-error-overlay": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "http://registry.npm.taobao.org/react-error-overlay/download/react-error-overlay-4.0.1.tgz", "resolved": "http://registry.npm.taobao.org/react-error-overlay/download/react-error-overlay-4.0.1.tgz",
@ -10274,17 +9710,6 @@
} }
} }
}, },
"react-lazy-load": {
"version": "3.0.13",
"resolved": "http://registry.npm.taobao.org/react-lazy-load/download/react-lazy-load-3.0.13.tgz",
"integrity": "sha1-OwqS0zbUPT8Nc8vm81sXBQsIuCQ=",
"requires": {
"eventlistener": "0.0.1",
"lodash.debounce": "^4.0.0",
"lodash.throttle": "^4.0.0",
"prop-types": "^15.5.8"
}
},
"react-lifecycles-compat": { "react-lifecycles-compat": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "http://registry.npm.taobao.org/react-lifecycles-compat/download/react-lifecycles-compat-3.0.4.tgz", "resolved": "http://registry.npm.taobao.org/react-lifecycles-compat/download/react-lifecycles-compat-3.0.4.tgz",
@ -10390,22 +9815,9 @@
"stifle": "^1.0.2" "stifle": "^1.0.2"
} }
}, },
"react-slick": {
"version": "0.23.2",
"resolved": "http://registry.npm.taobao.org/react-slick/download/react-slick-0.23.2.tgz",
"integrity": "sha1-jYvbx3pmeOitNvUMMleMfA8cVPY=",
"requires": {
"classnames": "^2.2.5",
"enquire.js": "^2.1.6",
"json2mq": "^0.2.0",
"lodash.debounce": "^4.0.8",
"prettier": "^1.14.3",
"resize-observer-polyfill": "^1.5.0"
}
},
"react-transition-group": { "react-transition-group": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "http://registry.npm.taobao.org/react-transition-group/download/react-transition-group-1.2.1.tgz", "resolved": "https://registry.npm.taobao.org/react-transition-group/download/react-transition-group-1.2.1.tgz",
"integrity": "sha1-4R9yslf5IbITIpp3TfRmEjRsfKY=", "integrity": "sha1-4R9yslf5IbITIpp3TfRmEjRsfKY=",
"requires": { "requires": {
"chain-function": "^1.0.0", "chain-function": "^1.0.0",
@ -11135,15 +10547,6 @@
"inherits": "^2.0.1" "inherits": "^2.0.1"
} }
}, },
"rmc-feedback": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/rmc-feedback/download/rmc-feedback-2.0.0.tgz",
"integrity": "sha1-y8bLOuY8emNe7w4l5PuvWsNm7qo=",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.5"
}
},
"run-async": { "run-async": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz", "resolved": "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz",
@ -11225,15 +10628,6 @@
"resolved": "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", "resolved": "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz",
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
}, },
"scheduler": {
"version": "0.13.6",
"resolved": "http://registry.npm.taobao.org/scheduler/download/scheduler-0.13.6.tgz",
"integrity": "sha1-RmpOwzJGezGpG5v3TlNHBy5M2Ik=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"schema-utils": { "schema-utils": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "http://registry.npm.taobao.org/schema-utils/download/schema-utils-0.3.0.tgz", "resolved": "http://registry.npm.taobao.org/schema-utils/download/schema-utils-0.3.0.tgz",
@ -11406,11 +10800,6 @@
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
} }
}, },
"shallow-equal": {
"version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/shallow-equal/download/shallow-equal-1.1.0.tgz",
"integrity": "sha1-zAIvAw3LoNHBmKv2WKPGx0Thcco="
},
"shallowequal": { "shallowequal": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/shallowequal/download/shallowequal-1.1.0.tgz", "resolved": "http://registry.npm.taobao.org/shallowequal/download/shallowequal-1.1.0.tgz",
@ -11934,11 +11323,6 @@
"resolved": "http://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz", "resolved": "http://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
}, },
"string-convert": {
"version": "0.2.1",
"resolved": "http://registry.npm.taobao.org/string-convert/download/string-convert-0.2.1.tgz",
"integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c="
},
"string-length": { "string-length": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://registry.npm.taobao.org/string-length/download/string-length-1.0.1.tgz", "resolved": "http://registry.npm.taobao.org/string-length/download/string-length-1.0.1.tgz",
@ -12248,11 +11632,6 @@
"resolved": "http://registry.npm.taobao.org/tiny-warning/download/tiny-warning-1.0.2.tgz", "resolved": "http://registry.npm.taobao.org/tiny-warning/download/tiny-warning-1.0.2.tgz",
"integrity": "sha1-Hfrnce4aBDlr394no63OvGtkiyg=" "integrity": "sha1-Hfrnce4aBDlr394no63OvGtkiyg="
}, },
"tinycolor2": {
"version": "1.4.1",
"resolved": "http://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.1.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
},
"tmp": { "tmp": {
"version": "0.0.33", "version": "0.0.33",
"resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz", "resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz",
@ -12314,11 +11693,6 @@
} }
} }
}, },
"toggle-selection": {
"version": "1.0.6",
"resolved": "http://registry.npm.taobao.org/toggle-selection/download/toggle-selection-1.0.6.tgz",
"integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI="
},
"toposort": { "toposort": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "http://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz", "resolved": "http://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz",

@ -5,10 +5,9 @@
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no --> <!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> --> <!-- <meta name="viewport" content=""> -->
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
<!-- <!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
manifest.json provides metadata used when your web app is added to the <!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"> <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!-- <!--

@ -315,9 +315,33 @@ class CoursesIndex extends Component{
if(isNaN(id)){ if(isNaN(id)){
return return
} }
const querys = this.props.location.search;
var dataqueryss={}
try {
var foqus=this.foo(querys);
if(JSON.stringify(foqus) ==="{}"){
this.setState({
dataquerys:{},
});
}else{
this.setState({
dataquerys:foqus,
});
dataqueryss=foqus;
}
}catch (e) {
this.setState({
dataquerys:{},
})
}
// let id=this.props.match.params.coursesId; // let id=this.props.match.params.coursesId;
let url ="/courses/"+id+"/left_banner.json" let url ="/courses/"+id+"/left_banner.json"
axios.get(url).then((response) => { axios.get(url,
{params:
dataqueryss
}
).then((response) => {
if(response!=undefined){ if(response!=undefined){
if(response.data&&response.data){ if(response.data&&response.data){
this.setState({ this.setState({
@ -330,7 +354,28 @@ class CoursesIndex extends Component{
} }
} }
}) })
} };
foo=(url)=> {
var json = {};
var regExp = /[\?\&](\w+)(=?)(\w*)/g;
var arr;
do {
arr = regExp.exec(url);
// console.log(arr); // arr = [完整的字符串, key, 等号或'', value或'']
if (arr) {
var key = arr[1];
var value = arr[3];
// arr[2] === ''时, value = undefined
if (!arr[2])
value = undefined;
json[key] = value;
}
} while (arr);
return json;
};
locationNav=(list)=>{ locationNav=(list)=>{
if(list){ if(list){

@ -33,7 +33,7 @@ function CommonWorkAppraiseReviseAttachments(props) {
{item.title} {item.title}
</a> </a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span> <span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>this.props.onAttachmentRemove(item.id)}></i>:""} {item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>props.onAttachmentRemove(item.id)}></i>:""}
</div> </div>
) )
})} })}

@ -286,8 +286,8 @@ class CommonWorkDetailIndex extends Component{
seeworks={undefined} seeworks={undefined}
reviseAttachmentUrl={`/student_works/${work_id || studentWorkId}/revise_attachment.json`} reviseAttachmentUrl={`/student_works/${work_id || studentWorkId}/revise_attachment.json`}
/>:""} />:""}
<a className={"fr color-blue font-16 mt7"} href={"javascript:void(0)"} <a className={"fr color-blue font-16 "} href={"javascript:void(0)"}
onClick={this.addAccessory} onClick={this.addAccessory} style={{ 'marginTop': '-4px' }}
>补交附件</a> >补交附件</a>
</React.Fragment> </React.Fragment>

@ -640,6 +640,8 @@ class CommonWorkList extends Component{
} else if (time_status === 4) { } else if (time_status === 4) {
timeMsg = '申诉剩余时间' timeMsg = '申诉剩余时间'
} }
const hasData = student_works && !!student_works.length && page == 1
// console.log(StudentData) // console.log(StudentData)
// console.log(student_works) // console.log(student_works)
@ -691,7 +693,7 @@ class CommonWorkList extends Component{
} }
`}</style> `}</style>
<div style={{ background: '#fff'}} className="workListContent"> <div style={{ background: '#fff'}} className="workListContent">
{ isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}> { isAdmin && hasData && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}>
<CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup> <CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup>
<CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup> <CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup>
@ -713,7 +715,7 @@ class CommonWorkList extends Component{
{ <div id="graduation_work_list" style={{padding: isStudent ? '10px 24px 10px 24px' : '0px 24px 10px 24px'}}> { <div id="graduation_work_list" style={{padding: isStudent ? '10px 24px 10px 24px' : '0px 24px 10px 24px'}}>
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"> {hasData && <span className="fl color-grey-6 font-12">
{ isAdmin ? { isAdmin ?
(!!all_member_count) && <React.Fragment> (!!all_member_count) && <React.Fragment>
<span className="color-orange-tip">{work_count || '0'}</span>{all_member_count} <span className="color-orange-tip">{work_count || '0'}</span>{all_member_count}
@ -725,7 +727,7 @@ class CommonWorkList extends Component{
<span className="color-orange-tip">{left_time.time}</span> <span className="color-orange-tip">{left_time.time}</span>
</React.Fragment> </React.Fragment>
} }
</span> </span>}
{/* { isAdminOrStudent && student_works && !!student_works.length && <div className="fr color-grey-6 edu-menu-panel"> {/* { isAdminOrStudent && student_works && !!student_works.length && <div className="fr color-grey-6 edu-menu-panel">
<p style={{color: '#989898'}} className="color-grey-6"><a data-remote="true" className="font-12"> <p style={{color: '#989898'}} className="color-grey-6"><a data-remote="true" className="font-12">

@ -125,8 +125,8 @@ class WorkDetailPageHeader extends Component{
seeworks={undefined} seeworks={undefined}
reviseAttachmentUrl={`/student_works/${work_id || studentWorkId}/revise_attachment.json`} reviseAttachmentUrl={`/student_works/${work_id || studentWorkId}/revise_attachment.json`}
/>:""} />:""}
<a className={"fr color-blue font-16 mt7"} href={"javascript:void(0)"} <a className={"fr color-blue font-16 "} href={"javascript:void(0)"}
onClick={this.addAccessory} onClick={this.addAccessory} style={{ 'marginTop': '-4px' }}
>补交附件</a> >补交附件</a>
</React.Fragment> </React.Fragment>

@ -238,7 +238,8 @@ class CCommentItem extends Component{
<div className="comment_content clearfix" id={`reply_content_${item.id}`}> <div className="comment_content clearfix" id={`reply_content_${item.id}`}>
<div className="color-grey-3" id={`reply_content_${item.id}`}> <div className="color-grey-3" id={`reply_content_${item.id}`}>
<div className={"break_word_comments markdown-body"} dangerouslySetInnerHTML={{__html: item.content}}></div> <div className={"break_word_comments markdown-body"}
dangerouslySetInnerHTML={{__html: this.parseCommentContent(item.content)}}></div>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
</div> </div>
@ -373,8 +374,8 @@ class CCommentItem extends Component{
</Tooltip> </Tooltip>
: ''} */} : ''} */}
</div> </div>
{/* style={{ height: '130px'}} */} {/* 去掉了orig_reply 影响到i标签 */}
<p className="orig_reply" > <p className="" >
{/* 第二排右侧按钮区域 */} {/* 第二排右侧按钮区域 */}
{/* ${this.state.show_reply ? '回复' : '申诉'} */} {/* ${this.state.show_reply ? '回复' : '申诉'} */}
{(show_reply || show_appeal) && {(show_reply || show_appeal) &&

@ -94,9 +94,30 @@ class CoursesBanner extends Component {
this.updatabanner() this.updatabanner()
} }
updatabanner=()=>{ updatabanner=()=>{
const query = this.props.location.search;
var dataqueryss={}
try {
var foqus=this.foo(query);
if(JSON.stringify(foqus) ==="{}"){
this.setState({
dataquerys:{},
});
}else{
this.setState({
dataquerys:foqus,
});
dataqueryss=foqus;
}
}catch (e) {
this.setState({
dataquerys:{},
})
}
let courseId = this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json" let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => { axios.get(url,{params:
dataqueryss
}).then((result) => {
if( result!=undefined){ if( result!=undefined){
let data = result.data; let data = result.data;
this.setState({ this.setState({
@ -107,7 +128,28 @@ class CoursesBanner extends Component {
this.onloadupdatabanner() this.onloadupdatabanner()
} }
}) })
} };
foo=(url)=> {
var json = {};
var regExp = /[\?\&](\w+)(=?)(\w*)/g;
var arr;
do {
arr = regExp.exec(url);
// console.log(arr); // arr = [完整的字符串, key, 等号或'', value或'']
if (arr) {
var key = arr[1];
var value = arr[3];
// arr[2] === ''时, value = undefined
if (!arr[2])
value = undefined;
json[key] = value;
}
} while (arr);
return json;
};
showeditmenu = () => { showeditmenu = () => {
this.setState({ this.setState({
show: true, show: true,

@ -498,7 +498,7 @@ class Exercise extends Component{
{/*}*/} {/*}*/}
</p> </p>
<div className="clearfix pl30 pr30"> <div className="clearfix pl30 pr30">
<p className="fl font-16" style={{"marginTop":"27px"}}> <p className="fl font-14" style={{"marginTop":"27px"}}>
<span className="mr20">{exercises_counts && exercises_counts.exercises_total_counts}个试卷</span> <span className="mr20">{exercises_counts && exercises_counts.exercises_total_counts}个试卷</span>
<span className="mr20">已发布{exercises_counts && exercises_counts.exercises_published_counts}</span> <span className="mr20">已发布{exercises_counts && exercises_counts.exercises_published_counts}</span>
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span> <span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>

@ -58,7 +58,7 @@
float: left; float: left;
padding-top: 31px; padding-top: 31px;
padding-left: 25px; padding-left: 25px;
font-size: 16px; font-size: 21px;
color: #05101A; color: #05101A;
text-align: left; text-align: left;
font-weight:bold; font-weight:bold;

@ -50,7 +50,8 @@ class GraduationTasksnew extends Component {
} }
Commoninterface =(fileList)=>{ Commoninterface =(fileList)=>{
let coursesId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let listid = [] let listid = []
for (var list of fileList) { for (var list of fileList) {
@ -90,7 +91,8 @@ class GraduationTasksnew extends Component {
// GraduationTasksnewtype = false; // GraduationTasksnewtype = false;
// this.goback(); // this.goback();
if(response!==undefined){ if(response!==undefined){
this.goback() // this.goback()
this.props.history.replace(`/courses/${coursesId}/graduation_tasks/${category_id}/detail/${response.data.task_id}/questions`);
} }
// } // }
}).catch((error) => { }).catch((error) => {

@ -958,6 +958,7 @@ class GraduationTaskssettinglist extends Component{
} }
console.log(this.props.questionslist.status)
return( return(
<React.Fragment> <React.Fragment>
@ -1100,7 +1101,7 @@ class GraduationTaskssettinglist extends Component{
this.props.isAdmin() ? this.props.isAdmin() ?
<div className="stud-class-set"> <div className="stud-class-set">
<div className="clearfix edu-back-white" > <div className="clearfix edu-back-white" >
<ul className="clearfix" style={{padding:'20px 30px 10px 30px'}}> {this.props.questionslist&&this.props.questionslist.status===0?"":<ul className="clearfix" style={{padding:'20px 30px 10px 30px'}}>
<li className="clearfix"> <li className="clearfix">
<span className="fl mr10 color-grey-8">教师评阅</span> <span className="fl mr10 color-grey-8">教师评阅</span>
@ -1200,9 +1201,9 @@ class GraduationTaskssettinglist extends Component{
</li>} </li>}
</ul> </ul>}
<div id="graduation_work_list" style={{padding:'0px 30px 10px 30px'}}> {this.props.questionslist&&this.props.questionslist.status===0?"":<div id="graduation_work_list" style={{padding:'0px 30px 10px 30px'}}>
<style> <style>
{` {`
.edu-menu-lists li:hover { .edu-menu-lists li:hover {
@ -1251,7 +1252,7 @@ class GraduationTaskssettinglist extends Component{
</div> </div>
:""} :""}
</div> </div>}
{ {
JSON.stringify(data)==="[]" ? JSON.stringify(data)==="[]" ?

@ -517,7 +517,7 @@ class Poll extends Component{
} }
</p> </p>
<div className="clearfix pl30 pr30"> <div className="clearfix pl30 pr30">
<p className="fl font-16" style={{"marginTop":"27px"}}> <p className="fl font-14" style={{"marginTop":"27px"}}>
<span className="mr20">{polls_counts && polls_counts.polls_total_counts}个问卷</span> <span className="mr20">{polls_counts && polls_counts.polls_total_counts}个问卷</span>
<span className="mr20">已发布{polls_counts && polls_counts.polls_published_counts}</span> <span className="mr20">已发布{polls_counts && polls_counts.polls_published_counts}</span>
<span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span> <span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>

@ -1,330 +1,332 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination} from "antd"; import {Checkbox,Input,Table, Pagination} from "antd";
import { WordsBtn } from 'educoder' import { WordsBtn } from 'educoder'
import moment from 'moment'; import moment from 'moment';
import CheckAllGroup from '../common/button/CheckAllGroup' import CheckAllGroup from '../common/button/CheckAllGroup'
import NoneData from "../coursesPublic/NoneData" import NoneData from "../coursesPublic/NoneData"
import '../css/members.css' import '../css/members.css'
import '../css/busyWork.css' import '../css/busyWork.css'
import './pollStyle.css' import './pollStyle.css'
import axios from 'axios' import axios from 'axios'
const Search=Input.Search; const Search=Input.Search;
function formatDuring(mss){ function formatDuring(mss){
var days = parseInt(mss / (1000 * 60 * 60 * 24)); var days = parseInt(mss / (1000 * 60 * 60 * 24));
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)); var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
return days + "天" + hours + "小时" + minutes + "分"; return days + "天" + hours + "小时" + minutes + "分";
} }
class PollDetailTabFirst extends Component{ class PollDetailTabFirst extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
order:"end_at", order:"end_at",
search:undefined, search:undefined,
commit_status:[], commit_status:[],
poll_group_id:[], poll_group_id:[],
page:1, page:1,
limit:20, limit:20,
dataInfo:undefined, dataInfo:undefined,
data:undefined, data:undefined,
poll_types:undefined, poll_types:undefined,
course_groups:undefined, course_groups:undefined,
options_Class:[], options_Class:[],
poll_end_at:"" poll_end_at:""
} }
} }
// 搜索框搜索 // 搜索框搜索
inputStudent=(e)=>{ inputStudent=(e)=>{
this.setState({ this.setState({
search:e.target.value search:e.target.value
}) })
} }
searchInfo=()=>{ searchInfo=()=>{
let{order,search,commit_status,poll_group_id,page}=this.state let{order,search,commit_status,poll_group_id,page}=this.state
this.getTableList(order,search,commit_status,poll_group_id,page); this.getTableList(order,search,commit_status,poll_group_id,page);
} }
// 获取接口数据 // 获取接口数据
getTableList=(order,search,commit_status,poll_group_id,page)=>{ getTableList=(order,search,commit_status,poll_group_id,page)=>{
let pollId=this.props.match.params.pollId; let pollId=this.props.match.params.pollId;
let courseid=this.props.match.params.coursesId; let courseid=this.props.match.params.coursesId;
let url=`/polls/${pollId}/poll_lists.json`; let url=`/polls/${pollId}/poll_lists.json`;
axios.get((url),{ axios.get((url),{
params:{ params:{
limit:this.state.limit, limit:this.state.limit,
order:order, order:order,
search:search, search:search,
commit_status:commit_status, commit_status:commit_status,
poll_group_id:poll_group_id, poll_group_id:poll_group_id,
page:page page:page
} }
}).then((result)=>{ }).then((result)=>{
if(result){ if(result){
let list=[]; let list=[];
let users=result.data.poll_users; let users=result.data.poll_users;
let{page,limit}=this.state; let{page,limit}=this.state;
if(users.length!=0){ if(users.length!=0){
for(var i=0;i<users.length;i++){ for(var i=0;i<users.length;i++){
list.push({ list.push({
No:(parseInt(page)-1)*parseInt(limit)+(i+1), No:(parseInt(page)-1)*parseInt(limit)+(i+1),
name:users[i].user_name, name:users[i].user_name,
StudentNo:users[i].student_id, StudentNo:users[i].student_id,
classes:users[i].user_group_name, classes:users[i].user_group_name,
status:users[i].commit_status , status:users[i].commit_status ,
time:users[i].end_at , time:users[i].end_at ,
operation:users[i].commit_status, operation:users[i].commit_status,
login:users[i].login login:users[i].login
}) })
} }
} }
let classes=[]; let classes=[];
let groups=result.data.course_groups; let groups=result.data.course_groups;
if(groups){ if(groups){
for(var i=0;i<groups.length;i++){ for(var i=0;i<groups.length;i++){
classes.push({ classes.push({
value:groups[i].course_group_id, value:groups[i].course_group_id,
label:groups[i].group_group_name+"("+groups[i].count+")" label:groups[i].group_group_name+"("+groups[i].count+")"
}) })
} }
} }
let endTime=result.data.poll_types.poll_end_time; let endTime=result.data.poll_types.poll_end_time;
if(endTime!=undefined && endTime!=""){ if(endTime!=undefined && endTime!=""){
let t= moment(endTime,'YYYY-MM-DD HH:mm') - moment(); let t= moment(endTime,'YYYY-MM-DD HH:mm') - moment();
endTime=t > 0 ? formatDuring(t) : "0"; endTime=t > 0 ? formatDuring(t) : "0";
} }
this.setState({ this.setState({
poll_end_at:endTime, poll_end_at:endTime,
dataInfo:result.data.poll_users, dataInfo:result.data.poll_users,
data:list, data:list,
poll_types:result.data.poll_types, poll_types:result.data.poll_types,
course_groups:result.data.course_groups, course_groups:result.data.course_groups,
options_Class:classes options_Class:classes
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
componentDidMount(){ componentDidMount(){
let {order,search,commit_status,poll_group_id,page}=this.state; let {order,search,commit_status,poll_group_id,page}=this.state;
this.getTableList(order,search,commit_status,poll_group_id,page); this.getTableList(order,search,commit_status,poll_group_id,page);
} }
// 翻页 // 翻页
changePage=(pageNumber)=>{ changePage=(pageNumber)=>{
this.setState({ this.setState({
page:pageNumber page:pageNumber
}) })
let {order,search,commit_status,poll_group_id}=this.state; let {order,search,commit_status,poll_group_id}=this.state;
this.getTableList(order,search,commit_status,poll_group_id,pageNumber); this.getTableList(order,search,commit_status,poll_group_id,pageNumber);
} }
//排序 //排序
changeOrder=(order)=>{ changeOrder=(order)=>{
this.setState({ this.setState({
order:order order:order
}) })
let {search,commit_status,poll_group_id,page}=this.state; let {search,commit_status,poll_group_id,page}=this.state;
this.getTableList(order,search,commit_status,poll_group_id,page); this.getTableList(order,search,commit_status,poll_group_id,page);
} }
//选择分班情况 //选择分班情况
classOptionsChange = (values,all) => { classOptionsChange = (values,all) => {
let status= all == false ? values : []; let status= all == false ? values : [];
this.setState({ this.setState({
poll_group_id:status poll_group_id:status
}) })
let {order,search,commit_status,page}=this.state; let {order,search,commit_status,page}=this.state;
this.getTableList(order,search,commit_status,status,page); this.getTableList(order,search,commit_status,status,page);
} }
//选择提交状态 //选择提交状态
statusOptionChange=(values,all)=>{ statusOptionChange=(values,all)=>{
let status= all == false ? values : []; let status= all == false ? values : [];
this.setState({ this.setState({
commit_status:status commit_status:status
}) })
let {order,search,poll_group_id,page}=this.state; let {order,search,poll_group_id,page}=this.state;
this.getTableList(order,search,status,poll_group_id,page); this.getTableList(order,search,status,poll_group_id,page);
} }
render(){ render(){
let {order,search,data,page,limit,course_groups,poll_types,options_Class,dataInfo,poll_end_at}=this.state; let {order,search,data,page,limit,course_groups,poll_types,options_Class,dataInfo,poll_end_at}=this.state;
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
const isStudent = this.props.isStudent(); const isStudent = this.props.isStudent();
//分班 //分班
const options_status = [ const options_status = [
{ label: `未提交(${poll_types && poll_types.unanswer_users})`, value: '0' }, { label: `未提交(${poll_types && poll_types.unanswer_users})`, value: '0' },
{ label: `按时提交(${poll_types && poll_types.answer_users})`, value: '1' } { label: `按时提交(${poll_types && poll_types.answer_users})`, value: '1' }
]; ];
// 表格 // 表格
let columns = [{ let columns = [{
title: '序号', title: '序号',
dataIndex: 'No', dataIndex: 'No',
key: 'No', key: 'No',
className:"edu-txt-center", className:"edu-txt-center",
width:110 width:110
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:"edu-txt-center", className:"edu-txt-center",
width:160 width:160
}, { }, {
title: '学号', title: '学号',
dataIndex: 'StudentNo', dataIndex: 'StudentNo',
key: 'StudentNo', key: 'StudentNo',
className:"edu-txt-center", className:"edu-txt-center",
render:(StudentNo,item,index)=>{ render:(StudentNo,item,index)=>{
return( return(
item.StudentNo ? <span>{item.StudentNo}</span> : "--" item.StudentNo ? <span>{item.StudentNo}</span> : "--"
) )
} }
}, { }, {
title: '分班', title: '分班',
key: 'classes', key: 'classes',
dataIndex: 'classes', dataIndex: 'classes',
width:160, width:160,
className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none", className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none",
render:(classes,item,index)=>{ render:(classes,item,index)=>{
return( return(
item.classes ? <span>{item.classes}</span> : <span className="color-grey-9">--</span> item.classes ? <span>{item.classes}</span> : <span className="color-grey-9">--</span>
) )
} }
}, { }, {
title: '提交状态', title: '提交状态',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
className:"edu-txt-center", className:"edu-txt-center",
width:160, width:160,
render:(status,item,index)=>{ render:(status,item,index)=>{
return( return(
item.status == 1 ?<span className='color-green'>按时提交</span>:<span></span> item.status == 1 ?<span className='color-green'>按时提交</span>:<span></span>
) )
} }
}, { }, {
title: '提交时间', title: '提交时间',
dataIndex: 'time', dataIndex: 'time',
key: 'time', key: 'time',
className:"edu-txt-center", className:"edu-txt-center",
width:160, width:160,
render:(time,item,index)=>{ render:(time,item,index)=>{
return( return(
item.time == null ? <span className="color-grey-9">--</span> : moment(item.time).format('YYYY-MM-DD HH:mm') item.time == null ? <span className="color-grey-9">--</span> : moment(item.time).format('YYYY-MM-DD HH:mm')
) )
} }
},{ },{
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
key: 'operation', key: 'operation',
className:"edu-txt-center", className:"edu-txt-center",
width:120, width:120,
render:(operation,item,index)=>{ render:(operation,item,index)=>{
return( return(
item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span> item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
) )
} }
}]; }];
// 非课堂成员不显示学号列 // 非课堂成员不显示学号列
let isNotMember =this.props.isNotMember(); let isNotMember =this.props.isNotMember();
if(isNotMember){ if(isNotMember){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "学号") { if (item.title === "学号") {
columns.splice(key, 1) columns.splice(key, 1)
return true return true
} }
} }
) )
} }
// un_anonymous true为实名问卷显示操作列否则隐藏 // un_anonymous true为实名问卷显示操作列否则隐藏
if(poll_types && (isNotMember || poll_types.un_anonymous == false)){ if(poll_types && (isNotMember || poll_types.un_anonymous == false)){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "操作") { if (item.title === "操作") {
columns.splice(key, 1) columns.splice(key, 1)
return true return true
} }
} }
) )
} }
return(
<div> console.log(this.props.pollDetail&&this.props.pollDetail.polls_status)
{ return(
isAdmin ? <div>
<div className="pt30 pl30 clearfix edu-back-white"> {
<div className="pr30 clearfix"> isAdmin ?
<p className="fl mt5"> this.props.pollDetail&&this.props.pollDetail.polls_status===undefined||this.props.pollDetail&&this.props.pollDetail.polls_status===1?"":<div className="pt30 pl30 clearfix edu-back-white">
<CheckAllGroup options={options_status} label={'答题状态:'} onChange={this.statusOptionChange}></CheckAllGroup> <div className="pr30 clearfix">
</p> <p className="fl mt5">
<div className="fr searchView height30"> <CheckAllGroup options={options_status} label={'答题状态:'} onChange={this.statusOptionChange}></CheckAllGroup>
<Search </p>
value={search} <div className="fr searchView height30">
placeholder="请输入姓名或学号搜索" <Search
onInput={this.inputStudent} value={search}
onSearch={this.searchInfo} placeholder="请输入姓名或学号搜索"
></Search> onInput={this.inputStudent}
</div> onSearch={this.searchInfo}
</div> ></Search>
{ </div>
course_groups && course_groups.length > 1 ? </div>
<div className="mt15"> {
<CheckAllGroup options={options_Class} label={'分班情况:'} onChange={this.classOptionsChange}></CheckAllGroup> course_groups && course_groups.length > 1 ?
</div> <div className="mt15">
:"" <CheckAllGroup options={options_Class} label={'分班情况:'} onChange={this.classOptionsChange}></CheckAllGroup>
} </div>
:""
</div>:"" }
}
</div>:""
<div className="clearfix padding20-30 edu-back-white"> }
{
isAdmin ? <span className="fl color-grey-3 font-12"><span className="color-orange-tip">{poll_types && poll_types.total_users}</span>{poll_types && poll_types.poll_users_count} </span> :"" {this.props.pollDetail&&this.props.pollDetail.polls_status===undefined||this.props.pollDetail&&this.props.pollDetail.polls_status===1?"":<div className="clearfix padding20-30 edu-back-white">
} {
{ isAdmin ? <span className="fl color-grey-3 font-12"><span className="color-orange-tip">{poll_types && poll_types.total_users}</span>{poll_types && poll_types.poll_users_count} </span> :""
isStudent ? }
<span className="fl color-grey-3 font-12"> {
{poll_types && poll_types.answer_users===undefined?"":<span className="mr15"><span className="color-orange-tip">{poll_types && poll_types.answer_users}</span> </span>} isStudent ?
{poll_types && poll_types.unanswer_users===undefined?"":<span className="mr15">{poll_types && poll_types.unanswer_users} 未交</span>} <span className="fl color-grey-3 font-12">
{ {poll_types && poll_types.answer_users===undefined?"":<span className="mr15"><span className="color-orange-tip">{poll_types && poll_types.answer_users}</span> </span>}
poll_end_at != "0" ? {poll_types && poll_types.unanswer_users===undefined?"":<span className="mr15">{poll_types && poll_types.unanswer_users} 未交</span>}
<span className="color-grey-9"> 剩余提交时间<span className="color-orange-tip">{poll_end_at}</span></span> {
:"" poll_end_at != "0" ?
} <span className="color-grey-9"> 剩余提交时间<span className="color-orange-tip">{poll_end_at}</span></span>
</span> :""
:"" }
} </span>
{ :""
isAdmin && }
<div className="fr"> {
<li className="drop_down"> isAdmin &&
<span className="color-grey-9 font-12">{order=="end_at"?"提交时间":"学生学号"}</span><i className="iconfont icon-xiajiantou font-12 ml2 color-grey-6"></i> <div className="fr">
<ul className="drop_down_normal"> <li className="drop_down">
<li onClick={()=>this.changeOrder("end_at")}>提交时间</li> <span className="color-grey-9 font-12">{order=="end_at"?"提交时间":"学生学号"}</span><i className="iconfont icon-xiajiantou font-12 ml2 color-grey-6"></i>
<li onClick={()=>this.changeOrder("student_id")}>学生学号</li> <ul className="drop_down_normal">
</ul> <li onClick={()=>this.changeOrder("end_at")}>提交时间</li>
</li> <li onClick={()=>this.changeOrder("student_id")}>学生学号</li>
</div> </ul>
} </li>
</div> </div>
<div className="edu-table edu-back-white minH-560"> }
{ </div>}
data && data.length>0 ?<Table columns={columns} dataSource={data} pagination={false}></Table> :<NoneData></NoneData> <div className="edu-table edu-back-white minH-560">
} {
</div> data && data.length>0 ?<Table columns={columns} dataSource={data} pagination={false}></Table> :<NoneData></NoneData>
{ }
poll_types && poll_types.total_users && poll_types.total_users > limit ? </div>
<div className="edu-txt-center mt30 mb50"> {
<Pagination showQuickJumper current={page} onChange={this.changePage} pageSize={limit} total={poll_types.total_users}></Pagination> poll_types && poll_types.total_users && poll_types.total_users > limit ?
</div>:"" <div className="edu-txt-center mt30 mb50">
} <Pagination showQuickJumper current={page} onChange={this.changePage} pageSize={limit} total={poll_types.total_users}></Pagination>
</div> </div>:""
) }
} </div>
} )
}
}
export default PollDetailTabFirst; export default PollDetailTabFirst;

@ -349,7 +349,7 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}> {data&&data.course_name}</span> <span className={"color-grey-9"}> {data&&data.course_name}</span>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a className="btn colorgrey fl hovercolorblue " to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+category_id}> <a className="btn colorgrey fl hovercolorblue " href={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+category_id}>
<span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span> <span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -355,4 +355,10 @@ input{
.editlybuttonbox{ .editlybuttonbox{
margin-bottom: 30px; margin-bottom: 30px;
margin-right: 3%; margin-right: 3%;
}
.Importclassroomdata{
top: 30px;
position: absolute;
right: 0px;
} }

@ -34,7 +34,13 @@ class CourseSupports extends Component {
Supportslist:'', Supportslist:'',
Supportssum:false, Supportssum:false,
Supportsclass:false, Supportsclass:false,
Supportsclasskey:undefined Supportsclasskey:undefined,
neweditcourse:[{"weights": 0,
"ec_course_name":'',
"top_relation": false,
"ec_course_id":''
}],
max_support_count:0
} }
} }
@ -58,15 +64,25 @@ class CourseSupports extends Component {
axios.get(url) axios.get(url)
.then((response) => { .then((response) => {
if(response.status===200){ if(response.status===200){
this.setState({
data:response.data
})
console.log(response.data.graduation_subitems.length)
if(response.data.graduation_subitems.length===0){ if(response.data.graduation_subitems.length===0){
this.setState({ this.setState({
Supportstype:true, Supportstype:true,
data:response.data,
Supportslist:'数据为空,请去毕业要求——>毕业要求指标点分解列表配置数据' Supportslist:'数据为空,请去毕业要求——>毕业要求指标点分解列表配置数据'
}) })
}else{
let datas=response.data.graduation_subitems;
let listlength=[]
datas.map((item,key)=>{
listlength.push(item.course_supports.length)
})
let max_support_count=Math.max(...listlength);
this.setState({
max_support_count:max_support_count,
data:response.data
})
} }
} }
@ -155,20 +171,45 @@ class CourseSupports extends Component {
if(item.course_supports.length>0){ if(item.course_supports.length>0){
this.setState({ this.setState({
editcourse:item.course_supports, editcourse:item.course_supports,
neweditcourse:item.course_supports,
Editkey:key, Editkey:key,
index:subindex, index:subindex,
ec_graduation_subitem_id:id,
}) })
}else if(item.course_supports.length===0){ }else if(item.course_supports.length===0){
this.setState({ this.setState({
editcourse:[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}], editcourse:[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}],
neweditcourse:[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}],
Editkey:key, Editkey:key,
index:subindex, index:subindex,
ec_graduation_subitem_id:id,
}) })
} }
} }
}) })
let newnum=0;
data.graduation_subitems.map((item,key)=>{
if(keys===key){
item.course_supports.map((items,keys)=>{
if(items.weights===undefined){
newnum=0
}else{
newnum=newnum+items.weights;
}
})
}
})
newnum= Math.round(newnum*100)/100;
this.setState({
editnum:newnum
})
console.log(newnum)
// $("#school_ListTableLine").show(); // $("#school_ListTableLine").show();
// let offsettop=$("#school_ListTableLine").position().top||$("#school_ListTableLine").scrollTop || $("#school_ListTableLine").pageYOffset; // let offsettop=$("#school_ListTableLine").position().top||$("#school_ListTableLine").scrollTop || $("#school_ListTableLine").pageYOffset;
// window.scrollTo(0, offsettop) // window.scrollTo(0, offsettop)
@ -176,7 +217,12 @@ class CourseSupports extends Component {
Addcourse=(e)=>{ Addcourse=(e)=>{
let {editcourse} =this.state; let {editcourse} =this.state;
let neweditcourse=editcourse; let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
let newadd = {weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}; let newadd = {weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''};
neweditcourse.push(newadd); neweditcourse.push(newadd);
this.setState({ this.setState({
@ -194,29 +240,49 @@ class CourseSupports extends Component {
// 删除 // 删除
// let id =e.target.getAttribute("index"); // let id =e.target.getAttribute("index");
let {editcourse} = this.state; let {editcourse} = this.state;
let neweditcourse=editcourse; let arr=new Array();
neweditcourse.splice(e,1); editcourse.map((item,key)=>{
let newnum=0; arr.push(item)
for(var j=0;j<neweditcourse.length;j++){ })
if(neweditcourse[j].weights===undefined){
newnum=0 let neweditcourse=arr;
}else{ if(neweditcourse.length>1){
newnum=newnum+neweditcourse[j].weights; neweditcourse.splice(e,1);
} let newnum=0;
} for(var j=0;j<neweditcourse.length;j++){
newnum= Math.round(newnum*100)/100; if(neweditcourse[j].weights===undefined){
this.setState({ newnum=0
Supportstype:false, }else{
supportid:null, newnum=newnum+neweditcourse[j].weights;
Supportslist:"", }
editcourse:neweditcourse, }
editnum:newnum newnum= Math.round(newnum*100)/100;
})
this.setState({
Supportstype:false,
supportid:null,
Supportslist:"",
editcourse:neweditcourse,
editnum:newnum
})
}else{
this.setState({
// Supportstype:true,
Supportslist:'删除失败,至少保留一个课程',
})
}
} }
enterweight=(e)=>{ enterweight=(e)=>{
let {editcourse} = this.state; let {editcourse} = this.state;
let neweditcourse=editcourse; let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
var id=e.target.id; var id=e.target.id;
var value=parseFloat(e.target.value); var value=parseFloat(e.target.value);
if(isNaN(value)){ if(isNaN(value)){
@ -231,7 +297,11 @@ class CourseSupports extends Component {
Supportssum:true Supportssum:true
}) })
return return
} }else{
this.setState({
Supportssum:false
})
}
const person = new Object (); const person = new Object ();
@ -266,15 +336,25 @@ class CourseSupports extends Component {
Supportslist:'权重之和不能大于1', Supportslist:'权重之和不能大于1',
Supportssum:true Supportssum:true
}) })
} }else{
this.setState({
Supportssum:false
})
}
} }
handleChange=(e)=> { handleChange=(e)=> {
let {editcourse} = this.state; let {editcourse} = this.state;
let value=`${e[0]}`;
value=parseInt(value) let arr=new Array();
let neweditcourse=editcourse; editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
let value=`${e[0]}`;
value=parseInt(value)
let num=`${e[1]}`; let num=`${e[1]}`;
num=parseInt(num) num=parseInt(num)
@ -298,7 +378,13 @@ class CourseSupports extends Component {
relevancetop=(e)=>{ relevancetop=(e)=>{
let {editcourse} = this.state; let {editcourse} = this.state;
let neweditcourse=editcourse;
let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
let id =e.target.getAttribute("itindex"); let id =e.target.getAttribute("itindex");
for(var i=0;i<1;i++){ for(var i=0;i<1;i++){
neweditcourse[id].top_relation=false; neweditcourse[id].top_relation=false;
@ -310,7 +396,11 @@ class CourseSupports extends Component {
relevancebottom=(e)=>{ relevancebottom=(e)=>{
let {editcourse} = this.state; let {editcourse} = this.state;
let neweditcourse=editcourse; let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
let id =e.target.getAttribute("itindex"); let id =e.target.getAttribute("itindex");
for(var i=0;i<1;i++){ for(var i=0;i<1;i++){
neweditcourse[id].top_relation=true; neweditcourse[id].top_relation=true;
@ -326,14 +416,20 @@ class CourseSupports extends Component {
this.inputNumberRef.blur(); this.inputNumberRef.blur();
} }
CancelSupports=()=>{ CancelSupports=()=>{
let{editcourse,neweditcourse}=this.state;
//
// console.log(editcourse)
// console.log(neweditcourse)
this.setState({ this.setState({
Editkey:null, Editkey:null,
Supportssum:false, Supportssum:false,
Supportsclass:false, Supportsclass:false,
editcourse:neweditcourse
}) })
} }
SubmitClassData=()=>{ SubmitClassData=()=>{
let {editcourse,editnum,ec_graduation_subitem_id,ec_year_id} = this.state; let {editcourse,editnum,ec_graduation_subitem_id} = this.state;
if(editcourse.length===0){ if(editcourse.length===0){
this.setState({ this.setState({
// Supportstype:true, // Supportstype:true,
@ -380,35 +476,39 @@ class CourseSupports extends Component {
} }
}) })
var Url = '/ec_course_supports';
var Url = `/ec_years/${this.props.match.params.ec_year_id}/graduation_course_supports.json`;
axios.post(Url, { axios.post(Url, {
ec_year_id: ec_year_id, graduation_subitem_id :ec_graduation_subitem_id,
ec_graduation_subitem_id:ec_graduation_subitem_id, course_supports: editcourse
course: editcourse
},
{
withCredentials: true
} }
).then((response) => { ).then((response) => {
if(response.data.id===ec_graduation_subitem_id){
if(response.data.status===0){
this.setState({ // this.setState({
Editkey:null, // Editkey:null,
Supportslist:response.data.messsage, // Supportslist:"保存成功",
Supportstype:true, // Supportstype:true,
Supportssum:false, // Supportssum:false,
Supportsclass:false, // Supportsclass:false,
Supportsclasskey:undefined, // Supportsclasskey:undefined,
}) // })
this.UpdateClassData(); this.UpdateClassData();
this.setState({
Editkey:null,
Supportssum:false,
Supportsclass:false,
})
}else if(response.data.status===-1){ }else if(response.data.status===-1){
this.setState({ // this.setState({
Supportslist:"参数错误", // Supportslist:"参数错误",
Supportstype:true, // Supportstype:true,
Supportssum:false, // Supportssum:false,
Supportsclass:false, // Supportsclass:false,
Supportsclasskey:undefined, // Supportsclasskey:undefined,
}) // })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -428,9 +528,41 @@ class CourseSupports extends Component {
Supportslist:"", Supportslist:"",
}) })
} }
confirmysl(url){
axios.get(url + '?export=true').then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.message === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
toforums=(url)=>{
window.open( url, '_blank');
}
render() { render() {
const Option = Select.Option; const Option = Select.Option;
let {data,ec_courses_list,editcourse,editnum,index,ec_year_id,Supportsclasskey,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state; let {max_support_count,data,ec_courses_list,editcourse,editnum,index,ec_year_id,Supportsclasskey,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state;
var list = (length) => { var list = (length) => {
var res = []; var res = [];
for(var i = 0; i < length; i++) { for(var i = 0; i < length; i++) {
@ -443,6 +575,11 @@ class CourseSupports extends Component {
return res return res
} }
let toptiebox={width: 126.6*max_support_count+"px"};
let ismidbox={width:123.82*max_support_count+"px",margin:'0px 0px'};
console.log(this.props.year&&this.props.year.can_manager)
return ( return (
<div className="newMain clearfix"> <div className="newMain clearfix">
<Modal <Modal
@ -468,7 +605,7 @@ class CourseSupports extends Component {
</Modal> </Modal>
<div className="educontent mb290"> <div className="educontent mb20">
@ -477,10 +614,12 @@ class CourseSupports extends Component {
<div className="clearfix padding20-30 bor-bottom-greyE" style={{position:'relative'}}> <div className="clearfix padding20-30 bor-bottom-greyE" style={{position:'relative'}}>
<span className="font-18 courseSystem">课程体系对毕业要求的支撑</span> <span className="font-18 courseSystem">课程体系对毕业要求的支撑</span>
{/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */} {/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */}
<span className={data.is_manager===false?"none":"Importclassroomdata"} style={{top: '29px'}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10" target="_blank" href={'/ec_major_schools/'+major_school_id+'/academic_years/'+ec_year_id+'/export_course_requirements?format=xls'}>导出课程体系支撑矩阵</a>
<span className={this.props.year&&this.props.year.can_manager===false?"none":"Importclassroomdata"} style={{top: '29px'}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10" onClick={()=>this.confirmysl(`/ec_years/${this.props.match.params.ec_year_id}/graduation_course_supports.xlsx`)}>导出课程体系支撑矩阵</a>
</span> </span>
<div className="color-grey-9 mr10">用矩阵图的形式说明本专业课程体系对毕业要求的支撑关系 <a className={"color-blue"} onClick={() => window.elasticLayer(3534)} >查看详情</a></div> <div className="color-grey-9 mr10">用矩阵图的形式说明本专业课程体系对毕业要求的支撑关系 <a className={"color-blue"} onClick={() => this.toforums(`/forums/${3534}`)} >查看详情</a></div>
</div> </div>
<div className="padding20-30" id="training_objective_contents"> <div className="padding20-30" id="training_objective_contents">
@ -492,9 +631,9 @@ class CourseSupports extends Component {
<div className="ListTableLine" id="school_major_list" style={{overflow:'auto'}}> <div className="ListTableLine" id="school_major_list" style={{overflow:'auto'}}>
<p className="clearfix" style={{width: 120*data.max_support_count>1200? 140*data.max_support_count : 1200+"px"}}> <p className="clearfix" style={toptiebox}>
<span className="color-666 finishtarget">毕业要求指标点</span> <span className="color-666 finishtarget">毕业要求指标点</span>
{list(data.max_support_count<5||data.max_support_count===undefined?5:data.max_support_count)} {list(max_support_count<5||max_support_count===undefined?5:max_support_count)}
<span className="column-1 operationright color-666" <span className="column-1 operationright color-666"
style={{ style={{
paddingLeft: '28px' paddingLeft: '28px'
@ -506,7 +645,7 @@ class CourseSupports extends Component {
data.graduation_subitems===undefined? <Spin delay={500} className="Spinlarge" indicator={<Icon type="loading" style={{ fontSize: 30 }} spin />}/>:data.graduation_subitems.map((item,key)=>{ data.graduation_subitems===undefined? <Spin delay={500} className="Spinlarge" indicator={<Icon type="loading" style={{ fontSize: 30 }} spin />}/>:data.graduation_subitems.map((item,key)=>{
return ( return (
<li className={data.graduation_subitems.length===key+1?"clearfix mb10":"clearfix"} key={key} style={{width: 120*data.max_support_count > 1134 ? 136*data.max_support_count : 1134+"px",margin: '0px 0px'}}> <li className={data.graduation_subitems.length===key+1?"clearfix mb10":"clearfix"} key={key} style={ismidbox}>
<Tooltip placement="bottom" title={item.sequence_title}> <Tooltip placement="bottom" title={item.sequence_title}>
<span className="column-1 columnlocation" style={{display:Editkey!=key?"block":'none',width: '95px', paddingLeft: '23px'}}>{item.graduation_requirement_position+"-"+item.position}</span> <span className="column-1 columnlocation" style={{display:Editkey!=key?"block":'none',width: '95px', paddingLeft: '23px'}}>{item.graduation_requirement_position+"-"+item.position}</span>
</Tooltip> </Tooltip>
@ -521,7 +660,7 @@ class CourseSupports extends Component {
display:Editkey!=key?"block":'none', display:Editkey!=key?"block":'none',
marginRight: '-1px' marginRight: '-1px'
}}> }}>
<div data-tip-down={t.ec_course_name} className={t.top_relation===true?"DDred columnbox":"columnbox"} <div title={t.ec_course_name} className={t.top_relation===true?"DDred columnbox":"columnbox"}
style={{textAlign: 'center'}} style={{textAlign: 'center'}}
>{t.ec_course_name.length>12?t.ec_course_name.substring(0, 10)+"...":t.ec_course_name}</div> >{t.ec_course_name.length>12?t.ec_course_name.substring(0, 10)+"...":t.ec_course_name}</div>
<div className={t.top_relation===true?"DDred":""} <div className={t.top_relation===true?"DDred":""}
@ -540,27 +679,34 @@ class CourseSupports extends Component {
<div className="width20">{Math.round(item.weights_total*100)/100===0?0:(Math.round(item.weights_total*100)/100)}</div> <div className="width20">{Math.round(item.weights_total*100)/100===0?0:(Math.round(item.weights_total*100)/100)}</div>
</div> </div>
<div className="left operationalter"> <div className="left operationalter">
{data.is_manager===false?"":<a className="editSubentry" data-tip-down="编辑"> {this.props.year&&this.props.year.can_manager===false?"":<a className="editSubentry" title="编辑">
<i className="iconfont icon-bianjidaibeijing color-green" id={item.ec_graduation_subitem_id} subindex={item.sequence_num} onClick={this.EditSupportCourse.bind(this,key)}></i> <i className="iconfont icon-bianjidaibeijing color-green" id={item.id} subindex={item.graduation_requirement_position+"-"+item.position} onClick={this.EditSupportCourse.bind(this,key)}></i>
</a>} </a>}
</div> </div>
</div> </div>
</span> </span>
<style>
<p className="ListTableLine" id="school_ListTableLine" style={{width: '1134px',display:Editkey===key?"block":'none'}} > {
`
<p className="clearfix SystemModifythelist"> .ListTableLine li{ background: rgb(255, 255, 255);}
<span className="ml6" style={{width:'77px'}}>指标点 {index}</span> `
<span className="column-4">支撑课程</span> }
<span className="column-2 ml93"> </style>
{Editkey===key?
<p className="ListTableLine" id="school_ListTableLine" style={ismidbox} >
<div style={{width: '1134px'}}>
<p className="clearfix SystemModifythelist">
<span className="ml6" style={{width:'77px'}}>指标点 {index}</span>
<span className="column-4">支撑课程</span>
<span className="column-2 ml93">
<span> 权重(=1)</span> <span> 权重(=1)</span>
<span className="Systempoint">精确到两位小数</span> <span className="Systempoint">精确到两位小数</span>
</span> </span>
<span className="column-1 ml50">关联度最高</span> <span className="column-1 ml50">关联度最高</span>
</p> </p>
<div className="clearfix editorModify"> <div className="clearfix editorModify">
{Supportsclass===true?<style> {Supportsclass===true?<style>
{ {
` `
@ -570,77 +716,75 @@ class CourseSupports extends Component {
` `
} }
</style>:""} </style>:""}
{ {
editcourse.map((it,key)=>{ editcourse.map((it,key)=>{
return( return(
<div className="mb15" key={key}> <div className="mb15" key={key}>
<Select className={Supportsclasskey===key?"showredfont heightimportant":"heightimportant"} showSearch value={it.ec_course_name} onChange={this.handleChange}> <Select className={Supportsclasskey===key?"showredfont heightimportant":"heightimportant"} showSearch value={it.ec_course_name} onChange={this.handleChange}>
{ {
ec_courses_list.map((qva,qk)=>{ ec_courses_list.map((qva,qk)=>{
return( return(
<Option value={[qva.id,key,qva.name]} key={[qva.id,key,qva.name]}>{qva.name}</Option> <Option value={[qva.id,key,qva.name]} key={[qva.id,key,qva.name]}>{qva.name}</Option>
) )
}) })
} }
</Select> </Select>
<Input <Input
type="number" type="number"
size="large" size="large"
className={Supportssum===true?"inputWeight bor-red":"inputWeight"} className={Supportssum===true?"inputWeight bor-red":"inputWeight"}
id={key} id={key}
value={it.weights} value={it.weights}
onInput={this.enterweight.bind(this)} onInput={this.enterweight.bind(this)}
/> />
<div className="SetTheAssociated"> <div className="SetTheAssociated">
<div className="SetTheAssociatedchild"> <div className="SetTheAssociatedchild">
<i className="iconfont icon-gouxuan gouxuanbule" style={{display:it.top_relation===false?'none':'block'}} itindex={key} onClick={this.relevancetop.bind(this)}></i> <i className="iconfont icon-gouxuan gouxuanbule" style={{display:it.top_relation===false?'none':'block'}} itindex={key} onClick={this.relevancetop.bind(this)}></i>
<i className="iconfont icon-gouxuan gouxuanwhite" style={{display:it.top_relation===false?'block':'none'}} itindex={key} onClick={this.relevancebottom.bind(this)}></i> <i className="iconfont icon-gouxuan gouxuanwhite" style={{display:it.top_relation===false?'block':'none'}} itindex={key} onClick={this.relevancebottom.bind(this)}></i>
</div> </div>
<div className="left operatebutton"> <div className="left operatebutton">
<a className="mr15 delSubentry" data-tip-down="删除"> {editcourse.length===1?"":<a className="mr15 delSubentry" title="删除">
<i className="iconfont icon-shanchu color-grey-c font-15" onClick={()=>this.Deletcourses(key)}></i> <i className="iconfont icon-shanchu color-grey-c font-15" onClick={()=>this.Deletcourses(key)}></i>
</a> </a>}
<a className="newAddSubentry" data-tip-down="添加" <a className="newAddSubentry" title="添加"
style={{display:key===editcourse.length-1?"inline-block":'none'}} style={{display:key===editcourse.length-1?"inline-block":'none'}}
><i className="iconfont icon-tianjiafangda color-green" onClick={this.Addcourse}></i></a> ><i className="iconfont icon-tianjiafangda color-green" onClick={this.Addcourse}></i></a>
</div> </div>
</div> </div>
</div> </div>
) )
}) })
} }
</div> </div>
<span className="c_red none ml35 color-red" id="error_tip" style={{display:Supportssum===true||Supportsclass===true?'inline':'none'}}>{Supportslist}</span> <span className="c_red none ml35 color-red" id="error_tip" style={{display:Supportssum===true||Supportsclass===true?'inline':'none'}}>{Supportslist}</span>
<div className="clearfix editorModify"> <div className="clearfix editorModify">
<span className="column-1" <span className="column-1"
style={{ style={{
width: '580px', width: '580px',
paddingLeft: '37px', paddingLeft: '37px',
display: 'inline-block' display: 'inline-block'
}} }}
>合计: <span>{editcourse.length}</span></span> >合计: <span>{editcourse.length}</span></span>
<span className="ml30">合计: <span>{editnum}</span></span> <span className="ml30">合计: <span>{editnum}</span></span>
</div> </div>
<div className="right editlybuttonbox"> <div className="right editlybuttonbox">
<div className="defalutSubmitbtn fr" onClick={this.SubmitClassData}>保存</div> <div className="defalutSubmitbtn fr" onClick={this.SubmitClassData}>保存</div>
<div className="defalutCancelbtn fr mr20" onClick={this.CancelSupports}>取消</div> <div className="defalutCancelbtn fr mr20" onClick={this.CancelSupports}>取消</div>
</div> </div>
</div>
</p> </p>:""}
</li> </li>
) )
}) })

@ -14,13 +14,7 @@ import UpgradeModals from '../modals/UpgradeModals';
import { SnackbarHOC , getImageUrl, configShareForIndex} from 'educoder'; import { SnackbarHOC , getImageUrl, configShareForIndex} from 'educoder';
import Slider from '@icedesign/base/lib/slider'; import { Slider ,Rating} from "@icedesign/base";
import '@icedesign/base/lib/slider/style.js';
import Rating from '@icedesign/base/lib/rating';
import '@icedesign/base/lib/rating/style.js';
import './home.css'; import './home.css';

@ -766,9 +766,9 @@ submittojoinclass=(value)=>{
/> />
</li> </li>
<li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}> <Link to={`/moop_cases`}>教学案例</Link></li> <li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}> <Link to={`/moop_cases`}>教学案例</Link></li>
<li className={`${activePackages === true ? 'pr active' : 'pr'}`}> {/*<li className={`${activePackages === true ? 'pr active' : 'pr'}`}>*/}
<Link to={'/crowdsourcing'}>众包创新</Link> {/*<Link to={'/crowdsourcing'}>众包创新</Link>*/}
</li> {/*</li>*/}
<li className={`${activeForums === true ? 'active' : ''}`}> <Link to={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</Link></li> <li className={`${activeForums === true ? 'active' : ''}`}> <Link to={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</Link></li>
<li <li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}} style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}

@ -6,6 +6,8 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Rating ,Progress} from "@icedesign/base";
import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd';
import AccountProfile from"../user/AccountProfile"; import AccountProfile from"../user/AccountProfile";
@ -16,17 +18,6 @@ import axios from 'axios'
import Modals from '../modals/Modals'; import Modals from '../modals/Modals';
// import { Rating,Progress } from '@icedesign/base';
import Rating from '@icedesign/base/lib/rating';
import Progress from '@icedesign/base/lib/progress';
// 引入业务组件样式
import '@icedesign/base/lib/rating/style.js';
import '@icedesign/base/lib/progress/style.js';
import './shixuns/css/TPMBanner.css'; import './shixuns/css/TPMBanner.css';
let $ = window.$; let $ = window.$;
@ -633,7 +624,7 @@ class TPMBanner extends Component {
</ul> </ul>
<div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}> <div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
<div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div> <div className={"color-grey-c mb7"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo"> <div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/> <Rating value={star_info[0]} disabled allowHalf/>
</div> </div>

@ -6,7 +6,7 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
import Rating from '@icedesign/base/lib/rating'; import { Rating } from "@icedesign/base";
import axios from 'axios'; import axios from 'axios';

@ -7,24 +7,15 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import {getImageUrl,setImagesUrl, toPath} from 'educoder'; import { Rating ,Pagination} from "@icedesign/base";
import { Spin,Icon } from 'antd'; import {getImageUrl,setImagesUrl, toPath} from 'educoder';
import 'antd/lib/pagination/style/index.css'; import { Spin,Icon,Tooltip } from 'antd';
import './shixunCss/shixunCard.css'; import './shixunCss/shixunCard.css';
import Rating from '@icedesign/base/lib/rating';
import Pagination from '@icedesign/base/lib/pagination';
// 引入业务组件样式 // 引入业务组件样式
import '@icedesign/base/lib/pagination/style.js';
import '@icedesign/base/lib/rating/style.js';
import { Tooltip } from 'antd';
import axios from 'axios'; import axios from 'axios';
@ -125,7 +116,7 @@ class ShixunCard extends Component {
<p className="clearfix mt8 ml-3"> <p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf /> <Rating value={item.score_info===null?5:item.score_info} disabled allowHalf />
</span> </span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p> </p>

Loading…
Cancel
Save