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

PCqiandao
daiao 5 years ago
commit 71a77ac7b2

3
.gitignore vendored

@ -7,6 +7,7 @@
# Ignore bundler config.
/.bundle
/bundle
/node_modules
# Ignore lock config file
*.lock
@ -46,6 +47,8 @@
/public/h5build
/public/npm-debug.log
/dist
# avatars
/public/images/avatars

@ -30,7 +30,7 @@ class CoursesController < ApplicationController
:informs, :update_informs, :online_learning, :update_task_position, :tasks_list,
:join_excellent_course, :export_couser_info, :export_member_act_score, :new_informs,
:delete_informs, :change_member_role, :course_groups, :join_course_group, :statistics,
:work_score, :act_score, :calculate_all_shixun_scores, :move_to_category]
:work_score, :act_score, :calculate_all_shixun_scores, :move_to_category, :watch_video_histories]
before_action :user_course_identity, except: [:join_excellent_course, :index, :create, :new, :apply_to_join_course,
:search_course_list, :get_historical_course_students, :mine, :search_slim, :board_list]
before_action :teacher_allowed, only: [:update, :destroy, :settings, :search_teacher_candidate,
@ -114,7 +114,7 @@ class CoursesController < ApplicationController
#sql = "left join videos on videos.id=course_videos.video_id AND (videos.transcoded=1 OR videos.user_id = #{current_user.id})"
#@videos = paginate videos.joins(sql).includes(video: [user: :user_extension], user: :user_extension)
videos = videos.includes(video: [user: :user_extension], user: :user_extension)
videos = videos.includes(video: [user: :user_extension],user: :user_extension).select("course_videos.id, course_videos.title, course_videos.link, course_videos.user_id")
videos = videos.where(videos: {transcoded: true})
.or(videos.where(videos: {user_id: current_user.id}))
.or(videos.where(course_videos: {is_link: true}))
@ -1481,6 +1481,23 @@ class CoursesController < ApplicationController
end
end
def watch_video_histories
@videos = CourseVideo.find_by_sql("
SELECT course_videos.id, videos.user_id, videos.title, IFNULL(hisotries.time,0) AS time, IFNULL(hisotries.num,0) AS num
FROM course_videos
JOIN videos ON course_videos.course_id = #{@course.id} AND videos.id = course_videos.video_id
LEFT JOIN (
SELECT watch_course_videos.course_video_id, sum(watch_course_videos.total_duration) AS time, count(watch_course_videos.course_video_id) AS num
FROM watch_course_videos
JOIN course_videos ON course_videos.id = watch_course_videos.course_video_id
WHERE course_videos.course_id = #{@course.id}
GROUP BY watch_course_videos.course_video_id
) AS hisotries ON hisotries.course_video_id = course_videos.id
")
@count = @videos.count
@videos = paginate @videos
end
private
# Use callbacks to share common setup or constraints between actions.

@ -367,9 +367,9 @@ class FilesController < ApplicationController
@category_name = category.try(:module_name)
else
@category = CourseSecondCategory.find category_id
@category_id = category.try(:id)
@category_name = category.try(:name)
@parent_category_id = category&.parent_id.to_i
@category_id = @category.try(:id)
@category_name = @category.try(:name)
@parent_category_id = @category&.parent_id.to_i
end
end

@ -5,6 +5,6 @@ class WatchVideoHistoriesController < ApplicationController
watch_log = CreateWatchVideoService.new(current_user, request, params).call
render_ok(log_id: watch_log&.id)
rescue CreateWatchVideoService::Error => ex
render_error(ex.message)
render_ok(log_id: watch_log&.id)
end
end

@ -114,6 +114,8 @@ class Weapps::AttendancesController < ApplicationController
@course_members = @course.students if @_is_current_attendance
@all_attendances = @attendance.course_member_attendances
@user = @attendance.user
end
def update

@ -14,6 +14,9 @@ class Weapps::CourseMemberAttendancesController < ApplicationController
@members = @members.where(course_group_id: params[:group_ids])
end
@page = params[:page] || 1
@limit = params[:limit] || 5
if params[:attendance_status].present?
@members = @members.joins(:course_member_attendances).where(course_member_attendances: {course_attendance_id: attendance.id, attendance_status: params[:attendance_status]})
end

@ -81,6 +81,8 @@ module CoursesHelper
"/classrooms/#{course.id}/statistics"
when "video"
"/classrooms/#{course.id}/course_videos"
when "attendance"
"/classrooms/#{course.id}/attendances"
end
end
@ -131,31 +133,33 @@ module CoursesHelper
# 课堂模块的任务数
def course_task_count(course, module_type)
case module_type
when "shixun_homework"
get_homework_commons_count(course, 4, 0)
when "common_homework"
get_homework_commons_count(course, 1, 0)
when "group_homework"
get_homework_commons_count(course, 3, 0)
when "graduation"
0
when "exercise"
course.exercises_count
when "poll"
course.polls_count
when "attachment"
get_attachment_count(course, 0)
when "board"
course_board = course.course_board
course_board.present? ? course_board.messages.size : 0
when "course_group"
course.course_groups_count
when "announcement"
course.informs.count
when "online_learning"
course.shixuns.count
when "video"
course.videos_count + course.live_links.count
when "shixun_homework"
get_homework_commons_count(course, 4, 0)
when "common_homework"
get_homework_commons_count(course, 1, 0)
when "group_homework"
get_homework_commons_count(course, 3, 0)
when "graduation"
0
when "exercise"
course.exercises_count
when "poll"
course.polls_count
when "attachment"
get_attachment_count(course, 0)
when "board"
course_board = course.course_board
course_board.present? ? course_board.messages.size : 0
when "course_group"
course.course_groups_count
when "announcement"
course.informs.count
when "online_learning"
course.shixuns.count
when "video"
course.videos_count + course.live_links.count
when "attendance"
course.course_attendances.count
end
end

@ -226,7 +226,7 @@ class Course < ApplicationRecord
end
def all_course_module_types
%w[activity announcement online_learning shixun_homework common_homework group_homework exercise attachment course_group graduation poll board statistics video]
%w[activity announcement online_learning shixun_homework common_homework group_homework exercise attachment course_group graduation poll board statistics video attendance]
end
def get_course_module_by_type(type)
@ -429,6 +429,7 @@ class Course < ApplicationRecord
when 'video' then '视频直播'
when 'board' then '讨论'
when 'course_group' then '分班'
when 'attendance' then '签到'
when 'statistics' then '统计'
else ''
end
@ -449,7 +450,8 @@ class Course < ApplicationRecord
when 'video' then 11
when 'board' then 12
when 'course_group' then 13
when 'statistics' then 14
when 'attendance' then 14
when 'statistics' then 15
else 100
end
end

@ -10,31 +10,36 @@ class CreateWatchVideoService < ApplicationService
def call
ActiveRecord::Base.transaction do
current_time = Time.now
params[:watch_duration] = params[:watch_duration].to_f.round(2)
params[:total_duration] = params[:total_duration].to_f.round(2)
params[:duration] = params[:duration].to_f.round(2)
if params[:log_id].present?
if params[:total_duration].to_f < params[:watch_duration].to_f || params[:watch_duration].to_f < 0
raise Error, '观看时长错误'
watch_video_history = user.watch_video_histories.find(params[:log_id])
if params[:total_duration] < params[:watch_duration]
return watch_video_history
end
# 更新观看时长
watch_video_history = user.watch_video_histories.find(params[:log_id])
if watch_video_history.present? && watch_video_history.watch_duration <= params[:watch_duration].to_f && params[:total_duration].to_f > watch_video_history.total_duration
if watch_video_history.present? && !watch_video_history.is_finished && watch_video_history.watch_duration <= params[:watch_duration] && watch_video_history.total_duration <= params[:total_duration]
# 如果观看总时长没变,说明视频没有播放,无需再去记录
watch_video_history.end_at = current_time
watch_video_history.total_duration = params[:total_duration]
watch_video_history.watch_duration = params[:watch_duration].to_f > watch_video_history.duration ? watch_video_history.duration : params[:watch_duration]
watch_video_history.watch_duration = params[:watch_duration] > watch_video_history.duration ? watch_video_history.duration : params[:watch_duration]
watch_video_history.is_finished = params[:ed].present?
watch_video_history.save!
watch_course_video = watch_video_history.watch_course_video
if watch_course_video.present? && !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration].to_f
# 更新课程视频的时长及是否看完状态
watch_course_video.watch_duration = params[:watch_duration]
if params[:ed].present?
watch_course_video.is_finished = watch_course_video.watch_video_histories.sum(:total_duration) >= watch_course_video.duration
end
if watch_course_video.present?
watch_course_video.total_duration = watch_course_video.watch_video_histories.sum(:total_duration)
watch_course_video.end_at = current_time
if !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration]
# 更新课程视频的时长及是否看完状态
watch_course_video.watch_duration = params[:watch_duration]
if params[:ed].present?
watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration
end
end
watch_course_video.save!
end
end
@ -47,11 +52,10 @@ class CreateWatchVideoService < ApplicationService
d.start_at = current_time
d.duration = params[:duration]
end
watch_video_history = build_video_log(current_time, course_video.video_id, watch_course_video.id)
watch_video_history.save!
watch_course_video.save! unless watch_course_video.persisted?
watch_video_history = build_video_log(current_time, course_video.video_id, watch_course_video.id)
watch_video_history.save!
else
# 非课堂视频
video = Video.find(params[:video_id])

@ -1,5 +1,5 @@
json.attendances @attendances do |attendance|
json.(attendance, :id, :name, :normal_count, :all_count, :mode)
json.(attendance, :id, :name, :normal_count, :all_count, :mode, :attendance_code)
json.author do
user = attendance.user
json.user_name user.real_name

@ -10,6 +10,8 @@ json.videos @videos do |video|
json.user_login user&.login
else
json.partial! 'users/videos/video', locals: { video: video.video }
json.total_time video.watch_course_videos.sum(:total_duration).round(0)
json.people_num video.watch_course_videos.count(:user_id)
end
end

@ -0,0 +1,10 @@
json.videos do
json.array! @videos do |v|
json.id v.id
json.title v.title
json.user_name v.user&.real_name
json.people_num v.num
json.total_time v.time
end
end
json.count @count

@ -9,6 +9,10 @@ json.name @attendance.name
json.attendance_date @attendance.attendance_date.strftime("%Y-%m-%d")
json.start_time @attendance.start_time.strftime("%H:%M")
json.end_time @attendance.end_time.strftime("%H:%M")
json.author do
json.user_name @user.real_name
json.user_login @user.login
end
# json.course_groups @group_ids do |group|
# json.(group, :id, :name, :course_members_count)

@ -4,8 +4,9 @@
# json.student_id member.user&.student_id
# end
json.member_attendances @members.each do |member|
json.member_attendances @members.each_with_index.to_a do |member, index|
json.(member, :user_id)
json.index (@page.to_i - 1) * @limit.to_i + index + 1
json.user_name member.user&.real_name
json.student_id member.user&.student_id
json.attendance_status @member_attendances.select{|attendance| attendance.course_member_id == member.id}.first&.attendance_status || "ABSENCE"

@ -531,6 +531,7 @@ Rails.application.routes.draw do
post :inform_up
post :inform_down
get :calculate_all_shixun_scores
get :watch_video_histories
end
collection do

@ -0,0 +1,16 @@
class AddAttendanceToCourseModule < ActiveRecord::Migration[5.2]
def change
Course.all.each do |course|
unless course.course_modules.exists?(module_type: "attendance")
atta_position = course.course_modules.find_by(module_type: 'course_group')&.position.to_i
attendance_position = atta_position != 0 ? (atta_position + 1) : 14
course.course_modules.where("position >= #{attendance_position}").update_all("position = position + 1")
if course.is_end
course.course_modules << CourseModule.new(module_type: "attendance", hidden: 1, module_name: "签到", position: attendance_position)
else
course.course_modules << CourseModule.new(module_type: "attendance", hidden: 0, module_name: "签到", position: attendance_position)
end
end
end
end
end

@ -0,0 +1,8 @@
class AddTotalDurationToWatchCourseDuration < ActiveRecord::Migration[5.2]
def change
add_column :watch_course_videos, :total_duration, :float, default: 0
WatchVideoHistory.where("created_at < '2020-03-14 00:00:00'").each do |d|
d.watch_course_video.increment!(:total_duration, d.total_duration) if d.watch_course_video.present?
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -61,6 +61,7 @@
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.6.1",
"qrcode.react": "^1.0.0",
"qs": "^6.6.0",
"quill": "^1.3.7",
"quill-delta-to-html": "^0.11.0",

