Browse Source

浏览页面咨询改联系

luyanan 7 years ago
parent
commit
b34a59fed2

+ 0 - 156
companybrowinfor.html

@ -1,156 +0,0 @@
1
 <!DOCTYPE html>
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>浏览企业信息-科袖网</title>
8
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9
<link href="css/bootstrap.min.css" rel="stylesheet">
10
<link rel="stylesheet" href="css/reset.css" />
11
<link type="text/css" href="css/common.css" rel="stylesheet">
12
<link type="text/css" href="css/index.css" rel="stylesheet">
13

14
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
15
</head>
16

17
<body>
18
<header id="header">
19
	<script src="js/header.js"></script>
20
</header>
21
<div id="container">
22
	<div class="content" style="padding-bottom:20px;">
23
		<div class="information-head clearfix">
24
			<div class="head-org headRadius"><img src="" width="100%" id="oimg"></div>	
25
			<div class="head-center">
26
				<div class="infor-browse cmpBasic">
27
					<div class="h1Font" style="margin-top: 26px;"><span id="comName"></span><em class="authiconNew" title="" id="authS"></em></div>
28
	        		<div class="h4Font cmpBasic"><span id="orgType"></span><span id="qualificationList"></span><span id="createTime"></span></div>
29
	        		<div class="h4Font" id="inteAddress"></div>
30
	        		<div class="h4Font" id="ocity"></div>
31
				</div>
32
			</div>
33
		</div>
34
		<div class="information-content">
35
			<div class="content-left" >
36
            	<div class="menublock">
37
                    <div class="left-title">企业信息</div>
38
					<a class="subsidebar">企业简介</a>
39
					<a class="subsidebar">所属行业</a>
40
					<a class="subsidebar">专注领域</a>
41
					<a class="subsidebar">企业资质</a>
42
					<a class="subsidebar">企业用户</a>
43
                </div>
44
			</div>
45
			<div class="content-right">
46
				<div class="right-box introduction" id="reA">
47
								<div class="right-title"><span>科研文章</span></div>
48
								<div class="infor-browse">
49
									<div class="shareabout shareabout1" style="margin: 0 30px;">
50
										<div class="sharesrcbox" style="width:642px;">
51
											<div class="sharescrollbox Acrollbox">
52
												<ul class="shareshow otherRes clearfix" id="reachArticle">
53
												
54
												</ul>
55
											</div>
56
										</div>
57
										<span class="resouprev resoubtn articalbtn"></span>
58
										<span class="resounext resoubtn articalbtn"></span>
59
									</div>
60
								</div>
61
							</div>
62
				<div class="right-box introduction">
63
					<div class="right-title"><span>企业简介</span></div>
64
					<div class="infor-browse">
65
						<div class="editbox" style="width:auto; margin:0 35px;">
66
							 
67
						</div>
68
					</div>
69
				</div>
70
				<div class="right-box introduction">
71
					<div class="right-title"><span>所属行业</span></div>
72
					<div class="infor-browse">
73
						<ul class="edu-about edu-infor" id="industryShow">
74
							<!--<li>3333</li>
75
							<li>3333</li>-->
76
						</ul>
77
					</div>
78
				</div>
79
				<div class="right-box introduction">
80
					<div class="right-title"><span>专注领域</span></div>
81
					<div class="infor-browse">
82
						<div class="listbox btn-marL" id="subjectShow">
83
							<!--<div class="acad">领域一</div>
84
							<div class="acad">领域二</div>-->
85
						</div>
86
						<div class="clear"></div>
87
					</div>
88
				</div>
89
				<div class="right-box introduction">
90
					<div class="right-title"><span>企业资质</span></div>
91
					<div class="infor-browse">
92
						<ul class="edu-about edu-infor edu-infor2" id="qiye">
93
							<!--<li>3333</li>
94
							<li>3333</li>-->
95
						</ul>
96
					</div>
97
				</div>
98
				<div class="right-box introduction">
99
					<div class="right-title"><span>企业用户</span></div>
100
					<div class="infor-browse">
101
						<div class="staffDlist cmpStaff">
102
	                        <dl class="clearfix" id="userList">
103
	                        	<!--<dd>
104
	                        		<div class="staffChild">
105
	                        			<img class="headRadius" src="images/default-photo.jpg" width="100%" />
106
	                        		</div>
107
	                        		<div class="h4Font"><span>用户名称</span></div>
108
					            	<div class="h4Font"><span>职称</span> ,<span>职位</span></div>
109
	                        	</dd>
110
	                        	-->
111
	                        	
112
	                        </dl>
113
	                    </div>
114
					</div>
115
	            </div>
116
				
117
			</div>
118
		</div>		
119
	</div>
120
</div>
121
<footer>
122
	<script type="text/javascript" src="js/footer.js"></script>
123
</footer>
124

125
<script type="text/javascript" src="js/jquery.cookie.js"></script>
126
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
127
<script type="text/javascript" src="js/common.js"></script>
128
<script type="text/javascript" src="cmp-portal/js/companybrowinfor.js"></script>
129
<script type="text/javascript">
130
	//拿到点击的顺序,然后求出局文档的距离
131
	$(".subsidebar").mouseenter(function(){
132
		var dd=$(this)[0].className;
133
		if(dd!="subsidebar subcolor"){
134
			$(this).css("background","#efefef");
135
		}
136
	}).mouseleave(function(){
137
		$(this).css("background","")
138
	});
139
	//专家信息点击换背景颜色
