Browse Source

Update

master
fanwensheng 3 years ago
parent
commit
003d6b2463
  1. 23
      04.系统编码/App/Content/scripts/system-management/user-management/index.js
  2. 4
      04.系统编码/App/Controllers/ConfigManagementController.cs
  3. 4
      04.系统编码/App/Controllers/OrgManagementController.cs
  4. 4
      04.系统编码/App/Controllers/StatisticAnalysisController.cs
  5. 4
      04.系统编码/App/Controllers/UserManagementController.cs
  6. 2
      04.系统编码/App/Views/UserManagement/Index.cshtml

23
04.系统编码/App/Content/scripts/system-management/user-management/index.js

@ -1,5 +1,5 @@
var App = function () { var App = function () {
this.userGrid = $('#task-grid');
this.data = {}; this.data = {};
this.selectedRow = []; this.selectedRow = [];
this.AddDialog = new AddDialog(this); this.AddDialog = new AddDialog(this);
@ -62,7 +62,7 @@
}; };
this.InitDataGrid = function () { this.InitDataGrid = function () {
$('#task-grid').datagrid({ this.userGrid.datagrid({
columns: [[ columns: [[
{ field: 'RealName', title: '姓名', align: 'center', width: 10 }, { field: 'RealName', title: '姓名', align: 'center', width: 10 },
{ field: 'LoginName', title: '登录账户', align: 'center', width: 10 }, { field: 'LoginName', title: '登录账户', align: 'center', width: 10 },
@ -77,8 +77,9 @@
scrollbarSize: 0, scrollbarSize: 0,
pagination: true, pagination: true,
pageNumber: 1, pageNumber: 1,
pageSize: 30, pageSize: 20,
pageList: [30, 40, 50], pageList: [10, 20, 50, 100, 150, 200],
loadMsg: '正在加载数据,请稍后...',
onSelect: this.OnTaskSelected.bind(this), onSelect: this.OnTaskSelected.bind(this),
onUnselect: this.OnTaskUnselected.bind(this), onUnselect: this.OnTaskUnselected.bind(this),
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this), onBeforeLoad: this.OnTableGridBeforeLoad.bind(this),
@ -98,7 +99,7 @@
}; };
this.ReLoadTableData = function (orgId) { this.ReLoadTableData = function (orgId) {
$.ajax({ /* $.ajax({
type: "POST", type: "POST",
dataType: 'text', dataType: 'text',
url: '/UserManagement/Query', url: '/UserManagement/Query',
@ -108,8 +109,15 @@
pageSize: 30 pageSize: 30
}, },
success: function (result) { success: function (result) {
$('#task-grid').datagrid('loadData', JSON.parse(result)); this.userGrid.datagrid('loadData', JSON.parse(result));
}.bind(this) }.bind(this)
});*/
this.userGrid.datagrid({
method: "POST",
url: '/UserManagement/Query',
queryParams: {
orgId: orgId
}
}); });
}; };
@ -134,8 +142,7 @@
}; };
this.OnTableGridBeforeLoad = function () { this.OnTableGridBeforeLoad = function () {
var page = $('#task-grid').datagrid('getPager'); this.userGrid.datagrid('getPager').pagination({
$(page).pagination({
beforePageText: '第', beforePageText: '第',
afterPageText: '页   共{pages}页', afterPageText: '页   共{pages}页',
displayMsg: '当前显示{from}-{to}条记录   共{total}条记录', displayMsg: '当前显示{from}-{to}条记录   共{total}条记录',

4
04.系统编码/App/Controllers/ConfigManagementController.cs

@ -22,9 +22,9 @@ namespace Pingchuan.BeijingSafeguard.App.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult Query(int pageIndex, int pageSize) public JsonResult Query(int page, int rows)
{ {
List<Config> configs = ConfigBLL.Query(pageIndex, pageSize); List<Config> configs = ConfigBLL.Query(page, rows);
return Json(configs); return Json(configs);
} }
} }

4
04.系统编码/App/Controllers/OrgManagementController.cs

@ -36,9 +36,9 @@ namespace Pingchuan.BeijingSafeguard.App.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult Query(int pageIndex, int pageSize) public JsonResult Query(int page, int rows)
{ {
Pagination<Org> orgs = OrgBLL.Query(pageIndex, pageSize); Pagination<Org> orgs = OrgBLL.Query(page, rows);
return Json(orgs); return Json(orgs);
} }
} }

4
04.系统编码/App/Controllers/StatisticAnalysisController.cs

@ -15,9 +15,9 @@ namespace Pingchuan.BeijingSafeguard.App.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult Query(DateTime fromTime, DateTime toTime, int pageIndex, int pageSize) public JsonResult Query(DateTime fromTime, DateTime toTime, int page, int rows)
{ {
Pagination<Statistic> page = ComputeBLL.Statistics(fromTime, toTime, pageIndex, pageSize); Pagination<Statistic> page = ComputeBLL.Statistics(fromTime, toTime, page, rows);
return Json(page); return Json(page);
} }
} }

4
04.系统编码/App/Controllers/UserManagementController.cs

@ -36,9 +36,9 @@ namespace Pingchuan.BeijingSafeguard.App.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult Query(int orgId, int pageIndex, int pageSize) public JsonResult Query(int orgId, int page, int rows)
{ {
Pagination<User> users = UserBLL.Query(orgId, pageIndex, pageSize); Pagination<User> users = UserBLL.Query(orgId, page, rows);
return Json(users); return Json(users);
} }
} }

2
04.系统编码/App/Views/UserManagement/Index.cshtml

@ -38,7 +38,7 @@
</div> </div>
</div> </div>
<div class="table manage-table"> <div class="table manage-table">
<table id="task-grid"></table> <table id="task-grid" class="easyui-datagrid"></table>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save