将权限与部门的逻辑分包

This commit is contained in:
zhengxinonly
2021-06-13 15:07:40 +08:00
parent 5faf88283f
commit 9e8a5357be
19 changed files with 171 additions and 131 deletions
+2 -2
View File
@@ -88,7 +88,7 @@
dtree.renderSelect({
elem: '#selectParent',
url: '/admin/dept/tree',
url: '/dept/tree',
method: 'get',
selectInputName: { nodeId: 'parentId', context: 'parentName' },
skin: 'layui',
@@ -99,7 +99,7 @@
form.on('submit(dept-save)', function (data) {
$.ajax({
url: '/admin/dept/save',
url: '/dept/save',
data: JSON.stringify(data.field),
dataType: 'json',
contentType: 'application/json',
+1 -1
View File
@@ -99,7 +99,7 @@
form.on('submit(dept-update)', function (data) {
$.ajax({
url: '/admin/dept/update',
url: '/dept/update',
data: JSON.stringify(data.field),
dataType: 'json',
contentType: 'application/json',
+5 -4
View File
@@ -78,7 +78,7 @@
let treetable = layui.treetable
let popup = layui.popup
let MODULE_PATH = '/admin/dept/'
let MODULE_PATH = '/dept/'
window.render = function () {
treetable.render({
@@ -91,7 +91,7 @@
treeDefaultClose: false,
toolbar: '#dept-toolbar',
elem: '#dept-table',
url: '/admin/dept/data',
url: '/dept/data',
page: false,
cols: [
[
@@ -153,7 +153,8 @@
} else if (obj.event === 'refresh') {
window.refresh()
} else if (obj.event === 'batchRemove') {
window.batchRemove(obj)
{#window.batchRemove(obj)#}
console.log(table.checkStatus(obj.config.id).data)
}
})
@@ -166,7 +167,7 @@
}
let loading = layer.load()
$.ajax({
url: '/admin/dept/' + operate,
url: '/dept/' + operate,
data: JSON.stringify({ deptId: this.value }),
dataType: 'json',
contentType: 'application/json',
+8 -6
View File
@@ -24,10 +24,12 @@
<!-- 顶 部 右 侧 菜 单 -->
<div id="control" class="layui-layout-control"></div>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item layui-hide-xs"><a href="#"
class="fullScreen layui-icon layui-icon-screen-full"></a></li>
<li class="layui-nav-item layui-hide-xs"><a href="http://www.pearadmin.com"
class="layui-icon layui-icon-website"></a></li>
<li class="layui-nav-item layui-hide-xs">
<a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a>
</li>
<li class="layui-nav-item layui-hide-xs">
<a href="http://www.pearadmin.com" class="layui-icon layui-icon-website"></a>
</li>
<li class="layui-nav-item layui-hide-xs message"></li>
<li class="layui-nav-item user">
<!-- 头 像 -->
@@ -81,7 +83,7 @@
// 你可以通过 admin.setConfigPath 方法修改配置文件位置
// 你可以通过 admin.setConfigType 方法修改配置文件类型
admin.setConfigType('json')
admin.setConfigPath("{{ url_for('adminIndex.configs') }}")
admin.setConfigPath("{{ url_for('rights.configs') }}")
admin.render()
@@ -89,7 +91,7 @@
admin.logout(function () {
let loading = layer.load()
$.ajax({
url: '/admin/logout',
url: '/passport/logout',
dataType: 'json',
type: 'post',
success: function (result) {
+4 -4
View File
@@ -26,7 +26,7 @@
</div>
<div class="layui-form-item">
<input placeholder="验证码 : " name="captcha" hover class="code layui-input layui-input-inline"/>
<img src="{{ url_for('adminIndex.get_captcha') }}" class="codeImage" id="captchaImage"/>
<img src="{{ url_for('passport.get_captcha') }}" class="codeImage" id="captchaImage"/>
</div>
<div class="layui-form-item">
<input type="checkbox" name="remember-me" title="记住密码" lay-skin="primary">
@@ -45,7 +45,7 @@
let layer = layui.layer;
let button = layui.button;
let popup = layui.popup;
let captchaPath = "{{ url_for('adminIndex.get_captcha') }}";
let captchaPath = "{{ url_for('passport.get_captcha') }}";
form.on('submit(login)', function (data) {
let loader = layer.load();
@@ -59,7 +59,7 @@
btn.stop(function () {
if (result.success) {
popup.success(result.msg, function () {
location.href = "{{ url_for('adminIndex.index') }}";
location.href = "{{ url_for('admin.index') }}";
})
} else {
popup.failure(result.msg, function () {
@@ -81,7 +81,7 @@
})
</script>
<script>
if (window != top) {
if (window !== top) {
top.location.href = location.href;
}
</script>
+1 -1
View File
@@ -78,7 +78,7 @@
dtree.renderSelect({
elem: '#selectParent',
url: '/admin/dept/tree',
url: '/dept/tree',
method: 'get',
selectInputName: { nodeId: 'deptId', context: 'deptName' },
skin: 'layui',
+1 -1
View File
@@ -146,7 +146,7 @@
dtree.render({
elem: '#dept-tree',
method: 'get',
url: '/admin/dept/tree',
url: '/dept/tree',
dataFormat: 'list',
line: true,
skin: 'laySimple',