Browse Source

个人修改页面修改时的问题,个人浏览的论文和专利显示

luyanan 7 years ago
parent
commit
452d0630cd
4 changed files with 127 additions and 95 deletions
  1. 22 13
      information.html
  2. 2 2
      js/common.js
  3. 92 70
      js/information.js
  4. 11 10
      js/userInforShow.js

+ 22 - 13
information.html

@ -78,21 +78,21 @@
78 78
										<div class="col-w-6 citybox2">
79 79
											<span class="frmcontype" id="Province">
80 80
	                                        	<em class="mr_sj"></em>
81
	                                            <i class="mr_show" id="oprovince">请选择所在省/直辖市</i>
81
	                                            <i class="mr_show" id="oprovince">请选择省/直辖市</i>
82 82
	                                            <ul>
83
	                                                <li><a href="javascript:void(0)" alt="请选择所在省/直辖市">请选择所在省/直辖市</a></li>
83
	                                                <li><a href="javascript:void(0)" alt="请选择省/直辖市">请选择省/直辖市</a></li>
84 84
	                                            </ul>
85
	                                            <input type="hidden" name="cho_Province" value="请选择所在省/直辖市">
85
	                                            <input type="hidden" name="cho_Province" value="请选择省/直辖市">
86 86
	                                        </span>
87 87
										</div>
88 88
										<div class="col-w-6 citybox2">
89 89
											<span class="frmcontype floatR" id="City" >
90 90
	                                       		<em class="mr_sj"></em>
91
	                                            <i class="mr_show" id="ocity">请选择所在城市</i>
91
	                                            <i class="mr_show" id="ocity">请选择城市</i>
92 92
	                                            <ul>
93
	                                                <li><a href="javascript:void(0)" alt="请选择所在城市">请选择所在城市</a></li>
93
	                                                <li><a href="javascript:void(0)" alt="请选择城市">请选择城市</a></li>
94 94
	                                            </ul>
95
	                                            <input type="hidden" name="cho_City" value="请选择所在城市 ">
95
	                                            <input type="hidden" name="cho_City" value="请选择城市 ">
96 96
	                                        </span>
97 97
										</div>
98 98
									</form> 
@ -298,12 +298,19 @@
298 298
		var c = $(this).val();
299 299
		if(flag == 1) {
300 300
			if(c) {
301
				var ye = new Date().getFullYear();
302
				var sroTop = (ye - parseInt(c)) * 32;
303
				$(this).siblings(".mr_calendar_ym").show();
304
				$(this).siblings(".mr_calendar_ym").find(".full_year").scrollTop(sroTop);
305
				$(this).siblings(".mr_calendar_ym").find(".yearli:contains('" + c + "')").addClass("active").siblings().removeClass("active");
306
				return false;
301
				if (c == "至今") {
302
					$(this).siblings(".mr_calendar_ym").show();
303
					$(this).siblings(".mr_calendar_ym").find(".yearli:contains('" + c + "')").addClass("active").siblings().removeClass("active");
304
					return false;
305
				} else{
306
					var ye = new Date().getFullYear();
307
					var sroTop = (ye - parseInt(c)) * 32;
308
					$(this).siblings(".mr_calendar_ym").show();
309
					$(this).siblings(".mr_calendar_ym").find(".full_year").scrollTop(sroTop);
310
					$(this).siblings(".mr_calendar_ym").find(".yearli:contains('" + c + "')").addClass("active").siblings().removeClass("active");
311
					return false;
312
				}
313
				
307 314
			} else {
308 315
				var ye = new Date().getFullYear();
309 316
				$(this).siblings(".mr_calendar_ym").show();
@ -371,7 +378,6 @@
371 378
		return false;
372 379
	})
373 380
	$("body").on("click", ".mli", function() {
374
		
375 381
		var yearli = $(this).parents(".mr_month").siblings(".mr_year").children(".active").text();
376 382
		console.log(yearli);
377 383
		if($(this).text() < 10) {
@ -407,6 +413,9 @@
407 413
				$(".full_year>li:contains(" + i + ")").addClass("active");
408 414
			}
409 415
		}
416
			//$(".mr_year li:first-child").before('<li class="ymli">至今</li>');
417
			//$(".full_year li:first-child").before('<li class="ymli">至今</li>');
418
		
410 419
	}
