WaitRport.cshtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @using WeApp.TrainingCampGroup.Dto
  2. @{
  3. Layout = "~/Views/Shared/Layout/_Layout.Stu.cshtml";
  4. CampGroupDto group = ViewBag.Group;
  5. bool isLeader = ViewBag.IsLeader;
  6. string id = group.Id,
  7. campNo = group.CampNo,
  8. text = ViewBag.Text;
  9. var name = (isLeader ? "指挥长" : "组员");
  10. ViewBag.Title = name + "屏(" + group.Name + ")";
  11. }
  12. @section styles{
  13. <link href="~/Content/Css/Exercise/stu-bg.min.css" rel="stylesheet" />
  14. <style>
  15. .group-name {
  16. color: #fff;
  17. position: absolute;
  18. left: 10px;
  19. bottom: 5px;
  20. font-size: 12px;
  21. }
  22. .text-box {
  23. margin-top: -5%;
  24. }
  25. .text-box .name {
  26. margin-top: 25px;
  27. font-size: 24px;
  28. font-weight: 600;
  29. color: #fff;
  30. background: #11998e;
  31. padding: 5px 50px;
  32. letter-spacing: 10px;
  33. padding-right: 40px;
  34. border-radius: 50px;
  35. }
  36. .text-box .wait-text {
  37. font-size: 50px;
  38. letter-spacing: 5px;
  39. margin-top: 20px;
  40. padding-right: 5px;
  41. }
  42. /*.logo {
  43. width: 250px;
  44. height: 240px;
  45. background-size: 100% 100%;
  46. }
  47. .logo1 {
  48. background-image: url('../../Content/Image/Stu/zhb/zhz.png');
  49. }
  50. .logo2 {
  51. background-image: url('../../Content/Image/Stu/zhb/zuyuan2.png');
  52. }*/
  53. </style>
  54. }
  55. <div class="body no-select">
  56. <div class="left">
  57. <img src="~/Content/Image/Stu/gwLogo.png" />
  58. </div>
  59. <div class="right">
  60. <img src="~/Content/Image/Stu/loudou.png" />
  61. <div class="text-box">
  62. @*<div class="logo logo@(style)"></div>*@
  63. <span class="name"> @(group.Name)</span>
  64. <span class="wait-text">@(text)</span>
  65. </div>
  66. </div>
  67. <div class="group-name">@(group.Name)-@(name)</div>
  68. </div>
  69. @section scripts
  70. {
  71. <script>
  72. abp.signalr.connect(['@(id)','@(campNo)']);
  73. </script>
  74. <script id="hub">
  75. abp.signalr.connect(['@(id)','@(campNo)']);
  76. iwbHub.client.getReloadAll = function (msg) {
  77. console.log('getReloadAll: ', msg);
  78. if (msg) {
  79. try {
  80. var data = JSON.parse(msg);
  81. if (data) {
  82. if (data.no == '@(id)'|| data.no == '@(campNo)') {
  83. window.location.reload();
  84. }
  85. }
  86. } catch (e) {
  87. console.log('getReloadAll: ', e);
  88. }
  89. }
  90. };
  91. @if (isLeader)
  92. {
  93. <text>
  94. iwbHub.client.getReloadLeader = function (msg) {
  95. console.log('getReloadLeader: ', msg);
  96. if (msg) {
  97. try {
  98. var data = JSON.parse(msg);
  99. if (data) {
  100. if (data.no == '@(id)'|| data.no == '@(campNo)') {
  101. window.location.reload();
  102. }
  103. }
  104. } catch (e) {
  105. console.log('getReloadLeader: ', e);
  106. }
  107. }
  108. };
  109. </text>
  110. }
  111. else
  112. {
  113. <text>
  114. iwbHub.client.getReloadStu = function (msg) {
  115. console.log('getReloadStu: ', msg);
  116. if (msg) {
  117. try {
  118. var data = JSON.parse(msg);
  119. if (data) {
  120. if (data.no == '@(id)'|| data.no == '@(campNo)') {
  121. window.location.reload();
  122. }
  123. }
  124. } catch (e) {
  125. console.log('getReloadStu: ', e);
  126. }
  127. }
  128. };
  129. </text>
  130. }
  131. </script>
  132. }