wangchuanjin 9 жил өмнө
parent
commit
f3d74230a6

+ 16 - 6
core/src/web/staticres/css/entcommunity.css

@@ -359,13 +359,12 @@ a:focus, a:hover{
 }
 .ent-tab li{
 	padding: 0px 20px;
-	border-top-width: 3px;
 	height: 50px;
 	line-height: 50px;
-	border-top: 3px solid #F6F8FA;
 	cursor: pointer;
 	border-right: 1px solid #FFFFFF;
 	font-weight: bold;
+	position: relative;
 }
 .ent-tab li.disabled{
 	cursor: auto;
@@ -373,10 +372,21 @@ a:focus, a:hover{
 	opacity: 0.5;
 }
 .ent-tab .ent-active{
-	border-top-color: #16a086;
 	background-color: #FFFFFF;
 	color: #16a086;
 }
+.ent-tab li>.b-com-border-top{
+	display: none;
+}
+.ent-tab .ent-active>.b-com-border-top{
+	position: absolute;
+	background-color: #16a086;
+	height: 3px;
+	left: 0px;
+	right: 0px;
+	top: 0px;
+	display: block;
+}
 .ent-tab-content{
 	margin-top: 10px;
 	min-height: 500px;
@@ -646,7 +656,7 @@ a:focus, a:hover{
 	position: absolute;
 	z-index: 2;
 	right: 0px;
-	width: 95px;
+	width: 91px;
 }
 .entrelation .entrelation-controlls-fullscreen{
 	top: 15px;
@@ -991,8 +1001,8 @@ a:focus, a:hover{
 .ent-copyright table{
 	margin-top: 15px;
 }
-.ent-copyright .badge{
+.entinfo-page .badge{
 	background-color: #16a086;
-	margin-left: 10px;
+	margin-left: 5px;
 	color: #ffffff;
 }

+ 141 - 100
core/src/web/staticres/js/entportrait.js

@@ -1,100 +1,61 @@
 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(){
+	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){
 		$(".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){
@@ -144,16 +105,19 @@ $(function(){
 		}
 		if(index == 1){
 			b_afterLogin();
+		}else if($(this).index() == 2 && staffinfoEntity == null){
+			//加载服务列表
+			staffinfoEntity = new StaffinfoEntity();
 		}else if($(this).index() == 3 && copyrightEntity == null){
 			//加载服务列表
 			copyrightEntity = new CopyrightEntity();
-		}/*else if($(this).index() == 4 && dishonestyPaging == null){
-			//加载服务列表
+		}else if($(this).index() == 5 && dishonestyPaging == null){
+			//加载失信列表
 			dishonestyPaging = new DishonestyPaging();
-		}else if($(this).index() == 5 && servicePaging == null){
+		}else if($(this).index() == 6 && servicePaging == null){
 			//加载服务列表
 			servicePaging = new ServicePaging();
-		}*/
+		}
 	});
 	pcShare();
 });
@@ -184,6 +148,7 @@ function b_afterLogin(flag,result){
 	if(typeof(result) != "undefined"){
 		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);
 	if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){
 		$(".ent-tab>li:eq(1)").addClass("disabled");
@@ -260,12 +225,90 @@ function initRelation(){
 		$("#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(){
 	//著作权
-	if(typeof(copyright) != "undefined" && copyright != null){
+	if(copyrightFlag){
 		loadJS(cdn+"/js/frontpaging.js",function(){
-			var workCopyRight = copyright.WorkCopyRight;
-			if(typeof(workCopyRight) != "undefined" && workCopyRight != null){
+			if(workCopyRightFlag){
 				$("#workCopyRightList .badge").text(workCopyRight.length);
 				workCopyRight.sort(function(a,b){
 					if(a.FirstPublishDate<b.FirstPublishDate){
@@ -291,8 +334,7 @@ function CopyrightEntity(){
 					$("#workCopyRightListPaging").parent().before(hm);
 				});
 			}
-			var computerSoftCopyRight = copyright.ComputerSoftCopyRight;
-			if(typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null){
+			if(computerSoftCopyRightFlag){
 				$("#computerSoftCopyRightList .badge").text(computerSoftCopyRight.length);
 				computerSoftCopyRight.sort(function(a,b){
 					if(a.FirstPublishDate<b.FirstPublishDate){
@@ -319,8 +361,7 @@ function CopyrightEntity(){
 					$("#computerSoftCopyRightListPaging").parent().before(hm);
 				});
 			}
-			var patent = copyright.Patent;
-			if(typeof(patent) != "undefined" && patent != null){
+			if(patentFlag){
 				$("#patentList .badge").text(patent.length);
 				patent.sort(function(a,b){
 					if(a.PublicDate<b.PublicDate){

+ 13 - 8
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -118,15 +118,16 @@
 	</div>
 	<!--切换-->
 	<ul class="ent-tab">
-		<li class="ent-active">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
-		<li>关系网</li>
-		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}>主要人员</li>
-		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}>著作权</li>
-		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}>变更信息</li>
-		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}>失信信息</li>
-		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
+		<li class="ent-active"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
+		<li><div class="b-com-border-top"></div>关系网</li>
+		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>主要人员<front class="badge" id="ent-tab-staffinfo">0</front></li>
+		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}><div class="b-com-border-top"></div>著作权<front class="badge" id="ent-tab-copyright">0</front></li>
+		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>变更信息<front class="badge">{{if .T.res.alterInfo}}{{len .T.res.alterInfo}}{{else}}0{{end}}</front></li>
+		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}><div class="b-com-border-top"></div>失信信息<front class="badge" id="ent-tab-dishonesty">0</front></li>
+		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
 	</ul>
 	<div class="ent-tab-content b-left{{if and (not .T.relevantNews) (not .T.relevantEnts)}} b-right-none{{end}}">
+		<!--企业概况-->
 		<div>
 			{{if .T.res.gs}}
 			<div class="entinfo-basicinfo ent-layout-up">
@@ -297,6 +298,7 @@
 			</div>
 			{{end}}
 		</div>
+		<!--关系网-->
 		<div class="entrelation hide" id="entrelation">
 			<div id="entrelation-infovis"></div>
 			<div id="entrelation-limit" class="hide entrelation-limit">
@@ -324,6 +326,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--著作权-->
 		<div class="ent-copyright hide">
 			<!--计算机软件著作权信息-->
 			{{if .T.copyright.ComputerSoftCopyRight}}
@@ -331,7 +334,7 @@
 				<div class="b-com-title">
 					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>计算机软件著作权信息<front class="badge">0</front>
 				</div>
-				<table class="table ent-table">
+				<table class="tabl<!--著作权-->e ent-table">
 					<tr>
 						<td class="text-center" id="computerSoftCopyRightListPaging"></td>
 					</tr>
@@ -369,6 +372,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--变更信息-->
 		<div class="ent-alterinfo hide">
 		{{if gt (len .T.res.alterInfo) 0}}
 			<div class="ent-layout-up">
@@ -436,6 +440,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--企业黄页-->
 		<div class="hide ent-yellowpage">
 			{{if .T.res.s_synopsis}}
 			<div class="ent-layout-down">