140
	$(".subsidebar").click(function() {
141
		$(".subsidebar").removeClass("subcolor");
142
		$(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
143
	});
144
	$(".subsidebar").click(function() {
145
		var index = $(".subsidebar").index(this)+1;
146
        //console.log(index)
147
		var offset = $(".introduction").eq(index).offset();
148
		$("body,html").animate({
149
			scrollTop: offset.top - 80 + "px"
150
		}, 1000);
151
	}).mousedown(function(){
152
	  	$(this).css("background","");
153
	});
154
</script>
155
</body>
156
</html>

BIN
images/UpDown.png


BIN
images/addclick.png


BIN
images/default-icon.jpg


BIN
images/default-icon1.jpg


BIN
images/edit.png


BIN
images/home_icon_fangtan_nor.png


BIN
images/home_icon_hezuoqiye_nor.png


BIN
images/home_icon_hezuoqiye_nor2.png


BIN
images/home_icon_remenlingyu_nor.png


BIN
images/home_icon_remenzhuanjia_nor.png


BIN
images/icon-unauth.png


BIN
images/madify.png


BIN
images/mailIcon.png


BIN
images/mailIcon2.png


BIN
images/more-white.png


BIN
images/move.png


BIN
images/nextR.png


BIN
images/onauth.png


BIN
images/order.png


BIN
images/porfile_icon_qiye_hig.png


BIN
images/progressing.png


BIN
images/requiredicon.png


BIN
images/select.png


BIN
images/selected.png


BIN
images/share.png


+ 0 - 286
information-brow.html

@ -1,286 +0,0 @@
1
<!DOCTYPE html>
2
<html>
3
4
	<head>
5
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
8
		<title>浏览用户信息-科袖网</title>
9
		<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
10
		<link href="css/bootstrap.min.css" rel="stylesheet">
11
		<link rel="stylesheet" href="css/reset.css" />
12
		<link rel="stylesheet" type="text/css" href="css/style.css" />
13
		<link type="text/css" href="css/common.css" rel="stylesheet">
14
		<link type="text/css" href="css/index.css" rel="stylesheet">
15
		<link type="text/css" href="css/workspace.css" rel="stylesheet">
16
		<link type="text/css" href="css/popup.css" rel="stylesheet">
17
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
18
	</head>
19
20
	<body>
21
		<!--研究方向详情页面-->
22
		<div class="blackcover resAreaCover" style="display: none;">
23
			<div class="attentionBox">
24
				<div class="researchArea" id="subArea">研究方向文字很长,之前页面显示不下,在这里就能显示完整,全部都显示出来</div>
25
				<div class="attentsCon resAreaCon">
26
					<p class="littip">以下用户认可了他的研究</p>
27
					<ul class="attentList">
28
					</ul>
29
				</div>
30
				<div style="height: 20px;"></div>
31
				<span class="workclose" id="workclose"></span>
32
			</div>
33
		</div>
34
		<!--头部-->
35
		<header id="header">
36
			<script src="js/header.js"></script>
37
		</header>
38
		<div id="container">
39
			<div class="content" style="padding-bottom:120px;">
40
				<div class="information-head clearfix">
41
					<div class="head-left userRadius">
42
						<a><img id="headImage"></a>
43
					</div>
44
					<div class="head-center">
45
						<div class="infor-browse">
46
							<a class="named proName" id="nameS"></a>
47
							<a class="authiconNew proModify" style="top:0"></a>
48
							<div class="position proPosition"><span id="office"></span ><span id="titleS"></span ></div>				
49
							<div class="science proScience"><span id="industryS"></span ><span id="orgNameS"></span ></div>			
50
							<div class="address proAddress" id="address"></div>					
51
						</div>
52
						<div class="coulstbtn floatL" style="position: absolute;bottom: 20px;">
53
							<span id="conbtn">咨询</span>
54
							<span class="attentBtn" id="attentBtn"><em></em><i>关注</i></span>
55
							<span class="shareWeixin" style="display:inline-block;position: relative;">分享至微信
56
								<div class="shareCode clearfix">
57
									<div class="floatL" id="qrcode"></div>
58
									<div class="shareWord floatR">
59
										<p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p>
60
									</div>
61
								</div>
62
							</span>
63
						</div>
64
65
						</div>
66
						<div class="head-right headRadius">
67
							<a id="organ"><img id="orgImage"></a>
68
						</div>
69
					</div>
70
					<div class="information-content">
71
						<div class="content-left">
72
							<div class="menublock">
73
								<div class="left-title">个人信息</div>
74
								<a href="#infor1" class="subsidebar">个人简介</a>
75
								<a href="#infor2" class="subsidebar">学术领域</a>
76
								<a href="#infor3" class="subsidebar">研究方向</a>
77
								<a href="#infor4" class="subsidebar">应用行业</a>
78
								<a href="#infor5" class="subsidebar">教育背景</a>
79
								<a href="#infor6" class="subsidebar">工作经历</a>
80
								<a href="#infor7" class="subsidebar">项目经历</a>
81
								<a href="#infor8" class="subsidebar">著作、论文、文章</a>
82
								<a href="#infor9" class="subsidebar">专利</a>
83
								<a href="#infor10" class="subsidebar">荣誉及奖项</a>
84
							</div>
85
							<div class="menublock yesshow" style="display: none;">
86
								<div class="left-title">合作机会</div>
87
								<a href="#infor11" class="subsidebar">研发资源</a>
88
								<a href="#infor12" class="subsidebar">合作历史及评价</a>
89
							</div>
90
						</div>
91
						<div class="content-right">
92
							<div class="right-box introduction" style="display: none;" id="reA">
93
								<div class="right-title"><span>科研文章</span></div>
94
								<div class="infor-browse">
95
									<div class="shareabout shareabout1" style="margin: 0 30px;">
96
										<div class="sharesrcbox" style="width:642px;">
97
											<div class="sharescrollbox Acrollbox">
98
												<ul class="shareshow otherRes clearfix" id="reachArticle">
99
												
100
												</ul>
101
											</div>
102
										</div>
103
										<span class="resouprev resoubtn articalbtn"></span>
104
										<span class="resounext resoubtn articalbtn"></span>
105
									</div>
106
								</div>
107
							</div>
108
							<div class="right-box introduction">
109
								<div class="right-title"><span>个人简介</span></div>
110
								<div class="infor-browse">
111
									<div class="editbox" id="descpS" style="width:auto; margin:0 35px;">
112
113
									</div>
114
								</div>
115
116
							</div>
117
							<div class="right-box introduction">
118
								<div class="right-title"><span>学术领域</span></div>
119
								<div class="infor-browse">
120
									<div class="listbox btn-marL" id="subjectShow">
121
122
									</div>
123
									<div class="clear"></div>
124
								</div>
125
							</div>
126
127
							<div class="right-box introduction">
128
								<div class="right-title"><span>研究方向</span> </div>
129
								<div class="infor-browse" id="researchAreaShow">
130
131
								</div>
132
								<div class="clear"></div>
133
							</div>
134
135
							<div class="right-box introduction">
136
								<div class="right-title"><span>应用行业</span> </div>
137
								<div class="infor-browse">
138
									<ul class="edu-about showList showList2" id="industryShow">
139
140
									</ul>
141
								</div>
142
							</div>
143
144
							<div class="right-box introduction">
145
								<div class="right-title"><span>教育背景</span> </div>
146
								<div class="infor-browse">
147
									<ul class="edu-about showList" id="eduBgShow">
148
149
									</ul>
150
								</div>
151
							</div>
152
153
							<div class="right-box introduction">
154
								<div class="right-title"><span>工作经历</span> </div>
155
								<div class="infor-browse">
156
									<ul class="edu-about showList" id="timeJobShow">
157
158
									</ul>
159
								</div>
160
							</div>
161
162
							<div class="right-box introduction">
163
								<div class="right-title"><span>项目经历</span> </div>
164
								<div class="infor-browse">
165
									<ul class="edu-about showList" id="projectShow">
166
										 <!--<li class="paddingSpace">
167
													<div class="h4Font h4tit">著作名称<small class="h6Font"> 2016.09 - 2016.09</small></div>
168
													<div class="h5Font pIndent">xiangximianshu 纤细面熟xiangxixiangximianshu 纤细面熟miansxiangximianshu 纤细面熟huxiaxiangximianshu 纤细面熟ngximianshu 纤细面熟 纤细面熟</div>
169
												</li> -->
170
									</ul>
171
								</div>
172
							</div>
173
174
							<div class="right-box introduction">
175
								<div class="right-title"><span>著作、论文、文章</span> </div>
176
								<div class="infor-browse">
177
									<ul class="edu-about showList" id="paperShow">
178
179
									</ul>
180
								</div>
181
							</div>
182
183
							<div class="right-box introduction">
184
								<div class="right-title"><span>专利</span> </div>
185
								<div class="infor-browse">
186
									<ul class="edu-about showList" id="patentShow">
187
188
									</ul>
189
								</div>
190
							</div>
191
192
							<div class="right-box introduction">
193
								<div class="right-title"><span>荣誉及奖项</span> </div>
194
								<div class="infor-browse">
195
									<ul class="edu-about showList" id="honorShow">
196
197
									</ul>
198
								</div>
199
							</div>
200
201
							<div class="right-box introduction " style="display: none;" id="resoulis">
202
								<div class="right-title"><span>研发资源</span> </div>
203
								<div class="infor-browse">
204
									<div class="shareabout shareabout1" style="margin: 0 30px;">
205
										<div class="sharesrcbox" style="width:642px;">
206
											<div class="sharescrollbox" id="sharescrollbox">
207
208
											</div>
209
										</div>
210
										<span class="resouprev resoubtn resoubtn2"></span>
211
										<span class="resounext resoubtn resoubtn2"></span>
212
									</div>
213
								</div>
214
							</div>
215
							<div class="right-box introduction yesshow" style="display: none;">
216
								<div class="right-title"><span>合作历史及评价</span> </div>
217
								<div class="infor-browse">
218
									<div class="shareabout shareabout2">
219
  
220
									</div>
221
222
								</div>
223
224
							</div>
225
226
						</div>
227
					</div>
228
				</div>
229
			</div>
230
			<!--尾部-->
231
			<footer class="footerblock">
232
				<script type="text/javascript" src="js/footer.js"></script>
233
			</footer>
234
			<!--咨询模块按钮入口-->
235
			<div class="coulstblock">
236
				<div class="coulstbox">
237
					<div class="prohead userRadius floatL"><img src="images/default-photo.jpg" width="100%" height="100%" id="foot_proimg"></div>
238
					<div class="proinfomation floatL">
239
						<div class="clearfix">
240
							<a class="authobject named" id="foot_proname"></a>
241
							<em class="authiconNew" id="foot_promodify" style="top: 3px;"></em>
242
						</div>
243
						<div class="position"><span id="foot_protitle"></span><span></span ></div>				
244
			<div class="science"><span id="foot_prodepar"></span><span id="foot_proorgname"></span ><span class="address" id="foot_proaddress"></span></div>
245
					</div>
246
					<div class="coulstbtn floatR">
247
						<span id="conbtn">咨询</span>
248
						<span class="attentBtn" id="attentBtnFoot"><em></em><i>关注</i></span>
249
					</div>
250
				</div>
251
			</div>
252
			<script type="text/javascript" src="js/jquery.cookie.js"></script>
253
			<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
254
			<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
255
			<script type="text/javascript" src="js/common.js"></script>
256
			<script type="text/javascript" src="js/popup.js"></script>
257
			<script type="text/javascript" src="js/information.brow.js"></script>
258
			<script type="text/javascript" src="js/my-attention.js"></script>
259
			<script>
260
				//合作历史及评价------等级星
261
				$(".evastar").bind("click", function() {
262
					$(this).css("background-position", "0 0");
263
				})
264
265
				//微信分享
266
				var qrcode = new QRCode(document.getElementById("qrcode"), {
267
					width: 100,
268
					height: 100
269
				});
270
271
				function makeCode() {
272
					var hurl = window.location.host;
273
					var professorId = GetQueryString("professorId");
274
					var elurl = "http://" + hurl + "/e/p.html?id=" + professorId;
275
					qrcode.makeCode(elurl);
276
				}
277
				makeCode();
278
279
				//分享按钮和关注按钮
280
				$('.shareWeixin').hover(function() {
281
					$('.shareCode').stop(true, false).fadeToggle();
282
				});
283
			</script>
284
	</body>
285
286
</html>

+ 0 - 502
information-console.html

@ -1,502 +0,0 @@
1
<!DOCTYPE html>
2
<html>
3
4
<head>
5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
8
    <title>修改个人信息-科袖网</title>
9
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
10
    <link href="css/bootstrap.min.css" rel="stylesheet">
11
    <link rel="stylesheet" href="css/reset.css" />
12
    <link type="text/css" href="css/common.css" rel="stylesheet">
13
    <link type="text/css" href="css/index.css" rel="stylesheet">
14
    <script type="text/javascript" src="js/jquery-1.11.1.js"></script>
15
</head>
16
17
<body>
18
<!--头部-->
19
<header id="header">
20
    <script src="js/header.js"></script>
21
</header>
22
23
<div id="container">
24
    <div class="content">
25
        <div class="information-head clearfix">
26
            <div class="head-left userRadius">
27
                <a><img id="headImage">
28
                    <a href="photo-set.html" class="replace-photo"></a>
29
                </a>
30
            </div>
31
            <div class="head-center">
32
                <div class="infor-browse" style="padding:10px;">
33
                    <a class="named proName" id="nameS"></a>
34
                    <a class="edit proEdit"></a>
35
                    <div class="position proPosition"><span id="office"></span ><span id="titleS"></span ></div>
36
                    <div class="science proScience"><span id="industryS"></span ><span id="orgNameS"></span ></div>
37
                    <div class="address proAddress" id="address"></div>
38
                    <div style="font-size:16px;color:#999" id="phone"></div>
39
                    <div style="font-size:16px;color:#999;line-height:30px;" id="mail"></div>
40
                </div>
41
                <!--个人信息修改-->
42
                <div class="modifybox" style="margin:0;padding:10px;">
43
                    <div class="infor">
44
                        <span class="txtType"><b class="required_star"></b><em class="emspace">姓</em>名</span>
45
                        <input type="text" class="input-txt name" id="name">
46
                        <span id="authSta" style="float:right;margin-right:70px;color:red;"></span>
47
                    </div>
48
                    <div class="infor" id="titleNone">
49
                        <span><em class="emspace">职</em>称</span>
50
                        <div class="divselect">
51
                            <input class="input-txt" type="text" value="" id="title" />
52
                        </div>
53
                        <span><em class="emspace">职</em>位</span>
54
                        <input type="text" class="input-txt" id="officeRevise">
55
                    </div>
56
                    <div class="infor">
57
                        <span class="txtType"><b class="required_star"></b><a id="orgUpdata">所在机构</a></span>
58
                        <input type="text" class="input-txt" id="orgName">
59
                        <span id="departmentUpdata">所属部门</span>
60
                        <input type="text" class="input-txt" id="department">
61
62
                    </div>
63
                    <div class="infor2 clearfix">
64
                        <span>所在城市</span>
65
                        <div class="citybox">
66
                            <form action="" name="form1">
67
                                <div class="infolist">
68
                                    <div class="liststyle clearfix">
69
												<span class="input-txt" id="Province">
70
		                                        	<em class="mr_sj"></em>
71
		                                            <i class="mr_show">请选择省份</i>
72
		                                            <ul>
73
		                                                <li><a href="javascript:void(0)" alt="请选择省份">请选择省份</a></li>
74
		                                            </ul>
75
		                                            <input type="hidden" name="cho_Province" value="请选择省份">
76
		                                        </span>
77
                                        <span id="City" class="input-txt" style="margin-left:8px;">
78
		                                       		<em class="mr_sj"></em>
79
		                                            <i class="mr_show">请选择城市</i>
80
		                                            <ul>
81
		                                                <li><a href="javascript:void(0)" alt="请选择城市">请选择城市</a></li>
82
		                                            </ul>
83
		                                            <input type="hidden" name="cho_City" value="请选择城市">
84
		                                        </span>
85
86
                                    </div>
87
                                </div>
88
                            </form>
89
                        </div>
90
                    </div>
91
                    <div class="infor">
92
                        <span class="txtType"><a>联系电话(非公开</a></span>
93
                        <input type="text" class="input-txt" id="mobilePhone">
94
                        <span>联系邮箱(非公开)</span>
95
                        <input type="text" class="input-txt" id="moileMail">
96
                    </div>
97
                    <div class="btnbox" style="padding:4px 16px;">
98
                        <input id="saveProfessor" type="button" value="保存" class="infor-save btn">
99
                        <input type="button" value="取消" class="close btn">
100
                    </div>
101
                </div>
102
            </div>
103
            <!-- href="organization-brow.html" -->
104
            <div class="head-right headRadius">
105
                <a><img id="orgImage"></a>
106
            </div>
107
        </div>
108
        <div class="information-content">
109
            <div class="content-left">
110
                <div class="menublock">
111
                    <div class="left-title">个人信息</div>
112
                    <a href="#infor1" class="subsidebar">个人简介</a>
113
                    <a href="#infor2" class="subsidebar xslyshow" style="display: none;">学术领域</a>
114
                    <a href="#infor3" class="subsidebar yesshow" style="display: none;">研究方向</a>
115
                    <a href="#infor4" class="subsidebar yyhyshow" style="display: none;">应用行业</a>
116
                    <a href="#infor5" class="subsidebar">教育背景</a>
117
                    <a href="#infor6" class="subsidebar">工作经历</a>
118
                    <a href="#infor7" class="subsidebar">项目经历</a>
119
120
                    <a href="#infor8" class="subsidebar">著作、论文、文章</a>
121
                    <a href="#infor9" class="subsidebar">专利</a>
122
                    <a href="#infor10" class="subsidebar">荣誉及奖项</a>
123
                </div>
124
                <div class="menublock yesshow" style="display: none;">
125
                    <div class="left-title">合作机会</div>
126
                    <a href="#infor11" class="subsidebar">研发资源</a>
127
128
                </div>
129
            </div>
130
            <div class="content-right">
131
                <div class="right-box introduction" style="display: none;"id="reA">
132
                    <div class="right-title"><span>科研文章</span>
133
                        <div class="enterwork" id="enter1work">进入我的工作台</div>
134
                    </div>
135
136
                    <div class="shareabout shareabout1" style="margin: 0 30px;">
137
                        <div class="sharesrcbox" style="width:642px;">
138
                            <div class="sharescrollbox Acrollbox" id="keyanAr">
139
                                <ul class="shareshow otherRes clearfix" id="reachArticle">
140
141
                                </ul>
142
                            </div>
143
                        </div>
144
                        <span class="resouprev resoubtn articalbtn"></span>
145
                        <span class="resounext resoubtn articalbtn"></span>
146
                    </div>
147
148
                </div>
149
                <!--个人简介-->
150
                <div class="right-box introduction">
151
                    <a name="infor1"></a>
152
                    <div class="right-title"><span>个人简介</span>
153
                        <a class="edit"></a>
154
                    </div>
155
                    <div class="infor-browse">
156
                        <div class="editbox" id="descpS" style="margin:0 34px;">
157
158
                        </div>
159
                    </div>
160
                    <div class="modifybox indu">
161
                        <textarea class="reedit" id="descp"></textarea>
162
163
                        <input id="saveDescp" type="button" value="保存" class="infor-save btn btn-marL">
164
                        <input type="button" value="取消" class="close btn btn-marB">
165
                        <div class="clearfix"></div>
166
                    </div>
167
                </div>
168
                <!--学术领域-->
169
                <div class="right-box introduction xslyshow" style="display: none;">
170
                    <div class="right-title"><span>学术领域</span>
171
                        <a class="edit"></a>
172
                    </div>
173
                    <div class="infor-browse">
174
                        <div class="listbox btn-marL" id="subjectShow">
175
176
                        </div>
177
                        <div class="clear"></div>
178
                    </div>
179
                    <div class="modifybox indu">
180
                        <div class="select-sele">
181
                            <div class="btn-marL">
182
                                <input type="text" class="input-txt" id="subject" />
183
                            </div>
184
185
                            <div class="add">
186
                                <input type="button" value="添加" class="addbtn" id="subjectAdd" />
187
188
                            </div>
189
                        </div>
190
191
                        <div class="list-area">
192
                            <div class="listbox btn-marL" id="subjectList">
193
194
                            </div>
195
                        </div>
196
197
                        <!-- <p class="ann">*可拖动标签更换顺序</p> -->
198
                        <input type="button" value="保存" class="infor-save btn btn-marL" id="subjectSave">
199
                        <input type="button" value="取消" class="close btn btn-marB">
200
                        <div class="clearfix"></div>
201
                    </div>
202
                </div>
203
                <!--研究方向-->
204
                <div class="right-box introduction yesshow" style="display: none;">
205
                    <a name="infor3"></a>
206
                    <div class="right-title"><span>研究方向</span>
207
                        <a class="edit"></a>
208
                    </div>
209
                    <div class="infor-browse" id="researchAreaShow">
210
211
                    </div>
212
                    <div class="clear"></div>
213
                    <div class="modifybox indu">
214
                        <div class="select-sele">
215
                            <input type="text" class="input-txt input-width btn-marL" value="" id="researchArea">
216
                            <div class="add"><input type="button" value="添加" class="addbtn" id="researchAreaAdd"></div>
217
                        </div>
218
                        <div class="list-area">
219
                            <div class="listbox btn-marL addlist" id="researchAreaList">
220
221
                            </div>
222
                        </div>
223
                        <!-- <p class="ann">*可拖动标签更换顺序</p> -->
224
                        <input type="button" value="保存" class="infor-save btn btn-marL" id="researchAreaSave">
225
                        <input type="button" value="取消" class="close btn btn-marB">
226
                        <div class="clearfix"></div>
227
                    </div>
228
                </div>
229
                <!-- 应用行业 -->
230
                <div class="right-box introduction yyhyshow" style="display: none;">
231
                    <div class="right-title"><span>应用行业</span>
232
                        <a class="edit"></a>
233
                    </div>
234
                    <div class="infor-browse">
235
                        <ul class="edu-about edu-infor" style="padding:0;" id="industryShow">
236
237
                        </ul>
238
                    </div>
239
                    <div class="modifybox indu">
240
                        <div class="business">
241
                            <div class="select-sele">
242
                                <input type="text" class="input-txt input-width btn-marL" value="" id="industry">
243
                                <div class="add"><input type="button" value="添加" class="addbtn" id="industryAdd"></div>
244
                            </div>
245
                            <div class="list-area">
246
                                <div class="listbox btn-marL addlist" id="industryList">
247
248
                                </div>
249
                            </div>
250
                            <!-- <p class="ann">*可拖动标签更换顺序</p> -->
251
                            <input type="button" value="保存" class="infor-save btn btn-marL" id="industrySave">
252
                            <input type="button" value="取消" class="close btn btn-marB">
253
                            <div class="clearfix"></div>
254
                        </div>
255
                    </div>
256
257
                </div>
258
                <!-- 教育背景 -->
259
                <div class="right-box introduction">
260
                    <div class="right-title"><span>教育背景</span>
261
                        <a class="addclick" id="addEdu">点击添加</a>
262
                    </div>
263
                    <div class="infor-browse infor-browse2">
264
                        <ul class="edu-about" id="eduUl">
265
                            <!-- id="eduBgShow"-->
266
                            <!--<li>北科大-计科系-信管-硕士-2016<em class="exitlist"></em></li>-->
267
                            <!--<li>航空航天大学-计科系-信管-硕士-2016<em class="exitlist"></em></li>-->
268
269
                            <!--添加修改表单-->
270
271
                            <!--添加修改表单//-->
272
273
                            <!--<ul class="edu-about" id="eduBgList">-->
274
                            <!-- id="eduBgShow"-->
275
276
                        </ul>
277
                    </div>
278
279
                </div>
280
                <!--工作经历-->
281
                <div class="right-box introduction">
282
                    <div class="right-title"><span>工作经历</span>
283
                        <a class="addclick" id="timeJobAdd">点击添加</a>
284
                    </div>
285
286
                    <div class="infor-browse">
287
                        <ul class="edu-about" id="timeJobShow">
288
289
                        </ul>
290
                    </div>
291
                </div>
292
                <!--项目经历-->
293
                <div class="right-box introduction">
294
                    <div class="right-title">
295
                        <span>项目经历</span>
296
                        <a class="addclick" id="projectAdd">点击添加</a>
297
                    </div>
298
299
                    <div class="infor-browse infor-browse2">
300
                        <ul class="edu-about" id="projectShow">
301
302
                        </ul>
303
                    </div>
304
                </div>
305
                <!--著作、论文、文章-->
306
                <div class="right-box introduction">
307
                    <div class="right-title">
308
                        <span>著作、论文、文章</span>
309
                        <a class="addclick" id="papAdd">点击添加</a>
310
                    </div>
311
                    <div class="infor-browse infor-browse2">
312
                        <ul class="edu-about" id="paperShow">
313
314
                        </ul>
315
                    </div>
316
                </div>
317
                <!--专利-->
318
                <div class="right-box introduction">
319
                    <div class="right-title">
320
                        <span>专利</span>
321
                        <a class="addclick" id="patenAdd">点击添加</a>
322
                    </div>
323
                    <div class="infor-browse infor-browse2">
324
                        <ul class="edu-about" id="patentShow">
325
326
                        </ul>
327
                    </div>
328
                </div>
329
                <!--荣誉及奖项-->
330
                <div class="right-box introduction">
331
                    <div class="right-title">
332
                        <span>荣誉及奖项</span>
333
                        <a class="addclick" id="honorAdd">点击添加</a>
334
                    </div>
335
                    <div class="infor-browse infor-browse2">
336
                        <ul class="edu-about" id="honorShow">
337
338
                        </ul>
339
                    </div>
340
341
                </div>
342
                <!--研发资源-->
343
                <div class="right-box introduction yesshow" style="display: none;">
344
                    <div class="right-title"><span>研发资源</span>
345
                        <div class="enterwork" id="enterwork">进入我的工作台</div>
346
                    </div>
347
                    <div class="infor-browse">
348
                        <div class="shareabout" style="margin: 0 30px;">
349
                            <div class="sharesrcbox" style="width:642px;">
350
                                <div class="sharescrollbox" id="keyanRe">
351
352
                                </div>
353
                            </div>
354
                            <span class="resouprev resoubtn resoubtn2"></span>
355
                            <span class="resounext resoubtn resoubtn2"></span>
356
                        </div>
357
                    </div>
358
                </div>
359
360
            </div>
361
        </div>
362
    </div>
363
</div>
364
365
<footer>
366
    <script type="text/javascript" src="js/footer.js"></script>
367
</footer>
368
369
<script type="text/javascript" src="js/jquery.cookie.js"></script>
370
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
371
<script type="text/javascript" src="js/city.min.js"></script>
372
<script type="text/javascript" src="js/common.js"></script>
373
<script type="text/javascript" src="js/information-console.js"></script>
374
<script>
375
    $("body").on("click", ".date-btn", function() {
376
        $(".mr_calendar_ym:visible").hide();
377
        var flag = $(this).attr("flag");
378
        var c = $(this).val();
379
        if(flag == 1) {
380
            if(c) {
381
                var ye = new Date().getFullYear();
382
                var sroTop = (ye - parseInt(c)) * 32;
383
                $(this).siblings(".mr_calendar_ym").show();
384
                $(this).siblings(".mr_calendar_ym").find(".full_year").scrollTop(sroTop);
385
                $(this).siblings(".mr_calendar_ym").find(".yearli:contains('" + c + "')").addClass("active").siblings().removeClass("active");
386
                return false;
387
            } else {
388
                var ye = new Date().getFullYear();
389
                $(this).siblings(".mr_calendar_ym").show();
390
                $(this).siblings(".mr_calendar_ym").find(".yearli:contains('" + ye + "')").addClass("active").siblings().removeClass("active");
391
                return false;
392
            }
393
        } else if(flag == 2) {
394
            if(c) {
395
                if(c == "至今") {
396
                    $(this).siblings(".mr_calendar_ym").show();
397
                    $(this).siblings(".mr_calendar_ym").find(".mli").removeClass("active");
398
                    $(this).siblings(".mr_calendar_ym").find(".ymli:contains('" + c + "')").addClass("active").siblings().removeClass("active");
399
                    return false;
400
                } else {
401
                    $(this).siblings(".mr_calendar_ym").find(".ymli:contains('" + c.substr(0, 4) + "')").addClass("active");
402
                    $(this).siblings(".mr_calendar_ym").find(".ymli:contains('" + c.substr(0, 4) + "')").siblings().removeClass("active");
403
                    if(c.substr(5, 1) == 0) {
404
405
                        if(c.substr(6, 1) == 1) {
406
                            $(this).siblings(".mr_calendar_ym").find(".mli:first").addClass("active").siblings().removeClass("active");;
407
                        } else if(c.substr(6, 1) == 2) {
408
                            $(this).siblings(".mr_calendar_ym").find(".mli:eq(1)").addClass("active").siblings().removeClass("active");;
409
                        } else {
410
                            $(this).siblings(".mr_calendar_ym").find(".mli:contains('" + c.substr(6, 1) + "')").addClass("active").siblings().removeClass("active");;
411
                        }
412
413
                    } else {
414
415
                        $(this).siblings(".mr_calendar_ym").find(".mli:contains('" + c.substr(5, 2) + "')").addClass("active");
416
                        $(this).siblings(".mr_calendar_ym").find(".mli:contains('" + c.substr(5, 2) + "')").siblings().removeClass("active");
417
                    }
418
                    $(this).siblings(".mr_calendar_ym").show();
419
                    var ya = $(this).siblings(".mr_calendar_ym").find(".mr_year .ymli").length;
420
                    var ye = new Date().getFullYear();
421
                    if(ya == 61) {
422
                        ye = ye + 1;
423
                    }
424
                    var sroTop = (ye - parseInt(c.substr(0, 4))) * 32;
425
                    $(this).siblings(".mr_calendar_ym").find(".mr_year").scrollTop(sroTop);
426
                    return false;
427
                }
428
            } else {
429
                var ye = new Date().getFullYear();
430
                $(this).siblings(".mr_calendar_ym").show();
431
                $(this).siblings(".mr_calendar_ym").find(".ymli:contains('" + ye + "')").addClass("active");
432
                $(this).siblings(".mr_calendar_ym").find(".ymli:contains('" + ye + "')").siblings().removeClass("active");
433
                return false;
434
            }
435
436
        }
437
    })
438
    $("body").on("click", ".yearli", function() {
439
        $(this).addClass("active").siblings().removeClass("active");
440
        $(this).parents(".mr_calendar_ym ").siblings().val($(this).text());
441
        $(this).parents(".mr_calendar_ym ").hide();
442
        return false;
443
    })
444
    $("body").on("click", ".ymli", function() {
445
        $(this).addClass("active").siblings().removeClass("active");
446
        var year = $(this).text();
447
        if(year == "至今") {
448
            $(this).parents(".mr_calendar_ym ").siblings().val($(this).text())
449
            $(this).parents(".mr_calendar_ym ").hide();
450
        }
451
        return false;
452
    })
453
    $("body").on("click", ".mli", function() {
454
455
        var yearli = $(this).parents(".mr_month").siblings(".mr_year").children(".active").text();
456
        console.log(yearli);
457
        if($(this).text() < 10) {
458
            var month = "0" + $(this).text();
459
        } else {
460
            var month = $(this).text();
461
        }
462
        if(yearli == "至今") {
463
            var valueM = yearli;
464
            $(this).parents(".mr_calendar_ym ").siblings().val(valueM);
465
            $(this).parents(".mr_calendar_ym ").hide();
466
        } else {
467
            $(this).addClass("active").siblings().removeClass("active");
468
            var valueM = yearli + "-" + month
469
            $(this).parents(".mr_calendar_ym ").siblings().val(valueM);
470
            $(this).parents(".mr_calendar_ym ").hide();
471
        }
472
        return false;
473
    })
474
    $("body").click(function(){
475
        $(".mr_calendar_ym:visible").hide();
476
    })
477
    function yearAdd() {
478
        //先给年下拉框赋内容
479
        var y = new Date().getFullYear();
480
        $(".full_year").empty();
481
        $(".mr_year").empty();
482
        for(var i = y; i > y - 60; i--) { //以今年为准,前60年,后10年
483
            $(".mr_year").append('<li class="ymli">' + i + '</li>');
484
            $(".full_year").append('<li class="yearli">' + i + '</li>');
485
            if(i == y) {
486
                $(".mr_year>li:contains(" + i + ")").addClass("active");
487
                $(".full_year>li:contains(" + i + ")").addClass("active");
488
            }
489
        }
490
    }
491
492
    function month() {
493
        //赋月份的下拉框
494
        $(".mr_month").empty();
495
        for(var i = 1; i < 13; i++) {
496
            $(".mr_month").append('<li class="mli" style="text-align:center">' + i + '</li>');
497
        }
498
    }
499
</script>
500
</body>
501
502
</html>

+ 0 - 2186
js/information-console.js

@ -1,2186 +0,0 @@
1
/**
2
 * Created by TT on 2017/5/25.
3
 */
4
$(function() {
5
    // loginStatus();//判断个人是否登录
6
    //1获取数据
7
    var nameD;
8
    var orgD;
9
    var authSD
10
    var userid = GetQueryString("professorId");
11
    $(".replace-photo").attr("href","photo-set.html?id="+userid);
12
    if(userid) {
13
        //填充学术领域
14
        var subjectShow = function(data) {
15
            if(data != undefined && data.length != 0) {
16
                var subs = new Array();
17
                if(data.indexOf(',')) {
18
                    subs = data.split(',');
19
                } else {
20
                    subs[0] = data;
21
                }
22
                if(subs.length > 0) {
23
                    for(var i = 0; i < subs.length; i++) {
24
                        $("#subjectList").append("<div class='acad'>" + subs[i] + "<span class='remove'><img src='images/move.png'></span></div>");
25
                        $("#subjectShow").append("<div class='acad'>" + subs[i] + "</div>");
26
                    };
27
                }
28
            }
29
        }
30
        //填充应用行业
31
        var industryShow = function(data) {
32
33
            if(data != undefined && data.length != 0) {
34
                var subs = new Array();
35
                if(data.indexOf(',')) {
36
                    subs = data.split(',');
37
                } else {
38
                    subs[0] = data;
39
                }
40
                if(subs.length > 0) {
41
                    for(var i = 0; i < subs.length; i++) {
42
                        $("#industryList").append("<div class='acad'>" + subs[i] + "<span class='remove'><img src='images/move.png'></span></div>");
43
                        $("#industryShow").append("<li>" + subs[i] + "</li>");
44
45
                    };
46
                }
47
            }
48
        }
49
        //填充教育背景
50
        var eduBgShow = function(data) {
51
            eduFil("#eduUl");
52
            if(data.length > 0) {
53
                for(var i = 0; i < data.length; i++) {
54
                    if(!data[i].year) {
55
                        data[i].year = "";
56
                    }
57
                    if(!data[i].college) {
58
                        data[i].college = "";
59
                    }
60
                    if(!data[i].major) {
61
                        data[i].major = "";
62
                    }
63
                    if(!data[i].degree) {
64
                        data[i].degree = "";
65
                    }
66
                    var string = '<li class="paddingSpace">'
67
                    string += ' <div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>'
68
                    if(data[i].college && data[i].major && data[i].degree) {
69
                        string += data[i].school + '-' + data[i].college + '-' + data[i].major + '-' + data[i].degree
70
                    } else if(!data[i].college && data[i].major && data[i].degree) {
71
                        string += data[i].school + '-' + data[i].major + '-' + data[i].degree
72
                    } else if(data[i].college && !data[i].major && data[i].degree) {
73
                        string += data[i].school + '-' + data[i].college + '-' + data[i].degree
74
                    } else if(data[i].college && data[i].major && !data[i].degree) {
75
                        string += data[i].school + '-' + data[i].college + '-' + data[i].major
76
                    } else if(!data[i].college && !data[i].major && data[i].degree) {
77
                        string += data[i].school + '-' + data[i].degree
78
                    } else if(!data[i].college && data[i].major && !data[i].degree) {
79
                        string += data[i].school + '-' + data[i].major
80
                    } else if(data[i].college && !data[i].major && !data[i].degree) {
81
                        string += data[i].school + '-' + data[i].college
82
                    }
83
                    //+data[i].school+'-'+data[i].college+'-'+data[i].major+'-'+data[i].degree+
84
                    string += '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>'
85
                    string += '<div class="modifybox">'
86
                    string += '<form class="txtExpForm">'
87
                    string += '<div class="infor edu">'
88
                    string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">学</em>校</div>'
89
                    string += '<input type="hidden" class="eduId" value="' + data[i].id + '">'
90
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt school" value="' + data[i].school + '"></div>'
91
                    string += '</div>'
92
                    string += '<div class="edu date-box clearfix">'
93
                    string += '<div class="txtType floatL">毕业年份</div>'
94
                    string += '<div class="txtExp floatL">'
95
                    if(data[i].year) {
96
                        string += '<input type="text" class="date-btn input-txt edu-txt year" name="YYYY" flag="1" value="' + data[i].year + '">'
97
                    } else {
98
                        string += '<input type="text" class="date-btn input-txt edu-txt year"  name="YYYY" flag="1" value="">'
99
                    }
100
101
                    string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
102
                    string += '<ul class="full_year">'
103
                    string += '</ul>'
104
                    string += '</div>'
105
                    string += '</div>'
106
                    string += '</div>'
107
                    string += '<div class="infor edu">'
108
                    string += '<div class="txtType floatL"><em class="emspace">院</em>系</div>'
109
                    if(data[i].college) {
110
                        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college" value="' + data[i].college + '"></div>'
111
                    } else {
112
                        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college"></div>'
113
                    }
114
115
                    string += '</div>'
116
                    string += '<div class="infor edu">'
117
                    string += '<div class="txtType floatL"><em class="emspace">专</em>业</div>'
118
                    if(data[i].major) {
119
                        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" value="' + data[i].major + '"></div>'
120
                    } else {
121
                        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" ></div>'
122
                    }
123
124
                    string += '</div>'
125
                    string += '<div class="edu ulbox clearfix">'
126
                    string += '<div class="txtType floatL">获得学位</div>'
127
                    string += '<div class="mr_timed_div input-txt edu-txt floatL">'
128
                    string += '<i class="mr_sj"></i>'
129
                    string += '<input type="hidden" name="degree_text">'
130
                    if(data[i].degree) {
131
                        string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="' + data[i].degree + '">'
132
                    } else {
133
                        string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="本科">'
134
                    }
135
136
                    string += '<div class="xl_list">'
137
                    string += '<ul class="ul_edubg ulShow" style="display:none">'
138
                    string += '<li>学士</li>'
139
                    string += '<li>硕士</li>'
140
                    string += '<li>博士</li>'
141
                    string += '<li>其他</li>'
142
                    string += '</ul>'
143
                    string += '</div>'
144
                    string += '</div>'
145
                    string += '</div>'
146
                    string += '<div class="btnbox">'
147
                    string += '<input type="button" value="保存" class="infor-save btn" class="saveEduBg">'
148
                    string += '<input type="button" value="取消" class="close btn">'
149
                    string += '<input type="button" value="删除本条" class="deletebtn edud">'
150
                    string += '</div>'
151
                    string += '</form>'
152
                    string += '</div>'
153
                    string += '</li>'
154
155
                    $("#eduUl").append(string);
156
                }
157
            }
158
        }
159
        //填充社会兼职
160
        var timeJobShow = function(data) {
161
            jobFil("#timeJobShow");
162
            if(data.length > 0) {
163
                for(var i = 0; i < data.length; i++) {
164
                    var sDate = "";
165
                    var eDate = "";
166
                    if(data[i].department) {
167
                        var dep = "-" + data[i].department;
168
                        var depart = data[i].department;
169
                    } else {
170
                        var dep = "";
171
                        var depart = ""
172
                    }
173
                    if(data[i].startMonth) {
174
175
                        sDate = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
176
                        if(data[i].stopMonth) {
177
                            eDate = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6);
178
                        } else {
179
                            eDate = "至今"
180
                        }
181
                    }
182
                    var string = '<li class="paddingSpace listnone">'
183
                    string += ' <div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].company + '-' + data[i].title + '' + dep + '<small class="h6Font">';
184
                    string += sDate;
185
                    if(eDate) string += ("-" + eDate);
186
                    string += '</small><em class="exitlist inforedu"></em></div>';
187
                    string += '<div class="modifybox">'
188
                    string += '<form class="txtExpForm">'
189
                    string += '<div class="infor edu">'
190
                    string += '<div class="txtType floatL"><b class="required_star"></b>机构名称</div>'
191
                    string += '<input type="hidden" class="jobId" value="' + data[i].id + '">'
192
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobCompany" value="' + data[i].company + '"/></div>'
193
                    string += '</div>'
194
                    string += '<div class="edu date-box clearfix">'
195
                    string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
196
                    string += '<div class="txtExp floatL">'
197
                    string += '<div class="dateExp floatL">'
198
                    string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt startMonth" flag="2" difference="1" value="' + sDate + '">'
199
                    string += '<div class="mr_calendar_ym clearfix">'
200
                    string += '<ul class="mr_year">'
201
                    string += '</ul>'
202
                    string += '<ul class="mr_month">'
203
                    string += '</ul>'
204
                    string += '</div>'
205
                    string += '</div>'
206
                    string += '<div class="lineTo floatL"></div>'
207
                    string += '<div class="dateExp floatL">'
208
                    string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt stopMonth" flag="2" difference="2"  value="' + eDate + '">'
209
                    string += '<div class="mr_calendar_ym clearfix">'
210
                    string += '<ul class="mr_year">'
211
                    string += '<li class="ymli">至今</li>'
212
                    string += '</ul>'
213
                    string += '<ul class="mr_month">'
214
                    string += '</ul>'
215
                    string += '</div>'
216
                    string += '</div>'
217
                    string += '</div>'
218
                    string += '</div>'
219
                    string += '<div class="infor edu btn-marL">'
220
                    string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">职</em>位</div>'
221
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobTitle" value="' + data[i].title + '"/></div>'
222
                    string += '</div>'
223
                    string += '<div class="infor edu btn-marL">'
224
                    string += '<div class="txtType floatL">所在部门</div>'
225
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobdepartment"  value="' + depart + '"/></div>'
226
                    string += '</div>'
227
                    string += '<div class="btnbox">'
228
                    string += '<input type="button" value="保存" class="infor-save btn btn-marL">'
229
                    string += '<input type="button" value="取消" class="close btn btn-marB">'
230
                    string += '<input type="button" value="删除本条" class="deletebtn">'
231
                    string += '</div>'
232
                    string += '</form>'
233
                    string += '</div>'
234
                    string += '</li>'
235
                    $("#timeJobShow").append(string);
236
                }
237
            }
238
        }
239
        //填充项目经历
240
        var projectShow = function(data) {
241
            projectFil("#projectShow")
242
            if(data.length > 0) {
243
                for(var i = 0; i < data.length; i++) {
244
                    if(!data[i].descp) {
245
246
                        data[i].descp = "";
247
                    }
248
                    if(!data[i].startMonth) {
249
                        data[i].startMonth = '';
250
                        data[i].stopMonth = '';
251
                    } else {
252
                        data[i].startMonth = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-"
253
                        if(!data[i].stopMonth) {
254
                            data[i].stopMonth = '至今';
255
                        } else {
256
                            data[i].stopMonth = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6)
257
                        }
258
                    }
259
                    var string = '<li class="paddingSpace listnone">'
260
                    string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].startMonth + '' + data[i].stopMonth + '</small><em class="exitlist inforedu"></em></div>';
261
                    string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
262
                    //string+=' <div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>'+data[i].name+'-'+data[i].descp+'-'+data[i].startMonth+'-'+data[i].stopMonth+'<em class="exitlist inforedu"></em></div>'
263
                    string += '<div class="modifybox">'
264
                    string += '<form class="txtExpForm">'
265
                    string += '<div class="infor edu">'
266
                    string += '<div class="txtType floatL"><b class="required_star"></b>项目名称</div>'
267
                    string += '<input type="hidden" class="projectId" value="' + data[i].id + '"/>'
268
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectName" value="' + data[i].name + '"></div>'
269
                    string += '</div>'
270
                    string += '<div class="edu date-box clearfix">'
271
                    string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
272
                    string += '<div class="txtExp floatL">'
273
                    string += '<div class="dateExp floatL">'
274
                    string += '<input type="text" class="date-btn input-txt edu-txt project StartMonth" flag="2" difference="1" value="' + data[i].startMonth.substr(0, 7) + '">'
275
                    string += '<div class="mr_calendar_ym clearfix">'
276
                    string += '<ul class="mr_year">'
277
                    string += '</ul>'
278
                    string += '<ul class="mr_month">'
279
                    string += '</ul>'
280
                    string += '</div>'
281
                    string += '</div>'
282
                    string += '<div class="lineTo floatL"></div>'
283
                    string += '<div class="dateExp floatL">'
284
                    string += '<input type="text" class="date-btn input-txt edu-txt project StopMonth" flag="2" difference="2" value="' + data[i].stopMonth + '">'
285
                    string += '<div class="mr_calendar_ym clearfix">'
286
                    string += '<ul class="mr_year">'
287
                    string += '<li class="ymli">至今</li>'
288
                    string += '</ul>'
289
                    string += '<ul class="mr_month">'
290
                    string += '</ul>'
291
                    string += '</div>'
292
                    string += '</div>'
293
                    string += '</div>'
294
                    string += '</div>'
295
                    string += '<div class="infor edu">'
296
                    string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
297
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectDescp" value="' + data[i].descp + '"></div>'
298
                    string += '</div>'
299
                    string += '<div class="btnbox">'
300
                    string += '<input type="button" value="保存" class="infor-save btn">'
301
                    string += '<input type="button" value="取消" class="close btn">'
302
                    string += '<input type="button" value="删除本条" class="deletebtn">'
303
                    string += '</div>'
304
                    string += '</form>'
305
                    string += '</div>'
306
                    string += '</li>'
307
                    $("#projectShow").append(string);
308
309
                }
310
            }
311
        }
312
        //填充著作论文文章
313
        var paperShow = function(data) {
314
            papFil("#paperShow");
315
            if(data.length > 0) {
316
                for(var i = 0; i < data.length; i++) {
317
                    if(!data[i].year) {
318
                        data[i].year = "";
319
                    }
320
                    if(!data[i].descp) {
321
                        data[i].descp = "";
322
                    }
323
                    if(!data[i].url) {
324
                        data[i].url = "";
325
                    }
326
327
                    var string = '<li class="paddingSpace listnone">'
328
                    string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
329
                    string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
330
                    //string+=' <div class="listdata edudata"><i class="listpoint"></i>'+data[i].year+'-'+data[i].name+'-'+data[i].descp+'<em class="exitlist inforedu"></em></div>'
331
                    string += '<div class="modifybox">'
332
                    string += '<form class="txtExpForm">'
333
                    string += '<div class="infor edu">'
334
                    string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
335
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperName"  value="' + data[i].name + '"></div>'
336
                    string += '</div>'
337
                    string += '<div class="edu date-box clearfix">'
338
                    string += '<div class="txtType floatL">发表时间</div>'
339
                    string += '<div class="txtExp floatL">'
340
                    string += '<input type="text" class="date-btn input-txt edu-txt paperYear"  flag="1" value="' + data[i].year + '">'
341
                    string += '<div class="mr_calendar_ym clearfix" style="wclassth: 180px; display: none;">'
342
                    string += '<ul class="full_year">'
343
                    string += '</ul>'
344
                    string += '</div>'
345
                    string += '</div>'
346
                    string += '</div>'
347
                    string += '<div class="infor edu">'
348
                    string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
349
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperDescp"  value="' + data[i].descp + '"></div>'
350
                    string += '</div>'
351
                    //							string += '<div class="infor edu">'
352
                    //							string += '<div class="txtType floatL"><em class="emspace">链</em>接</div>'
353
                    //							string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperUrl"  value="'+data[i].url+'"></div>'
354
                    //							string += '</div>'
355
                    string += '<div class="btnbox">'
356
                    string += '<input type="hidden" class="paperId" value="' + data[i].id + '">'
357
                    string += '<input type="button" value="保存" class="infor-save btn" class="paperSave">'
358
                    string += '<input type="button" value="取消" class="close btn">'
359
                    string += '<input type="button" value="删除本条" class="deletebtn">'
360
                    string += '</div></form></div></li>'
361
                    $("#paperShow").append(string);
362
                }
363
            }
364
        }
365
        //填充专利
366
        var patentShow = function(data) {
367
            patFil("#patentShow");
368
            if(data.length > 0) {
369
                for(var i = 0; i < data.length; i++) {
370
                    if(!data[i].year) {
371
                        data[i].year = "";
372
                    }
373
                    if(!data[i].descp) {
374
                        data[i].descp = "";
375
                    }
376
                    if(!data[i].url) {
377
                        data[i].url = "";
378
                    }
379
                    var string = '<li class="paddingSpace listnone">'
380
                    //string+=' <div class="listdata edudata"><i class="listpoint"></i>'+data[i].year+'-'+data[i].name+'-'+data[i].descp+'<em class="exitlist inforedu"></em></div>'
381
                    string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
382
                    string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
383
                    string += '<div class="modifybox">'
384
                    string += '<form class="txtExpForm">'
385
                    string += '<div class="infor edu">'
386
                    string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
387
                    string += '<input type="hidden" class="patentId" value="' + data[i].id + '">'
388
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentName" value="' + data[i].name + '"></div>'
389
                    string += '</div>'
390
                    string += '<div class="edu date-box clearfix">'
391
                    string += '<div class="txtType floatL">发表时间</div>'
392
                    string += '<div class="txtExp floatL">'
393
                    string += '<input type="text" class="date-btn input-txt edu-txt patentYear" flag="1" value="' + data[i].year + '">'
394
                    string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
395
                    string += '<ul class="full_year">'
396
                    string += '</ul>'
397
                    string += '</div>'
398
                    string += '</div>'
399
                    string += '</div>'
400
                    //							string += '<div class="infor edu">'
401
                    //							string += '<div class="txtType floatL"><em class="emspace">链</em>接</div>'
402
                    //							string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentUrl" value="'+data[i].url+'"></div>'
403
                    //							string += '</div>'
404
                    string += '<div class="infor edu">'
405
                    string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
406
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"value="' + data[i].descp + '"></div>'
407
                    string += '</div>'
408
                    string += '<div class="btnbox">'
409
                    string += '<input type="button" value="保存" class="infor-save btn">'
410
                    string += '<input type="button" value="取消" class="close btn">'
411
                    string += '<input type="button" value="删除本条" class="deletebtn">'
412
                    string += '</div>'
413
                    string += '</form>'
414
                    string += '</div>'
415
                    string += '</li>'
416
                    $("#patentShow").append(string);
417
                }
418
            }
419
        }
420
        //填充荣誉
421
        var honorShow = function(data) {
422
            hounerFil("#honorShow");
423
            if(data.length > 0) {
424
                for(var i = 0; i < data.length; i++) {
425
                    if(!data[i].year) {
426
                        data[i].year = "";
427
                    }
428
                    if(!data[i].descp) {
429
                        data[i].descp = "";
430
                    }
431
                    var string = '<li class="paddingSpace listnone">'
432
                    //string+=' <div class="listdata edudata"><i class="listpoint"></i>'+data[i].year+'-'+data[i].name+'-'+data[i].descp+'<em class="exitlist inforedu"></em></div>'
433
                    string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
434
                    string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
435
                    string += '<div class="modifybox">'
436
                    string += '<form class="txtExpForm">'
437
                    string += '<div class="infor edu">'
438
                    string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
439
                    string += '<input type="hidden" class="honorId" value="' + data[i].id + '">'
440
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt honorName" value="' + data[i].name + '"></div>'
441
                    string += '</div>'
442
                    string += '<div class="infor edu">'
443
                    string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
444
                    string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp" value="' + data[i].descp + '"></div>'
445
                    string += '</div>'
446
                    string += '<div class="edu date-box clearfix">'
447
                    string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
448
                    string += '<div class="txtExp floatL">'
449
                    string += '<input type="text" class="date-btn input-txt edu-txt honorYear" flag="1" value="' + data[i].year + '">'
450
                    string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
451
                    string += '<ul class="full_year">'
452
                    string += '</ul>'
453
                    string += '</div>'
454
                    string += '</div>'
455
                    string += '</div>'
456
                    string += '<div class="btnbox">'
457
                    string += '<input type="button" value="保存" class="infor-save btn">'
458
                    string += '<input type="button" value="取消" class="close btn">'
459
                    string += '<input type="button" value="删除本条" class="deletebtn">'
460
                    string += '</div>'
461
                    string += '</form>'
462
                    string += '</div>'
463
                    string += '</li>'
464
                    $("#honorShow").append(string);
465
                }
466
            }
467
        }
468
        //填充研究方向
469
        var researchAreaShow = function($datas, $datarecords) {
470
            if($datas != undefined && $datas.length != 0) {
471
                $("#researchAreaList").empty();
472
                for(var i = 0; i < $datas.length; ++i) {
473
                    var $data = $datas[i];
474
                    var $photos = [];
475
                    //获取头像
476
                    if($datarecords.length > 0) {
477
                        $photos = getRecords($datarecords, $data.caption);
478
                    }
479
                    var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num'>";
480
                    if($photos.length > 10) {
481
                        showDiv += "<div class='triangleR'></div>";
482
                    }
483
                    if($photos.length > 0) {
484
                        for(var j = 0; j < $photos.length; ++j) {
485
                            showDiv += "<span class='like-people userRadius'><img class='like-h' src='/images/head/" + $photos[j] + "_s.jpg'></span>";
486
                        }
487
                    }
488
                    showDiv += "</div></div>";
489
                    $("#researchAreaShow").append(showDiv);
490
                    $("#researchAreaList").append("<div class='list'><span class='like'>" + $data.count + "</span><span class='ra'>" + $data.caption + "</span><span class='remove'><img src='images/move.png'></span></div>");
491
492
                    $(".like-h").load(function() {})
493
                        .error(function() {
494
                            $(this).attr("src", "/images/default-photo.jpg");
495
                        });
496
                }
497
            }
498
        }
499
        //填充研究方向
500
        var getRecords = function($researchAreaLogs, caption) {
501
            var ret = [];
502
            for(var i = 0; i < $researchAreaLogs.length; i++) {
503
                if(caption == $researchAreaLogs[i].caption) {
504
                    ret.push($researchAreaLogs[i].opreteProfessorId);
505
                }
506
            }
507
            return ret;
508
        }
509
        //获取数据,填充页面
510
        $.get("/ajax/professor/info/" + userid, function($data) {
511
            if($data.success) {
512
                console.log($data);
513
                var $info = $data.data;
514
                $info.authType = 1;
515
                if($info) {
516
                    //展示专家的信息
517
                    $("#nameS").text($info.name);
518
                    nameD = $info.name;
519
                    authSD = $info.authStatus;
520
                    //console.log($info.authStatus)
521
                    orgD = $info.orgName;
522
                    if($info.authType == 1) {
523
                        $(".yesshow,.xslyshow,.yyhyshow").show();
524
                    } else {
525
                        if($info.authentication == 1) {
526
                            $(".xslyshow").show();
527
                        }
528
                        if($info.authentication == 2) {
529
                            $("#orgUpdata").text("所在企业");
530
                            $(".yyhyshow").show();
531
                        }
532
                        if($info.authentication == 3) {
533
                            $("#orgUpdata").text("所在高校");
534
                            $("#departmentUpdata").text("所属院系");
535
                            $("#titleNone").hide();
536
                            $("#office").hide();
537
                            $("#titleS").hide();
538
                        }
539
                    }
540
                    //alert($info.authentication)
541
                    //alert($info.authType)
542
                    if($info.authStatus==3) {
543
                        $("#authSta").text("已认证");
544
                    } else {
545
                        $("#authSta").text("未认证");
546
                    }
547
                    if($info.office) {
548
                        if($info.title) {
549
                            $("#office").text($info.office + ",");
550
                        } else {
551
                            $("#office").text($info.office);
552
                        }
553
554
                    }
555
                    if($info.title) {
556
                        $("#titleS").text($info.title);
557
                    }
558
                    if($info.department) {
559
                        if($info.orgName) {
560
                            $("#industryS").text($info.department + ",");
561
                        } else {
562
                            $("#industryS").text($info.department);
563
                        }
564
                    }
565
                    if($info.orgName) {
566
                        $("#orgNameS").text($info.orgName);
567
                    }
568
                    if($info.address) {
569
                        $("#address").text($info.address);
570
                    }
571
                    if($info.email) {
572
                        $("#mail").text("联系邮箱(非公开):" + $info.email);
573
                        $("#moileMail").val($info.email);
574
                    }
575
                    if($info.phone) {
576
                        $("#phone").text("联系电话(非公开):" + $info.phone);
577
                        $("#mobilePhone").val($info.phone);
578
                    }
579
                    $("#headImage").attr("src", "/images/head/" + userid + "_l.jpg");
580
                    $("#headImage").load(function() {})
581
                        .error(function() {
582
                            $("#headImage").attr("src", "/images/default-photo.jpg");
583
                        });
584
                    $("#orgImage").attr("src", "/images/org/" + $info.orgId + ".jpg");
585
                    $("#orgImage").load(function() {})
586
                        .error(function() {
587
                            $("#orgImage").attr("src", "/images/default-icon.jpg");
588
                        });
589
                    $("#descpS").text($info.descp);
590
                    //显示专家信息到保存数据
591
                    $("#name").val($info.name);
592
                    $("#title").val($info.title);
593
                    $("#orgId").val($info.orgId);
594
                    $("#orgName").val($info.orgName);
595
                    $("#department").val($info.department);
596
                    $("#officeRevise").val($info.office);
597
                    //省
598
                    //$("#Province input[name=cho_Province]").val($info.province);
599
                    //console.log($info.province);
600
                    if(!$info.province) {
601
                        $info.province = ""
602
                    }
603
                    if(!$info.address) {
604
                        $info.address = ""
605
                    }
606
                    $("#Province .mr_show").text($info.province);
607
                    //市
608
                    //$("#City input[name=cho_City]").val($info.address);
609
                    //console.log($info.address)
610
                    $("#City .mr_show").text($info.address);
611
                    //$("#addressRevise").val($info.address);
612
                    if($info.descp) {
613
                        $("#descp").val($info.descp);
614
                    } else {
615
                        $("#descpS").css("min-height", "0px");
616
                    }
617
                    //console.log($info.authentication);
618
619
                    if($info.subject) {
620
                        subjectShow($info.subject);
621
                    }
622
623
                    //研究方向
624
                    if($info.researchAreas.length) {
625
                        researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
626
                    }
627
628
                    //展示专家的行业
629
                    if($info.industry) {
630
                        industryShow($info.industry);
631
                    }
632
633
                    //教育背景
634
                    if($info.edus) {
635
                        eduBgShow($info.edus);
636
                    }
637
                    //社会兼职
638
                    if($info.jobs) {
639
                        timeJobShow($info.jobs);
640
                    }
641
                    //项目经历
642
                    if($info.projects) {
643
                        projectShow($info.projects)
644
                    }
645
646
                    //著作 论文 文章
647
                    if($info.papers) {
648
                        paperShow($info.papers);
649
                    }
650
                    //专利
651
                    if($info.patents) {
652
                        patentShow($info.patents);
653
                    }
654
                    //荣誉及奖项
655
                    if($info.honors) {
656
                        honorShow($info.honors);
657
                    }
658
                    yearAdd();
659
                    month();
660
                    $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
661
                    $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
662
                    //下滑滚动不覆盖底部
663
                    var d;
664
                    var t;
665
666
                    /*向下滚动时,header背景变半透明*/
667
                    var top5 = $(".content-left").height();
668
                    var top4 = $("#container").height();
669
                    var top3 = $(window).height();
670
                    $(document).scroll(function() {
671
                        var top1 = $(document).scrollTop();
672
                        var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10; //变成绝对定位
673
                        if(top1 >= 300) {
674
                            $(".content-left").css({
675
                                "position": "fixed",
676
                                "top": "80px"
677
                            });
678
                            if(top1 >= top2) {
679
                                $('.information-content').css("position", "static");
680
                                $(".content-left").css("position", "absolute");
681
                                $(".content-left").css("top", top4 - top5 - 10 + "px");
682
                            } else {
683
                                $('.information-content').css("position", "relative");
684
                                $(".content-left").css({
685
                                    "position": "fixed",
686
                                    "top": "80px"
687
                                });
688
                            }
689
                        } else {
690
                            $(".content-left").css({
691
                                "position": "static"
692
                            });
693
694
                        }
695
696
                    })
697
698
                    //下滑滚动不覆盖底部 结束
699
                }
700
            }
701
        });
702
    } else {
703
        location.href = "login.html";
704
        return;
705
    }
706
    //搜索框
707
    $("#hsearch").on("click", function() {
708
        var searchContent = $("#hsearchContent").val();
709
        location.href = "searchNew.html?searchContent=" + searchContent;
710
    });
711
712
    function trim(str) { //删除左右两端的空格			  
713
        return str.replace(/(^\s*)|(\s*$)/g, "");
714
    }
715
    //头像旁保存
716
    $("#saveProfessor").on("click", function() {
717
        var length1 = trim($("#name").val());
718
        //console.log(length1)
719
        var length2 = trim($("#orgName").val());
720
        /*var loginName=$("#mobilePhone").val();
721
        if(trim(loginName)){
722
            var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
723
            if(!hunPhone.test(loginName.trim())) {
724
                $.MsgBox.Alert("消息提醒", "联系电话格式不对,请输入正确的格式");
725
                return;
726
            }
727
        }*/
728
        var mail=$("#moileMail").val();
729
        if(trim(mail)){
730
            var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
731
            if(!gunf.test(mail.trim())) {
732
                $.MsgBox.Alert("消息提醒", "请输入正确的邮箱格式");
733
                return;
734
            }
735
        }
736
        if(!length1 && length2) {
737
            $.MsgBox.Alert("消息提醒", "姓名不能为空");
738
            return;
739
        } else if(length1 && !length2) {
740
            $.MsgBox.Alert("消息提醒", "所在机构不能为空");
741
            return;
742
        } else if(!length1 && !length2) {
743
            $.MsgBox.Alert("消息提醒", "姓名和所在机构不能为空");
744
            return;
745
        }
746
        if(nameD != length1 && orgD != length2) {
747
            if(authSD) {
748
                $.MsgBox.Confirm("消息", "修改姓名&&和所在机构会导致身份验证失效?", personUpdata);
749
750
                return;
751
            } else {
752
                personUpdata();
753
            }
754
755
        } else if(nameD == length1 && orgD != length2) {
756
            if(authSD) {
757
                $.MsgBox.Confirm("消息", "修改所在机构会导致身份验证失效?", personUpdata);
758
                return;
759
            } else {
760
                personUpdata();
761
            }
762
763
        } else if(nameD != length1 && orgD == length2) {
764
            if(authSD) {
765
                $.MsgBox.Confirm("消息", "修改姓名会导致身份验证失效?", personUpdata);
766
                return;
767
            } else {
768
                personUpdata();
769
            }
770
771
        } else {
772
            personUpdata();
773
        }
774
775
    });
776
    //更新认证状态函数
777
    var upStatus = function() {
778
        $.ajax({
779
            url: "/ajax/professor/authStatus",
780
            dataType: 'json', //数据格式类型
781
            type: 'post', //http请求类型
782
            data: {
783
                authStatus: 0,
784
                id: userid
785
            },
786
            timeout: 10000, //超时设置
787
            success: function(data) {
788
                if(data.success) {} else {
789
790
                }
791
            }
792
        })
793
    }
794
795
    function personUpdata() {
796
        if(nameD == $("#name").val() && orgD == $("#orgName").val()) {
797
798
        } else {
799
            if(authSD) {
800
                upStatus();
801
            }
802
803
        }
804
805
        var $data = {};
806
        $data.name = $("#name").val();
807
        $data.orgId = $("#orgId").val();
808
        $data.orgName = $("#orgName").val();
809
        $data.title = $("#title").val();
810
        $data.department = $("#department").val();
811
        $data.phone=$("#mobilePhone").val();
812
        $data.email=$("#moileMail").val();
813
        if($("#Province input[name=cho_Province]").val() != "请选择省份") {
814
            $data.province = $("#Province input[name=cho_Province]").val(); //省
815
        }
816
        if($("#City input[name=cho_City]").val() != "请选择城市") {
817
            $data.address = $("#City input[name=cho_City]").val(); //市
818
        }
819
        $data.office = $("#officeRevise").val();
820
        if(userid) {
821
            $data.id = userid;
822
        }
823
        console.log(userid);
824
        $.ajax({
825
            "url": "../ajax/professor",
826
            "type": userid ? "PUT" : "POST",
827
            "success": function(rdata) {
828
829
                if(rdata.success) {
830
                    if(userid) {
831
                        $.get("/ajax/professor/info/" + userid, function($data) {
832
                            if($data.success) {
833
                                var $info = $data.data;
834
                                if($info) {
835
                                    //展示专家的信息
836
                                    $(".modifybox").css("display", "none");
837
                                    $(".infor-browse").css("display", "block");
838
                                    if($info.authType) {
839
                                        $("#authSta").text("已认证");
840
                                    } else {
841
                                        $("#authSta").text("未认证");
842
                                    }
843
                                    nameD = $info.name;
844
                                    authSD = $info.authStatus;
845
                                    orgD = $info.orgName;
846
                                    $("#nameS").text("");
847
                                    $("#office").text("");
848
                                    $("#titleS").text("");
849
                                    $("#industryS").text("");
850
                                    $("#orgNameS").text("");
851
                                    $("#address").text("");
852
                                    $("#nameS").text($info.name);
853
                                    if($info.phone){
854
                                        $("#phone").text("联系电话(非公开):" +$info.phone);
855
                                        $("#mobilePhone").val($info.phone);
856
                                    }else{
857
                                        $("#phone").text("");
858
                                        $("#mobilePhone").val("");
859
                                    }
860
                                    if($info.email){
861
                                        $("#mail").text("联系邮箱(非公开):" +$info.email);
862
                                        $("#moileMail").val($info.email);
863
                                    }else{
864
                                        $("#mail").text("");
865
                                        $("#moileMail").val("");
866
                                    }
867
                                    if($info.office) {
868
                                        if($info.title) {
869
                                            $("#office").text($info.office + ",");
870
                                        } else {
871
                                            $("#office").text($info.office);
872
                                        }
873
874
                                    }
875
                                    if($info.title) {
876
                                        $("#titleS").text($info.title);
877
                                    }
878
                                    if($info.department) {
879
                                        if($info.orgName) {
880
                                            $("#industryS").text($info.department + ",");
881
                                        } else {
882
                                            $("#industryS").text($info.department);
883
                                        }
884
                                    }
885
                                    if($info.orgName) {
886
                                        $("#orgNameS").text($info.orgName);
887
                                    }
888
                                    if($info.address) {
889
                                        $("#address").text($info.address);
890
                                    }
891
                                    //显示专家信息到保存数据
892
                                    $("#name").val($info.name);
893
                                    $("#title").val($info.title);
894
                                    $("#orgId").val($info.orgId);
895
                                    $("#orgName").val($info.orgName);
896
                                    $("#department").val($info.department);
897
                                    $("#officeRevise").val($info.office);
898
                                    //$("#addressRevise").val($info.address);
899
                                    //省
900
                                    //console.log($info.province);
901
                                    $("#Province .mr_show").text("");
902
                                    $("#Province input[name=cho_Province]").val($info.province);
903
                                    $("#Province .mr_show").text($info.province);
904
                                    //市
905
                                    //console.log($info.address);
906
                                    $("#City .mr_show").text("");
907
                                    $("#City input[name=cho_City]").val($info.address);
908
                                    $("#City .mr_show").text($info.address);
909
910
                                }
911
                            }
912
913
                        })
914
                    } else {
915
                        location.href = "information.html?id=" + rdata.data;
916
                    }
917
                } else {
918
                    alert(rdata.msg);
919
                }
920
            },
921
            "data": userid ? JSON.stringify($data) : $data,
922
            "contentType": userid ? "application/json" : "application/x-www-form-urlencoded",
923
            dataType: "json"
924
        });
925
    }
926
    //上传图像的hover
927
    $(".head-left").hover(function() {
928
        $(".replace-photo").animate({
929
            "bottom": "0px"
930
        });
931
    }, function() {
932
        $(".replace-photo").animate({
933
            "bottom": "-50px"
934
        });
935
    })
936
937
    //拿到点击的顺序,然后求出局文档的距离
938
    $(".subsidebar").mouseenter(function() {
939
        var dd = $(this)[0].className;
940
        if(dd != "subsidebar subcolor") {
941
            $(this).css("background", "#efefef");
942
        }
943
    }).mouseleave(function() {
944
        $(this).css("background", "")
945
    });
946
    //专家信息点击换背景颜色
947
    $(".subsidebar").click(function() {
948
        $(".subsidebar").removeClass("subcolor");
949
        $(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
950
    });
951
    $(".subsidebar").click(function() {
952
        var index = $(".subsidebar").index(this) + 1;
953
        //console.log(index)
954
        var offset = $(".introduction").eq(index).offset();
955
        $("body,html").animate({
956
            scrollTop: offset.top - 80 + "px" //��body��scrollTop����pos��top����ʵ���˹���
957
        }, 1000);
958
    }).mousedown(function() {
959
        $(this).css("background", "");
960
    });
961
962
    //获取点击那个编辑,及
963
    $("#container .edit").click(function() {
964
        var edit = $(".edit").index(this);
965
        $(".right-title span").eq(edit - 1).css("color", "#3e3e3e");
966
        $(".infor-browse").eq(edit).hide();
967
        $(".modifybox").eq(edit).show();
968
        //点击取消的操作
969
        $(".close").click(function() {
970
            $(".modifybox").eq(edit).hide();
971
            $(".infor-browse").eq(edit).show();
972
        });
973
    }); //个人简介保存
974
    $("#saveDescp").on("click", function() {
975
        $.ajax({
976
            "url": "../ajax/professor/descp",
977
            "type": "POST",
978
            "data": {
979
                "id": userid,
980
                "descp": $("#descp").val()
981
            },
982
            "contentType": "application/x-www-form-urlencoded",
983
            "success": function($data) {
984
                //debugger;;
985
                if($data.success) {
986
                    $(".infor-browse").css("display", "block");
987
                    $(".indu").css("display", "none");
988
                    $("#descpS").text($("#descp").val());
989
                } else {
990
                    $.MsgBox.Alert("message", $data.msg);
991
                }
992
            }
993
        })
994
    })
995
    //学术领域添加
996
    $("#subjectAdd").click(function() {
997
        var val = $("#subject").val();
998
        if(!val) {
999
            $.MsgBox.Alert("消息提醒", "内容不能为空");
1000
            return;
1001
        }
1002
        var inV = $("#subjectList .acad");
1003
        for(var i = 0; i < inV.length; i++) {
1004
            if(inV[i].innerText == val) {
1005
                $.MsgBox.Alert("消息提醒", "不能添加重复内容");
1006
                return;
1007
            }
1008
        }
1009
        $("#subjectList").append("<div class='acad'>" + val + "<span class='remove'><img src='images/move.png'></span></div>")
1010
        $("#subject").val("")
1011
    })
1012
    //学术领域删除
1013
    $("#subjectList").on("click", ".remove", function() {
1014
        $(this).parent().remove();
1015
    })
1016
    //学术领域保存
1017
    $("#subjectSave").on("click", function() {
1018
        var subjects = $("#subjectList .acad");
1019
        var subjectAll = "";
1020
        if(subjects.size() > 0) {
1021
            for(var i = 0; i < subjects.size(); i++) {
1022
                subjectAll += subjects[i].innerText;
1023
                subjectAll += ',';
1024
            };
1025
            subjectAll = subjectAll.substring(0, subjectAll.length - 1);
1026
        }
1027
        $.ajax({
1028
            "url": "/ajax/professor/subject",
1029
            "type": "POST",
1030
            "data": {
1031
                "id": userid,
1032
                "subject": subjectAll
1033
            },
1034
            "contentType": "application/x-www-form-urlencoded",
1035
            "success": function($data) {
1036
                if($data.success) {
1037
                    $("#subject").val("");
1038
                    $("#subjectShow").empty();
1039
                    $("#subjectList").empty();
1040
                    $(".indu").css("display", "none");
1041
                    $(".infor-browse").css("display", "block");
1042
                    subjectShow(subjectAll);
1043
                } else {
1044
                    $.MsgBox.Alert("message", $data.msg);
1045
                }
1046
            }
1047
        });
1048
    })
1049
    //应用行业添加
1050
    $("#industryAdd").click(function() {
1051
        var val = $("#industry").val();
1052
        if(!val) {
1053
            $.MsgBox.Alert("消息提醒", "内容不能为空");
1054
            return;
1055
        }
1056
        var inV = $("#industryList .acad");
1057
        for(var i = 0; i < inV.length; i++) {
1058
            if(inV[i].innerText == val) {
1059
                $.MsgBox.Alert("消息提醒", "不能添加重复内容");
1060
                return;
1061
            }
1062
        }
1063
        $("#industryList").append("<div class='acad'>" + val + "<span class='remove'><img src='images/move.png'></span></div>")
1064
        $("#industry").val("")
1065
    })
1066
    //应用行业删除
1067
    $("#industryList").on("click", ".remove", function() {
1068
        $(this).parent().remove();
1069
    })
1070
    //应用行业保存
1071
    $("#industrySave").on("click", function() {
1072
        var industrys = $("#industryList .acad");
1073
        var industryAll = "";
1074
        if(industrys.size() > 0) {
1075
            for(var i = 0; i < industrys.size(); i++) {
1076
                industryAll += industrys[i].innerText;
1077
                industryAll += ',';
1078
            };
1079
            industryAll = industryAll.substring(0, industryAll.length - 1);
1080
        }
1081
        $.ajax({
1082
            "url": "/ajax/professor/industry",
1083
            "type": "POST",
1084
            "data": {
1085
                "id": userid,
1086
                "industry": industryAll
1087
            },
1088
            "contentType": "application/x-www-form-urlencoded",
1089
            "success": function($data) {
1090
                if($data.success) {
1091
                    $("#industry").val("");
1092
                    $("#industryShow").empty();
1093
                    $("#industryList").empty();
1094
                    $(".indu").css("display", "none");
1095
                    $(".infor-browse").css("display", "block");
1096
                    industryShow(industryAll);
1097
                } else {
1098
                    $.MsgBox.Alert("message", $data.msg);
1099
                }
1100
            }
1101
        });
1102
    })
1103
    //研究方向添加
1104
    $("#researchAreaAdd").click(function() {
1105
        var researchArea = $("#researchArea").val();
1106
        if(!researchArea) {
1107
            $.MsgBox.Alert("消息提醒", "内容不能为空");
1108
            return;
1109
        }
1110
        var inV = $("#researchAreaList .ra");
1111
        for(var i = 0; i < inV.length; i++) {
1112
            if(inV[i].innerText == researchArea) {
1113
                $.MsgBox.Alert("消息提醒", "不能添加重复内容");
1114
                return;
1115
            }
1116
        }
1117
        $("#researchAreaList").append("<div class='list'><span class='like'>0</span><span class='ra'>" + researchArea + "</span><span class='remove'><img src='images/move.png'></span></div>")
1118
        $("#researchArea").val("");
1119
    });
1120
1121
    //研究方向删除
1122
    $("#researchAreaList").on("click", ".remove", function() {
1123
        $(this).parent().remove();
1124
    })
1125
    //研究方向保存
1126
    $("#researchAreaSave").on("click", function() {
1127
        //debugger;
1128
        var $data = [];
1129
        var researchAreas = $("#researchAreaList .list .ra");
1130
        if(researchAreas.length > 0) {
1131
            for(var i = 0; i < researchAreas.length; i++) {
1132
                var $rd = {};
1133
                $rd.professorId = userid;
1134
                $rd.caption = researchAreas[i].innerText;
1135
                $data[i] = $rd;
1136
            }
1137
        }
1138
        var $has = $data.length > 0;
1139
        $.ajax({
1140
            "url": $has ? "../ajax/researchArea" : "../ajax/researchArea/" + userid,
1141
            "type": $has ? "PUT" : "DELETE",
1142
            "data": $has ? JSON.stringify($data) : null,
1143
            "contentType": $has ? "application/json" : "application/x-www-form-urlencoded",
1144
            "success": function($data) {
1145
                if($data.success) {
1146
                    $.get("/ajax/professor/info/" + userid, function($data) {
1147
                        if($data.success) {
1148
                            $("#researchAreaShow").empty("");
1149
                            $("#researchAreaShow").show();
1150
                            $(".indu").hide();
1151
                            researchAreaShow($data.data.researchAreas, $data.data.editResearchAreaLogs);
1152
                        }
1153
                    });
1154
1155
                } else {
1156
                    $.MsgBox.Alert("message", $data.msg);
1157
                }
1158
            }
1159
        });
1160
    })
1161
    /*Ӧ����ҵ�������*/
1162
    $("#other").click(function() {
1163
        $(".addbox").toggle();
1164
    });
1165
    //教育背景最下面的例子
1166
    $("#eduBgList").on("mouseover mouseout", ".eg", function(even) {
1167
        if(event.type == "mouseover") {
1168
            $(this).find("span").show();
1169
        } else if(event.type == "mouseout") {
1170
            $(this).find("span").hide();
1171
        }
1172
    })
1173
1174
    function trim(str) { //删除左右两端的空格			  
1175
        return str.replace(/(^\s*)|(\s*$)/g, "");
1176
    }
1177
    $("#eduUl").on("blur", ".school", function() {
1178
        var valueE = $(this).val();
1179
        var length = trim(valueE);
1180
        if(!length) {
1181
            $.MsgBox.Alert("消息", "学校不能为空");
1182
        }
1183
    })
1184
    //教育背景填充函数
1185
    var eduFil = function(select) {
1186
        var string = '<li class="listnone1" style="display:none">'
1187
        string += '<div class="modifybox" style="display:block">'
1188
        string += '<form class="txtExpForm">'
1189
        string += '<div class="infor edu">'
1190
        string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">学</em>校</div>'
1191
        string += '<input type="hidden" class="eduId">'
1192
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt school"></div>'
1193
        string += '</div>'
1194
        string += '<div class="edu date-box clearfix">'
1195
        string += '<div class="txtType floatL">毕业年份</div>'
1196
        string += '<div class="txtExp floatL">'
1197
        string += '<input type="text" class="date-btn input-txt edu-txt year" name="YYYY" flag="1" value="">'
1198
        string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
1199
        string += '<ul class="full_year">'
1200
        string += '</ul>'
1201
        string += '</div>'
1202
        string += '</div>'
1203
        string += '</div>'
1204
        string += '<div class="infor edu">'
1205
        string += '<div class="txtType floatL"><em class="emspace">院</em>系</div>'
1206
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college"></div>'
1207
        string += '</div>'
1208
        string += '<div class="infor edu">'
1209
        string += '<div class="txtType floatL"><em class="emspace">专</em>业</div>'
1210
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" ></div>'
1211
        string += '</div>'
1212
        string += '<div class="edu ulbox clearfix">'
1213
        string += '<div class="txtType floatL">获得学位</div>'
1214
        string += '<div class="mr_timed_div input-txt edu-txt floatL">'
1215
        string += '<i class="mr_sj"></i>'
1216
        string += '<input type="hidden" name="degree_text">'
1217
        string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="本科">'
1218
        string += '<div class="xl_list">'
1219
        string += '<ul class="ul_edubg ulShow" style="display:none">'
1220
        string += '<li>学士</li>'
1221
        string += '<li>硕士</li>'
1222
        string += '<li>博士</li>'
1223
        string += '<li>其他</li>'
1224
        string += '</ul>'
1225
        string += '</div>'
1226
        string += '</div>'
1227
        string += '</div>'
1228
        string += '<div class="btnbox">'
1229
        string += '<input type="button" value="添加" class="infor-save btn" class="saveEduBg">'
1230
        string += '<input type="button" value="取消" class="close1 close2 btn">'
1231
        string += '</div>'
1232
        string += '</form>'
1233
        string += '</div>'
1234
        string += '</li>'
1235
        $("" + select + "").prepend(string);
1236
    }
1237
    //教育背景添加
1238
    $("#addEdu").on("click", function() {
1239
        $("#eduUl").find(".listnone1").toggle(100);
1240
    });
1241
    $("#eduUl").on("click", ".close1", function() {
1242
        $("#eduUl").find(".listnone1").toggle(100);
1243
    });
1244
    $("#eduUl").on("click", "em", function() {
1245
        $(this).parent().hide();
1246
        $(this).parent().siblings().show();
1247
        //$(this).parent().parent().children(".")
1248
    });
1249
    $("#eduUl").on("click", ".mr_btn", function() {
1250
        $(this).siblings(".xl_list").children("ul").show();
1251
    });
1252
    $("#eduUl").on("click", ".ul_edubg li", function() {
1253
        $(this).parents(".xl_list").siblings(".mr_btn").val($(this).text());
1254
        $(this).parent().hide();
1255
    });
1256
    $("#eduUl").on("click", ".close", function() {
1257
        $(this).parents(".modifybox").hide();
1258
        $(this).parents(".modifybox").siblings().show();
1259
1260
    });
1261
1262
    $("#eduUl").on("click", ".deletebtn", function() {
1263
        var deuId = $(this).parents(".txtExpForm").find(".eduId").val();
1264
        delEdu(deuId);
1265
    });
1266
    //教育背景,对已经添加的背景删除
1267
    var delEdu = function(data) {
1268
        $.ajax({
1269
            "url": "/ajax/edu/" + data,
1270
            "type": "DELETE",
1271
            "success": function($data) {
1272
                if($data.success) {
1273
                    $.get("/ajax/professor/info/" + userid, function($data) {
1274
                        if($data.success) {
1275
                            $("#eduUl").empty("");
1276
                            eduBgShow($data.data.edus);
1277
                        }
1278
                    });
1279
                } else {
1280
                    alert($data.msg);
1281
                }
1282
            }
1283
        });
1284
    }
1285
    //教育背景保存
1286
    $("#eduUl").on("click", ".infor-save", function() {
1287
        var length = trim($(this).parents(".txtExpForm").find(".school").val());
1288
        if(!length) {
1289
            $.MsgBox.Alert("消息", "学校不能为空");
1290
            return;
1291
        }
1292
        var $data = {};
1293
        var $id = $(this).parents(".txtExpForm").find(".eduId").val();
1294
        if($id) {
1295
            $data.id = $id;
1296
        }
1297
        $data.professorId = userid;
1298
        $data.year = $(this).parents(".txtExpForm").find(".year").val();
1299
        $data.school = $(this).parents(".txtExpForm").find(".school").val();
1300
        $data.college = $(this).parents(".txtExpForm").find(".college").val();
1301
        $data.major = $(this).parents(".txtExpForm").find(".major").val();
1302
        $data.degree = $(this).parents(".txtExpForm").find(".mr_btn").val();
1303
        $.ajax({
1304
            "url": "/ajax/edu",
1305
            "type": $id ? "PUT" : "POST",
1306
            "data": $id ? JSON.stringify($data) : $data,
1307
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
1308
            "success": function($data) {
1309
                if($data.success) {
1310
                    $.get("/ajax/professor/info/" + userid, function($data) {
1311
                        if($data.success) {
1312
                            $("#eduUl").empty("");
1313
                            eduBgShow($data.data.edus);
1314
                            yearAdd();
1315
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1316
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1317
                        }
1318
                    });
1319
                } else {
1320
                    $.MsgBox.Alert("message", $data.msg);
1321
                }
1322
            }
1323
        });
1324
    })
1325
    //社会兼职
1326
    $("#timeJobShow").on("blur", ".jobCompany", function() {
1327
        var valueE = $(this).val();
1328
        var length = trim(valueE);
1329
        if(!length) {
1330
            $.MsgBox.Alert("消息", "机构名称不能为空");
1331
        }
1332
    })
1333
    $("#timeJobShow").on("blur", ".jobTitle", function() {
1334
        var valueE = $(this).val();
1335
        var length = trim(valueE);
1336
        if(!length) {
1337
            $.MsgBox.Alert("消息", "职位不能为空");
1338
        }
1339
    })
1340
    var jobFil = function(select) {
1341
        var string = '<li class="listnone1" style="display:none">'
1342
        string += '<div class="modifybox" style="display:block;">'
1343
        string += '<form class="txtExpForm">'
1344
        string += '<div class="infor edu">'
1345
        string += '<div class="txtType floatL"><b class="required_star"></b>机构名称</div>'
1346
        string += '<input type="hidden" class="jobId">'
1347
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobCompany" /></div>'
1348
        string += '</div>'
1349
        string += '<div class="edu date-box clearfix">'
1350
        string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
1351
        string += '<div class="txtExp floatL">'
1352
        string += '<div class="dateExp floatL">'
1353
        string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt startMonth" flag="2" difference="1" value="">'
1354
        string += '<div class="mr_calendar_ym clearfix">'
1355
        string += '<ul class="mr_year">'
1356
        string += '</ul>'
1357
        string += '<ul class="mr_month">'
1358
        string += '</ul>'
1359
        string += '</div>'
1360
        string += '</div>'
1361
        string += '<div class="lineTo floatL"></div>'
1362
        string += '<div class="dateExp floatL">'
1363
        string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt stopMonth" flag="2" difference="2"  value="">'
1364
        string += '<div class="mr_calendar_ym clearfix">'
1365
        string += '<ul class="mr_year">'
1366
        string += '<li class="ymli">至今</li>'
1367
        string += '</ul>'
1368
        string += '<ul class="mr_month">'
1369
        string += '</ul>'
1370
        string += '</div>'
1371
        string += '</div>'
1372
        string += '</div>'
1373
        string += '</div>'
1374
        string += '<div class="infor edu btn-marL">'
1375
        string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">职</em>位</div>'
1376
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobTitle" /></div>'
1377
        string += '</div>'
1378
        string += '<div class="infor edu btn-marL">'
1379
        string += '<div class="txtType floatL">所在部门</div>'
1380
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobdepartment" /></div>'
1381
        string += '</div>'
1382
        string += '<div class="btnbox">'
1383
        string += '<input type="button" value="添加" class="infor-save btn btn-marL">'
1384
        string += '<input type="button" value="取消" class="close1 close2 btn btn-marB">'
1385
        string += '</div>'
1386
        string += '</form>'
1387
        string += '</div>'
1388
        string += '</li>'
1389
        $("" + select + "").prepend(string);
1390
    }
1391
    //专利添加
1392
    $("#timeJobAdd").on("click", function() {
1393
        $("#timeJobShow").find(".listnone1").toggle(100);
1394
    });
1395
    $("#timeJobShow").on("click", ".close1", function() {
1396
        $("#timeJobShow").find(".listnone1").toggle(100);
1397
    });
1398
    $("#timeJobShow").on("click", "em", function() {
1399
        $(this).parent().hide();
1400
        $(this).parent().siblings().show();
1401
        //$(this).parent().parent().children(".")
1402
    });
1403
    $("#timeJobShow").on("click", ".close", function() {
1404
        $(this).parents(".modifybox").hide();
1405
        $(this).parents(".modifybox").siblings().show();
1406
    });
1407
    $("#timeJobShow").on("click", ".deletebtn", function() {
1408
        var deuId = $(this).parents(".txtExpForm").find(".jobId").val();
1409
        delTimeJob(deuId);
1410
    });
1411
    //社会兼职,对添加的兼职删除
1412
    var delTimeJob = function(data) {
1413
        $.ajax({
1414
            "url": "/ajax/job/" + data,
1415
            "type": "DELETE",
1416
            "success": function($data) {
1417
                if($data.success) {
1418
                    $.get("/ajax/professor/info/" + userid, function($data) {
1419
                        if($data.success) {
1420
                            $("#timeJobShow").empty("");
1421
                            timeJobShow($data.data.jobs);
1422
                        }
1423
                    });
1424
                } else {
1425
                    alert($data.msg);
1426
                }
1427
            }
1428
        });
1429
    }
1430
    //社会兼职保存
1431
    $("#timeJobShow").on("click", ".infor-save", function() {
1432
        var length1 = trim($(this).parents(".txtExpForm").find(".jobCompany").val());
1433
        var length2 = trim($(this).parents(".txtExpForm").find(".jobTitle").val());
1434
        var length3 = trim($(this).parents(".txtExpForm").find(".startMonth").val());
1435
        var length4 = trim($(this).parents(".txtExpForm").find(".stopMonth").val());
1436
        if(!length3 && length4) {
1437
            $.MsgBox.Alert("消息", "没有选开始时间");
1438
            return;
1439
        } else if(length3 && !length4) {
1440
            $.MsgBox.Alert("消息", "没有选结束时间");
1441
            return;
1442
        }
1443
        if(!length1 && length2) {
1444
            $.MsgBox.Alert("消息", "机构名称不能为空");
1445
            return;
1446
        } else if(length1 && !length2) {
1447
            $.MsgBox.Alert("消息", "职位不能为空");
1448
            return;
1449
        } else if(!length1 && !length2) {
1450
            $.MsgBox.Alert("消息", "职位&&机构名称不能为空");
1451
            return;
1452
        }
1453
        var $data = {};
1454
        var $id = $(this).parents(".txtExpForm").find(".jobId").val();
1455
        if($id) {
1456
            $data.id = $id;
1457
        }
1458
        $data.professorId = userid;
1459
        $data.company = $(this).parents(".txtExpForm").find(".jobCompany").val();
1460
        $data.department = $(this).parents(".txtExpForm").find(".jobdepartment").val();
1461
        var s = $(this).parents(".txtExpForm").find(".startMonth").val();
1462
        var st = $(this).parents(".txtExpForm").find(".stopMonth").val();
1463
        if(s) {
1464
            $data.startMonth = s.substr(0, 4) + s.substr(5, 6);
1465
        }
1466
        if(st) {
1467
            if(st == "至今") {} else {
1468
                $data.stopMonth = st.substr(0, 4) + st.substr(5, 6);
1469
            }
1470
        }
1471
        $data.title = $(this).parents(".txtExpForm").find(".jobTitle").val();
1472
        $.ajax({
1473
            "url": "/ajax/job",
1474
            "type": $id ? "PUT" : "POST",
1475
            "data": $id ? JSON.stringify($data) : $data,
1476
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
1477
            beforeSend: function() {
1478
                //console.log(this.data)
1479
            },
1480
            "success": function($data) {
1481
                if($data.success) {
1482
1483
                    $.get("/ajax/professor/info/" + userid, function($data) {
1484
                        if($data.success) {
1485
                            $("#timeJobShow").empty("");
1486
                            timeJobShow($data.data.jobs);
1487
                            yearAdd();
1488
                            month();
1489
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1490
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1491
                        }
1492
                    });
1493
                } else {
1494
                    $.MsgBox.Alert("message", $data.msg);
1495
                }
1496
            }
1497
        });
1498
    })
1499
    //项目经历
1500
    $("#projectShow").on("blur", ".projectName", function() {
1501
        var valueE = $(this).val();
1502
        var length = trim(valueE);
1503
        if(!length) {
1504
            $.MsgBox.Alert("消息", "项目名称不能为空");
1505
        }
1506
    });
1507
1508
    var projectFil = function(select) {
1509
        var string = '<li class="listnone1" style="display:none;">'
1510
        string += '<div class="modifybox" style="display:block;">'
1511
        string += '<form class="txtExpForm">'
1512
        string += '<div class="infor edu">'
1513
        string += '<div class="txtType floatL"><b class="required_star"></b>项目名称</div>'
1514
        string += '<input type="hidden" class="projectId" />'
1515
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectName"></div>'
1516
        string += '</div>'
1517
        string += '<div class="edu date-box clearfix">'
1518
        string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
1519
        string += '<div class="txtExp floatL">'
1520
        string += '<div class="dateExp floatL">'
1521
        string += '<input type="text" class="date-btn input-txt edu-txt project StartMonth" flag="2" difference="1"  value="">'
1522
        string += '<div class="mr_calendar_ym clearfix">'
1523
        string += '<ul class="mr_year">'
1524
        string += '</ul>'
1525
        string += '<ul class="mr_month">'
1526
        string += '</ul>'
1527
        string += '</div>'
1528
        string += '</div>'
1529
        string += '<div class="lineTo floatL"></div>'
1530
        string += '<div class="dateExp floatL">'
1531
        string += '<input type="text" class="date-btn input-txt edu-txt project StopMonth" flag="2" difference="2" value="">'
1532
        string += '<div class="mr_calendar_ym clearfix">'
1533
        string += '<ul class="mr_year">'
1534
        string += '<li class="ymli">至今</li>'
1535
        string += '</ul>'
1536
        string += '<ul class="mr_month">'
1537
        string += '</ul>'
1538
        string += '</div>'
1539
        string += '</div>'
1540
        string += '</div>'
1541
        string += '</div>'
1542
        string += '<div class="infor edu">'
1543
        string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
1544
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectDescp" ></div>'
1545
        string += '</div>'
1546
        string += '<div class="btnbox">'
1547
        string += '<input type="button" value="添加" class="infor-save btn">'
1548
        string += '<input type="button" value="取消" class="close1 close2 btn">'
1549
        string += '</div>'
1550
        string += '</form>'
1551
        string += '</div>'
1552
        string += '</li>'
1553
        $("" + select + "").prepend(string);
1554
    }
1555
    $("#projectAdd").on("click", function() {
1556
        $("#projectShow").find(".listnone1").toggle(100);
1557
    });
1558
    $("#projectShow").on("click", ".close1", function() {
1559
        $("#projectShow").find(".listnone1").toggle(100);
1560
    });
1561
    $("#projectShow").on("click", "em", function() {
1562
        $(this).parent().parent().hide();
1563
        $(this).parent().parent().siblings().show();
1564
        //$(this).parent().parent().children(".")
1565
    });
1566
    $("#projectShow").on("click", ".close", function() {
1567
        $(this).parents(".modifybox").hide();
1568
        $(this).parents(".modifybox").siblings().show();
1569
    });
1570
    $("#projectShow").on("click", ".deletebtn", function() {
1571
        var deuId = $(this).parents(".txtExpForm").find(".projectId").val();
1572
        delProject(deuId);
1573
    });
1574
    //项目经历,对添加的项目删除
1575
    var delProject = function(data) {
1576
        $.ajax({
1577
            "url": "/ajax/project/" + data,
1578
            "type": "DELETE",
1579
            "success": function($data) {
1580
                if($data.success) {
1581
                    $.get("/ajax/professor/info/" + userid, function($data) {
1582
                        if($data.success) {
1583
                            $("#projectShow").empty("");
1584
                            projectShow($data.data.projects);
1585
                        }
1586
                    });
1587
                } else {
1588
                    alert($data.msg);
1589
                }
1590
            }
1591
        });
1592
    }
1593
1594
    //项目经历保存
1595
    $("#projectShow").on("click", ".infor-save", function() {
1596
        var length = trim($(this).parents(".txtExpForm").find(".projectName").val());
1597
        var length1 = trim($(this).parents(".txtExpForm").find(".StartMonth").val());
1598
        var length2 = trim($(this).parents(".txtExpForm").find(".StopMonth").val());
1599
        if(!length) {
1600
            $.MsgBox.Alert("消息", "项目名称不能为空");
1601
            return;
1602
        }
1603
        if(length1 && !length2) {
1604
            $.MsgBox.Alert("消息", "没有选结束时间");
1605
            return;
1606
        }
1607
        if(!length1 && length2) {
1608
            $.MsgBox.Alert("消息", "没有选开始时间");
1609
            return;
1610
        }
1611
        var $data = {};
1612
        var $id = $(this).parents(".txtExpForm").find(".projectId").val();
1613
        //console.log($id);
1614
        if($id) {
1615
            $data.id = $id;
1616
        }
1617
        $data.professorId = userid;
1618
        var s = $(this).parents(".txtExpForm").find(".StartMonth").val();
1619
        var st = $(this).parents(".txtExpForm").find(".StopMonth").val();
1620
        if(s) {
1621
            $data.startMonth = s.substr(0, 4) + s.substr(5, 6);
1622
        }
1623
        if(st) {
1624
            if(st == "至今") {} else {
1625
                $data.stopMonth = st.substr(0, 4) + st.substr(5, 6);
1626
            }
1627
        }
1628
1629
        $data.name = $(this).parents(".txtExpForm").find(".projectName").val()
1630
        $data.descp = $(this).parents(".txtExpForm").find(".projectDescp").val()
1631
        $.ajax({
1632
            "url": "../ajax/project",
1633
            "type": $id ? "PUT" : "POST",
1634
            "data": $id ? JSON.stringify($data) : $data,
1635
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
1636
            "success": function($data) {
1637
                if($data.success) {
1638
                    $.get("/ajax/professor/info/" + userid, function($data) {
1639
                        if($data.success) {
1640
                            $("#projectShow").empty("");
1641
                            projectShow($data.data.projects);
1642
                            yearAdd();
1643
                            month();
1644
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1645
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1646
                        }
1647
                    });
1648
                } else {
1649
                    $.MsgBox.Alert("message", $data.msg);
1650
                }
1651
            }
1652
        });
1653
    })
1654
    //著作论文 文章
1655
1656
    var papFil = function(select) {
1657
        var string = '<li class="listnone1" style="display:none;" >'
1658
        string += '<div class="modifybox" style="display:block;">'
1659
        string += '<form class="txtExpForm">'
1660
        string += '<div class="infor edu">'
1661
        string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
1662
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperName" ></div>'
1663
        string += '</div>'
1664
        string += '<div class="edu date-box clearfix">'
1665
        string += '<div class="txtType floatL">发表时间</div>'
1666
        string += '<div class="txtExp floatL">'
1667
        string += '<input type="text" class="date-btn input-txt edu-txt paperYear" flag="1" value="">'
1668
        string += '<div class="mr_calendar_ym clearfix" style="wclassth: 180px; display: none;">'
1669
        string += '<ul class="full_year">'
1670
        string += '</ul>'
1671
        string += '</div>'
1672
        string += '</div>'
1673
        string += '</div>'
1674
        string += '<div class="infor edu">'
1675
        string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
1676
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperDescp" ></div>'
1677
        string += '</div>'
1678
        //		string += '<div class="infor edu">'
1679
        //		string += '<div class="txtType floatL"><em class="emspace">链</em>接</div>'
1680
        //		string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperUrl"></div>'
1681
        //		string += '</div>'
1682
        string += '<div class="btnbox">'
1683
        string += '<input type="hidden" class="paperId">'
1684
        string += '<input type="button" value="添加" class="infor-save btn" class="paperSave">'
1685
        string += '<input type="button" value="取消" class="close1 close2 btn">'
1686
        string += '</div></form></div></li>'
1687
        $("" + select + "").prepend(string);
1688
    }
1689
    $("#paperShow").on("blur", ".paperName", function() {
1690
        var valueE = $(this).val();
1691
        var length = trim(valueE);
1692
        if(!length) {
1693
            $.MsgBox.Alert("消息", "标题不能为空");
1694
        }
1695
    })
1696
    $("#papAdd").on("click", function() {
1697
        $("#paperShow").find(".listnone1").toggle(100);
1698
    });
1699
    $("#paperShow").on("click", ".close1", function() {
1700
        $("#paperShow").find(".listnone1").toggle(100);
1701
    });
1702
    $("#paperShow").on("click", "em", function() {
1703
        $(this).parent().parent().hide();
1704
        $(this).parent().parent().siblings().show();
1705
        //$(this).parent().parent().children(".")
1706
    });
1707
    $("#paperShow").on("click", ".close", function() {
1708
        $(this).parents(".modifybox").hide();
1709
        $(this).parents(".modifybox").siblings().show();
1710
1711
    });
1712
    $("#paperShow").on("click", ".deletebtn", function() {
1713
        var deuId = $(this).parents(".txtExpForm").find(".paperId").val();
1714
        delPaper(deuId);
1715
    });
1716
    //著作论文 文章 ,对添加的论文删除
1717
    var delPaper = function(data) {
1718
        $.ajax({
1719
            "url": "../ajax/paper/" + data,
1720
            "type": "DELETE",
1721
            "success": function($data) {
1722
                if($data.success) {
1723
                    $.get("/ajax/professor/info/" + userid, function($data) {
1724
                        if($data.success) {
1725
                            $("#paperShow").empty("");
1726
                            paperShow($data.data.papers);
1727
                        }
1728
                    });
1729
                } else {
1730
                    alert($data.msg);
1731
                }
1732
            }
1733
        });
1734
    }
1735
    //著作 论文 文章 保存
1736
    $("#paperShow").on("click", ".infor-save", function() {
1737
        var length = trim($(this).parents(".txtExpForm").find(".paperName").val());
1738
        if(!length) {
1739
            $.MsgBox.Alert("消息", "标题不能为空");
1740
            return;
1741
        }
1742
        var $data = {};
1743
        var $id = $(this).parents(".txtExpForm").find(".paperId").val();
1744
        if($id) {
1745
            $data.id = $id;
1746
        }
1747
        $data.professorId = userid;
1748
        $data.year = $(this).parents(".txtExpForm").find(".paperYear").val();
1749
        $data.name = $(this).parents(".txtExpForm").find(".paperName").val();
1750
        $data.descp = $(this).parents(".txtExpForm").find(".paperDescp").val();
1751
        $data.url = $(this).parents(".txtExpForm").find(".paperUrl").val();
1752
        $.ajax({
1753
            "url": "../ajax/paper",
1754
            "type": $id ? "PUT" : "POST",
1755
            "data": $id ? JSON.stringify($data) : $data,
1756
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
1757
            "success": function($data) {
1758
                if($data.success) {
1759
                    $.get("/ajax/professor/info/" + userid, function($data) {
1760
                        if($data.success) {
1761
                            $("#paperShow").empty("");
1762
                            paperShow($data.data.papers);
1763
                            yearAdd();
1764
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1765
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1766
                        }
1767
                    });
1768
                } else {
1769
                    $.MsgBox.Alert("message", $data.msg);
1770
                }
1771
            }
1772
        });
1773
    });
1774
    //专利
1775
    $("#patentShow").on("blur", ".patentName", function() {
1776
        var valueE = $(this).val();
1777
        var length = trim(valueE);
1778
        if(!length) {
1779
            $.MsgBox.Alert("消息", "标题不能为空");
1780
        }
1781
    })
1782
    var patFil = function(select) {
1783
        var string = '<li class="listnone1" style="display:none;">'
1784
        string += '<div class="modifybox" style="display:block;">'
1785
        string += '<form class="txtExpForm">'
1786
        string += '<div class="infor edu">'
1787
        string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
1788
        string += '<input type="hidden" class="patentId">'
1789
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentName"></div>'
1790
        string += '</div>'
1791
        string += '<div class="edu date-box clearfix">'
1792
        string += '<div class="txtType floatL">发表时间</div>'
1793
        string += '<div class="txtExp floatL">'
1794
        string += '<input type="text" class="date-btn input-txt edu-txt patentYear" flag="1" value="">'
1795
        string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
1796
        string += '<ul class="full_year">'
1797
        string += '</ul>'
1798
        string += '</div>'
1799
        string += '</div>'
1800
        string += '</div>'
1801
        //		string += '<div class="infor edu">'
1802
        //		string += '<div class="txtType floatL"><em class="emspace">链</em>接</div>'
1803
        //		string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentUrl"></div>'
1804
        //		string += '</div>'
1805
        string += '<div class="infor edu">'
1806
        string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
1807
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"></div>'
1808
        string += '</div>'
1809
        string += '<div class="btnbox">'
1810
        string += '<input type="button" value="添加" class="infor-save btn">'
1811
        string += '<input type="button" value="取消" class="close1 close2 btn">'
1812
        string += '</div>'
1813
        string += '</form>'
1814
        string += '</div>'
1815
        string += '</li>'
1816
        $("" + select + "").prepend(string);
1817
    }
1818
    //专利添加
1819
    $("#patenAdd").on("click", function() {
1820
        $("#patentShow").find(".listnone1").toggle(100);
1821
    });
1822
    $("#patentShow").on("click", ".close1", function() {
1823
        $("#patentShow").find(".listnone1").toggle(100);
1824
    });
1825
    $("#patentShow").on("click", "em", function() {
1826
        $(this).parent().parent().hide();
1827
        $(this).parent().parent().siblings().show();
1828
        //$(this).parent().parent().children(".")
1829
    });
1830
    $("#patentShow").on("click", ".close", function() {
1831
        $(this).parents(".modifybox").hide();
1832
        $(this).parents(".modifybox").siblings().show();
1833
1834
    });
1835
1836
    $("#patentShow").on("click", ".deletebtn", function() {
1837
        var deuId = $(this).parents(".txtExpForm").find(".patentId").val();
1838
        delPatent(deuId);
1839
    })
1840
    //专利 ,对添加的专利删除
1841
    var delPatent = function(data) {
1842
        $.ajax({
1843
            "url": "/ajax/patent/" + data,
1844
            "type": "DELETE",
1845
            "success": function($data) {
1846
                if($data.success) {
1847
                    $.get("/ajax/professor/info/" + userid, function($data) {
1848
                        if($data.success) {
1849
                            $("#patentShow").empty();
1850
                            patentShow($data.data.patents);
1851
1852
                        }
1853
                    });
1854
                } else {
1855
                    alert($data.msg);
1856
                }
1857
            }
1858
        });
1859
    }
1860
1861
    //专利保存
1862
    $("#patentShow").on("click", ".infor-save", function() {
1863
        var length = trim($(this).parents(".txtExpForm").find(".patentName").val());
1864
        if(!length) {
1865
            $.MsgBox.Alert("消息", "标题不能为空");
1866
            return;
1867
        }
1868
        var $data = {};
1869
        var $id = $(this).parents(".txtExpForm").find(".patentId").val();
1870
        if($id) {
1871
            $data.id = $id;
1872
        }
1873
        $data.professorId = userid;
1874
        $data.year = $(this).parents(".txtExpForm").find(".patentYear").val();
1875
        $data.name = $(this).parents(".txtExpForm").find(".patentName").val();
1876
        $data.descp = $(this).parents(".txtExpForm").find(".patentDescp").val();
1877
        $data.url = $(this).parents(".txtExpForm").find(".patentUrl").val();
1878
        $.ajax({
1879
            "url": "../ajax/patent",
1880
            "type": $id ? "PUT" : "POST",
1881
            "data": $id ? JSON.stringify($data) : $data,
1882
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
1883
            "success": function($data) {
1884
                if($data.success) {
1885
1886
                    $.get("/ajax/professor/info/" + userid, function($data) {
1887
                        if($data.success) {
1888
                            $("#patentShow").empty("");
1889
                            patentShow($data.data.patents);
1890
                            yearAdd();
1891
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1892
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
1893
                        }
1894
                    });
1895
                } else {
1896
                    $.MsgBox.Alert("message", $data.msg);
1897
                }
1898
            }
1899
        });
1900
    })
1901
    //荣誉及奖项
1902
    $("#honorShow").on("blur", ".honorName", function() {
1903
        var valueE = $(this).val();
1904
        var length = trim(valueE);
1905
        if(!length) {
1906
            $.MsgBox.Alert("消息", "标题不能为空");
1907
        }
1908
    })
1909
    var hounerFil = function(select) {
1910
        var string = '<li class="listnone1" style="display:none">'
1911
        string += '<div class="modifybox" style="display:block">'
1912
        string += '<form class="txtExpForm">'
1913
        string += '<div class="infor edu">'
1914
        string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
1915
        string += '<input type="hidden" class="honorId">'
1916
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt honorName"></div>'
1917
        string += '</div>'
1918
        string += '<div class="infor edu">'
1919
        string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
1920
        string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"></div>'
1921
        string += '</div>'
1922
        string += '<div class="edu date-box clearfix">'
1923
        string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
1924
        string += '<div class="txtExp floatL">'
1925
        string += '<input type="text" class="date-btn input-txt edu-txt honorYear" flag="1" value="">'
1926
        string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
1927
        string += '<ul class="full_year">'
1928
        string += '</ul>'
1929
        string += '</div>'
1930
        string += '</div>'
1931
        string += '</div>'
1932
        string += '<div class="btnbox">'
1933
        string += '<input type="button" value="添加" class="infor-save btn">'
1934
        string += '<input type="button" value="取消" class="close1 close2 btn">'
1935
        string += '</div>'
1936
        string += '</form>'
1937
        string += '</div>'
1938
        string += '</li>'
1939
        $("" + select + "").prepend(string);
1940
    }
1941
    //专利添加
1942
    $("#honorAdd").on("click", function() {
1943
        $("#honorShow").find(".listnone1").toggle(100);
1944
    });
1945
    $("#honorShow").on("click", ".close1", function() {
1946
        $("#honorShow").find(".listnone1").toggle(100);
1947
    });
1948
    $("#honorShow").on("click", "em", function() {
1949
        $(this).parent().parent().hide();
1950
        $(this).parent().parent().siblings().show();
1951
        //$(this).parent().parent().children(".")
1952
    });
1953
    $("#honorShow").on("click", ".close", function() {
1954
        $(this).parents(".modifybox").hide();
1955
        $(this).parents(".modifybox").siblings().show();
1956
1957
    });
1958
1959
    $("#honorShow").on("click", ".deletebtn", function() {
1960
        var deuId = $(this).parents(".txtExpForm").find(".honorId").val();
1961
        delHonor(deuId);
1962
    });
1963
    //荣誉及奖项 ,对添加的专利删除
1964
    var delHonor = function(data) {
1965
        $.ajax({
1966
            "url": "/ajax/honor/" + data,
1967
            "type": "DELETE",
1968
            "success": function($data) {
1969
                if($data.success) {
1970
                    $.get("/ajax/professor/info/" + userid, function($data) {
1971
                        if($data.success) {
1972
                            $("#honorShow").empty("");
1973
                            honorShow($data.data.honors);
1974
                        }
1975
                    });
1976
                } else {
1977
                    alert($data.msg);
1978
                }
1979
            }
1980
        });
1981
    }
1982
1983
    //function getProfessorData(){
1984
    //	$.get("/ajax/professor/info/" + userid, function($data) {
1985
    //	if ($data.success) {
1986
    //
1987
    //	}
1988
    //	});
1989
    //}
1990
    //getProfessorData()
1991
1992
    //荣誉及奖项保存
1993
    $("#honorShow").on("click", ".infor-save", function() {
1994
        var length = trim($(this).parents(".txtExpForm").find(".honorName").val());
1995
        if(!length) {
1996
            $.MsgBox.Alert("消息", "标题不能为空");
1997
            return;
1998
        }
1999
        var $data = {};
2000
        var $id = $(this).parents(".txtExpForm").find(".honorId").val();
2001
        if($id) {
2002
            $data.id = $id;
2003
        }
2004
        $data.professorId = userid;
2005
        $data.year = $(this).parents(".txtExpForm").find(".honorYear").val();
2006
        $data.name = $(this).parents(".txtExpForm").find(".honorName").val();
2007
        $data.descp = $(this).parents(".txtExpForm").find(".patentDescp").val();
2008
        //console.log($data.descp);
2009
        $.ajax({
2010
            "url": "../ajax/honor",
2011
            "type": $id ? "PUT" : "POST",
2012
            "data": $id ? JSON.stringify($data) : $data,
2013
            "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
2014
            "success": function($data) {
2015
                if($data.success) {
2016
                    $.get("/ajax/professor/info/" + userid, function($data) {
2017
                        if($data.success) {
2018
                            $("#honorShow").empty("");
2019
                            honorShow($data.data.honors);
2020
                            yearAdd();
2021
                            $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
2022
                            $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
2023
                        }
2024
                    });
2025
                } else {
2026
                    $.MsgBox.Alert("message", $data.msg);
2027
                }
2028
            }
2029
        });
2030
    })
2031
    //科研资源
2032
    $.ajax({
2033
        "url": "/ajax/resource/qapro",
2034
        "type": "get",
2035
        "data": {
2036
            "professorId": userid
2037
        },
2038
        "async": true,
2039
        "success": function(data) {
2040
            //console.log(data);
2041
            if(data.data.length == 0) {
2042
                $("#infor-browse").css("display", "none");
2043
            }
2044
            var add = "";
2045
            if(data.success) {
2046
                //console.log(data);
2047
                for(var i = 0; i < data.data.length; i++) {
2048
                    add = '<div class="sharesrc">'
2049
                    add += '<div class="shareshow">'
2050
                    add += '<a><div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
2051
                    add += '<img class="resImg headRadius resourceImg" src="" /></div></a>'
2052
                    add += '<div class="shareopeart"></div>'
2053
                    add += '</div>'
2054
                    add += '<p class="restit ellipsisSty">资源名称:<span class="presou">' + data.data[i].resourceName + '</span></p>'
2055
                    if(data.data[i].supportedServices == undefined) {
2056
                        data.data[i].supportedServices = "";
2057
                    }
2058
                    add += '<p class="briefinfor ellipsisSty-2">应用用途:' + data.data[i].supportedServices + '</p>'
2059
                    add += '</div>'
2060
                    $add = $(add);
2061
                    $("#keyanRe").append($add);
2062
2063
                    /*$(".resouImage").load(function(){})
2064
                     .error(function(){
2065
                     $(this).attr("src","/images/default-resource.jpg");
2066
                     });*/
2067
2068
                    if(data.data[i].images.length) {
2069
                        $add.find(".resourceImg").attr("src", "/images/resource/" + data.data[i].resourceId + ".jpg");
2070
                    } else {
2071
                        $add.find(".resourceImg").attr("src", "/images/default-resource.jpg");
2072
                    }
2073
2074
                    //add="";
2075
                }
2076
                //资源轮播
2077
                var $content = $("#keyanRe");
2078
                var childcount = $content.find(".sharesrc").length;
2079
                Carousel(3, 3, 3, childcount, $content, $(".resoubtn2.resounext"), $(".resoubtn2.resouprev"));
2080
            } else {
2081
                $.MsgBox.Alert("消息", "系统异常!");
2082
            }
2083
        },
2084
        "error": function() {
2085
            $.MsgBox.Alert('message', 'failddd')
2086
        }
2087
    });
2088
    $("#enterwork").on("click", function() {
2089
        location.href = "newsciresource.html";
2090
    })
2091
    //到至今选中复选框的操作
2092
    /*$(".present").click(function(){
2093
     var date = $(".present").index(this);
2094
     $(".datebox").eq(date).find(".ago").remove();
2095
     $(".datebox").eq(date).css("width","326px");
2096
     })*/
2097
    $(".present").change(function() {
2098
        if($(".present").is(":checked")) {
2099
            $(this).parent().parent().find('.ago').hide();
2100
            $(this).parent().parent().find('.inputno').hide();
2101
2102
        } else {
2103
2104
            $(this).parent().parent().find('.ago').show();
2105
            $(this).parent().parent().find('.inputno').show();
2106
        }
2107
    })
2108
    /*科研文章*/
2109
    $.ajax({
2110
        url: "/ajax/article/qaPro",
2111
        dataType: 'json', //数据格式类型
2112
        type: 'GET', //http请求类型
2113
        data: {
2114
            "professorId": userid
2115
        },
2116
        timeout: 10000, //超时设置
2117
        success: function(data) {
2118
            if(data.success) {
2119
                if(!ifuser.authType2) {
2120
                    $("#reA").hide();
2121
                    return;
2122
                } else {
2123
                    $("#reA").show();
2124
                    if(data.data.length == 0) {
2125
                        $("#reachArticle").height(0)
2126
                        return;
2127
                    }
2128
                    for(var i = 0; i < data.data.length; i++) {
2129
                        var add = '<li style="cursor:auto">'
2130
                        add += '<div class="art_topicBox"><div class="art_img" style="cursor:auto"></div>'
2131
                        add += '<div class="art_tbox"><h6 class="ellipsisSty" id="artical_topic" >' + data.data[i].articleTitle + '</h6></div>'
2132
                        add += '</div><div class="tagsBox"><span></span></div>'
2133
                        add += '</li>';
2134
                        $add = $(add);
2135
                        $("#reachArticle").append($add);
2136
                        $add.find('.tagsBox span').text(data.data[i].industry); //data.data[i].subject
2137
                        if(data.data[i].articleImg) {
2138
                            $add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
2139
                        }
2140
2141
                    }
2142
                    //资源轮播
2143
                    var $content2 = $("#keyanAr");
2144
                    var childcount2 = $content2.find(".otherRes.shareshow li").length;
2145
                    Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
2146
                }
2147
            }
2148
        },
2149
        error: function() {
2150
            return;
2151
        }
2152
    });
2153
    $("#enter1work").on("click", function() {
2154
        location.href = "articalList.html";
2155
    })
2156
    /*ģ��Selectѡ���*/
2157
    $(".input_select").click(function() {
2158
        var ul = $(this).next();
2159
        if(ul.css("display") == "none") {
2160
            ul.slideDown("fast");
2161
        } else {
2162
            ul.slideUp("fast");
2163
        }
2164
    });
2165
2166
    $(".divselect ul li a").click(function() {
2167
        var txt = $(this).text();
2168
        $(".divselect .input_select").val(txt);
2169
        var value = $(this).attr("rel");
2170
        $(".divselect ul").hide();
2171
2172
    });
2173
    $("#aclick").on("click", function() {
2174
        exit();
2175
    });
2176
})
2177
2178
function exit() {
2179
    $.cookie('userid', null);
2180
    $.cookie('userAuth', null);
2181
    location.href = "login.html"
2182
}
2183
2184
//获取数据填充页面
2185
2186
/*����*/

