浏览代码

提交改变

李广朋 9 年之前
父节点
当前提交
f7432f9063
共有 2 个文件被更改,包括 12 次插入10 次删除
  1. 4 8
      core/src/web/staticres/js/entcommunity.js
  2. 8 2
      core/src/web/templates/member/incmobile/detailindex.html

+ 4 - 8
core/src/web/staticres/js/entcommunity.js

@@ -312,21 +312,21 @@ var relationFlag=false;
 
 //加载关系网
 function initRelation(){
-	$("#entrelation").height(500);
 	$.ajax({
 		url: "/member/getRelation",
 		method: "post",
 		data: {regNo:regNo,entName:entName},
 		success: function(r){
+			console.log(r);
 			if(!r || !r.flag || !r.relation || !r.relation.links || r.relation.links.length == 0 || !r.relation.nodes || r.relation.nodes.length <= 1){
-				alert("没有关系数据!");
+				
 			}else{
 				$(".entrelation").height($(".ent-tab-content").height());
 				loadJS(cdn+"/js/d3.v3.min.js",function(){
 					loadJS(cdn+"/js/geometry.js",function(){
 						loadJS(cdn+"/js/provinceData.min.js",function(){
 							loadJS(cdn+"/js/relation.js",function(){
-								relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
+								relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation,true);
 								relationEntity.init();
 							});
 						});
@@ -335,11 +335,7 @@ function initRelation(){
 			}
 		},
 		error: function(){
-			alert("没有关系数据!");
+			$("div[data-id=c_relation]").addClass("disabled");
 		}
 	});
 }
-
-function synclist(){
-	
-}

+ 8 - 2
core/src/web/templates/member/incmobile/detailindex.html

@@ -71,7 +71,7 @@
 			</div > 
 			<div class="col-xs-12" style="text-align:center;clear:both;">
 				<div  class="type">{{.T.res.EntTypeName}}</div>
-				<div class="taupe {{if eq .T.res.OpStateName "注销" "吊销"}}ent-status-r{{else}}ent-status-g{{end}}">
+				<div class="taupe {{if eq .T.res.OpStateName "注销" "吊销" "吊销未注销"}}ent-status-r{{else}}ent-status-g{{end}}">
 				<script>
 					var OpStateName = {{.T.res.OpStateName}};
 					if(OpStateName.length > 2){
@@ -177,7 +177,6 @@
 			$("#entrelation").css("height",window.screen.height+"px");
 			resize();
 			mCommunity().initmemer();
-			initRelation();
 			DishonestyPaging();
 			setDisabled();
 	})
@@ -217,8 +216,12 @@
 		if(cardlength==0){
 			$(".yellowpage").addClass("disabled");
 		}
+		if(!relflag){
+			$("div[data-id=c_relation]").addClass("disabled");
+		}
 	}
 	function childrenshow(n){
+		
 		var node=$(n);
 		if(node.hasClass("disabled")){
 			return;
@@ -226,6 +229,9 @@
 		if (node.attr("data-id")){
 			$("#header").hide();
 			$("#"+node.attr("data-id")).show();
+			if (node.attr("data-id")=="c_relation" && $("svg").length==0){
+				initRelation();
+			}
 		}else{
 			$("#header").show();
 			$("#"+node.attr("data")).hide();