Merge branch 'dev_aliyun' into educoder

dev_local_lzdx
daiao 5 years ago
commit 9ccce11e97

@ -39,7 +39,7 @@ class ManagementsController < ApplicationController
format.html
format.xls{
time = Time.now.strftime("%Y%m%d")
filename = "实训课程体系#{time}.xls"
filename = "引流情况#{time}.xls"
send_data(user_agents_export(), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
@ -4389,10 +4389,11 @@ end
user_agents = UserAgent.where("user_agents.key is not null").pluck(:key).uniq
user_agents.each_with_index do |agent, index|
user = User.find_by_login(agent)
next if user.blank?
# 代理用户
agents = UserAgent.where(key: agent)
agents_count = agents.count
competion_users = agents.where(agent_type: UserAgent::USER_COMPETITION).pluck(:ip)
competion_users = agents.where(action_status: 2).pluck(:ip)
rank_user_id = UserActions.where(ip: competion_users).pluck(:user_id).uniq
team_ids = TeamMember.where(user_id: rank_user_id).pluck(:competition_team_id).uniq
sheet1[count_row, 0] = index + 1

@ -139,15 +139,15 @@
})
});
$.get('<%= shixun_time_college_path(@school) %>', function(data){
$.get('<%= shixun_time_college_path(@department.identifier) %>', function(data){
$('.shixun-time').html("<span data-tip-down=\"所有学员的实训耗时之和\">" + data.shixun_time + "</span>天");
});
$.get('<%= shixun_report_count_college_path(@school) %>', function(data){
$.get('<%= shixun_report_count_college_path(@department.identifier) %>', function(data){
$('.shixun-report-count').html("<span>" + data.shixun_report_count + "</span>个");
});
// 教师排名
$.ajax({ url: '<%= teachers_college_path(@school) %>', method: 'GET', dataType: 'script' })
$.ajax({ url: '<%= teachers_college_path(@department.identifier) %>', method: 'GET', dataType: 'script' })
$(".count_student_test a").click(function(){
$(".count_student_test a").removeClass("active");
@ -155,7 +155,7 @@
});
//初始化饼状图
$.get('<%= shixun_chart_data_college_path(@school) %>', function(data){
$.get('<%= shixun_chart_data_college_path(@department.identifier) %>', function(data){
$('.pie-chart-loading').hide();
if (data.names.length > 0) {
$('.online_status .edu-tab-con-box').hide();
@ -166,7 +166,7 @@
}
});
$.get('<%= course_statistics_college_path(@school) %>');
$.get('<%= course_statistics_college_path(@department.identifier) %>');
});
function InitPieChart(names, data){
var Color = ['#49A9EE', '#FFD86E', '#98D87D', '#8996E6', '#F3857B', '#B97BF3','#4DE8B4','#F37BDB','#566EFF','#FF961A'];

Loading…
Cancel
Save