+ 0 - 1141
js/information.brow.js

@ -1,1141 +0,0 @@
1
$(function() {
2
	loginStatus();//判断个人是否登录
3
	var userid = $.cookie("userid");
4
	var professorId = GetQueryString("professorId");
5
	var name,orgId,orgAuth;
6
	if(userid == professorId) {
7
		$("#conbtn,.attentBtn").hide();
8
	}
9
	if(professorId) {
10
11
		var subjectShow = function(data) {
12
			if(data != undefined && data.length != 0) {
13
				var subs = new Array();
14
				if(data.indexOf(',')) {
15
					subs = data.split(',');
16
				} else {
17
					subs[0] = data;
18
				}
19
				if(subs.length > 0) {
20
					for(var i = 0; i < subs.length; i++) {
21
						$("#subjectShow").append("<div class='acad'>" + subs[i] + "</div>");
22
23
					};
24
				}
25
			}
26
		}
27
		var industryShow = function(data) {
28
29
			if(data != undefined && data.length != 0) {
30
31
				var subs = new Array();
32
				if(data.indexOf(',')) {
33
					subs = data.split(',');
34
				} else {
35
					subs[0] = data;
36
				}
37
38
				if(subs.length > 0) {
39
					for(var i = 0; i < subs.length; i++) {
40
41
						$("#industryShow").append("<li>" + subs[i] + "</li>");
42
43
					};
44
				}
45
			}
46
		}
47
		var eduBgShow = function(data) {
48
49
			if(data.length > 0) {
50
				for(var i = 0; i < data.length; i++) {
51
					var showHtml = '<li><div class="h4Font h4tit">';
52
					if(data[i].college && data[i].major && data[i].degree) {
53
						showHtml += data[i].school + '-' + data[i].college + '-' + data[i].major + '-' + data[i].degree
54
					} else if(!data[i].college && data[i].major && data[i].degree) {
55
						showHtml += data[i].school + '-' + data[i].major + '-' + data[i].degree
56
					} else if(data[i].college && !data[i].major && data[i].degree) {
57
						showHtml += data[i].school + '-' + data[i].college + '-' + data[i].degree
58
					} else if(data[i].college && data[i].major && !data[i].degree) {
59
						showHtml += data[i].school + '-' + data[i].college + '-' + data[i].major
60
					} else if(!data[i].college && !data[i].major && data[i].degree) {
61
						showHtml += data[i].school + '-' + data[i].degree
62
					} else if(!data[i].college && data[i].major && !data[i].degree) {
63
						showHtml += data[i].school + '-' + data[i].major
64
					} else if(data[i].college && !data[i].major && !data[i].degree) {
65
						showHtml += data[i].school + '-' + data[i].college
66
					}
67
					if(typeof(data[i].year) !== "undefined") {
68
69
						showHtml += '<small class="h6Font">' + data[i].year + '</small>';
70
					} else {
71
						showHtml += "";
72
					}
73
					showHtml += "</div></li>";
74
					$("#eduBgShow").append(showHtml);
75
				}
76
			}
77
		}
78
		var timeJobShow = function(data) {
79
80
			if(data.length > 0) {
81
				for(var i = 0; i < data.length; i++) {
82
					var sDate = "";
83
					var eDate = "";
84
					if(data[i].department) {
85
						var dep = "-" + data[i].department;
86
					} else {
87
						var dep = ""
88
					}
89
					if(data[i].startMonth) {
90
						sDate = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-";
91
						if(data[i].stopMonth) {
92
							eDate = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6);
93
						} else {
94
							eDate = "至今";
95
						}
96
					}
97
					var JobHtml = '<li>';
98
					JobHtml += '<div class="h4Font h4tit">' + data[i].company + '-' + data[i].title + '' + dep + '<small class="h6Font">' + sDate + '' + eDate + '</small></div>';
99
					JobHtml += '</li>';
100
101
					$("#timeJobShow").append(JobHtml);
102
				}
103
			}
104
		}
105
106
		var projectShow = function(data) {
107
			if(data.length > 0) {
108
				for(var i = 0; i < data.length; i++) {
109
					if(!data[i].descp) {
110
						data[i].descp = "";
111
					}
112
					if(!data[i].startMonth) {
113
						data[i].startMonth = '';
114
						data[i].stopMonth = '';
115
					} else {
116
						data[i].startMonth = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-"
117
						if(!data[i].stopMonth) {
118
							data[i].stopMonth = '至今';
119
						} else {
120
							data[i].stopMonth = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6)
121
						}
122
					}
123
					var projectHtml = '<li class="paddingSpace">';
124
					projectHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].startMonth + '' + data[i].stopMonth + '</small></div>';
125
					projectHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
126
					projectHtml += '</li>';
127
128
					$("#projectShow").append(projectHtml);
129
				}
130
			}
131
		}
