infoHomep.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. function init(img) {
  2. var e = parseFloat("${edgzl}");
  3. (e = isNaN("${edgzl}") ? 0 : e), (e = e > 0 ? e : 100);
  4. var g = parseFloat("${grgzl}");
  5. g = isNaN("${grgzl}") ? 0 : g;
  6. var p = g / e;
  7. function showTime() {
  8. var t = new Date(),
  9. e = t.getFullYear(),
  10. i = t.getMonth() + 1,
  11. n = t.getDate(),
  12. o = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes();
  13. $(".nowDateGrxx").text(
  14. e + "\u5e74" + i + "\u6708" + n + "\u65e5 " + t.getHours() + ":" + o
  15. );
  16. }
  17. $(".gzl1").css("width", 100 * (p > 1 ? 1 : p) + "%"),
  18. $(".gzlpe").html((100 * p).toFixed(2)),
  19. setInterval(showTime, 1e3);
  20. var timer = null;
  21. function tips(t, e) {
  22. if (null != $("#" + e).html()) {
  23. var i = $(t)[0].getBoundingClientRect(),
  24. n = this.recursionIframe(),
  25. o = i.left + n.left,
  26. r = i.top + i.height + n.top,
  27. s =
  28. "<div class='whkDivHover' style = 'width:" +
  29. $(t).width() +
  30. "px; height: 102px; position: absolute; left: " +
  31. o +
  32. "px; top:" +
  33. r +
  34. "px; z-index:999999;' ><div class='popup-div smallScrollbar' style='width: 100%;padding: 0px;overflow:auto'><div class='smallScr cursor-click ' style='max-height: 120px;height: 100px;width: calc(100% - 2px);padding-right: 2px;box-sizing: border-box;margin-top: 2px;'>";
  35. (s += $("#" + e)
  36. .find(".smallScr")
  37. .html()),
  38. (s += "</div></div></div>"),
  39. top.$("body").append(s);
  40. var d = document.createElement("script");
  41. $(d).append("initNiceScorll();"),
  42. top.$("body").append(d),
  43. top.$(".whkDivHover").find(".popup-div").show(),
  44. top.$(".whkDivHover").mouseenter(function () {
  45. clearTimeout(timer);
  46. }),
  47. top
  48. .$(".whkDivHover")
  49. .find(".popup-div")
  50. .mouseleave(function () {
  51. tipsHidden();
  52. });
  53. }
  54. }
  55. function tipsHidden() {
  56. top.$(".whkDivHover").remove();
  57. }
  58. $(".dHover").mouseenter(function () {
  59. tips($(this), "cardList");
  60. }),
  61. $(".dHover").mouseleave(function () {
  62. clearTimeout(timer),
  63. (timer = setTimeout(function () {
  64. tipsHidden();
  65. }, 100));
  66. }),
  67. $(".dHover2").mouseenter(function (t) {
  68. t.stopPropagation(),
  69. tips($(this), "cardList2"),
  70. setTimeout(function () {
  71. top.loadSmallScorll(top.$(".popup-div"));
  72. }, 100);
  73. }),
  74. $(".dHover2").mouseleave(function (t) {
  75. clearTimeout(timer),
  76. (timer = setTimeout(function () {
  77. tipsHidden();
  78. }, 100));
  79. }),
  80. (this.recursionIframe = function (t) {
  81. if ((t = t || window).parent == top && t.parent == t)
  82. return { left: 0, top: 0 };
  83. for (
  84. var e,
  85. i = t.parent,
  86. n = i.document.getElementsByTagName("IFRAME"),
  87. o = t.document.getElementsByTagName("IFRAME"),
  88. r = 0;
  89. r < o.length;
  90. r++
  91. ) {
  92. if ((s = o[r]).contentWindow == t) {
  93. e = s;
  94. break;
  95. }
  96. }
  97. for (r = 0; r < n.length; r++) {
  98. var s;
  99. if ((s = n[r]).contentWindow == t) {
  100. e = s;
  101. break;
  102. }
  103. }
  104. var d = {
  105. left: (function t(e) {
  106. var i = e.offsetLeft;
  107. return null != e.offsetParent && (i += t(e.offsetParent)), i;
  108. })(e),
  109. top: (function t(e) {
  110. var i = e.offsetTop;
  111. return null != e.offsetParent && (i += t(e.offsetParent)), i;
  112. })(e),
  113. };
  114. if (i.parent != i) {
  115. var l = this.recursionIframe(i);
  116. (d.left += l.left), (d.top += l.top);
  117. }
  118. return d;
  119. }),
  120. $("#wh_content").find(".popup-div").hide(),
  121. $("#rc_content").find(".popup-div").hide(),
  122. $(".popup-div").hide(),
  123. $("#wh_content").click(function () {
  124. var url = window.a;
  125. eval(url), $("div.zhdlsj").show(), $("#wh_content").hide();
  126. });
  127. }
  128. $("#grtjList-div").mouseleave(function () {
  129. $("#grtjList-child-div").css("display", "none");
  130. }),
  131. $(".tjlb-child").mouseenter(function () {
  132. $("#grtjList-child-div").css("display", "block");
  133. }),
  134. $("#grtjList-child-div").mouseleave(function () {
  135. $("#grtjList-child-div").css("display", "none");
  136. }),
  137. loadSmallScorll($("#grtjList-child-div"));
  138. var divw = $(".grtjList-num").width();
  139. $(".grtjList-num").mouseleave(function () {
  140. $(this).find("div[parentId]").css("display", "none");
  141. }),
  142. $(".grtjList-num").mouseenter(function () {
  143. var t = $(this).attr("id");
  144. t &&
  145. ($("div[parentId]").css("display", "none"),
  146. $("div[parentId='" + t + "']").css("display", "block")),
  147. $(".grtjList-child-num").width(divw);
  148. }),
  149. setTimeout(function () {
  150. loadSmallScorll($(".grtjList-child-num"));
  151. }, 100),
  152. $(".grtjList-child-num").width(divw);