411 420

412 421
	function month() {

+ 2 - 2
js/common.js

@ -288,7 +288,7 @@ $(document).on("click", "#Province li a", function() {
288 288
	$(this).parent().parent().parent().find('.mr_show').text(aVal);
289 289
	$(this).parent().parent().parent().find('input[name=cho_Province]').val(aVal);
290 290
291
	if($("#oprovince").text() == "请选择所在省/直辖市" || $("#oprovince").text() == "请选择省/直辖市") {
291
	if($("#oprovince").text() == "请选择省/直辖市") {
292 292
		$("#oprovince").removeClass("mr_select");
293 293
		$("#ocity").removeClass("mr_select");
294 294
	} else {
@ -301,7 +301,7 @@ $(document).on("click", "#City li a", function() {
301 301
	var aVal = $(this).text();
302 302
	$(this).parent().parent().parent().find('.mr_show').text(aVal);
303 303
	$(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
304
	if($("#ocity").text() == "请选择所在城市" || $("#ocity").text() == "请选择城市") {
304
	if($("#ocity").text() == "请选择城市") {
305 305
		$("#ocity").removeClass("mr_select");
306 306
	} else {
307 307
		$("#ocity").addClass("mr_select");

+ 92 - 70
js/information.js

@ -7,7 +7,13 @@ $(function() {
7 7
	var userid = $.cookie("userid");
8 8
	if(userid) {
9 9
		//获取数据,填充页面
10
		$.get("/ajax/professor/info/" + userid, function($data) {
10
		getInfo(userid);
11
	} else {
12
		location.href = "login.html";
13
		return;
14
	}
15
	function getInfo(InfoId){
16
		$.get("/ajax/professor/info/" + InfoId, function($data) {
11 17
			if($data.success) {
12 18
				console.log($data);
13 19
				var $info = $data.data;
@ -54,19 +60,18 @@ $(function() {
54 60
					//编辑显示专家信息到保存数据
55 61
					$("#name").text($info.name);
56 62
					$("#title").val($info.title);
57
					$("#orgId").val($info.orgId);
58 63
					$("#orgName").val($info.orgName);
59 64
					$("#department").val($info.department);
60 65
					$("#officeRevise").val($info.office);
61 66
					$("#Province .mr_show").text($info.province);
62 67
					$("#City .mr_show").text($info.address);
63 68
					//省份城市颜色
64
					if($("#oprovince").text()=="请选择企业总部所在省或直辖市"){
69
					if($("#oprovince").text()=="请选择省/直辖市"){
65 70
						$("#oprovince").removeClass("mr_select");
66 71
					}else{
67 72
						$("#oprovince").addClass("mr_select");
68 73
					}
69
					if($("#ocity").text()=="请选择企业总部所在城市"){
74
					if($("#ocity").text()=="请选择城市"){
70 75
						$("#ocity").removeClass("mr_select");
71 76
					}else{
72 77
						$("#ocity").addClass("mr_select");
@ -101,14 +106,14 @@ $(function() {
101 106
						honorShow($info.honors);
102 107
					}
103 108
					yearAdd();
109
					$(".StopMonth").next(".mr_calendar_ym").find(".mr_year li:first-child").before('<li class="ymli">至今</li>');
110
					$("#eduUl").find(".full_year li:first-child").before('<li class="ymli">至今</li>');
104 111
					month();
105 112
					
113
					
106 114
				}
107 115
			}
108 116
		});
109
	} else {
110
		location.href = "login.html";
111
		return;
112 117
	}
113 118
	hotKey(".oinput");//
114 119
	//////////////////基本信息增删改查相关开始//////////////
@ -137,7 +142,6 @@ $(function() {
137 142
//				return;
138 143
//			}
139 144
//		}
140
		
141 145
		var mail=$("#moileMail").val();
142 146
		if(trim(mail)){
143 147
		var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
@ -152,19 +156,19 @@ $(function() {
152 156
	function personUpdata() {
153 157
		var $data = {};
154 158
		$data.name = $("#name").text();
155
		$data.orgId = $("#orgId").val();
156 159
		$data.orgName = $("#orgName").val();
157 160
		$data.title = $("#title").val();
158 161
		$data.department = $("#department").val();
162
		$data.office = $("#officeRevise").val();
159 163
		$data.phone=$("#mobilePhone").val();
160 164
		$data.email=$("#moileMail").val();
161
		if($("#Province input[name=cho_Province]").val() != "请选择所在省/直辖市") {
165
		if($("#Province input[name=cho_Province]").val() != "请选择省/直辖市") {
162 166
			$data.province = $("#Province input[name=cho_Province]").val(); //省
163 167
		}
164
		if($("#City input[name=cho_City]").val() != "请选择所在城市") {
168
		if($("#City input[name=cho_City]").val() != "请选择城市") {
165 169
			$data.address = $("#City input[name=cho_City]").val(); //市
166 170
		}
167
		$data.office = $("#officeRevise").val();
171
		
168 172
		var userid = $.cookie("userid");
169 173
		if(userid) {
170 174
			$data.id = userid;
@ -182,13 +186,7 @@ $(function() {
182 186
									//展示专家的信息
183 187
									$(".modifybox").css("display", "none");
184 188
									$(".coninfocon").css("display", "block");
185
									
186
									$("#office").text("");
187
									$("#titleS").text("");
188
									$("#industryS").text("");
189
									$("#orgNameS").text("");
190
									$("#address").text("");
191
									$("#nameS").text($info.name);
189

192 190
									if($info.phone){
193 191
										$("#phone").text("联系电话:" +$info.phone);
194 192
										$("#mobilePhone").val($info.phone);
@ -203,47 +201,51 @@ $(function() {
203 201
										$("#mail").text("");
204 202
										$("#moileMail").val("");
205 203
									}
206
									if($info.office) {
207
										if($info.title) {
208
											$("#office").text($info.office + ",");
209
										} else {
210
											$("#office").text($info.office);
211
										}
212

213
									}
214 204
									if($info.title) {
215
										$("#titleS").text($info.title);
216
									}
217
									if($info.department) {
218
										if($info.orgName) {
219
											$("#industryS").text($info.department + ",");
220
										} else {
221
											$("#industryS").text($info.department);
222
										}
223
									}
224
									if($info.orgName) {
225
										$("#orgNameS").text($info.orgName);
205
										$("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
226 206
									}
227 207
									if($info.address) {
228
										$("#address").text($info.address);
208
										$("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
209
									}
210
									var proOther="";
211
									if($info.orgName){
212
										if($info.department){
213
											if($info.office){
214
												proOther = $info.orgName + "," + $info.department + "," + $info.office
215
											}else{
216
												proOther = $info.orgName + "," + $info.department
217
											}
218
										}else{
219
											proOther = $info.orgName
220
										}
229 221
									}
222
									$("#proOther").text(proOther);
230 223
									//显示专家信息到保存数据
231 224
									$("#name").text($info.name);
232 225
									$("#title").val($info.title);
233
									$("#orgId").val($info.orgId);
234 226
									$("#orgName").val($info.orgName);
235 227
									$("#department").val($info.department);
236 228
									$("#officeRevise").val($info.office);
237 229
									//省
238
									//console.log($info.province);
239 230
									$("#Province .mr_show").text("");
240 231
									$("#Province input[name=cho_Province]").val($info.province);
241 232
									$("#Province .mr_show").text($info.province);
242 233
									//市
243
									//console.log($info.address);
244 234
									$("#City .mr_show").text("");
245 235
									$("#City input[name=cho_City]").val($info.address);
246 236
									$("#City .mr_show").text($info.address);
237
									
238
									//省份城市颜色
239
									if($("#oprovince").text() == "请选择省/直辖市") {
240
										$("#oprovince").removeClass("mr_select");
241
									} else {
242
										$("#oprovince").addClass("mr_select");
243
									}
244
									if($("#ocity").text() == "请选择城市") {
245
										$("#ocity").removeClass("mr_select");
246
									} else {
247
										$("#ocity").addClass("mr_select");
248
									}
247 249

248 250
								}
249 251
							}
@ -296,6 +298,8 @@ $(function() {
296 298
	//////////////////学术领域增删改查相关开始//////////////
297 299
	//填充学术领域
298 300
	var subjectShow = function(data) {
301
		$("#subjectShow").html("");
302
		$("#subjectList").html("");
299 303
		if(data != undefined && data.length != 0) {
300 304
			var subs = new Array();
301 305
			if(data.indexOf(',')) {
@ -361,6 +365,8 @@ $(function() {
361 365
	//////////////////应用行业增删改查相关开始//////////////
362 366
	//填充应用行业
363 367
	var industryShow = function(data) {
368
		$("#industryList").html("");
369
		$("#industryShow").html("");
364 370
		if(data != undefined && data.length != 0) {
365 371
			var subs = new Array();
366 372
			if(data.indexOf(',')) {
@ -428,6 +434,8 @@ $(function() {
428 434
	//////////////////研究方向增删改查相关开始//////////////
429 435
	//填充研究方向
430 436
	var researchAreaShow = function($datas, $datarecords) {
437
		$("#researchAreaShow").html("");
438
		$("#researchAreaList").html("");
431 439
		if($datas != undefined && $datas.length != 0) {
432 440
			$("#researchAreaList").empty();
433 441
			for(var i = 0; i < $datas.length; ++i) {
@ -554,6 +562,7 @@ $(function() {
554 562
	//////////////////教育背景增删改查相关开始//////////////
555 563
	//填充教育背景
556 564
	var eduBgShow = function(data) {
565
		$("#eduUl").html("");
557 566
		eduFil("#eduUl");
558 567
		if(data.length > 0) {
559 568
			for(var i = 0; i < data.length; i++) {
@ -609,6 +618,7 @@ $(function() {
609 618
				var $string=$(string)
610 619
				$("#eduUl").append($string);
611 620
				$string.find(".mr_btn").val(data[i].degree);
621
				$(".full_year li:first-child").before('<li class="yearli">至今</li>');
612 622
			}
613 623
			
614 624
		}
@ -698,7 +708,6 @@ $(function() {
698 708
							if($data.success) {
699 709
								$("#eduUl").empty("");
700 710
								eduBgShow($data.data.edus);
701
								yearAdd();
702 711
							}
703 712
						});
704 713
					} else {
@ -712,6 +721,7 @@ $(function() {
712 721
	//////////////////工作经历增删改查相关开始///////////////
713 722
	//填充工作经历
714 723
	var timeJobShow = function(data) {
724
		$("#timeJobShow").html("");
715 725
		jobFil("#timeJobShow");
716 726
		if(data.length > 0) {
717 727
			for(var i = 0; i < data.length; i++) {
@ -746,11 +756,11 @@ $(function() {
746 756
					string += '<li><span class="col-w-2 lableSpan"><span class="requiredcon">* </span>职位:</span><div class="col-w-10">'
747 757
						string += '<input type="text" class="frmcontype jobTitle" placeholder="请填写担任的职位" value="' + data[i].title + '" /></div></li>'
748 758
					string += '<li><span class="col-w-2 lableSpan">任职时间:</span><div class="col-w-9"><form action="" class="col-w-12" name="formT">'
749
						string += '<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype startMonth" flag="2" difference="1" placeholder="请选择起始时间" value="' + sDate + '" />'
759
						string += '<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype StartMonth" flag="2" difference="1" placeholder="请选择起始时间" value="' + sDate + '" />'
750 760
					 		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"></ul><ul class="mr_month"></ul></div></div>'
751 761
						string +='<div class="col-w-1 alignCenter">至</div>'
752
						string +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype stopMonth" flag="2" difference="2" placeholder="请选择结束时间" value="' + eDate + '" />'
753
					  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"><li class="ymli">至今</li></ul><ul class="mr_month"></ul></div></div>'
762
						string +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype StopMonth" flag="2" difference="2" placeholder="请选择结束时间" value="' + eDate + '" />'
763
					  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"></ul><ul class="mr_month"></ul></div></div>'
754 764
						string +='</form></div></li>'
755 765
					string +='<li class="saveBtn"><span class="col-w-2">&nbsp;</span><div class="col-w-10">'
756 766
						string +='<button type="button" class="frmcontype btnModel saveGo">保存</button>'
@ -770,11 +780,11 @@ $(function() {
770 780
			string += '<li><span class="col-w-2 lableSpan"><span class="requiredcon">* </span>职位:</span><div class="col-w-10">'
771 781
				string += '<input type="text" class="frmcontype jobTitle" placeholder="请填写担任的职位" /></div></li>'
772 782
			string += '<li><span class="col-w-2 lableSpan">任职时间:</span><div class="col-w-9"><form action="" class="col-w-12" name="formT">'
773
				string += '<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype startMonth" flag="2" difference="1" placeholder="请选择起始时间" />'
783
				string += '<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype StartMonth" flag="2" difference="1" placeholder="请选择起始时间" />'
774 784
			 		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"></ul><ul class="mr_month"></ul></div></div>'
775 785
				string +='<div class="col-w-1 alignCenter">至</div>'
776
				string +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype stopMonth" flag="2" difference="2" placeholder="请选择结束时间" />'
777
			  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"><li class="ymli">至今</li></ul><ul class="mr_month"></ul></div></div>'
786
				string +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype StopMonth" flag="2" difference="2" placeholder="请选择结束时间" />'
787
			  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"> </ul><ul class="mr_month"></ul></div></div>'
778 788
				string +='</form></div></li>'
779 789
			string +='<li class="saveBtn"><span class="col-w-2">&nbsp;</span><div class="col-w-10">'
780 790
				string +='<button type="button" class="frmcontype btnModel saveGo">保存</button>'
@ -810,8 +820,8 @@ $(function() {
810 820
	$("#timeJobShow").on("click", ".saveGo", function() {
811 821
		var length1 = trim($(this).parents(".modifybox").find(".jobCompany").val());
812 822
		var length2 = trim($(this).parents(".modifybox").find(".jobTitle").val());
813
		var length3 = trim($(this).parents(".modifybox").find(".startMonth").val());
814
		var length4 = trim($(this).parents(".modifybox").find(".stopMonth").val());
823
		var length3 = trim($(this).parents(".modifybox").find(".StartMonth").val());
824
		var length4 = trim($(this).parents(".modifybox").find(".StopMonth").val());
815 825
		var length5 = trim($(this).parents(".modifybox").find(".jobdepartment").val());
816 826
		
817 827
		if(length1.length>50){ $.MsgBox.Alert("提示", "机构名称不得超过50个字");return;}
@ -842,8 +852,8 @@ $(function() {
842 852
		$data.professorId = userid;
843 853
		$data.company = $(this).parents(".modifybox").find(".jobCompany").val();
844 854
		$data.department = $(this).parents(".modifybox").find(".jobdepartment").val();
845
		var s = $(this).parents(".modifybox").find(".startMonth").val();
846
		var st = $(this).parents(".modifybox").find(".stopMonth").val();
855
		var s = $(this).parents(".modifybox").find(".StartMonth").val();
856
		var st = $(this).parents(".modifybox").find(".StopMonth").val();
847 857
		if(s) {
848 858
			$data.startMonth = s.substr(0, 4) + s.substr(5, 6);
849 859
		}
@ -868,7 +878,7 @@ $(function() {
868 878
						if($data.success) {
869 879
							$("#timeJobShow").empty("");
870 880
							timeJobShow($data.data.jobs);
871
							yearAdd();
881
							//yearAdd();
872 882
							month();
873 883
						}
874 884
					});
@ -883,6 +893,7 @@ $(function() {
883 893
	//////////////////项目经历增删改查相关开始///////////////
884 894
	//填充项目经历
885 895
	var projectShow = function(data) {
896
		$("#projectShow").html("");
886 897
		projectFil("#projectShow")
887 898
		if(data.length > 0) {
888 899
			for(var i = 0; i < data.length; i++) {
@ -912,7 +923,7 @@ $(function() {
912 923
				 		stringHtml +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"></ul><ul class="mr_month"></ul></div></div>'
913 924
					stringHtml +='<div class="col-w-1 alignCenter">至</div>'
914 925
					stringHtml +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype project StopMonth" flag="2" difference="2" placeholder="请选择结束时间" value="' + data[i].stopMonth + '" />'
915
				  		stringHtml +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"><li class="ymli">至今</li></ul><ul class="mr_month"></ul></div></div>'
926
				  		stringHtml +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"> </ul><ul class="mr_month"></ul></div></div>'
916 927
					stringHtml +='</form></div></li>'
917 928
				stringHtml += '<li><span class="col-w-2 lableSpan">项目描述:</span><div class="col-w-10">'
918 929
					stringHtml += '<div class="msgContbox"><textarea class="frmcontype projectDescp" placeholder="请填写项目描述">' + data[i].descp + '</textarea></div></div></li>'
@ -935,7 +946,7 @@ $(function() {
935 946
			 		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"></ul><ul class="mr_month"></ul></div></div>'
936 947
				string +='<div class="col-w-1 alignCenter">至</div>'
937 948
				string +='<div class="col-w-5" style="position:relative"><input type="text" class="date-btn frmcontype project StopMonth" flag="2" difference="2" placeholder="请选择结束时间" />'
938
			  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"><li class="ymli">至今</li></ul><ul class="mr_month"></ul></div></div>'
949
			  		string +='<div class="mr_calendar_ym clearfix"><ul class="mr_year"> </ul><ul class="mr_month"></ul></div></div>'
939 950
				string +='</form></div></li>'
940 951
			string += '<li><span class="col-w-2 lableSpan">项目描述:</span><div class="col-w-10">'
941 952
				string += '<div class="msgContbox"><textarea class="frmcontype projectDescp" placeholder="请填写项目描述"></textarea></div></div></li>'
@ -1012,8 +1023,8 @@ $(function() {
1012 1023
						if($data.success) {
1013 1024
							$("#projectShow").empty("");
1014 1025
							projectShow($data.data.projects);
1015
							yearAdd();
1016
							month();
1026
//							yearAdd();
1027
//							month();
1017 1028
						}
1018 1029
					});
1019 1030
				} else {
@ -1026,6 +1037,7 @@ $(function() {
1026 1037
	
1027 1038
	//////////////////荣誉奖项增删改查相关开始///////////////
1028 1039
	var honorShow = function(data) {
1040
		$("#honorShow").html("");
1029 1041
		hounerFil("#honorShow");
1030 1042
		if(data.length > 0) {
1031 1043
			for(var i = 0; i < data.length; i++) {
@ -1122,7 +1134,7 @@ $(function() {
1122 1134
						if($data.success) {
1123 1135
							$("#honorShow").empty("");
1124 1136
							honorShow($data.data.honors);
1125
							yearAdd();
1137
							//yearAdd();
1126 1138
						}
1127 1139
					});
1128 1140
				} else {
@ -1134,20 +1146,30 @@ $(function() {
1134 1146
	//////////////////荣誉奖项增删改查相关结束///////////////
1135 1147

1136 1148
	//////////////////相关操作按钮///////////////
1137
	//获取点击那个编辑
1138
	$("#container .edit").click(function() {
1139
		var edit = $(".edit").index(this);
1140
		$(".coninfocon").eq(edit).hide();
1141
		$(".modifybox").eq(edit).show();
1142
		if(edit == 0){
1143
			$(".head-left").css("top","30px");
1144
		}else{
1149
	//用户基本信息编辑
1150
	$(".headconBox").on("click",".proEdit",function() {
1151
		$(this).parents(".coninfocon").siblings(".modifybox").show();
1152
		$(this).parents(".coninfocon").hide();
1153
		$(".head-left").css("top","30px");
1154
		//点击取消的操作
1155
		$(".btnCancel").click(function() {
1145 1156
			$(".head-left").css("top","");
1146
		}
1157
			$(this).parents(".modifybox").siblings(".coninfocon").show();
1158
			$(this).parents(".modifybox").hide();
1159
			getInfo(userid);
1160

1161
		});
1162
	});
1163
	//获取点击那个编辑
1164
	$(".leftconBox").on("click",".edit",function() {
1165
		$(this).parents(".coninfobox").find(".modifybox").show();
1166
		$(this).parents(".coninfobox").find(".coninfocon").hide();
1147 1167
		//点击取消的操作
1148 1168
		$(".btnCancel").click(function() {
1149
			$(".modifybox").eq(edit).hide();
1150
			$(".coninfocon").eq(edit).show();
1169
			$(this).parents(".coninfobox").find(s(".coninfobox").find(".modifybox").hide();
1170
			$(this).parents(".coninfobox").find((".coninfobox").find(".coninfocon").show();
1171
			getInfo(userid);
1172

1151 1173
		});
1152 1174
	});
1153 1175
	$(".addedit").on("click", function() {//点击添加按钮

+ 11 - 10
js/userInforShow.js

@ -750,18 +750,20 @@ $(function() {
750 750
			timeout: 10000, //超时设置
751 751
			success: function(data) {
752 752
				if(data.success) {
753
					var madiaHead ='/images/default-artical.jpg';
754 753
					var dataStr=data.data.data;
755 754
					if(dataStr.length > 0){
756 755
						$("#showPatent").parents(".coninfobox").removeClass("displayNone");
757 756
						$("#item1user>.nodatabox").addClass("displayNone");
758 757
						for(var i = 0; i < dataStr.length; i++) {
758
							if(!dataStr[i].reqPerson){
759
								dataStr[i].reqPerson="";
760
							}
759 761
							var strAdd = '';
760 762
							strAdd += '<li><a traget="_blank" href="patentShow.html?patentId='+ dataStr[i].id +'" class="flexCenter urlgo">';
761
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
762
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].name +'</p>';
763
							strAdd += '<p class="h1Font ellipsisSty-2">发明人:'+ dataStr[i].authors +'</p>';
764
							strAdd += '<p class="h1Font ellipsisSty-2">申请人:'+ reqPerson +'</p>';
763
							strAdd += '<div class="madiaHead patentHead"></div>';
764
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
765
							strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors +'</p>';
766
							strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
765 767
							strAdd += '</div>';
766 768
							strAdd += '</a></li>';
767 769
							
@ -808,7 +810,6 @@ $(function() {
808 810
			timeout: 10000, //超时设置
809 811
			success: function(data) {
810 812
				if(data.success) {
811
					var madiaHead ='/images/default-artical.jpg';
812 813
					var dataStr=data.data.data;
813 814
					if(dataStr.length > 0){
814 815
						$("#showPaper").parents(".coninfobox").removeClass("displayNone");
@ -828,10 +829,10 @@ $(function() {
828 829
							
829 830
							var strAdd = '';
830 831
							strAdd += '<li><a traget="_blank" href="paperShow.html?paperId='+ dataStr[i].id +'" class="flexCenter urlgo">';
831
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
832
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].name +'</p>';
833
							strAdd += '<p class="h1Font ellipsisSty-2">作者:'+ dataStr[i].authors +'</p>';
834
							strAdd += '<p class="h1Font ellipsisSty-2">期刊:'+ moreInf +'</p>';
832
							strAdd += '<div class="madiaHead paperHead"></div>';
833
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
834
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors +'</p>';
835
							strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
835 836
							strAdd += '</div>';
836 837
							strAdd += '</a></li>';
837 838