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
94a5defb
Commit
94a5defb
authored
Jan 31, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户列表
parent
d513eda6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
1 deletion
+84
-1
auth_rule_index.html
application/index/view/auth/auth_rule_index.html
+0
-0
auth_rule_index.js
public/resource/js/auth_rule_index.js
+67
-0
auth_rule_index_template_tpl.html
public/resource/template/auth_rule_index_template_tpl.html
+17
-1
No files found.
application/index/view/auth/auth_rule_index.html
View file @
94a5defb
This diff is collapsed.
Click to expand it.
public/resource/js/auth_rule_index.js
View file @
94a5defb
...
@@ -9,8 +9,75 @@ authRule={
...
@@ -9,8 +9,75 @@ authRule={
authRule
.
event
();
authRule
.
event
();
},
},
event
:
function
()
{
event
:
function
()
{
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
authRule
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
authRule
.
Edid_add
();
authRule
.
Edit
();
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交编辑
authRule
.
Submit_edit
();
authRule
.
getList
();
});
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//新增
authRule
.
Edid_add
();
});
},
},
Edid_add
:
function
(){
$
.
ajax
({
url
:
'/index/classList/type/1'
,
//获取后台菜单
type
:
'GET'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'auth_class_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#pid"
).
html
(
doTempl
(
data
.
data
));
//赋值
}
});
},
Edit
:
function
(){
//获取
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/updateAuthRule/group_id/'
,
//获取编辑数据
data
:
{
"id"
:
authRule
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = title]"
).
val
(
data
.
data
.
title
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = sort]"
).
val
(
data
.
data
.
sort
);
$
(
"#pid"
).
val
(
data
.
data
.
pid
);
if
(
data
.
data
.
is_menu
==
0
){
$
(
"#is_menu2"
).
attr
(
'checked'
,
true
);
}
else
{
$
(
"#is_menu1"
).
attr
(
'checked'
,
true
);
}
}
});
},
Submit_edit
:
function
(){
//提交编辑的信息
var
par
=
{}
par
.
id
=
authRule
.
house_id
;
par
.
title
=
$
(
"input[name = title]"
).
val
();
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
sort
=
$
(
"input[name = sort]"
).
val
();
par
.
pid
=
$
(
"#pid"
).
val
();
par
.
is_menu
=
$
(
"input[name =is_menu]:checked"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updateAuthRule'
,
data
:
par
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getList
:
function
(
pageNo
){
getList
:
function
(
pageNo
){
authRule
.
pageNo
=
pageNo
;
authRule
.
pageNo
=
pageNo
;
var
params
=
{};
var
params
=
{};
...
...
public/resource/template/auth_rule_index_template_tpl.html
View file @
94a5defb
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<
td
>
<
td
>
<
a
style
=
"margin-right:6px;"
href
=
"/index/authRuleBox.html?id=[%= it[item]['id'] %]"
class
=
"btn btn-primary btn-xs"
title
=
"编辑"
>
编辑
<
/a
>
<
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
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
...
@@ -25,4 +25,19 @@
...
@@ -25,4 +25,19 @@
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
</script>
<!--权限管理模板-->
<script
id=
"auth_class_tpl"
type=
"text/template"
>
<
option
selected
=
""
value
=
"0"
>
顶级菜单
<
/option
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
if
(
it
[
item
][
'pid'
]
!=
0
){
%
]
<
option
value
=
"[%= it[item]['id'] %]"
>
[
%=
it
[
item
][
"title_show"
]
%
]
<
/option
>
[
%
}
else
{
%
]
<
option
value
=
"[%= it[item]['id'] %]"
>
[
%=
it
[
item
][
"title_show"
]
%
]
<
/option
>
[
%
}
%
]
[
%
}
%
]
[
%
}
%
]
</script>
</script>
\ No newline at end of file
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