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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
54 deletions
+166
-54
auth_rule_index.html
application/index/view/auth/auth_rule_index.html
+82
-53
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
{layout name="global/frame_tpl" /}
<!--关联js元素-->
<input
type=
"hidden"
class=
"page-load"
id=
"auth_rule_index"
/>
<!--关联js元素-->
<style>
.ids
{
position
:
absolute
;
top
:
-20%
;
left
:
-20%
;
display
:
block
;
width
:
140%
;
height
:
140%
;
margin
:
0px
;
padding
:
0px
;
background
:
rgb
(
255
,
255
,
255
)
none
repeat
scroll
0%
0%
;
border
:
0px
none
;
opacity
:
0
;}
ins
{
position
:
absolute
;
top
:
-20%
;
left
:
-20%
;
display
:
block
;
width
:
140%
;
height
:
140%
;
margin
:
0px
;
padding
:
0px
;
background
:
rgb
(
255
,
255
,
255
)
none
repeat
scroll
0%
0%
;
border
:
0px
none
;
opacity
:
0
;}
</style>
<div
id=
"pjax-container"
class=
"content-wrapper"
style=
"min-height: 1426px; width: 1035px; float: left; margin-left: 20px;"
>
<section
class=
"content-header"
>
<!-- 面包屑导航 -->
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
</a><a
href=
"/admin.php/admin/dashboard/index.html"
>
首页
</a></li>
<li
class=
"active"
>
规则管理
</li>
</ol>
</section>
<!--内容-->
<section
class=
"content"
>
<div
class=
"box box-solid"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
规则管理
</h3>
<div
class=
"box-tools pull-right"
>
<button
onclick=
"javascript:location.reload();"
class=
"btn btn-box-tool f16"
type=
"button"
><i
class=
"fa fa-refresh"
></i></button>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"builder listbuilder-box"
>
<div
class=
"builder-toolbar mt-10 mb-20"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-12 button-list clearfix"
>
<!-- 工具栏按钮 -->
<!--<div class="form-group">-->
<a
href=
"/index/authRuleBox.html"
class=
"btn btn-primary btn-sm"
title=
"新增"
>
新增
</a>
<!--<a href="/setstatus/status/resume/model/auth_rule.html" model="auth_rule" class="btn btn-success ajax-post confirm btn-sm" target-form="ids" title="启用">启用</a> -->
<!--<a href="/setstatus/status/forbid/model/auth_rule.html" model="auth_rule" class="btn btn-warning ajax-post confirm btn-sm" target-form="ids" title="禁用">禁用</a> -->
<!--<a href="/status/delete/model/auth_rule.html" model="auth_rule" class="btn btn-danger ajax-post confirm btn-sm" target-form="ids" title="删除">删除</a> -->
<!--<a onclick="move_menuparent()" title="<i class="fa fa-exchange"></i> 移动位置" class="btn btn-info btn-sm" target-form="ids"><i class="fa fa-exchange"></i> 移动位置</a> -->
<!--<a model="auth_rule" href="/admin.php/admin/auth/rule_sort/pid/0.html" class="btn btn-info btn-sm" name="排序" title="<i class="fa fa-sort"></i> 排序"><i class="fa fa-sort"></i> 排序</a> -->
<!--<!– </div>–>-->
<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
class=
"active"
>
新增
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"#modal-edit"
data-toggle=
"modal"
class=
"btn btn-default edit_add"
><i
class=
"icon-plus"
></i>
新增
</a>
</li>
</ul>
</div>
</div>
<!--row-->
</div>
<!-- 数据列表 -->
<div
class=
"builder-container"
>
<div
class=
"row"
>
<div
class=
"builder-table col-sm-12"
>
<table
class=
"table table-responsive table-bordered table-hover dataTable"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
width=
"50"
class=
"checkbox-toggle"
><div
class=
"icheckbox_minimal-blue"
style=
"position: relative;"
aria-checked=
"false"
aria-disabled=
"false"
><input
type=
"checkbox"
class=
"check-all"
style=
"position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"
><ins
class=
"iCheck-helper"
style=
"position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"
></ins></div>
<!-- <span class="checkbox-toggle" style="color:#ddd;font-size:23px;cursor:pointer;"><i class="fa fa-square-o"></i></span> -->
</th>
...
...
@@ -68,23 +39,81 @@
</tbody>
</table>
<!-- 列表底部按钮 -->
<!--<div class="form-group">-->
<!-- </div>-->
<div
class=
"paginations"
id=
"pagediv"
>
</div>
<!-- /#page-content-wrapper//分页 -->
<div
class=
"text-right pageinfo"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--编辑-->
<div
class=
"modal fade"
id=
"modal-edit"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
编辑信息
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<input
type=
"text"
value=
""
name=
"title"
class=
"form-control btn6"
placeholder=
"用于后台显示的配置标题"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
上级菜单:
</label>
<select
class=
"form-control btn6"
name=
"pid"
id=
"pid"
>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<input
type=
"text"
value=
""
name=
"name"
class=
"form-control btn6"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
后台菜单:
</label>
<div
class=
"col-md-8"
>
<div
class=
"oh mb-10 pl-5"
>
<div
class=
"radio radio-primary fl mr-10"
>
<label
class=
"radio-label1"
for=
"is_menu1"
>
<div
class=
"iradio_minimal-blue checked"
style=
"position: relative;"
aria-checked=
"false"
aria-disabled=
"false"
>
<input
type=
"radio"
value=
"1"
id=
"is_menu1"
name=
"is_menu"
style=
""
>
</div>
是
</label>
</div>
</section>
<div
class=
"radio radio-primary fl mr-10"
>
<label
class=
"radio-label2"
>
<div
class=
"iradio_minimal-blue"
style=
"position: relative;"
aria-checked=
"false"
aria-disabled=
"false"
>
<input
type=
"radio"
value=
"0"
id=
"is_menu2"
name=
"is_menu"
style=
""
>
</div>
否
</label>
</div>
</div>
<div
class=
"help-block "
><i
class=
"fa fa-info-circle color-info1"
></i>
是否标记为后台菜单
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<input
type=
"number"
value=
"1"
name=
"sort"
class=
"form-control btn6"
>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_edit"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
public/resource/js/auth_rule_index.js
View file @
94a5defb
...
...
@@ -9,8 +9,75 @@ authRule={
authRule
.
event
();
},
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
){
authRule
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
public/resource/template/auth_rule_index_template_tpl.html
View file @
94a5defb
...
...
@@ -15,7 +15,7 @@
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
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
>
<
/td
>
<
/tr
>
...
...
@@ -26,3 +26,18 @@
<
/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>
\ 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