132
133
		var paperShow = function(data) {
134
			if(data.length > 0) {
135
				for(var i = 0; i < data.length; i++) {
136
					if(!data[i].year) {
137
						data[i].year = "";
138
					}
139
					if(!data[i].descp) {
140
						data[i].descp = "";
141
					}
142
					if(!data[i].url) {
143
						data[i].url = "";
144
					}
145
					var paperHtml = '<li class="paddingSpace">';
146
					paperHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
147
					paperHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
148
					paperHtml += '</li>';
149
150
					$("#paperShow").append(paperHtml);
151
152
				}
153
			}
154
		}
155
156
		var patentShow = function(data) {
157
			if(data.length > 0) {
158
				for(var i = 0; i < data.length; i++) {
159
					if(!data[i].year) {
160
						data[i].year = "";
161
					}
162
					if(!data[i].descp) {
163
						data[i].descp = "";
164
					}
165
					if(!data[i].url) {
166
						data[i].url = "";
167
					}
168
					var patentHtml = '<li class="paddingSpace">';
169
					patentHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
170
					patentHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
171
					patentHtml += '</li>';
172
173
					$("#patentShow").append(patentHtml);
174
175
				}
176
			}
177
		}
178
179
		var honorShow = function(data) {
180
			if(data.length > 0) {
181
				for(var i = 0; i < data.length; i++) {
182
					if(!data[i].year) {
183
						data[i].year = "";
184
					}
185
					if(!data[i].descp) {
186
						data[i].descp = "";
187
					}
188
					var honorHtml = '<li class="paddingSpace">';
189
					honorHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
190
					honorHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
191
					honorHtml += '</li>';
192
193
					$("#honorShow").append(honorHtml);
194
195
				}
196
			}
197
		}
