SysStates.cshtml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesSystemSysState; //The menu item will be active for this page.
  7. ViewBag.Title = "系统翻译字典";
  8. var searchForm = new SearchFormViewModal(new List<SearchItem>()
  9. {
  10. new SearchItem("stateName","字典名称"),
  11. new SearchItem("tableName","表名称" ),
  12. new SearchItem("columnName","字段名")
  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"
  18. data-url="/api/services/app/States/GetAll"
  19. data-striped="true" data-id-field="id" data-unique-id="id"
  20. data-method="post"
  21. data-side-pagination="server"
  22. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  23. data-cache="false"
  24. data-pagination="true"
  25. data-page-size="30"
  26. data-page-number="1"
  27. data-page-list="[30,50,100,200]" data-pagination-detail-h-align="right" data-pagination-h-align="left"
  28. data-query-params="QueryParams"
  29. data-response-handler="ResponseHandler"
  30. data-click-to-select="true"
  31. data-single-select="true">
  32. <thead>
  33. <tr class="row" id="header">
  34. <th data-field="state" data-checkbox="true"></th>
  35. @*<th data-align="center" data-field="stateNo">字典编号</th>*@
  36. <th data-align="center" data-field="stateName">字典名称</th>
  37. <th data-align="center" data-field="tableName">表名称</th>
  38. <th data-align="center" data-field="columnName">字段名</th>
  39. <th data-align="center" data-field="codeValue">字段值</th>
  40. <th data-align="center" data-field="displayValue">显示值</th>
  41. </tr>
  42. </thead>
  43. </table>
  44. </div>
  45. @*<span id="print">打印</span>*@
  46. @section modal{
  47. <!--Main Modal-->
  48. <section>
  49. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  50. <div class="modal-dialog modal-dialog-centered" role="document">
  51. <div class="modal-content">
  52. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("字典"))
  53. @{
  54. var inputs = new List<InputViewModel>
  55. {
  56. new InputViewModel("id", hide: true),
  57. //new InputViewModel("stateNo", displayName: "字典编号"),
  58. new InputViewModel("stateName", displayName: "字典名称"),
  59. new InputViewModel("tableName", displayName: "表名称"),
  60. new InputViewModel("columnName", displayName: "字段名"),
  61. new InputViewModel("codeValue", displayName: "字段值"),
  62. new InputViewModel("displayValue", displayName: "显示值"),
  63. };
  64. //var specials = new List<SpecialInputModel>();
  65. }
  66. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  67. @Html.Partial("Modals/_ModalFooter", "0")
  68. </div>
  69. </div>
  70. </div>
  71. </section>
  72. }
  73. @section css
  74. {
  75. @*<link href="~/Content/Plugins/PrintPreView/print-preview.css" rel="stylesheet" />*@
  76. }
  77. @section scripts
  78. {
  79. @*<script src="~/Content/Plugins/PrintPreView/print-preview.js"></script>*@
  80. <script type="text/javascript">
  81. $(function () {
  82. LoadTable();
  83. var funs = window.funs || { none: function () { console.log("No type"); } };
  84. funs["btnUpdate"] = function () { BtnUpdate({ readonly: "codeValue,tableName,columnName" }); };
  85. });
  86. //$('#print').printPreview({
  87. // printBody: ".table-box",
  88. // cssUrl: '../../Content/Plugins/bootstrap-3.3.7/css/bootstrap.css,../../Content/Css/Site.css'
  89. //});
  90. </script>
  91. }