Browse Source

企业工作台

jack 8 years ago
parent
commit
c5a60962d6

+ 1 - 1
cmp-portal/cmp-needShow.html

@ -79,7 +79,7 @@
79 79
						    		<div class="workinfor floatL">
80 80
						                <h4>
81 81
						                	<span class="h1Font" id="userName"></span>
82
											<em class="authicon authicon-pro" title="科袖认证专家"></em>
82
											<em class="authicon " title="" id="authFlag"></em>
83 83
						                </h4>
84 84
						                <h5 id="offt"></h5>
85 85
						            </div>

+ 1 - 1
cmp-portal/cmp-staffList.html

@ -27,7 +27,7 @@
27 27
        </div>
28 28
        <div class="workcon">
29 29
			<div class="workconitem">
30
			    <div class="workcontit">企业员工
30
			    <div class="workcontit" id="costf">企业员工
31 31
			    	<a class="worksamlltit worksamlltitnow cmpBorder cmpColor">员工管理</a>
32 32
					<a href="cmp-UnstaffList.html"class="worksamlltit">员工认证</a>
33 33
			    </div>

+ 1 - 1
cmp-portal/cmp-workspaces.html

@ -61,7 +61,7 @@
61 61
			                    </div>
62 62
							</div>
63 63
							<div class="worksubblock floatL">
64
								<div class="worktit">企业员工<a class="worklinkbtn cmpColor floatR">查看全部</a></div>
64
								<div class="worktit">企业员工<a href="cmp-staffList.html"class="worklinkbtn cmpColor floatR">查看全部</a></div>
65 65
			                    <div class="wbcon">
66 66
			                    	<!--<div class="staffDlist" style="height: 96px;">
67 67
			                    		<h2>管理员</h2>

+ 90 - 106
cmp-portal/js/cmp-needList.js

@ -50,14 +50,16 @@ $(document).ready(function() {
50 50
					$("#demandList").html(" ");
51 51
					var $info = data.data.data;
52 52
					demandHtml($info);
53
					if(isbind == true) {
54
						$(".tcdPageCode").createPage({
55
							pageCount: Math.ceil(data.data.total / pageSize),
56
							current: data.data.data.pageNo,
57
							backFn: function(p) {
58
								demandList(false, 5, p, oDemandAim, oSortType);
59
							}
60
						});
53
					if($info.length != 0) {
54
						if(isbind == true) {
55
							$(".tcdPageCode").createPage({
56
								pageCount: Math.ceil(data.data.total / pageSize),
57
								current: data.data.data.pageNo,
58
								backFn: function(p) {
59
									demandList(false, 5, p, oDemandAim, oSortType);
60
								}
61
							});
62
						}
61 63
					}
62 64
				}
63 65

@ -74,7 +76,8 @@ $(document).ready(function() {
74 76
			var $obje = $data[i].professor;
75 77
			var personStr = personalInformation($obje);
76 78
			var demandAim = "技术咨询",
77
				demandType = "已关闭",demandStyle="status-5";
79
				demandType = "已关闭",
80
				demandStyle = "status-5";
78 81
			var oImg = "",
79 82
				oTime = "";
80 83
			if($data[i].demandAim == 2) {
@ -84,7 +87,7 @@ $(document).ready(function() {
84 87
			}
85 88
			if($data[i].demandStatus == 1) {
86 89
				demandType = "发布中";
87
				demandStyle="status-4";
90
				demandStyle = "status-4";
88 91
			}
89 92
			if($obje.hasHeadImage) {
90 93
				oImg = "/images/head/" + $obje.id + "_l.jpg";
@ -106,6 +109,7 @@ $(document).ready(function() {
106 109
			}
107 110
			oTime = $data[i]["createTime"].substr(0, 4) + "年" + $data[i].createTime.substr(4, 2) + "月" + $data[i].createTime.substr(6, 2) + "日" +
108 111
				$data[i].createTime.substr(8, 2) + ":" + $data[i].createTime.substr(10, 2);
112
			var oClass = autho($obje.authType, $obje.orgAuth, $obje.authStatus);
109 113
			var dataString = "<li class='workselectitem'>"
110 114
			dataString += "<div class='col-w-2'>"
111 115
			dataString += "<div class='workitimg headRadius'>"
@ -114,8 +118,8 @@ $(document).ready(function() {
114 118
			dataString += "<div class='col-w-10 needinfo'>"
115 119
			dataString += "<div class='workinfor worksitcon'>"
116 120
			dataString += "<h4><span class='h1Font'>" + $obje.name + "</span>"
117
			dataString += "<em class='authicon authicon-pro' title='科袖认证专家'></em></h4>"
118
			dataString += "<h6 class='h3Font'>"+ personStr + "</h6>"
121
			dataString += "<em class='authicon "+oClass.sty+"' title='"+oClass.title+"'></em></h4>"
122
			dataString += "<h6 class='h3Font'>" + personStr + "</h6>"
119 123
			dataString += "<h6 style='position:relative;'>"
120 124
			dataString += "<div class='titList'>需求主题:<em class='h4Font'>" + $data[i].demandTitle + "</em></div>"
121 125
			dataString += "<span class='lasttime rightTime'>" + oTime + "</span>"
@ -125,109 +129,89 @@ $(document).ready(function() {
125 129
			dataString += "<div class='rightopert floatR'>"
126 130
			dataString += "<span class='replybtn' demanid='" + $data[i].demandId + "'>查看</span></div>"
127 131
			dataString += "<div class='leftstate floatR'>"
128
			dataString += "<span class='coultstate "+demandStyle+"'><i>" + demandType + "</i></span></div>"
132
			dataString += "<span class='coultstate " + demandStyle + "'><i>" + demandType + "</i></span></div>"
129 133
			dataString += "<div class='leftstate floatR'>"
130 134
			dataString += "<span class='coultstate coulstAim status-4'><i>" + demandAim + "</i></span></div></div></div></li>"
131

132
			/*var dataString = "<div class='workselectitem'><table width='100%'>"
133
			dataString += "<tbody><tr><td width='14%' class='messagebox'>"
134
			dataString += "<a class='workhead workitimg headRadius'>"
135
			dataString += "<img class='headPhoto' src='" + oImg + "'  width='100%' height='100%'></a></td>"
136
			dataString += "<td style='position:relative;top:20px;' width='86%'>"
137
			dataString += "<div class='workinfor worksitcon'><h4><a class='named'>" + $obje.name + "</a>"
138
			dataString += "<a class='modifyicon" + typeTname + "'></a><input type='text' class='assessStar' style='display: none;'></h4><h6 class='h3Font'>"
139
			dataString += "<span>" + personStr + "</span>"
140
			dataString += "<h6 style='position:relative;'>"
141
			dataString += "<div class='titList'>需求主题:<em class='h4Font'>" + $data[i].demandTitle + "</em></div>"
142
			dataString += "<span class='lasttime rightTime'>" + oTime + "</span>"
143
			dataString += "<div style='height:70px;'><p class='rebackcon' >" + $data[i].demandContent + "</p></div></div>"
144
			dataString += "<div class='workhandle'><div class='rightopert floatR'>"
145
			dataString += "<span class='replybtn' demanid='" + $data[i].demandId + "'>查看</span></div>"
146
			dataString += "<div class='leftstate floatR'>"
147
			dataString += "<span class='coultstate status-4'><i>" + demandAim + "</i></span></div>"
148
			dataString += "<div class='leftstate floatR'>"
149
			dataString += "<span class='coultstate coulstAim status-4'><i>" + demandType + "</i></span>"
150
			dataString += "</div></div></td></tr></tbody></table></div>"*/
151 135
			$("#demandList").append(dataString);
152 136
		}
153 137
	}
154
	/*职位职称所在机构,部门,地址等等*/
155
	function personalInformation($person) {
156
		var arr1 = [$person.title, $person.office, $person.department, $person.orgName, $person.address];
157
		var arr = new Array();
158
		var arr2 = new Array();
159
		var n = 0;
160
		for(var i = 0; i < arr1.length; i++) {
161
			if(arr1[i]) {
162
				arr.push(arr1[i]);
163
				if(arr1[i] == arr1[arr1.length - 1]) {
164
					n = 1;
165
				}
138

139
/*职位职称所在机构,部门,地址等等*/
140
function personalInformation($person) {
141
	var arr1 = [$person.title, $person.office, $person.department, $person.orgName, $person.address];
142
	var arr = new Array();
143
	var arr2 = new Array();
144
	var n = 0;
145
	for(var i = 0; i < arr1.length; i++) {
146
		if(arr1[i]) {
147
			arr.push(arr1[i]);
148
			if(arr1[i] == arr1[arr1.length - 1]) {
149
				n = 1;
166 150
			}
167 151
		}
168
		if(n == 1) {
169
			for(var i = 0; i < arr.length - 1; i++) {
170
				arr2.push(arr[i]);
171
			}
172
			return arr2.join() + " | " + arr[arr.length - 1];
173
		} else {
174
			return arr.join();
152
	}
153
	if(n == 1) {
154
		for(var i = 0; i < arr.length - 1; i++) {
155
			arr2.push(arr[i]);
175 156
		}
176

157
		return arr2.join() + " | " + arr[arr.length - 1];
158
	} else {
159
		return arr.join();
177 160
	}
178
	/*检索排序*/
179
	function selcet(i) {
180
		$(".selcet" + i).on('click', function(e) {
181
			var option = $(this).find(".option" + i);
182
			option.css("display", "block")
183
			var o_this = $(this);
184
			o_this.find("li").click(function() {
185
				o_this.find("li").removeClass("workcurrent");
186
				$(this).addClass("workcurrent");
187
				o_this.find("span").text($(this).text());
188
				option.css("display", "none");
189
				if($(this).text() == "发布中") {
190
					oDemandAim = 1;
191
					$(".tcdPageCode").remove();
192
					$("#shoudao").append('<div class="tcdPageCode"></div>');
193
					demandList(true, 5, 1, oDemandAim, oSortType);
194
				} else if($(this).text() == "已关闭") {
195
					oDemandAim = 0;
196
					$(".tcdPageCode").remove();
197
					$("#shoudao").append('<div class="tcdPageCode"></div>');
198
					demandList(true, 5, 1, oDemandAim, oSortType);
199
				} else if($(this).text() == "全部") {
200
					oDemandAim = "";
201
					$(".tcdPageCode").remove();
202
					$("#shoudao").append('<div class="tcdPageCode"></div>');
203
					demandList(true, 5, 1, oDemandAim, oSortType);
204
				} else if($(this).text() == "按最早发布时间排序") {
205
					oSortType = 1;
206
					$(".tcdPageCode").remove();
207
					$("#shoudao").append('<div class="tcdPageCode"></div>');
208
					demandList(true, 5, 1, oDemandAim, oSortType);
209
				} else if($(this).text() == "按最新发布时间排序") {
210
					oSortType = 0;
211
					$(".tcdPageCode").remove();
212
					$("#shoudao").append('<div class="tcdPageCode"></div>');
213
					demandList(true, 5, 1, oDemandAim, oSortType);
214
				}
215
				return false;
216
			});
217
			$("body").click(function(e) {
218
				if($(".option4")[0].style.display == "block" || $(".option3")[0].style.display == "block") {
219
					$(".option4")[0].style.display = "none";
220
					$(".option3")[0].style.display = "none";
221
				}
222
			});
161

162
}
163
/*检索排序*/
164
function selcet(i) {
165
	$(".selcet" + i).on('click', function(e) {
166
		var option = $(this).find(".option" + i);
167
		option.css("display", "block")
168
		var o_this = $(this);
169
		o_this.find("li").click(function() {
170
			o_this.find("li").removeClass("workcurrent");
171
			$(this).addClass("workcurrent");
172
			o_this.find("span").text($(this).text());
173
			option.css("display", "none");
174
			if($(this).text() == "发布中") {
175
				oDemandAim = 1;
176
				$(".tcdPageCode").remove();
177
				$("#shoudao").append('<div class="tcdPageCode"></div>');
178
				demandList(true, 5, 1, oDemandAim, oSortType);
179
			} else if($(this).text() == "已关闭") {
180
				oDemandAim = 0;
181
				$(".tcdPageCode").remove();
182
				$("#shoudao").append('<div class="tcdPageCode"></div>');
183
				demandList(true, 5, 1, oDemandAim, oSortType);
184
			} else if($(this).text() == "全部") {
185
				oDemandAim = "";
186
				$(".tcdPageCode").remove();
187
				$("#shoudao").append('<div class="tcdPageCode"></div>');
188
				demandList(true, 5, 1, oDemandAim, oSortType);
189
			} else if($(this).text() == "按最早发布时间排序") {
190
				oSortType = 1;
191
				$(".tcdPageCode").remove();
192
				$("#shoudao").append('<div class="tcdPageCode"></div>');
193
				demandList(true, 5, 1, oDemandAim, oSortType);
194
			} else if($(this).text() == "按最新发布时间排序") {
195
				oSortType = 0;
196
				$(".tcdPageCode").remove();
197
				$("#shoudao").append('<div class="tcdPageCode"></div>');
198
				demandList(true, 5, 1, oDemandAim, oSortType);
199
			}
223 200
			return false;
224
		})
225
	}
226
	selcet(3);
227
	selcet(4);
228
	/*进入needSure.html*/
229
	$("#demandList").on("click", ".replybtn", function() {
230
		var demand = $(this).attr("demanid");
231
		location.href = "cmp-needShow.html?demandId=" + demand;
201
		});
202
		$("body").click(function(e) {
203
			if($(".option4")[0].style.display == "block" || $(".option3")[0].style.display == "block") {
204
				$(".option4")[0].style.display = "none";
205
				$(".option3")[0].style.display = "none";
206
			}
207
		});
208
		return false;
232 209
	})
210
}
211
selcet(3); selcet(4);
212
/*进入needSure.html*/
213
$("#demandList").on("click", ".replybtn", function() {
214
	var demand = $(this).attr("demanid");
215
	location.href = "cmp-needShow.html?demandId=" + demand;
216
})
233 217
})

+ 2 - 0
cmp-portal/js/cmp-needShow.js

@ -68,6 +68,8 @@ $(document).ready(function() {
68 68
					if($data.organization.industry){
69 69
						$(".ellipsisSty").text($data.organization.industry);
70 70
					}
71
					var oClass = autho($data.professor.authType, $data.professor.orgAuth, $data.professor.authStatus);
72
					$("#authFlag").addClass(oClass.sty).attr("title",oClass.title);
71 73
				}
72 74
			},
73 75
			error: function(XMLHttpRequest, textStats, errorThrown) {

+ 1 - 1
cmp-portal/js/cmp-staffList.js

@ -1,6 +1,5 @@
1 1
$(document).ready(function() {
2 2
	var id = $.cookie('orgId');
3
	console.log(id);
4 3
	/*判断企业是否认证*/
5 4
	function companyAuthStatus() {
6 5
		$.ajax({
@ -17,6 +16,7 @@ $(document).ready(function() {
17 16
						$("#identityState").hide();
18 17
					} else {
19 18
						$("#staff").hide();
19
						$("#costf").html("员工管理");
20 20
					}
21 21
				}
22 22
			},

+ 6 - 15
cmp-portal/js/cmp-updateinfo.js

@ -12,6 +12,7 @@ $(document).ready(function() {
12 12
			beforeSend: function() {},
13 13
			success: function(data, textState) {
14 14
				if(data.success) {
15
					console.log(data);
15 16
					var $data = data.data;
16 17
					$(".h1Font").text($data.name);
17 18
					if($data.hasOrgLogo) {
@ -306,7 +307,7 @@ $(document).ready(function() {
306 307
				beforeSend: function() {},
307 308
				success: function(data, textState) {
308 309
					if(data.success) {
309

310
							$.MsgBox.Alert('提示', '修改成功');
310 311
					}
311 312
				},
312 313
				error: function(XMLHttpRequest, textStats, errorThrown) {
@ -334,7 +335,7 @@ $(document).ready(function() {
334 335
		fileNumLimit: 1,
335 336
		swf: '../js/webuploader/Uploader.swf',
336 337
		server: '../ajax/cachedFileUpload',
337
		fileSingleSizeLimit: 50 * 1024 * 1024,
338
		fileSingleSizeLimit: 5 * 1024 * 1024,
338 339
		pick: {
339 340
			id: "#filePicker",
340 341
			multiple: false
@ -364,19 +365,9 @@ $(document).ready(function() {
364 365
		}
365 366

366 367
	});
367

368
	uploader.on('uploadError', function(file) {
369
		var $li = $('#' + file.id),
370
			$error = $li.find('div.error');
371

372
		// 避免重复创建
373
		if(!$error.length) {
374
			$error = $('<div class="error"></div>').appendTo($li);
375
		}
376

377
		$error.text('上传失败');
378

379
	});
368
	 uploader.onError = function( code ) {
369
        	$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过5M')
370
        };
380 371
	uploader.on('uploadSuccess', function(file, data) {
381 372
		uploader.removeFile(fileId);
382 373
		cacheImageKey = data.data[0].cacheKey;

+ 23 - 0
cmp-portal/js/public/common.js

@ -133,4 +133,27 @@ var hash={
133 133
    'ustb.edu.cn': 'http://mail.ustb.edu.cn/',
134 134
    'foxmail.coom': 'http://www.foxmail.com'  
135 135
};
136
/*标志*/
137
	function autho() {
138
		if(arguments[0] == 1) {
139
			return {
140
				"sty": "authicon-pro",
141
				"title": "科袖认证专家"
142
			}
143
		} else {
144
			if(arguments[1] == 1) {
145
				return {
146
					"sty": "authicon-staff-ok",
147
					"title": "企业认证员工"
148
				}
149
			} else {
150
				if(arguments[2] == 3) {
151
					return {
152
						"sty": "authicon-real",
153
						"title": "实名认证用户"
154
					}
155
				}
156
			}
157
		}
158
	}
136 159