Index.cshtml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. @model PublicInfoIndexModel
  2. @section style{
  3. <link rel="stylesheet" href="@ConfigHelper.GetCDNPrefix()/assets/plugins/page/paging.css">
  4. <link rel="stylesheet" href="@ConfigHelper.GetCDNPrefix()/assets/css/info.css">
  5. }
  6. <div class="banner">
  7. <picture>
  8. <source srcset="@(!string.IsNullOrWhiteSpace(Model.GalleryEntity.MobileImage)?Model.GalleryEntity.MobileImage:Model.GalleryEntity.Image)" media="(max-width: 767px)">
  9. <img src="@Model.GalleryEntity.Image" alt="">
  10. </picture>
  11. </div>
  12. <div class="container info">
  13. <div class="row">
  14. <h2 class="title visible-xs-inline-block open-mask">
  15. 公开信息披露
  16. <i></i>
  17. </h2>
  18. <div class="left">
  19. <h2 class="title close-mask">
  20. <em class="visible-xs-inline-block">
  21. <img src="/assets/image/arrow-color-left.png" alt="">
  22. </em>公开信息披露
  23. </h2>
  24. <div class="ul-box">
  25. <ul>
  26. @foreach (var item in Model.TypeList.Where(x => x.ParentId == 0))
  27. {
  28. var list1 = Model.TypeList.Where(x => x.ParentId == item.Id).ToList();
  29. var count1 = list1.Count;
  30. <li>
  31. <a href="@(count1>0?"javascript:void(0)":"/PublicInfo/Index?TypeId="+item.Id)" class="@(item.Id == Model.TypeId?"active":"")">
  32. @item.Name
  33. @if (count1 > 0)
  34. {
  35. <i></i>
  36. }
  37. </a>
  38. @if (count1 > 0)
  39. {
  40. <ul>
  41. @foreach (var child1 in list1)
  42. {
  43. var list2 = Model.TypeList.Where(x => x.ParentId == child1.Id).ToList();
  44. var count2 = list2.Count;
  45. <li>
  46. <a href="@(count2>0?"javascript:void(0)":"/PublicInfo/Index?TypeId="+child1.Id)" class="@(child1.Id == Model.TypeId?"active":"")">
  47. @child1.Name@if (count2 > 0)
  48. {<i></i>}
  49. </a>
  50. @if (count2 > 0)
  51. {
  52. <ul>
  53. @foreach (var child2 in list2)
  54. {
  55. var list3 = Model.TypeList.Where(x => x.ParentId == child2.Id).ToList();
  56. var count3 = list3.Count;
  57. <li>
  58. <a href="@(count3>0?"javascript:void(0)":"/PublicInfo/Index?TypeId="+child2.Id)" class="@(child2.Id == Model.TypeId?"active":"")">
  59. @child2.Name
  60. @if (count3 > 0)
  61. {
  62. <i></i>
  63. }
  64. </a>
  65. @if (count3 > 0)
  66. {
  67. <ul>
  68. @foreach (var child3 in list3)
  69. {
  70. var list4 = Model.TypeList.Where(x => x.ParentId == child3.Id).ToList();
  71. var count4 = list4.Count;
  72. <li>
  73. <a href="@(count4>0?"javascript:void(0)":"/PublicInfo/Index?TypeId="+child3.Id)" class="@(child3.Id == Model.TypeId?"active":"")">
  74. @child3.Name
  75. @if (count4 > 0)
  76. {
  77. <i></i>
  78. }
  79. </a>
  80. </li>
  81. }
  82. </ul>
  83. }
  84. </li>
  85. }
  86. </ul>
  87. }
  88. </li>
  89. }
  90. </ul>
  91. }
  92. </li>
  93. }
  94. </ul>
  95. </div>
  96. </div>
  97. <div class="right">
  98. <h2>@Model.TypeName</h2>
  99. @if (!Model.Id.HasValue)
  100. {
  101. @if (Model.ArticleList.Count > 0)
  102. {
  103. <ul>
  104. @foreach (var item in Model.ArticleList)
  105. {
  106. <li>
  107. <a href="@(!string.IsNullOrWhiteSpace(item.Detail)||string.IsNullOrWhiteSpace(item.FileUrl) ? Url.Action("Index","PublicInfo",new { id=item.Id}) : item.FileUrl)" @(!string.IsNullOrWhiteSpace(item.Detail) || string.IsNullOrWhiteSpace(item.FileUrl) ? "" : "target='_blank'")><span>@item.Title</span><em>@item.PublishTime.ToString("yyyy-MM-dd")</em></a>
  108. </li>
  109. }
  110. </ul>
  111. <div class="pageDiv"></div>
  112. }
  113. else
  114. {
  115. @if (Model.TypeName.Contains("人身保险新型产品"))
  116. {
  117. <p style="padding:40px 0;">暂无相关产品</p>
  118. }
  119. else
  120. {
  121. <p style="padding:40px 0;"> 暂无相关内容 </p>
  122. }
  123. }
  124. }
  125. else
  126. {
  127. <div class="info-detail">
  128. <h4>@Model.PublicInfoEntity.Title</h4>
  129. <div class="con">
  130. @Html.Raw(Model.PublicInfoEntity.Detail)
  131. @if (!string.IsNullOrWhiteSpace(Model.PublicInfoEntity.FileUrl))
  132. {
  133. <a href="@Model.PublicInfoEntity.FileUrl" target="_blank">@Model.PublicInfoEntity.FileName</a>
  134. }
  135. </div>
  136. </div>
  137. }
  138. </div>
  139. </div>
  140. </div>
  141. @section script{
  142. <script src="/assets/plugins/page/jquery.page.js"></script>
  143. <script>
  144. window.dataMark = "0$15231983314041342$$15231984064511103$";
  145. $(function () {
  146. $(".open-mask").click(function () {
  147. $(".left").addClass("showIn")
  148. })
  149. $(".close-mask").click(function () {
  150. $(".left").removeClass("showIn")
  151. })
  152. //左侧折叠
  153. $(".ul-box a").has("i").on("click", function () {
  154. if ($(this).hasClass("cur")) {
  155. $(this).removeClass("cur").siblings("ul").slideUp().find("a").removeClass("cur").siblings(
  156. "ul").slideUp();
  157. } else {
  158. $(this).addClass("cur").siblings("ul").slideDown();
  159. $(this).closest("li").siblings("li").find("a").removeClass("cur").siblings("ul").slideUp();
  160. }
  161. });
  162. $("a.active").parents("ul").show().siblings("a").addClass("active cur");
  163. //分页
  164. var pageSize =1;
  165. var rowsCount = @(Model.RowsCount);
  166. var pageIndex = @(Model.PageIndex);
  167. $(".pageDiv").createPage({
  168. pageCount: Math.ceil(rowsCount / pageSize), //总页数
  169. current: pageIndex, //当前页
  170. turndown: 'false',
  171. backFn: function (p) {
  172. pageIndex = p;
  173. location.href = "@Url.Action("Index", "PriceAnnouncement", new {TypeId= Model.TypeId})&pageIndex=" + pageIndex + "&pageSize=" + pageSize;
  174. }
  175. });
  176. })
  177. </script>
  178. }