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

dev_aliyun
cxt 5 years ago
commit 4083ca0df2

@ -3425,7 +3425,7 @@ end
users = users.where(schools: { province: params[:province] })
end
users = users.select('distinct users.*').order("last_login_on desc")
users = users.select('distinct users.*')
@page = (params['page'] || 1).to_i
@users_count = users.count
@ -3433,16 +3433,17 @@ end
@is_remote = true
@users_pages = Paginator.new @users_count, @limit, params['page'] || 1
@offset ||= @users_pages.offset
@users = paginateHelper users.preload(:real_name_authentication_apply, :professional_authentication_apply,
@users = paginateHelper users.order("last_login_on desc").preload(:real_name_authentication_apply, :professional_authentication_apply,
user_extensions: [:department, :school]), @limit
respond_to do |format|
format.js
format.xls{
# @export_shixun_task = @export_shixun_task.all
@xls_users = users.reorder("created_on desc").limit(3000) #导出excel用户
@xls_users = users.limit(3000) #导出excel用户
@xls_users = @xls_users.includes(:real_name_authentication_apply, :professional_authentication_apply,
user_extensions: [:department, :school])
filename = "用户列表.xls"
send_data(user_list_xls(@xls_users), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}

@ -15,4 +15,7 @@ $("#user_export_list").attr("href", "<%= search_user_managements_path(:trial =>
:homepage_show => params[:homepage_show],
:te_technical_title => params[:te_technical_title],
:pro_technical_title => params[:pro_technical_title],
:province => params[:province],
:trial_whether => params[:trial_whether],
:realname => params[:realname],
:format => "xls") %>");

Loading…
Cancel
Save