|
@ -49,17 +49,18 @@ $(function() {
|
49
|
49
|
}
|
50
|
50
|
var oArray=[];
|
51
|
51
|
var watchType=1;
|
52
|
|
|
|
52
|
|
|
53
|
var pageSize=10
|
53
|
54
|
var QTime,QId,ATime,AId,WTime,WId,rows= 10;
|
54
|
55
|
|
55
|
56
|
if(professorId) {
|
56
|
57
|
getUserInfo(professorId);//获取个人详细信息
|
57
|
58
|
//historyEvaluate();//获取历史合作及评价
|
58
|
|
getResource(10,1,true);//获取个人发布的资源
|
59
|
|
getArticle(10,1,true);//获取个人发布的文章
|
60
|
|
getPaper(10,1,true);//获取个人发布的论文
|
61
|
|
getPatent(10,1,true);//获取个人发布的专利
|
62
|
|
getDemands(5,1,true);//获取个人发布的需求
|
|
59
|
getResource(1,true);//获取个人发布的资源
|
|
60
|
getArticle(1,true);//获取个人发布的文章
|
|
61
|
getPaper(1,true);//获取个人发布的论文
|
|
62
|
getPatent(1,true);//获取个人发布的专利
|
|
63
|
getDemands(1,true);//获取个人发布的需求
|
63
|
64
|
attentCount();
|
64
|
65
|
getMyAnswer(professorId,true);//获取个人的回答
|
65
|
66
|
if(userid!=professorId){
|
|
@ -76,7 +77,7 @@ $(function() {
|
76
|
77
|
watchType=0;
|
77
|
78
|
attentMy();
|
78
|
79
|
}else{
|
79
|
|
collAttent(10,1,true);
|
|
80
|
collAttent(1,true);
|
80
|
81
|
getMyQuestion(userid,true);//获取个人的提问
|
81
|
82
|
$(".goSpanTo").show();
|
82
|
83
|
$(".myoneself").show();
|
|
@ -128,7 +129,7 @@ $(function() {
|
128
|
129
|
getMyWatchQ(userid, true);
|
129
|
130
|
}else{
|
130
|
131
|
|
131
|
|
collAttent(10,1,true);
|
|
132
|
collAttent(1,true);
|
132
|
133
|
}
|
133
|
134
|
})
|
134
|
135
|
$(".navconBox .moreBu>.moreBuUl").on("click","li.rightbtn",function(){
|
|
@ -787,7 +788,7 @@ $(function() {
|
787
|
788
|
})
|
788
|
789
|
}
|
789
|
790
|
//获取资源
|
790
|
|
function getResource(pageSize, pageNo,isbind){
|
|
791
|
function getResource(pageNo,isbind){
|
791
|
792
|
$.ajax({
|
792
|
793
|
"url": "/ajax/resource/pqProPublish",
|
793
|
794
|
"type": "get",
|
|
@ -838,28 +839,19 @@ $(function() {
|
838
|
839
|
}
|
839
|
840
|
}
|
840
|
841
|
//分页
|
841
|
|
if(isbind==true){
|
842
|
|
// $("#proResource").siblings(".tcdPageCode").off("click").createPage({
|
843
|
|
// pageCount: Math.ceil(data.data.total / 10),
|
844
|
|
// current: data.data.pageNo,
|
845
|
|
// backFn: function(p) {
|
846
|
|
// $("#proResource").html("");
|
847
|
|
// getResource(10, p,false);
|
848
|
|
// document.body.scrollTop = document.documentElement.scrollTop = 0;
|
849
|
|
// }
|
850
|
|
// });
|
|
842
|
if(isbind){
|
851
|
843
|
$("#proResource").parent().find(".js-load-more").on("click", function () {
|
852
|
|
getResource(10,++pageNo,false);
|
|
844
|
getResource(++pageNo,false);
|
853
|
845
|
});
|
854
|
846
|
}
|
855
|
|
if (pageNo >= Math.ceil(data.data.total / 10)) {
|
|
847
|
if (pageNo >= Math.ceil(data.data.total /pageSize)) {
|
856
|
848
|
$("#proResource").parent().find(".js-load-more").unbind("click");
|
857
|
849
|
$("#proResource").parent().find(".js-load-more").hide();
|
858
|
850
|
}
|
859
|
851
|
}else{
|
860
|
852
|
$("#proResource + .nodatabox").show();
|
861
|
853
|
$("#proResource + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
|
862
|
|
if(isbind == true) {
|
|
854
|
if(isbind) {
|
863
|
855
|
$("#proResource").parent().find(".js-load-more").hide();
|
864
|
856
|
}
|
865
|
857
|
}
|
|
@ -871,7 +863,7 @@ $(function() {
|
871
|
863
|
});
|
872
|
864
|
}
|
873
|
865
|
//获取文章
|
874
|
|
function getArticle(pageSize, pageNo,isbind){
|
|
866
|
function getArticle(pageNo,isbind){
|
875
|
867
|
$.ajax({
|
876
|
868
|
url: "/ajax/article/pqProPublish",
|
877
|
869
|
dataType: 'json', //数据格式类型
|
|
@ -937,28 +929,19 @@ $(function() {
|
937
|
929
|
}
|
938
|
930
|
}
|
939
|
931
|
//分页
|
940
|
|
if(isbind==true){
|
941
|
|
// $("#proArticel").siblings(".tcdPageCode").off("click").createPage({
|
942
|
|
// pageCount: Math.ceil(data.data.total / 10),
|
943
|
|
// current: data.data.pageNo,
|
944
|
|
// backFn: function(p) {
|
945
|
|
// $("#proArticel").html("");
|
946
|
|
// getArticle(10, p,false);
|
947
|
|
// document.body.scrollTop = document.documentElement.scrollTop = 0;
|
948
|
|
// }
|
949
|
|
// });
|
|
932
|
if(isbind){
|
950
|
933
|
$("#proArticel").parent().find(".js-load-more").on("click", function () {
|
951
|
|
getArticle(10,++pageNo,false);
|
|
934
|
getArticle(++pageNo,false);
|
952
|
935
|
});
|
953
|
936
|
}
|
954
|
|
if (pageNo >= Math.ceil(data.data.total / 10)) {
|
|
937
|
if (pageNo >= Math.ceil(data.data.total / pageSize)) {
|
955
|
938
|
$("#proArticel").parent().find(".js-load-more").unbind("click");
|
956
|
939
|
$("#proArticel").parent().find(".js-load-more").hide();
|
957
|
940
|
}
|
958
|
941
|
}else{
|
959
|
942
|
$("#proArticel + .nodatabox").show();
|
960
|
943
|
$("#proArticel + .nodatabox").find(".noContip").text("用户尚未发布任何文章");
|
961
|
|
if(isbind==true) {
|
|
944
|
if(isbind) {
|
962
|
945
|
$("#proArticel").parent().find(".js-load-more").hide();
|
963
|
946
|
}
|
964
|
947
|
}
|
|
@ -973,7 +956,7 @@ $(function() {
|
973
|
956
|
|
974
|
957
|
}
|
975
|
958
|
//获取专利
|
976
|
|
function getPatent(pageSize, pageNo,isbind){
|
|
959
|
function getPatent(pageNo,isbind){
|
977
|
960
|
$.ajax({
|
978
|
961
|
url: "/ajax/ppatent/byProfessor",
|
979
|
962
|
dataType: 'json', //数据格式类型
|
|
@ -1025,21 +1008,12 @@ $(function() {
|
1025
|
1008
|
}
|
1026
|
1009
|
}
|
1027
|
1010
|
//分页
|
1028
|
|
if(isbind==true){
|
1029
|
|
// $("#proPatent").siblings(".tcdPageCode").off("click").createPage({
|
1030
|
|
// pageCount: Math.ceil(data.data.total / 10),
|
1031
|
|
// current: data.data.pageNo,
|
1032
|
|
// backFn: function(p) {
|
1033
|
|
// $("#proPatent").html("");
|
1034
|
|
// getPatent(10, p,false);
|
1035
|
|
// document.body.scrollTop = document.documentElement.scrollTop = 0;
|
1036
|
|
// }
|
1037
|
|
// });
|
|
1011
|
if(isbind){
|
1038
|
1012
|
$("#proPatent").parent().find(".js-load-more").on("click", function () {
|
1039
|
|
getPatent(10,++pageNo,false);
|
|
1013
|
getPatent(++pageNo,false);
|
1040
|
1014
|
});
|
1041
|
1015
|
}
|
1042
|
|
if (pageNo >= Math.ceil(data.data.total / 10)) {
|
|
1016
|
if (pageNo >= Math.ceil(data.data.total / pageSize)) {
|
1043
|
1017
|
console.log("xmtt");
|
1044
|
1018
|
$("#proPatent").parent().find(".js-load-more").unbind("click");
|
1045
|
1019
|
$("#proPatent").parent().find(".js-load-more").hide();
|
|
@ -1047,7 +1021,7 @@ $(function() {
|
1047
|
1021
|
}else{
|
1048
|
1022
|
$("#proPatent + .nodatabox").show();
|
1049
|
1023
|
$("#proPatent + .nodatabox").find(".noContip").text("用户尚未发布任何专利");
|
1050
|
|
if(isbind==true) {
|
|
1024
|
if(isbind) {
|
1051
|
1025
|
$("#proPatent").parent().find(".js-load-more").hide();
|
1052
|
1026
|
}
|
1053
|
1027
|
}
|
|
@ -1059,7 +1033,7 @@ $(function() {
|
1059
|
1033
|
});
|
1060
|
1034
|
}
|
1061
|
1035
|
//获取论文
|
1062
|
|
function getPaper(pageSize, pageNo,isbind){
|
|
1036
|
function getPaper(pageNo,isbind){
|
1063
|
1037
|
$.ajax({
|
1064
|
1038
|
url: "/ajax/ppaper/byProfessor",
|
1065
|
1039
|
dataType: 'json', //数据格式类型
|
|
@ -1120,21 +1094,12 @@ $(function() {
|
1120
|
1094
|
}
|
1121
|
1095
|
}
|
1122
|
1096
|
//分页
|
1123
|
|
if(isbind==true){
|
1124
|
|
// $("#proPaper").siblings(".tcdPageCode").off("click").createPage({
|
1125
|
|
// pageCount: Math.ceil(data.data.total / 10),
|
1126
|
|
// current: data.data.pageNo,
|
1127
|
|
// backFn: function(p) {
|
1128
|
|
// $("#proPaper").html("");
|
1129
|
|
// getPaper(10, p,false);
|
1130
|
|
// document.body.scrollTop = document.documentElement.scrollTop = 0;
|
1131
|
|
// }
|
1132
|
|
// });
|
|
1097
|
if(isbind){
|
1133
|
1098
|
$("#proPaper").parent().find(".js-load-more").on("click", function () {
|
1134
|
|
getPaper(10,++pageNo,false);
|
|
1099
|
getPaper(++pageNo,false);
|
1135
|
1100
|
});
|
1136
|
1101
|
}
|
1137
|
|
if (pageNo >= Math.ceil(data.data.total / 10)) {
|
|
1102
|
if (pageNo >= Math.ceil(data.data.total / pageSize)) {
|
1138
|
1103
|
$("#proPaper").parent().find(".js-load-more").unbind("click");
|
1139
|
1104
|
$("#proPaper").parent().find(".js-load-more").hide();
|
1140
|
1105
|
}
|
|
@ -1582,7 +1547,7 @@ $(function() {
|
1582
|
1547
|
}
|
1583
|
1548
|
|
1584
|
1549
|
//获取需求
|
1585
|
|
function getDemands(pageSize, pageNo,isbind) {
|
|
1550
|
function getDemands(pageNo,isbind) {
|
1586
|
1551
|
$.ajax({
|
1587
|
1552
|
url: "/ajax/demand/pq",
|
1588
|
1553
|
type: "GET",
|
|
@ -1592,7 +1557,7 @@ $(function() {
|
1592
|
1557
|
"state":'1',
|
1593
|
1558
|
"uid":professorId,
|
1594
|
1559
|
"pageNo": pageNo,
|
1595
|
|
"pageSize":pageSize
|
|
1560
|
"pageSize":5
|
1596
|
1561
|
},
|
1597
|
1562
|
beforeSend: function() {
|
1598
|
1563
|
$("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
|
|
@ -1608,15 +1573,6 @@ $(function() {
|
1608
|
1573
|
var liStr=$("<li></li>").appendTo("#showDemand");
|
1609
|
1574
|
demandHtml($info[i],liStr);
|
1610
|
1575
|
}
|
1611
|
|
// if(isbind == true) {
|
1612
|
|
// $(".tcdPageCode").createPage({
|
1613
|
|
// pageCount: Math.ceil(data.data.total / pageSize),
|
1614
|
|
// current: data.data.data.pageNo,
|
1615
|
|
// backFn: function(p) {
|
1616
|
|
// demandList(false,10, p);
|
1617
|
|
// }
|
1618
|
|
// });
|
1619
|
|
// }
|
1620
|
1576
|
}else{
|
1621
|
1577
|
$("#showDemand").parents(".needinfobox").addClass("displayNone");
|
1622
|
1578
|
}
|
|
@ -1686,7 +1642,7 @@ $(function() {
|
1686
|
1642
|
}
|
1687
|
1643
|
});
|
1688
|
1644
|
}
|
1689
|
|
function collAttent(pageSize, pageNo,isbind,num){
|
|
1645
|
function collAttent(pageNo,isbind,num){
|
1690
|
1646
|
if(!num){
|
1691
|
1647
|
var num=watchType;
|
1692
|
1648
|
}
|
|
@ -1701,7 +1657,6 @@ $(function() {
|
1701
|
1657
|
"pageSize":pageSize
|
1702
|
1658
|
},
|
1703
|
1659
|
beforeSend: function() {
|
1704
|
|
// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
|
1705
|
1660
|
$("#item8user").find(".js-load-more").attr("disabled",true);
|
1706
|
1661
|
$("#item8user").find(".js-load-more").addClass("active");
|
1707
|
1662
|
},
|
|
@ -1736,58 +1691,50 @@ $(function() {
|
1736
|
1691
|
}else if(num==7){
|
1737
|
1692
|
detailDemand(datalist);
|
1738
|
1693
|
}
|
1739
|
|
if(isbind==true){
|
1740
|
|
// tcdPage.off("click").createPage({
|
1741
|
|
// pageCount: Math.ceil(data.data.total / 10),
|
1742
|
|
// current: data.data.pageNo,
|
1743
|
|
// backFn: function(p) {
|
1744
|
|
// collAttent(10, p,false,num);
|
1745
|
|
// document.body.scrollTop = document.documentElement.scrollTop = 0;
|
1746
|
|
// }
|
1747
|
|
// });
|
|
1694
|
if(isbind){
|
1748
|
1695
|
$("#item8user").append('<button class="js-load-more"></button>');
|
1749
|
1696
|
$("#item8user").find(".js-load-more").on("click", function () {
|
1750
|
|
collAttent(10,++pageNo,false,num);
|
|
1697
|
collAttent(++pageNo,false,num);
|
1751
|
1698
|
});
|
1752
|
1699
|
}
|
1753
|
|
if (pageNo >= Math.ceil(data.data.total / 10)) {
|
|
1700
|
if (pageNo >= Math.ceil(data.data.total / pageSize)) {
|
1754
|
1701
|
$("#item8user").find(".js-load-more").unbind("click");
|
1755
|
1702
|
$("#item8user").find(".js-load-more").hide();
|
1756
|
1703
|
}
|
1757
|
1704
|
}else{
|
1758
|
1705
|
if(num==1){
|
1759
|
1706
|
document.getElementById("attendPro").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1760
|
|
if(isbind==true) {
|
|
1707
|
if(isbind) {
|
1761
|
1708
|
$("#attendPro").parent().find(".js-load-more").hide()
|
1762
|
1709
|
}
|
1763
|
1710
|
}else if(num==2){
|
1764
|
1711
|
document.getElementById("attendRes").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1765
|
|
if(isbind==true) {
|
|
1712
|
if(isbind) {
|
1766
|
1713
|
$("#attendRes").parent().find(".js-load-more").hide()
|
1767
|
1714
|
}
|
1768
|
1715
|
}else if(num==3){
|
1769
|
1716
|
document.getElementById("attendArt").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1770
|
|
if(isbind==true) {
|
|
1717
|
if(isbind) {
|
1771
|
1718
|
$("#attendArt").parent().find(".js-load-more").hide()
|
1772
|
1719
|
}
|
1773
|
1720
|
}else if(num==4){
|
1774
|
1721
|
document.getElementById("attendPatent").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1775
|
|
if(isbind==true) {
|
|
1722
|
if(isbind) {
|
1776
|
1723
|
$("#attendPatent").parent().find(".js-load-more").hide()
|
1777
|
1724
|
}
|
1778
|
1725
|
}else if(num==5){
|
1779
|
1726
|
document.getElementById("attendPaper").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1780
|
|
if(isbind==true) {
|
|
1727
|
if(isbind) {
|
1781
|
1728
|
$("#attendPaper").parent().find(".js-load-more").hide()
|
1782
|
1729
|
}
|
1783
|
1730
|
}else if(num==6){
|
1784
|
1731
|
document.getElementById("attendCmp").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1785
|
|
if(isbind==true) {
|
|
1732
|
if(isbind) {
|
1786
|
1733
|
$("#attendCmp").parent().find(".js-load-more").hide()
|
1787
|
1734
|
}
|
1788
|
1735
|
}else if(num==7){
|
1789
|
1736
|
document.getElementById("attendDemand").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
|
1790
|
|
if(isbind==true) {
|
|
1737
|
if(isbind) {
|
1791
|
1738
|
$("#attendDemand").parent().find(".js-load-more").hide()
|
1792
|
1739
|
}
|
1793
|
1740
|
}
|