LIPENGTAO1313 6 years ago
parent
commit
2ac87a107d

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

@ -170,7 +170,7 @@
170 170
							<ul class="addexpert" id="expertli" style="overflow-y:auto;max-height:380px;">
171 171
							</ul>
172 172
							<div class="seRe displayNone"><p>您当前没有认证员工</p>
173
							<p><a class="nowAn" href="resourceIssue.html" style="color:#28b8fa">点击这里进行认证</a></p>
173
							<p><a class="nowAn" href="cmp-staffList.html" style="color:#28b8fa">点击这里进行认证</a></p>
174 174
						</div>
175 175
						</div>
176 176
					</div>

+ 3 - 2
cmp-portal/cmp-needList.html

@ -53,12 +53,13 @@
53 53
						   <a href="cmp-setAuth.html?auth=1"><button type="button" class="frmtype btnModel headRadius identBtn" id="identBtn">马上认证</button></a>
54 54
						</div>
55 55
					</div>
56
					<div class="topOperaBlock clearfix"style="margin-bottom:20px;">
56
					
57
					<div class="form-item itemListCon" id="companyDemandList" style="display:none;">
58
						<div class="topOperaBlock clearfix"style="margin-bottom:20px;">
57 59
						<div class="issueSpanBlock col-w-4 floatR">
58 60
							<a class="issueSpan">发布需求</a>
59 61
						</div>
60 62
					</div>
61
					<div class="form-item itemListCon" id="companyDemandList" style="display:none;">
62 63
						<div class="form-result aboutRes" style="border:none;margin-top:0;">
63 64
							<ul class="form-need" id="cmpneedList">
64 65
								

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

@ -124,7 +124,7 @@
124 124
					<div class="form-item otherBlock">
125 125
						<div class="aboutTit">联系人<em class="requiredcon">*</em><span class="frmconmsg" id="linkman"></span></div>
126 126
						<div class="form-result addexpertRe">
127
							<ul class="addexpert" id="expertli" style="overflow-y:auto;height:380px;">
127
							<ul class="addexpert" id="expertli" style="overflow-y:auto;max-height:380px;">
128 128
								
129 129
								
130 130
							</ul>

+ 7 - 5
cmp-portal/js/cmp-demandPublish.js

@ -273,15 +273,17 @@ $(document).ready(function() {
273 273
	/*选择用户*/
274 274
	$("#expertli").on("click","li",function(){
275 275
		var userL=$("#expertli").find(".selectAdd").length;
276
		console.log($(this).find('.selectNull').hasClass("selectAdd"))
276 277
		if($(this).find('.selectNull').hasClass("selectAdd")) {
277 278
			$(this).find('.selectNull').removeClass("selectAdd");
279
			return;
278 280
		}
279 281
		$("#linkman").text("");
280
			if(userL >1) {
281
				$("#linkman").text("最多选择1位联系人");
282
				return;
283
			}
284
			$(this).find('.selectNull').addClass("selectAdd");
282
		if(userL ==1) {
283
			$("#linkman").text("最多选择1位联系人");
284
			return;
285
		}
286
		$(this).find('.selectNull').addClass("selectAdd");	
285 287
	});
286 288
	
287 289
});

+ 2 - 2
cmp-portal/js/cmp-needList.js

