Просмотр исходного кода

Merge branch 'dev' of http://121.42.53.174:3000/jiapeng/portal-front.git into dev

happy лет назад: 7
Родитель
Сommit
b8db035638

+ 5 - 1
cmp-portal/js/resourceIssue.js

@ -378,6 +378,7 @@ $(document).ready(function() {
378 378
		var $len = $("#fileList").find("img").length;
379 379
		var reName = $("#resourceName").val();
380 380
		var oIndustry = $("#application").val();
381
		var oLen=$("#expertli").find(".selectAdd").length
381 382
		if($len == 0) {
382 383
			$.MsgBox.Alert('提示', '请上传资源图片。');
383 384
			return 0;
@ -390,6 +391,10 @@ $(document).ready(function() {
390 391
			$.MsgBox.Alert('提示', '请输入应用用途。');
391 392
			return 0;
392 393
		}
394
		if(oLen==0) {
395
			$.MsgBox.Alert('提示', '至少选择一个负责人');
396
			return 0;
397
		}
393 398
	}
394 399
	/*发布函数*/
395 400
	function ajsPost(pa1, pa2) {
@ -434,7 +439,6 @@ $(document).ready(function() {
434 439
					} else {
435 440
						$.MsgBox.Alert('提示', '资源发布成功!');
436 441
						$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
437
						return;
438 442
						location.href = "resourceList.html"
439 443
					}
440 444


+ 1 - 1
cmp-portal/resourceIssue.html

@ -144,7 +144,7 @@
144 144
				</div>
145 145
				<div class="conItem">
146 146
					<div class="form-item otherBlock">
147
						<div class="aboutTit">负责人/联系人<span class="frmconmsg" id="linkman"></span></div>
147
						<div class="aboutTit">负责人/联系人<em class="requiredcon">*</em><span class="frmconmsg" id="linkman"></span></div>
148 148
						<div class="form-result addexpertRe">
149 149
							<ul class="addexpert" id="expertli">
150 150
								<li id="usid" data-id="7F26E3C720064AE8A10C7357BBBD239B">

+ 3 - 3
css/genindex.css

@ -201,10 +201,10 @@ ul.filterUl>li.filterCurrent{border-color:#e1e1e1;border-radius: 20px;color:#ff9
201 201
.listdiv ul.listitemdiv{}
202 202
ul.listitemdiv li{position:relative;min-height:132px;padding:15px 20px;}
203 203
ul.listitemdiv li:after{content: "";position: absolute;left: 0;right: 0;bottom: 0;height: 2px;background: #f7f7f8;}
204
ul.listitemdiv li a.linkhref{display: block;}
204
ul.listitemdiv li a.linkhref{display: block;width: 100%;}
205 205
ul.listitemdiv li .lefthead{position:absolute;top:50%;overflow: hidden;background-size: cover;background-position: center;}
206 206
ul.listitemdiv li .userheadt{width: 100px;height:100px;margin-top:-50px;background-image: url(../images/default-photo.jpg);}
207
ul.listitemdiv li .centercon{padding-left:120px;padding-right:200px;margin-top:14px;}
207
ul.listitemdiv li .centercon{padding-left:120px;padding-right:200px;}
208 208
ul.listitemdiv li .centercon .h1font{font-size: 16px;line-height: 28px; color:#000;}
209 209
ul.listitemdiv li .centercon .h2font{font-size: 14px;line-height: 24px; color:#666;}
210 210
ul.listitemdiv li .rightop{padding:0 24px;line-height:32px;font-size:16px;color:#FFFFFF;cursor:pointer;border-radius:4px;background:#ff9900;
@ -214,7 +214,7 @@ ul.listitemdiv li .rightop{padding:0 24px;line-height:32px;font-size:16px;color:
214 214
215 215
ul.listitemdiv.listmorediv li{min-height: 142px;}	
216 216
ul.listitemdiv.listmorediv .resouhead{width: 164px;height: 110px;margin-top:-55px;background-image: url(../images/default-resource.jpg);}
217
ul.listitemdiv.listmorediv .centercon{padding-left:184px;padding-right: 10px;margin-top:16px;}
217
ul.listitemdiv.listmorediv .centercon{padding-left:184px;padding-right: 10px;}
218 218
ul.listitemdiv.listmorediv .margin-top:16px;{margin-top:30px;}
219 219
220 220

+ 50 - 22
js/resourcePreview.js

@ -21,7 +21,7 @@ $(document).ready(function() {
21 21
			"success": function(data) {
22 22
				console.log(data);
23 23
				if(data.success) {
24
					//resourceHtml(data.data);
24
					resourceHtml(data.data);
25 25
				}
26 26
			},
27 27
			"data": {
@ -50,28 +50,56 @@ $(document).ready(function() {
50 50
	function resourceHtml($da) {
51 51
		$("#resourceName").text($da.resourceName); //名字
52 52
		$("#application").text($da.supportedServices); //应用用途
53
		if($da.editProfessor.orgName) { //所属机构
54
			$("#organizationName").text($da.editProfessor.orgName).parents("li").show();
55
		}
56
		$("#nameS").text($da.editProfessor.name); //"office": "", //职位 "title": "", //职称
57
		if($da.editProfessor.title) {
58
			$("#titleOffice").text($da.editProfessor.title);
59
		} else {
60
			if($da.editProfessor.office) {
61
				$("#titleOffice").text($da.editProfessor.office);
53
		if($da.editProfessor) {
54
			$("#person,#orgName").show();
55
			if($da.editProfessor.orgName) { //所属机构
56
				$("#organizationName").text($da.editProfessor.orgName).parents("li").show();
62 57
			}
63
		}
64
		if($da.editProfessor.orgName) {
65
			$("#orgType").text($da.editProfessor.orgName);
66
		}
67
		professorId = $da.editProfessor.id;
68
		/*if(userid!=professorId) {
69
			$(".goSpan").show();
70
		}*/
71
		var professorFlag = autho($da.editProfessor.authType, $da.editProfessor.orgAuth, $da.editProfessor.authStatus);
72
		$("#authFlag").addClass(professorFlag.sty).attr("title", professorFlag.title);
73
		if($da.editProfessor.hasHeadImage == 1) {
74
			$("#headImg").css("background-image", 'url(/images/head/' + $da.editProfessor.id + '_l.jpg)');
58
			$("#nameS").text($da.editProfessor.name); //"office": "", //职位 "title": "", //职称
59
			if($da.editProfessor.title) {
60
				$("#titleOffice").text($da.editProfessor.title);
61
			} else {
62
				if($da.editProfessor.office) {
63
					$("#titleOffice").text($da.editProfessor.office);
64
				}
65
			}
66
			if($da.editProfessor.orgName) {
67
				$("#orgType").text($da.editProfessor.orgName);
68
			}
69
			professorId = $da.editProfessor.id;
70
			/*if(userid!=professorId) {
71
				$(".goSpan").show();
72
			}*/
73
			var professorFlag = autho($da.editProfessor.authType, $da.editProfessor.orgAuth, $da.editProfessor.authStatus);
74
			$("#authFlag").addClass(professorFlag.sty).attr("title", professorFlag.title);
75
			if($da.editProfessor.hasHeadImage == 1) {
76
				$("#headImg").css("background-image", 'url(/images/head/' + $da.editProfessor.id + '_l.jpg)');
77
			}
78
		}else {
79
			$("#enterprise,#resPerson").show();
80
			if($da.organization.hasOrgLogo) {
81
						$("#Qimg").attr("style", "background-image: url(/images/org/" + $da.organization.id + ".jpg);");
82
					}
83
					if($da.organization.authStatus==3){
84
						$("#QauthFlag").addClass("authicon-com-ok").attr("title", "认证企业");	
85
					}
86
					$("#Qname").text($da.organization.name);
87
					$("#Qindustry").text($da.organization.subject);
88
					if($da.organization.orgType==2){
89
						$("#QorgType").text("上市企业");
90
					}else if($da.organization.orgType==3){
91
						$("#QorgType").text("国有企业");
92
					}else if($da.organization.orgType==4){
93
						$("#QorgType").text("合资企业");
94
					}else if($da.organization.orgType==5){
95
						$("#QorgType").text("私人企业");
96
					}else if($da.organization.orgType==6){
97
						$("#QorgType").text("外资企业");
98
					}else if($da.organization.orgType==7){
99
						$("#QorgType").text("初创企业");
100
					}else{
101
						$("#QorgType").text("");
102
					}
75 103
		}
76 104
		if($da.spec) { //厂商型号
77 105
			$("#modelNumber").text($da.spec).parents("li").show();

+ 61 - 23
js/resourceShow.js

@ -52,7 +52,7 @@ $(document).ready(function() {
52 52
		$("#resourceName").text($da.resourceName); //名字
53 53
		$("#application").text($da.supportedServices); //应用用途
54 54
		if($da.editProfessor) {
55
			$("#person").show();
55
			$("#person,#orgName").show();
56 56
			if($da.orgName) { //所属机构
57 57
				$("#organizationName").text($da.orgName).parents("li").show();
58 58
			}
@ -81,24 +81,25 @@ $(document).ready(function() {
81 81
			}
82 82
		}else{
83 83
			$("#enterprise,#resPerson").show();
84
			if(data.data.organization.hasOrgLogo) {
85
						$("#Qimg").attr("style", "background-image: url(/images/org/" + data.data.organization.id + ".jpg);");
84
			if($da.organization.hasOrgLogo) {
85
						$("#Qimg").attr("style", "background-image: url(/images/org/" + $da.organization.id + ".jpg);");
86 86
					}
87
					if(data.data.organization.authStatus==3){
87
					if($da.organization.authStatus==3){
88 88
						$("#QauthFlag").addClass("authicon-com-ok").attr("title", "认证企业");	
89 89
					}
90
					$("#Qindustry").text( data.data.organization.subject);
91
					if(data.data.organization.orgType==2){
90
					$("#Qname").text($da.organization.name);
91
					$("#Qindustry").text($da.organization.subject);
92
					if($da.organization.orgType==2){
92 93
						$("#QorgType").text("上市企业");
93
					}else if(data.data.organization.orgType==3){
94
					}else if($da.organization.orgType==3){
94 95
						$("#QorgType").text("国有企业");
95
					}else if(data.data.organization.orgType==4){
96
					}else if($da.organization.orgType==4){
96 97
						$("#QorgType").text("合资企业");
97
					}else if(data.data.organization.orgType==5){
98
					}else if($da.organization.orgType==5){
98 99
						$("#QorgType").text("私人企业");
99
					}else if(data.data.organization.orgType==6){
100
					}else if($da.organization.orgType==6){
100 101
						$("#QorgType").text("外资企业");
101
					}else if(data.data.organization.orgType==7){
102
					}else if($da.organization.orgType==7){
102 103
						$("#QorgType").text("初创企业");
103 104
					}else{
104 105
						$("#QorgType").text("");
@ -115,7 +116,11 @@ $(document).ready(function() {
115 116
		}
116 117
		if($da.subject) {
117 118
			var oSub = $da.subject.split(",");
118
			interestingResources(oSub);
119
			if($da.resourceType==1) {
120
				interestingResources(oSub,$da.professorId,0);
121
			}else{
122
				interestingResources(oSub,$da.orgId,1);
123
			}
119 124
			var oSt = "";
120 125
			for(var i = 0; i < oSub.length; i++) {
121 126
				oSt += '<li><p class="h2Font">' + oSub[i] + '</p></li>'
@ -203,12 +208,26 @@ $(document).ready(function() {
203 208
	function relatedArticlesHtml($html) {
204 209
		for(var i = 0; i < $html.length; i++) {
205 210
			(function(n) {
211
				var oURL;
212
				if($html[i].article.articleType==1) {
213
					oURL="/ajax/professor/baseInfo/" + $html[i].article.professorId;
214
				}else{
215
					oURL="/ajax/org/" + $html[i].article.orgId;
216
				}
206 217
				$.ajax({
207
					"url": "/ajax/professor/baseInfo/" + $html[i].article.professorId,
218
					"url":oURL,
208 219
					"type": "GET",
209 220
					"success": function(data) {
210 221
						if(data.success) {
211
							var stl = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
222
							if($html[n].article.articleType==1) {
223
								var stl = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
224
							}else {
225
								if(data.data.authStatus==3) {
226
									var stl={};
227
									stl.sty="authicon-com-ok";
228
									stl.title="认证企业";
229
								}
230
							}
212 231
							var str = ""
213 232
							str += '<li data-id="' + $html[n].article.articleId + '">'
214 233
							if($html[n].article.articleImg) {
@ -237,9 +256,21 @@ $(document).ready(function() {
237 256
		location.href = "articalShow.html?articleId=" + $(this).attr("data-id");
238 257
	})
239 258
	/*感兴趣的资源*/
240
	function interestingResources(arry) {
259
	function interestingResources(arry,oId,oNu) {
260
		var oUrl;
261
		var $in={};
262
		$in.keys= arry;
263
		$in.resourceId= resourceId;
264
		
265
		if(oNu==0) {
266
				$in.professorId= oId;
267
				oUrl="/ajax/resource/ralateRes";
268
		}else {
269
			$in.orgId= oId;
270
			oUrl="/ajax/resource/orgRalateRes";
271
		}
241 272
		$.ajax({
242
			"url": "/ajax/resource/ralateRes",
273
			"url": oUrl,
243 274
			"type": "GET",
244 275
			"success": function(data) {
245 276
				console.log(data);
@ -251,11 +282,7 @@ $(document).ready(function() {
251 282
					interestingResourcesHtml(data.data);
252 283
				}
253 284
			},
254
			"data": {
255
				"keys": arry,
256
				"resourceId": resourceId,
257
				"professorId": professorId
258
			},
285
			"data":$in,
259 286
			"traditional": true,
260 287
			dataType: "json",
261 288
			'error': function() {
@ -266,7 +293,18 @@ $(document).ready(function() {
266 293
	/*感兴趣资源的html*/
267 294
	function interestingResourcesHtml($respond) {
268 295
		for(var i = 0; i < $respond.length; i++) {
269
			var stl = autho($respond[i].editProfessor.authType, $respond[i].editProfessor.orgAuth, $respond[i].editProfessor.authStatus);
296
			if($respond[i].organization) {
297
				if($respond[i].organization.authStatus==3) {
298
					var stl={};
299
					stl.sty="authicon-com-ok";
300
					stl.title="认证企业";
301
				}
302
				var name= $respond[i].organization.name;
303
			}else {
304
				var stl = autho($respond[i].editProfessor.authType, $respond[i].editProfessor.orgAuth, $respond[i].editProfessor.authStatus);
305
				var name= $respond[i].editProfessor.name;
306
			}
307
			
270 308
			var oStr = '';
271 309
			if($respond[i].images.length) {
272 310
				oStr += '<li data-id="' + $respond[i].resourceId + '"><div class="madiaHead resouseHead"style="background-image: url(/data/resource/' + $respond[i].images[0].imageSrc + ')"></div>'
@ -275,7 +313,7 @@ $(document).ready(function() {
275 313
			}
276 314
			oStr += '<div class="madiaInfo">'
277 315
			oStr += '<p class="h1Font">' + $respond[i].resourceName + '</p>'
278
			oStr += '<p><span class="h1Font">' + $respond[i].editProfessor.name + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
316
			oStr += '<p><span class="h1Font">' + name + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
279 317
			oStr += '<p class="h2Font ellipsisSty">用途:<span>' + $respond[i].supportedServices + '</span></p>'
280 318
			oStr += '</div></li>'
281 319
			$("#resourceList").append(oStr);

+ 9 - 18
resourcePreview.html

@ -66,7 +66,7 @@
66 66
						<!--资源详情区-->
67 67
						<div class="showMain showMain2">
68 68
							<ul>
69
								<li>
69
								<li class="displayNone" id="orgName">
70 70
									<div class="showTit">所属机构:</div>
71 71
									<div class="showCon" id="organizationName">
72 72
									</div>
@ -101,7 +101,7 @@
101 101
				</div>
102 102
			</div>
103 103
			<div class="rightconBox floatR">
104
				<div class="conItem conItemG alignCenter" style="border:none;padding:30px;">
104
				<div class="conItem conItemG alignCenter displayNone" style="border:none;padding:30px;" id="person">
105 105
					<div class="madiaHead useHead" id="headImg" style="cursor:pointer"></div>
106 106
					<div class="proInfo">
107 107
						<div class="h3Font clearfix">
@ -116,32 +116,23 @@
116 116
						<span class="attenSpan">关注</span>
117 117
					</div>
118 118
				</div>
119
				<div class="conItem conItemG" id="enterprise" style="border:none;padding:30px;">
120
					<a href="companybrowinfor.html?orgId=A93B9348F2094D12A6DC9A23F16E1246" class="qiyego"><div class="madiaHead cmpHead" id="Qimg" style="background-image: url(/images/org/A93B9348F2094D12A6DC9A23F16E1246.jpg);"></div></a>
119
				<div class="conItem conItemG displayNone" id="enterprise" style="border:none;padding:30px;">
120
					<a href="" class="qiyego"><div class="madiaHead cmpHead" id="Qimg" style=""></div></a>
121 121
					<div class="proInfo alignCenter">
122 122
						<div class="h3Font clearfix">
123
							<a href="companybrowinfor.html?orgId=A93B9348F2094D12A6DC9A23F16E1246" class="h1Font qiyego" id="Qname">北京科袖科技有限公司</a>
124
							<span class="authiconNew authicon-com-ok" title="认证企业" id="QauthFlag"></span>
123
							<a href="companybrowinfor.html?orgId=A93B9348F2094D12A6DC9A23F16E1246" class="h1Font qiyego" id="Qname"></a>
124
							<span class="authiconNew" title="" id="QauthFlag"></span>
125 125
						</div>
126 126
						<p class="h2Font ellipsisSty" id="Qindustry"></p>
127 127
						<p class="h2Font" id="QorgType"></p>
128 128
					</div>
129 129
				</div>
130
				<div class="conItem">
130
				<div class="conItem displayNone" id="resPerson">
131 131
					<div class="form-item otherBlock">
132 132
						<div class="aboutTit">负责人/联系人</div>
133
						<div class="form-result">
133
						<div class="form-result addexpertRe">
134 134
							<ul class="addexpert" id="expertli">
135
								<li id="usid" data-id="7F26E3C720064AE8A10C7357BBBD239B">
136
									<div class="madiaHead useHead" id="userimg" style="background-image: url(/images/head/7F26E3C720064AE8A10C7357BBBD239B_l.jpg);"></div>
137
									<div class="madiaInfo">
138
										<p class="ellipsisSty">
139
											<span class="h1Font" id="name">李潇远2</span><em class="authicon authicon-staff-ok" title="企业认证员工"></em>
140
										</p>
141
										<p class="h2Font ellipsisSty">职称只为</p>
142
									</div>
143
									<div class="selectAdd"></div>
144
								</li>
135
								
145 136
							</ul>
146 137
						</div>
147 138
					</div>

+ 1 - 1
resourceShow.html

@ -66,7 +66,7 @@
66 66
						<!--资源详情区-->
67 67
						<div class="showMain showMain2">
68 68
							<ul>
69
								<li>
69
								<li class="displayNone" id="orgName">
70 70
									<div class="showTit">所属机构:</div>
71 71
									<div class="showCon" id="organizationName">
72 72
									</div>

+ 5 - 5
searchNew.html

@ -95,7 +95,7 @@
95 95
				<div class="listdiv">
96 96
					<!--找人-->
97 97
					<ul class="listitemdiv">
98
						<li>
98
						<li class="flexCenter">
99 99
							<a class="linkhref" href="information-brow.html">
100 100
								<div class="lefthead userheadt userRadius"></div>
101 101
								<div class="centercon">
@ -112,7 +112,7 @@
112 112
					</ul>
113 113
					<!--找资源-->
114 114
					<ul class="listitemdiv listmorediv">
115
						<li>
115
						<li class="flexCenter">
116 116
							<a class="linkhref" href="resourceInfo.html">
117 117
								<div class="lefthead resouhead"></div>
118 118
								<div class="centercon">
@ -125,7 +125,7 @@
125 125
								</div>
126 126
							</a>
127 127
						</li>
128
						<li>
128
						<li class="flexCenter">
129 129
							<a class="linkhref" href="resourceInfo.html">
130 130
								<div class="lefthead resouhead"></div>
131 131
								<div class="centercon">
@ -141,7 +141,7 @@
141 141
					</ul>
142 142
					<!--找文章-->
143 143
					<ul class="listitemdiv listmorediv">
144
						<li>
144
						<li class="flexCenter">
145 145
							<a class="linkhref" href="articalShow.html">
146 146
								<div class="lefthead articalhead"></div>
147 147
								<div class="centercon centercon2">
@ -153,7 +153,7 @@
153 153
								</div>
154 154
							</a>
155 155
						</li>
156
						<li>
156
						<li class="flexCenter">
157 157
							<a class="linkhref" href="articalShow.html">
158 158
								<div class="lefthead articalhead"></div>
159 159
								<div class="centercon centercon2">