mcHaifmIndex.htm 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>慧牧科技</title>
  5. <style type="text/css">
  6. .mcSelect {
  7. background: url('views/haifm/images/bj.png') repeat-x;
  8. height: 35px;
  9. text-align: center;
  10. margin-top: 5px;
  11. }
  12. #chooseQkSet .modal-dialog {
  13. width: 300px;
  14. margin: 36% auto 0 auto;
  15. }
  16. #chooseQkSet .modal-dialog div.option {
  17. height: 40px;
  18. line-height: 40px;
  19. text-align: center;
  20. }
  21. #chooseQkSet .modal-dialog div.option:first-child {
  22. border-bottom: 1px solid #F0F0F0;
  23. }
  24. #addWrapper .emerge{
  25. -webkit-animation-name: emerge;
  26. animation-name: emerge;
  27. -webkit-animation-duration: .2s;
  28. animation-duration: .2s;
  29. -webkit-animation-fill-mode: forwards;
  30. animation-fill-mode: forwards;
  31. }
  32. #addWrapper .addButton{
  33. position: relative;
  34. box-shadow: 0 5px 11px rgba(98,98,102,0.25);
  35. font-size: 0.4rem;
  36. width: 0.9rem;
  37. height: 0.9rem;
  38. line-height: 0.9rem;
  39. margin: 0 auto;
  40. text-align: center;
  41. color: white;
  42. border-radius: 100%;
  43. }
  44. #addWrapper {
  45. width:0.9rem;
  46. border-radius: 100%;
  47. height: 0.9rem;
  48. text-align:center;
  49. margin:0 auto;
  50. background-color: #4E768F;
  51. }
  52. </style>
  53. <script type="text/javascript">
  54. $(function () {
  55. $("#type").val("1");
  56. loadZsList();
  57. loadQkSz();
  58. $("#selectMc").bind("change", function () {
  59. loadZsList();
  60. loadQkSz();
  61. $("#type").val("1");
  62. });
  63. $('#QkSetOptions').on('click', '.option', function () {
  64. var mcid = $("#mcid").val();
  65. $('.modal-backdrop').remove();
  66. $('body').removeClass('modal-open');
  67. haifm.loadMobilePage("haifm", "haifmQk" + $(this).data('skip') + ".htm?mcid=" + mcid);
  68. $("#type").val("2");
  69. $("#addWrapper").addClass("hidden");
  70. });
  71. $("#addWrapper").on("click", function() {
  72. var mcid = $("#mcid").val();
  73. $("footer.row").hide();
  74. haifm.loadMobilePage("zslb", "haifmDaViewMcda.htm?mcid=" + mcid);
  75. $("#addWrapper").addClass("hidden");
  76. $("#type").val("2");
  77. });
  78. $("#addWrapper").removeClass("hidden");
  79. });
  80. function loadQkSz() {
  81. if ($("#mcid").val() == "21") {
  82. $("#qkPlane").attr("class", "glyphicon glyphicon-wrench")
  83. .attr('data-target', '#chooseQkSet')
  84. .attr('data-toggle', 'modal')
  85. .data('target','#chooseQkSet');
  86. } else {
  87. $("#qkPlane").attr("class", "placeholder btn-group")
  88. .attr('data-target', '')
  89. .attr('data-toggle', '')
  90. .data('target','');
  91. }
  92. }
  93. /**
  94. * 加载猪舍列表
  95. */
  96. function loadZsList() {
  97. haifm.loadMobilePage("zslb", "mcZsList.htm?mcid=" + $("#mcid").val());
  98. }
  99. /**
  100. * 加载猪舍页面
  101. */
  102. function loadZsView(zsid, zsbz, dqlq) {
  103. if (dqlq == "") {
  104. alert("当前猪舍下无活动的栏期!请先新建栏期!");
  105. return false;
  106. }
  107. haifm.loadMobilePage("haifm", "mcZsView.htm?zsid=" + zsid + "&from=zslist" +"&zsbz="+zsbz);
  108. /* if (zsbz == "1") {
  109. haifm.loadMobilePage("haifm", "mcZsView.htm?zsid=" + zsid + "&from=zslist");
  110. }
  111. if (zsbz == "2") {
  112. haifm.loadMobilePage("haifm", "mcZsHjkzView.htm?zsid=" + zsid + "&from=zslist");
  113. } */
  114. }
  115. /**
  116. * 返回
  117. */
  118. function backUrl() {
  119. var type = $("#type").val();
  120. if (type == "2") {
  121. haifm.loadMobilePage("zslb", "mcZsList.htm?mcid=" + $("#mcid").val());
  122. $("#type").val("1");
  123. $("#addWrapper").removeClass("hidden");
  124. } else {
  125. haifm.loadMobilePage("haifm", "haifmMain.htm?mcid=" + $("#mcid").val());
  126. }
  127. }
  128. </script>
  129. </head>
  130. <body>
  131. <input type="hidden" value="1" id="type" />
  132. <div style="flex: 1;height: 100%;display: flex;display: -webkit-flex;flex-direction: column;position: relative;">
  133. <div id="zslb" style="flex: 1;display: flex;flex-direction: column;height: 100%;"></div>
  134. #if ("$!gh" != "h000")
  135. <div id="addWrapper" class="navbar-fixed-bottom nav-justified hidden" style="position: absolute;bottom: 0.2rem;" onclick="">
  136. <div class="addButton emerge"><span class="glyphicon glyphicon-folder-open"></span></div>
  137. </div>
  138. #end
  139. </div>
  140. <!-- 选择环境控制入口 -->
  141. <div class="modal" id="chooseQkSet">
  142. <div class="modal-dialog">
  143. <div class="modal-content" id="QkSetOptions">
  144. <div class="option" data-dismiss="modal" data-skip="ph">PH</div>
  145. <div class="option" data-dismiss="modal" data-skip="sy">水压</div>
  146. <div class="option" data-dismiss="modal" data-skip="sz">全控设置</div>
  147. </div>
  148. </div>
  149. </div>
  150. </body>
  151. </html>