lyn7568 5 anni fa
parent
commit
01daf2c41f
4 ha cambiato i file con 128 aggiunte e 158 eliminazioni
  1. 85 132
      e/2.html
  2. 3 10
      e/p.html
  3. 40 15
      js/search_h5.js
  4. 0 1
      js/teamInforShow.js

+ 85 - 132
e/2.html

@ -158,7 +158,7 @@
158 158
			</div>
159 159
			<div class="seeMore displayNone" id="seeMoreArtical"><em>查看全部 <span id="articalNum">0</span>篇</em></div>
160 160
		</div> -->
161
		<div class="mainbox displayNone">
161
		<div class="mainbox displayNone ">
162 162
			<div class="infocontit">非专利</div>
163 163
			<div class="infocon madiaBlock">
164 164
				<ul class="mui-table-view" id="proUnPatent">
@ -166,26 +166,26 @@
166 166
			</div>
167 167
			<div class="seeMore " id="seeMorePaper">
168 168
				<em>查看全部 <span id="patentNum">0</span>篇</em></div>
169
170
			<div class="mainbox displayNone">
171
				<div class="infocontit">专利</div>
172
				<div class="infocon madiaBlock">
173
					<ul class="mui-table-view" id="paperShow">
174
					</ul>
175
				</div>
176
			</div>
177
			<div class="seeMore displayNone" id="seeMorePaper">
178
				<em>查看全部 <span id="paperHide">0</span>篇</em>
169
		</div>
170
		<div class="mainbox displayNone">
171
			<div class="infocontit">专利</div>
172
			<div class="infocon madiaBlock">
173
				<ul class="mui-table-view" id="paperShow">
174
				</ul>
179 175
			</div>
176
		</div>
177
		<div class="seeMore displayNone" id="seeMorePaper">
178
			<em>查看全部 <span id="paperHide">0</span>篇</em>
179
		</div>
180 180
181 181
182 182
183 183
184
			<div class="mainbox displayNone">
185
				<div class="infocontit">论文</div>
186
				<div class="infocon madiaBlock">
187
					<ul class="mui-table-view" id="paperList">
188
						<!-- <li class="mui-table-view-cell">
184
		<div class="mainbox displayNone">
185
			<div class="infocontit">论文</div>
186
			<div class="infocon madiaBlock">
187
				<ul class="mui-table-view" id="paperList">
188
					<!-- <li class="mui-table-view-cell">
189 189
								<div class="madiaInfo">
190 190
									<p class="h1Font ellipsisSty-2">需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问
191 191
									</p>
@ -200,26 +200,26 @@
200 200
									</div>
201 201
								</div>
202 202
							</li> -->
203
					</ul>
204
				</div>
205
				<div class="seeMore  " id="seeMorePaper"><em>查看全部 <span id="forumNum">0</span>篇</em></div>
203
				</ul>
206 204
			</div>
207
			<!--合作专家-->
208
			<div class="mainbox displayNone">
209
				<div class="infocontit">团队专家</div>
210
				<div class="infocon madiaBlock">
211
					<ul class="mui-table-view" id="relateTeam">
212
					</ul>
213
				</div>
214
				<!-- <div class="seeMore  " id="seeMorePaper"><em>查看全部 <span id="personNum">0</span>个</em></div> -->
205
			<div class="seeMore  " id="seeMorePaper"><em>查看全部 <span id="forumNum">0</span>篇</em></div>
206
		</div>
207
		<!--合作专家-->
208
		<div class="mainbox displayNone">
209
			<div class="infocontit">团队专家</div>
210
			<div class="infocon madiaBlock">
211
				<ul class="mui-table-view" id="relateTeam">
212
				</ul>
215 213
			</div>
214
			<!-- <div class="seeMore  " id="seeMorePaper"><em>查看全部 <span id="personNum">0</span>个</em></div> -->
215
		</div>
216 216
217
			<!-- <div class="shareEcode">
217
		<!-- <div class="shareEcode">
218 218
			<img class="Ecodecon" src="../images/ecordCard.jpg" />
219 219
			<div class="Ecodeinfo">
220 220
				<a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
221 221
			</div> -->
222
		</div>
222
	</div>
223 223
	</div>
224 224
	<script type="text/javascript">
