LawRuleInfo.cshtml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>@ViewBag.Title</title>
  10. <link href="~/easyui/themes/default/easyui.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="~/easyui/themes/icon.css" />
  12. <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
  13. <link href="~/Content/js/plugins/layer/skin/layer.css" rel="stylesheet" />
  14. <script src="~/Content/js/jquery.min.js"></script>
  15. <script src="~/Content/js/bootstrap.min.js"></script>
  16. <script src="~/easyui/jquery.easyui.min.js"></script>
  17. <script src="~/easyui/jquery.easyui.mobile.js"></script>
  18. <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script>
  19. <script src="~/Content/js/plugins/layer/laydate/laydate.js"></script>
  20. <script src="~/Content/js/plugins/layer/layer.min.js"></script>
  21. <script src="~/js/Utils.js"></script>
  22. <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
  23. <script src="~/Content/js/js/MarketJs.js"></script>
  24. <style>
  25. a {
  26. color:#3c3c3c;
  27. text-decoration: none;
  28. }
  29. a:hover {
  30. color:#222;
  31. text-decoration: none;
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <section class="hidden">
  37. <input type="hidden" id="hid_PcType" name="hid_PcType" value="@ViewBag.LawRuleType" />
  38. </section>
  39. <section style="height: 95vh; padding: 10px 20px;">
  40. <div class="row tbToolBar" id="tbToolBar">
  41. <div class="toolbar" id="CurdTool">
  42. <a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Read()">阅读信息</a>
  43. </div>
  44. </div>
  45. <table id="dgTable" class="easyui-datagrid" style="height: 100%;"
  46. data-options="singleSelect: true,
  47. method: 'post',
  48. multiSort: false,
  49. toolbar: '#tbToolBar',
  50. fitColumns: true,
  51. @*rownumbers: true,*@
  52. remoteSort: false,
  53. @*loadFilter: pagerFilter,*@
  54. onDblClickRow: function () {
  55. btn_Read();
  56. },
  57. pagination: true,
  58. pageSize: 50,
  59. pageList: [20, 50, 100]
  60. ">
  61. <thead>
  62. <tr>
  63. <th data-options="field:'LawRuleId',width:10">序号</th>
  64. <th data-options="field:'Title',width:80">标题</th>
  65. <th data-options="field:'promulgator',width:50">发布人</th>
  66. <th data-options="field:'promulgateDate',width:50">发布时间</th>
  67. <th data-options="field:'ImageStr',width:30">附件</th>
  68. </tr>
  69. </thead>
  70. </table>
  71. </section>
  72. <section>
  73. <div id="winModal" class="easyui-window winModal" title="信息内容" style="width: 450px;padding:10px;"
  74. data-options="modal:true,closed:true">
  75. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  76. <div data-options="region:'center'" style="padding:15px 25px 0;">
  77. <form class="panle-fluid" id="form">
  78. <h4 id="Title" class="title" style="color:red;text-align:center"></h4>
  79. <span id="Content"></span>
  80. </form>
  81. </div>
  82. <div data-options="region:'south',border:false" style="text-align:right;height:45px; padding:13px 20px 0;">
  83. <a class="easyui-linkbutton" id="Save" href="javascript:void(0)" style="width:80px">下载附件</a>
  84. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">关闭窗口</a>
  85. </div>
  86. </div>
  87. </div>
  88. </section>
  89. <script>
  90. //加载表格数据
  91. function LoadTable() {
  92. $('#dgTable').datagrid({
  93. url: '@Url.Action("LawRuleResult", "GetResult")' + '?PcType=' + $('#hid_PcType').val()
  94. });
  95. }
  96. function btn_Read() {
  97. var rows = $('#dgTable').datagrid('getSelections');
  98. if (rows.length === 1) {
  99. var row = rows[0];
  100. console.log(row);
  101. $("#Title").html(row.LawRuleName);
  102. $("#Content").html(row.content);
  103. $.ajax({
  104. url: "@Url.Action("SetMsgRead", "Main")",
  105. type: "post",
  106. data: {
  107. TableId: "LawRuleInfo",
  108. ColumnId: "LawRuleId",
  109. SourceKey: row.LawRuleId
  110. },
  111. success: function (data) {
  112. console.log(data);
  113. }
  114. });
  115. $("#Save span.l-btn-text").html(row.ImageStr);
  116. $("#winModal").window("open");
  117. } else {
  118. layer.alert('请选择一条记录进行设置', { title: '提示信息' });
  119. }
  120. }
  121. $(function () {
  122. LoadTable();
  123. });
  124. </script>
  125. </body>
  126. </html>