@ -30,6 +30,24 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe736;</span>
<div class="name">签到-02</div>
<div class="code-name">&amp;#xe736;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe737;</span>
<div class="name">下箭头</div>
<div class="code-name">&amp;#xe737;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe735;</span>
<div class="name">签到-01</div>
<div class="code-name">&amp;#xe735;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe734;</span>
<div class="name">移动</div>
@ -2060,6 +2078,33 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-qiandao-1"></span>
<div class="name">
签到-02
</div>
<div class="code-name">.icon-qiandao-1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiajiantou2"></span>
<div class="name">
下箭头
</div>
<div class="code-name">.icon-xiajiantou2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-qiandao-"></span>
<div class="name">
签到-01
</div>
<div class="code-name">.icon-qiandao-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yidong"></span>
<div class="name">
@ -5059,6 +5104,30 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-qiandao-1"></use>
</svg>
<div class="name">签到-02</div>
<div class="code-name">#icon-qiandao-1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiajiantou2"></use>
</svg>
<div class="name">下箭头</div>
<div class="code-name">#icon-xiajiantou2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-qiandao-"></use>
</svg>
<div class="name">签到-01</div>
<div class="code-name">#icon-qiandao-</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yidong"></use>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,6 +5,27 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "13428689",
"name": "签到-02",
"font_class": "qiandao-1",
"unicode": "e736",
"unicode_decimal": 59190
},
{
"icon_id": "13428658",
"name": "下箭头",
"font_class": "xiajiantou2",
"unicode": "e737",
"unicode_decimal": 59191
},
{
"icon_id": "13427273",
"name": "签到-01",
"font_class": "qiandao-",
"unicode": "e735",
"unicode_decimal": 59189
},
{
"icon_id": "13353315",
"name": "移动",

@ -20,6 +20,15 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="qiandao-1" unicode="&#59190;" d="M881.509434-128h-724.528302a157.584906 157.584906 0 0 0-156.981132 156.981132v603.773585a157.584906 157.584906 0 0 0 156.981132 156.981132h724.528302a157.584906 157.584906 0 0 0 156.981132-156.981132v-603.773585a157.584906 157.584906 0 0 0-156.981132-156.981132z m-724.528302 845.283019a84.528302 84.528302 0 0 1-84.528302-84.528302v-603.773585a84.528302 84.528302 0 0 1 84.528302-84.528302h724.528302a84.528302 84.528302 0 0 1 84.528302 84.528302v603.773585a84.528302 84.528302 0 0 1-84.528302 84.528302zM277.735849 859.773585v-241.509434M277.735849 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 1 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM760.754717 859.773585v-241.509434M760.754717 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 0 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM486.641509 149.735849a37.433962 37.433962 0 0 0-27.773584 10.867925l-175.09434 181.132075a36.226415 36.226415 0 0 0 0 51.320755 36.830189 36.830189 0 0 0 51.320755 0l152.754717-158.792453 281.962264 221.584906a36.226415 36.226415 0 0 0 50.716981-6.037736 36.830189 36.830189 0 0 0-6.037736-51.320755l-307.320755-241.509434a38.037736 38.037736 0 0 0-20.528302-7.245283z" horiz-adv-x="1038" />
<glyph glyph-name="xiajiantou2" unicode="&#59191;" d="M796.390468-127.928326a113.768929 113.768929 0 0 0-86.464386 39.819126l-682.613575 796.382503A113.768929 113.768929 0 1 0 200.24128 856.172911L796.390468 156.493997 1392.539656 851.622154a113.768929 113.768929 0 0 0 172.928773-147.899608l-682.613575-796.382504A113.768929 113.768929 0 0 0 796.390468-127.928326z" horiz-adv-x="1592" />
<glyph glyph-name="qiandao-" unicode="&#59189;" d="M881.509434-128h-724.528302a157.584906 157.584906 0 0 0-156.981132 156.981132v603.773585a157.584906 157.584906 0 0 0 156.981132 156.981132h724.528302a157.584906 157.584906 0 0 0 156.981132-156.981132v-603.773585a157.584906 157.584906 0 0 0-156.981132-156.981132z m-724.528302 845.283019a84.528302 84.528302 0 0 1-84.528302-84.528302v-603.773585a84.528302 84.528302 0 0 1 84.528302-84.528302h724.528302a84.528302 84.528302 0 0 1 84.528302 84.528302v603.773585a84.528302 84.528302 0 0 1-84.528302 84.528302zM277.735849 859.773585v-241.509434M277.735849 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 1 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM760.754717 859.773585v-241.509434M760.754717 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 0 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM486.641509 149.73584900000003a37.433962 37.433962 0 0 0-27.773584 10.867925l-175.09434 181.132075a36.226415 36.226415 0 0 0 0 51.320755 36.830189 36.830189 0 0 0 51.320755 0l152.754717-158.792453 281.962264 221.584906a36.226415 36.226415 0 0 0 50.716981-6.037736 36.830189 36.830189 0 0 0-6.037736-51.320755l-307.320755-241.509434a38.037736 38.037736 0 0 0-20.528302-7.245283z" horiz-adv-x="1038" />
<glyph glyph-name="yidong" unicode="&#59188;" d="M855.341176-121.976471H174.682353c-90.352941 0-156.611765 72.282353-156.611765 156.611765V721.317647C18.070588 811.670588 90.352941 877.929412 174.682353 877.929412h680.658823c90.352941 0 156.611765-72.282353 156.611765-156.611765v-78.305882h-90.352941V721.317647c0 36.141176-30.117647 66.258824-66.258824 66.258824H174.682353c-36.141176 0-66.258824-30.117647-66.258824-66.258824v-680.658823c0-36.141176 30.117647-66.258824 66.258824-66.258824h680.658823c36.141176 0 66.258824 30.117647 66.258824 66.258824v78.305882h90.352941v-78.305882c6.023529-90.352941-66.258824-162.635294-156.611765-162.635295zM951.717647 299.670588H271.058824c-24.094118 0-48.188235 18.070588-48.188236 48.188236s18.070588 48.188235 48.188236 48.188235h680.658823c24.094118 0 48.188235-18.070588 48.188235-48.188235s-24.094118-48.188235-48.188235-48.188236zM1084.235294 347.858824L921.6 173.176471V534.588235L1084.235294 359.905882v-12.047058z" horiz-adv-x="1084" />

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 407 KiB

@ -42,7 +42,7 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
//debugType="admin";
debugType="admin";
// 老师
// debugType="teacher";
// 学生

@ -38,6 +38,36 @@ export function getNextHalfHourOfMoment(moment) {
return moment
}
 export function formatSeconds(value) {
        var theTime = parseInt(value);// 秒
        var middle= 0;// 分
        var hour= 0;// 小时
    
        if(theTime > 60) {
            middle= parseInt(theTime/60);
            theTime = parseInt(theTime%60);
            if(middle> 60) {
                hour= parseInt(middle/60);
                middle= parseInt(middle%60);
            }
        }
        var result = ""+parseInt(theTime)+"秒";
        if(middle > 0) {
if(hour>0){
result = ""+parseInt(middle)+"分";
}else{
result = ""+parseInt(middle)+"分"+result;
}
            
        }
        if(hour> 0) {
            result = ""+parseInt(hour)+"小时"+result;
        }
        return result;
    }
export function formatDuring(mss){
var days = parseInt(mss / (1000 * 60 * 60 * 24));
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));

