SysSettings.cshtml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesSystemSysSetting; //The menu item will be active for this page.
  7. ViewBag.Title = "系统基础配置";
  8. var searchForm = new SearchFormViewModal(new List<SearchItem>()
  9. {
  10. new SearchItem("settingName","配置名称"),
  11. new SearchItem("code","配置代码" ),
  12. new SearchItem("description","配置描述")
  13. }, false);
  14. }
  15. <div class="table-box mr-4 iwb-bootstrap-table">
  16. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
  17. <table id="table" class=""
  18. data-url="/api/services/app/Settings/GetAll" data-id-field="id" data-unique-id="id"
  19. data-striped="true" data-click-to-select="true" data-single-select="true"
  20. data-method="post" data-side-pagination="server" data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  21. data-cache="false" data-pagination="true" data-page-size="30" data-page-number="1" data-page-list="[30,50,100,200]"
  22. data-pagination-h-align="left" data-pagination-detail-h-align="right"
  23. data-query-params="QueryParams" data-response-handler="ResponseHandler">
  24. <thead>
  25. <tr class="row" id="header">
  26. <th data-field="state" data-checkbox="true" data-width="300"></th>
  27. @*<th data-align="center" data-field="settingNo"></th>*@
  28. <th data-align="center" data-field="settingName" data-width="500">配置名称</th>
  29. @*<th data-align="center" data-field="settingType"></th>*@
  30. <th data-align="center" data-field="code" data-width="500">配置代码</th>
  31. <th data-align="center" data-field="value" data-width="500">配置值</th>
  32. <th data-align="center" data-field="description" data-width="500">配置描述</th>
  33. @*<th data-align="center" data-field=""></th>*@
  34. </tr>
  35. </thead>
  36. </table>
  37. </div>
  38. @section modal{
  39. <!--Main Modal-->
  40. <section>
  41. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  42. <div class="modal-dialog modal-dialog-centered" role="document">
  43. <div class="modal-content">
  44. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("配置"))
  45. @{
  46. var inputs = new List<InputViewModel>
  47. {
  48. new InputViewModel("id", hide: true),
  49. //new InputViewModel("settingNo", hide: true),
  50. new InputViewModel("settingName", displayName: "配置名称"),
  51. new InputViewModel("settingType", hide: true),
  52. new InputViewModel("code", displayName: "配置代码"),
  53. new InputViewModel("value", displayName: "配置值"),
  54. new InputViewModel("description", InputTypes.Textarea,"配置描述")
  55. };
  56. //var specials = new List<SpecialInputModel>();
  57. }
  58. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  59. @Html.Partial("Modals/_ModalFooter", "0")
  60. </div>
  61. </div>
  62. </div>
  63. </section>
  64. }
  65. @section scripts
  66. {
  67. <script type="text/javascript">
  68. $(function () {
  69. LoadTable();
  70. var funs = window.funs || { none: function () { console.log("No type"); } };
  71. funs["btnUpdate"] = function () { BtnUpdate({ readonly: "code" }); };
  72. funs["btnCreate"] = function () { BtnCreate({ data: { settingType:"0"} }); };
  73. funs["btnRefresh"] = function (url) { SaveAjax({ url: url, isValidate: false }) };
  74. });
  75. </script>
  76. }