第十一周总结

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery,所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.9.3/typeahead.min.js"></script>
<script crossorigin="anonymous" integrity="sha384-i+fXrQ+G3+h2478EWpSpIXivtKbbze+0SNOXJGizkAp6DVG/m2fE6hiWeDwskVvp"
src="https://lib.baomitu.com/echarts/4.7.0/echarts.js"></script>


<style>
.search{
cursor: pointer;
}

</style>

<script>
window.onload = function () {

var gqjgIs = false;

$("body").click(function () {
$("#showInfoDiv").css("display","none");
});

$(".search").click(function () {
var keyWord = $("#Search").val();
window.location.href = "${pageContext.request.contextPath}/search?name=" + keyWord;
});

//股权结构
$("#gqjg").click(function () {
if (gqjgIs){
return;
}
gqjgIs = true;
var companyId = '${tcorp.ID}';
$.ajax({
url:"${pageContext.request.contextPath}/gqjg",
data:{"id":companyId},
dataType:'json',
type:'POST',
success:function (data) {
var maxIndex = 0;
var maxMoney = 0;
var allMoney = 0;
var content = "";
for (var i = 0; i < data.length; i++) {
if (data[i]['STOCK_CAPI'] > maxMoney){
maxMoney = data[i]['STOCK_CAPI'];
maxIndex = i;
}
allMoney += data[i]['STOCK_CAPI'];
}

for (var i = 0; i < data.length; i++) {

content += "<div class="panel panel-info"> " +
" <div class="panel-heading"> " +
" <h3 class="panel-title"> " +
" 股东 " +
" </h3> " +
" </div> " +
" <div class="panel-body"> " +
" "+ data[i]['STOCK_NAME'] +" <br>" +
" 股权比例:"+ data[i]['STOCK_CAPI']/allMoney*100 +"% <br>" +
" 认缴金额:"+ data[i]['STOCK_CAPI'] +" <br>" +
" </div></div>";

}


$("#realMan").html(data[maxIndex]['STOCK_NAME']
+ "(" + data[maxIndex]['STOCK_CAPI']/allMoney*100 + "%)");

$("#divGqjg").append(content);
},
error:function (e) {
alert("出错了" + e.message)
}
});
});


//投资族谱
$("#tztp").click(function () {


var companyId = '${tcorp.ID}';
var companyName = '${tcorp.CORP_NAME}';
$.ajax({
url:"${pageContext.request.contextPath}/tztp",
data:{"id":companyId,"companyName":companyName},
dataType:'json',
type:'POST',
success:function (data) {
chartdata = [];
link = [];
for (var i = 0; i < data.length; i++) {
if (data[i]['symbolSize'] != undefined){
chartdata.push(data[i]);
}else {
link.push(data[i])
}
}
var categories = [];
categories[0] = { name: '代理人' };
categories[1] = { name: '航空公司' };
categories[2] = { name: '关系人' };
var myChart = echarts.init(document.getElementById('chart1'));
option = {
// 图的标题
title: {
text: ''
},
// 工具箱
toolbox: {
// 显示工具箱
show: true,
feature: {
mark: {
show: true
},
// 还原
restore: {
show: true
},
// 保存为图片
saveAsImage: {
show: true
}
}
},
series: [{
type: 'graph', // 类型:关系图
layout: 'force', //图的布局,类型为力导图
symbolSize: 40, // 调整节点的大小
roam: true, // 是否开启鼠标缩放和平移漫游。默认不开启。如果只想要开启缩放或者平移,可以设置成 'scale' 或者 'move'。设置成 true 为都开启
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [2, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 20
}
}
},
force: {
repulsion: 2500,
edgeLength: [10, 50]
},
draggable: true,
lineStyle: {
normal: {
2,
color: '#4b565b',
}
},
edgeLabel: {
normal: {
show: false
}
},
label: {
normal: {
show: true,
textStyle: {}
}
},

// 数据
data: chartdata,
links: link,
categories:categories
}]
};
myChart.setOption(option);


},
error:function (e) {
alert("出错了" + e.message)
}
});







});

