viewZtgk.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //动态滚页暂时隐藏
  2. /**
  3. * 页面切换
  4. window.clearInterval(int);
  5. var icurrent = 0; //开始翻页标志
  6. var max = $('.qhdiv').length; //最大翻页数目
  7. $('.qhdiv').eq(0).attr("style","display:''");
  8. function change(obj){
  9. $('.v_box a').removeClass('on');
  10. $(obj).addClass('on');
  11. var index = $('.v_box').find('.on').index();
  12. icurrent = index;
  13. for (var i = 0; i <= max; i++) {
  14. if (i == icurrent) {
  15. $('.qhdiv').eq(icurrent).attr("style","display:''");
  16. } else {
  17. $('.qhdiv').eq(i).attr("style","display:none");
  18. }
  19. }
  20. }
  21. //鼠标操作
  22. $('.v_box .v_btn').mouseover(function(){
  23. change(this);
  24. });
  25. //自动翻页
  26. var int = window.setInterval(function changeauto(){
  27. if(icurrent==max){
  28. icurrent = 0; //上限后 为0 重新翻页
  29. }
  30. for (var i = 0; i <= max; i++) {
  31. if (i == icurrent) {
  32. $('.qhdiv').eq(icurrent).attr("style","display:''");
  33. } else {
  34. $('.qhdiv').eq(i).attr("style","display:none");
  35. }
  36. }
  37. $('.v_box a').removeClass('on');
  38. $(obj).addClass('on');
  39. $('.v_box a').eq(icurrent).addClass('on');
  40. icurrent++;
  41. } , 8000);
  42. */
  43. /**
  44. * 日均增重箭头指向判断
  45. * @param jttzzz
  46. * @param zttzzz
  47. * @param qttzzz
  48. */
  49. function tzzz(jttzzz, zttzzz, qttzzz) {
  50. if (zttzzz >= qttzzz) {
  51. $("#ztQtTzzz").css("display", "");
  52. }
  53. if (qttzzz > zttzzz) {
  54. $("#qtZtTzzz").css("display", "");
  55. }
  56. if (zttzzz > jttzzz) {
  57. $("#ztJtTzzz").css("display", "");
  58. }
  59. if (zttzzz <= jttzzz) {
  60. $("#jtZtTzzz").css("display", "");
  61. }
  62. }
  63. tzzz($("#jttzzz").val(), $("#zttzzz").val(), $("#qttzzz").val());
  64. /**
  65. * 料肉比箭头指向判断
  66. * @param ztlrb
  67. * @param qtlrb
  68. * @param dQtLrb
  69. */
  70. function lrb(ztlrb, qtlrb, dqtlrb) {
  71. if (qtlrb >= dqtlrb && qtlrb > 0) {
  72. $("#qtDqtLrb").css("display", "");
  73. }
  74. if (dqtlrb > qtlrb && qtlrb > 0) {
  75. $("#dqtQtLrb").css("display", "");
  76. }
  77. if (qtlrb > ztlrb && ztlrb > 0) {
  78. $("#qtZtLrb").css("display", "");
  79. }
  80. if (ztlrb >= qtlrb && ztlrb > 0) {
  81. $("#ztQtLrb").css("display", "");
  82. }
  83. }
  84. lrb($("#ztlrb").val(), $("#qtlrb").val(), $("#dqtlrb").val());
  85. /**
  86. * 死亡数颜色显示判断
  87. * @param sws
  88. */
  89. function sws(sws) {
  90. if (sws > 0) {
  91. $("#swsOverZero").css("display", "");
  92. } else {
  93. $("#swsEqualZero").css("display", "");
  94. }
  95. }
  96. sws($("#sws").val());