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

dev_newshixunModel
杨树林 5 years ago
commit 31a29cfde0

@ -250,8 +250,9 @@ class ApplicationController < ActionController::Base
# 开放课程通过链接访问的用户
if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank?
content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}"
if Digest::MD5.hexdigest(content) == params[:chinaoocKey]
user = User.open_class_user
user = open_class_user
start_user_session(user) if user
User.current = user
end
@ -615,4 +616,27 @@ class ApplicationController < ActionController::Base
def set_export_cookies
cookies[:fileDownload] = true
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

@ -40,8 +40,8 @@ class CollegesController < ApplicationController
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,
(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
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")
(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 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)
@teachers =
@teachers.map do |teacher|

@ -14,7 +14,7 @@ class Ecs::StudentsController < Ecs::BaseController
end
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)
rescue Ecs::ImportStudentService::Error => ex
render_error(ex.message)

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

@ -368,7 +368,7 @@ class SubjectsController < ApplicationController
@schools.map do |s|
school_courses = Course.where(id: course_ids, school_id: s.id)
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
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})

@ -48,7 +48,7 @@ class GraduationWork < ApplicationRecord
def delete_atta atta
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
# 分班名

@ -106,7 +106,7 @@ class StudentWork < ApplicationRecord
def delete_atta atta
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
# 作品总体评价

File diff suppressed because it is too large Load Diff

@ -1,21 +1,20 @@
class Ecs::ImportStudentService < ApplicationService
Error = Class.new(StandardError)
attr_reader :ec_year, :attachment
attr_reader :ec_year, :params
def initialize(ec_year, attachment_id)
@ec_year = ec_year
@attachment = Attachment.find_by(id: attachment_id)
def initialize(ec_year, params)
@ec_year = ec_year
@params = params
end
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(path)
excel = Ecs::ImportStudentExcel.new(params[:file].path)
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|
success_count += 1
@ -25,7 +24,7 @@ class Ecs::ImportStudentService < ApplicationService
next
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

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

@ -40,8 +40,8 @@ class Users::ApplyProfessionalAuthService < ApplicationService
# sms_cache = Rails.cache.read("apply_pro_certification")
# if sms_cache.nil?
# sms_notify_admin
Rails.cache.write("apply_pro_certification", 1)
sms_notify_admin
# Rails.cache.write("apply_pro_certification", 1)
# 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')
.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 courses ON members.course_id = courses.id AND hc.course_id = courses.id')
.joins('LEFT JOIN course_members ON course_members.user_id = evaluate_records.user_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(created_at: yesterday).reorder(nil).count

@ -2,10 +2,10 @@ class StatisticSchoolReportTask
def call
School.find_each do |school|
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 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 })
.sum(:evaluate_count)

