List.cshtml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. }
  7. @section scripts{
  8. <script src="~/Scripts/Business/System/OperateLog.js" type="text/javascript"></script>
  9. }
  10. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  11. @Html.Position()
  12. <div class="p_SearchTitle">
  13. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  14. 查询条件</div>
  15. </div>
  16. <form id="formQuery" method="post" action="@Url.Content("~/OperateLog/Excel")">
  17. @Html.PositionCondition()
  18. <div class="p_title">
  19. <div style="padding-left: 5px;">
  20. 开始时间:@Html.TextBox(new TextBoxOptions
  21. {
  22. ID = "StartTime",
  23. Name = "StartTime",
  24. TextBoxType = TextBoxType.DateTime,
  25. Validator = new ValidatorBox { Required = true, MissingMessage = "必须填写开始结束时间才能进行查询" },
  26. Value = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss")
  27. },
  28. new Dictionary<string, string> { { "data-condition", "dgLogList" } })
  29. &nbsp;结束时间:@Html.TextBox(new TextBoxOptions
  30. {
  31. ID = "EndTime",
  32. Name = "EndTime",
  33. TextBoxType = TextBoxType.DateTime,
  34. Validator = new ValidatorBox { Required = true, MissingMessage = "必须填写开始结束时间才能进行查询" },
  35. Value = DateTime.Now.AddHours(+1).ToString("yyyy-MM-dd HH:mm:ss")
  36. },
  37. new Dictionary<string, string> { { "data-condition", "dgLogList" } })</div>
  38. </div>
  39. <div class="p_title">
  40. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  41. 操作日志列表</div>
  42. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  43. </div>
  44. </form>
  45. <div class="search_list">
  46. @Html.DataGrid(new DataGridOptions
  47. {
  48. Columns = new List<DataGridColumn>()
  49. {
  50. new CheckBoxFieldColumn{ HeaderText="", FieldName="OperateID"},
  51. new BoundFieldColumn { FieldName="LoginID", HeaderText="用户名", Align=AlignStyle.Center, Width=0.1 },
  52. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.06 },
  53. new BoundFieldColumn { FieldName="IP", HeaderText="IP地址", Align=AlignStyle.Center, Width=0.08 },
  54. new BoundFieldColumn { FieldName="Operate", HeaderText="操作类型", Align=AlignStyle.Center, Width=0.04 },
  55. new BoundFieldColumn { FieldName="IsSuccessDesc", HeaderText="是否成功", Align=AlignStyle.Center, Width=0.04 },
  56. new BoundFieldColumn { FieldName="TableName", HeaderText="操作表名", Align=AlignStyle.Center, Width=0.1, OverflowLength=20 },
  57. new BoundFieldColumn { FieldName="OperateTime", HeaderText="操作时间", Align=AlignStyle.Center, Width=0.1 , Formatter = Formatter.LongDate },
  58. new BoundFieldColumn { FieldName="SourceUrl", HeaderText="页面地址", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 },
  59. new BoundFieldColumn { FieldName="Detail", HeaderText="操作详情", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 }
  60. },
  61. PageSize = 50,
  62. IsCheckOnSelect = true,
  63. DataSourceUrl = Url.Content("~/OperateLog/List"),
  64. ID = "dgLogList",
  65. IsAutoLoad = false,
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false
  69. })
  70. </div>
  71. </div>