|
@@ -277,71 +277,32 @@ var relationFlag=false;
|
|
|
|
|
|
//加载关系网
|
|
|
function initRelation(){
|
|
|
- if(isLogined){
|
|
|
- /*if($("#entrelation-limit").hasClass("hide")){
|
|
|
- $(".entrelation").height($(".ent-tab-content").height());
|
|
|
- }*/
|
|
|
- var relationNoData = function(){
|
|
|
- $("#entrelation-limit,#entrelation-nologin").addClass("hide");
|
|
|
- relationEntity = "";
|
|
|
- $("#entrelation-infovis").hide();
|
|
|
- $("#entrelation-findnull").removeClass("hide");
|
|
|
- }
|
|
|
- if(identWayFlag){
|
|
|
- if(relationFlag){
|
|
|
- relationNoData();
|
|
|
+ $("#entrelation").height(500);
|
|
|
+ $.ajax({
|
|
|
+ url: "/member/getRelation",
|
|
|
+ method: "post",
|
|
|
+ data: {regNo:regNo,entName:entName},
|
|
|
+ success: function(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-limit,#entrelation-nologin").addClass("hide");
|
|
|
$(".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,relation);
|
|
|
+ relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
|
|
|
relationEntity.init();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
- }else{
|
|
|
- $("#entrelation-nologin").addClass("hide");
|
|
|
- $("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
|
|
|
- $("#entrelation-infovis").hide();
|
|
|
+ },
|
|
|
+ error: function(){
|
|
|
+ alert("没有关系数据!");
|
|
|
}
|
|
|
- /*$.ajax({
|
|
|
- url: "/member/getRelation",
|
|
|
- method: "post",
|
|
|
- data: {regNo:regNo,entName:entName},
|
|
|
- success: function(r){
|
|
|
- if(r.flag == false){
|
|
|
- $("#entrelation-nologin").addClass("hide");
|
|
|
- $("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
|
|
|
- $("#entrelation-infovis").hide();
|
|
|
- }else if(r.flag == true && (r == null || typeof(r) == "undefined" || typeof(r.relation.links) == "undefined" || r.relation.links.length == 0 || typeof(r.relation.nodes) == "undefined" || r.relation.nodes.length <= 1)){
|
|
|
- relationNoData();
|
|
|
- }else if(r.flag == true){
|
|
|
- $("#entrelation-limit,#entrelation-nologin").addClass("hide");
|
|
|
- $(".entrelation").height(500);
|
|
|
- loadJS("/js/d3.v3.min.js",function(){
|
|
|
- loadJS("/js/geometry.js",function(){
|
|
|
- loadJS("/js/relation.js",function(){
|
|
|
- relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
|
|
|
- relationEntity.init();
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- }else{
|
|
|
- relationNoData();
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(){
|
|
|
- relationNoData();
|
|
|
- }
|
|
|
- });*/
|
|
|
- }else{
|
|
|
- $("#entrelation-limit,#entrelation-nologin").removeClass("hide");
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|