_Layout.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. @using System.Security.Policy
  2. @using System.Web.Optimization
  3. @using Abp.Configuration
  4. @using Abp.Runtime.Session
  5. @using Abp.Timing
  6. @using ShwasherSys.Models.Modal
  7. @using IwbZero.Setting
  8. @{
  9. SetAntiForgeryCookie();
  10. var foot = SettingManager.GetSettingValue(SettingNames.HtmlPagesFooter);
  11. var version = SettingManager.GetSettingValue(SettingNames.AdminSystemVersion);
  12. string currentUser = AbpSession.UserName;
  13. //AlertList alerts;
  14. //IocManager.Instance.Using<IAlertManager>(alertManager => alerts = alertManager.Alerts);
  15. }
  16. <!DOCTYPE html>
  17. <html lang="en">
  18. <head>
  19. <meta charset="utf-8">
  20. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  21. <meta name="viewport" content="width=device-width, initial-scale=1">
  22. <meta name="description" content="">
  23. <meta name="author" content="">
  24. <link rel="shortcut icon" href="~/favicon.ico">
  25. <title>@ViewBag.Title-IWB</title>
  26. @Styles.Render("~/Content/css")
  27. @Scripts.Render("~/bundles/modernizr")
  28. @RenderSection("CSS", false)
  29. <link href="~/Content/Plugins/Notice/css/animate.css" rel="stylesheet" />
  30. <link href="~/Content/Plugins/Notice/dist/noticejs.css" rel="stylesheet" />
  31. <!-- View specific styles -->
  32. @RenderSection("styles", false)
  33. <script type="text/javascript">
  34. //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
  35. var abp = abp || {}; abp.appPath = '@ApplicationPath';
  36. </script>
  37. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  38. <!--[if lt IE 9]>
  39. <script src="@Url.Content("~/Scripts/Others/html5shiv.js")"></script>
  40. <script src="@Url.Content("~/Scripts/Others/respond.min.js")"></script>
  41. <![endif]-->
  42. <script type="text/javascript">
  43. //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
  44. var queryParams = {};
  45. var abp = abp || {}; abp.appPath = '@ApplicationPath', abp.localization = abp.localization || {};
  46. var appUrl = "/api/services/app/";
  47. abp.appUrl = appUrl;
  48. @*var opSuccess = "@L("OpSuccess")",
  49. opFailed = "@L("OpFailed")",
  50. opCreate = "@L("Create")",
  51. opUpdate = "@L("Update")",
  52. opDelete = "@L("Delete")",
  53. btnConfirm = "@L("Confirm")",
  54. btnCancel = "@L("Cancel")";*@
  55. var opSuccess = "操作成功",
  56. opFailed = "操作失败",
  57. opCreate = "添加",
  58. opUpdate = "修改",
  59. opDelete = "删除",
  60. btnConfirm = "确认",
  61. btnCancel = "取消",
  62. lang="zh-CN";
  63. </script>
  64. </head>
  65. <body class="skin-black sidebar-mini">
  66. <div class="wrapper">
  67. <!-- Header Navbar-->
  68. @Html.Action("MainHeader", "Layout")
  69. <!-- Left side column. contains the logo and sidebar -->
  70. @Html.Action("SideBarNav", "Layout", new { activeMenuName = ViewBag.ActiveMenu })
  71. <!-- Content Wrapper. Contains page content -->
  72. <div class="content-wrapper">
  73. @RenderBody()
  74. </div>
  75. <!-- Footer -->
  76. <footer class="main-footer">
  77. <div class="pull-right hidden-xs">
  78. <b>Version</b> @version
  79. </div>
  80. @*<strong>Copyright &copy; 2016-2019 <a href="#">IWB Net</a>.</strong> All rights
  81. reserved.*@
  82. @Html.Raw(foot)
  83. </footer>
  84. </div>
  85. @RenderSection("Modal", false)
  86. <!--Pwd Modal -->
  87. <section>
  88. <div class="modal fade" id="modal_Pwd" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  89. <div class="modal-dialog modal-dialog-centered" role="document">
  90. <div class="modal-content">
  91. @Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("AccountChangePassword")))
  92. @{
  93. var inputs = new List<InputViewModel>
  94. {
  95. new InputViewModel("LoginName",displayName: "用户名"),
  96. new InputViewModel("LoginPassword",InputTypes.Password,"原密码"),
  97. new InputViewModel("NewPassword",InputTypes.Password, "新密码"),
  98. new InputViewModel("NewPassword1",InputTypes.Password,"确认密码",other:"equalTo=#NewPassword")
  99. };
  100. }
  101. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs, "form_Pwd"))
  102. <div class="modal-footer" style="text-align: center;">
  103. <button type="button" class="btn btn-default waves-effect" data-dismiss="modal" style="min-width: 100px; background: #FFFFFF; border: 1px solid #DDDDDD;">取消</button>
  104. <button type="button" id="Save_Pwd" class="btn btn-success waves-effect" style="min-width: 100px; background-color: #678ceb; border: 1px solid #678ceb;">保存</button>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="modal fade" id="modal_tongzhi" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  110. <div class="modal-dialog modal-dialog-centered" role="document">
  111. <div class="modal-content">
  112. @*@Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("NoticeShow")))*@
  113. <div class="box box-primary">
  114. <div class="box-header with-border">
  115. <h3 class="box-title">@L("NoticeShow")</h3>
  116. </div>
  117. <!-- /.box-header -->
  118. <div class="box-body no-padding">
  119. <div class="mailbox-read-info">
  120. <h3 id="bulletinTitle">Message Subject Is Placed Here</h3>
  121. <h5>
  122. 发布人: <span id="publicPerson"></span>
  123. <span class="mailbox-read-time pull-right" id="promulgatDate">15 Feb. 2016 11:03 PM</span>
  124. </h5>
  125. </div>
  126. <div class="mailbox-read-message" id="bulletinContent">
  127. </div>
  128. <!-- /.mailbox-read-message -->
  129. </div>
  130. </div>
  131. <div class="modal-footer" style="text-align: center;">
  132. <button type="button" class="btn btn-default waves-effect" data-dismiss="modal" style="min-width: 100px; background: #FFFFFF; border: 1px solid #DDDDDD;">取消</button>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <div class="modal fade" id="modal_alarm" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  138. <div class="modal-dialog modal-dialog-centered" role="document">
  139. <div class="modal-content">
  140. @*@Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("NoticeShow")))*@
  141. <div class="box box-primary">
  142. <div class="box-header with-border">
  143. <h3 class="box-title">短消息</h3>
  144. </div>
  145. <!-- /.box-header -->
  146. <div class="box-body no-padding">
  147. <div class="mailbox-read-info">
  148. <h3 id="msgTitle">Message Subject Is Placed Here</h3>
  149. <h5>
  150. 发布人: <span id="sendPerson"></span>
  151. <span class="mailbox-read-time pull-right" id="sendDatetime">15 Feb. 2016 11:03 PM</span>
  152. </h5>
  153. </div>
  154. <div class="mailbox-read-message" id="msgContent">
  155. </div>
  156. <!-- /.mailbox-read-message -->
  157. </div>
  158. </div>
  159. <div class="modal-footer" style="text-align: center;">
  160. <button type="button" class="btn btn-default waves-effect" data-dismiss="modal" style="min-width: 100px; background: #FFFFFF; border: 1px solid #DDDDDD;">取消</button>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </section>
  166. @Scripts.Render("~/bundles/jquery")
  167. <!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
  168. <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
  169. <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)"></script>
  170. <script>
  171. abp.localization.defaultSourceName = '@LocalizationSourceName';
  172. </script>
  173. @Scripts.Render("~/bundles/abp")
  174. <script src="~/Scripts/jquery.signalR-2.4.0.min.js"></script>
  175. <script src="~/signalr/hubs"></script>
  176. <script src="~/Content/Scripts/Abp/libs/abp.signalr.js"></script>
  177. <script src="~/Content/Plugins/Notice/dist/notice.js"></script>
  178. <script>var iwbHub = $.connection.iwbHub;</script>
  179. <!-- View specific scripts -->
  180. @RenderSection("SCRIPTS", false)
  181. <script>
  182. iwbHub.client.getShortMsg = function (msg) {
  183. if (msg) {
  184. try {
  185. var data = JSON.parse(msg);
  186. var users = data.RecieveUserIds;
  187. if (users) {
  188. var arr = users.split(",");
  189. if(arr.indexOf("@currentUser")>-1) {
  190. new NoticeJs({
  191. text: data.Title,
  192. position: 'bottomRight',
  193. animation: {
  194. open: 'animated bounceIn',
  195. close: 'animated bounceOut'
  196. }
  197. }).show();
  198. QueryShortMsg();
  199. }
  200. }
  201. } catch (e) {
  202. console.log(e);
  203. }
  204. }
  205. };
  206. function QueryShortMsg() {
  207. SaveAjax({
  208. url: window.appUrl+"ShortMsgDetail/GetMsgByUser",
  209. isValidate: false,
  210. isAlert: false,
  211. success: function(res) {
  212. if (res && res.total > 0) {
  213. $("#alarmCount").html(res.total);
  214. var content = '<li>';
  215. content += '<ul class="menu">';
  216. res.items.forEach(function(r) {
  217. content += ' <li onclick="ShowMsg(' + r.msgID + ',' + r.id + ')">';
  218. content += ' <a href="#">';
  219. content += ' <i class="iconfont icon-icon-notice" ></i>' + r.title;
  220. content += ' </a>';
  221. content += ' </li>';
  222. });
  223. content += ' </ul>';
  224. content += ' </li>';
  225. if (res.total > 5) {
  226. content += ' <li class="footer"><a href="/NotificationInfo/ShortMsgMg">查看全部</a></li>';
  227. }
  228. $("#alarmInfo").html(content);
  229. } else {
  230. $("#alarmCount").html("0");
  231. }
  232. }
  233. });
  234. }
  235. </script>
  236. </body>
  237. </html>