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