初始化

This commit is contained in:
2025-11-25 17:41:24 +08:00
commit 4cdf0f0f85
3383 changed files with 1050962 additions and 0 deletions

View File

@@ -0,0 +1,176 @@
@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>

View File

@@ -0,0 +1,173 @@
@{
Layout = null;
}
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover " id="editable">
<thead>
<tr>
@*<th>#</th>*@
<th>名字</th>
<th>时间</th>
<th>操作</th>
<th>IP</th>
<th>型号</th>
<th>浏览器</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<script>
$(document).ready(function () {
var name = $("#username").find("option:selected").val();//月
var tablesc = $("#editable").DataTable({
language: {
"processing": "处理中...",
"lengthMenu": "_MENU_ 记录/页",
"zeroRecords": "没有匹配的记录",
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
"infoEmpty": "第 0 至 0 项记录,共 0 项",
"infoFiltered": "",
"infoPostFix": "",
"decimal": ",",
"thousands": ".",
"emptyTable": "未找到符合条件的数据",
"paginate": {
"first": "«",
"previous": "",
"next": "",
"last": "»"
}
},
retrieve: true,
paging: true,
ordering: false,
info: true,
autoWidth: false,
pageLength: 10,//每页显示10条数据
pagingType: "full_numbers", //分页样式simple,simple_numbers,full,full_numberszzzzzzz
bFilter: false, //去掉搜索框方法
bLengthChange: true,//也就是页面上确认是否可以进行选择一页展示多少条
serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
ajax: function (data, callback, settings) {
//封装相应的请求参数,这里获取页大小和当前页码
var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
var page = (data.start) / data.length + 1;//当前页码
$.ajax({
type: "POST",
url: "/Jurisdiction/ShowInfo",
cache: false, //禁用缓存
//data: json, //传入已封装的参数
data: { "page": page, "pagesize": pagesize, "username": name }, //传入已封装的参数
dataType: "json",//返回数据格式为json
success: function (res) {
console.log(res);
//console.log(res.Status);
var returnData = {};
//returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
returnData.recordsTotal = res.Status;//totalCount指的是总记录数
returnData.recordsFiltered = res.Status;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
for (var i = 0; i < res.Data.length; i++) {
res.Data[i].CreateTiem = changeDateFormat(res.Data[i].CreateTiem);
}
returnData.data = res.Data;//返回列表
//console.log(res.Data[0].CreateTiem);
callback(returnData);//这个别忘了!!!
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("查询失败");
$wrapper.spinModal(false);
}
});
},
columns: [
//{ "data": "ID" },
{ "data": "Name" },
{ "data": "CreateTiem" },
{ "data": "Operation" },
{ "data": "IPSite" },
{ "data": "SystemVersion" },
{ "data": "Browser" },
]
});
});
//debugger;
$("#username").off("change").change(function () {
$("#editable").dataTable().fnClearTable();
$("#editable").dataTable().fnDestroy();
var name = $("#username").find("option:selected").val();//月
var tables = $("#editable").DataTable({
language: {
"processing": "处理中...",
"lengthMenu": "_MENU_ 记录/页",
"zeroRecords": "没有匹配的记录",
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
"infoEmpty": "第 0 至 0 项记录,共 0 项",
"infoFiltered": "",
"infoPostFix": "",
"decimal": ",",
"thousands": ".",
"emptyTable": "未找到符合条件的数据",
"paginate": {
"first": "«",
"previous": "",
"next": "",
"last": "»"
}
},
retrieve: true,
paging: true,
ordering: false,
info: true,
autoWidth: false,
pageLength: 10,//每页显示10条数据
pagingType: "full_numbers", //分页样式simple,simple_numbers,full,full_numberszzzzzzz
bFilter: false, //去掉搜索框方法
bLengthChange: true,//也就是页面上确认是否可以进行选择一页展示多少条
serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
ajax: function (data, callback, settings) {
//封装相应的请求参数,这里获取页大小和当前页码
var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
var page = (data.start) / data.length + 1;//当前页码
$.ajax({
type: "POST",
url: "/Jurisdiction/ShowInfo",
cache: false, //禁用缓存
//data: json, //传入已封装的参数
data: { "page": page, "pagesize": pagesize, "username": name }, //传入已封装的参数
dataType: "json",//返回数据格式为json
success: function (res) {
console.log(res);
//console.log(res.Status);
var returnData = {};
//returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
returnData.recordsTotal = res.Status;//totalCount指的是总记录数
returnData.recordsFiltered = res.Status;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
for (var i = 0; i < res.Data.length; i++) {
res.Data[i].CreateTiem = changeDateFormat(res.Data[i].CreateTiem);
}
returnData.data = res.Data;//返回列表
//console.log(res.Data[0].CreateTiem);
callback(returnData);//这个别忘了!!!
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("查询失败");
$wrapper.spinModal(false);
}
});
},
columns: [
//{ "data": "ID" },
{ "data": "Name" },
{ "data": "CreateTiem" },
{ "data": "Operation" },
{ "data": "IPSite" },
{ "data": "SystemVersion" },
{ "data": "Browser" },
]
});
})
</script>

View File

@@ -0,0 +1,85 @@
@model List<Face.Domain.Entities.OperationLog>
@{
Layout = "~/Views/Shared/_Layout.cshtml";
List<Face.Domain.Entities.AdminUser> UserList = Face.Services.Cache.CxwCacheHelp.GetUserList();//用户
}
<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 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" style="padding:0px">
<div class="ibox float-e-margins">
<div class="ibox-title">
<select id="username" class="form-control username" style="display:inline;width:90px;">
<option value="0">所有人</option>
@if (UserList != null && UserList.Count > 0)
{
foreach (var item in UserList)
{
if (item.AdminName != "admin")
{
<option value="@item.AdminName">@item.AdminName</option>
}
}
}
</select>
</div>
<div class="ibox-content" style="padding:0px">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover " id="editable">
<thead>
<tr>
@*<th>#</th>*@
<th>名字</th>
<th>时间</th>
<th>操作</th>
<th>IP</th>
<th>型号</th>
<th>浏览器</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</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/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.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/OperationLog.js"></script>

View File

@@ -0,0 +1,36 @@
@model List<Face.Domain.Entities.Module>
@{
/**/
Layout = null;
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(',');
}
<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">
<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>