Index.cshtml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @model Hospital.ViewModels.OverviewViewModel
  2. @{
  3. ViewBag.Title = "欢迎使用";
  4. var userQuanxian = ViewBag.UserPermissionsIDSet as HashSet<int>;
  5. var isJiben = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 1);
  6. var isJuese = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 2);
  7. var isUsers = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 3);
  8. var isFenpeiJuese = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 4);
  9. var isGG = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 5);
  10. var isDataManager = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 6);
  11. var isDeptDataManager = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 7);
  12. var isDataFlow = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 8);
  13. var isDataShenheEdit = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 9);
  14. var isTianbao = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 10);
  15. var isGetLeakManager = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 19);
  16. var isSearchManager = Hospital.Core.Utility.IsExitDataInList(userQuanxian, 20);
  17. var unitOfWork = new Hospital.Repositories.UnitOfWork();
  18. var userProfile = unitOfWork.UserRepository.GetUserProfile(HttpContext.Current.User.Identity.Name);
  19. var IsSystem = false;
  20. var IsSystem2 = false;
  21. var displayLine = false;
  22. if (isDataManager || isDeptDataManager || ViewBag.IsSuper)
  23. {
  24. displayLine = true;
  25. }
  26. if (isJiben || isJuese || isUsers || isFenpeiJuese || isGG)
  27. {
  28. IsSystem = true;
  29. }
  30. if (isJiben && isJuese && isUsers && isFenpeiJuese && isGG)
  31. {
  32. IsSystem2 = true;
  33. }
  34. }
  35. <div class="md-card box-shadow-none">
  36. <div class="user_heading">
  37. <div class="user_heading_avatar">
  38. <div class="thumbnail border-none">
  39. <img src="~/assets/img/logo.jpg" alt="user avatar">
  40. </div>
  41. </div>
  42. <div class="user_heading_content">
  43. <h2 class="heading_b uk-margin-bottom">
  44. <span class="uk-text-truncate">@ViewBag.UserRealName (@ViewBag.UserName) </span>
  45. <span class="sub-heading">@ViewBag.UserDeptName</span>
  46. </h2>
  47. </div>
  48. </div>
  49. <div class="md-card-content padding-top-10 padding-bottom-10">
  50. <ul class="md-list">
  51. <li class="padding-top-15">
  52. <a class="weui-cell_access" href="@Url.Action("Index", "InterAnnounce", new{ area="WxApp" ,returnUrl = Request.RawUrl})">
  53. <div class="md-list-content">
  54. <span class="md-list-heading text-color-initial"><i class="fa fa-x fa-bullhorn"></i>&emsp;内部公告 </span>
  55. @{
  56. var count = Hospital.Controllers.InterAnnounceController.GetInterAnnounceNotRead(userProfile.PID);
  57. }
  58. @if (count != "0")
  59. {
  60. <span class="float-right uk-badge uk-badge-primary md-color-white">
  61. @count
  62. </span>
  63. }
  64. </div>
  65. </a>
  66. </li>
  67. @if (isTianbao && !string.IsNullOrEmpty(userProfile.CID))
  68. {
  69. <li class="padding-top-15">
  70. <a class="weui-cell_access" href="@Url.Action("List", "Report", new { area="WxApp", @show = "Own" ,returnUrl = Request.RawUrl})">
  71. <div class="md-list-content">
  72. <span class="md-list-heading text-color-initial"><i class="fa fa-list-alt"></i>&emsp;查阅已填报数据 </span>
  73. </div>
  74. </a>
  75. </li>
  76. }
  77. @if (isDataManager || isDeptDataManager || ViewBag.IsSuper)
  78. {
  79. <li class="padding-top-15">
  80. <a class="weui-cell_access" href="@Url.Action("List", "Report", new { area="WxApp",returnUrl = Request.RawUrl})">
  81. <div class="md-list-content">
  82. <span class="md-list-heading text-color-initial"><i class="fa fa-list-alt"></i>&emsp;管理数据 </span>
  83. </div>
  84. </a>
  85. </li>
  86. }
  87. </ul>
  88. </div>
  89. </div>
  90. <script>
  91. //将头部去掉,因为在这个页面无法返回
  92. document.getElementById("header_main").style.display = "none";
  93. </script>