Index.cshtml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Common;
  4. @{
  5. Layout = "~/Views/Shared/_FrameLayout.cshtml";
  6. List<string> lurl = new List<string>();
  7. lurl.Add("Content/");
  8. lurl.Add("Doc/");
  9. lurl.Add("Scripts/");
  10. lurl.Add("Login/");
  11. lurl.Add("UploadFile/");
  12. lurl.Add("Account/ChangePassword");
  13. FormsAuthenticationHelper fahelper = new FormsAuthenticationHelper();
  14. var cookieName = EMIS.Utility.Const.LOCAL_SETTING_LOGIN_COOKIENAME;
  15. fahelper.AuthenticateRequest(HttpContext.Current, cookieName, lurl);
  16. }
  17. @section scripts{
  18. <script type="text/javascript">
  19. $(document).ready(function () {
  20. var IsStudent = "@ViewBag.IsStudent";
  21. // debugger;
  22. if (IsStudent == "True") {
  23. $("a#UserInfo").hide();
  24. }
  25. else if (IsStudent == "False") {
  26. $("a#UserInfo").show();
  27. }
  28. });
  29. $(function () {
  30. $.parser.onComplete = function () {
  31. $("#ddlIndexRoleSelector").combobox({
  32. onShowPanel: resizePanel
  33. });
  34. };
  35. $(".easyui-tree").tree('collapseAll');
  36. $.System.addTab('首页', '@Url.Content("~/Home/Main")', 'Main', false);
  37. });
  38. function switchRole() {
  39. $("[name='hdnSelectedRole']").val($("#ddlIndexRoleSelector").combobox('getValue'));
  40. $("#frmRole").submit();
  41. }
  42. function resizePanel() {
  43. $($(".combo-p")[0]).css("width", "138px");
  44. $($(".combo-p")[0]).find(".combo-panel").css("width", "138px");
  45. }
  46. function changePassword() {
  47. $.System.addTab('修改密码', '@Url.Content("~/Account/ChangePassword")', 'ChangePassword', false);
  48. }
  49. function changeInfo() {
  50. $.System.addTab('用户信息', '@Url.Content("~/User/UserInfoChange")', 'ChangeInfo', false);
  51. }
  52. // function refreshTab(title, index) {
  53. // var tab = $('#index_center_tabs').tabs('getTab', index);
  54. // var $iframe = tab.panel('body').find("iframe");
  55. // var isFirstLoad = false;
  56. // if ($iframe[0].contentWindow.location.href != "about:blank") {
  57. // $.each(IndexTabStatus, function (i, v) {
  58. // if (v.index == index && v.firstLoad) {
  59. // isFirstLoad = true;
  60. // v.firstLoad = false;
  61. // return false;
  62. // }
  63. // });
  64. // if (!isFirstLoad) {
  65. // $iframe[0].contentWindow.location.reload();
  66. // }
  67. // }
  68. // }
  69. </script>
  70. }
  71. <div data-options="region:'north',title:'',split:false, border:false" class="index_top_banner">
  72. <div class="index_top_bg">
  73. <div id="index_top" class="index_top_left">
  74. <img src="@Url.Content("~/common/resimage?key=HomeLogo")" />
  75. </div>
  76. @*<div id="IsStudent" style="display: none">
  77. ((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).IsStudent
  78. </div>*@
  79. <div id="divCurrentInformation">
  80. <form id="frmRole" action="@Url.Content("~/Home/SwitchRole")" method="post">
  81. @Html.Hidden("hdnSelectedRole")
  82. </form>
  83. 当前用户:@(((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).LoginID + "-" + ((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).Name + (((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).IsStudent ? "同学" : "老师"))&nbsp;&nbsp;@Html.SystemClock(new SystemClockOptions { IsJump = true })
  84. @*Html.ActionLink("退出系统", "LogOff", "Account")*@
  85. </div>
  86. <div style="float: right; padding-right: 30px; padding-top: 40px;">
  87. @*<a id="UserInfo" href="javascript:changeInfo()" style="z-index: 99999;">
  88. <img border="0" title="用户信息" src="@Url.Content("~/Content/Bowin.Control.Core/images/h_user.png")" /></a>*@
  89. &nbsp;&nbsp;&nbsp;
  90. <a href="javascript:changePassword()" style="z-index: 99999;">
  91. <img border="0" title="修改密码" src="@Url.Content("~/Content/Bowin.Control.Core/images/h_lock.jpg")" /></a>
  92. &nbsp;&nbsp; <a href="@Url.Content("~/Account/LogOff")" style="z-index: 99999;">
  93. <img border="0" title="退出" src="@Url.Content("~/Content/Bowin.Control.Core/images/h_logout.jpg")" /></a>
  94. </div>
  95. </div>
  96. </div>
  97. <div id="index_left" class="index_left_bg" data-options="region:'west',title:'@Html.DropdownList(new DropdownListOptions
  98. {
  99. ID = "ddlIndexRoleSelector",
  100. ItemSourceUrl = Url.Content("~/User/GetUserRoleDropdownList"),
  101. BindType = DropdownListBindType.None,
  102. SelectedValue = EMIS.Utility.FormValidate.CustomPrincipal.Current.RoleID,
  103. OnSelect = "switchRole",
  104. Width = 112
  105. }).ToHtmlString()',split:false,tools:'#tab-tools'"style="width: 140px;">
  106. @Html.MenuTree(new AccordionTreeOptions()
  107. {
  108. OnClick = "$.System.addTab('{MnuName}','{MnuProgram}','{MnuId}')",
  109. DataOptions = "fit: true",
  110. })
  111. @*<div id="tab-tools" class="index_left_tree_bg">
  112. <a href="javascript:void();" class="easyui-linkbutton" plain="true" iconCls="icon-home" style="width:60px; margin-top:-5px;" onclick="javascript:$.System.addTab('首页','@Url.Content("~/Home/Main")','Main', false)">首页</a>
  113. </div>*@
  114. </div>
  115. <div region="center" border="true" title="" class="index_center_bg">
  116. <div id="index_center" class="easyui-panel" data-options="border:false,fit:true">
  117. <div id="index_center_tabs" class="easyui-tabs" data-options="border:false,fit:true">
  118. </div>
  119. </div>
  120. <div id="index_main" class="easyui-layout" data-options="border:false,fit:true">
  121. <div data-options="region:'center',border:false">
  122. </div>
  123. </div>
  124. </div>
  125. <div id="index_bottom" class="index_bottom_bg" region="south" border="true" title="">
  126. <div style="float: left; width: 40%; text-align: center; white-space: nowrap;">
  127. 教育部中央教育科学研究所高等教育研究中心监制</div>
  128. <div style="float: right; width: 40%; text-align:right; white-space: nowrap;">
  129. <a href="http://www.bowintek.com" target="_blank">Copyright2021<img src="~/Images/copyright.png" style="height:10px"/> 广州市博颖信息科技有限公司 All Rights Reserved
  130. </a></div>
  131. </div>
  132. <div id="sysWindow">
  133. </div>