Chpl.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. @model CP.Web.ZstOutHelp
  2. @using CP.Model;
  3. @using CP.Common;
  4. @{
  5. Layout = "~/Views/Shared/_zst.cshtml";
  6. Page.TrendPageType = TrendPageType.renxuan;
  7. Page.Chart = Model.Chart;
  8. Page.Cz = Model.Cz;
  9. Page.InnerLink = Model.InnerLinkList;
  10. Page.ZsList = Model.ZsList;
  11. Page.GjList = Model.GjList;
  12. Page.YlList = Model.YlList;
  13. Page.TbList = Model.TbList;
  14. Page.ZtList = Model.ZtList;
  15. Page.Title = Model.Chart.title;
  16. Page.Description = Model.Chart.description;
  17. Page.Keywords = Model.Chart.keywords;
  18. var chart = Model.Chart;
  19. var cz = Model.Cz;
  20. var tjmenu = Model.InnerLinkList;
  21. var pagesize = Model.PageSize;
  22. var year = Model.Year;
  23. }
  24. <div class="wrap">
  25. <div class="navbar">
  26. <span>当前位置:</span><a href="/">首页</a> - <a href="/zs/">走势图</a> - <a href="">@cz.name</a> - @chart.name
  27. </div>
  28. </div>
  29. <div class="wrap">
  30. <div class="container">
  31. <div class="title">
  32. <div class="search-box" id="trendSearchBox">
  33. <div class="search-link">
  34. @Html.Raw(Model.Pagehtml)
  35. </div>
  36. <div class="mSelectBox" id="mSelectBox">
  37. <span class="mSelect year">按年份</span>
  38. <div class="mSelectList year">
  39. @Html.Raw(Model.Yearhtml)
  40. </div>
  41. </div>
  42. <div class="zs-search">
  43. <input type="text" id="startTerm" name="startTerm" class="input-term" value="@Model.Sqi"
  44. onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" /><span>至</span>
  45. <input type="text" id="endTerm" name="endTerm" class="input-term" value="@Model.Eqi"
  46. onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" /><span>期</span>
  47. </div>
  48. <input type="submit" value="查看" class="btn-search" id="btnSearch" />
  49. <input type="button" value="刷新" class="btn-search" id="btnRefresh" />
  50. </div>
  51. <h1>
  52. @chart.name
  53. </h1>
  54. </div>
  55. <div class="trend" id="trendBox">
  56. <table class="chartTable" id="chartBody">
  57. <thead>
  58. <tr>
  59. <th width="60" rowspan="2" class="sort_up brl"><strong>次数</strong></th>
  60. <th rowspan="2" class="split02"></th>
  61. <th colspan="12">一区</th>
  62. <th rowspan="2" class="split02"></th>
  63. <th colspan="12">二区</th>
  64. <th rowspan="2" class="split02"></th>
  65. <th colspan="11">三区</th>
  66. <th rowspan="2" class="split02"></th>
  67. <th colspan="12" class="brr">后区</th>
  68. </tr>
  69. <tr>
  70. <th width="21">01</th>
  71. <th width="21">02</th>
  72. <th width="21">03</th>
  73. <th width="21">04</th>
  74. <th width="21">05</th>
  75. <th width="21">06</th>
  76. <th width="21">07</th>
  77. <th width="21">08</th>
  78. <th width="21">09</th>
  79. <th width="21">10</th>
  80. <th width="21">11</th>
  81. <th width="21">12</th>
  82. <th width="21">13</th>
  83. <th width="21">14</th>
  84. <th width="21">15</th>
  85. <th width="21">16</th>
  86. <th width="21">17</th>
  87. <th width="21">18</th>
  88. <th width="21">19</th>
  89. <th width="21">20</th>
  90. <th width="21">21</th>
  91. <th width="21">22</th>
  92. <th width="21">23</th>
  93. <th width="21">24</th>
  94. <th width="21">25</th>
  95. <th width="21">26</th>
  96. <th width="21">27</th>
  97. <th width="21">28</th>
  98. <th width="21">29</th>
  99. <th width="21">30</th>
  100. <th width="21">31</th>
  101. <th width="21">32</th>
  102. <th width="21">33</th>
  103. <th width="21">34</th>
  104. <th width="21">35</th>
  105. <th width="21">01</th>
  106. <th width="21">02</th>
  107. <th width="21">03</th>
  108. <th width="21">04</th>
  109. <th width="21">05</th>
  110. <th width="21">06</th>
  111. <th width="21">07</th>
  112. <th width="21">08</th>
  113. <th width="21">09</th>
  114. <th width="21">10</th>
  115. <th width="21">11</th>
  116. <th width="21" class="brr">12</th>
  117. </tr>
  118. </thead>
  119. <tbody id="chartData">
  120. @{
  121. var ylList = (List<TcdltChzsMissInfo>)Model.Oinfo.yl;
  122. if (ylList.Count > 0)
  123. {
  124. var data = ylList[3];
  125. var max = new int[] { data.qq.Max(), data.hq.Max() }.Max();
  126. var step = 0;
  127. if (max < 30)
  128. {
  129. max = 30;
  130. step = 2;
  131. }
  132. else if (max < 60)
  133. {
  134. max = 60;
  135. step = 4;
  136. }
  137. else if (max < 105)
  138. {
  139. max = 105;
  140. step = 7;
  141. }
  142. else if (max < 165)
  143. {
  144. max = 165;
  145. step = 11;
  146. }
  147. else if (max < 1500)
  148. {
  149. max = 1500;
  150. step = 100;
  151. }
  152. //16行
  153. for (var i = 0; i < 16; i++)
  154. {
  155. if (i == 0)
  156. {
  157. <tr>
  158. <td class="brl">@(max - step * i)</td>
  159. <td class="split01"></td>
  160. @{
  161. for (var p = 1; p < 36; p++)
  162. {
  163. var red = data.qq[p];
  164. <td rowspan="16" style="vertical-align: bottom;"><span>@red</span><br /><img width="8" height="@Math.Round((double)red / (max+step) * 16 * 29)" style="vertical-align: bottom;" src="/static/images/line-red.gif" alt=""></td>
  165. if (p == 12 || p == 24 || p == 35)
  166. {
  167. <td rowspan="16" class="split01"></td>
  168. }
  169. }
  170. for (var p = 1; p < 13; p++)
  171. {
  172. var csscls = p == 12 ? "brr" : "";
  173. var blue = data.hq[p];
  174. <td rowspan="16" style="vertical-align: bottom;background:#f6f6f6" class=" @csscls"><span>@blue</span><br /><img width="8" height="@Math.Round((double)blue / (max+step) * 16 * 29)" style="vertical-align: bottom;" src="~/static/images/line-blue.gif" alt=""></td>
  175. }
  176. }
  177. </tr>
  178. }
  179. else
  180. {
  181. <tr>
  182. <td class="pl brl">@(max - step * i)</td>
  183. <td class="split01"></td>
  184. </tr>
  185. }
  186. }
  187. <tr>
  188. <td class="brl">出现次数</td>
  189. <td class="split01"></td>
  190. @{
  191. for (var p = 1; p < 36; p++)
  192. {
  193. var red = data.qq[p];
  194. if (red > 99)
  195. {
  196. <td title="@red" class="bg-yellow"><div class="ft9">@red</div></td>
  197. }
  198. else
  199. {
  200. <td class="bg-yellow">@red</td>
  201. }
  202. if (p == 12 || p == 24 || p == 35)
  203. {
  204. <td class="split01"></td>
  205. }
  206. }
  207. for (var p = 1; p < 13; p++)
  208. {
  209. var csscls = p == 12 ? "brr" : "";
  210. var blue = data.hq[p];
  211. if (blue > 99)
  212. {
  213. <td title="@blue" class="bg-yellow @csscls"><div class="ft9">@blue</div></td>
  214. }
  215. else
  216. {
  217. <td class="bg-yellow @csscls">@blue</td>
  218. }
  219. }
  220. }
  221. </tr>
  222. <tr>
  223. <td class="brl">出现频率(%)</td>
  224. <td class="split01"></td>
  225. @{
  226. for (var p = 1; p < 36; p++)
  227. {
  228. var rate = Math.Round(data.qq[p] / ((double)data.qq.Sum()) * 100, 1);
  229. <td title="@rate" style="background:#dbdbdb;">@rate</td>
  230. if (p == 12 || p == 24 || p == 35)
  231. {
  232. <td class="split01"></td>
  233. }
  234. }
  235. for (var p = 1; p < 13; p++)
  236. {
  237. var csscls = p == 12 ? "brr" : "";
  238. var rate = Math.Round(data.qq[p] / ((double)data.hq.Sum()) * 100, 1);
  239. <td title="@rate" style="background:#dbdbdb;" class="@csscls">@rate</td>
  240. }
  241. }
  242. </tr>
  243. }
  244. }
  245. </tbody>
  246. </table>
  247. </div>
  248. <!--画线及相关 begin-->
  249. <div id="chartLine">
  250. </div>
  251. <!--画线及相关 end-->
  252. </div>
  253. </div>
  254. <!--走势图浮动期号头部 begin-->
  255. <div id='zsScrollBanner' class="scrollBanner">
  256. <div class="scrollTrend">
  257. <table class="chartTable" cellspacing="1" cellpadding="0" border="0">
  258. <thead id="scrollTrendThead">
  259. </thead>
  260. </table>
  261. </div>
  262. </div>
  263. <!--走势图浮动期号头部 end-->