Bladeren bron

发布的时候改写栏目值,搜索关键词跳转搜索

luyanan 7 jaren geleden
bovenliggende
commit
0a8119c39f
6 gewijzigde bestanden met toevoegingen van 45 en 37 verwijderingen
  1. 2 0
      cmp-portal/js/articalIssue.js
  2. 2 0
      cmp-portal/js/articalModify.js
  3. 1 1
      css/common.css
  4. 1 0
      js/articalIssue.js
  5. 1 0
      js/articalModify.js
  6. 38 36
      js/searchNew.js

+ 2 - 0
cmp-portal/js/articalIssue.js

@ -485,6 +485,8 @@ function getAttrId() {
485 485
			if(publishTime!="") {
486 486
				$data.publishTime = publishTime;
487 487
			}
488
		}else{
489
			$data.colNum=2;
488 490
		}
489 491
		if($("#hidearticleId").val().length != 0) {
490 492
			$data.articleId = $("#hidearticleId").val();

+ 2 - 0
cmp-portal/js/articalModify.js

@ -655,6 +655,8 @@ $(function() {
655 655
			if(publishTime!="") {
656 656
				$data.publishTime = publishTime;
657 657
			}
658
		}else{
659
			$data.colNum=2;
658 660
		}
659 661
		console.log($data);
660 662
	}

+ 1 - 1
css/common.css

@ -141,7 +141,7 @@ input{ outline:none;}
141 141

142 142
/***********************缺省页面*******************/
143 143
.nodatatip{width:40%;margin:100px auto;overflow:hidden;height:100px; font-size:16px; text-align:center;color:#aaa;}
144
.nodatabox{/*width:100%;*/height: 100%;padding:40px; margin:20px auto;text-align: center;}
144
.nodatabox{/*width:100%;*//*height: 100%;*/padding:40px; margin:20px auto;text-align: center;}
145 145
.nodatabox .nodata{overflow:hidden; width:50%; margin:20px auto;}
146 146
.nodatabox .picbox{margin:8px auto;display:inline-block;width:140px;height:140px;background-position: center;background-repeat: no-repeat;background-size:cover;}
147 147
.nodatabox .picbox.picNull{background-image:url(../images/points_icon_ku_nor.png);}

+ 1 - 0
js/articalIssue.js

@ -432,6 +432,7 @@ $(function() {
432 432
		$data.articleContent = ue.getContent();
433 433
		$data.professors = experarray;
434 434
		$data.resources = resourcesarray;
435
		$data.colNum=1;
435 436
		if($("#hidearticleId").val().length != 0) {
436 437
			$data.articleId = $("#hidearticleId").val();
437 438
		}

+ 1 - 0
js/articalModify.js

@ -602,6 +602,7 @@ $(function() {
602 602
		$data.articleContent = ue.getContent();
603 603
		$data.professors = experarray;
604 604
		$data.resources = resourcesarray;
605
		$data.colNum=1;
605 606
		if(settime) {
606 607
			$data.publishTime = publishTime;
607 608
		}

+ 38 - 36
js/searchNew.js

@ -13,6 +13,7 @@ $(function() {
13 13
		expertListVal(keyt,subject,industry,address,authType,20,1,true);
14 14
	}else{
15 15
		num = tagnum;
16
		keyt=searchContent;
16 17
		if(num==1){
17 18
			$(".choosediv.filterdiv li").eq(0).addClass("liactive").siblings().removeClass("liactive");
18 19
			$(".listdiv .listbox").eq(0).show().siblings().hide();
@ -22,27 +23,27 @@ $(function() {
22 23
			$(".choosediv.filterdiv li").eq(2).addClass("liactive").siblings().removeClass("liactive");
23 24
			$(".listdiv .listbox").eq(2).show().siblings().hide();
24 25
			$(".searchsome").attr("placeholder","请输入资源名称、用途、发布者或相关关键词");
25
			resourceListVal(20, 1,true);
26
			resourceListVal(keyt,20, 1,true);
26 27
		}else if(num==3){
27 28
			$(".choosediv.filterdiv li").eq(5).addClass("liactive").siblings().removeClass("liactive");
28 29
			$(".listdiv .listbox").eq(5).show().siblings().hide();
29 30
			$(".searchsome").attr("placeholder","请输入文章标题、作者或相关关键词");
30
			articalListVal(20, 1,true);
31
			articalListVal(keyt,20, 1,true);
31 32
		}else if(num==4){
32 33
			$(".choosediv.filterdiv li").eq(1).addClass("liactive").siblings().removeClass("liactive");
33 34
			$(".listdiv .listbox").eq(1).show().siblings().hide();
34 35
			$(".searchsome").attr("placeholder","请输入企业名称、产品名称或相关关键词");
35
			companyListVal(20,1,true);
36
			companyListVal(keyt,20,1,true);
36 37
		}else if(num==5){
37 38
			$(".choosediv.filterdiv li").eq(3).addClass("liactive").siblings().removeClass("liactive");
38 39
			$(".listdiv .listbox").eq(3).show().siblings().hide();
39 40
			$(".searchsome").attr("placeholder","请输入专利名称、发明人或相关关键词");
40
			patentListVal(20, 1,true);
41
			patentListVal(keyt,20, 1,true);
41 42
		}else if(num==6){
42 43
			$(".choosediv.filterdiv li").eq(4).addClass("liactive").siblings().removeClass("liactive");
43 44
			$(".listdiv .listbox").eq(4).show().siblings().hide();
44 45
			$(".searchsome").attr("placeholder","请输入论文题目、作者或相关关键词");
45
			paperListVal(20, 1,true);
46
			paperListVal(keyt,20, 1,true);
46 47
		}
47 48
	}
48 49
	
@ -103,33 +104,34 @@ $(function() {
103 104
			if(num==1){
104 105
				expertBox();
105 106
			}else if(num==2){
106
				resourceListVal(20, 1,true);
107
				resourceListVal(keyt,20, 1,true);
107 108
			}else if(num==3){
108
				articalListVal(20, 1,true);
109
				articalListVal(keyt,20, 1,true);
109 110
			}else if(num==4){
110
				companyListVal(20, 1,true);
111
				companyListVal(keyt,20, 1,true);
111 112
			}else if(num==5){
112
				patentListVal(20, 1,true);
113
				patentListVal(keyt,20, 1,true);
113 114
			}else if(num==6){
114
				paperListVal(20, 1,true);
115
				paperListVal(keyt,20, 1,true);
115 116
			}
116 117
		}
117 118
	})
118 119
	
119 120
	$(".searchgo").on("click",function(e) {
120 121
		num = $(".liactive").attr("data-id");
122
		keyt =$(".searchsome").val()
121 123
		if(num==1){
122 124
			expertBox();
123 125
		}else if(num==2){
124
			resourceListVal(20, 1,true);
126
			resourceListVal(keyt,20, 1,true);
125 127
		}else if(num==3){
126
			articalListVal(20, 1,true);
128
			articalListVal(keyt,20, 1,true);
127 129
		}else if(num==4){
128
			companyListVal(20, 1,true);
130
			companyListVal(keyt,20, 1,true);
129 131
		}else if(num==5){
130
			patentListVal(20, 1,true);
132
			patentListVal(keyt,20, 1,true);
131 133
		}else if(num==6){
132
			paperListVal(20, 1,true);
134
			paperListVal(keyt,20, 1,true);
133 135
		}
134 136
	})
135 137
	
@ -139,7 +141,7 @@ $(function() {
139 141
140 142
141 143
	function expertBox(){
142
		keyt = $(".searchsome").val();
144
		keyt = keyt;
143 145
		var  subjectVal= $("#academicField li.filterCurrent").text();
144 146
		if(subjectVal=="不限"){
145 147
			subject = "";
@ -176,19 +178,19 @@ $(function() {
176 178
				expertBox();
177 179
				$(".searchsome").attr("placeholder","请输入专家姓名、机构、研究方向或相关关键词");
178 180
			}else if(index==1){
179
				companyListVal(20, 1,true);
181
				companyListVal(keyt,20, 1,true);
180 182
				$(".searchsome").attr("placeholder","请输入企业名称、产品名称或相关关键词");
181 183
			}else if(index==2){
182
				resourceListVal(20, 1,true);
184
				resourceListVal(keyt,20, 1,true);
183 185
				$(".searchsome").attr("placeholder","请输入资源名称、用途、发布者或相关关键词");
184 186
			}else if(index==3){
185
				patentListVal(20, 1,true);
187
				patentListVal(keyt,20, 1,true);
186 188
				$(".searchsome").attr("placeholder","请输入专利名称、发明人或相关关键词");
187 189
			}else if(index==4){
188
				paperListVal(20, 1,true);
190
				paperListVal(keyt,20, 1,true);
189 191
				$(".searchsome").attr("placeholder","请输入论文题目、作者或相关关键词");
190 192
			}else if(index==5){
191
				articalListVal(20, 1,true);
193
				articalListVal(keyt,20, 1,true);
192 194
				$(".searchsome").attr("placeholder","请输入文章标题、作者或相关关键词");
193 195
			}
194 196
	   });
@ -418,13 +420,13 @@ $(function() {
418 420
		});
419 421
	}
420 422
	//企业
421
	function companyListVal(pageSize,pageNo,isbind) {
423
	function companyListVal(keyt,pageSize,pageNo,isbind) {
422 424
		$.ajax({
423 425
			"url": "/ajax/org/find/pq",
424 426
			"type": "get",
425 427
			"async": true,
426 428
			"data": {
427
				"kw":$(".searchsome").val(),
429
				"kw":keyt,
428 430
				"pageSize": pageSize,
429 431
				"pageNo": pageNo
430 432
			},
@ -483,7 +485,7 @@ $(function() {
483 485
								current: data.data.pageNo,
484 486
								backFn: function(p) {
485 487
									$("#companyList").html("");
486
									companyListVal(20, p,false);
488
									companyListVal(keyt,20, p,false);
487 489
									document.body.scrollTop = document.documentElement.scrollTop = 0;
488 490
								}
489 491
							});
@ -503,13 +505,13 @@ $(function() {
503 505
		});
504 506
	}
505 507
	//文章
506
	function articalListVal(pageSize, pageNo,isbind) {
508
	function articalListVal(keyt,pageSize, pageNo,isbind) {
507 509
		$.ajax({
508 510
			"url": "/ajax/article/firstpq",
509 511
			"type": "get",
510 512
			"async": true,
511 513
			"data": {
512
				"key":$(".searchsome").val(),
514
				"key":keyt,
513 515
				"pageSize": pageSize,
514 516
				"pageNo": pageNo
515 517
			},
@ -574,7 +576,7 @@ $(function() {
574 576
								current: data.data.pageNo,
575 577
								backFn: function(p) {
576 578
									$("#articalList").html("");
577
									articalListVal(20, p,false);
579
									articalListVal(keyt,20, p,false);
578 580
									document.body.scrollTop = document.documentElement.scrollTop = 0;
579 581
								}
580 582
							});
@ -616,13 +618,13 @@ $(function() {
616 618
		});
617 619
	}
618 620
	//资源
619
	function resourceListVal(pageSize, pageNo,isresource) {
621
	function resourceListVal(keyt,pageSize, pageNo,isresource) {
620 622
		$.ajax({
621 623
			"url": "/ajax/resource/firstpq",
622 624
			"type": "get",
623 625
			"async": true,
624 626
			"data": {
625
				"key":$(".searchsome").val(),
627
				"key":keyt,
626 628
				"pageSize": pageSize,
627 629
				"pageNo": pageNo
628 630
			},
@ -681,7 +683,7 @@ $(function() {
681 683
								current: data.data.pageNo,
682 684
								backFn: function(p) {
683 685
									$("#resourceList").html("");
684
									resourceListVal(20, p,false);
686
									resourceListVal(keyt,20, p,false);
685 687
									document.body.scrollTop = document.documentElement.scrollTop = 0;
686 688
								}
687 689
							});
@ -701,13 +703,13 @@ $(function() {
701 703
		});
702 704
	}
703 705
	//专利
704
	function patentListVal(pageSize, pageNo,isbind) {
706
	function patentListVal(keyt,pageSize, pageNo,isbind) {
705 707
		$.ajax({
706 708
			"url": "/ajax/ppatent/pq",
707 709
			"type": "get",
708 710
			"async": true,
709 711
			"data": {
710
				"qw":$(".searchsome").val(),
712
				"qw":keyt,
711 713
				"pageSize": pageSize,
712 714
				"pageNo": pageNo
713 715
			},
@ -741,7 +743,7 @@ $(function() {
741 743
								current: data.data.pageNo,
742 744
								backFn: function(p) {
743 745
									$("#patentList").html("");
744
									patentListVal(20, p,false);
746
									patentListVal(keyt,20, p,false);
745 747
									document.body.scrollTop = document.documentElement.scrollTop = 0;
746 748
								}
747 749
							});
@ -761,13 +763,13 @@ $(function() {
761 763
		});
762 764
	}
763 765
	//论文
764
	function paperListVal(pageSize, pageNo,isbind) {
766
	function paperListVal(keyt,pageSize, pageNo,isbind) {
765 767
		$.ajax({
766 768
			"url": "/ajax/ppaper/pq",
767 769
			"type": "get",
768 770
			"async": true,
769 771
			"data": {
770
				"qw":$(".searchsome").val(),
772
				"qw":keyt,
771 773
				"pageSize": pageSize,
772 774
				"pageNo": pageNo
773 775
			},
@ -813,7 +815,7 @@ $(function() {
813 815
								current: data.data.pageNo,
814 816
								backFn: function(p) {
815 817
									$("#paperList").html("");
816
									paperListVal(20, p,false);
818
									paperListVal(keyt,20, p,false);
817 819
									document.body.scrollTop = document.documentElement.scrollTop = 0;
818 820
								}
819 821
							});