@ -154,7 +154,7 @@ $(document).ready(function() {
154 154
				if(data.success) {
155 155
					if(data.data.length==0) {
156 156
						$.MsgBox.Confirm("提示", "请至少认证1位员工?", function(){
157
							//location.href="cmp-UnstaffList.html";
157
							location.href="cmp-staffList.html";
158 158
						});
159 159
						$("#mb_btn_no").val("稍后再说");
160 160
						$("#mb_btn_ok").val("去认证");
@ -272,7 +272,7 @@ $(document).ready(function() {
272 272
			},
273 273
			"success": function(data) {
274 274
				if(data.success && data.data) {
275
					$listItem.find(".creator").text(data.data.name);
275
					$listItem.find(".creator").text('联系人 ' +data.data.name);
276 276
				}
277 277
			},
278 278
			"error": function() {

+ 3 - 3
cmp-portal/js/cmp-procuctList.js

@ -25,7 +25,7 @@ $(document).ready(function() {
25 25
				if(data.success) {
26 26
					if(data.data.length==0) {
27 27
						$.MsgBox.Confirm("提示", "请至少认证1位员工?", function(){
28
							location.href="cmp-UnstaffList.html";
28
							location.href="cmp-staffList.html";
29 29
						});
30 30
						$("#mb_btn_no").val("稍后再说");
31 31
						$("#mb_btn_ok").val("去认证");
@ -120,9 +120,9 @@ $(document).ready(function() {
120 120
				'<div class="madiaInfo">' +
121 121
				'<p class="h1Font ellipsisSty">' + $data[i].name + '</p>' +
122 122
				'<ul class="h2Font clearfix">' +
123
				'<li><span>' + oTime + '</span></li>' + pageview + '<li><span id="oop" style="display:inline-block;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"> 联系人 张三、李四、王五张三、李四、王五张三、李四、王五张三、李四、王五</span></li>' +
123
				'<li><span>' + oTime + '</span></li>' + pageview + '<li><span id="oop" style="display:inline-block;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"></span></li>' +
124 124
				'</ul>' +
125
				'<p><span>' + draftLable + '</span><span class="crel" style="margin-left:10px"></span></p>' +
125
				'<p><span>' + draftLable + '</span><span class="crel" style="display:inline-block;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"></span></p>' +
126 126
				'</div>' +
127 127
				'</a>' +
128 128
				'<ul class="madiaEdit">' +

+ 37 - 1
cmp-portal/js/cmp-serviceIssue.js

@ -565,6 +565,8 @@ $(function() {
565 565
						}
566 566
					} else {
567 567
						$(_this).next().addClass("displayNone");
568
						var itemlist = '<div class="null-data">没有找到相关资源</div>'
569
						$("#resouselist").html(itemlist);
568 570
					}
569 571
				} else {
570 572
					$(_this).next().addClass("displayNone");
@ -611,7 +613,41 @@ $(function() {
611 613
			$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
612 614
		}
613 615
	}
614

616
	if(!sevriceId)
617
	DefaultContact()
618
	function DefaultContact() {
619
		$.ajax({
620
			url: "/ajax/org/linkman/queryAll",
621
			type: "GET",
622
			timeout: 10000,
623
			dataType: "json",
624
			async:"true",
625
			data: {
626
				"oid": orgId
627
			},
628
			success: function(data, textState) {
629
				if(data.success) {
630
					var $data = data.data;
631
					if($data.length) {
632
						oProfessor.push($data[0].pid);
633
						var oLength=$("#expertli").find("li");
634
							for(var i=0;i<oLength.length;i++) {
635
							var sid = oLength.eq(i).attr("id");
636
							if($data[0].pid ===sid) {
637
								oLength.eq(i).find("[flag]").addClass("selectAdd");
638
								break;
639
							}
640
						}
641
							oProfessor.push($data[0].pid);
642
					}
643
						
644
				}
645
			},
646
			error: function(XMLHttpRequest, textStats, errorThrown) {
647
				$.MsgBox.Alert('提示', '服务器请求失败')
648
			}
649
		})
650
	}
615 651
	//删除右侧搜索出的专家和资源
616 652
	$(".addexpert").on("click", ".deleteThis", function() {
617 653
		var plength = $(this).parent().parent().find("li").length;

+ 14 - 0
cmp-portal/js/needIssue.js

@ -330,4 +330,18 @@ $(document).ready(function() {
330 330
			}
331 331
		});
332 332
	}
333
	$("#expertli").on("click","li",function(){
334
		var userL=$("#expertli").find(".selectAdd").length;
335
		console.log($(this).find('.selectNull').hasClass("selectAdd"))
336
		if($(this).find('.selectNull').hasClass("selectAdd")) {
337
			$(this).find('.selectNull').removeClass("selectAdd");
338
			return;
339
		}
340
		$("#linkman").text("");
341
		if(userL ==1) {
342
			$("#linkman").text("最多选择1位联系人");
343
			return;
344
		}
345
		$(this).find('.selectNull').addClass("selectAdd");	
346
	});
333 347
});

+ 70 - 7
cmp-portal/js/serviceList.js

@ -25,7 +25,7 @@ $(document).ready(function() {
25 25
				if(data.success) {
26 26
					if(data.data.length==0) {
27 27
						$.MsgBox.Confirm("提示", "请至少认证1位员工?", function(){
28
							location.href="cmp-UnstaffList.html";
28
							location.href="cmp-staffList.html";
29 29
						});
30 30
						$("#mb_btn_no").val("稍后再说");
31 31
						$("#mb_btn_ok").val("去认证");
@ -119,8 +119,8 @@ $(document).ready(function() {
119 119
						'<div class="madiaInfo">'+					
120 120
							'<p class="h1Font ellipsisSty">'+$data[i].name+'</p>'+						
121 121
							'<ul class="showliTop h2Font clearfix">'+
122
								'<li><span>'+oTime+'</span></li>'+pageview+'<li><span id="oop" style="color:#e03b43;"></span></li>' +
123
							'</ul><p><span>'+draftLable+'</span><span class="crel" style="margin-left:10px"></span></p>' +
122
								'<li><span>'+oTime+'</span></li>'+pageview+'<li><span id="oop" style="display:inline-block;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"></span></li>' +
123
							'</ul><p><span>'+draftLable+'</span><span class="crel" style="display:inline-block;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"></span></p>' +
124 124
						'</div>'+
125 125
				'</a>'+
126 126
				'<ul class="madiaEdit">'+
@ -131,11 +131,17 @@ $(document).ready(function() {
131 131
			var $os = $(oStr);
132 132
			$("#resourceList").append($os);
133 133
			if($data[i].status == 2) {
134
				if($data[i].num==0)
135
				$os.find(".crel").text("未设置联系人");
134
				if($data[i].num==0) {
135
					$os.find(".crel").text("未设置联系人");
136
					return;
137
				}
138
				resourecRel.call($os.find(".crel"), $data[i].id);
136 139
			} else {
137
				if($data[i].num==0)
138
				$os.find("#oop").text("未设置联系人");
140
				if($data[i].num==0) {
141
					$os.find("#oop").text("未设置联系人");
142
					return;
143
				}
144
				resourecRel.call($os.find("#oop"), $data[i].id);
139 145
			}
140 146
		}
141 147
	}
@ -178,4 +184,61 @@ $(document).ready(function() {
178 184
		$(".aboutRes").append('<div class="tcdPageCode"></div>');
179 185
		getRecourceMe(1,true);
180 186
	})
187
	function professList(par) {
188
		$.ajax({
189
			"url": "/ajax/professor/qm",
190
			"type": "GET",
191
			"context": this,
192
			"traditional":true,
193
			"success": function(data) {
194
				if(data.success) {
195
					var $data = data.data;
196
					var arr = []
197
					if($data.length) {
198
						for(var i=0;i<$data.length;i++) {
199
							arr.push($data[i].name)
200
						}
201
						this.text("联系人 " + arr.join("、"))
202
					}
203
					
204
				}
205
			},
206
			"data": {
207
				"id": par
208
			},
209
			dataType: "json",
210
			'error': function() {
211
				$.MsgBox.Alert('提示', '服务器连接超时!');
212
			}
213
		});
214
	}
215
	/*判断资源是否设置了资源联系人*/
216
	function resourecRel(rsd) {
217
		$.ajax({
218
			"url": "/ajax/ware/pro",
219
			"type": "GET",
220
			"context": this,
221
			"success": function(data) {
222
				if(data.success) {
223
					var $data = data.data;
224
					if($data.length == 0) {
225
						this.text("未设置联系人").css("color","#e03b43");
226
					}else {
227
						var arr = [];
228
						for(var i =0;i<$data.length;i++) {
229
							arr.push($data[i].professor)
230
						}
231
						professList.call(this,arr);
232
					}
233
				}
234
			},
235
			"data": {
236
				"id": rsd
237
			},
238
			dataType: "json",
239
			'error': function() {
240
				$.MsgBox.Alert('提示', '服务器连接超时!');
241
			}
242
		});
243
	}
181 244
})

+ 1 - 1
cmp-portal/needIssue.html

@ -161,7 +161,7 @@
161 161
							<ul class="addexpert" id="expertli" style="overflow-y:auto;max-height:380px;">
162 162
							</ul>
163 163
							<div class="seRe displayNone"><p>您当前没有认证员工</p>
164
							<p><a class="nowAn" href="resourceIssue.html" style="color:#28b8fa">点击这里进行认证</a></p>
164
							<p><a class="nowAn" href="cmp-staffList.html" style="color:#28b8fa">点击这里进行认证</a></p>
165 165
						</div>
166 166
						</div>
167 167
					</div>

+ 1 - 2
js/demandModify.js

@ -160,8 +160,7 @@ $(document).ready(function() {
160 160
			"url": "/ajax/demand/close",
161 161
			"type": "POST",
162 162
			"data": {
163
				"id": demandId,
164
				"uid": userid
163
				"id": demandId
165 164
			},
166 165
			"contentType": "application/x-www-form-urlencoded",
167 166
			"traditional": true,

+ 78 - 1
js/productShow.js

@ -389,6 +389,83 @@ $(document).ready(function() {
389 389
			});
390 390
		}
391 391
	})
392
	
392
	relatedArticles()
393
	/*产品里面相关文章*/
394
	function relatedArticles() {
395
		$.ajax({
396
			"url": "/ajax/article/lq/byProduct",
397
			"type": "GET",
398
			"data": {
399
				"product": resourceId,
400
				"rows": 5
401
			},
402
			dataType: "json",
403
			"success": function(data) {
404
				if(data.success) {
405
					if(data.data.length > 0) {
406
						var $data=data.data;
407
						$("#oArticle").parents(".otherShow").removeClass("displayNone");
408
						for(var i = 0; i < $data.length; i++) {
409
							var str = "",ovel="";
410
							/*if($data[i].pageViews) {
411
								ovel="阅读量 "+$data[i].pageViews;
412
							}*/
413
							str += '<li data-id="' + $data[i].articleId + '" data-createTime="' + $data[i].createTime + '" data-shareId="' + $data[i].shareId + '"><a class="flexCenter OflexCenter">'
414
							if( $data[i].articleImg) {
415
								str += '<div class="madiaHead artHead" style="background-image: url(/data/article/' +  $data[i].articleImg + ')"></div>'
416
							} else {
417
								str += '<div class="madiaHead artHead"></div>'
418
							}
419
							str += '<div class="madiaInfo"  style="margin-top:18px;padding-bottom:8px">'
420
							str += '<p class="h1Font ellipsisSty">' +  $data[i].articleTitle + '</p>'
421
							str += '<p class="h2Font"><span class=" name" style="margin-right:10px"></span><span class="time" style="margin-right:10px;">' + commenTime( $data[i].publishTime) + '</span></p>'
422
							str += '</div></a></li>'
423
							//<span class="yue" style="margin-right:10px">'+ovel+'</span><span class="zan" style="margin-right:10px"></span><span class="leword"></span>
424
							var $str=$(str);
425
							$("#oArticle").append($str);
426
							(function($str,i) {
427
								if($data[i].articleType=="1") {
428
									ajaxRequist("/ajax/professor/baseInfo/" + $data[i].ownerId, {}, "get", function(data) {
429
										$str.find(".name").text(data.data.name);
430
									})
431
								}else if($data[i].articleType=="2"){
432
									ajaxRequist("/ajax/org/" + $data[i].ownerId, {}, "get", function(data) {
433
										if(data.data.forShort) {
434
											$str.find(".name").text(data.data.forShort);
435
										}else{
436
											$str.find(".name").text(data.data.name);
437
										}
438
									})
439
								}else if($data[i].articleType=="3"){
440
									ajaxRequist("/ajax/platform/info", {id:$data[i].ownerId}, "get", function(data) {
441
										$str.find(".name").text(data.data.name);
442
									})
443
								}
444
								/*if($data[i].articleAgree) {
445
									$str.find(".zan").text('赞 ' + $data[i].articleAgree);
446
								}
447
								ajaxRequist("/ajax/leavemsg/count" , {sid:$data[i].articleId,stype:1}, "get", function(data) {
448
										if(data.data) {
449
											$str.find(".leword").text('留言 ' + data.data);
450
										}
451
									})*/
452
							})($str,i)
453
						}
454
					}
455
				}
456
			},
457
			'error': function() {
458
				$.MsgBox.Alert('提示', '服务器连接超时!');
459
			}
460
		});
461
	}
462
	/*文章跳转*/
463
	$("#oArticle").on("click", "li", function() {
464
		var oArticle = {
465
			shareId: $(this).attr("data-shareId"),
466
			createTime: $(this).attr("data-createTime")
467
		};
468
		location.href = "/" + pageUrl('a', oArticle)
469
	})
393 470
	
394 471
})

+ 3 - 3
productShow.html

@ -101,11 +101,11 @@
101 101
						<ul class="tagList">
102 102
							
103 103
						</ul>
104
						<!--相关服务-->
104
						<!--相关文章-->
105 105
						<div class="form-item otherShow displayNone">
106
							<div class="aboutTit">相关服务</div>
106
							<div class="aboutTit">相关文章</div>
107 107
							<div class="form-result aboutRes pointOk">
108
								<ul id="oService">
108
								<ul id="oArticle">
109 109
								</ul>
110 110
							</div>
111 111
						</div>

+ 1 - 1
sevricePreview.html

@ -62,7 +62,7 @@
62 62
							
63 63
						</ul>
64 64
						<!--相关资源-->
65
						<div class="form-item otherShow displayNone">
65
						<div class="form-item otherShow">
66 66
							<div class="aboutTit">相关资源</div>
67 67
							<div class="form-result aboutRes pointOk">
68 68
								<ul id="oResource">