Skip to content

Commit

Permalink
路由菜单功能与页面优化完毕
Browse files Browse the repository at this point in the history
  • Loading branch information
wkunzhi committed Dec 3, 2019
1 parent 06a2a03 commit e1c417b
Show file tree
Hide file tree
Showing 7 changed files with 420 additions and 258 deletions.
278 changes: 182 additions & 96 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file modified rbac/__pycache__/urls.cpython-37.pyc
Binary file not shown.
62 changes: 41 additions & 21 deletions rbac/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="UTF-8">
<title>权限管理页面</title>
<link rel="shortcut icon" href="{% static 'imgs/default.png' %} ">
{# <link rel="stylesheet" href="{% static 'plugins/bootstrap/css/bootstrap.css' %} "/>#}
{# <link rel="stylesheet" href="{% static 'plugins/bootstrap/css/bootstrap.css' %} "/>#}
<link rel="stylesheet" href="{% static 'plugins/font-awesome/css/font-awesome.css' %} "/>
<link rel="stylesheet" href="{% static 'css/commons.css' %} "/>
<link rel="stylesheet" href="{% static 'css/nav.css' %} "/>
Expand All @@ -20,20 +20,41 @@
margin: 0;
height: 100%;
}

html {
height: 100%;
}
.layui-header a {
text-decoration:none;
}
.layui-header {
background-color: #393d49;
}

.pg-body, .left-menu, .left-tree{
height: 100%;
}
.pg-body > .right-body {
background-color: #f2f2f2;
position: absolute;
left: 200px;
right: 0;
top: 60px;
height: 100%;
border: 1px solid #ddd;
font-size: 14px;
min-width: 755px;
}
.layui-card-one{
height: 50px;
line-height: 50px;
border-bottom: 1px solid #ddd;
padding: 0 17px;
background-color: white;
}
</style>
<!--某些单独的页面需要用自己的css-->
{% block css %}{% endblock %}
</head>
<body>

<!--顶部-->
<div class="layui-header">
<div>
Expand Down Expand Up @@ -70,38 +91,37 @@
<li class="layui-nav-item layui-hide-xs" lay-unselect="">
<a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
</li>
</ul>>
</ul>
>
</div>
<div>
<!--下部-->
<div class="pg-body">
<!--左侧-->
<!--实现可插拔功能,其他项目需要打印菜单时,用rbac中的inclusion_tag方法即可-->
<div class="left-menu">
{% multi_menu request %}
</div>
<!--右侧-->
<div class="right-body">
<div class="layui-card-one">
{% breadcrumb request %}
</div>
{% block content %} {% endblock %}
</div>

</div>
<!--左侧-->
<!--实现可插拔功能,其他项目需要打印菜单时,用rbac中的inclusion_tag方法即可-->
{% multi_menu request %}

{# <div class="right-body">#}
{# <div>#}
{# {% breadcrumb request %}#}
{# </div>#}
{# {% block content %} {% endblock %}#}
{# </div>#}

<script src="{% static 'js/jquery-3.3.1.min.js' %} "></script>
<script src="{% static 'plugins/bootstrap/js/bootstrap.js' %} "></script>
<script src="{% static 'rbac/js/rbac.js' %} "></script>

<!--某些单独的页面需要用自己的js-->
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function () {
var element = layui.element;

//…
});
</script>



{% block js %} {% endblock %}

</body>
Expand Down
23 changes: 11 additions & 12 deletions rbac/templates/rbac/breadcrumb.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<!--用户访问路径追踪-->
<div>
<ol class="breadcrumb no-radius no-margin" style="border-bottom: 1px solid #ddd;">
{% for item in record_list %}
<!--判断是否是最后一层路径,最后一层为不可选中-->
{% if item.class %}
<li class="{{ item.class }}">{{ item.title }}</li>
{% else %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endif %}
{% endfor %}
</ol>
</div>

<div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
{% for item in record_list %}
<!--判断是否是最后一层路径,最后一层为不可选中-->
{% if item.class %}
<a style="text-decoration:none;"><cite>{{ item.title }}</cite></a>
{% else %}
<a style="text-decoration:none;" href="{{ item.url }}">{{ item.title }}</a><span lay-separator="">/</span>
{% endif %}
{% endfor %}
</div>
Loading

0 comments on commit e1c417b

Please sign in to comment.