操作记录后台查询,增加操作人
This commit is contained in:
parent
cf36e89f56
commit
f4525d6744
|
@ -47,6 +47,14 @@ class UserAction < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def opt_user_name
|
||||
if user&.id == user_id
|
||||
"--"
|
||||
else
|
||||
User.find_by(id: self.user_id)&.login
|
||||
end
|
||||
end
|
||||
|
||||
def user
|
||||
action_user = if action_type == "DestroyUser" && data_bank.present?
|
||||
build_mode("User")
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<tr>
|
||||
<th width="5%" class="text-center">序号</th>
|
||||
<th width="10%">操作类型</th>
|
||||
<th width="10%" title="--本人操作,有名称为管理员操作">操作人</th>
|
||||
<th width="10%" class="text-left">账号</th>
|
||||
<th width="15%" class="text-left">邮箱</th>
|
||||
<th width="10%" class="text-left">手机号</th>
|
||||
|
@ -17,6 +18,7 @@
|
|||
<tr class="user-item-<%= action.user&.id %>">
|
||||
<td class="text-center"><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
||||
<td><%= action.action_name %></td>
|
||||
<td><%= action.opt_user_name %></td>
|
||||
<td>
|
||||
<%= link_to "/#{action.user&.login}", target: '_blank' do %>
|
||||
<%= overflow_hidden_span action.user&.login, width: 100 %>
|
||||
|
|
Loading…
Reference in New Issue