浏览代码

朋涛
1.最新咨询最新回复图片ok,专家修改页面的专家个人信息完善
2.专家页面,模块没数据就不显示在页面上,没有登陆,咨询,跳转登陆页面

xiaoai_123 8 年之前
父节点
当前提交
243b490a10

+ 1 - 1
src/main/webapp/css/index.css

193
.coulstblock .coulstbox{display:block; width:200px; height:100px; padding:10px; background:rgba(256,256,256,.9); border:1px solid #ccc; border-radius:4px 4px 0 0; box-shadow: -3px -2px 8px -1px rgba(0,0,0,0.2); cursor: pointer;}
193
.coulstblock .coulstbox{display:block; width:200px; height:100px; padding:10px; background:rgba(256,256,256,.9); border:1px solid #ccc; border-radius:4px 4px 0 0; box-shadow: -3px -2px 8px -1px rgba(0,0,0,0.2); cursor: pointer;}
194
.coulstblock .coulstbox .prohead{ width:80px; height:80px; border-radius:50%; overflow:hidden;}
194
.coulstblock .coulstbox .prohead{ width:80px; height:80px; border-radius:50%; overflow:hidden;}
195
.coulstblock .coulstbox .coulstbtn{padding:24px 10px; margin-left:10px;}
195
.coulstblock .coulstbox .coulstbtn{padding:24px 10px; margin-left:10px;}
196
.coulstblock .coulstbox .coulstbtn span{padding:4px 10px; display:block; width:60px; border-radius:2px; text-align:center; color:#fff; background:#ff8400;}
196
.coulstblock .coulstbox .coulstbtn span,#conbtn span{padding:4px 10px; display:block; width:60px; border-radius:2px; text-align:center; color:#fff; background:#ff8400;cursor:pointer}
197
/*专家信息头部*/
197
/*专家信息头部*/
198
.information-head{ width:1050px; margin:auto;background:#fff; border:1px  solid #eaeaea; margin-top:30px; overflow:hidden; padding:20px 50px;}
198
.information-head{ width:1050px; margin:auto;background:#fff; border:1px  solid #eaeaea; margin-top:30px; overflow:hidden; padding:20px 50px;}
199
.head-left{ float:left;width:200px; height:200px; border-radius:50%;position:relative;overflow:hidden;}
199
.head-left{ float:left;width:200px; height:200px; border-radius:50%;position:relative;overflow:hidden;}

+ 5 - 5
src/main/webapp/information-brow.html

65
			<div class="head-center">
65
			<div class="head-center">
66
				<div class="infor-browse">
66
				<div class="infor-browse">
67
					<a href="#" class="named" id="nameS"></a><a href="#" class="modify"></a>
67
					<a href="#" class="named" id="nameS"></a><a href="#" class="modify"></a>
68
					<div class="position" id="titleS"></div>
69
					<div class="science" id="orgNameS"></div>
70
					<div class="industry" id="industryS"></div>
68
					<div class="position" ><span id="office"></span ><span id="titleS"></span ></div>				
69
					<div class="science"><span id="industryS"></span ><span id="orgNameS"></span ></div>			
70
					<div class="address" id="address"></div>					
71
				</div>
71
				</div>
72

72
				<div class="coulstbtn floatL" id="conbtn"><span>咨询</span></div>
73
			</div>
73
			</div>
74
			<div class="head-right"><a href="" id="organ"><img id="orgImage"></a></div>
74
			<div class="head-right"><a  id="organ"><img id="orgImage"></a></div>
75
		</div>
75
		</div>
76
		<div class="information-content">
76
		<div class="information-content">
77
			<div class="content-left" >
77
			<div class="content-left" >

+ 11 - 5
src/main/webapp/information.html

53
			<div class="head-center">
53
			<div class="head-center">
54
				<div class="infor-browse">
54
				<div class="infor-browse">
55
					<a href="#" class="named" id="nameS"></a><a href="#" class="modify"></a><a class="edit" ></a>
55
					<a href="#" class="named" id="nameS"></a><a href="#" class="modify"></a><a class="edit" ></a>
56
					<div class="position" id="titleS"></div>
57
					<div class="science" id="orgNameS"></div>
58
					<div class="industry" id="industryS"></div>
56
					<div class="position" ><span id="office"></span ><span id="titleS"></span ></div>				
57
					<div class="science"><span id="industryS"></span ><span id="orgNameS"></span ></div>			
58
					<div class="address" id="address"></div>
59
				</div>
59
				</div>
60
				<div class="modifybox">
60
				<div class="modifybox">
61
				<div class="infor">
61
				<div class="infor">
67
					</div>
67
					</div>
68

68

69
				</div>
69
				</div>
70

70
				<div class="infor">
71
					<span>职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</span>
72
					<input type="text" class="input-txt" id="officeRevise">
73
					<span>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址</span>
74
					<input type="text" class="input-txt" id="addressRevise">
75
				</div>
71
				<div class="infor">
76
				<div class="infor">
72
					<span>部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门</span>
77
					<span>部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门</span>
73
					<input type="text" class="input-txt" id="department">
78
					<input type="text" class="input-txt" id="department">
80
				</div>
85
				</div>
81
				</div>
86
				</div>
82
			</div>
87
			</div>
83
		<div class="head-right"><a href="organization-brow.html"><img id="orgImage"></a></div>
88
			<!-- href="organization-brow.html" -->
89
		<div class="head-right"><a ><img id="orgImage"></a></div>
84
		</div>
90
		</div>
85
		<div class="information-content">
91
		<div class="information-content">
86
			<div class="content-left" >
92
			<div class="content-left" >

+ 80 - 18
src/main/webapp/js/information.brow.js

243
						if ($info) {
243
						if ($info) {
244
							//展示专家的信息
244
							//展示专家的信息
245
							$("#nameS").text($info.name);
245
							$("#nameS").text($info.name);
246
							$("#titleS").text($info.title);
247
							$("#orgNameS").text($info.orgName);
246
							if($info.office) {
247
								$("#office").text($info.office+",");
248
							}
249
							if($info.title) {
250
								$("#titleS").text($info.title);	
251
							}
252
							if($info.department) {
253
								$("#industryS").text($info.department+",");
254
							}
255
							if($info.orgName) {
256
								$("#orgNameS").text($info.orgName);
257
							}
258
							if($info.address) {
259
								$("#address").text($info.address);
260
							}																			
248
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
261
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
249
								$("#headImage").load(function(){									
262
								$("#headImage").load(function(){									
250
								})
263
								})
266
							//$("#organ").attr("href","organization-brow.html?orgId="+$info.orgId+"");
279
							//$("#organ").attr("href","organization-brow.html?orgId="+$info.orgId+"");
267
							//console.log($info.orgId);
280
							//console.log($info.orgId);
268
							$("#orgName").val($info.orgName);
281
							$("#orgName").val($info.orgName);
269
							$("#department").val($info.department);
270
							$("#descp").val($info.descp);
271
							//展示专家的学科
272
							subjectShow($info.subject);
273
							//研究方向
274
							if ($info.researchAreas) {
282
							$("#department").val($info.department);														
283
							if($info.descp==undefined&&$info.subject==undefined&&$info.researchAreas.length ==0&&$info.industry==undefined&&$info.edus.length ==0&&$info.jobs.length ==0&&$info.projects.length==0&&$info.papers.length ==0&&$info.patents.length ==0&&$info.honors.length ==0){								
284
								$("div:contains('专家信息')").parents(".menublock").hide();
285
							}
286
							if($info.descp){
287
								$("#descp").val($info.descp);
288
							}else{
289
								$("span:contains('个人简介')").parents(".introduction").hide();
290
								$("a:contains('个人简介')").hide();
291
							}
292
							
293
							//展示专家的学科							
294
							if($info.subject){
295
								subjectShow($info.subject);
296
							}else{
297
								$("span:contains('学术领域')").parents(".introduction").hide();
298
								$("a:contains('学术领域')").hide();
299
							}
300
							
301
							//研究方向						
302
							if ($info.researchAreas.length) {
275
								researchAreaShow($info.researchAreas,$info.researchAreaLogs);
303
								researchAreaShow($info.researchAreas,$info.researchAreaLogs);
304
							}else{							
305
								$("span:contains('研究方向')").parents(".introduction").hide();
306
								$("a:contains('研究方向')").hide();
276
							}
307
							}
277
							//展示专家的行业
278
							industryShow($info.industry);
279
							//教育北京
280
							if ($info.edus) {
308
							//展示专家的行业							
309
							if($info.industry){
310
								industryShow($info.industry);
311
							}else{
312
								$("span:contains('应用行业')").parents(".introduction").hide();
313
								$("a:contains('应用行业')").hide();
314
							}
315
							
316
							//教育北京						
317
							if ($info.edus.length) {
281
								eduBgShow($info.edus);
318
								eduBgShow($info.edus);
282
							}
319
							}
320
							else{
321
								$("span:contains('教育背景')").parents(".introduction").hide();
322
								$("a:contains('教育背景')").hide();
323
							}
283
							//兼职
324
							//兼职
284
							if ($info.jobs) {
325
							if ($info.jobs.length) {
285
								timeJobShow($info.jobs);
326
								timeJobShow($info.jobs);
327
							}else{
328
								$("span:contains('社会兼职')").parents(".introduction").hide();
329
								$("a:contains('社会兼职')").hide();
286
							}
330
							}
287
							//项目
331
							//项目
288
							if ($info.projects) {
332
							if ($info.projects.length) {
289
								projectShow($info.projects)
333
								projectShow($info.projects)
334
							}else{
335
								$("span:contains('项目经历')").parents(".introduction").hide();
336
								$("a:contains('项目经历')").hide();
290
							}
337
							}
291

338

292
							//论文
339
							//论文
293
							if ($info.papers) {
340
							if ($info.papers.length) {
294
								paperShow($info.papers);
341
								paperShow($info.papers);
342
							}else{
343
								$("span:contains('著作、论文、文章')").parents(".introduction").hide();
344
								$("a:contains('著作、论文、文章')").hide();								
295
							}
345
							}
296
							//专利
346
							//专利
297
							if ($info.patents) {
347
							if ($info.patents.length) {
298
								patentShow($info.patents);
348
								patentShow($info.patents);
349
							}else{
350
								$("span:contains('专利')").parents(".introduction").hide();
351
								$("a:contains('专利')").hide();	
299
							}
352
							}
300
							//荣誉
353
							//荣誉
301
							if ($info.honors) {
354
							if ($info.honors.length) {
302
								honorShow($info.honors);
355
								honorShow($info.honors);
356
							}else{
357
								$("span:contains('荣誉及奖项')").parents(".introduction").hide();
358
								$("a:contains('获奖')").hide();	
303
							}
359
							}
304
							 
360
							 
305
					//下滑滚动不覆盖底部 
361
					//下滑滚动不覆盖底部 
381
			if(data.data.length==0){
437
			if(data.data.length==0){
382
				$("#infor-browse").css("display","none");
438
				$("#infor-browse").css("display","none");
383
				$(".resoubtn").css("display","none");
439
				$(".resoubtn").css("display","none");
440
				$("span:contains('科研资源')").parents(".introduction").hide();
441
				$("a:contains('科研资源')").hide();
384
			}
442
			}
385
			if(data.data.length > 0 && data.data.length <= 3){
443
			if(data.data.length > 0 && data.data.length <= 3){
386
				$("#infor-browse").css("display","block");
444
				$("#infor-browse").css("display","block");
614
	
672
	
615

673

616
 	
674
 	
617
	function consultHandler(){
675
	function consultHandler() {		
676
			if( userid=="null"){
677
			$.MsgBox.Alert("message","请先登录");
678
			location.href="login.html";
679
		}
618
		ConsultApply();
680
		ConsultApply();
619
		//点击的发送
681
		//点击的发送
620
		$("#sendConsultBtn").click(function(){
682
		$("#sendConsultBtn").click(function(){

+ 60 - 8
src/main/webapp/js/information.js

150
		if ($info) {
150
		if ($info) {
151
			//展示专家的信息
151
			//展示专家的信息
152
			$("#nameS").text($info.name);
152
			$("#nameS").text($info.name);
153
			$("#titleS").text($info.title);
154
			$("#orgNameS").text($info.orgName);
153
			if($info.office) {
154
				$("#office").text($info.office+",");
155
			}
156
			if($info.title) {
157
				$("#titleS").text($info.title);	
158
			}
159
			if($info.department) {
160
				$("#industryS").text($info.department+",");
161
			}
162
			if($info.orgName) {
163
				$("#orgNameS").text($info.orgName);
164
			}
165
			if($info.address) {
166
				$("#address").text($info.address);
167
			}					
168
			
155
			$("#headImage").attr("src", "/images/head/" + userid + "_l.jpg");
169
			$("#headImage").attr("src", "/images/head/" + userid + "_l.jpg");
156
			$("#headImage").load(function() {})
170
			$("#headImage").load(function() {})
157
				.error(function() {
171
				.error(function() {
168
			$("#title").val($info.title);
182
			$("#title").val($info.title);
169
			$("#orgId").val($info.orgId);
183
			$("#orgId").val($info.orgId);
170
			$("#orgName").val($info.orgName);
184
			$("#orgName").val($info.orgName);
171
			$("#department").val($info.department);
185
			$("#department").val($info.department);			
186
			$("#officeRevise").val($info.office);
187
			$("#addressRevise").val($info.address);
172
			$("#descp").val($info.descp);
188
			$("#descp").val($info.descp);
173
			//展示专家的学术领域
189
			//展示专家的学术领域
174
			subjectShow($info.subject);
190
			subjectShow($info.subject);
263
	$data.orgName = $("#orgName").val();
279
	$data.orgName = $("#orgName").val();
264
	$data.title = $("#title").val();
280
	$data.title = $("#title").val();
265
	$data.department = $("#department").val();
281
	$data.department = $("#department").val();
266
	console.log($data);
282
	$data.address=$("#addressRevise").val();
283
	$data.office=$("#officeRevise").val();	
267
	var userid = $.cookie("userid");
284
	var userid = $.cookie("userid");
268
	if (userid) {
285
	if (userid) {
269
		$data.id = userid;
286
		$data.id = userid;
271
	$.ajax({"url" : "../ajax/professor",
288
	$.ajax({"url" : "../ajax/professor",
272
		"type" : userid ? "PUT" : "POST",
289
		"type" : userid ? "PUT" : "POST",
273
		"success" : function(rdata) {
290
		"success" : function(rdata) {
274
			console.log(rdata);
291
			
275
			if (rdata.success) {
292
			if (rdata.success) {
276
				if (userid) {
293
				if (userid) {
277
					location.reload(true);
278
				} else {
294
				  	$.get("/ajax/professor/info/" + userid, function($data) {
295
				  		if ($data.success) {		
296
				  			var $info = $data.data;
297
				  			if ($info) {
298
				  				//展示专家的信息
299
				  				$(".modifybox").css("display","none");
300
				  				$(".infor-browse").css("display","block");
301
				  							$("#nameS").text($info.name);
302
				  							if($info.office) {
303
				  								$("#office").text($info.office+",");
304
				  							}
305
				  							if($info.title) {
306
				  								$("#titleS").text($info.title);	
307
				  							}
308
				  							if($info.department) {
309
				  								$("#industryS").text($info.department+",");
310
				  							}
311
				  							if($info.orgName) {
312
				  								$("#orgNameS").text($info.orgName);
313
				  							}
314
				  							if($info.address) {
315
				  								$("#address").text($info.address);
316
				  							}														
317
				  							//显示专家信息到保存数据
318
				  							$("#name").val($info.name);
319
				  							$("#title").val($info.title);
320
				  							$("#orgId").val($info.orgId);
321
				  							$("#orgName").val($info.orgName);
322
				  							$("#department").val($info.department);
323
				  							$("#officeRevise").val($info.office);
324
				  							$("#addressRevise").val($info.address);
325
				  					}
326
				  				}
327

328
				  		})
329
				}
330
				else {
279
					location.href = "information.html?id="+ rdata.data;
331
					location.href = "information.html?id="+ rdata.data;
280
				}
332
				}
281
			} else {
333
			} else {
988
function getProfessorData(){
1040
function getProfessorData(){
989
	$.get("/ajax/professor/info/" + userid, function($data) {
1041
	$.get("/ajax/professor/info/" + userid, function($data) {
990
	if ($data.success) {
1042
	if ($data.success) {
991
		console.log($data)
1043
		
992
	}
1044
	}
993
	});
1045
	});
994
}
1046
}

+ 13 - 2
src/main/webapp/js/workindex.js

12
			$("#nameS").text(data.data.name);
12
			$("#nameS").text(data.data.name);
13
			$("#allConsultCount").text(data.data.consultCount);
13
			$("#allConsultCount").text(data.data.consultCount);
14
			if(data.data.authentication){
14
			if(data.data.authentication){
15
				$(".modifyicon")[0].src="modifyicon"
15
				$(".modifyicon")[0].src="images/rz.png"
16
			}
16
			}
17
			else{
17
			else{
18
				$(".modifyicon").hide();
18
				$(".modifyicon")[0].src="images/rz.png";
19
				$(".modifyicon").css("background","rgba(0,0,0,0.2)")
19
			}
20
			}
20
			if(data.data.office) {
21
			if(data.data.office) {
21
				$("#office").text(data.data.office+",");
22
				$("#office").text(data.data.office+",");
816
								+ newConsultData["createTime"].substr(8,2)+ ":" +newConsultData["createTime"].substr(10,2));
817
								+ newConsultData["createTime"].substr(8,2)+ ":" +newConsultData["createTime"].substr(10,2));
817
						$("#myFlatConsultTitle").html(newConsultData["consultTitle"]);
818
						$("#myFlatConsultTitle").html(newConsultData["consultTitle"]);
818
						$("#myFlatConsultContent").html(newConsultData["consultContant"]);
819
						$("#myFlatConsultContent").html(newConsultData["consultContant"]);
820
						if(response.data.professor.hasHeadImage){
821
							$("#proImage").attr("src","images/head/"+response.data.professor.id+"_m.jpg");
822
						}else{
823
							$("#proImage").attr("src","images/default-photo.jpg");
824
						}
819
					}
825
					}
820
					else {
826
					else {
821
						$("#wbcon1").empty("");
827
						$("#wbcon1").empty("");
873
						$("#myFlatRelpyTitle").html(newReplyData["consult"]["consultTitle"]);
879
						$("#myFlatRelpyTitle").html(newReplyData["consult"]["consultTitle"]);
874
						
880
						
875
						$("#myFlatRelpyContent").html(newReplyData["tidingsContant"]);
881
						$("#myFlatRelpyContent").html(newReplyData["tidingsContant"]);
882
						if(response.data.professor.hasHeadImage){
883
							$("#proreplayImage").attr("src","images/head/"+response.data.professor.id+"_m.jpg");
884
						}else{
885
							$("#proreplayImage").attr("src","images/default-photo.jpg");
886
						}
876
					}
887
					}
877
					else {		$("#wbcon2").empty("")
888
					else {		$("#wbcon2").empty("")
878
							var height=$("#wbcon1").height();							
889
							var height=$("#wbcon1").height();							

+ 2 - 2
src/main/webapp/workindex.html

45
                    <div class="worktit">最新咨询<a class="worklinkbtn floatR" id="lookAllConsult">查看全部</a></div>
45
                    <div class="worktit">最新咨询<a class="worklinkbtn floatR" id="lookAllConsult">查看全部</a></div>
46
                    <div class="wbcon" id="wbcon1">
46
                    <div class="wbcon" id="wbcon1">
47
                        <div class="leftwb floatL">
47
                        <div class="leftwb floatL">
48
                            <a href="" class="wbimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a>
48
                            <a href="" class="wbimg"><img src="" width="100%" height="100%" id="proImage"></a>
49
                            <p id="myFlatProName">专家姓名</p>
49
                            <p id="myFlatProName">专家姓名</p>
50
                            <p id="myFlatProTitle"><span id="myReplyProOffice"></span><span id="myReplyProTitle"></span></p>
50
                            <p id="myFlatProTitle"><span id="myReplyProOffice"></span><span id="myReplyProTitle"></span></p>
51
                            <p id="myFlatProDepartment"><span id="myReplyProDepartment"></span><span id="myReplyProOrgName"></p>
51
                            <p id="myFlatProDepartment"><span id="myReplyProDepartment"></span><span id="myReplyProOrgName"></p>
70
                    <div class="worktit">最新回复<a class="worklinkbtn floatR" id="lookAllReply">查看全部</a></div>
70
                    <div class="worktit">最新回复<a class="worklinkbtn floatR" id="lookAllReply">查看全部</a></div>
71
                    <div class="wbcon" id="wbcon2">
71
                    <div class="wbcon" id="wbcon2">
72
                        <div class="leftwb floatL">
72
                        <div class="leftwb floatL">
73
                            <a href="" class="wbimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a>
73
                            <a href="" class="wbimg"><img src="" width="100%" height="100%" id="proreplayImage"></a>
74
                            <p id="myFlatReplyProName">专家姓名</p>
74
                            <p id="myFlatReplyProName">专家姓名</p>
75
                            <p id="myFlatReplyProTitle"><span id="myProOffice"></span><span id="myProTitle"></span></p>
75
                            <p id="myFlatReplyProTitle"><span id="myProOffice"></span><span id="myProTitle"></span></p>
76
                            <p id="myFlatReplyProDepartment"><span id="myProDepartment"></span><span id="myProOrgName"></p>
76
                            <p id="myFlatReplyProDepartment"><span id="myProDepartment"></span><span id="myProOrgName"></p>