|
@@ -1,100 +1,61 @@
|
|
var entType = "企业";
|
|
var entType = "企业";
|
|
-var relationEntity = null;
|
|
|
|
-var copyrightEntity = null;
|
|
|
|
-//var servicePaging = null;
|
|
|
|
-//var dishonestyPaging = null;
|
|
|
|
-var hasLoadPagingJs = false;
|
|
|
|
-var relationFlag = false;
|
|
|
|
-var identWayFlag = false;
|
|
|
|
|
|
+var relationEntity = null;//关系网
|
|
|
|
+var copyrightEntity = null;//著作权
|
|
|
|
+var servicePaging = null;//服务列表
|
|
|
|
+var staffinfoEntity = null;//主要人员
|
|
|
|
+var dishonestyPaging = null;//失信
|
|
|
|
+var hasLoadPagingJs = false;//是否已经加载过js
|
|
|
|
+var relationFlag = false;//关系网标识
|
|
|
|
+var identWayFlag = false;//认证状态
|
|
|
|
+var staffinfoFlag = false;
|
|
|
|
+/**************著作权**************/
|
|
|
|
+var copyrightFlag = false;
|
|
|
|
+//作品
|
|
|
|
+var workCopyRight = null;
|
|
|
|
+var workCopyRightFlag = false;
|
|
|
|
+//软件
|
|
|
|
+var computerSoftCopyRight = null;
|
|
|
|
+var computerSoftCopyRightFlag = false;
|
|
|
|
+//专利
|
|
|
|
+var patent = null;
|
|
|
|
+var patentFlag = false;
|
|
//解析服务列表
|
|
//解析服务列表
|
|
$(function(){
|
|
$(function(){
|
|
|
|
+ staffinfoFlag = typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0;
|
|
|
|
+ copyrightFlag = typeof(copyright) != "undefined" && copyright != null;
|
|
|
|
+ if(copyrightFlag){
|
|
|
|
+ //作品
|
|
|
|
+ workCopyRight = copyright.WorkCopyRight;
|
|
|
|
+ workCopyRightFlag = typeof(workCopyRight) != "undefined" && workCopyRight != null;
|
|
|
|
+ //软件
|
|
|
|
+ computerSoftCopyRight = copyright.ComputerSoftCopyRight;
|
|
|
|
+ computerSoftCopyRightFlag = typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null;
|
|
|
|
+ //专利
|
|
|
|
+ patent = copyright.Patent;
|
|
|
|
+ patentFlag = typeof(patent) != "undefined" && patent != null;
|
|
|
|
+ }
|
|
if($(".b-right").height() >= 500){
|
|
if($(".b-right").height() >= 500){
|
|
$(".ent-tab-content.b-left").css("min-height",$(".b-right").height());
|
|
$(".ent-tab-content.b-left").css("min-height",$(".b-right").height());
|
|
}
|
|
}
|
|
- //失信信息如果没有数据,选项卡不可点
|
|
|
|
- if(dishonesty.count > 0){
|
|
|
|
- DishonestyPaging();
|
|
|
|
- }
|
|
|
|
- //企业黄页如果没有数据,选项卡不可点
|
|
|
|
- if(service.count > 0){
|
|
|
|
- ServicePaging();
|
|
|
|
- }
|
|
|
|
- //主要人员
|
|
|
|
- if(typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0){
|
|
|
|
- var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
|
|
|
|
- for(var i=0;i<staffinfo.length;i++){
|
|
|
|
- switch(staffinfo[i].Position){
|
|
|
|
- case "410A":
|
|
|
|
- case "410B":
|
|
|
|
- case "410C":
|
|
|
|
- case "431A":
|
|
|
|
- case "431B":
|
|
|
|
- staffinfos1.push(staffinfo[i]);
|
|
|
|
- break;
|
|
|
|
- case "432A":
|
|
|
|
- case "432K":
|
|
|
|
- staffinfos2.push(staffinfo[i]);
|
|
|
|
- break;
|
|
|
|
- case "434Q":
|
|
|
|
- case "434R":
|
|
|
|
- case "436A":
|
|
|
|
- staffinfos3.push(staffinfo[i]);
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- staffinfos4.push(staffinfo[i]);
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+ //显示著作权数量
|
|
|
|
+ if(copyrightFlag){
|
|
|
|
+ var copyrightCount = 0;
|
|
|
|
+ if(workCopyRightFlag){
|
|
|
|
+ copyrightCount += workCopyRight.length;
|
|
}
|
|
}
|
|
- staffinfos1.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
- staffinfos2.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
- staffinfos3.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
- staffinfos4.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
- var hm = '<div class="ent-mainpersons">';
|
|
|
|
- //计算出一行可以放几个
|
|
|
|
- var maxCout = parseInt($(".ent-tab-content").width() / (207+20));
|
|
|
|
- var verticalFlag = false;
|
|
|
|
- var appendStaffinfo = function(obj,index){
|
|
|
|
- var tmp = 0;
|
|
|
|
- for(var i=0;i<obj.length;i++){
|
|
|
|
- var positionName = obj[i].PositionName;
|
|
|
|
- if(typeof(positionName) == "undefined" || positionName == null || positionName == ""){
|
|
|
|
- positionName = "监事";
|
|
|
|
- }
|
|
|
|
- tmp++;
|
|
|
|
- if(i==0){
|
|
|
|
- hm+='<div class="staffinfo-level-'+index+'">';
|
|
|
|
- if(verticalFlag){
|
|
|
|
- hm+='<a class="staffinfo-vertical"></a>';
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- verticalFlag = true;
|
|
|
|
- hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
|
|
|
|
- +'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
|
|
|
|
- //竖线
|
|
|
|
- if(tmp == maxCout && i != obj.length-1){
|
|
|
|
- hm+='<a class="staffinfo-vertical"></a>';
|
|
|
|
- }
|
|
|
|
- //横线
|
|
|
|
- if(i != obj.length-1){
|
|
|
|
- if(tmp <= maxCout-1){
|
|
|
|
- hm+='<a class="staffinfo-horizontal"></a>';
|
|
|
|
- }else{
|
|
|
|
- tmp = 0;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(i==obj.length-1){
|
|
|
|
- hm+='</div>';
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ if(computerSoftCopyRightFlag){
|
|
|
|
+ copyrightCount += computerSoftCopyRight.length;
|
|
}
|
|
}
|
|
- appendStaffinfo(staffinfos1,1);
|
|
|
|
- appendStaffinfo(staffinfos2,2);
|
|
|
|
- appendStaffinfo(staffinfos3,3);
|
|
|
|
- appendStaffinfo(staffinfos4,4);
|
|
|
|
- hm+='</div>';
|
|
|
|
- $(".ent-mainperson").html(hm);
|
|
|
|
- }else{
|
|
|
|
- $(".ent-mainperson .ent-findnull").removeClass("hide");
|
|
|
|
|
|
+ if(patentFlag){
|
|
|
|
+ copyrightCount += patent.length;
|
|
|
|
+ }
|
|
|
|
+ $("#ent-tab-copyright").text(copyrightCount);
|
|
|
|
+ }
|
|
|
|
+ //显示失信数量
|
|
|
|
+ $("#ent-tab-dishonesty").text(dishonesty.count);
|
|
|
|
+ //显示失信数量
|
|
|
|
+ if(staffinfoFlag){
|
|
|
|
+ $("#ent-tab-staffinfo").text(staffinfo.length);
|
|
}
|
|
}
|
|
//联系地址
|
|
//联系地址
|
|
if($address){
|
|
if($address){
|
|
@@ -144,16 +105,19 @@ $(function(){
|
|
}
|
|
}
|
|
if(index == 1){
|
|
if(index == 1){
|
|
b_afterLogin();
|
|
b_afterLogin();
|
|
|
|
+ }else if($(this).index() == 2 && staffinfoEntity == null){
|
|
|
|
+ //加载服务列表
|
|
|
|
+ staffinfoEntity = new StaffinfoEntity();
|
|
}else if($(this).index() == 3 && copyrightEntity == null){
|
|
}else if($(this).index() == 3 && copyrightEntity == null){
|
|
//加载服务列表
|
|
//加载服务列表
|
|
copyrightEntity = new CopyrightEntity();
|
|
copyrightEntity = new CopyrightEntity();
|
|
- }/*else if($(this).index() == 4 && dishonestyPaging == null){
|
|
|
|
- //加载服务列表
|
|
|
|
|
|
+ }else if($(this).index() == 5 && dishonestyPaging == null){
|
|
|
|
+ //加载失信列表
|
|
dishonestyPaging = new DishonestyPaging();
|
|
dishonestyPaging = new DishonestyPaging();
|
|
- }else if($(this).index() == 5 && servicePaging == null){
|
|
|
|
|
|
+ }else if($(this).index() == 6 && servicePaging == null){
|
|
//加载服务列表
|
|
//加载服务列表
|
|
servicePaging = new ServicePaging();
|
|
servicePaging = new ServicePaging();
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
});
|
|
});
|
|
pcShare();
|
|
pcShare();
|
|
});
|
|
});
|
|
@@ -184,6 +148,7 @@ function b_afterLogin(flag,result){
|
|
if(typeof(result) != "undefined"){
|
|
if(typeof(result) != "undefined"){
|
|
identWayFlag = result.identWay == 1;
|
|
identWayFlag = result.identWay == 1;
|
|
}
|
|
}
|
|
|
|
+ identWayFlag = true;//暂时把认证权限放开
|
|
relationFlag = flag && identWayFlag && (relation == null || typeof(relation) == "undefined" || typeof(relation.links) == "undefined" || relation.links == null || relation.links.length == 0 || typeof(relation.nodes) == "undefined" || relation.nodes == null || relation.nodes.length <= 1);
|
|
relationFlag = flag && identWayFlag && (relation == null || typeof(relation) == "undefined" || typeof(relation.links) == "undefined" || relation.links == null || relation.links.length == 0 || typeof(relation.nodes) == "undefined" || relation.nodes == null || relation.nodes.length <= 1);
|
|
if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){
|
|
if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){
|
|
$(".ent-tab>li:eq(1)").addClass("disabled");
|
|
$(".ent-tab>li:eq(1)").addClass("disabled");
|
|
@@ -260,12 +225,90 @@ function initRelation(){
|
|
$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
|
|
$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+function StaffinfoEntity(){
|
|
|
|
+ //主要人员
|
|
|
|
+ if(staffinfoFlag){
|
|
|
|
+ var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
|
|
|
|
+ for(var i=0;i<staffinfo.length;i++){
|
|
|
|
+ switch(staffinfo[i].Position){
|
|
|
|
+ case "410A":
|
|
|
|
+ case "410B":
|
|
|
|
+ case "410C":
|
|
|
|
+ case "431A":
|
|
|
|
+ case "431B":
|
|
|
|
+ staffinfos1.push(staffinfo[i]);
|
|
|
|
+ break;
|
|
|
|
+ case "432A":
|
|
|
|
+ case "432K":
|
|
|
|
+ staffinfos2.push(staffinfo[i]);
|
|
|
|
+ break;
|
|
|
|
+ case "434Q":
|
|
|
|
+ case "434R":
|
|
|
|
+ case "436A":
|
|
|
|
+ staffinfos3.push(staffinfo[i]);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ staffinfos4.push(staffinfo[i]);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ staffinfos1.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
+ staffinfos2.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
+ staffinfos3.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
+ staffinfos4.sort(function(a,b){return a.Position-b.Position});
|
|
|
|
+ var hm = '<div class="ent-mainpersons">';
|
|
|
|
+ //计算出一行可以放几个
|
|
|
|
+ var maxCout = parseInt($(".ent-tab-content").width() / (207+20));
|
|
|
|
+ var verticalFlag = false;
|
|
|
|
+ var appendStaffinfo = function(obj,index){
|
|
|
|
+ var tmp = 0;
|
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
|
+ var positionName = obj[i].PositionName;
|
|
|
|
+ if(typeof(positionName) == "undefined" || positionName == null || positionName == ""){
|
|
|
|
+ positionName = "监事";
|
|
|
|
+ }
|
|
|
|
+ tmp++;
|
|
|
|
+ if(i==0){
|
|
|
|
+ hm+='<div class="staffinfo-level-'+index+'">';
|
|
|
|
+ if(verticalFlag){
|
|
|
|
+ hm+='<a class="staffinfo-vertical"></a>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ verticalFlag = true;
|
|
|
|
+ hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
|
|
|
|
+ +'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
|
|
|
|
+ //竖线
|
|
|
|
+ if(tmp == maxCout && i != obj.length-1){
|
|
|
|
+ hm+='<a class="staffinfo-vertical"></a>';
|
|
|
|
+ }
|
|
|
|
+ //横线
|
|
|
|
+ if(i != obj.length-1){
|
|
|
|
+ if(tmp <= maxCout-1){
|
|
|
|
+ hm+='<a class="staffinfo-horizontal"></a>';
|
|
|
|
+ }else{
|
|
|
|
+ tmp = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(i==obj.length-1){
|
|
|
|
+ hm+='</div>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ appendStaffinfo(staffinfos1,1);
|
|
|
|
+ appendStaffinfo(staffinfos2,2);
|
|
|
|
+ appendStaffinfo(staffinfos3,3);
|
|
|
|
+ appendStaffinfo(staffinfos4,4);
|
|
|
|
+ hm+='</div>';
|
|
|
|
+ $(".ent-mainperson").html(hm);
|
|
|
|
+ }else{
|
|
|
|
+ $(".ent-mainperson .ent-findnull").removeClass("hide");
|
|
|
|
+ }
|
|
|
|
+}
|
|
function CopyrightEntity(){
|
|
function CopyrightEntity(){
|
|
//著作权
|
|
//著作权
|
|
- if(typeof(copyright) != "undefined" && copyright != null){
|
|
|
|
|
|
+ if(copyrightFlag){
|
|
loadJS(cdn+"/js/frontpaging.js",function(){
|
|
loadJS(cdn+"/js/frontpaging.js",function(){
|
|
- var workCopyRight = copyright.WorkCopyRight;
|
|
|
|
- if(typeof(workCopyRight) != "undefined" && workCopyRight != null){
|
|
|
|
|
|
+ if(workCopyRightFlag){
|
|
$("#workCopyRightList .badge").text(workCopyRight.length);
|
|
$("#workCopyRightList .badge").text(workCopyRight.length);
|
|
workCopyRight.sort(function(a,b){
|
|
workCopyRight.sort(function(a,b){
|
|
if(a.FirstPublishDate<b.FirstPublishDate){
|
|
if(a.FirstPublishDate<b.FirstPublishDate){
|
|
@@ -291,8 +334,7 @@ function CopyrightEntity(){
|
|
$("#workCopyRightListPaging").parent().before(hm);
|
|
$("#workCopyRightListPaging").parent().before(hm);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- var computerSoftCopyRight = copyright.ComputerSoftCopyRight;
|
|
|
|
- if(typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null){
|
|
|
|
|
|
+ if(computerSoftCopyRightFlag){
|
|
$("#computerSoftCopyRightList .badge").text(computerSoftCopyRight.length);
|
|
$("#computerSoftCopyRightList .badge").text(computerSoftCopyRight.length);
|
|
computerSoftCopyRight.sort(function(a,b){
|
|
computerSoftCopyRight.sort(function(a,b){
|
|
if(a.FirstPublishDate<b.FirstPublishDate){
|
|
if(a.FirstPublishDate<b.FirstPublishDate){
|
|
@@ -319,8 +361,7 @@ function CopyrightEntity(){
|
|
$("#computerSoftCopyRightListPaging").parent().before(hm);
|
|
$("#computerSoftCopyRightListPaging").parent().before(hm);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- var patent = copyright.Patent;
|
|
|
|
- if(typeof(patent) != "undefined" && patent != null){
|
|
|
|
|
|
+ if(patentFlag){
|
|
$("#patentList .badge").text(patent.length);
|
|
$("#patentList .badge").text(patent.length);
|
|
patent.sort(function(a,b){
|
|
patent.sort(function(a,b){
|
|
if(a.PublicDate<b.PublicDate){
|
|
if(a.PublicDate<b.PublicDate){
|