//企业图谱
$("#qytp").click(function () {

var companyId = '${tcorp.ID}';
var companyName = '${tcorp.CORP_NAME}';
$.ajax({
url:"${pageContext.request.contextPath}/qytp",
data:{"id":companyId,"companyName":companyName},
dataType:'json',
type:'POST',
success:function (data) {
chartdata = [];
link = [];
for (var i = 0; i < data.length; i++) {
if (data[i]['symbolSize'] != undefined){
chartdata.push(data[i]);
}else {
link.push(data[i])
}
}
var categories = [];
categories[0] = { name: '代理人' };
categories[1] = { name: '航空公司' };
categories[2] = { name: '关系人' };
var myChart = echarts.init(document.getElementById('chart2'));
option = {
// 图的标题
title: {
text: ''
},
// 工具箱
toolbox: {
// 显示工具箱
show: true,
feature: {
mark: {
show: true
},
// 还原
restore: {
show: true
},
// 保存为图片
saveAsImage: {
show: true
}
}
},
series: [{
type: 'graph', // 类型:关系图
layout: 'force', //图的布局,类型为力导图
symbolSize: 40, // 调整节点的大小
roam: true, // 是否开启鼠标缩放和平移漫游。默认不开启。如果只想要开启缩放或者平移,可以设置成 'scale' 或者 'move'。设置成 true 为都开启
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [2, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 20
}
}
},
force: {
repulsion: 2500,
edgeLength: [10, 50]
},
draggable: true,
lineStyle: {
normal: {
2,
color: '#4b565b',
}
},
edgeLabel: {
normal: {
show: false
}
},
label: {
normal: {
show: true,
textStyle: {}
}
},

// 数据
data: chartdata,
links: link,
categories:categories
}]
};
myChart.setOption(option);


},
error:function (e) {
alert("出错了" + e.message)
}
});



});


//疑似关系
$("#ysgx").click(function () {
var companyId = '${tcorp.ID}';
var companyName = '${tcorp.CORP_NAME}';
$.ajax({
url:"${pageContext.request.contextPath}/ysgx",
data:{"id":companyId,"companyName":companyName},
dataType:'json',
type:'POST',
success:function (data) {
chartdata = [];
link = [];
for (var i = 0; i < data.length; i++) {
if (data[i]['symbolSize'] != undefined){
chartdata.push(data[i]);
}else {
link.push(data[i])
}
}
var categories = [];
categories[0] = { name: '代理人' };
categories[1] = { name: '航空公司' };
categories[2] = { name: '关系人' };
var myChart = echarts.init(document.getElementById('chart3'));
option = {
// 图的标题
title: {
text: ''
},
// 工具箱
toolbox: {
// 显示工具箱
show: true,
feature: {
mark: {
show: true
},
// 还原
restore: {
show: true
},
// 保存为图片
saveAsImage: {
show: true
}
}
},
series: [{
type: 'graph', // 类型:关系图
layout: 'force', //图的布局,类型为力导图
symbolSize: 40, // 调整节点的大小
roam: true, // 是否开启鼠标缩放和平移漫游。默认不开启。如果只想要开启缩放或者平移,可以设置成 'scale' 或者 'move'。设置成 true 为都开启
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [2, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 20
}
}
},
force: {
repulsion: 2500,
edgeLength: [10, 50]
},
draggable: true,
lineStyle: {
normal: {
2,
color: '#4b565b',
}
},
edgeLabel: {
normal: {
show: false
}
},
label: {
normal: {
show: true,
textStyle: {}
}
},

// 数据
data: chartdata,
links: link,
categories:categories
}]
};
myChart.setOption(option);


},
error:function (e) {
alert("出错了" + e.message)
}
});



});


}

</script>

</head>
<body>

<div class="container">

<form style="padding-left: 300px;">
<div class="form-group" style=" 500px;">
<div class="input-group">
<input type="text" class="form-control" ></div>

</div>


</div>
</div>
</div>
</div>

第十一周总结






</div>


</body>
</html>