|
|
|
@ -110,9 +110,9 @@ class GraduationTasksController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 排序
|
|
|
|
|
rorder = params[:order].blank? ? "updated_at" : params[:order]
|
|
|
|
|
rorder = params[:order].blank? ? "update_time" : params[:order]
|
|
|
|
|
b_order = params[:b_order].blank? ? "desc" : params[:b_order]
|
|
|
|
|
if rorder == "updated_at" || rorder == "work_score"
|
|
|
|
|
if rorder == "update_time" || rorder == "work_score"
|
|
|
|
|
@work_list = @work_list.order("graduation_works.#{rorder} #{b_order}")
|
|
|
|
|
elsif rorder == "student_id"
|
|
|
|
|
@work_list = @work_list.joins(user: :user_extension).order("user_extensions.#{rorder} #{b_order}")
|
|
|
|
|