225 225
		$(document).ready(function () {
@ -235,9 +235,6 @@
235 235
236 236
			// var userid = $.cookie("userid");
237 237
238
239
240
241 238
			function userMessage(id) { //团队详情
242 239
				$.ajax({
243 240
					type: "get",
@ -573,33 +570,7 @@
573 570
						}
574 571
					})
575 572
				},
576
				paperListVal = function () {
577
					var aimId = "paperList"
578
					oAjax("/ajax/ppaper/professor", {
579
						"owner": proId,
580
						"rows": rows
581
					}, "get", function (res) {
582
						var obj = res.data;
583
						if (obj.length > 0) {
584
							document.getElementById(aimId).parentNode.parentNode.classList.remove(
585
								"displayNone");
586
							for (var i = 0; i < obj.length; i++) {
587
								var li = document.createElement("li");
588
								li.setAttribute("data-id", obj[i].id);
589
								li.className = "mui-table-view-cell";
590
								li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
591
									'<div class="madiaHead paperHead"></div>' +
592
									'<div class="madiaInfo OmadiaInfo">' +
593
									'<p class="ellipsisSty-2 h1Font">' + obj[i].name + '</p>' +
594
									'<p class="ellipsisSty h2Font">' + obj[i].authors.substring(0, obj[i]
595
										.authors.length - 1) + '</p>' +
596
									'</div>' +
597
									'</div>'
598
								document.getElementById(aimId).appendChild(li);
599
							}
600
						}
601
					})
602
				},
573
603 574
				answerListVal = function () {
604 575
					var aimId = "QAShow"
605 576
					oAjax("/ajax/question/answer/bySelf", {
@ -727,10 +698,10 @@
727 698
					oAjax("/ajax/ppaper/count/publish", { //论文总数
728 699
						"owner": proId,
729 700
					}, "GET", function (data) {
730
						if (data.data > rows) {
731
							$("#seeMorePaper").removeClass("displayNone")
732
							$("#paperShow").text(data.data);
733
						}
701
						// if (data.data > rows) {
702
						// 	$("#seeMorePaper").removeClass("displayNone")
703
						// 	$("#paperShow").text(data.data);
704
						// }
734 705
					});
735 706
					oAjax("/ajax/question/answer/bySelf/count", { //回答总数
736 707
						"uid": proId,
@ -805,7 +776,6 @@
805 776
			resourceListVal()
806 777
			// articalListVal()
807 778
			patentListVal()
808
			paperListVal()
809 779
			answerListVal()
810 780
			relevantExperts(); //合作专家
811 781
			// relevantarticalList(); //相关文章
@ -1444,85 +1414,58 @@
1444 1414
				});
1445 1415
			},
1446 1416
1447
			// 论文
1448
			paperListVal = function () { //论文
1449
				var aimId = "paperList"
1450
				oAjax("/ajax/team/paper/search", {
1451
					"rows": rows,
1452
					"team": tId
1453
				}, "get", function (res) {
1454
					var obj = res.data;
1455
					if (obj.length > 0) {
1456
						document.getElementById(aimId).parentNode.parentNode.classList.remove("displayNone");
1457
1458
						var li = document.createElement("li");
1459
						li.setAttribute("data-id", obj[0].id);
1460
						li.className = "mui-table-view-cell";
1461
						li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
1462
							'<div class="madiaHead paperHead"></div>' +
1463
							'<div class="madiaInfo OmadiaInfo">' +
1464
							'<p class="ellipsisSty-2 h1Font">' + obj[0].name + '</p>' +
1465
							'<p class="ellipsisSty h2Font">' + obj[0].authors.substring(0, obj[0].authors
1466
								.length - 1) + '</p>' +
1467
							'</div>' +
1468
							'</div>'
1469
						document.getElementById(aimId).appendChild(li);
1417
			paperListId = function () {
1418
				oAjax('/ajax/team/paper', {
1419
					'id': tId,
1420
					'pageSize': 10,
1421
					'pageNo': 10
1422
				}, 'get', function (res) {
1423
					if (res.data.data.length) {
1424
						var $info = res.data.data[0].paper
1425
						paperListVal($info)
1470 1426
					}
1471
					if (obj.length == 1) {
1427
					if (res.data.total <= 1) {
1472 1428
						$('#forumNum').parent().parent().css('display', 'none')
1473
						console.log($('#forumNum').parent().parent());
1474 1429
					}
1475
					$('#forumNum').text(obj.length)
1476
				})
1477
			},
1478
1430
					$('#forumNum').text(res.data.total)
1479 1431
1432
					
1433
				})
1434
			}
1480 1435
1481
			relevantExperts = function () { //论文
1436
		// 论文
1437
		paperListVal = function (Id) { //论文
1482 1438
				var aimId = "paperList"
1483
				oAjax("/ajax/team/paper/search", {
1484
					"rows": rows,
1485
					"team": tId
1439
				oAjax("/ajax/ppaper/qm", {
1440
					id: Id
1486 1441
				}, "get", function (res) {
1487
					var obj = res.data;
1488
					if (obj.length > 0) {
1489
						document.getElementById(aimId).parentNode.parentNode.classList.remove("displayNone");
1490
						for (var i = 0; i < obj.length; i++) {
1442
					if (res.data.length) {
1443
						var obj = res.data;
1444
						if (obj.length > 0) {
1491 1445
							var li = document.createElement("li");
1492
							li.setAttribute("data-id", obj[i].id);
1446
							li.setAttribute("data-id", obj[0].id);
1493 1447
							li.className = "mui-table-view-cell";
1494 1448
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
1495 1449
								'<div class="madiaHead paperHead"></div>' +
1496 1450
								'<div class="madiaInfo OmadiaInfo">' +
1497
								'<p class="ellipsisSty-2 h1Font">' + obj[i].name + '</p>' +
1498
								'<p class="ellipsisSty h2Font">' + obj[i].authors.substring(0, obj[i].authors
1451
								'<p class="ellipsisSty-2 h1Font">' + obj[0].name + '</p>' +
1452
								'<p class="ellipsisSty h2Font">' + obj[0].authors.substring(0, obj[0].authors
1499 1453
									.length - 1) + '</p>' +
1500 1454
								'</div>' +
1501 1455
								'</div>'
1502 1456
							document.getElementById(aimId).appendChild(li);
1503
							// $('#forumNum').remove("displayNone");
1504
							$('#forumNum').text(obj.length)
1457
							$('#paperList').parent().parent().removeClass('displayNone')
1505 1458
						}
1506
					}
1507
				})
1508
			},
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520 1459
1460
					}
1521 1461
1522 1462
1463
				})
1464
			},
1465
			paperListId() //团队论文id
1523 1466
1524 1467
1525
			teamofExperts()
1468
		teamofExperts()
1526 1469
1527 1470
		//专家团队
1528 1471
		function teamofExperts() {
@ -1533,6 +1476,13 @@
1533 1476
			}, 'get', function (res) {
1534 1477
				if (res.success && res.data) {
1535 1478
					var data = res.data.data
1479
					var lengt;
1480
					if (data.length > 4) {
1481
						lengt = 4
1482
					} else {
1483
						lengt = data.length
1484
					}
1485
					console.log(data)
1536 1486
					for (var i = 0; i < data.length; i++) {
1537 1487
						var paperN, patentN;
1538 1488
						$.ajax({
@ -1562,11 +1512,10 @@
1562 1512
							// console.log(secretary)
1563 1513
							secretary = data[i].professor
1564 1514
						}
1565
						if (data[i].chief) {
1515
						if (data[i].chief) { //团队专家
1566 1516
							chief = data[i].professor
1567 1517
						}
1568
						console.log(secretary)
1569
						console.log(chief)
1518
1570 1519
						document.getElementById("relateTeam").appendChild(liItem);
1571 1520
						relExpertsList(ExpId, paperN, patentN, liItem, secretary, chief) //专家团队
1572 1521
					}
@ -1604,12 +1553,12 @@
1604 1553
						// }
1605 1554
1606 1555
						if (data.data.id === secretary) {
1607
							spanA = "<span>" + '团队秘书' + "</span>"
1556
							spanA = "<span class='spanA'>" + '团队秘书' + "</span>"
1608 1557
						} else {
1609 1558
							spanA = ''
1610 1559
						}
1611 1560
						if (data.data.id === chief) {
1612
							spanB = "<span>" + '首席专家' + "</span>"
1561
							spanB = "<span class='spanB'>" + '首席专家' + "</span>"
1613 1562
						} else {
1614 1563
							spanB = ''
1615 1564
						}
@ -1670,6 +1619,16 @@
1670 1619
						itemlist += '</div></a>';
1671 1620
						liItem.innerHTML = itemlist
1672 1621
						liItem.setAttribute("data-id", data.data.id)
1622
						var arr = $('#relateTeam').find('li').toArray() //首席专家排序处理  
1623
						for (var i = 0; i < arr.length; i++) {
1624
							if (arr[i].querySelector('.spanB')) { //如果找到手机专家标签交换位置 返回新数组
1625
								var index = i //团队专家索引
1626
								var temp = arr[0]
1627
								arr[0] = arr[index]
1628
								arr[index] = temp
1629
								$('#relateTeam').html(arr)
1630
							}
1631
						}
1673 1632
					}
1674 1633
				},
1675 1634
				"error": function () {
@ -1677,14 +1636,8 @@
1677 1636
				}
1678 1637
			});
1679 1638
		}
1680
1681
1682
1683
1684
1685 1639
		patentListVal(true)
1686 1640
		unpatentListVal(true)
1687
		paperListVal()
1688 1641
	</script>
1689 1642
</body>
1690 1643

+ 3 - 10
e/p.html

@ -211,7 +211,7 @@
211 211
					})
212 212
				})
213 213
			}
214
			function person(dataStr) { //专家非专利
214
			function person(dataStr) { //专家非专利研究者
215 215
				return new Promise(function (resolve, reject) {
216 216
					$.ajax({
217 217
						url: '/ajax/resResult/researcher',
@ -221,7 +221,7 @@
221 221
						},
222 222
						success: function (res) {
223 223
							var $info = res.data
224
							for (var i = 0; i < $info.length; i++) {
224
							for (var i = 0; i < 1; i++) {
225 225
								document.getElementById('proUnPatent').parentNode.parentNode
226 226
									.classList.remove(
227 227
										"displayNone");
@ -234,7 +234,7 @@
234 234
									'<div class="madiaInfo OmadiaInfo">' +
235 235
									'<p class="ellipsisSty-2 h1Font">' + dataStr.name +
236 236
									'</p>' +
237
									'<p class="ellipsisSty h2Font dis">' + $info[i].name +
237
									'<p class="ellipsisSty h2Font dis">' + $info[0].name +
238 238
									'</p>' +
239 239
									//.substring(0, dataStr[i].authors.length - 1)    
240 240
									'</div>' +
@ -257,12 +257,6 @@
257 257
258 258
259 259
260
261
262
263
264
265
266 260
			function userMessage(id) {
267 261
				$.ajax({
268 262
					type: "get",
@ -478,7 +472,6 @@
478 472
						var obj = res.data;
479 473
						if (obj.length > 0) {
480 474
							// document.getElementById(aimId).parentNode.parentNode.classList.remove("displayNone");
481
482 475
							for (var i = 0; i < obj.length; i++) {
483 476
								var hasImg = "../images/default-artical.jpg"
484 477
								if (obj[i].articleImg) {

+ 40 - 15
js/search_h5.js

@ -41,7 +41,11 @@ $(function () {
41 41
			serId: "",
42 42

43 43
			teamCreateTime: '',
44
			teamId: ''
44
			teamId: '',
45

46
			unpCreateTime: '',
47
			unpId: ''
48

45 49
		};
46 50
	var objSort = {
47 51
		"1": {
@ -266,18 +270,23 @@ $(function () {
266 270

267 271
		unpatent = function () { //找非专
268 272
			var aimId = 'unpatentList'
269
			oAjax('/ajax/resResult/pq', {
273
			oAjax('/ajax/resResult/index/search', {
270 274
				'key': keyt,
271
				'status': [1],
272
				'pageSize': 20,
273
				'pageNo': 1
275
				'rows': rows,
276
				'id': dataO.unpId,
277
				'time': dataO.unpCreateTime
274 278
			}, 'get', function (res) {
275
				var $info = res.data.data
279
				var $info = res.data
280
				if ($info.length > 0) {
281
					dataO.unpCreateTime = $info[$info.length-1].createTime;   //获取最后一个数据的创建时间
282
					dataO.unpId = $info[$info.length - 1].id;
283
				}
276 284
				for (var i = 0; i < $info.length; i++) {
277 285
					if ($info[i].pic) {
278 286
						var src = '/data/researchResult' + $info[i].pic.split(",")[0]
279 287
					}
280
					var orgId = $info[i].orgId == undefined ? '' : '所属机构' + $info[i].orgId
288
					var orgId = $info[i].orgId == undefined ? '' : '所属机构: ' + $info[i].orgId
289
					var applyDescp = $info[i].applyDescp == undefined ? '' : '应用介绍: ' + $info[i].applyDescp
281 290
					var liItem = document.createElement("li");
282 291
					liItem.setAttribute("data-id", $info[i].id);
283 292
					liItem.className = "mui-table-view-cell"
@ -285,14 +294,33 @@ $(function () {
285 294
					itemlist += '<div class="madiaHead resouseHead " style="background-image:url(' + src + ')"></div>';
286 295
					itemlist += '<div class="madiaInfo OmadiaInfo">';
287 296
					itemlist += '<p class="ellipsisSty-2 h1Font">' + $info[i].name + '</p>';
288
					itemlist += '<p class="h2Font ellipsisSty"><span class="ownerName">' + 1 + '</span><em class="authiconNew ownerSty"></em></p>'
297
					itemlist += '<p class="h2Font ellipsisSty"><span class="ownerName">' + applyDescp + '</span><em class="authiconNew ownerSty"></em></p>'
289 298
					itemlist += '<p class="h2Font ellipsisSty">' + orgId + '</p>'
290 299
					itemlist += '</div>'
291 300
					itemlist += '</div>';
292 301
					liItem.innerHTML = itemlist;
293 302
					var $itemlist = $(liItem);
294 303
					document.getElementById(aimId).appendChild(liItem)
295
					unPerson($info[i].id, $itemlist)
304
					// unPerson($info[i].id, $itemlist)
305
					removeNodata(aimId);
306
					var liLen = document.getElementById(aimId).querySelectorAll("li").length;
307

308
					if ($info.length == 0 && liLen == 0) {
309
						$("#" + aimId).hide()
310
						insertNodata(aimId);
311
					}
312
					if ($info.length > rows) {
313
						objSort[8].loadFlag = true;
314
					}
315
					if ($info.length == 0) {
316
						objSort[8].loadFlag = false;
317
						$(".loadtip").html('没有更多数据了');
318
						return;
319
					}
320

321

322

323

296 324
				}
297 325
			})
298 326
		}
@ -315,6 +343,9 @@ $(function () {
315 343
			}
316 344
		})
317 345
	}
346

347

348

318 349
	professorListVal = function () { //找专家
319 350
			var aimId = "proList"
320 351
			oAjax("/ajax/professor/index/search", {
@ -329,8 +360,6 @@ $(function () {
329 360
				"rows": rows
330 361
			}, "get", function (res) {
331 362
				var $info = res.data;
332
				// console.log($info);
333

334 363
				if ($info.length > 0) {
335 364
					$("#" + aimId).show()
336 365
					dataO.proSortFirst = $info[$info.length - 1].sortFirst;
@ -580,12 +609,8 @@ $(function () {
580 609
				"rows": rows
581 610
			}, "get", function (res) {
582 611
				var $info = res.data;
583
				console.log($info);
584

585

586 612
				if ($info.length > 0) { //如果有数据就渲染
587 613
					$("#" + aimId).show()
588

589 614
					dataO.teamCreateTime = $info[$info.length - 1].createTime;
590 615
					dataO.teamId = $info[$info.length - 1].id;
591 616
					for (var i = 0; i < $info.length; i++) {

+ 0 - 1
js/teamInforShow.js

@ -484,7 +484,6 @@ $(function() {
484 484
						strAdd += '<div class="tag-show">'+li2+'</div>'
485 485
						strAdd += '</a></li>';
486 486
						if(chiefId===dataStr.id) {
487
					
488 487
							$("#"+obj).prepend(strAdd)
489 488
						} else {
490 489
							$("#"+obj).append(strAdd)