198
		var researchAreaShow = function($datas, $datarecords) {
199
			if($datas != undefined && $datas.length != 0) {
200
				var html = [];
201
				for(var i = 0; i < $datas.length; ++i) {
202
					var $data = $datas[i];
203
					var $photos = [];
204
					//获取头像					
205
					if($datarecords.length > 0) {
206
						$photos = getRecords($datarecords, $data.caption);
207
					}
208
					var isAgree = -1;
209
					for(var j = 0; j < $photos.length; j++) {
210
						if(userid == $photos[j].id)
211
							isAgree++;
212
					}
213
					if(professorId != userid) {
214
						if(isAgree) {
215
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus ' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
216
						} else {
217
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus' style=' background-position-y:-26px' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
218
						}
219
					} else {
220
						var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num favorBox' caption='" + $data.caption + "'>";
221
					}
222
					if($photos.length < 6) {
223
						for(var j = 0; j < $photos.length; ++j) {
224
							if($photos[j].img) {
225
								showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_s.jpg'></span>";
226
							} else {
227
								showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
228
							}
229
						}
230
					} else {
231
						for(var j = $photos.length - 5; j < $photos.length; ++j) {
232
							if($photos[j].img) {
233
								showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_s.jpg'></span>";
234
							} else {
235
								showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
236
							}
237
						}
238
						showDiv += "<span class='like-people like-more userRadius'></span>";
239
					}
240
					showDiv += "</div></div></div>";
241
					html.push(showDiv);
242
				}
243
				document.getElementById("researchAreaShow").innerHTML = html.join('');
244
			}
245
		}
