2
This commit is contained in:
@@ -205,4 +205,37 @@ xm-select .xm-body .xm-option.selected .xm-option-icon { color: var(--global-pri
|
||||
.own-tree {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.userinfo .logo {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.userinfo .logo img {
|
||||
display:block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.userinfo .info {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.userinfo .info p {
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.userinfo .info .name {
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
margin-bottom: 8px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
@@ -1 +1,13 @@
|
||||
<h1>dashboard</h1>
|
||||
<div class="layui-row h-all">
|
||||
<div class="layui-col-md12" style="padding: 10px;">
|
||||
<div class="layui-panel userinfo">
|
||||
<div class="logo">
|
||||
<img src="{{.User.Avatar}}" alt="logo">
|
||||
</div>
|
||||
<div class="info">
|
||||
<p class="name">欢迎您,{{.Auth.Username}} ({{.Auth.RoleName}})</p>
|
||||
<p>这是您第 {{.LoginCount}} 次登录,上次登录日期:{{dateFormat .LastLoginTime}},如果不是您本人登录,请及时修改密码 。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
limits: [15, 30, 45, 60, 75, 90],
|
||||
cols: [[
|
||||
{ field: 'email', title: '邮箱', align: 'left', width: 180, fixed: 'left' },
|
||||
{ field: 'username', title: '用户名', align: 'left', width: 100 },
|
||||
// { field: 'username', title: '用户名', align: 'left', width: 100 },
|
||||
{ field: 'created_at', title: '创建时间', align: 'left', width: 160, templet: function (d) { return !d.created_at ? '' : util.toDateString(d.created_at) } },
|
||||
{ field: 'method', title: '请求方法', align: 'left', width: 90 },
|
||||
{ field: 'parameters', title: '请求参数', align: 'left', width: 120 },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{template "header"}}
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
{{ genBtn .AuthorizeMenus "add" "refresh" "rebuild_parent_path"}}
|
||||
{{ genBtn .AuthorizeMenus "add" "refresh_cache" "rebuild_parent_path"}}
|
||||
<button type="button" lay-event="search" lay-on="search" class="layui-btn layui-btn-primary layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
</button>
|
||||
@@ -120,7 +120,8 @@
|
||||
table.on('toolbar(tablelist)', function (obj) {
|
||||
switch (obj.event) {
|
||||
case 'add': add(); break;
|
||||
case 'refresh': refresh(); break;
|
||||
case 'refresh': table.reload('tablelist'); break;
|
||||
case 'refresh_cache': refresh_cache(); break;
|
||||
case 'rebuild_parent_path': rebuildParentPath(); break;
|
||||
case 'search': search(); break;
|
||||
}
|
||||
@@ -136,10 +137,10 @@
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
layer.confirm('确定要刷新部门数据吗?', { title: '提示' }, function (index, layero) {
|
||||
function refresh_cache() {
|
||||
layer.confirm('确定要刷新部门缓存数据吗?', { title: '提示' }, function (index, layero) {
|
||||
$.ajax({
|
||||
url: '/system/department/refresh',
|
||||
url: '/system/department/refresh_cache',
|
||||
type: 'post',
|
||||
headers: { 'X-CSRF-Token': $('#csrf_token').val() },
|
||||
dataType: 'json',
|
||||
|
||||
@@ -29,15 +29,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form layui-row">
|
||||
<div class="layui-col-xs12 layui-col-sm12 layui-col-md4">
|
||||
<div class="layui-form-column">
|
||||
<label class="tips">用户名</label>
|
||||
<input type="text" name="username" id="username" placeholder="请输入用户名" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,7 +84,7 @@
|
||||
limits: [15, 30, 45, 60, 75, 90],
|
||||
cols: [[
|
||||
{ field: 'email', title: '邮箱', align: 'left', width: 180, fixed: 'left' },
|
||||
{ field: 'username', title: '用户名', align: 'left', width: 100 },
|
||||
// { field: 'username', title: '用户名', align: 'left', width: 100 },
|
||||
{ field: 'created_at', title: '创建时间', align: 'left', width: 160, templet: function (d) { return !d.created_at ? '' : util.toDateString(d.created_at) } },
|
||||
{
|
||||
field: 'is_success', title: '成功?', align: 'center', width: 80, templet: function (d) {
|
||||
@@ -152,7 +143,6 @@
|
||||
$('#timeBegin').val(formatDate(getCurrentYearStart(), 'YYYY-MM-DD HH:mm:ss'));
|
||||
$('#timeEnd').val(formatDate(getCurrentMonthEnd(), 'YYYY-MM-DD HH:mm:ss'));
|
||||
$('#email').val('');
|
||||
$('#username').val('');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -167,7 +157,6 @@
|
||||
return {
|
||||
timeBegin: $('#timeBegin').val(),
|
||||
timeEnd: $('#timeEnd').val(),
|
||||
name: $('#username').val(),
|
||||
email: $('#email').val()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,19 +103,24 @@
|
||||
}
|
||||
|
||||
function refreshCache() {
|
||||
$.ajax({
|
||||
url: '/system/menu/refresh_cache',
|
||||
type: 'post',
|
||||
headers: { 'X-CSRF-Token': $('#csrf_token').val() },
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
table.reload('tablelist');
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 })
|
||||
layer.confirm('确定要刷新菜单缓存数据吗?', { title: '提示' }, function (index, layero) {
|
||||
$.ajax({
|
||||
url: '/system/menu/refresh_cache',
|
||||
type: 'post',
|
||||
headers: { 'X-CSRF-Token': $('#csrf_token').val() },
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
table.reload('tablelist');
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index); // 关闭弹窗
|
||||
}, function (index, layero) {
|
||||
layer.close(index); // 关闭弹窗
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{template "header"}}
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
{{ genBtn .AuthorizeMenus "add" "refresh" "rebuild_parent_path"}}
|
||||
{{ genBtn .AuthorizeMenus "add" "refresh_cache" "rebuild_parent_path"}}
|
||||
<button type="button" lay-event="search" lay-on="search" class="layui-btn layui-btn-primary layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
</button>
|
||||
@@ -119,7 +119,8 @@
|
||||
table.on('toolbar(tablelist)', function (obj) {
|
||||
switch (obj.event) {
|
||||
case 'add': add(); break;
|
||||
case 'refresh': refresh(); break;
|
||||
case 'refresh': table.reload('tablelist'); break;
|
||||
case 'refresh_cache': refreshCache(); break;
|
||||
case 'rebuild_parent_path': rebuildParentPath(); break;
|
||||
case 'search': search(); break;
|
||||
}
|
||||
@@ -135,10 +136,10 @@
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
function refreshCache() {
|
||||
layer.confirm('确定要刷新角色数据吗?', { title: '提示' }, function (index, layero) {
|
||||
$.ajax({
|
||||
url: '/system/role/refresh',
|
||||
url: '/system/role/refresh_cache',
|
||||
type: 'post',
|
||||
headers: { 'X-CSRF-Token': $('#csrf_token').val() },
|
||||
dataType: 'json',
|
||||
@@ -279,16 +280,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
form.on('submit(btn-query)', function (data) {
|
||||
table.reload('tablelist', {
|
||||
where: getQueryParams(),
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
function getRoleTree() {
|
||||
$.ajax({
|
||||
url: "/system/role/data?type=tree",
|
||||
|
||||
@@ -84,8 +84,16 @@
|
||||
return '<img src="' + d.avatar + '" width=30 height=30 />';
|
||||
}
|
||||
},
|
||||
{ field: 'department_name', title: '部门', align: 'left', width: 100 },
|
||||
{ field: 'role_name', title: '角色', align: 'left', width: 100 },
|
||||
{
|
||||
field: 'department_name', title: '部门', align: 'left', width: 100, templet: function (d) {
|
||||
return d.department ? d.department.name : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'role_name', title: '角色', align: 'left', width: 100, templet: function (d) {
|
||||
return d.role ? d.role.display_name : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'gender', title: '性别', align: 'center', width: 50, templet: function (d) {
|
||||
if (d.gender == 0) {
|
||||
|
||||
Reference in New Issue
Block a user