@ -53,12 +53,12 @@
<td><span class="apply-status-<%= apply.status %>"><%= apply.status_text %></span></td>
<% else %>
<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',
data: {
toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id,
url: refuse_admins_professional_authentication_path(apply, element: ".professional-authentication-#{apply.id}")
}) %>
}, 'data-disable-with': "拒绝中...") %>
</td>
<% end %>
</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.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
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,
"requires": true,
"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": {
"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",
@ -95,15 +81,10 @@
"resolved": "http://registry.npm.taobao.org/@emotion/unitless/download/@emotion/unitless-0.7.3.tgz",
"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": {
"version": "0.2.7",
"resolved": "http://registry.npm.taobao.org/@icedesign/base/download/@icedesign/base-0.2.7.tgz",
"integrity": "sha1-cFvLHH1UQVQKYuvsJRsGh56oN+U=",
"version": "0.2.8",
"resolved": "https://registry.npm.taobao.org/@icedesign/base/download/@icedesign/base-0.2.8.tgz",
"integrity": "sha1-hmlSY+17gnKJB3sbgoy446sqzAk=",
"requires": {
"async-validator": "^1.6.7",
"classnames": "^2.2.3",
@ -147,14 +128,6 @@
"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": {
"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",
@ -333,102 +306,6 @@
"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": {
"version": "1.3.2",
"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",
"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": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz",
@ -629,12 +501,9 @@
"dev": true
},
"async-validator": {
"version": "1.11.0",
"resolved": "http://registry.npm.taobao.org/async-validator/download/async-validator-1.11.0.tgz",
"integrity": "sha1-9i/RS8yjNvzalubdU9vR3dP8MZg=",
"requires": {
"babel-runtime": "6.x"
}
"version": "1.12.2",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.12.2.tgz",
"integrity": "sha1-vq5nHnF00pOLe0tp0vt+cit/1yw="
},
"asynckit": {
"version": "0.4.0",
@ -2825,14 +2694,6 @@
"resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz",
"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": {
"version": "2.6.5",
"resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.6.5.tgz",
@ -2916,18 +2777,9 @@
"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": {
"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="
},
"cross-spawn": {
@ -3494,14 +3346,6 @@
"resolved": "http://registry.npm.taobao.org/dom-align/download/dom-align-1.8.2.tgz",
"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": {
"version": "0.2.0",
"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": {
"version": "1.2.1",
"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",
"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": {
"version": "0.1.1",
"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",
"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": {
"version": "3.0.0",
"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",
"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": {
"version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/gzip-size/download/gzip-size-3.0.0.tgz",
@ -5319,11 +5131,6 @@
"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": {
"version": "1.2.5",
"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",
"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": {
"version": "3.3.2",
"resolved": "http://registry.npm.taobao.org/json3/download/json3-3.3.2.tgz",
@ -7100,11 +6899,6 @@
"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": {
"version": "4.5.0",
"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",
"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": {
"version": "2.3.0",
"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",
"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": {
"version": "4.0.2",
"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"
}
},
"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": {
"version": "2.4.4",
"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": {
"version": "7.4.22",
"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"
}
},
"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": {
"version": "1.17.14",
"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"
}
},
"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": {
"version": "2.5.0",
"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": {
"version": "1.15.2",
"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": {
"version": "2.6.2",
"resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-2.6.2.tgz",
@ -10181,17 +9628,6 @@
"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": {
"version": "4.0.1",
"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": {
"version": "3.0.4",
"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"
}
},
"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": {
"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=",
"requires": {
"chain-function": "^1.0.0",
@ -11135,15 +10547,6 @@
"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": {
"version": "2.3.0",
"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",
"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": {
"version": "0.3.0",
"resolved": "http://registry.npm.taobao.org/schema-utils/download/schema-utils-0.3.0.tgz",
@ -11406,11 +10800,6 @@
"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": {
"version": "1.1.0",
"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",
"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": {
"version": "1.0.1",
"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",
"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": {
"version": "0.0.33",
"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": {
"version": "1.0.7",
"resolved": "http://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz",

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@icedesign/base": "^0.2.5",
"@icedesign/base": "^0.2.8",
"@novnc/novnc": "^1.1.0",
"antd": "^3.23.2",
"array-flatten": "^2.1.2",

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

@ -315,9 +315,33 @@ class CoursesIndex extends Component{
if(isNaN(id)){
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 url ="/courses/"+id+"/left_banner.json"
axios.get(url).then((response) => {
axios.get(url,
{params:
dataqueryss
}
).then((response) => {
if(response!=undefined){
if(response.data&&response.data){
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)=>{
if(list){

@ -33,7 +33,7 @@ function CommonWorkAppraiseReviseAttachments(props) {
{item.title}
</a>
<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>
)
})}

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

@ -640,6 +640,8 @@ class CommonWorkList extends Component{
} else if (time_status === 4) {
timeMsg = '申诉剩余时间'
}
const hasData = student_works && !!student_works.length && page == 1
// console.log(StudentData)
// console.log(student_works)
@ -691,7 +693,7 @@ class CommonWorkList extends Component{
}
`}</style>
<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_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 className="clearfix">
<span className="fl color-grey-6 font-12">
{hasData && <span className="fl color-grey-6 font-12">
{ isAdmin ?
(!!all_member_count) && <React.Fragment>
<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>
</React.Fragment>
}
</span>
</span>}
{/* { 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">

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

@ -238,7 +238,8 @@ class CCommentItem extends Component{
<div className="comment_content clearfix" 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>
</div>
@ -373,8 +374,8 @@ class CCommentItem extends Component{
</Tooltip>
: ''} */}
</div>
{/* style={{ height: '130px'}} */}
<p className="orig_reply" >
{/* 去掉了orig_reply 影响到i标签 */}
<p className="" >
{/* 第二排右侧按钮区域 */}
{/* ${this.state.show_reply ? '回复' : '申诉'} */}
{(show_reply || show_appeal) &&

@ -94,9 +94,30 @@ class CoursesBanner extends Component {
this.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 url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => {
axios.get(url,{params:
dataqueryss
}).then((result) => {
if( result!=undefined){
let data = result.data;
this.setState({
@ -107,7 +128,28 @@ class CoursesBanner extends Component {
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 = () => {
this.setState({
show: true,

@ -498,7 +498,7 @@ class Exercise extends Component{
{/*}*/}
</p>
<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_published_counts}</span>
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>

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

@ -50,7 +50,8 @@ class GraduationTasksnew extends Component {
}
Commoninterface =(fileList)=>{
let coursesId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let listid = []
for (var list of fileList) {
@ -90,7 +91,8 @@ class GraduationTasksnew extends Component {
// GraduationTasksnewtype = false;
// this.goback();
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) => {

@ -958,6 +958,7 @@ class GraduationTaskssettinglist extends Component{
}
console.log(this.props.questionslist.status)
return(
<React.Fragment>
@ -1100,7 +1101,7 @@ class GraduationTaskssettinglist extends Component{
this.props.isAdmin() ?
<div className="stud-class-set">
<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">
<span className="fl mr10 color-grey-8">教师评阅</span>
@ -1200,9 +1201,9 @@ class GraduationTaskssettinglist extends Component{
</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>
{`
.edu-menu-lists li:hover {
@ -1251,7 +1252,7 @@ class GraduationTaskssettinglist extends Component{
</div>
:""}
</div>
</div>}
{
JSON.stringify(data)==="[]" ?

@ -517,7 +517,7 @@ class Poll extends Component{
}
</p>
<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_published_counts}</span>
<span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>

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

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

@ -34,7 +34,13 @@ class CourseSupports extends Component {
Supportslist:'',
Supportssum: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)
.then((response) => {
if(response.status===200){
this.setState({
data:response.data
})
console.log(response.data.graduation_subitems.length)
if(response.data.graduation_subitems.length===0){
this.setState({
Supportstype:true,
data:response.data,
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){
this.setState({
editcourse:item.course_supports,
neweditcourse:item.course_supports,
Editkey:key,
index:subindex,
ec_graduation_subitem_id:id,
})
}else if(item.course_supports.length===0){
this.setState({
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,
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();
// let offsettop=$("#school_ListTableLine").position().top||$("#school_ListTableLine").scrollTop || $("#school_ListTableLine").pageYOffset;
// window.scrollTo(0, offsettop)
@ -176,7 +217,12 @@ class CourseSupports extends Component {
Addcourse=(e)=>{
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:''};
neweditcourse.push(newadd);
this.setState({
@ -194,29 +240,49 @@ class CourseSupports extends Component {
// 删除
// let id =e.target.getAttribute("index");
let {editcourse} = this.state;
let neweditcourse=editcourse;
neweditcourse.splice(e,1);
let newnum=0;
for(var j=0;j<neweditcourse.length;j++){
if(neweditcourse[j].weights===undefined){
newnum=0
}else{
newnum=newnum+neweditcourse[j].weights;
}
}
newnum= Math.round(newnum*100)/100;
this.setState({
Supportstype:false,
supportid:null,
Supportslist:"",
editcourse:neweditcourse,
editnum:newnum
})
let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
if(neweditcourse.length>1){
neweditcourse.splice(e,1);
let newnum=0;
for(var j=0;j<neweditcourse.length;j++){
if(neweditcourse[j].weights===undefined){
newnum=0
}else{
newnum=newnum+neweditcourse[j].weights;
}
}
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)=>{
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 value=parseFloat(e.target.value);
if(isNaN(value)){
@ -231,7 +297,11 @@ class CourseSupports extends Component {
Supportssum:true
})
return
}
}else{
this.setState({
Supportssum:false
})
}
const person = new Object ();
@ -266,15 +336,25 @@ class CourseSupports extends Component {
Supportslist:'权重之和不能大于1',
Supportssum:true
})
}
}else{
this.setState({
Supportssum:false
})
}
}
handleChange=(e)=> {
let {editcourse} = this.state;
let value=`${e[0]}`;
value=parseInt(value)
let neweditcourse=editcourse;
let arr=new Array();
editcourse.map((item,key)=>{
arr.push(item)
})
let neweditcourse=arr;
let value=`${e[0]}`;
value=parseInt(value)
let num=`${e[1]}`;
num=parseInt(num)
@ -298,7 +378,13 @@ class CourseSupports extends Component {
relevancetop=(e)=>{
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");
for(var i=0;i<1;i++){
neweditcourse[id].top_relation=false;
@ -310,7 +396,11 @@ class CourseSupports extends Component {
relevancebottom=(e)=>{
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");
for(var i=0;i<1;i++){
neweditcourse[id].top_relation=true;
@ -326,14 +416,20 @@ class CourseSupports extends Component {
this.inputNumberRef.blur();
}
CancelSupports=()=>{
let{editcourse,neweditcourse}=this.state;
//
// console.log(editcourse)
// console.log(neweditcourse)
this.setState({
Editkey:null,
Supportssum:false,
Supportsclass:false,
editcourse:neweditcourse
})
}
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){
this.setState({
// 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, {
ec_year_id: ec_year_id,
ec_graduation_subitem_id:ec_graduation_subitem_id,
course: editcourse
},
{
withCredentials: true
graduation_subitem_id :ec_graduation_subitem_id,
course_supports: editcourse
}
).then((response) => {
if(response.data.status===0){
this.setState({
Editkey:null,
Supportslist:response.data.messsage,
Supportstype:true,
Supportssum:false,
Supportsclass:false,
Supportsclasskey:undefined,
})
this.UpdateClassData();
if(response.data.id===ec_graduation_subitem_id){
// this.setState({
// Editkey:null,
// Supportslist:"保存成功",
// Supportstype:true,
// Supportssum:false,
// Supportsclass:false,
// Supportsclasskey:undefined,
// })
this.UpdateClassData();
this.setState({
Editkey:null,
Supportssum:false,
Supportsclass:false,
})
}else if(response.data.status===-1){
this.setState({
Supportslist:"参数错误",
Supportstype:true,
Supportssum:false,
Supportsclass:false,
Supportsclasskey:undefined,
})
// this.setState({
// Supportslist:"参数错误",
// Supportstype:true,
// Supportssum:false,
// Supportsclass:false,
// Supportsclasskey:undefined,
// })
}
}).catch((error) => {
console.log(error)
@ -428,9 +528,41 @@ class CourseSupports extends Component {
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() {
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 res = [];
for(var i = 0; i < length; i++) {
@ -443,6 +575,11 @@ class CourseSupports extends Component {
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 (
<div className="newMain clearfix">
<Modal
@ -468,7 +605,7 @@ class CourseSupports extends Component {
</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'}}>
<span className="font-18 courseSystem">课程体系对毕业要求的支撑</span>
{/* <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>
<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 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'}}>
<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>
{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"
style={{
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)=>{
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}>
<span className="column-1 columnlocation" style={{display:Editkey!=key?"block":'none',width: '95px', paddingLeft: '23px'}}>{item.graduation_requirement_position+"-"+item.position}</span>
</Tooltip>
@ -521,7 +660,7 @@ class CourseSupports extends Component {
display:Editkey!=key?"block":'none',
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'}}
>{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":""}
@ -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>
<div className="left operationalter">
{data.is_manager===false?"":<a className="editSubentry" data-tip-down="编辑">
<i className="iconfont icon-bianjidaibeijing color-green" id={item.ec_graduation_subitem_id} subindex={item.sequence_num} onClick={this.EditSupportCourse.bind(this,key)}></i>
{this.props.year&&this.props.year.can_manager===false?"":<a className="editSubentry" title="编辑">
<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>}
</div>
</div>
</span>
<p className="ListTableLine" id="school_ListTableLine" style={{width: '1134px',display:Editkey===key?"block":'none'}} >
<p className="clearfix SystemModifythelist">
<span className="ml6" style={{width:'77px'}}>指标点 {index}</span>
<span className="column-4">支撑课程</span>
<span className="column-2 ml93">
<style>
{
`
.ListTableLine li{ background: rgb(255, 255, 255);}
`
}
</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 className="Systempoint">精确到两位小数</span>
</span>
<span className="column-1 ml50">关联度最高</span>
</p>
<span className="column-1 ml50">关联度最高</span>
</p>
<div className="clearfix editorModify">
<div className="clearfix editorModify">
{Supportsclass===true?<style>
{
`
@ -570,77 +716,75 @@ class CourseSupports extends Component {
`
}
</style>:""}
{
editcourse.map((it,key)=>{
return(
<div className="mb15" key={key}>
<Select className={Supportsclasskey===key?"showredfont heightimportant":"heightimportant"} showSearch value={it.ec_course_name} onChange={this.handleChange}>
{
ec_courses_list.map((qva,qk)=>{
return(
<Option value={[qva.id,key,qva.name]} key={[qva.id,key,qva.name]}>{qva.name}</Option>
)
})
}
</Select>
<Input
type="number"
size="large"
className={Supportssum===true?"inputWeight bor-red":"inputWeight"}
id={key}
value={it.weights}
onInput={this.enterweight.bind(this)}
/>
<div className="SetTheAssociated">
<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 gouxuanwhite" style={{display:it.top_relation===false?'block':'none'}} itindex={key} onClick={this.relevancebottom.bind(this)}></i>
</div>
<div className="left operatebutton">
<a className="mr15 delSubentry" data-tip-down="删除">
<i className="iconfont icon-shanchu color-grey-c font-15" onClick={()=>this.Deletcourses(key)}></i>
</a>
<a className="newAddSubentry" data-tip-down="添加"
style={{display:key===editcourse.length-1?"inline-block":'none'}}
><i className="iconfont icon-tianjiafangda color-green" onClick={this.Addcourse}></i></a>
</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>
<div className="clearfix editorModify">
{
editcourse.map((it,key)=>{
return(
<div className="mb15" key={key}>
<Select className={Supportsclasskey===key?"showredfont heightimportant":"heightimportant"} showSearch value={it.ec_course_name} onChange={this.handleChange}>
{
ec_courses_list.map((qva,qk)=>{
return(
<Option value={[qva.id,key,qva.name]} key={[qva.id,key,qva.name]}>{qva.name}</Option>
)
})
}
</Select>
<Input
type="number"
size="large"
className={Supportssum===true?"inputWeight bor-red":"inputWeight"}
id={key}
value={it.weights}
onInput={this.enterweight.bind(this)}
/>
<div className="SetTheAssociated">
<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 gouxuanwhite" style={{display:it.top_relation===false?'block':'none'}} itindex={key} onClick={this.relevancebottom.bind(this)}></i>
</div>
<div className="left operatebutton">
{editcourse.length===1?"":<a className="mr15 delSubentry" title="删除">
<i className="iconfont icon-shanchu color-grey-c font-15" onClick={()=>this.Deletcourses(key)}></i>
</a>}
<a className="newAddSubentry" title="添加"
style={{display:key===editcourse.length-1?"inline-block":'none'}}
><i className="iconfont icon-tianjiafangda color-green" onClick={this.Addcourse}></i></a>
</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>
<div className="clearfix editorModify">
<span className="column-1"
style={{
width: '580px',
paddingLeft: '37px',
display: 'inline-block'
}}
>合计: <span>{editcourse.length}</span></span>
<span className="ml30">合计: <span>{editnum}</span></span>
</div>
<div className="right editlybuttonbox">
<div className="defalutSubmitbtn fr" onClick={this.SubmitClassData}>保存</div>
<div className="defalutCancelbtn fr mr20" onClick={this.CancelSupports}>取消</div>
</div>
</p>
style={{
width: '580px',
paddingLeft: '37px',
display: 'inline-block'
}}
>合计: <span>{editcourse.length}</span></span>
<span className="ml30">合计: <span>{editnum}</span></span>
</div>
<div className="right editlybuttonbox">
<div className="defalutSubmitbtn fr" onClick={this.SubmitClassData}>保存</div>
<div className="defalutCancelbtn fr mr20" onClick={this.CancelSupports}>取消</div>
</div>
</div>
</p>:""}
</li>
)
})

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

@ -85,7 +85,7 @@ class VNCContainer extends Component {
})
}
onTreeSelect = (selectedKeys, info) => {
const isLeaf = info.node.props.isLeaf;
const isLeaf = info.node.isLeaf();
if (isLeaf) { // 叶子节点
selectedKeys.length && this.setState({
fileTreeSelectedKeys: selectedKeys

@ -7,7 +7,7 @@ import 'rc-tree/assets/index.css';
const $ = window.$;
export default function RepoTree(props) {
const { fileTreeData, onLoadData, onTreeSelect, fileTreeSelectedKeys, loadRepoFiles } = props;
const { fileTreeData, onLoadData, fileTreeSelectedKeys, loadRepoFiles } = props;
const [expandedKeys, setExpandedKeys] = useState([])
useEffect(() => {
loadRepoFiles()
@ -36,7 +36,19 @@ export default function RepoTree(props) {
};
const treeNodes = loop(fileTreeData);
function onTreeSelect(selectedKeys, info) {
if (!info.node.isLeaf()) {
const _expandedKeys = expandedKeys.slice(0)
const _index = _expandedKeys.indexOf(selectedKeys[0]);
if (_index == -1) {
_expandedKeys.push(selectedKeys[0])
} else {
_expandedKeys.splice( _index, 1)
}
setExpandedKeys( _expandedKeys )
}
props.onTreeSelect(selectedKeys, info)
}
// selectable={false}
return (
<Tree

@ -147,4 +147,8 @@
}
.xterm .xterm-viewport {
overflow-y: auto !important;
}
.repoFilesDrawer .rc-tree {
user-select: none;
}

@ -65,6 +65,7 @@ class CodeRepositoryView extends Component {
expandedKeys.push( index === 0 ? item : expandedKeys[index - 1] + '/' + item)
})
}
expandedKeys.length = 1 // 没办法做到多级初始化
// 初始化时无法展开到根节点 https://github.com/fis-components/rc-tree/issues/3
expandedKeys.length && this.setState({
expandedKeys,
@ -110,10 +111,23 @@ class CodeRepositoryView extends Component {
// $('#codetab_con_1 .codemirrorBackground').hide()
}
onTreeSelect = (selectedKeys, info) => {
if (!info.node.isLeaf()) {
const expandedKeys = this.state.expandedKeys.slice(0)
const _index = expandedKeys.indexOf(selectedKeys[0]);
if (_index == -1) {
expandedKeys.push(selectedKeys[0])
} else {
expandedKeys.splice( _index, 1)
}
this.setState({ expandedKeys })
}
this.props.onTreeSelect(selectedKeys, info)
}
buildTree() {
// TODO http://localhost:3007/tasks/xgffnuomytpj 这个实训没有文件树
const { fileTreeData, onLoadData, onTreeSelect, fileTreeSelectedKeys } = this.props;
const { fileTreeData, onLoadData, fileTreeSelectedKeys } = this.props;
if (!fileTreeData || fileTreeData.length === 0) {
return ""
}
@ -136,7 +150,7 @@ class CodeRepositoryView extends Component {
return (
<Tree
selectedKeys={fileTreeSelectedKeys}
onSelect={onTreeSelect}
onSelect={this.onTreeSelect}
onExpand={this.onExpand}
expandedKeys={this.state ? this.state.expandedKeys : []}
autoExpandParent={this.state.autoExpandParent}

@ -223,7 +223,7 @@ class CodeRepositoryViewContainer extends Component {
});
}
onTreeSelect = (selectedKeys, info) => {
const isLeaf = info.node.props.isLeaf;
const isLeaf = info.node.isLeaf();
if (isLeaf) { // 叶子节点
selectedKeys.length && this.setState({
fileTreeSelectedKeys: selectedKeys

@ -766,9 +766,9 @@ submittojoinclass=(value)=>{
/>
</li>
<li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}> <Link to={`/moop_cases`}>教学案例</Link></li>
<li className={`${activePackages === true ? 'pr active' : 'pr'}`}>
<Link to={'/crowdsourcing'}>众包创新</Link>
</li>
{/*<li className={`${activePackages === true ? 'pr active' : 'pr'}`}>*/}
{/*<Link to={'/crowdsourcing'}>众包创新</Link>*/}
{/*</li>*/}
<li className={`${activeForums === true ? 'active' : ''}`}> <Link to={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</Link></li>
<li
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 { Rating ,Progress} from "@icedesign/base";
import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd';
import AccountProfile from"../user/AccountProfile";
@ -16,17 +18,6 @@ import axios from 'axios'
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';
let $ = window.$;
@ -633,7 +624,7 @@ class TPMBanner extends Component {
</ul>
<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">
<Rating value={star_info[0]} disabled allowHalf/>
</div>

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

@ -7,24 +7,15 @@ import PropTypes from 'prop-types';
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 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';

Loading…
Cancel
Save