@ -21,9 +21,9 @@ class LoadingSpin extends Component{
}
`}
</style>
<Spin tip="正在获取相关数据..."/>
<Spin/>
</div>
)
}
}
export default LoadingSpin;
export default LoadingSpin;

@ -20,7 +20,7 @@ export { bytesToSize as bytesToSize } from './UnitUtil';
export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension,
downloadFile, sortDirections } from './TextUtil'
export { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil'
export { handleDateString, getNextHalfHourOfMoment,formatDuring,formatSeconds} from './DateUtil'
export { configShareForIndex, configShareForPaths, configShareForShixuns, configShareForCourses, configShareForCustom } from './util/ShareUtil'

@ -869,7 +869,7 @@ class CoursesIndex extends Component{
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
}
></Route>
<Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/settings"
<Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/settings"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
}

@ -28,10 +28,15 @@ const TeacherList= Loadable({
loader: () => import('./members/teacherList'),
loading: Loading,
})
//主签到目录
const Signinmain= Loadable({
loader: () => import('./signin/mymain/Signinmain'),
loading: Loading,
});
//学生列表
const StudentsList= Loadable({
loader: () => import('./members/studentsList'),
loading: Loading,
loader: () => import('./members/studentsList'),
loading: Loading,
});
//分班列表
const CourseGroupList= Loadable({
@ -266,6 +271,7 @@ class ListPageIndex extends Component{
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 教师列表*/}
<Route path="/classrooms/:coursesId/teachers"
render={
(props) => (<TeacherList updatabanners={()=>this.updatabanners()} {...this.props} {...props} {...this.state} />)
@ -277,6 +283,13 @@ class ListPageIndex extends Component{
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 主签到 */}
<Route path="/classrooms/:coursesId/attendances"
render={
(props) => (<Signinmain {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/classrooms/:coursesId/course_groups/:course_group_id"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)

@ -240,8 +240,12 @@ class Video extends Component {
{
videos && videos.length > 0 ?
<React.Fragment>
<div style={{display:'flex'}}>
<p className="font-grey-9 mt20 mb20 pl5"> <span className="color-orange">{videoData && videoData.count}</span> </p>
<p className="mt20 mb20 pl5" style={{marginLeft:'auto',color:'#C0C4CC'}}>播放数据从2020-03-13 24:00开始统计</p>
</div>
<div className="videoContent">
{
videos.map((item, key) => {

@ -43,7 +43,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
let isSeeking = false
let pos = []//
const log = useCallback((callback) => {
const log = useCallback((callback, isEnd = false) => {
let params = {}
if (logId) {
params['log_id'] = logId
@ -59,6 +59,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
params['duration'] = totalDuration
params['device'] = device
}
if (isEnd) {
params['ed'] = "1"
}
async function getLogId() {
isLoging = true
let id = await logWatchHistory(params)
@ -119,7 +122,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
isLoging = false
isSeeking = false
pos = []
})
}, true)
}
function onTimeupdate() {

@ -1097,7 +1097,8 @@ class Coursesleftnav extends Component{
item.type==="board"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-taolun mr10 fl":"iconfont icon-taolun mr10 fl"} ></i>:
item.type==="course_group"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-fenban mr10 fl":"iconfont icon-fenban mr10 fl"} ></i>:
item.type==="statistics"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-tongji mr10 fl":"iconfont icon-tongji mr10 fl"} ></i>:
item.type==="video"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-bofang2 mr10 fl":"iconfont icon-bofang2 mr10 fl"} ></i>:""
item.type==="attendance"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-qiandao-1 mr10 fl":"iconfont icon-qiandao-1 mr10 fl"} ></i>:
item.type==="video"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-bofang2 mr10 fl":"iconfont icon-bofang2 mr10 fl"} ></i>:""
}
{/*||this.props.location.pathname===this.state.url&&key===this.state.indexs*/}
@ -1238,7 +1239,7 @@ class Coursesleftnav extends Component{
item.type==="attachment"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-ziyuan mr10 fl":"iconfont icon-ziyuan mr10 fl"} ></i>:
item.type==="board"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-taolun mr10 fl":"iconfont icon-taolun mr10 fl"} ></i>:
item.type==="course_group"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-fenban mr10 fl":"iconfont icon-fenban mr10 fl"} ></i>:
item.type==="attendance"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-qiandao-1 mr10 fl":"iconfont icon-qiandao-1 mr10 fl"} ></i>:
item.type==="video"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-bofang2 mr10 fl":"iconfont icon-bofang2 mr10 fl"} ></i>:
item.type==="statistics"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-tongji mr10 fl":"iconfont icon-tongji mr10 fl"} ></i>:""
}

@ -0,0 +1,258 @@
import "../css/Signinstatistics.css";
import React,{ Component } from "react";
import { Row, Col,Card,Select} from 'antd';
import {getImageUrl} from 'educoder';
import axios from 'axios';
import {
Chart,
Geom,
Axis,
Tooltip,
} from "bizcharts";
import LoadingSpin from "../../../../common/LoadingSpin";
const { Option } = Select;
class Signinstatistics extends Component {
constructor(props) {
super(props)
this.state={
datas:null,
newlist:[],
course_groups:[{id:"全部",name:"全部"}],
spal:false,
}
}
getdata=(group_id)=>{
this.setState({
spal:true
})
const coursesId=this.props.match.params.coursesId;
let url=`/weapps/courses/${coursesId}/attendances.json`
axios.get(url,{params:{
group_id:group_id==="全部"?undefined:group_id
}
}).then((response) => {
if(response){
if(response.data){
let newlists=[]
if(response.data.history_attendances.length>0){
response.data.history_attendances.map((item,key)=>{
newlists.push({
month: item.index,
city:"到课率",
temperature: (item.normal_rate).toFixed(0)
})
newlists.push({
month: item.index,
city: "旷课率",
temperature: (item.absence_rate).toFixed(0)
})
newlists.push({
month: item.index,
city: "请假率",
temperature: (item.leave_rate).toFixed(0)
})
})
}
this.setState({
datas:response.data,
newlist:newlists
})
}
}
this.setState({
spal:false
})
}).catch((error) => {
this.setState({
spal:false
})
})
}
componentDidMount() {
const coursesId=this.props.match.params.coursesId;
let newurl=`/courses/${coursesId}/all_course_groups.json`;
axios.get(newurl).then((response) => {
let newlist=this.state.course_groups;
response.data.course_groups.map((item,key)=>{
newlist.push(item)
})
this.setState({
course_groups:newlist
})
})
this.getdata()
}
handleChange=(value)=>{
this.getdata(value)
}
render() {
let {datas,newlist,course_groups,spal}=this.state;
const cols = {
month: {
range: [0, 1]
}
};
return(
<React.Fragment >
<div>
{
spal===true?
<div style={{
minHeight:"500px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
<div>
<Row type="flex" justify="space-between" className={"mt20"}>
<style>
{
`
.lishiqiandao{
background-image: url(${getImageUrl(`images/qiandao/lishi.png`)});
}
.daokeqiandao{
background-image: url(${getImageUrl(`images/qiandao/daoke.png`)});
}
.kuangkeqiandao{
background-image: url(${getImageUrl(`images/qiandao/kuangke.png`)});
}
.qingjiaqiandao{
background-image: url(${getImageUrl(`images/qiandao/qingjia.png`)});
}
`
}
</style>
<Col span={6}>
<Card style={{ width: 209 }} className={"gutterrowbox lishiqiandao"}>
<div className={"gutterrowboxcontent ml5"}>{datas&&datas.all_history_count}</div>
</Card>
</Col>
<Col span={6}>
<Card style={{ width: 209 }} className={"ml8 gutterrowbox daokeqiandao"}>
<div className={"gutterrowboxcontent ml5"}>{datas?(datas&&datas.avg_normal_rate*100).toFixed(0)+"%":""}</div>
</Card>
</Col>
<Col span={6}>
<Card style={{ width: 209 }} className={"ml14 gutterrowbox kuangkeqiandao"}>
<div className={"gutterrowboxcontent ml5"}>{datas?(datas&&datas.avg_absence_rate*100).toFixed(0)+"%":""}</div>
</Card>
</Col>
<Col span={6} >
<Card style={{ width: 209 }} className={"ml20 gutterrowbox qingjiaqiandao"}>
<div className={"gutterrowboxcontent ml5"}>{datas?(datas&&datas.avg_leave_rate*100).toFixed(0)+"%":""}</div>
</Card>
</Col>
</Row>
<div className={"SigninstatisticsChart mt20"}>
<div className={"pd30"}>
<Row>
<Col span={14}>
<Row type="flex" justify="start">
<Col span={5}>
<Row>
<Col span={12} className={"mindaoke mr5"}></Col>
<Col>到课率</Col>
</Row>
</Col>
<Col span={5}>
<Row>
<Col span={12} className={"minkuangke mr5"}></Col>
<Col>旷课率</Col>
</Row>
</Col>
<Col span={5}>
<Row>
<Col span={12} className={"minqingjia mr5"}></Col>
<Col>请假率</Col>
</Row>
</Col>
</Row>
</Col>
<Col span={10}><Row type="flex" justify="end">
<Col span={8} className={"Signinstatisticsfont"}>显示最近十次签到</Col>
<Col span={10}>
<Select defaultValue={"全部"} onChange={(e)=>this.handleChange(e)} style={{width:"130px"}}>
{course_groups&&course_groups.map((item,key)=>{
return(
<Option value={item.id} title={item.name} >{item.name}</Option>
)
})}
</Select>
</Col>
</Row></Col>
</Row>
</div>
<div className={"padding03000"}>
<Chart height={400} data={newlist} scale={cols} forceFit>
{/*<Legend />*/}
<Axis name="month" />
<Axis
name="temperature"
label={{
formatter: val => `${val}%`
}}
/>
<Tooltip
crosshairs={{
type: "y"
}}
/>
<Geom
type="line"
position="month*temperature"
size={2}
// color={"city"}
shape={"smooth"}
color={["city", ["#26C7C9", "#FF835C","#EDBA6F"]]}
/>
<Geom
type="point"
position="month*temperature"
size={4}
shape={"circle"}
color={["city", ["#26C7C9", "#FF835C","#EDBA6F"]]}
style={{
stroke: "#fff",
lineWidth: 1
}}
/>
</Chart>
</div>
</div>
</div>
}
</div>
</React.Fragment>
)
}
}
export default Signinstatistics;

@ -0,0 +1,192 @@
import React, {Component} from "react";
import '../css/signincdi.css';
import {Progress, message} from 'antd';
import QRCode from 'qrcode.react';
import axios from 'axios';
function clearSlct() {
if ("getSelection" in window) {
window.getSelection().removeAllRanges();
} else {
document.selection.empty();
}
;
}
function jsCopy(s) {
clearSlct();
const copyEle = document.getElementById(s);
copyEle.select();
const copyStatus = document.execCommand("Copy");
// 对成功与否定进行提示
copyStatuss(copyStatus)
}
function copyStatuss(copyStatus) {
if (copyStatus) {
message.success('复制成功');
} else {
message.error('复制失败');
}
}
//条目
class Detailss extends Component {
//条目组件
constructor(props) {
super(props);
this.state = {}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render() {
const isAdmin = this.props.isAdmin();
let item = this.props.headdata;
let defaultActiveKey = this.props.defaultActiveKey;
let jdt;
try {
jdt = item.normal_count / item.all_count * 100;
} catch (e) {
jdt = 100;
}
return (
<React.Fragment>
<div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp">
{item && item.name}
</p>
<div className="ws100s sortinxdirection mt17">
<div className="teachedivps">
签到人数
</div>
<div className="progressivps">
<Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/>
</div>
<div className="progressivpss h28s">
已签到{item && item.normal_count ? item.normal_count : 0} /
应签到 {item && item.all_count ? item.all_count : 0}
</div>
</div>
<div className="ws100s sortinxdirection mt5">
<div className="ws75s sortinxdirection">
<div className="teachedivps h40s">
签到发起人
</div>
<div className="teachedivpsy ymaxnamewidth60 h40s">
{item && item.author.user_name}
</div>
<div className="teachedivps ml20 h40s">
签到方式
</div>
<div className="teachedivpsy ymaxnamewidth80 h40s">
{item && item.mode ?
item.mode === "QRCODE" ?
"二维码签到"
: item.mode === "NUMBER" ?
"数字签到"
: item.mode === "QUICK" ?
"快捷签到"
: ""
: ""}
</div>
<div className="teachedivps ml20 h40s">
开始结束时间
</div>
<div className="teachedivpsy h40s">
{item && item.attendance_date} {item && item.start_time}-{item && item.end_time}
</div>
</div>
{
defaultActiveKey === "1" ?
<div className="ws25s" style={{
position: "relative",
}}>
{
item && item.mode === "NUMBER" ?
<div className="ws100s xaxisreverseorder ">
<p className="h40s font-16 xiaoshou" style={{
color: "#1890FF"
}} onClick={() => {
jsCopy("file_path" + 1)
}}>
复制签到码
</p>
<p className="h40s font-16" style={{
color: "#333333",
marginRight: "10px",
}}>
{item&&item.code}
</p>
<p className="h40s font-16" style={{
color: "#909399"
}}>签到码</p>
</div>
:
item && item.mode === "QRCODE" ?
<div style={{
position: "absolute",
bottom: "-11px",
right: "0px",
}}>
<QRCode
value={item&&item.code} //value参数为生成二维码的链接
size={84} //二维码的宽高尺寸
fgColor="#000000" //二维码的颜色
/>
<div className="font-14" style={{
width: "84px",
textAlign: "center",
color: "#333333"
}}>
扫码签到
</div>
</div>
: ""
}
</div>
:
""
}
</div>
</div>
{
defaultActiveKey === "1" ?
item && item.mode === "NUMBER" ?
<input id={"file_path" + 1} className="file_path_input" value={item&&item.code}/>
:""
:
""
}
</div>
</React.Fragment>
)
}
}
export default Detailss;

@ -0,0 +1,36 @@
import React, { Component } from 'react';
import { getImageUrl , getUrl } from 'educoder';
class NoneDatas extends Component{
constructor(props) {
super(props)
}
render(){
const { style } = this.props;
return(
<div className="edu-tab-con-box clearfix edu-txt-center intermediatecenter" style={ style || { width:"100%",height:"100%"}}>
<style>
{`
.edu-tab-con-box{
padding:100px 0px;
}
.ant-modal-body .edu-tab-con-box{
padding:0px!important;
}
img.edu-nodata-img{
margin: 40px auto 20px;
}
.zenwuxgsj{
font-size:17px;
font-family:MicrosoftYaHei;
color:rgba(136,136,136,1);
}
`}
</style>
<img className="edu-nodata-img mb20" src={getUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb10 zenwuxgsj">暂无相关数据</p>
</div>
)
}
}
export default NoneDatas;

@ -0,0 +1,160 @@
import React, {Component} from "react";
import '../css/signincdi.css';
import {Progress} from 'antd';
import axios from 'axios';
//条目
class Teacherentry extends Component {
//条目组件
constructor(props) {
super(props);
this.state = {}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render() {
let isAdmin = this.props.isAdmin();
let item = this.props.item;
let index =this.props.index;
let jdt;
try {
jdt = item.normal_count / item.all_count * 100;
} catch (e) {
jdt = 100;
}
return (
<React.Fragment>
<div className={index===0?"ws100s edu-back-white ": "ws100s edu-back-white mt20"}>
<div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp xiaoshou" onClick={()=>this.props.qiandaoxiangq(true,item.id)}>
{
item.name
}
</p>
<div className="ws100s sortinxdirection mt17">
<div className="teachedivps">
签到人数
</div>
<div className="progressivps">
<Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/>
</div>
<div className="progressivpss">
已签到{item.normal_count ? item.normal_count : 0} / 应签到 {item.all_count ? item.all_count : 0}
</div>
</div>
<div className="ws100s sortinxdirection mt5">
<div className="ws80s sortinxdirection">
<div className="teachedivps h40s">
签到发起人
</div>
<div className="teachedivpsy ymaxnamewidth60 h40s">
{item.author.user_name}
</div>
<div className="teachedivps ml20 h40s">
签到方式
</div>
<div className="teachedivpsy ymaxnamewidth80 h40s">
{item.mode ?
item.mode === "QRCODE" ?
"二维码签到"
: item.mode === "NUMBER" ?
"数字签到"
: item.mode === "QUICK" ?
"快捷签到"
: ""
: ""}
</div>
<div className="teachedivps ml20 h40s">
开始结束时间
</div>
<div className="teachedivpsy h40s">
{item.attendance_date} {item.start_time}-{item.end_time}
</div>
</div>
<div className="ws20s sortinxdirection">
{
isAdmin === true ?
this.props.defaultActiveKey === "1" ?
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s xiaoshou" onClick={()=>this.props.thisEnd(item.id)}>截止</div>
<div className="shanchu h40s xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div>
</div>
:
item.edit_auth === true ?
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s xiaoshou" onClick={()=>this.props.Signinnamestypes(item.id,true,item.name)}>编辑</div>
<div className="shanchu h40s xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div>
</div>
:
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s color-reds xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div>
</div>
:
(
this.props.defaultActiveKey === "1" ?
<div className="ws100s xaxisreverseorder">
<div className="qiandaobutton xiaoshou" onClick={()=>this.props.Signin(item.mode,item.id,item.attendance_code)}>
签到
</div>
</div>
:
<div className="ws100s xaxisreverseorder">
{
item.attendance_status?
item.attendance_status === "NORMAL" ?
<div className="zcqiandao xiaoshou">
正常签到
</div>
: item.attendance_status === "LEAVE" ?
<div className="qjqiandao xiaoshou">
请假
</div>
: item.attendance_status === "ABSENCE" ?
<div className="kkqiandao xiaoshou">
旷课
</div>
:
""
:
""
}
</div>
)
}
</div>
</div>
</div>
</div>
</React.Fragment>
)
}
}
export default Teacherentry;

@ -0,0 +1,33 @@
import React,{ Component } from "react";
import '../../css/signincdi.css';
//在线学习
class Histeacomponent extends Component{
//教师历史签到
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render(){
return(
<React.Fragment>
</React.Fragment>
)
}
}
export default Histeacomponent;

@ -0,0 +1,33 @@
import React,{ Component } from "react";
import '../../css/signincdi.css';
//在线学习
class Signteacomponent extends Component{
//教师签到统计
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render(){
return(
<React.Fragment>
</React.Fragment>
)
}
}
export default Signteacomponent;

@ -0,0 +1,176 @@
import React,{ Component } from "react";
import '../../css/signincdi.css';
import axios from 'axios';
import Teacherentry from "../Teacherentry";
import NoneDatas from '../NoneDatas';
import LoadingSpin from '../../../../../common/LoadingSpin';
import Listjihe from "../../../../question/component/Listjihe";
//在线学习
class Teaccomponent extends Component{
//教师正在签到
constructor(props){
super(props);
this.state={
mydatas:[]
}
}
componentDidMount() {
this.setState({
mydatas:this.props.datas
})
}
componentDidUpdate = (prevProps) => {
}
//截止
thisEnd=(attendance_id)=>{
const url = `/weapps/attendances/${attendance_id}/end.json`;
var data={
}
axios.post(url, data)
.then((result) => {
if (result.data.status === 0) {
// try {
// this.props.showNotification(`截止成功`);
// }catch (e) {
//
// }
this.props.getsetdatas();
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
//console.log(error);
})
}
//删除
thisdelete=(attendance_id)=>{
const url = `/weapps/attendances/${attendance_id}.json`;
var data={
}
axios.delete(url, data)
.then((result) => {
if (result.data.status === 0) {
// try {
// this.props.showNotification(`删除成功`);
// }catch (e) {
//
// }
this.props.getsetdatas();
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
//console.log(error);
})
}
//学生签到
Signin=(attendance_mode,attendance_id,code)=>{
debugger
const url = `/weapps/course_member_attendances.json`;
var data={
}
if(attendance_mode==="QUICK"){
//快捷签到
data={
attendance_mode:"QUICK",
attendance_id:attendance_id,
}
axios.post(url, data)
.then((result) => {
if (result.data.status === 0) {
try {
this.props.showNotification(`签到成功`);
}catch (e) {
}
this.props.getsetdatas();
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
})
}else if(attendance_mode==="QRCODE"){
//二维码签到
data={
attendance_mode:"QRCODE",
attendance_id:attendance_id,
code:code,
}
this.props.GotomQrcodesodesy(data,true)
}else if(attendance_mode==="NUMBER"){
//数字签到
data={
attendance_mode:"NUMBER",
attendance_id:attendance_id,
code:code,
}
this.props.Gotomodes(data,true)
}
}
render(){
let mydatas=this.props.datas?this.props.datas:[];
let Spin= this.props.Spin;
return(
<React.Fragment>
<div className="ws100s mt20 h500">
{
Spin&&Spin===true?
<LoadingSpin></LoadingSpin>
:
(
mydatas&&mydatas.length>0?
mydatas.map((object, index) => {
return (
<Teacherentry
Signinnamestypes={(id,b,a)=>this.props.Signinnamestypes(id,b,a)}
Signin={(a,b,c)=>this.Signin(a,b,c)}
qiandaoxiangq={(b,id)=>this.props.qiandaoxiangq(b,id)}
thisdelete={(id)=>this.thisdelete(id)}
thisEnd={(id)=>this.thisEnd(id)}
item={object} key={index}
index={index}
defaultActiveKey={this.props.defaultActiveKey}
{...this.props}
{...this.state}
></Teacherentry>
)
})
:
<NoneDatas></NoneDatas>
)
}
</div>
</React.Fragment>
)
}
}
export default Teaccomponent;

@ -0,0 +1,164 @@
.gutterrowbox{
height:150px;
border: none !important;
}
.gutterrowbox .ant-card-body{
height:150px;
position: relative;
}
.gutterrowboxcontent{
position: absolute;
bottom: 20px;
font-size:36px;
font-weight:400;
color:rgba(255,255,255,1);
}
.ml14{
margin-left: 14px !important;
}
.ml8{
margin-left: 8px !important;
}
.ml20{
margin-left: 20px !important;
}
.lishiqiandao{
height: 150px;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
.daokeqiandao{
height: 150px;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
.kuangkeqiandao{
height: 150px;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
.qingjiaqiandao{
height: 150px;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
.SigninstatisticsChart{
height:519px;
background:rgba(255,255,255,1);
box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.05);
}
.pd30{
padding:30px;
}
.padding03000{
padding: 0px 30px 0px 0px;
}
.mindaoke{
width: 20px;
height: 20px;
background-image: url(./dot-green@2x.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.minkuangke{
width: 20px;
height: 20px;
background-image: url(./dot-orange@2x.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.minqingjia{
width: 20px;
height: 20px;
background-image: url(./dot-orange@2x1.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.Signinstatisticsfont{
font-weight: 400;
color: rgba(153,153,153,1);
text-align: right;
margin-right: 20px;
line-height: 32px;
}
#form_in_modal_group_ids .ant-select-selection{
background: #fafafa !important;
}
#form_in_modal_attendance_date .ant-calendar-picker-input {
height:40px;
}
#form_in_modal_start_time{
height:40px;
background: #fafafa !important;
}
#form_in_modal_end_time{
height:40px;
background: #fafafa !important;
}
.Signedinlistbox .ant-select-selection--single{
height:40px !important;
background:rgba(255,255,255,1);
border:1px solid rgba(234,234,234,1);
border-radius:4px;
}
.Signedinlistbox .ant-select-selection__rendered{
line-height: 40px !important;
}
.Signedintextright{
text-align: right;
}
.color26C7C9{
color:#26C7C9;
}
.colorEAAE4E{
color:#EAAE4E;
}
.colorFF835C{
color:#FF835C;
}
.color1890FF{
color:#1890FF;
}
.backfff .ant-table-thead tr th{
background: #fff;
border-bottom:1px solid #EBEBEB !important;
}
.textcenter{
text-align: center !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

@ -0,0 +1,354 @@
/* 中间居中 */
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 简单居中 */
.intermediatecenterysls{
display: flex;
align-items: center;
}
/* 头顶部居中 */
.topcenter{
display: -webkit-flex;
flex-direction: column;
align-items: center;
}
/* 均匀分开 */
.spacearound{
display: flex;
justify-content: space-around;
}
/* 两边靠墙中间均匀分开 */
.spacebetween{
display: flex;
justify-content: space-between;
}
/* 从左分开 */
.spacearoundflexstart{
display: flex;
justify-content: flex-start;
}
.spacebetween{
display: flex;
justify-content: space-between;
}
.unpsysls{
display: inline-block;
text-align: justify;
font-size: 28px;
}
/* x轴正方向排序 */
/* 一 二 三 四 五 六 七 八 */
.sortinxdirection{
display: flex;
flex-direction:row;
}
/* x轴反方向排序 */
/* 八 七 六 五 四 三 二 一 */
.xaxisreverseorder{
display: flex;
flex-direction:row-reverse;
}
/* 垂直布局 正方向*/
/*
*/
.verticallayout{
display: flex;
flex-direction:column;
}
/* 垂直布局 反方向*/
.reversedirection{
display: flex;
flex-direction:column-reverse;
}
/* 两端对齐 */
.alignmentatbothends{
display: flex;
justify-content: space-between;
}
.file_path_input{
position: absolute;
right: -50%;
}
.ws100s{
width: 100%;
}
.ws70s{
width: 70%;
}
.ws75s{
width: 75%;
}
.ws80s{
width: 80%;
}
.ws50s{
width: 50%;
}
.hs30s{
height: 30%;
}
.ws20s{
width: 20%;
}
.ws25s{
width: 25%;
}
.yslmaxheigthk{
}
.mysligtes{
font-size:16px;
font-family:Microsoft YaHei;
font-weight:bold;
color:rgba(144,147,153,1);
padding-left: 34px;
}
.yslmaxheigthk .ws100s .ant-tabs .ant-tabs-bar {
border-bottom: 1px solid #ffffff !important;
background: #ffffff !important;
background-color: #ffffff !important;
margin: 0 !important;
}
.yslmaxheigthk .ws100s .ant-tabs .ant-tabs-bar .ant-tabs-nav-container {
padding-left: 25px;
}
.yslmaxheigthk .ws100s .ant-tabs .ant-tabs-bar .ant-tabs-nav-container .ant-tabs-ink-bar{
width: 68px !important;
left: 14px;
}
.yslmaxheigthk .ws100s .ant-tabs .ant-tabs-bar .ant-tabs-tab{
padding: 25px 16px !important;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
}
.positiondivs{
position: absolute;
top: 0;
right: 0;
}
.posiivs{
padding: 30px 5px !important;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #1890ff;
margin-right: 20px;
}
.posiivsicon{
padding: 22px 0px !important;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #1890ff;
}
.posiivsiconmyss{
font-size: 14px;
font-family: Microsoft YaHei;
color: #999999;
}
.xiaoshou{
cursor:pointer !important;
}
.xiaoshout{
cursor:default !important;
}
.teacherentrydiv{
padding-left: 32px;
padding-right: 32px;
padding-top: 20px;
padding-bottom: 20px;
}
.teachedivp{
font-size:16px;
font-family:Microsoft YaHei;
font-weight:bold;
color:rgba(51,51,51,1);
}
.ymaxnamewidthdivp{
max-width:100%;
width: 100%;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.teachedivps{
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(144,147,153,1);
}
.teachedivpsy{
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:#333333;
}
.progressivps{
width:200px;
margin-left: 10px;
}
.progressivpss{
font-size:12px;
line-height: 23px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(64,158,255,1);
margin-left: 15px;
}
.w60ys{
width: 60px;
}
.ymaxnamewidth60{
max-width: 70px;
width: 70px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.ymaxnamewidth80{
max-width: 80px;
width: 80px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.w80ys{
width: 80px;
}
.jiezhis{
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(64,158,255,1);
}
.shanchu{
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(245,108,108,1);
margin-right: 30px;
}
.qiandaobutton{
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(255,255,255,1);
text-align: center;
line-height: 40px;
width:100px;
height:40px;
background:rgba(64,158,255,1);
border-radius:4px;
}
.zcqiandao{
width:100px;
height:40px;
border:1px solid rgba(38,199,201,1);
border-radius:4px;
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(38,199,201,1);
text-align: center;
line-height: 40px;
}
.qjqiandao{
width:100px;
height:40px;
border:1px solid #EAAE4E;
border-radius:4px;
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:#EAAE4E;
text-align: center;
line-height: 40px;
}
.kkqiandao{
width:100px;
height:40px;
border:1px solid #FF835C;
border-radius:4px;
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:#FF835C;
text-align: center;
line-height: 40px;
}
.h40s{
line-height: 40px !important;
}
.h28s{
line-height: 28px !important;
}
.mt40{
margin-top: 40px !important;
}
.h500{
min-height: 500px;
}
.kkp{
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
}
.pr32{
padding-right: 32px;
}
.mr20r{
margin-right: 20px;
}
.color-reds{
color:rgba(245,108,108,1) !important;
}
.fh{
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(153,153,153,1);
}

@ -0,0 +1,295 @@
import "../css/Signinstatistics.css"
import React from 'react'
import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select,Button} from 'antd';
import moment from 'moment';
import axios from 'axios';
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
function disabledDateTime() {
return {
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
// disabledSeconds: () => range(0,60)
}
}
function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
class extends React.Component {
constructor(props){
super(props);
this.state = {
course_groups:[],
type:false,
dateString:null
}
}
componentDidMount() {
const coursesId=this.props.match.params.coursesId;
let newurl=`/courses/${coursesId}/all_course_groups.json`;
axios.get(newurl).then((response) => {
this.setState({
course_groups:response.data.course_groups
})
})
}
hideCreatesign=(e)=>{
e.preventDefault();
const {settabsdata,hideCreatesign} = this.props;
const coursesId=this.props.match.params.coursesId;
this.setState({
type:true
})
this.props.form.validateFields((err, values) => {
if (!err) {
if(moment(values.end_time).format('HH:mm')<moment(values.start_time).format('HH:mm')){
this.props.showNotification(`结束时间不能小于起始时间`);
this.setState({
type:false
})
return
}
if( moment(values.start_time).format('HH:mm')===moment(values.end_time).format('HH:mm')){
this.props.showNotification(`结束时间不能与起始时间相同`);
this.setState({
type:false
})
return
}
let url=`/weapps/courses/${coursesId}/attendances.json`;
axios.post(url, {
attendance_date:moment(values.attendance_date).format('YYYY-MM-DD'),
end_time: moment(values.end_time).format('HH:mm'),
group_ids:values.group_ids,
mode: values.mode,
name: values.name,
start_time:moment(values.start_time).format('HH:mm'),
})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification(`创建签到成功`);
this.setState({
type:false
})
hideCreatesign()
settabsdata()
}
})
.catch(function (error) {
console.log(error);
});
}else{
this.setState({
type:false
})
}
});
}
getDisabledHours=()=> {
let hours = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm')
let timeArr = time.split(':')
for (var i = 0; i < parseInt(timeArr[0]); i++) {
hours.push(i)
}
}
return hours
}
getDisabledMinutes=(selectedHour)=>{
let minutes = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm')
let timeArr = time.split(':')
if (selectedHour == parseInt(timeArr[0])) {
for(var i = 0; i < parseInt(timeArr[1]); i++) {
minutes.push(i)
}
}
}
return minutes
}
onChange=(date, dateString)=>{
this.setState({
dateString:dateString
})
}
render() {
const { visible, form ,setRadio,Radiolist,hideCreatesign} = this.props;
let {course_groups}=this.state;
const { getFieldDecorator } = form;
const { Option } = Select;
const formItemLayout = {
labelCol: { span: 4 },
wrapperCol: { span: 19},
};
const leftbuton={
"width":"130px",
"height":"40px",
"border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px",
}
const rightbuton={
"width":"130px",
"height":"40px",
"background":"#4CACFF",
"border-radius":"4px",
}
const format = 'HH:mm';
return (
<Modal
visible={visible}
title="创建签到"
closable={false}
footer={null}
width={600}
destroyOnClose={true}
>
<Form {...formItemLayout}>
<Form.Item label="签到名称:">
{getFieldDecorator('name', {
rules: [{ required: true, message: '请输入签到名称' },{whitespace:true,message: '请勿输入空格'}],
})(<Input placeholder="请输入签到名称" style={{height:"40px"}} />)}
</Form.Item>
<Form.Item label="签到班级:">
{getFieldDecorator('group_ids')(
<Select mode="multiple" placeholder={course_groups.length>0?"不选择分班时默认选择全部学生":'暂无分班,将默认选择课堂全部学生'} getPopupContainer={trigger => trigger.parentNode}>
{course_groups.map((item,key)=>{
return(
<Option value={item.id}>{item.name}</Option>
)
})}
</Select>,
)}
</Form.Item>
<Form.Item label="签到方式:" >
{getFieldDecorator('mode', {
rules: [{ required: true, message: '请选择签到方式' }],
})(
<Radio.Group onChange={setRadio} getPopupContainer={trigger => trigger.parentNode}>
<Radio value="QUICK">快捷签到</Radio>
<Radio value="NUMBER">签到码签到</Radio>
<Radio value="QRCODE">二维码签到</Radio>
</Radio.Group>,
)}
{Radiolist==="QUICK"?<div
style={{color:"#E6A23C",
height:"15px",
lineHeight: "15px"}}>学生点击签到按钮即可完成签到</div>:""}
{Radiolist==="NUMBER"?<div
style={{color:"#E6A23C",
height:"15px",
lineHeight: "15px"}}
>学生需要输入签到码才能完成签到</div>:""}
{Radiolist==="QRCODE"?<div
style={{color:"#E6A23C",
height:"15px",
lineHeight: "15px"}}
>学生需从小程序进入课堂扫码才能完成签到</div>:""}
</Form.Item>
<Form.Item label="签到日期:">
{getFieldDecorator('attendance_date', {
rules: [{ type: 'object', required: true, message: '请选择签到日期',}],
})(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
onChange={this.onChange}
/>)}
</Form.Item>
<Form.Item label="开始时间:">
{getFieldDecorator('start_time', {
rules: [{ type: 'object', required: true, message: '请选择开始时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}/>)}
</Form.Item>
<Form.Item label="结束时间:">
{getFieldDecorator('end_time', {
rules: [{ type: 'object', required: true, message: '请选择结束时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}
disabledHours={this.getDisabledHours}
disabledMinutes={this.getDisabledMinutes}
/>)}
</Form.Item>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>
<Button type="primary" ghost style={leftbuton} onClick={hideCreatesign}>
取消
</Button>
</a>
<a>
<Button type="primary" className={"ml20"} style={rightbuton} onClick={(e)=>this.hideCreatesign(e)} loading={this.state.type}>
确定
</Button>
</a>
</div>
</Form>
</Modal>
);
}
},
);
class Createsignmodel extends React.Component {
state = {
Radiolist: "",
};
setRadio=(e)=>{
this.setState({
Radiolist:e.target.value
})
}
render() {
return (
<React.Fragment>
<CollectionCreateForm
{...this.state}
{...this.props}
setRadio={(e)=>this.setRadio(e)}
/>
</React.Fragment>
);
}
}
export default Createsignmodel;

@ -0,0 +1,77 @@
import React,{ Component } from "react";
import { Modal , Button} from 'antd';
import QRCode from 'qrcode.react';
class Qrcodesignin extends Component {
constructor(props) {
super(props)
}
render() {
const leftbuton={
"width":"130px",
"height":"40px",
"border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px",
}
const rightbuton={
"width":"130px",
"height":"40px",
"background":"#4CACFF",
"border-radius":"4px",
}
return(
<React.Fragment>
{this.props.Qrcodesignintype?<Modal
title="二维码签到"
visible={this.props.Qrcodesignintype}
closable={false}
footer={null}
>
<div>
<div className={" marginauto clearfix edu-txt-center"}>
<QRCode
value={this.props.Qrcodesignintypedata.code} //value参数为生成二维码的链接
size={200} //二维码的宽高尺寸
fgColor="#000000" //二维码的颜色
/>
</div>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>请打开小程序在课堂的签到模块扫码签到</a>
</div>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>
<Button type="primary" ghost style={leftbuton} onClick={()=>this.props.GotomQrcodesodesy(null,false)}>
取消
</Button>
</a>
<a>
<Button type="primary" className={"ml20"} style={rightbuton} onClick={()=>this.props.GotomQrcodesodesy(null,false)}>
确定
</Button>
</a>
</div>
</div>
</Modal>:""}
</React.Fragment>
)
}
}
export default Qrcodesignin

@ -0,0 +1,105 @@
import React,{ Component } from "react";
import { Modal , Form, Input,Button} from 'antd';
import axios from 'axios';
class Signinname extends Component {
constructor(props) {
super(props)
}
setdatas=()=>{
this.props.form.validateFields((err, values) => {
if (!err) {
const url = `/weapps/attendances/${this.props.switattendance_id}.json`;
let data={
name:values.name,
}
axios.put(url, data)
.then((result) => {
if (result.data.status === 0) {
try {
this.props.showNotification(`修改成功`);
}catch (e) {
}
this.props.getsetdatas();
this.props.Signinnamestypes(null,false,"")
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
})
}
});
}
render() {
const { getFieldDecorator } = this.props.form;
const formItemLayout = {
wrapperCol: { span: 25},
};
const leftbuton={
"width":"130px",
"height":"40px",
"border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px",
}
const rightbuton={
"width":"130px",
"height":"40px",
"background":"#4CACFF",
"border-radius":"4px",
}
return(
<React.Fragment>
{this.props.Signinnamestype?<Modal
title="提示"
visible={this.props.Signinnamestype}
closable={false}
footer={null}
>
<Form {...formItemLayout}>
<Form.Item>
{getFieldDecorator('name', {initialValue: this.props.mybianjiname,
rules: [{ required: true, message: '请输入签到名称' }],
})(<Input placeholder="请输入签到名称"/>)}
</Form.Item>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>
<Button type="primary" ghost style={leftbuton} onClick={()=>this.props.Signinnamestypes(null,false,"")}>
取消
</Button>
</a>
<a>
<Button type="primary" className={"ml20"} style={rightbuton} onClick={()=>this.setdatas()}>
确定
</Button>
</a>
</div>
</Form>
</Modal>:""}
</React.Fragment>
)
}
}
const Signinnames = Form.create({ name: 'Signinnames' })(Signinname);
export default Signinnames

@ -0,0 +1,107 @@
import React,{ Component } from "react";
import { Modal , Form, Input,Button} from 'antd';
import axios from 'axios';
class Studentssignmodel extends Component {
constructor(props) {
super(props)
}
setdatas=()=>{
this.props.form.validateFields((err, values) => {
if (!err) {
const url = `/weapps/course_member_attendances.json`;
let data={
code:values.name,
attendance_mode:"NUMBER",
attendance_id:this.props.Studentssigntypedata.attendance_id,
}
axios.post(url, data)
.then((result) => {
if (result.data.status === 0) {
try {
this.props.showNotification(`签到成功`);
}catch (e) {
}
this.props.getsetdatas();
this.props.Gotomodes(null,false)
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
})
}
});
}
render() {
const { getFieldDecorator } = this.props.form;
const formItemLayout = {
wrapperCol: { span: 25},
};
const leftbuton={
"width":"130px",
"height":"40px",
"border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px",
}
const rightbuton={
"width":"130px",
"height":"40px",
"background":"#4CACFF",
"border-radius":"4px",
}
return(
<React.Fragment>
{this.props.Studentssigntype?<Modal
title="签到码签到"
visible={this.props.Studentssigntype}
closable={false}
footer={null}
>
<Form {...formItemLayout}>
<Form.Item>
{getFieldDecorator('name', {
rules: [{ required: true, message: '请输入签到码' }],
})(<Input placeholder="请输入签到码"/>)}
</Form.Item>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>
<Button type="primary" ghost style={leftbuton} onClick={()=>this.props.Gotomodes(null,false)}>
取消
</Button>
</a>
<a>
<Button type="primary" className={"ml20"} style={rightbuton} onClick={()=>this.setdatas()}>
确定
</Button>
</a>
</div>
</Form>
</Modal>:""}
</React.Fragment>
)
}
}
const Studentssignmodels = Form.create({ name: 'Studentssignmodel' })(Studentssignmodel);
export default Studentssignmodels

@ -0,0 +1,44 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Tabs } from 'antd';
import Teachers_signin from '../teacher/Teachers_signin';
import Students_signin from '../student/Signindetails';
import axios from 'axios';
const { TabPane } = Tabs;
// 主签到目录 主签到目录
class Signinmain extends Component{
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
// 主签到目录
render(){
const isAdmin = this.props.isAdmin()
return(
<React.Fragment>
<div>
<Teachers_signin {...this.state} {...this.props}>
</Teachers_signin>
</div>
</React.Fragment>
)
}
}
export default Signinmain;

@ -0,0 +1,352 @@
import "../css/Signinstatistics.css"
import React,{ Component } from "react";
import { Row, Col,Select,Table,Pagination } from 'antd';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../component/NoneDatas";
const { Option } = Select;
class Signedinlist extends Component {
constructor(props) {
super(props)
this.state={
limit:5,
page:1,
loading:false,
attendanceslist:[{id:undefined,name:"全部分班"}],
data:null,
group_ids:[],
members_count:0,
attendance_status:undefined,
state:[
{id:undefined,name:"全部状态"},
{id:"NORMAL",name:"正常出勤"},
{id:"LEAVE",name:"请假"},
{id:"ABSENCE",name:"旷课"},
],
newstate:[
{id:"NORMAL",name:"正常出勤"},
{id:"LEAVE",name:"请假"},
{id:"ABSENCE",name:"旷课"},
],
course_members_count:'--',
attendance_count:'--',
}
}
componentDidMount() {
this.getdatas(this.props&&this.props.switattendance_id,1,[],undefined)
// this.getpath()
}
componentDidUpdate(prevProps, prevState) {
if(prevProps.headdata!=this.props.headdata){
console.log(this.props.headdata)
let {attendanceslist}=this.state;
if(this.props.headdata){
let listattendanceslist=attendanceslist;
if(this.props.headdata.course_groups){
if(this.props.headdata.course_groups.length>0){
this.props.headdata.course_groups.map((item,key)=>{
listattendanceslist.push(item)
})
}
}
this.setState({
listattendanceslist:listattendanceslist,
data:this.props.headdata,
course_members_count:this.props.headdata.all_count,
attendance_count:this.props.headdata.normal_count
})
}
}
}
getdatas=(id,page,group_ids,attendance_status)=>{
this.setState({
loading:true,
member_attendances:[],
})
let that=this;
let url=`/weapps/course_member_attendances.json`;
axios.get(url,{params:{
group_ids:group_ids,
attendance_id:id,
attendance_status:attendance_status,
page:page,
limit:5,
}
}).then((response) => {
if(response){
this.setState({
member_attendances:response.data.member_attendances,
members_count:response.data.members_count,
})
}
this.setState({
loading:false
})
}).catch((error) => {
that.setState({
loading:false
})
});
}
handleChangegroup_ids=(value)=>{
let neval
if(!value){
neval=[]
this.setState({
group_ids: [],
page:1
})
}else{
neval=[value]
this.setState({
group_ids: [value],
page:1
})
}
let {page,attendance_status}=this.state;
this.getdatas(this.props&&this.props.switattendance_id,1,neval,attendance_status)
if(this.props.defaultActiveKey==="1"){
this.getpath(value)
}
}
getpath=(id)=>{
let {attendanceslist}=this.state;
let listattendanceslist=attendanceslist
let url=`/weapps/attendances/${this.props&&this.props.switattendance_id}.json`;
axios.get(url).then((response) => {
if(response.data){
if(response.data.course_groups.length>0){
response.data.course_groups.map((item,key)=>{
listattendanceslist.push(item)
})
}
if(id){
response.data.course_groups.map((item,key)=>{
if(item.id===id){
this.setState({
course_members_count:item.course_members_count,
attendance_count: item.attendance_count
})
}
})
}else{
this.setState({
course_members_count:response.data.all_count,
attendance_count: response.data.normal_count
})
}
this.setState({
listattendanceslist:attendanceslist,
data:response.data
})
}
})
}
handleChangestate=(value)=>{
let neval
if(!value){
neval=undefined
this.setState({
attendance_status:undefined,
page:1
})
}else{
neval=value
this.setState({
attendance_status: value,
page:1
})
}
let {page,group_ids}=this.state;
this.getdatas(this.props&&this.props.switattendance_id,1,group_ids,neval)
}
paginationonChange = (pageNumber) => {
this.setState({
page: pageNumber,
})
let {group_ids,attendance_status}=this.state;
this.getdatas(this.props&&this.props.switattendance_id,pageNumber,group_ids,attendance_status)
}
handleChange=(attendance_status,value)=>{
let url=`/weapps/course_member_attendances/update_status.json`;
axios.post(url, {
attendance_id:this.props.switattendance_id,
attendance_status:attendance_status,
course_id:this.props.match.params.coursesId,
user_id: value,
})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification(`修改状态成功`);
}
})
.catch(function (error) {
console.log(error);
});
}
render() {
let {attendanceslist,state,data,member_attendances,newstate}=this.state;
const columns = [
{
title: '序号',
dataIndex: 'index',
key: 'index',
className: "textcenter",
},
{
title: '姓名',
dataIndex: 'user_name',
key: 'user_name',
className: "textcenter",
},
{
title: '学号',
dataIndex: 'student_id',
key: 'student_id',
className: "textcenter",
},
{
title: '状态',
key: 'attendance_status',
dataIndex: 'attendance_status',
render: (text, record) => (
<span>
<Select key={record.index} defaultValue={record.attendance_status} className={"Signedinlistbox"} style={{ width: 167 }} onChange={(e)=>this.handleChange(e,record.user_id)}>
{
newstate&&newstate.map((item,key)=>{
return(
<Option value={item.id} key={key}>{item.name}</Option>
)
})
}
</Select>
</span>
),
},
];
return(
<React.Fragment>
<Row className={"mt20"}>
<Col span={12}>
<Row gutter={[{ xs: 8, sm: 16, md: 24, lg: 32 }, 20]}>
<Col className="gutter-row" span={9}>
<Select defaultValue="全部分班" className={"Signedinlistbox"} style={{ width: 167 }} onChange={this.handleChangegroup_ids}>
{attendanceslist&&attendanceslist.map((item,key)=>{
return(
<Option value={item.id} key={key}>{item.name}</Option>
)
})}
</Select>
</Col>
<Col className="gutter-row ml20" span={6}>
<Select defaultValue="全部状态" className={"Signedinlistbox"} style={{ width: 167 }} onChange={this.handleChangestate}>
{
state&&state.map((item,key)=>{
return(
<Option value={item.id} key={key}>{item.name}</Option>
)
})
}
</Select>
</Col>
</Row>
</Col>
<Col span={12}>
<Row type="flex" justify="end">
{this.props.defaultActiveKey==="2"?<Col className={"Signedintextright "}>
<span className={"color26C7C9 mr20"}>正常签到{data&&data.normal_count}</span>
<span className={"colorEAAE4E mr20"}>请假{data&&data.leave_count}</span>
<span className={"colorFF835C"}>旷课{data&&data.absence_count}</span>
</Col>:<Col className={"Signedintextright "}>
<span className={"mr20"}>已签到<span className={"color1890FF"}>{this.state.course_members_count}</span></span>
<span>应签到<span className={"color1890FF"}>{this.state.attendance_count}</span></span>
</Col>}
</Row>
</Col>
</Row>
<div className={"backfff mt10"}>
{
this.state.loading===true?
<div style={{
minHeight:"400px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
member_attendances&&member_attendances.length===0?
<div style={{
minHeight:"400px",
}}>
{/*<LoadingSpin></LoadingSpin>*/}
<NoneDatas></NoneDatas>
</div>
:
// loading={this.state.loading}
<Table columns={columns} dataSource={member_attendances} pagination={false} />
}
</div>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
{
member_attendances&&member_attendances.length>0?
<Pagination showQuickJumper current={this.state.page} onChange={this.paginationonChange}
pageSize={this.state.limit}
total={this.state.members_count}></Pagination>
:""
}
</div>
</React.Fragment>
)
}
}
export default Signedinlist

@ -0,0 +1,87 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import Detailss from '../component/Detailss';
import Signedinlist from './Signedinlist'
import axios from 'axios';
//在线学习
class Signindetails extends Component{
constructor(props){
super(props);
this.state={
headdata:null
}
}
componentDidMount() {
this.mygetdatas()
}
mygetdatas=()=>{
const switattendance_id=this.props.switattendance_id;
let urls = `/weapps/attendances/${switattendance_id}.json`;
axios.get(urls).then((response) => {
//.log(response);
if(response){
if(response.data){
console.log("头部数据")
console.log(response.data)
this.setState({
headdata:response.data
})
}
}
})
}
componentDidUpdate = (prevProps) => {
console.log("componentDidUpdate");
}
render(){
let {headdata}= this.state;
return(
<React.Fragment>
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s xaxisreverseorder" style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.qiandaoxiangq(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i>
<p className="fh mr20"> 返回</p>
</p>
</div>
<Detailss
defaultActiveKey={this.props.defaultActiveKey}
headdata={headdata}
switattendance_id={this.props.switattendance_id}
{...this.props}
{...this.state}></Detailss>
{/* 列表+筛选 */}
<div>
<Signedinlist
defaultActiveKey={this.props.defaultActiveKey}
switattendance_id={this.props.switattendance_id}
headdata={headdata}
{...this.props}
{...this.state}
/>
</div>
</div>
</React.Fragment>
)
}
}
export default Signindetails;

@ -0,0 +1,384 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Tabs,Pagination} from 'antd';
import {queryString} from 'educoder';
import Teaccomponent from '../component/teachercomponent/Teaccomponent';
import Createsignmodel from '../model/Createsignmodel';
import Studentssignmodels from "../model/Studentssignmodel";
import Qrcodesignin from "../model/Qrcodesignin";
import Signinname from '../model/Signinname';
import Signinstatistics from "../Signinstatistics/Signinstatistics";
import Signindetails from '../student/Signindetails';
import axios from 'axios';
const { TabPane } = Tabs;
//在线学习
class Students_signin extends Component{
constructor(props){
super(props);
this.state={
visible:false,
page:1,
limit:5,
count:50,
defaultActiveKey:"1",
attendances_count:0,
datas:[],
normal_count:0,
leave_count:0,
absence_count:0,
Studentssigntype:false,
Studentssigntypedata:null,
Qrcodesignintype:false,
Qrcodesignintypedata:null,
switchs:false,
switattendance_id:null,
Spin:false,
Signinnamestype:false,
mybianjiname:"",
}
}
componentDidMount() {
let data={
key:"1",
page:1,
limit:5
}
this.gogetdatas(data);
// const query = this.props.location.search;
// const parsed = queryString.parse(query);
// console.log("parsed");
// console.log(parsed);
}
componentDidUpdate = (prevProps) => {
}
callback=(key)=> {
//.log(key);
this.setState({
defaultActiveKey: key,
page:1,
limit:5
})
let data={
key:key,
page:1,
limit:5
}
if(key==="1" || key ==="2"){
this.gogetdatas(data);
}
}
gogetdatas =(mydata)=>{
this.setState({
Spin:true
})
const coureid=this.props.match.params.coursesId;
let urls = `/courses/${coureid}/attendances.json`;
let arry={}
if(mydata.key==="1" || mydata.key ===1){
arry={
page:mydata.page,
limit:mydata.limit,
};
}else if(mydata.key==="2" || mydata.key ===2){
arry={
history:true,
page:mydata.page,
limit:mydata.limit,
}
}
axios.get(urls, {
params: arry
}).then((response) => {
//.log(response);
if(response){
if(response.data){
this.setState({
attendances_count:response.data.attendances_count,
datas:response.data.attendances,
normal_count:response.data.normal_count,
leave_count:response.data.leave_count,
absence_count:response.data.absence_count,
})
}
}
this.setState({
Spin:false
})
}).catch((error) => {
this.setState({
Spin:false
})
})
}
Createsign=()=>{
this.setState({
visible:true
})
}
hideCreatesign=()=>{
this.setState({
visible:false
})
}
paginationonChange = (pageNumber) => {
this.setState({
page: pageNumber,
})
let data={
key:this.state.defaultActiveKey,
page:pageNumber,
limit:5
}
this.gogetdatas(data);
}
getsetdatas=()=>{
let data={
key:this.state.defaultActiveKey,
page:this.state.page,
limit:5
}
this.gogetdatas(data);
}
Gotomodes(data,bool){
if(bool===true){
this.setState({
Studentssigntypedata:data,
Studentssigntype:true
})
}else{
this.setState({
Studentssigntype:false,
Studentssigntypedata:null,
})
}
}
GotomQrcodesodesy(data,bool){
if(bool===true){
this.setState({
Qrcodesignintype:true,
Qrcodesignintypedata:data,
})
}else{
this.setState({
Qrcodesignintype:false,
Qrcodesignintypedata:null,
})
}
}
qiandaoxiangq=(bool,id)=>{
this.setState({
switchs:bool,
switattendance_id:id,
})
// if(bool){
// var currenturl = window.location.href;
// var newUrl = (currenturl.split("?"))[0];
// window.history.pushState('','',newUrl+'?type='+2);
// }
}
settabsdata=()=>{
let data={
defaultActiveKey:"1",
key:"1",
page:1,
limit:5
}
this.gogetdatas(data);
}
Signinnamestypes=(id,bool,name)=>{
this.setState({
switattendance_id:id,
Signinnamestype:bool,
mybianjiname:name,
})
}
render(){
let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas,absence_count,leave_count,normal_count,
Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs,switattendance_id,Spin,
mybianjiname
} =this.state;
const isAdmin =this.props.isAdmin();
return(
<React.Fragment>
<div className="">
{/*编辑名称*/}
<Signinname
{...this.props}
{...this.state}
switattendance_id={switattendance_id}
mybianjiname={mybianjiname}
Signinnamestypes={(id,b,a)=>this.Signinnamestypes(id,b,a)}
getsetdatas={()=>this.getsetdatas()}
/>
{/*创建实训*/}
<Createsignmodel
{...this.state}
{...this.props}
hideCreatesign={()=>this.hideCreatesign()}
settabsdata={()=>this.settabsdata()}
/>
{/*签到*/}
<Studentssignmodels
{...this.state}
{...this.props}
Studentssigntype={Studentssigntype}
Studentssigntypedata={Studentssigntypedata}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
getsetdatas={()=>this.getsetdatas()}
/>
{/*二维码*/}
<Qrcodesignin
{...this.state}
{...this.props}
Qrcodesignintype={Qrcodesignintype}
Qrcodesignintypedata={Qrcodesignintypedata}
getsetdatas={()=>this.getsetdatas()}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
/>
{
switchs===false?
<div className="clearfix yslmaxheigthk" >
<div className="ws100s" style={{
position: "relative"
}}>
<Tabs activeKey={defaultActiveKey} onChange={this.callback}>
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent
Spin={Spin}
Signinnamestypes={(id,b,a)=>this.Signinnamestypes(id,b,a)}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
{...this.props}
></Teaccomponent>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
<TabPane tab="历史签到" key="2">
<div className="ws100s mt20 sortinxdirection">
<p className=" ws50s mysligtes sortinxdirection">已完成{attendances_count}次签到</p>
{
isAdmin===false?
<div className="ws50s xaxisreverseorder">
<p className="kkp pr32 " style={{color:"#FF835C"}}>旷课{absence_count}</p>
<p className="kkp mr20r" style={{color:"#EAAE4E"}}>请假{leave_count}</p>
<p className="kkp mr20r" style={{color:"#26C7C9"}}>正常签到{normal_count}</p>
</div>
:
""
}
</div>
<Teaccomponent
Spin={Spin}
Signinnamestypes={(id,b,a)=>this.Signinnamestypes(id,b,a)}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
{...this.props}
></Teaccomponent>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
{
isAdmin===true?
<TabPane tab="签到统计" key="3">
<Signinstatistics
{...this.props}
{...this.state}
/>
</TabPane>
:
""
}
</Tabs>
{
isAdmin?
<div className="positiondivs sortinxdirection xiaoshou">
<i className="iconfont icon-bianji5 posiivsicon"></i>
<p className="posiivs xiaoshou" onClick={()=>this.Createsign()}>创建签到</p>
</div>
:""
}
</div>
</div>
:
// 签到详情
<Signindetails
defaultActiveKey={defaultActiveKey}
switattendance_id={switattendance_id}
{...this.props}
{...this.state}
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
></Signindetails>
}
</div>
</React.Fragment>
)
}
}
export default Students_signin;

@ -429,7 +429,8 @@ class Contentpart extends Component {
</Listjihe>
)
})}
})
}

@ -970,12 +970,12 @@
.mr15{
margin-right: 15px;
}
.ant-modal-mask{
z-index: 6000 !important;
}
.ant-modal-wrap{
z-index: 6000 !important;
}
/*.ant-modal-mask{*/
/* z-index: 6000 !important;*/
/*}*/
/*.ant-modal-wrap{*/
/* z-index: 6000 !important;*/
/*}*/
.fangdatwo{
background: #fefefe;
background-color: #fefefe;

@ -70,6 +70,7 @@
}
.videoItem .time {
height: 15px;
color: #C0C4CC;
}
.videoItem .square-main .buttonRow .dianjilianicon{

@ -1,6 +1,6 @@
import React, { useState, useEffect, useContext, memo } from 'react';
import { Progress, Input, Tooltip , Spin } from 'antd'
import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder'
import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext,formatSeconds} from 'educoder'
import axios from 'axios'
import moment from 'moment'
import playIcon from './images/play.png'
@ -21,7 +21,7 @@ const clipboardMap = {}
function VideoInReviewItem (props) {
const theme = useContext(ThemeContext);
const { history, file_url , play_url , cover_url , transcoded , title, created_at, published_at, isReview, id
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link} = props;
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link, people_num,total_time} = props;
useEffect(()=> {
if (!isReview) {
_clipboard = new ClipboardJS(`.copybtn_item_${id}`);
@ -37,6 +37,9 @@ function VideoInReviewItem (props) {
}
}
}, [])
const username = props.match.params.username
function toList() {
history.push(`/users/${username}/videos`)
@ -60,7 +63,7 @@ function VideoInReviewItem (props) {
{!isReview && !link && transcoded &&
<div className="playWrap" onClick={() => onMaskClick(props)}>
<img className="play mp23" src={playIcon}></img>
{play_duration===0?"":<div className={"play_duration"}>累计学习时长{play_duration} h</div>}
{/* {play_duration===0?"":<div className={"play_duration"}>累计学习时长:{play_duration} h</div>} */}
</div>
}
</Spin>
@ -69,16 +72,22 @@ function VideoInReviewItem (props) {
title={title && title.length > 20 ? title : ''}
>{title}</div>
<div className="df buttonRow mb10">
<span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}</span>
{/* <div className={"play_duration"}>累计学习时长:{play_duration} h</div> */}
{/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */}
{link ?<span className="time"> </span>:<span className="time">{
formatSeconds(total_time)}
{/* total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/3600).toFixed(1)+ ' h' */}
</span>}
</div>
<div className="df buttonRow">
{/* 2019-09-01 10:00:22 */}
<span className={"dianjilianicon"}>
{!vv || (vv && vv)===0 ? "" : <Tooltip title="播放次数" placement="bottom">
<i className={`icon-dianjiliang iconfont dianjilianicon`}></i>
</Tooltip> } {!vv || (vv && vv)===0?"":vv}
{!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom">
<i className={`icon-dianjiliang iconfont dianjilianicon font-12`}> {!people_num || (people_num && people_num)===0?"":people_num}</i>
</Tooltip> }
</span>
<div>
{
isReview !== true && moveVideo &&

@ -30,6 +30,72 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe736;</span>
<div class="name">签到-02</div>
<div class="code-name">&amp;#xe736;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe737;</span>
<div class="name">下箭头</div>
<div class="code-name">&amp;#xe737;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe735;</span>
<div class="name">签到-01</div>
<div class="code-name">&amp;#xe735;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe734;</span>
<div class="name">移动</div>
<div class="code-name">&amp;#xe734;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe732;</span>
<div class="name">下移2</div>
<div class="code-name">&amp;#xe732;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe731;</span>
<div class="name">上移2</div>
<div class="code-name">&amp;#xe731;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe730;</span>
<div class="name">下移</div>
<div class="code-name">&amp;#xe730;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe72f;</span>
<div class="name">上移</div>
<div class="code-name">&amp;#xe72f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe72e;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe72e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe72d;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe72d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe72c;</span>
<div class="name">选择</div>
<div class="code-name">&amp;#xe72c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe72a;</span>
<div class="name">编辑</div>
@ -2012,6 +2078,105 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-qiandao-1"></span>
<div class="name">
签到-02
</div>
<div class="code-name">.icon-qiandao-1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiajiantou2"></span>
<div class="name">
下箭头
</div>
<div class="code-name">.icon-xiajiantou2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-qiandao-"></span>
<div class="name">
签到-01
</div>
<div class="code-name">.icon-qiandao-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yidong"></span>
<div class="name">
移动
</div>
<div class="code-name">.icon-yidong
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiayi1"></span>
<div class="name">
下移2
</div>
<div class="code-name">.icon-xiayi1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shangyi1"></span>
<div class="name">
上移2
</div>
<div class="code-name">.icon-shangyi1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiayi"></span>
<div class="name">
下移
</div>
<div class="code-name">.icon-xiayi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shangyi"></span>
<div class="name">
上移
</div>
<div class="code-name">.icon-shangyi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji5"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-bianji5
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu3"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu3
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xuanze"></span>
<div class="name">
选择
</div>
<div class="code-name">.icon-xuanze
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji4"></span>
<div class="name">
@ -4939,6 +5104,94 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-qiandao-1"></use>
</svg>
<div class="name">签到-02</div>
<div class="code-name">#icon-qiandao-1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiajiantou2"></use>
</svg>
<div class="name">下箭头</div>
<div class="code-name">#icon-xiajiantou2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-qiandao-"></use>
</svg>
<div class="name">签到-01</div>
<div class="code-name">#icon-qiandao-</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yidong"></use>
</svg>
<div class="name">移动</div>
<div class="code-name">#icon-yidong</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiayi1"></use>
</svg>
<div class="name">下移2</div>
<div class="code-name">#icon-xiayi1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shangyi1"></use>
</svg>
<div class="name">上移2</div>
<div class="code-name">#icon-shangyi1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiayi"></use>
</svg>
<div class="name">下移</div>
<div class="code-name">#icon-xiayi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shangyi"></use>
</svg>
<div class="name">上移</div>
<div class="code-name">#icon-shangyi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji5"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-bianji5</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu3"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu3</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xuanze"></use>
</svg>
<div class="name">选择</div>
<div class="code-name">#icon-xuanze</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji4"></use>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,6 +5,83 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "13428689",
"name": "签到-02",
"font_class": "qiandao-1",
"unicode": "e736",
"unicode_decimal": 59190
},
{
"icon_id": "13428658",
"name": "下箭头",
"font_class": "xiajiantou2",
"unicode": "e737",
"unicode_decimal": 59191
},
{
"icon_id": "13427273",
"name": "签到-01",
"font_class": "qiandao-",
"unicode": "e735",
"unicode_decimal": 59189
},
{
"icon_id": "13353315",
"name": "移动",
"font_class": "yidong",
"unicode": "e734",
"unicode_decimal": 59188
},
{
"icon_id": "13247262",
"name": "下移2",
"font_class": "xiayi1",
"unicode": "e732",
"unicode_decimal": 59186
},
{
"icon_id": "13247261",
"name": "上移2",
"font_class": "shangyi1",
"unicode": "e731",
"unicode_decimal": 59185
},
{
"icon_id": "13247178",
"name": "下移",
"font_class": "xiayi",
"unicode": "e730",
"unicode_decimal": 59184
},
{
"icon_id": "13247175",
"name": "上移",
"font_class": "shangyi",
"unicode": "e72f",
"unicode_decimal": 59183
},
{
"icon_id": "13247173",
"name": "编辑",
"font_class": "bianji5",
"unicode": "e72e",
"unicode_decimal": 59182
},
{
"icon_id": "13247168",
"name": "删除",
"font_class": "shanchu3",
"unicode": "e72d",
"unicode_decimal": 59181
},
{
"icon_id": "13183780",
"name": "选择",
"font_class": "xuanze",
"unicode": "e72c",
"unicode_decimal": 59180
},
{
"icon_id": "2077714",
"name": "编辑",

@ -20,6 +20,39 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="qiandao-1" unicode="&#59190;" d="M881.509434-128h-724.528302a157.584906 157.584906 0 0 0-156.981132 156.981132v603.773585a157.584906 157.584906 0 0 0 156.981132 156.981132h724.528302a157.584906 157.584906 0 0 0 156.981132-156.981132v-603.773585a157.584906 157.584906 0 0 0-156.981132-156.981132z m-724.528302 845.283019a84.528302 84.528302 0 0 1-84.528302-84.528302v-603.773585a84.528302 84.528302 0 0 1 84.528302-84.528302h724.528302a84.528302 84.528302 0 0 1 84.528302 84.528302v603.773585a84.528302 84.528302 0 0 1-84.528302 84.528302zM277.735849 859.773585v-241.509434M277.735849 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 1 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM760.754717 859.773585v-241.509434M760.754717 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 0 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM486.641509 149.735849a37.433962 37.433962 0 0 0-27.773584 10.867925l-175.09434 181.132075a36.226415 36.226415 0 0 0 0 51.320755 36.830189 36.830189 0 0 0 51.320755 0l152.754717-158.792453 281.962264 221.584906a36.226415 36.226415 0 0 0 50.716981-6.037736 36.830189 36.830189 0 0 0-6.037736-51.320755l-307.320755-241.509434a38.037736 38.037736 0 0 0-20.528302-7.245283z" horiz-adv-x="1038" />
<glyph glyph-name="xiajiantou2" unicode="&#59191;" d="M796.390468-127.928326a113.768929 113.768929 0 0 0-86.464386 39.819126l-682.613575 796.382503A113.768929 113.768929 0 1 0 200.24128 856.172911L796.390468 156.493997 1392.539656 851.622154a113.768929 113.768929 0 0 0 172.928773-147.899608l-682.613575-796.382504A113.768929 113.768929 0 0 0 796.390468-127.928326z" horiz-adv-x="1592" />
<glyph glyph-name="qiandao-" unicode="&#59189;" d="M881.509434-128h-724.528302a157.584906 157.584906 0 0 0-156.981132 156.981132v603.773585a157.584906 157.584906 0 0 0 156.981132 156.981132h724.528302a157.584906 157.584906 0 0 0 156.981132-156.981132v-603.773585a157.584906 157.584906 0 0 0-156.981132-156.981132z m-724.528302 845.283019a84.528302 84.528302 0 0 1-84.528302-84.528302v-603.773585a84.528302 84.528302 0 0 1 84.528302-84.528302h724.528302a84.528302 84.528302 0 0 1 84.528302 84.528302v603.773585a84.528302 84.528302 0 0 1-84.528302 84.528302zM277.735849 859.773585v-241.509434M277.735849 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 1 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM760.754717 859.773585v-241.509434M760.754717 582.037736a36.226415 36.226415 0 0 0-36.226415 36.226415v241.509434a36.226415 36.226415 0 0 0 72.45283 0v-241.509434a36.226415 36.226415 0 0 0-36.226415-36.226415zM486.641509 149.73584900000003a37.433962 37.433962 0 0 0-27.773584 10.867925l-175.09434 181.132075a36.226415 36.226415 0 0 0 0 51.320755 36.830189 36.830189 0 0 0 51.320755 0l152.754717-158.792453 281.962264 221.584906a36.226415 36.226415 0 0 0 50.716981-6.037736 36.830189 36.830189 0 0 0-6.037736-51.320755l-307.320755-241.509434a38.037736 38.037736 0 0 0-20.528302-7.245283z" horiz-adv-x="1038" />
<glyph glyph-name="yidong" unicode="&#59188;" d="M855.341176-121.976471H174.682353c-90.352941 0-156.611765 72.282353-156.611765 156.611765V721.317647C18.070588 811.670588 90.352941 877.929412 174.682353 877.929412h680.658823c90.352941 0 156.611765-72.282353 156.611765-156.611765v-78.305882h-90.352941V721.317647c0 36.141176-30.117647 66.258824-66.258824 66.258824H174.682353c-36.141176 0-66.258824-30.117647-66.258824-66.258824v-680.658823c0-36.141176 30.117647-66.258824 66.258824-66.258824h680.658823c36.141176 0 66.258824 30.117647 66.258824 66.258824v78.305882h90.352941v-78.305882c6.023529-90.352941-66.258824-162.635294-156.611765-162.635295zM951.717647 299.670588H271.058824c-24.094118 0-48.188235 18.070588-48.188236 48.188236s18.070588 48.188235 48.188236 48.188235h680.658823c24.094118 0 48.188235-18.070588 48.188235-48.188235s-24.094118-48.188235-48.188235-48.188236zM1084.235294 347.858824L921.6 173.176471V534.588235L1084.235294 359.905882v-12.047058z" horiz-adv-x="1084" />
<glyph glyph-name="xiayi1" unicode="&#59186;" d="M512 384m-481.882353 0a481.882353 481.882353 0 1 1 963.764706 0 481.882353 481.882353 0 1 1-963.764706 0ZM512-128C228.894118-128 0 100.894118 0 384S228.894118 896 512 896 1024 667.105882 1024 384 795.105882-128 512-128z m0 963.764706C265.035294 835.764706 60.235294 630.964706 60.235294 384S265.035294-67.764706 512-67.764706 963.764706 137.035294 963.764706 384 758.964706 835.764706 512 835.764706zM502.964706 143.058824c-18.070588 0-30.117647 12.047059-30.117647 30.117647V588.8c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647V173.176471c0-18.070588-12.047059-30.117647-30.117647-30.117647zM502.964706 88.847059c-6.023529 0-12.047059 0-18.070588 6.023529l-144.564706 132.517647c-12.047059 12.047059-12.047059 30.117647 0 42.164706 12.047059 12.047059 30.117647 12.047059 42.164706 0l126.494117-108.423529 132.517647 108.423529c12.047059 12.047059 30.117647 12.047059 42.164706-6.023529 6.023529-6.023529 6.023529-30.117647-12.047059-36.141177l-150.588235-132.517647c-6.023529 0-12.047059-6.023529-18.070588-6.023529z" horiz-adv-x="1024" />
<glyph glyph-name="shangyi1" unicode="&#59185;" d="M512 384m-481.882353 0a481.882353 481.882353 0 1 1 963.764706 0 481.882353 481.882353 0 1 1-963.764706 0ZM512-128C228.894118-128 0 100.894118 0 384S228.894118 896 512 896 1024 667.105882 1024 384 795.105882-128 512-128z m0 963.764706C265.035294 835.764706 60.235294 630.964706 60.235294 384S265.035294-67.764706 512-67.764706 963.764706 137.035294 963.764706 384 758.964706 835.764706 512 835.764706zM502.964706 106.917647c-18.070588 0-30.117647 12.047059-30.117647 30.117647V552.658824c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-415.62353c0-18.070588-12.047059-30.117647-30.117647-30.117647zM653.552941 444.235294c-6.023529 0-12.047059 0-18.070588 6.02353l-132.517647 114.447058-126.494118-108.423529c-12.047059-12.047059-30.117647-12.047059-42.164706 0-12.047059 12.047059-12.047059 30.117647 0 42.164706l144.564706 126.494117c12.047059 12.047059 30.117647 12.047059 42.164706 0l150.588235-126.494117c12.047059-12.047059 12.047059-30.117647 6.02353-42.164706-6.023529-6.023529-12.047059-12.047059-24.094118-12.047059z" horiz-adv-x="1024" />
<glyph glyph-name="xiayi" unicode="&#59184;" d="M512 384m-481.882353 0a481.882353 481.882353 0 1 1 963.764706 0 481.882353 481.882353 0 1 1-963.764706 0ZM512-128C228.894118-128 0 100.894118 0 384S228.894118 896 512 896 1024 667.105882 1024 384 795.105882-128 512-128z m0 963.764706C265.035294 835.764706 60.235294 630.964706 60.235294 384S265.035294-67.764706 512-67.764706 963.764706 137.035294 963.764706 384 758.964706 835.764706 512 835.764706zM502.964706 143.058824c-18.070588 0-30.117647 12.047059-30.117647 30.117647V588.8c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647V173.176471c0-18.070588-12.047059-30.117647-30.117647-30.117647zM502.964706 88.847059c-6.023529 0-12.047059 0-18.070588 6.023529l-144.564706 132.517647c-12.047059 12.047059-12.047059 30.117647 0 42.164706 12.047059 12.047059 30.117647 12.047059 42.164706 0l126.494117-108.423529 132.517647 108.423529c12.047059 12.047059 30.117647 12.047059 42.164706-6.023529 6.023529-6.023529 6.023529-30.117647-12.047059-36.141177l-150.588235-132.517647c-6.023529 0-12.047059-6.023529-18.070588-6.023529z" horiz-adv-x="1024" />
<glyph glyph-name="shangyi" unicode="&#59183;" d="M512 384m-481.882353 0a481.882353 481.882353 0 1 1 963.764706 0 481.882353 481.882353 0 1 1-963.764706 0ZM512-128C228.894118-128 0 100.894118 0 384S228.894118 896 512 896 1024 667.105882 1024 384 795.105882-128 512-128z m0 963.764706C265.035294 835.764706 60.235294 630.964706 60.235294 384S265.035294-67.764706 512-67.764706 963.764706 137.035294 963.764706 384 758.964706 835.764706 512 835.764706zM502.964706 106.917647c-18.070588 0-30.117647 12.047059-30.117647 30.117647V552.658824c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-415.62353c0-18.070588-12.047059-30.117647-30.117647-30.117647zM653.552941 444.235294c-6.023529 0-12.047059 0-18.070588 6.02353l-132.517647 114.447058-126.494118-108.423529c-12.047059-12.047059-30.117647-12.047059-42.164706 0-12.047059 12.047059-12.047059 30.117647 0 42.164706l144.564706 126.494117c12.047059 12.047059 30.117647 12.047059 42.164706 0l150.588235-126.494117c12.047059-12.047059 12.047059-30.117647 6.02353-42.164706-6.023529-6.023529-12.047059-12.047059-24.094118-12.047059z" horiz-adv-x="1024" />
<glyph glyph-name="bianji5" unicode="&#59182;" d="M704.752941-97.882353H198.776471c-78.305882 0-138.541176 60.235294-138.541177 132.517647V667.105882c0 72.282353 66.258824 132.517647 138.541177 132.517647h319.247058c18.070588 0 30.117647-12.047059 30.117647-30.117647s-12.047059-24.094118-30.117647-24.094117H198.776471c-42.164706 0-78.305882-36.141176-78.305883-72.282353v-632.470588c0-42.164706 36.141176-72.282353 78.305883-72.282353h499.952941c42.164706 0 78.305882 36.141176 78.305882 72.282353V293.647059c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-259.011765c6.023529-72.282353-60.235294-132.517647-132.517647-132.517647zM313.223529 161.129412c-24.094118 0-54.211765 18.070588-60.235294 48.188235v30.117647l36.141177 126.494118 445.741176 445.741176c48.188235 48.188235 120.470588 48.188235 168.658824 0 48.188235-48.188235 48.188235-120.470588 0-168.658823l-445.741177-445.741177-126.494117-30.117647c-6.023529-6.023529-12.047059-6.023529-18.070589-6.023529z m36.141177 174.682353l-36.141177-114.447059 120.470589 30.117647 433.694117 433.694118c12.047059 12.047059 18.070588 24.094118 18.070589 42.164705 0 18.070588-6.023529 30.117647-18.070589 42.164706-24.094118 24.094118-60.235294 24.094118-84.329411 0L349.364706 335.811765z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu3" unicode="&#59181;" d="M654.222222-99.555556H375.466667c-68.266667 0-125.155556 56.888889-136.533334 142.222223L142.222222 571.733333c0 17.066667 5.688889 28.444444 22.755556 34.133334 17.066667 0 28.444444-5.688889 34.133333-22.755556l91.022222-534.755555c11.377778-51.2 45.511111-91.022222 85.333334-91.022223h278.755555c39.822222 0 73.955556 39.822222 85.333334 91.022223l91.022222 534.755555c0 17.066667 17.066667 28.444444 34.133333 22.755556 17.066667 0 28.444444-17.066667 22.755556-34.133334L796.444444 42.666667c-17.066667-85.333333-73.955556-142.222222-142.222222-142.222223zM597.333333 708.266667v5.688889c0 51.2-39.822222 96.711111-85.333333 96.711111s-85.333333-45.511111-85.333333-102.4h-56.888889C369.777778 793.6 432.355556 867.555556 512 867.555556c73.955556 0 136.533333-68.266667 142.222222-147.911112v-5.688888l-56.888889-5.688889zM398.222222 36.977778c-11.377778 0-28.444444 11.377778-28.444444 22.755555L284.444444 577.422222c0 17.066667 11.377778 34.133333 22.755556 34.133334 17.066667 5.688889 34.133333-5.688889 34.133333-22.755556l85.333334-517.688889c0-17.066667-5.688889-34.133333-28.444445-34.133333 5.688889 0 0 0 0 0zM625.777778 36.977778s-5.688889 0 0 0c-22.755556 5.688889-28.444444 17.066667-28.444445 34.133333L682.666667 588.8c0 17.066667 17.066667 28.444444 34.133333 22.755556 11.377778 0 22.755556-17.066667 22.755556-34.133334l-85.333334-517.688889c0-11.377778-17.066667-22.755556-28.444444-22.755555zM512 36.977778c-17.066667 0-28.444444 11.377778-28.444444 28.444444V583.111111c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444444-28.444445v-517.688889c0-17.066667-11.377778-28.444444-28.444444-28.444444zM938.666667 645.688889H85.333333c-17.066667 0-28.444444 17.066667-28.444444 28.444444s11.377778 28.444444 28.444444 28.444445h853.333334c17.066667 0 28.444444-11.377778 28.444444-28.444445s-11.377778-28.444444-28.444444-28.444444z" horiz-adv-x="1024" />
<glyph glyph-name="xuanze" unicode="&#59180;" d="M870.4 896H153.6C66.56 896 0 829.44 0 742.4v-716.8c0-87.04 66.56-153.6 153.6-153.6h716.8c87.04 0 153.6 66.56 153.6 153.6V742.4c0 87.04-66.56 153.6-153.6 153.6z m-40.96-394.24l-337.92-358.4c-10.24-10.24-25.6-15.36-40.96-15.36-10.24 0-20.48 5.12-30.72 10.24L174.08 332.8c-20.48 15.36-25.6 51.2-10.24 71.68 15.36 20.48 51.2 25.6 71.68 10.24l209.92-163.84 307.2 327.68c20.48 20.48 51.2 20.48 71.68 0 20.48-20.48 25.6-56.32 5.12-76.8z" horiz-adv-x="1024" />
<glyph glyph-name="bianji4" unicode="&#59178;" d="M934.724189 617.173271L834.414864 516.863946 653.380212 697.898598l100.394659 100.351991A42.257063 42.257063 0 0 0 783.769535 810.666588c6.527999 0 19.157332-1.621333 29.951997-12.415999l121.002657-121.002656a42.538663 42.538663 0 0 0 0-60.074662zM299.374908-18.176009l-200.661316-19.626665 19.669331 200.661316L593.049551 637.52527 774.084202 456.533285l-474.709294-474.709294z m695.679942 755.79727L874.09486 858.581251A127.317323 127.317323 0 0 1 783.769535 895.999915c-32.725331 0-65.407995-12.458666-90.367993-37.418664l-646.229279-646.229279c-7.082666-7.082666-11.434666-16.469332-12.287999-26.495998l-26.197331-267.818645c-2.133333-25.002665 17.706665-46.037329 42.239996-46.037329 1.194667 0 2.432 0.042667 3.626666 0.128l267.818645 26.239998a42.12053 42.12053 0 0 1 26.495998 12.287999l646.186612 646.186613c49.919996 49.919996 49.919996 130.858656 0 180.778651z" horiz-adv-x="1032" />

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 407 KiB

Loading…
Cancel
Save