246
		var getRecords = function($researchAreaLogs, caption) {
247
			var ret = [];
248
			var t = 0;
249
			for(var i = 0; i < $researchAreaLogs.length; i++) {
250
				if(caption == $researchAreaLogs[i].caption) {
251
					ret[t] = {
252
						id: $researchAreaLogs[i].opreteProfessorId,
253
						img: $researchAreaLogs[i].hasHeadImage
254
					}
255
					t++;
256
				}
257
			}
258
			return ret;
259
		}
260
		var clFlag = 1;
261
		$("#researchAreaShow").on("click", ".plus", function() {
262
				if(userid && userid != null && userid != "null") {
263
					//点赞变化样式
264
					if(clFlag) {
265
						clFlag = 0;
266
					} else {
267
						return;
268
					}
269
					if($(this).data("isagree") > -1) {
270
						$(this).stop(true, true).animate({
271
							backgroundPositionY: 0
272
						}, 300); //变成未点赞样式
273
					} else {
274
						$(this).stop(true, true).animate({
275
							backgroundPositionY: -26
276
						}, 300); //变成点赞样式
277
					}
278
279
					$.ajax({
280
						"url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
281
						"type": "POST",
282
						"data": {
283
							"targetId": $(this).data("pid"),
284
							"targetCaption": $(this).data("caption"),
285
							"opId": userid
286
						},
287
						"contentType": "application/x-www-form-urlencoded",
288
						"success": function($data) {
289
							if($data.success) {
290
								$.get("/ajax/professor/info/" + professorId, function($data) {
291
									if($data.success) {
292
										clFlag = 1;
293
										var $info = $data.data;
294
										if($info) {
295
											$("#researchAreaShow").empty("")
296
											if($info.researchAreas) {
297
												researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
298
											}
299
										}
300
301
									}
302
								})
303
							} else {
304
								$.MsgBox.Alert("message", $data.msg);
305
							}
306
						}
307
					});
308
				} else {
309
					$.MsgBox.Alert("消息", "请登录后点赞");
310
					/*location.href="login.html"*/
311
				}
312
313
			})
