Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
39f4b30d
Commit
39f4b30d
authored
Feb 01, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限管理
parent
993c8a5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
4 deletions
+43
-4
auth_rule_index.html
application/index/view/auth/auth_rule_index.html
+1
-2
auth_rule_index.js
public/resource/js/auth_rule_index.js
+35
-0
auth_rule_index_template_tpl.html
public/resource/template/auth_rule_index_template_tpl.html
+7
-2
No files found.
application/index/view/auth/auth_rule_index.html
View file @
39f4b30d
...
...
@@ -7,7 +7,7 @@
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
规则
管理
</a></li>
<li><a
href=
"#"
>
权限
管理
</a></li>
<li
class=
"active"
>
新增
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
...
...
@@ -50,7 +50,6 @@
<th>
URL
</th>
<th>
排序
</th>
<th>
菜单
</th>
<th>
状态
</th>
<th>
操作
</th>
</tr>
</thead>
...
...
public/resource/js/auth_rule_index.js
View file @
39f4b30d
...
...
@@ -24,7 +24,41 @@ authRule={
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//新增
authRule
.
Edid_add
();
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
authRule
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"正常"
)
{
params
.
type
=
1
;
$
(
this
).
html
(
'冻结'
);
}
else
if
(
str
===
"冻结"
){
params
.
type
=
0
;
$
(
this
).
html
(
'正常'
);
}
else
{
params
.
type
=
2
;
}
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateRoleStatus'
,
data
:
{
"ids"
:
authRule
.
id
,
"status"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
}
}
else
{
alert
(
"禁用失败!"
)
}
}
});
});
},
Edid_add
:
function
(){
$
.
ajax
({
...
...
@@ -67,6 +101,7 @@ authRule={
par
.
sort
=
$
(
"input[name = sort]"
).
val
();
par
.
pid
=
$
(
"#pid"
).
val
();
par
.
is_menu
=
$
(
"input[name =is_menu]:checked"
).
val
();
params
.
search
=
$
(
"input[name='search']"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updateAuthRule'
,
...
...
public/resource/template/auth_rule_index_template_tpl.html
View file @
39f4b30d
...
...
@@ -12,11 +12,16 @@
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"sort"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"is_menu"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<
td
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-info is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
正常
<
/a
>
[
%
}
else
if
(
it
[
item
][
"status"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-info is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
冻结
<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-default"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
离职
<
/a
>
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment