Browse Source

企业文章

jack 8 years ago
parent
commit
41cd55a716

+ 5 - 5
articalInfo.html

@ -97,17 +97,17 @@
97 97
			<div class="rightBlock">
98 98
				<a style="display: block;" >
99 99
					<div class="proImg">
100
						<img class=" headRadius" src="images/default-photo.jpg" id="headImg" style="display:block;cursor:pointer" id="pofessorImg">
100
						<img class=" headRadius" src="" id="headImg" style="display:block;cursor:pointer" id="pofessorImg">
101 101
					</div>
102 102
					<div class="proInfo">
103 103
						<div class="h3Font clearfix">
104 104
							<span class="named" id="nameS"></span>
105 105
							<span class="modifyicon authicon authicon-cu" style="margin-top:3px;" id="authFlag"></span>
106 106
						</div>
107
						<p class="h5Font"><span id="title"></span><span id="office"></span></p>
108
						<p class="h5Font"><span id="department"></span></p>
109
						<p class="h5Font"><span id="orgName"></span></p>
110
						<p class="h6Font" style="margin: 0;" id="address"><span></span></p>
107
						<p class="h5Font" id="orgType"></p>
108
						<p class="h5Font"><span id="qualificationList"></span></p>
109
						<p class="h5Font"><span id="createTime"></span></p>
110
						<p class="h6Font" style="margin: 0;" id="ocity"><span></span></p>
111 111
					</div>
112 112
				</a>
113 113
			</div>

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

@ -43,7 +43,7 @@
43 43
			            		<div class="h4Font" id="ocity"></div>
44 44
			            		<div class="btnPosition alignCenter btnBlock">
45 45
				            		<a href="cmp-updateinfo.html"><button type="button" class="frmtype btnModel headRadius">编辑</button></a>
46
				            		<a href="../companybrowinfor.html"><button type="button" class="frmtype btnModel headRadius">查看企业主页</button></a>
46
				            		<a id="conmliu"><button type="button" class="frmtype btnModel headRadius">查看企业主页</button></a>
47 47
			            		</div>
48 48
			            	</div>
49 49
			            </div>

+ 4 - 1
cmp-portal/js/cmp-workspaces.js

@ -197,5 +197,8 @@ $(document).ready(function() {
197 197
		}
198 198
	}
199 199
	companyDemand();
200

200
	/*跳转企业浏览页面*/
201
	$("#conmliu").on("click",function(){
202
		location.href="../companybrowinfor.html?orgId="+id;
203
	})
201 204
})

+ 90 - 35
cmp-portal/js/companybrowinfor.js

