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