314
			/*研究方向点赞列表*/
315
			//关闭按钮
316
		$("#workclose").click(function() {
317
			$(".resAreaCover").fadeOut();
318
		    $("body").css("position", "");
319
		});
320
		$("#researchAreaShow").on("click", ".list-browse,.like-num", function() {
321
			var cap = $(this).attr("caption");
322
			//console.log(cap.length);
323
			$.ajax({
324
				url: "/ajax/researchAreaLog/ql",
325
				dataType: 'json', //数据格式类型
326
				type: 'GET', //http请求类型
327
				timeout: 10000, //超时设置
328
				data: {
329
					"professorId": professorId,
330
					'caption': cap,
331
					"rows": 10
332
				},
333
				success: function(data) {
334
					if(data.success) {
335
						$(".attentList").html("");
336
						var $info = data.data;
337
						$("#subArea").text(cap);
338
						$(".resAreaCover").fadeIn();
339
						$(".resAreaCon").show()
340
						if($info.length == 0) {
341
							$(".resAreaCon").hide();
342
							return;
343
						}
344
						for(var i = 0; i < $info.length; i++) {
345
							if($info[i].professor.hasHeadImage == 1) {
346
								var img = "/images/head/" + $info[i].professor.id + "_l.jpg";
347
							} else {
348
								var img = "../images/default-photo.jpg";
349
							}
350
							//认证
351
							var oSty=autho($info[i].professor.authType,$info[i].professor.orgAuth,$info[i].professor.authStatus);
352
							
353
							var title = "",
354
								office = "",
355
								orgName = "",
356
								address = '';
357
							if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
358
								title = $info[i].professor.title + ",";
359
								office = $info[i].professor.office + ",";
360
								orgName = $info[i].professor.orgName + " | ";
361
								address = $info[i].professor.address;
362
							} else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
363
								office = $info[i].professor.office + ",";
364
								orgName = $info[i].professor.orgName + " | ";
365
								address = $info[i].professor.address;
366
							} else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
367
								title = $info[i].professor.title + ",";
368
								orgName = $info[i].professor.orgName + " | ";
369
								address = $info[i].professor.address;
370
							} else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
371
								title = $info[i].professor.title + ",";
372
								office = $info[i].professor.office + " | ";
373
								address = $info[i].professor.address;
374
							} else if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
375
								title = $info[i].professor.title + ",";
376
								office = $info[i].professor.office + ",";
377
								orgName = $info[i].professor.orgName;
378
							} else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
379
								orgName = $info[i].professor.orgName + " | ";
380
								address = $info[i].professor.address;
381
							} else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
382
								office = $info[i].professor.office + " | ";
383
								address = $info[i].professor.address;
384
							} else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
385
								office = $info[i].professor.office + ",";
386
								orgName = $info[i].professor.orgName;
387
							} else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
388
								title = $info[i].professor.title + " | ";
389
								address = $info[i].professor.address;
390
							} else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
391
								office = $info[i].professor.title + ",";
392
								address = $info[i].professor.orgName;
393
							} else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
394
								title = $info[i].professor.title + ",";
395
								office = $info[i].professor.office;
396
							} else if(!$info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
397
								address = $info[i].professor.address;
398
							} else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
399
								orgName = $info[i].professor.orgName;
400
							} else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
401
								office = $info[i].professor.office;
402
							} else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
403
								title = $info[i].professor.title;
404
							}
405
							var addw = '<li data-id="'+$info[i].professor.id+'" style="cursor:pointer">'
406
							addw += '<a class="proinfor clearfix">'
407
							addw += '<div class="headblock floatL"><img id="proHead" class="headimg userRadius" src="' + img + '"></div>'
408
							addw += '<div class="mediaBody">'
409
							addw += '<span class="listtit"><span id="proName">' + $info[i].professor.name + '</span><em class="authiconNew ' + oSty.sty + '" title="'+ oSty.title +'"></em></span>'
410
							addw += '<div class="listtit2">' + title + office + orgName + address + '</div>'
411
							addw += '</div></a></li>'
412
413
							$(".attentList").append(addw);
414
						}
415
						
416
					    $("body").css("position", "fixed");
417
					}
418
				},
419
				error: function() {}
420
			});
421
		});
422
		/*研究方向点赞点击每一个点赞的用户进入点赞用户的浏览页面*/
423
		$(".attentList").on("click","li",function(){
424
			var opid=$(this).attr("data-id");
425
			location.href="userInforShow.html?professorId="+opid;
426
		})
427
		$.get("/ajax/professor/info/" + professorId, function($data) {
428
			if($data.success) {
429
				var $info = $data.data;
430
				orgId=$info.orgId;
431
				orgAuth=$info.orgAuth;
432
				if(orgAuth==1){
433
					$("#orgNameS").css("cursor","pointer");
434
				}
435
				if($info) {
436
					if($info.authType == 1) {
437
						$(".yesshow").show();
438
						if(ass == 0){
439
							$('span:contains("合作历史及评价")').parents(".introduction").hide();
440
						}
441
						if(resou == 0 && ass == 0) {
442
								$('div:contains("合作机会")').parents(".menublock").hide();
443
							}
444
					} else {
445
						if($info.authentication == 3) {
446
							$("#office").hide();
447
							$("#titleS").hide();
448
						}
449
					}
450
					//修改浏览器title信息
451
					if($info.title) {
452
						var qtitle = " - " + $info.title;
453
					} else {
454
						var qtitle = "";
455
					}
456
					if($info.office) {
457
						var qoffice = " - " + $info.office;
458
					} else {
459
						var qoffice = "";
460
					}
461
462
					var llqtitle = $info.name + qtitle + qoffice + "-" + $info.orgName + "-科袖网";
463
					window.setInterval(function() {
464
						document.title = llqtitle;
465
					}, 500);
466
467
					//展示专家的信息
468
					//认证
469
					var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
470
					$(".proModify").addClass(oStyS.sty);
471
					$(".proModify").attr("title",oStyS.title);
472
					
473
					$("#nameS").text($info.name);
474
					if($info.office) {
475
						if($info.title) {
476
							$("#office").text($info.office + ",");
477
						} else {
478
							$("#office").text($info.office);
479
						}
480
481
					}
482
					if($info.title) {
483
						$("#titleS").text($info.title);
484
					}
485
					if($info.department) {
486
						if($info.orgName) {
487
							$("#industryS").text($info.department + ",");
488
						} else {
489
							$("#industryS").text($info.department);
490
						}
491
					}
492
					if($info.orgName) {
493
						$("#orgNameS").text($info.orgName);
494
					}
495
					if($info.address) {
496
						$("#address").text($info.address);
497
					}
498
					if($info.hasHeadImage) {
499
						$("#headImage").attr("src", "/images/head/" + professorId + "_l.jpg");
500
					} else {
501
						$("#headImage").attr("src", "/images/default-photo.jpg");
502
					}
503
					$("#orgImage").attr("src", "/images/org/" + $info.orgId + ".jpg");
504
					$("#orgImage").load(function() {})
505
						.error(function() {
506
							$("#orgImage").attr("src", "/images/default-icon.jpg");
507
						});
508
					//显示专家信息到保存数据
509
					name = $info.name;
510
					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) {
511
						$("div:contains('个人信息')").parents(".menublock").hide();
512
					}
513
					if($info.descp) {
514
						$("#descpS").text($info.descp);
515
					} else {
516
						$("span:contains('个人简介')").parents(".introduction").hide();
517
						$("a:contains('个人简介')").hide();
518
					}
519
					//展示专家的学科	
520
					//alert($info.authentication);
521
					if($info.authType == 1) {
522
						if($info.subject) {
523
							subjectShow($info.subject);
524
						} else {
525
							$("span:contains('学术领域')").parents(".introduction").hide();
526
							$("a:contains('学术领域')").hide();
527
						}
528
					} else {
529
						if($info.authentication == 1) {
530
							if($info.subject) {
531
								subjectShow($info.subject);
532
							} else {
533
								$("span:contains('学术领域')").parents(".introduction").hide();
534
								$("a:contains('学术领域')").hide();
535
							}
536
						} else {
537
							$("span:contains('学术领域')").parents(".introduction").hide();
538
							$("a:contains('学术领域')").hide();
539
						}
540
					}
541
542
					//研究方向	
543
					if($info.authType == 1) {
544
						if($info.researchAreas.length) {
545
							researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
546
						} else {
547
							$("span:contains('研究方向')").parents(".introduction").hide();
548
							$("a:contains('研究方向')").hide();
549
						}
550
					} else {
551
						$("span:contains('研究方向')").parents(".introduction").hide();
552
						$("a:contains('研究方向')").hide();
553
					}
554
555
					//展示专家的行业
556
					if($info.authType == 1) {
557
						if($info.industry) {
558
							industryShow($info.industry);
559
						} else {
560
							$("span:contains('应用行业')").parents(".introduction").hide();
561
							$("a:contains('应用行业')").hide();
562
						}
563
					} else {
564
						if($info.authentication == 2) {
565
							if($info.industry) {
566
								industryShow($info.industry);
567
							} else {
568
								$("span:contains('应用行业')").parents(".introduction").hide();
569
								$("a:contains('应用行业')").hide();
570
							}
571
						} else {
572
							$("span:contains('应用行业')").parents(".introduction").hide();
573
							$("a:contains('应用行业')").hide();
574
						}
575
					}
576
577
					//教育北京						
578
					if($info.edus.length) {
579
						eduBgShow($info.edus);
580
					} else {
581
						$("span:contains('教育背景')").parents(".introduction").hide();
582
						$("a:contains('教育背景')").hide();
583
					}
584
					//兼职
585
					if($info.jobs.length) {
586
						timeJobShow($info.jobs);
587
					} else {
588
						$("span:contains('工作经历')").parents(".introduction").hide();
589
						$("a:contains('工作经历')").hide();
590
					}
591
					//项目
592
					if($info.projects.length) {
593
						projectShow($info.projects)
594
					} else {
595
						$("span:contains('项目经历')").parents(".introduction").hide();
596
						$("a:contains('项目经历')").hide();
597
					}
598
599
					//论文
600
					if($info.papers.length) {
601
						paperShow($info.papers);
602
					} else {
603
						$("span:contains('著作、论文、文章')").parents(".introduction").hide();
604
						$("a:contains('著作、论文、文章')").hide();
605
					}
606
					//专利
607
					if($info.patents.length) {
608
						patentShow($info.patents);
609
					} else {
610
						$("span:contains('专利')").parents(".introduction").hide();
611
						$("a:contains('专利')").hide();
612
					}
613
					//荣誉
614
					if($info.honors.length) {
615
						honorShow($info.honors);
616
					} else {
617
						$("span:contains('荣誉及奖项')").parents(".introduction").hide();
618
						$("a:contains('荣誉及奖项')").hide();
619
					}
620
//下滑滚动不覆盖底部 
621
	var d;
622
	var t;
623
	$(function() {
624
		var art_height;
625
		var isHidden=$("#reA").is(":hidden");//是否隐藏
626
		if(isHidden) {
627
			art_height=0;
628
		}else{
629
			art_height=$("#reA").outerHeight(true);
630
		}
631
		
632
		$(document).scroll(function() {
633
			var top3 = $(window).height();
634
			var top5 = $(".content-left").height();
635
			var top4 = $("#container").height() + art_height;
636
			//console.log(top5+","+top4+","+top3);
637
			var top1 = $(document).scrollTop();
638
			var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10; //变成绝对定位	
639
			if(top1 >= 300) {
640
				$(".content-left").css({
641
					"position": "fixed",
642
					"top": "80px"
643
				});
644
				if(top1 >= top2) {
645
					$('.information-content').css("position", "static");
646
					$(".content-left").css("position", "absolute");
647
					$(".content-left").css("top", top4 - top5 - 10 + "px");
648
				} else {
649
					$('.information-content').css("position", "relative");
650
					$(".content-left").css({
651
						"position": "fixed",
652
						"top": "80px"
653
					});
654
				}
655
			} else {
656
				$(".content-left").css({
657
					"position": "static"
658
				});
659
			}
660
661
			//咨询框弹出
662
			var foot_height = $(".footerblock").height();
663
			if(top1 >= 180 && top1 < top4 - top3) {
664
				$(".coulstblock").slideDown();
665
				$(".coulstblock").css({
666
					"bottom": "0"
667
				});
668
			} else if(top1 >= top4 - top3) {
669
				$(".coulstblock").css({
670
					"bottom": -(top4 - top3 - top1 ) - art_height + "px"
671
				});
672
			} else {
673
				$(".coulstblock").slideUp();
674
				$(".coulstblock").css({
675
					"bottom": "0"
676
				});
677
			}
678
679
		})
680
	});
681
	//下滑滚动不覆盖底部 结束
682
683
				}
684
			}
685
		});
686
	}
687
	$("#hsearch").on("click", function() {
688
		var searchContent = $("#hsearchContent").val();
689
		location.href = "searchNew.html?searchContent=" + searchContent;
690
	});
691
692
	
693
	
694
	//拿到点击的顺序,然后求出局文档的距离
695
	$(".subsidebar").mouseenter(function(){
696
		var dd=$(this)[0].className;
697
		if(dd!="subsidebar subcolor"){
698
			$(this).css("background","#efefef");
699
		}
700
	}).mouseleave(function(){
701
		$(this).css("background","")
702
	});
