177 lines
6.8 KiB
Plaintext
177 lines
6.8 KiB
Plaintext
@model List<Face.Domain.Entities.Module>
|
|
@{
|
|
/**/
|
|
|
|
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
List<Face.Domain.Entities.AdminUser> UserList = Face.Services.Cache.CxwCacheHelp.GetUserList();//用户
|
|
List<Face.Domain.Entities.RoleAuthority> RoleList = Face.Services.Cache.CxwCacheHelp.GetRoles();//角色
|
|
string str = ViewBag.jurisdiction;
|
|
string[] jurisdiction = str.Split(',');
|
|
|
|
}
|
|
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet" />
|
|
<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />
|
|
|
|
<div class="row wrapper border-bottom white-bg page-heading">
|
|
<div class="col-lg-10">
|
|
<ol class="breadcrumb">
|
|
<li>
|
|
<a href="@Url.Action("Index", "CxwHome")">主页</a>
|
|
</li>
|
|
@*<li>
|
|
<a href="@Url.Action("JournalLog", "CxwHome")">交易信息</a>
|
|
</li>*@
|
|
<li class="active">
|
|
<strong>权限列表</strong>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="col-lg-2">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
<div class="row">
|
|
<div class="col-sm-8">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
@*<div class="col-sm-2">
|
|
|
|
<select class="form-control input-sm input-s-sm inline username" name="HandlerName" style="display:inline;">
|
|
|
|
@if (UserList != null && UserList.Count > 0)
|
|
{
|
|
foreach (var item in UserList)
|
|
{
|
|
if (item.AdminName != "admin")
|
|
{
|
|
<option value="@item.ID">@item.AdminName</option>
|
|
}
|
|
}
|
|
}
|
|
|
|
</select>
|
|
<select class="form-control input-sm input-s-sm inline Role" name="Role" style="display:inline;">
|
|
|
|
@if (RoleList != null && RoleList.Count > 0)
|
|
{
|
|
foreach (var item in RoleList)
|
|
{
|
|
if (item.RoleName != "管理员")
|
|
{
|
|
<option value="@item.ID">@item.RoleName</option>
|
|
}
|
|
}
|
|
}
|
|
|
|
</select>
|
|
</div>*@
|
|
<div id="SelectDate">
|
|
<label> <input type="radio" value="user" name="Module" checked> <i></i> 用户</label>
|
|
<label> <input type="radio" value="role" name="Module"> <i></i> 角色</label>
|
|
</div>
|
|
<div id="condition" style="display:inline;">
|
|
<select id="username" class="form-control username" style="display:inline;width:90px;">
|
|
@if (UserList != null && UserList.Count > 0)
|
|
{
|
|
foreach (var item in UserList)
|
|
{
|
|
if (item.AdminName != "admin")
|
|
{
|
|
<option value="@item.ID">@item.AdminName</option>
|
|
}
|
|
}
|
|
}
|
|
</select>
|
|
<select class="Role form-control" style="display:inline;width:90px;" name="RoleID">
|
|
@if (RoleList != null && RoleList.Count > 0)
|
|
{
|
|
foreach (var item in RoleList)
|
|
{
|
|
if (item.RoleName != "管理员")
|
|
{
|
|
<option value="@item.ID">@item.RoleName</option>
|
|
}
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="ibox-content" id="content">
|
|
<table class="table table-striped table-bordered table-hover " id="editable">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>操作</th>
|
|
<th>控制器</th>
|
|
<th>方法</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@for (int i = 0; i < Model.Count; i++)
|
|
{
|
|
<tr class="gradeX">
|
|
@*@(Model.HandlerName == item.AdminName ? "selected" : "")*@
|
|
|
|
@*<td><input type="checkbox" class="i-checks" name="input[]" @(Model[i].ID == jurisdiction[1].ToInt() ? "checked" : "") /></td>*@
|
|
<td><input type="checkbox" class="i-checks" value="@Model[i].ID" name="input[]" @foreach (var item in jurisdiction){@(item.ToInt() == Model[i].ID ? "checked='checked'" : "")} /><input type="hidden" value="@Model[i].ID"> </td>
|
|
|
|
<td>@Model[i].Operation</td>
|
|
<td>@Model[i].Controller</td>
|
|
<td>@Model[i].Method</td>
|
|
</tr>
|
|
}
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-4" id="orderBox_Content">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
|
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
|
|
|
<script src="~/Theme/js/demo/peity-demo.js"></script>
|
|
|
|
<script src="~/CxwPlugin/mobile-detect.min.js"></script>
|
|
<script src="~/CxwPlugin/AddCookie.js"></script>
|
|
<script src="~/CxwPlugin/Jurisdiction.js"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
var oTable = $('#editable').DataTable({
|
|
"bLengthChange": false,
|
|
});
|
|
|
|
/* Apply the jEditable handlers to the table */
|
|
//oTable.$('td').editable('../example_ajax.php', {
|
|
// "callback": function (sValue, y) {
|
|
// var aPos = oTable.fnGetPosition(this);
|
|
// oTable.fnUpdate(sValue, aPos[0], aPos[1]);
|
|
// },
|
|
// "submitdata": function (value, settings) {
|
|
// return {
|
|
// "row_id": this.parentNode.getAttribute('id'),
|
|
// "column": oTable.fnGetPosition(this)[2]
|
|
// };
|
|
// },
|
|
|
|
// "width": "90%",
|
|
// "height": "100%"
|
|
//});
|
|
|
|
});
|
|
$("ul").delegate("li.paginate_button>a", "click", function () {
|
|
console.log("2");
|
|
|
|
});
|
|
</script>
|