Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_aliyun
杨树明 5 years ago
commit c5297b3fbe

@ -18,7 +18,7 @@ class EcloudController < ApplicationController
skip_before_filter :verify_authenticity_token skip_before_filter :verify_authenticity_token
before_filter :save_para before_filter :save_para
# before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update]
before_filter :user_setup before_filter :user_setup
# before_filter :require_login, only: [:authorize] # before_filter :require_login, only: [:authorize]

@ -29,7 +29,7 @@ class ManagementsController < ApplicationController
end end
def user_agents def user_agents
@user_agents = UserAgent.where("user_agents.key is not null") @user_agents = UserAgent.where("user_agents.key is not order by action_status, register_status")
@agents_count = @user_agents.count @agents_count = @user_agents.count
limit = 20 limit = 20
@agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1

@ -42,7 +42,9 @@ class WelcomeController < ApplicationController
# 运营引流个人数据展示 # 运营引流个人数据展示
def user_agents def user_agents
@user_agents = UserAgent.where(key: params[:edu]) @user_agents = UserAgent.where(key: params[:edu]).order("register_status desc, action_status desc")
@action_count = @user_agents.where(action_status: 2).count
@register_count = @user_agents.where(register_status: 2).count
@agents_count = @user_agents.count @agents_count = @user_agents.count
limit = 20 limit = 20
@agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1

@ -57,7 +57,7 @@
<% @shixun_tags.each do |tag| %> <% @shixun_tags.each do |tag| %>
<p data-shixun-value="<%= count %><%= tag.name %>_<%= tag.id %>"> <p data-shixun-value="<%= count %><%= tag.name %>_<%= tag.id %>">
<input name="select<%= count %>" data-value="<%= tag.id %>" <%= shixun.tag_repertoires.map(&:id).include?(tag.id) ? "checked" : "" %> data-shixun="<%= shixun.id %>" type="checkbox" class="select<%= count %> magic-checkbox" id="<%= count %>_<%= tag.name %>_<%= tag.id %>" value="<%= tag.name %>"/> <input name="select<%= count %>" data-value="<%= tag.id %>" <%= shixun.tag_repertoires.map(&:id).include?(tag.id) ? "checked" : "" %> data-shixun="<%= shixun.id %>" type="checkbox" class="select<%= count %> magic-checkbox" id="<%= count %>_<%= tag.name %>_<%= tag.id %>" value="<%= tag.name %>"/>
<label style="top:0px" for="<%= count %>_<%= tag.name %>_<%= tag.id %>" class="task-hide"><%= tag.name %></label> <label style="top:0px" title="<%= tag.sub_repertoire.try(:name) %>" for="<%= count %>_<%= tag.name %>_<%= tag.id %>" class="task-hide"><%= tag.name %></label>
</p> </p>
<% end %> <% end %>
</div> </div>

@ -4,9 +4,9 @@
<th width="10%">代理人登录名</th> <th width="10%">代理人登录名</th>
<th width="10%">代理人姓名</th> <th width="10%">代理人姓名</th>
<th width="20%">学校</th> <th width="20%">学校</th>
<th width="10%">用户注册状态</th>
<th width="10%">竞赛报名状态</th> <th width="10%">竞赛报名状态</th>
<th width="10%">ip</th> <th width="10%">ip</th>
<th width="10%">ip</th>
<th width="20%">负责人</th> <th width="20%">负责人</th>
</thead> </thead>
<tbody> <tbody>
@ -19,9 +19,10 @@
<td class="edu-txt-left"><span><%= link_to ua.key, user_path(ua.key), :target => "_blank" %></span></td> <td class="edu-txt-left"><span><%= link_to ua.key, user_path(ua.key), :target => "_blank" %></span></td>
<td><%= link_to user.try(:show_real_name), user_path(user), target:'_blank' %></td> <td><%= link_to user.try(:show_real_name), user_path(user), target:'_blank' %></td>
<td><%= school.name %></td> <td><%= school.name %></td>
<td><%= "--" %></td> <td><%= ua.action_status == 2 ? "代理之后注册" : "--" %></td>
<td><%= ua.register_status == 2 ? "代理之后报名" : "--" %></td>
<td><%= ua.ip %></td> <td><%= ua.ip %></td>
<td><%= "理由" %></td> <td>"--"</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

@ -1,19 +1,10 @@
<%= form_tag(url_for(departments_part_managements_path),:id=>"department_part_search",:method => "post",:remote=>true) do %>
<div class="edu-con-top clearfix mb20 xmt10 bor-grey-e mt10">
<input class="fl task-form-20 task-height-30 ml25" id="shixun_Look_name" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" >
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt2" onclick="$('#department_part_search').submit();">搜索</a>
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2" id="clear_contents">清除</a>
<%= link_to "关联代理人",add_departments_part_managements_path(),:class => "task-btn task-btn-green fr mt6 mr30" %>
<input name="sx_order" type="hidden">
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="managements_department_part_list"> <div class="edu-con-bg01 mt15" id="managements_department_part_list">
<%= render :partial => "managements/user_agent_list" %> <%= render :partial => "managements/user_agent_list" %>
</div> </div>
<script> <script>
function clearSearchCondition() { function clearSearchCondition() {
$("#shixun_Look_name").val(""); $("#shixun_Look_name").val("");
$.get('<%= departments_part_managements_path() %>') $.get('<%= user_agents_managements_path() %>')
} }
</script> </script>

@ -1,6 +1,6 @@
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;"> <table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
<thead> <thead>
<th width="10%">ID</th> <th width="10%">序号</th>
<th width="15%">代理人登录名</th> <th width="15%">代理人登录名</th>
<th width="15%">代理人姓名</th> <th width="15%">代理人姓名</th>
<th width="20%">注册情况</th> <th width="20%">注册情况</th>

@ -1,7 +1,6 @@
<div class="edu-con-bg01 clearfix mt10 bor-grey-e pt10 pb10"> <div class="edu-con-bg01 clearfix mt10 bor-grey-e pt10 pb10">
<div class="pl15"> <div class="pl15">
统计总计: 引流总人数:<span class="color-red"><%= @agents_count %></span>人 | 竞赛成功报名:<span class="color-red"><%= @action_count %></span>
引流总人数<span class="color-red"><%= @agents_count %></span>人,
</div> </div>
</div> </div>
<div class="edu-con-bg01 mt15" id="managements_department_part_list"> <div class="edu-con-bg01 mt15" id="managements_department_part_list">

Loading…
Cancel
Save