703
	//专家信息点击换背景颜色
704
	$(".subsidebar").click(function() {
705
		$(".subsidebar").removeClass("subcolor");
706
		$(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
707
	});
708
	$(".subsidebar").click(function() {
709
		var index = $(".subsidebar").index(this)+1;
710
        //console.log(index)
711
		var offset = $(".introduction").eq(index).offset();
712
		$("body,html").animate({
713
			scrollTop: offset.top - 80 + "px" //��body��scrollTop����pos��top����ʵ���˹��� 
714
		}, 1000);
715
	}).mousedown(function(){
716
	  	$(this).css("background","");
717
	});
718
	
719
	
720
	/*科研文章*/
721
	$.ajax({
722
		url: "/ajax/article/qaProPublish",
723
		dataType: 'json', //数据格式类型
724
		type: 'GET', //http请求类型
725
		data: {
726
			"professorId": professorId
727
		},
728
		timeout: 10000, //超时设置
729
		success: function(data) {
730
			if(data.success) {
731
				var pp=ifUserType(professorId)
732
				if(!pp.authType2) {
733
					$("#reA").hide();
734
					return;
735
				} else {
736
					if(data.data.length == 0) {
737
						$("#reA").hide();
738
						return;
739
					}
740
					$("#reA").show();
741
					for(var i = 0; i < data.data.length; i++) {
742
						var add = '<li><a href="articalShow.html?articleId=' + data.data[i].articleId  + '" style="display:block;">'
743
						add += '<div class="art_topicBox"><div class="art_img" style=""></div>'
744
						add += '<div class="art_tbox"><h6 id="artical_topic" >' + data.data[i].articleTitle + '</h6></div>'
745
						add += '</div><div class="tagsBox"><span></span></div>'
746
						add += '</a></li>';
747
						$add = $(add);
748
						$("#reachArticle").append($add);
749
						$add.find('.tagsBox span').text(data.data[i].subject); //data.data[i].subject
750
						if(data.data[i].articleImg) {
751
							$add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
752
						}
753
754
					}
755
					//资源轮播
756
					var $content2 = $(".sharescrollbox.Acrollbox");
757
					var childcount2 = $content2.find(".otherRes.shareshow li").length;
758
					Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
759
				}
760
			}
761
		},
762
		error: function() {
763
			return;
764
		}
765
	});
766
	var resou;
767
	
768
	//科研资源
769
	$.ajax({
770
		"url": "/ajax/resource/qaProPublish",
771
		"type": "get",
772
		"async": false,
773
		"data": {
774
			"professorId": professorId
775
		},
776
		"success": function(data) {
777
			console.log(data);
778
			if(data.success) {
779
				var pp=ifUserType(professorId)
780
				if(!pp.authType2) {
781
					$("span:contains('研发资源')").parents(".introduction").hide();
782
					return;
783
				} else {
784
					resou = data.data.length;
785
					if(data.data.length == 0) {
786
						$("#infor-browse").css("display", "none");
787
						$("span:contains('研发资源')").parents(".introduction").hide();
788
						$("a:contains('研发资源')").hide();
789
						return;
790
					} else {
791
						$("span:contains('研发资源')").parents(".introduction").show();
792
					}
793
					if(data.data.length > 3) {
794
						$("#infor-browse").css("display", "block");
795
						$(".resoubtn").css("display", "block");
796
					}
797
798
					var add = "";
799
					for(var i = 0; i < data.data.length; i++) {
800
						add = '<div class="sharesrc">'
801
						add += '<div class="shareshow">'
802
						add += '<a href="resourceShow.html?resourceId=' + data.data[i].resourceId + '"class="remess" style="display:block;" resourceId=' + data.data[i].resourceId + '>'
803
						add += '<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
804
						add += '<img class="resImg headRadius resourceImg" src="/images/resource/' + data.data[i].resourceId + '.jpg" />'
805
						add += '</div></a>'
806
						add += '<div class="shareopeart"><a class="sharebtn resourceConsult" professorId=' + data.data[i]["professorId"] + '>咨询</a><a class="sharebtn applicant" style="display:none">申请</a></div>'
807
						add += '</div>'
808
						add += '<p class="restit ellipsisSty">资源名称:<span class="presou consultTitleVal" resourceConsultTitle = "">' + data.data[i].resourceName + '</span></p>'
809
						add += '<p class="briefinfor ellipsisSty-2">应用用途:' + data.data[i].supportedServices + '</p>'
810
						add += '</div>'
811
						$("#sharescrollbox").append(add);
812
						$('.applicant').eq(i).attr("resourceId", data.data[i].resourceId);
813
						if(data.data[i].images.length) {
814
							$(".resourceImg").eq(i).attr("src","/data/resource/" + data.data[i].images[0].imageSrc);
815
						}else{
816
							$(".resourceImg").eq(i).attr("src","/images/default-resource.jpg");
817
						}
818
						add = "";
819
					}
820
					//资源轮播
821
					var $content = $("#sharescrollbox");
822
					var childcount = $content.find(".sharesrc").length;
823
					Carousel(3, 3, 3, childcount, $content, $(".resoubtn2.resounext"), $(".resoubtn2.resouprev"));
824
					//科研资源中点咨询
825
					$(".introduction").find(".resourceConsult").bind("click", clickResourceConsult);
826
				}
827
828
			} else {
829
				$.MsgBox.Alert("消息", "系统异常!");
830
			}
831
		},
832
		"error": function() {
833
			$.MsgBox.Alert('message', 'failddd')
834
		}
835
	});
836
837
	function getIdentity(professorId) {
838
		$.ajax({
839
			"url": "ajax/professor/" + professorId,
840
			"type": "get",
841
			"async": false,
842
			"success": function(data) {
843
				if(data.success) {
844
					//console.log(data);
845
					$("option")[0].value = data.data.name;
846
					$("option")[1].value = data.data.organization.name;
847
					//console.log($("option")[0].value);
848
					//console.log($("option")[1].value);
849
				} else {
850
					$.MsgBox.Alert("消息", "系统异常!");
851
				}
852
			},
853
			"error": function() {
854
				$.MsgBox.Alert('message', 'failddd')
855
			}
856
		})
857
	}
858
	//资源申请入口
859
	$('.introduction').on("click", '.applicant', function() {
860
		if(userid && userid != null && userid != "null") {
861
			ResourceApply(); //调用资源申请HTML创建函数
862
			$(".limitBox").removeClass("limitBox");
863
			$(".limitwords").removeClass("limitwords");
864
			$(".limitwordbox").removeClass("limitwordbox");
865
			//获取当前时间并且格式化时间
866
			var myDate = new Date();
867
			var nowYear = myDate.getFullYear();
868
			var nowMonth = myDate.getMonth() + 1;
869
			var nowDate = myDate.getDate();
870
			if(nowMonth < 10) {
871
				nowMonth = "0" + nowMonth.toString();
872
			}
873
			if(nowDate < 10) {
874
				nowDate = "0" + nowDate.toString();
875
			}
876
			var now = nowYear + "-" + nowMonth + "-" + nowDate;
877
			$("#datepicker").val(now);
878
			$("#datepicker").datepicker({
879
				"dateFormat": " yy-mm-dd"
880
			});
881
			$(".timelo").css("display", "none");
882
			$(".namecon").text(name);
883
			$(".applysure").hide();
884
			$(".btnboxup").hide();
885
			var index1 = $(this).parent().parent().parent().index();
886
			var resName = $('.presou').eq(index1).text();
887
			var resourceID = $(this).attr("resourceId");
888
			$.ajax({
889
				"url": "/ajax/resource/" + resourceID,
890
				"type": "get",
891
				"async": false,
892
				"success": function(info) {
893
					if(info.success) {
894
						if(info.data.images.length) {
895
							$(".resouImage").attr("src", "/images/resource/" + resourceID + ".jpg");
896
						} else {
897
							$(".resouImage").attr("src", "/images/default-resource.jpg");
898
						}
899
					}
900
				}
901
			})
902
			$(".log").text(resName);
903
			getIdentity(userid);
904
			$("#deliver").on("click", function() {
905
906
				var $data = {};
907
				$data.demandId = userid;
908
				$data.resourceId = resourceID;
909
				$data.detailDemand = $(".detail").val();
910
				//去除时间里面的-  和字符串前后的空格
911
				$data.deliverTime = replaceStr($.trim($(".dealTime").val()));
912
				//alert(replaceStr($.trim($(".dealTime").val())));
913
				//alert(replaceStr($.trim($(".dealTime").val())).length);
914
915
				$data.operationStatus = 1;
916
				$data.applysquare = $("select option:selected").val();
917
				//console.log($data.applysquare);
918
919
				$.ajax({
920
					"url": "/ajax/operation",
921
					"type": "POST",
922
					"success": function(rdata) {
923
						if(rdata.success) {
924
							$.MsgBox.Alert('message', '资源"' + resName + '"申请发送成功!');
925
							$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
926
							$(".blackcover").remove();
927
							$("body").css("position", "");
928
							//location.reload(true);
929
						} else {
930
							$.MsgBox.Alert('message', '资源"' + resName + '"申请发送失败,请重新申请!');
931
						}
932
					},
933
					"data": $data,
934
					"beforeSend": function() { /*console.log(this.data)*/ },
935
					"contentType": "application/x-www-form-urlencoded",
936
					dataType: "json"
937
				});
938
			});
939
		} else {
940
			$.MsgBox.Alert("消息", "您还未登录,请登录之后进行资源申请");
941
		}
942
	});
943
944
	//科研资源中的咨询
945
	function clickResourceConsult() {
946
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
947
			var professorId = $(this).attr("professorId");
948
			consultHandler();
949
950
			var liEle = $("ul.menucon").children();
951
952
			for(var i = 0; i < liEle.length; i++) {
953
				$(liEle[i]).removeClass('clicknow');
954
				$(liEle[1]).addClass("clicknow");
955
			};
956
			var item = $(this).parent().parent().parent();
957
958
			var consultTitleVal = item.find(".consultTitleVal").text();
959
			$("#consultTitle").val("关于" + consultTitleVal + "的咨询");
960
		} else {
961
			$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
962
			$("#mb_btn_ok").val("去登录");
963
964
			var aele = document.createElement('a');
965
			$("#mb_btnbox").append(aele);
966
			$("#mb_btnbox a").css({
967
				'display': "block",
968
				'width': '100%',
969
				'height': '40px',
970
				'position': 'absolute',
971
				'bottom': '-6px',
972
				'left': '0'
973
			});
974
			aele.setAttribute('href', '../login.html');
975
		}
976
977
	};
978
979
	//===============点击咨询==============
980
	var userid = $.cookie("userid"); //登陆人id====重复代码
981
	var professorId = GetQueryString("professorId"); //专家id====重复代码
982
	//点击科研资源的咨询
983
	$("#consultbtn,#conbtn").bind('click', consultHandler);
984
985
	function consultHandler() {
986
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
987
			ConsultApply();
988
			concultProInfo(professorId);
989
			//点击的发送
990
			$("#sendConsultBtn").click(function() {
991
				sendConsultHandler($(this).attr("proId"));
992
			});
993
		} else {
994
			$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
995
			$("#mb_btn_ok").val("去登录");
996
			var aele = document.createElement('a');
997
			$("#mb_btnbox").append(aele);
998
			$("#mb_btnbox a").css({
999
				'display': "block",
1000
				'width': '100%',
1001
				'height': '40px',
1002
				'position': 'absolute',
1003
				'bottom': '-6px',
1004
				'left': '0'
1005
			});
1006
			aele.setAttribute('href', '../login.html');
1007
1008
		}
1009
1010
	};
1011
	//合作历史及评价
1012
	var ass;
1013
	$.ajax({
1014
		"url": "/ajax/consult/pqAssessHis",
1015
		"type": "get",
1016
		"data": {
1017
			"professorId": professorId
1018
		},
1019
		"async": false,
1020
		"success": function(response) {
1021
			if(response.success) {
1022
				var $data = response.data.data;
1023
				ass = $data.length;
1024
				if($data.length == 0) {
1025
					$("span:contains('合作历史及评价')").parents(".introduction").hide();
1026
					$("a:contains('合作历史及评价')").hide();
1027
				}
1028
				for(var i = 0; i < $data.length; i++) {
1029
					var add = "";
1030
					var assessTime = $data[i]["assessTime"].substr(0, 4) + "-" + $data[i].assessTime.substr(4, 2) + "-" + $data[i].assessTime.substr(6, 2) + " " +
1031
						$data[i].assessTime.substr(8, 2) + ":" + $data[i].assessTime.substr(10, 2);
1032
					add += '<div class="evaluate2">'
1033
					add += '<div class="lefteva">'
1034
					add += '<a  class="evaimg userRadius">'
1035
					if($data[i].professor.hasHeadImage) {
1036
						add += '<img src="/images/head/' + $data[i].professor.id + '_l.jpg" width="100%" height="100%">'
1037
					} else {
1038
						add += '<img src="/images/default-photo.jpg" width="100%" height="100%">'
1039
					}
1040
1041
					add += '</a>'
1042
					add += '<p>' + $data[i].professor.name + '</p><p>'
1043
						//                      if($data[i].professor.office) {
1044
						//                      	 add+='<span>'+$data[i].professor.office+' ,</span>'
1045
						//                      }
1046
						//                     if($data[i].professor.title) {
1047
						//                     	 add+='<span>'+$data[i].professor.title+'</span>'
1048
						//                     }                     
1049
					add += '</p><p>'
1050
						//                      if($data[i].professor.department) {
1051
						//                      	 add+='<span>'+$data[i].professor.department+' ,</span>'
1052
						//                      }
1053
						//                     if($data[i].professor.orgName) {
1054
						//                     		add+='<span>'+$data[i].professor.orgName+'</span>'
1055
						//                     }                            
1056
					add += '</p>'
1057
					add += '</div>'
1058
					add += '<div class="righteva">'
1059
					add += '<ul class="evasort">'
1060
					add += '<li>咨询时间:<span>' + assessTime + '</span></li>'
1061
					add += '</ul>'
1062
					add += '<div class="evastarbox" id="evastarboxx" style="margin-left: -5px;">'
1063
					add += '<span class="evastar"></span>'
1064
					add += '<span class="evastar"></span>'
1065
					add += '<span class="evastar"></span>'
1066
					add += '<span class="evastar"></span>'
1067
					add += '<span class="evastar"></span>'
1068
					add += '</div>'
1069
					if($data[i].assessContant) {
1070
						add += '<p class="evabrief">' + $data[i].assessContant + ' </p>'
1071
					}
1072
					add += '</div>'
1073
					add += '</div>'
1074
					var $add = $(add);
1075
					$(".shareabout2").append($add);
1076
					$add.find(".evastar:lt(" + $data[i].assessStar + ")").addClass('staspan');
1077
				}
1078
				$(".evaluate2").eq($data.length - 1).css("border-bottom", "none");
1079
			}
1080
		}
1081
	})
1082
	proinfo(professorId);
1083
	//底部咨询申请入口专家信息
1084
	function proinfo(professorId) {
1085
		$.ajax({
1086
			url: "/ajax/professor/editBaseInfo/" + professorId,
1087
			type: "get",
1088
			data: {
1089
				"id": professorId
1090
			},
1091
			contentType: "application/x-www-form-urlencoded",
1092
			success: function(response) {
1093
1094
				var myData = response["data"];
1095
				//console.log(myData);
1096
				$("#foot_proname").html(myData["name"]);
1097
				if(myData["address"]) {
1098
					$("#foot_proaddress").html(' | ' + myData["address"]);
1099
				}
1100
				if(myData["title"]) {
1101
					$("#foot_protitle").html(myData["title"]);
1102
				}
1103
				if(myData["department"]) {
1104
1105
					$("#foot_prodepar").html(myData["department"]);
1106
				}
1107
				if(myData["orgName"]) {
1108
					if(myData["department"] == null || myData["department"] == '') {
1109
						$("#foot_proorgname").html(myData["orgName"]);
1110
					} else {
1111
						$("#foot_proorgname").html(',' + myData["orgName"]);
1112
					}
1113
				}
1114
1115
				//认证
1116
				var oStyT=autho(myData.authType,myData.orgAuth,myData.authStatus);
1117
				$("#foot_promodify").addClass(oStyT.sty);
1118
				$("#foot_promodify").attr("title",oStyT.title);
1119
1120
				//头像
1121
				if(myData["hasHeadImage"] == 0) {
1122
					$("#foot_proimg").attr("src", "images/default-photo.jpg");
1123
				} else {
1124
					$("#foot_proimg").attr("src", "images/head/" + myData["id"] + "_l.jpg");
1125
				}
1126
1127
			},
1128
			error: function(error) {
1129
				$.MsgBox.Alert("message", "请求数据失败");
1130
			}
1131
		});
1132
	}
1133
/*点击机构名字进入企业浏览页面*/
1134
$("#orgNameS").click(function(){
1135
	if(orgAuth==1){
1136
		location.href="companybrowinfor.html?orgId="+orgId;
1137
	}
1138
	
1139
})
1140
		
1141
})

+ 1 - 1
js/information.js

@ -13,7 +13,7 @@ $(function() {
13 13
	$("#downResume").attr("href","/pdf/professor?id="+userid+"&_dl=1");
14 14

15 15
	function getInfo(InfoId) {
16
		$.get("/ajax/professor/info/" + InfoId, function($data) {
16
		$.get("/ajax/professor/editInfo/" + InfoId, function($data) {
17 17
			if($data.success) {
18 18
				var $info = $data.data;
19 19
				authSD = $info.orgAuth;

+ 10 - 28
js/userInforShow.js

@ -84,7 +84,7 @@ $(function() {
84 84
			attentMy();
85 85
		})
86 86
		
87
		//点击咨询按钮
87
		//点击联系按钮
88 88
		$("#conbtn").on('click', function(){
89 89
			if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
90 90
				ConsultApply();
@ -94,19 +94,9 @@ $(function() {
94 94
					sendConsultHandler($(this).attr("proId"));
95 95
				});
96 96
			} else {
97
				$.MsgBox.Alert("提示", "请先登录再进行咨询");
98
				$("#mb_btn_ok").val("去登录");
99
				var aele = document.createElement('a');
100
				$("#mb_btnbox").append(aele);
101
				$("#mb_btnbox a").css({
102
					'display': "block",
103
					'width': '100%',
104
					'height': '40px',
105
					'position': 'absolute',
106
					'bottom': '-6px',
107
					'left': '0'
108
				});
109
				aele.setAttribute('href', '../login.html');
97
				quickLog();
98
				operatTab();
99
				closeLog();
110 100
			}
111 101
		});
112 102
		//点击关注按钮
@ -120,19 +110,9 @@ $(function() {
120 110
				attentCount();//关注者数量刷新
121 111
				attentMy();
122 112
			}else{
123
				$.MsgBox.Alert("提示", "请先登录再进行关注");
124
				$("#mb_btn_ok").val("去登录");
125
				var aele = document.createElement('a');
126
				$("#mb_btnbox").append(aele);
127
				$("#mb_btnbox a").css({
128
					'display': "block",
129
					'width': '100%',
130
					'height': '40px',
131
					'position': 'absolute',
132
					'bottom': '-6px',
133
					'left': '0'
134
				});
135
				aele.setAttribute('href', '../login.html');
113
				quickLog();
114
				operatTab();
115
				closeLog();
136 116
			}
137 117
		});
138 118
		/*研究方向点赞*/
@ -184,7 +164,9 @@ $(function() {
184 164
					}
185 165
				});
186 166
			} else {
187
				$.MsgBox.Alert("提示", "请登录后点赞");
167
				quickLog();
168
				operatTab();
169
				closeLog();
188 170
			}
189 171
190 172
		})

+ 2 - 4
userInforShow.html

@ -66,7 +66,7 @@
66 66
                </div>
67 67
                <div class="goSpan displayNone">
68 68
                	<span class="attenSpan" id="attentBtn">关注</span>
69
					<span class="consultSpan" id="conbtn">咨询</span>
69
					<span class="consultSpan" id="conbtn">联系</span>
70 70
				</div>
71 71
                <a class="goSpanTo displayNone" href="information.html">修改资料</a>
72 72
			</div>
@ -488,7 +488,6 @@
488 488
					<div class="statisticsBox" style="margin-bottom: 40px;">
489 489
						<p>我的主页已被浏览 <em id="viewNums"></em> 次</p>
490 490
					</div>
491
					
492 491
				</div>
493 492
				<div class="conBlock conItem displayNone">
494 493
					<div class="form-item">
@ -534,9 +533,8 @@
534 533
<script type="text/javascript" src="js/common.js"></script>
535 534
<script type="text/javascript" src="js/jquery.page.js"></script>
536 535
<script type="text/javascript" src="js/userInforShow.js"></script>
537
<script type="text/javascript" src="js/popup.js"></script>
536
<script type="text/javascript" src="js/quickLogin.js"></script>
538 537
<script>
539
540 538
	//微信分享
541 539
	var qrcode = new QRCode(document.getElementById("qrcode"), {
542 540
		width: 100,