zhengkaixin 3 jaren geleden
bovenliggende
commit
a201970719
3 gewijzigde bestanden met toevoegingen van 70 en 23 verwijderingen
  1. 15 13
      large/index.html
  2. 3 3
      large/index2.html
  3. 52 7
      large/js/large.js

+ 15 - 13
large/index.html

@@ -72,23 +72,24 @@
 			<div class="title">
 				<h3>企业健康指数</h3><span id="topListNum">28</span>
 			</div>
-			<div class="content">
+			<div class="content" id="topListContent">
+				
 				<table class="table table-bordered">
 				  <thead>
 					<tr>
 					  <th>工会名称</th>
-					  <th>基础型</th>
+					  <th style="width: 100px;">基础型</th>
 					</tr>
 				  </thead>
 				  </table>
-				  <marquee onMouseOut="this.start()" id="marquee1"
+				 <!-- <marquee onMouseOut="this.start()" id="marquee1"
 				  behavior="scroll" scrollamount="3"
 				  direction="up" onMouseOver="this.stop()">
-					  <table class="table table-bordered">
-					  <tbody id="topListBody">
-					  </tbody>
-					</table>
-				</marquee>
+				  </marquee> -->
+				 <table class="table table-bordered">
+				   <tbody id="topListBody">
+				   </tbody>
+				 </table>
 				<!--<div class="tab-more">查看更多</div>-->
 			</div>
 		</div>
@@ -101,21 +102,22 @@
 				  <thead>
 					<tr>
 					  <th>触发工会</th>
-					  <th>预警级别</th>
-					  <th>类型</th>
-					  <th>日期</th>
+					  <th style='width: 100px;'>预警级别</th>
+					  <th style='width: 80px;'>类型</th>
+					  <th style='width: 120px;'>日期</th>
 					</tr>
 				  </thead>
 				  	</table>
-				<marquee onMouseOut="this.start()" id="marquee2" scrollamount="3"
+				<!-- <marquee onMouseOut="this.start()" id="marquee2" scrollamount="3"
 					behavior="scroll"
 					direction="up" onMouseOver="this.stop()">
+						</marquee>	 -->
 					<table class="table table-bordered" >
 						<tbody id="errorListBody" >
 							
 						</tbody>				  
 					</table>
-				</marquee>	
+			
 			</div>
 		</div>
 	  </div>

+ 3 - 3
large/index2.html

@@ -27,7 +27,7 @@
           <div class="menu-item active">
             <span>园区概况</span>
           </div>
-           <div class="menu-item " >
+           <div class="menu-item " id="gogogo" >
             <span>智慧大屏</span>
           </div>
         </div>
@@ -138,11 +138,11 @@
 			 	<div class="content-row">
 			 		<div class="content-item">
 			 			<h4>女职工数</h4>
-			 			<h1>28</h1>
+			 			<h1>2276</h1>
 			 		</div>
 			 		<div class="content-item">
 			 			<h4>男职工数</h4>
-			 			<h1>19</h1>
+			 			<h1>3423</h1>
 			 		</div>
 			 	</div>
 			 </div>

+ 52 - 7
large/js/large.js

@@ -1,7 +1,7 @@
-var marquee2 = document.getElementById("marquee2");
-		  marquee2.start();
-		  var marquee1 = document.getElementById("marquee1");
-		    marquee1.start();
+// var marquee2 = document.getElementById("marquee2");
+// 		  marquee2.start();
+// 		  var marquee1 = document.getElementById("marquee1");
+// 		    marquee1.start();
 $(function() {// 初始化内容
 	$("#gogogo").click(function(){
 		window.location="index2.html"
@@ -887,7 +887,7 @@ $(function() {// 初始化内容
             var obj=topList[i];
 
             $("#topListBody").append(
-                $("<tr> <td>"+obj.orgName+" </td> <td>"+obj.score+" </td></tr>")
+                $("<tr> <td>"+obj.orgName+" </td> <td style='width: 100px;'>"+obj.score+" </td></tr>")
             );
         }
     // <tr>
@@ -919,7 +919,7 @@ $(function() {// 初始化内容
 
 
             $("#errorListBody").append(
-                $("<tr> <td>"+obj.name+" </td> <td>"+map.get(obj.level)+" </td><td>"+map.get(obj.type)+" </td><td>"+(Y+M+D)+" </td></tr>")
+                $("<tr> <td>"+obj.name+" </td> <td style='width: 100px;'>"+map.get(obj.level)+" </td><td style='width: 80px;'>"+map.get(obj.type)+" </td><td style='width: 120px;'>"+(Y+M+D)+" </td></tr>")
             );
         }
         createBar(data.obj1.rows1.length,202-data.obj1.rows1.length,"已关联工会","container",data.obj1.rows1.length+"/"+202);
@@ -1309,4 +1309,49 @@ $(function() {// 初始化内容
             //console.log(params)
         });
         }
-});
+		
+		
+		
+		 var speed=100;
+	function getMy(str){
+		return document.getElementById(str)
+	}
+		 var demo=getMy("topListContent");
+		 var demo4=getMy("topListBody");
+		 
+		 var ttt=0;
+		function Marquee1(){
+	 
+		    // if (divs.offsetHeight > document.body.clientHeight ){
+		    //     divs.offsetHeight=document.body.clientHeight;
+		    //     demo.offsetHeight = divs.offsetHeight - divb.offsetHeight -count.offsetHeight;}
+		    //     console.log(document.body.clientHeight);
+		    //     console.log(divs.offsetHeight);
+		    //     console.log(demo.offsetHeight);
+			
+		    if(demo.offsetHeight < demo4.offsetHeight){
+		      
+		    }
+		
+			ttt=ttt+2;
+			 
+			  $("#topListContent").scrollTop(ttt)
+			if(demo4.offsetHeight-demo.offsetHeight+80<ttt){
+					 
+				console.log(demo.offsetTop+"--a---"+demo.offsetHeight+"c"+ttt)
+				console.log(demo4.offsetTop+"---b--"+demo4.offsetHeight+"ddd   "+demo4.clientHeight)	
+						  $("#topListContent").scrollTop(0)
+						  ttt=0;
+			}
+		
+		}
+		var MyMar1=setInterval(Marquee1,speed)//设置定时器
+		//鼠标移上时清除定时器达到滚动停止的目的
+		demo.onmouseover=function() {clearInterval(MyMar1)}
+		//鼠标移开时重设定时器
+		demo.onmouseout=function(){
+			 ttt= $("#topListContent").scrollTop()
+			MyMar1=setInterval(Marquee1,speed)
+		}
+		//-->
+});