From 58dd8d207d12b5be3e37405b3a470138a636c0d3 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 19 Mar 2019 09:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=AE=A1=E7=90=86=E5=91=98=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=91=E6=8E=92=E5=BA=8F=E6=97=B6=EF=BC=8C=E6=9C=AA?= =?UTF-8?q?=E5=B8=A6=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/managements/_user_list.html.erb | 50 ++++++----------------- app/views/managements/users.html.erb | 3 ++ 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/app/views/managements/_user_list.html.erb b/app/views/managements/_user_list.html.erb index d77fa954..d2bc0fef 100644 --- a/app/views/managements/_user_list.html.erb +++ b/app/views/managements/_user_list.html.erb @@ -65,15 +65,9 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "created_on", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("created_on"); + $("#managements_users_search").submit(); }); // 按最后登录时间排序 $("#user_last_order").on("click", function(){ @@ -83,15 +77,9 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "last_login_on", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("last_login_on"); + $("#managements_users_search").submit(); }); // 按经验值排序 $("#user_experience_order").on("click", function(){ @@ -101,16 +89,10 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "experience", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); - }) + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("experience"); + $("#managements_users_search").submit(); + }); // 按金币排序 $("#user_grade_order").on("click", function(){ @@ -120,14 +102,8 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "grade", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("grade"); + $("#managements_users_search").submit(); }) \ No newline at end of file diff --git a/app/views/managements/users.html.erb b/app/views/managements/users.html.erb index 9b01dab3..3117e124 100644 --- a/app/views/managements/users.html.erb +++ b/app/views/managements/users.html.erb @@ -44,6 +44,9 @@ + + + 搜索 清除