wangchuanjin 7 سال پیش
والد
کامیت
819a30eea9

+ 17 - 8
src/web/staticres/css/dev2/biddingSearch.css

@@ -798,12 +798,11 @@ width:1160px;
   text-align: center;
   line-height: 26px;
 }
-#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table>div>table>tbody>tr:first-child>td {
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table>table:last-child>tbody>tr:first-child>td {
 	border-top: 0px;
 }
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table thead {
   font-size: 14px;
-display: block;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table thead tr {
@@ -819,12 +818,6 @@ display: block;
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table tbody tr:nth-of-type(2n) {
   background-color: #f5f5fb;
 }
-#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table>div{
-	overflow-y: auto;
-	max-height: 400px;
-	display: block;
-	width: 1176px;
-}
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table{
 	width: 1157px;
 }
@@ -889,3 +882,19 @@ display: block;
 	position: relative;
 	top: -2px;
 }
+.lucene-table.tabfixed>table:first-child{
+	position: fixed;
+	top: 0px;
+}
+.lucene-table.tabfixed{
+	padding-top: 67px !important;
+}
+.lucene-table.tabfixed.lucene-table{
+	padding-top: 41px !important;
+}
+.lucene-table.tabfixed.entlist{
+	padding-top: 43px !important;
+}
+.lucene-table.tababsolute>table:first-child{
+	position: absolute;
+}

+ 53 - 1
src/web/staticres/js/common.js

@@ -183,4 +183,56 @@ function getScrollWidth() {
   	scroll = oDiv.clientWidth;
   	document.body.removeChild(oDiv);
   	return noScroll-scroll;
-}
+}
+//表头固定
+var TableHeadFixed = function(className,isminus,flag){
+	if(typeof(className) == "undefined"){
+		className = "tabContainer-2"
+	}
+	if(typeof(isminus) == "undefined"){
+		isminus = true;
+	}
+	if(typeof(flag) == "undefined"){
+		flag = true;
+	}
+	var cHeight = document.body.clientHeight;
+	if(cHeight <= 0){
+		cHeight = 500;
+	}
+	var thisFlag = false;
+	$(window).scroll(function(event){
+		if(!$("#right-table").hasClass("active") && flag){
+			return;
+		}
+		var tableHeight = $("."+className).outerHeight();
+		if(tableHeight <= cHeight){
+			return;
+		}
+		var offsetTop = $("."+className).offset().top;
+		var scrollTop = $(this).scrollTop();
+		var oTop = offsetTop;
+		if(isminus){
+			oTop+=20;
+		}
+		if(scrollTop >= oTop){
+			if(offsetTop + tableHeight - scrollTop <= cHeight){
+				if(!thisFlag){
+					$(".lucene-table").addClass("tababsolute");
+					$(".lucene-table>table:first").css("top",scrollTop);
+				}
+				thisFlag = true;
+			}else{
+				if(thisFlag){
+					$(".lucene-table").removeClass("tababsolute");
+					$(".lucene-table>table:first").css("top",0);
+				}
+				thisFlag = false;
+			}
+			$(".lucene-table").addClass("tabfixed");
+		}else{
+			$(".lucene-table").removeClass("tabfixed tababsolute");
+			$(".lucene-table>table:first").css("top",0);
+			thisFlag = false;
+		}
+	});
+}

+ 2 - 2
src/web/staticres/js/superSearch.js

@@ -472,11 +472,11 @@ function appendDatas(datas,flag,isNew){
 	}
 	if(!flag||selectType=="title"){
 		$(".tabContainer-2 .lucene ul").html(listHtml);
-		$(".tabContainer-2 .lucene-table>div>table tbody").html(tableHtml);
+		$(".tabContainer-2 .lucene-table table tbody").html(tableHtml);
 	}else{
 		if(selectType=="all"){
 			$(".tabContainer .lucene ul").html(listHtml);
-			$(".tabContainer .lucene-table>div>table tbody").html(tableHtml);
+			$(".tabContainer .lucene-table table tbody").html(tableHtml);
 		}
 	}
 	$(".tabContainer").css("min-height","");

+ 6 - 13
src/web/templates/pc/biddingsearch_enterprise.html

@@ -234,12 +234,6 @@
 			#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table.entlist table{
 				width: 1200px;
 			}
-			#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table.entlist>div{
-				width: 1220px;
-			}
-			#searchInner .searchControl .seaTender-inner .tabContainer{
-				overflow: inherit;
-			}
 		</style>
 	</head>
 
@@ -479,13 +473,11 @@
 						</tr>
 						</thead>
 					</table>
-					<div>
-						<table>
-							<tbody class="formTable" id="formTable">
-							
-							</tbody>
-						</table>
-					</div>
+					<table>
+						<tbody class="formTable" id="formTable">
+						
+						</tbody>
+					</table>
 				</div>	
 			</div>
 
@@ -693,6 +685,7 @@
 		var tabularflag = "Y";
 		
 		$(function(){
+			new TableHeadFixed("tabContainer-2",searchvalue=="",false);
 			haslogin({{.T.logid}});
 			if(mainList != "" && mainList != null){
 				getSearchTable(mainList);

+ 6 - 7
src/web/templates/pc/classifylist.html

@@ -725,13 +725,11 @@ function priceCss(){
 							</tr>
 						</thead>
 					</table>
-					<div>
-						<table>
-							<tbody>
-								
-							</tbody>
-						</table>
-					</div>
+					<table>
+						<tbody>
+							
+						</tbody>
+					</table>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">
@@ -769,6 +767,7 @@ var industry = {{.T.industry}};
 var res = {{.T.res}}
 var dataId = "";
 $(function(){
+	new TableHeadFixed("tabContainer");
 	//
 	haslogin({{.T.logid}});
 	//

+ 7 - 9
src/web/templates/pc/proproject.html

@@ -506,7 +506,7 @@ $(function(){
 					</ul>
 				</div>
 				<!--全文搜索 表格-->
-				<div class="lucene-table" style="display: none;">
+				<div class="lucene-table nijianlist" style="display: none;">
 					<table>
 						<thead>
 							<tr>
@@ -520,13 +520,11 @@ $(function(){
 							</tr>
 						</thead>
 					</table>
-					<div>
-						<table>
-							<tbody>
-								
-							</tbody>
-						</table>
-					</div>
+					<table>
+						<tbody>
+							
+						</tbody>
+					</table>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">
@@ -550,8 +548,8 @@ $(function(){
 <script type="text/javascript">
 $(function(){
 	haslogin({{.T.logid}},keys);
+	new TableHeadFixed();
 	new JyWebScoket.qrToLab();
-	
 	//
 	$(".j-nav .j-nav-link:eq(3)").addClass("active");
 	$(".q-mark").click(function(){

+ 3 - 7
src/web/templates/pc/supsearch.html

@@ -849,17 +849,12 @@ $(function(){
 								<td width="103">发布日期</td>
 							</tr>
 						</thead>
+					</table>
+					<table>
 						<tbody>
 							
 						</tbody>
 					</table>
-					<div>
-						<table>
-							<tbody>
-								
-							</tbody>
-						</table>
-					</div>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">
@@ -895,6 +890,7 @@ $(function(){
 {{include "/common/baiducc.html"}}
 <script type="text/javascript">
 $(function(){
+	new TableHeadFixed();
 	new JyWebScoket.qrToLab();
 	haslogin({{.T.logid}},keys);
 	//点击超级搜索按钮