@ -1,5 +1,5 @@
1 1
$(document).ready(function() {
2
	var id = $.cookie('orgId');
2
	var id = GetQueryString("orgId");
3 3
	/*企业信息*/
4 4
	function companyInformation() {
5 5
		$.ajax({
@ -10,17 +10,22 @@ $(document).ready(function() {
10 10
			beforeSend: function() {},
11 11
			success: function(data, textState) {
12 12
				if(data.success) {
13
					console.log(data);
14 13
					var $data = data.data;
15
					
16 14
					var companytitle = $data.name + "-科袖网";
17
						window.setInterval(function() {
18
							document.title = companytitle;
19
						}, 500);
20
					
21
					$(".h1Font").text($data.name);
15
					window.setTimeout(function() {
16
						document.title = companytitle;
17
					}, 500);
18

19
					$("#comName").text($data.name);
20
					if($data.authStatus == 3) {
21
						$("#authS").addClass("authicon-com-ok").attr("title", "认证企业");
22
					} else {
23
						$("#authS").addClass("authicon-com-no").attr("title", "未认证企业");
24
					}
22 25
					if($data.hasOrgLogo) {
23 26
						$("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");
27
					} else {
28
						$("#oimg").attr("src", "images/default-icon.jpg");
24 29
					}
25 30
					if($data.orgUrl) {
26 31
						$("#inteAddress").text($data.orgUrl);
@ -31,13 +36,16 @@ $(document).ready(function() {
31 36
						var oTime = timeGeshi($data.foundTime);
32 37
						$("#createTime").text(oTime);
33 38
					} else {
34
						$("#createTime").val("");
39
						$("#createTime").remove();
35 40
					}
36 41
					if($data.city) {
37 42
						$("#ocity").text($data.city);
38 43
					}
39 44
					if($data.descp) {
40 45
						$(".editbox").text($data.descp);
46
					} else {
47
						$("span:contains('企业简介')").parents(".introduction").hide();
48
						$("a:contains('企业简介')").hide();
41 49
					}
42 50
					if($data.orgSize) {
43 51
						switch($data.orgSize) {
@ -60,6 +68,8 @@ $(document).ready(function() {
60 68
								$("#qualificationList").text("1000人以上")
61 69
								break;
62 70
						}
71
					} else {
72
						$("#qualificationList").remove();
63 73
					}
64 74
					if($data.orgType) {
65 75
						switch($data.orgType) {
@ -85,12 +95,21 @@ $(document).ready(function() {
85 95
					}
86 96
					if($data.industry) {
87 97
						indu($data.industry, '#industryShow')
98
					} else {
99
						$("span:contains('所属行业')").parents(".introduction").hide();
100
						$("a:contains('所属行业')").hide();
88 101
					}
89 102
					if($data.subject) {
90 103
						indu($data.subject, '#subjectShow')
104
					} else {
105
						$("span:contains('专注领域')").parents(".introduction").hide();
106
						$("a:contains('专注领域')").hide();
91 107
					}
92 108
					if($data.qualification) {
93 109
						indu($data.qualification, '#qiye ')
110
					} else {
111
						$("span:contains('企业用户')").parents(".introduction").hide();
112
						$("a:contains('企业用户')").hide();
94 113
					}
95 114
				}
96 115
			},
@ -131,8 +150,7 @@ $(document).ready(function() {
131 150
			beforeSend: function() {},
132 151
			success: function(data, textState) {
133 152
				if(data.success) {
134
					console.log(data);
135
					var $info=data.data;
153
					var $info = data.data;
136 154
					userHtml($info);
137 155
				}
138 156
			},
@ -143,32 +161,69 @@ $(document).ready(function() {
143 161
	}
144 162
	/*填充企业下用户*/
145 163
	function userHtml(arr) {
146
	for(var i=0; i < arr.length; i++) {
147
		var tiof="",img;
148
		if(arr[i].hasHeadImage){
149
			img = "/images/head/" + arr[i].id + "_l.jpg";
150
		}else{
151
			img ="images/default-photo.jpg"
164
		for(var i = 0; i < arr.length; i++) {
165
			var tiof = "",
166
				img;
167
			if(arr[i].hasHeadImage) {
168
				img = "/images/head/" + arr[i].id + "_l.jpg";
169
			} else {
170
				img = "images/default-photo.jpg"
171
			}
172
			if(arr[i].title) {
173
				if(arr[i].office) {
174
					tiof = arr[i].title + " ," + arr[i].office;
175
				} else {
176
					tiof = arr[i].title;
177
				}
178
			} else {
179
				if(arr[i].office) {
180
					tiof = arr[i].office;
181
				}
182
			}
183
			var oString = '<dd>'
184
			oString += '<div class="staffChild">'
185
			oString += '<img class="headRadius" src="' + img + '" width="100%" />'
186
			oString += '</div><div class="h4Font"><span>' + arr[i].name + '</span></div>'
187
			oString += '<div class="h4Font">' + tiof + '</div></dd>'
188
			$("#userList").append(oString);
152 189
		}
153
    	if(arr[i].title){
154
    		if(arr[i].office){
155
    			tiof=arr[i].title+" ,"+arr[i].office;
156
    		}else{
157
    			tiof=arr[i].title;
158
    		}
159
    	}else{
160
    		if(arr[i].office){
161
    			tiof=arr[i].office;
162
    		}
163
    	}
164
		var oString = '<dd>'
165
		oString += '<div class="staffChild">'
166
		oString += '<img class="headRadius" src="'+img+'" width="100%" />'
167
		oString += '</div><div class="h4Font"><span>'+arr[i].name+'</span></div>'
168
		oString += '<div class="h4Font">'+tiof+'</div></dd>'
169
		$("#userList").append(oString);
170 190
	}
171
}
172 191
	companyInformation();
173 192
	companyUser();
193
	/*企业文章*/
194
	$.ajax({
195
		url: "/ajax/article/qaOrg",
196
		dataType: 'json', //数据格式类型
197
		type: 'GET', //http请求类型
198
		data: {
199
			"orgId": id
200
		},
201
		timeout: 10000, //超时设置
202
		success: function(data) {
203
			if(data.success) {
204
					for(var i = 0; i < data.data.length; i++) {
205
						var add = '<li><a href="articalInfo.html?oFlag=1&articleId=' + data.data[i].articleId + '&professorId=' + data.data[i].orgId + '" style="display:block;">'
206
						add += '<div class="art_topicBox"><div class="art_img" style=""></div>'
207
						add += '<div class="art_tbox"><h6 id="artical_topic" >' + data.data[i].articleTitle + '</h6></div>'
208
						add += '</div><div class="tagsBox"><span></span></div>'
209
						add += '</a></li>';
210
						$add = $(add);
211
						$("#reachArticle").append($add);
212
						$add.find('.tagsBox span').text(data.data[i].industry); //data.data[i].subject
213
						if(data.data[i].articleImg) {
214
							$add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
215
						}
216

217
					}
218
					//资源轮播
219
					var $content2 = $(".sharescrollbox.Acrollbox");
220
					var childcount2 = $content2.find(".otherRes.shareshow li").length;
221
					Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
222
			}
223
		},
224
		error: function() {
225
			return;
226
		}
227
	})
228
	
174 229
})

+ 19 - 3
companybrowinfor.html

@ -20,10 +20,10 @@
20 20
<div id="container">
21 21
	<div class="content" style="padding-bottom:20px;">
22 22
		<div class="information-head clearfix">
23
			<div class="head-org headRadius"><img src="images/default-icon.jpg" width="100%" id="oimg"></div>	
23
			<div class="head-org headRadius"><img src="" width="100%" id="oimg"></div>	
24 24
			<div class="head-center">
25 25
				<div class="infor-browse cmpBasic">
26
					<div class="h1Font"><span></span><em class="authiconNew " title=""></em></div>
26
					<div class="h1Font"><span id="comName"></span><em class="authiconNew" title="" id="authS"></em></div>
27 27
	        		<div class="h4Font cmpBasic"><span id="orgType"></span><span id="qualificationList"></span><span id="createTime"></span></div>
28 28
	        		<div class="h4Font" id="inteAddress"></div>
29 29
	        		<div class="h4Font" id="ocity"></div>
@ -42,6 +42,22 @@
42 42
                </div>
43 43
			</div>
44 44
			<div class="content-right">
45
				<div class="right-box introduction" id="reA">
46
								<div class="right-title"><span>科研文章</span></div>
47
								<div class="infor-browse">
48
									<div class="shareabout shareabout1" style="margin: 0 30px;">
49
										<div class="sharesrcbox" style="width:642px;">
50
											<div class="sharescrollbox Acrollbox">
51
												<ul class="shareshow otherRes clearfix" id="reachArticle">
52
												
53
												</ul>
54
											</div>
55
										</div>
56
										<span class="resouprev resoubtn articalbtn"></span>
57
										<span class="resounext resoubtn articalbtn"></span>
58
									</div>
59
								</div>
60
							</div>
45 61
				<div class="right-box introduction">
46 62
					<div class="right-title"><span>企业简介</span></div>
47 63
					<div class="infor-browse">
@ -72,7 +88,7 @@
72 88
				<div class="right-box introduction">
73 89
					<div class="right-title"><span>企业资质</span></div>
74 90
					<div class="infor-browse">
75
						<ul class="edu-about edu-infor" id="qiye">
91
						<ul class="edu-about edu-infor edu-infor2" id="qiye">
76 92
							<!--<li>3333</li>
77 93
							<li>3333</li>-->
78 94
						</ul>