1372 lines
27 KiB
JavaScript
1372 lines
27 KiB
JavaScript
/* try {
|
||
require("../jquery")
|
||
} catch (error) {
|
||
console.log(error)
|
||
}
|
||
*/
|
||
/**
|
||
* 页面加载时
|
||
*/
|
||
|
||
window.onload = function () {
|
||
$(".top :first-child").addClass("cycle")
|
||
$(".allItem :first-child").addClass("allItemColor")
|
||
$(".fourTitle").children().eq(0).addClass("fourTitleColor")
|
||
console.log("mm", $(".echart012").width())
|
||
}
|
||
|
||
/**
|
||
* 头部四个标题点击事件
|
||
*/
|
||
|
||
$(".top")
|
||
.children()
|
||
.click(function () {
|
||
$(".top").children().removeClass("cycle")
|
||
$(this).addClass("cycle")
|
||
})
|
||
|
||
/**
|
||
* 在库项目按钮切换
|
||
*/
|
||
|
||
$(".allItem span").click(function () {
|
||
$(".allItem span").removeClass("allItemColor")
|
||
$(this).addClass("allItemColor")
|
||
$(".threeCard, .threeEchart").children().css("display", "none")
|
||
|
||
if (this.innerText == "在库项目") {
|
||
$(".threeCard").children().eq(0).css("display", "flex")
|
||
$(".echart1").css("display", "block")
|
||
} else if (this.innerText == "在建项目") {
|
||
$(".threeCard").children().eq(1).css("display", "flex")
|
||
$(".echart2").css("display", "block")
|
||
} else {
|
||
$(".threeCard").children().eq(2).css("display", "flex")
|
||
$(".echart3").css("display", "block")
|
||
}
|
||
})
|
||
|
||
/**
|
||
* echart图表重设高度
|
||
*/
|
||
|
||
$(".threeEchart").children().css("width", $(".threeEchart").width())
|
||
$(".fourEchart").children().css("width", $(".fourEchart").width())
|
||
$(".echart_architecture").children().css("width", $(".echart_architecture").width())
|
||
|
||
/**
|
||
* 建筑业企业按钮切换
|
||
*/
|
||
|
||
$(".fourTitle")
|
||
.children()
|
||
.click(function () {
|
||
$(".fourTitle").children().removeClass("fourTitleColor")
|
||
$(this).addClass("fourTitleColor")
|
||
$(".fourContent ,.fourEchart ,.echart_architecture").children().css("display", "none")
|
||
|
||
if (this.innerText == "建筑业企业") {
|
||
$(".register,.echart4,.echart5").css("display", "block")
|
||
} else if (this.innerText == "服务业企业") {
|
||
$(".credit, .echart011, .echart6").css("display", "block")
|
||
} else if (this.innerText == "勘察设计企业") {
|
||
$(".survey, .echart014, .echart7").css("display", "block")
|
||
} else {
|
||
$(".supervision, .echart015, .echart8").css("display", "block")
|
||
}
|
||
})
|
||
|
||
var myChart012 = echarts.init(document.querySelector(".echart012"))
|
||
|
||
// 小饼图
|
||
|
||
var url3 = "http://118.178.224.202:8024/api/new10"
|
||
|
||
$.get(url3,function(data){
|
||
console.log("饼图数据",data)
|
||
let myChart13 = echarts.init(document.querySelector(".echart013"))
|
||
|
||
var shengnei = data.data[0].in
|
||
var shengwai = data.data[0].out
|
||
var all = Number(shengnei) + Number(shengwai)
|
||
$("#jianzhuY").html(all)
|
||
$("#province_inner").html(shengnei)
|
||
$("#province_outer").html(shengwai)
|
||
|
||
|
||
let option13 = {
|
||
labelLine: {
|
||
show: false,
|
||
},
|
||
label: {
|
||
show: false,
|
||
},
|
||
tooltip: {
|
||
trigger: "item",
|
||
show: true,
|
||
showContent: true,
|
||
formatter: `<span style="width:200px;text-align:center">{a}<br /> {b}: {c}({d}%)</span>`,
|
||
},
|
||
avoidLabelOverlap: true,
|
||
series: [
|
||
{
|
||
name: "财政收入",
|
||
type: "pie",
|
||
radius: "50%",
|
||
emphasis: {
|
||
labelLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
|
||
data: [
|
||
{
|
||
value: shengnei,
|
||
name: "税收收入",
|
||
itemStyle: {
|
||
color: "#fecc5d",
|
||
},
|
||
// formatter: "{c}",
|
||
|
||
labelLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
{
|
||
value: shengwai,
|
||
name: "非税收收入",
|
||
itemStyle: {
|
||
color: "#fc8452",
|
||
},
|
||
labelLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
],
|
||
},
|
||
],
|
||
}
|
||
myChart13.setOption(option13)
|
||
|
||
})
|
||
|
||
|
||
/**
|
||
* 建筑业项目
|
||
*/
|
||
|
||
let myChart1 = echarts.init(document.querySelector(".echart1"))
|
||
let myChart2 = echarts.init(document.querySelector(".echart2"))
|
||
let myChart3 = echarts.init(document.querySelector(".echart3"))
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/zk-count", function (data) {
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
let sum = 0
|
||
value.forEach(function (item) {
|
||
sum += item
|
||
})
|
||
$("#zaiku").text(sum)
|
||
|
||
let option1 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: "0%",
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
color: "#6e7178",
|
||
fontSize: 13,
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 0,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
type: "value",
|
||
boundaryGap: [0, 0.01],
|
||
max: 180,
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
show: false,
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
fontSize: 14,
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: -0,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "在库项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
formatter: "{c}个",
|
||
offset: [$(".echart012").width(), -13],
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart1.setOption(option1)
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/zj-count", function (data) {
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
let sum = 0
|
||
value.forEach(function (item) {
|
||
sum += item
|
||
})
|
||
$("#zaijian").text(sum)
|
||
$("#kaoqin").text(sum)
|
||
let option2 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: "0",
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
color: "#6e7178",
|
||
fontSize: 13,
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 0,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
type: "value",
|
||
boundaryGap: [0, 0.01],
|
||
max: 180,
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
show: false,
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
fontSize: 14,
|
||
verticalAlign: "bottom",
|
||
lineHeight: 28,
|
||
align: "left",
|
||
color: "#6e7178",
|
||
margin: 0,
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "在建项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
formatter: "{c}个",
|
||
offset: [$(".echart012").width(), -13],
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart2.setOption(option2)
|
||
|
||
let option3 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: "0%",
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
color: "#6e7178",
|
||
fontSize: 13,
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 0,
|
||
top: 40,
|
||
right: 00,
|
||
},
|
||
xAxis: {
|
||
type: "value",
|
||
boundaryGap: [0, 0.01],
|
||
max: 180,
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
show: false,
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
fontSize: 14,
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: -0,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "实名制考勤项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
formatter: "{c}个",
|
||
align: "right",
|
||
offset: [$(".echart012").width(), -13],
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart3.setOption(option3)
|
||
})
|
||
|
||
let myChart4 = echarts.init(document.querySelector(".echart4"))
|
||
|
||
/**
|
||
* @建筑业企业图表
|
||
*/
|
||
|
||
// let myChart011 = echarts.init(document.querySelector(".echart011"))
|
||
|
||
let myChart14 = echarts.init(document.querySelector(".echart014"))
|
||
|
||
let myChart15 = echarts.init(document.querySelector(".echart015"))
|
||
|
||
let myChart5 = echarts.init(document.querySelector(".echart5"))
|
||
// let myChart6 = echarts.init(document.querySelector(".echart6"))
|
||
let myChart7 = echarts.init(document.querySelector(".echart7"))
|
||
let myChart8 = echarts.init(document.querySelector(".echart8"))
|
||
|
||
var myColor = ["#3388ff", "#fecc5d", "#fc8452", "#3ba272", "#F5B453"]
|
||
$.get("http://118.178.224.202:8024/api/construction", function ({ data }) {
|
||
|
||
console.log(("得到的12中的数据",data))
|
||
|
||
var option012 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
formatter: `<div>{b}<br />{a}:{c}<br />{a1}:{c1}`,
|
||
},
|
||
legend: {
|
||
top: "5%",
|
||
left: "0%",
|
||
// itemStyle: {
|
||
// tooltip: true,
|
||
// },
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
color: "#6e7178",
|
||
fontSize: 13,
|
||
},
|
||
},
|
||
grid: {
|
||
show: false,
|
||
bottom: 0,
|
||
left: 0,
|
||
right: 0,
|
||
top: 50,
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: ["第一季度", "第二季度", "第三季度", "第四季度"],
|
||
axisTick: {
|
||
alignWithLabel: true,
|
||
show: false,
|
||
},
|
||
|
||
axisTickLine: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
fontSize: 14,
|
||
|
||
verticalAlign: "bottom",
|
||
lineHeight: 65,
|
||
margin: -60,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
|
||
xAxis: [
|
||
{
|
||
show: false,
|
||
type: "value",
|
||
name: "",
|
||
axisLabel: {
|
||
show: true,
|
||
color: "black",
|
||
},
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
],
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
offset: [$(".echart012").width(), -13],
|
||
formatter: "{c}亿元",
|
||
},
|
||
series: [
|
||
{
|
||
name: "2020",
|
||
type: "bar",
|
||
barWidth: 10,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
showBackground: {
|
||
show: false,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
|
||
data: [],
|
||
},
|
||
{
|
||
name: "2021",
|
||
type: "bar",
|
||
barWidth: 10,
|
||
barGap: "250%",
|
||
itemStyle: {
|
||
color: "#fecc5d",
|
||
borderRadius: 5,
|
||
},
|
||
showBackground: {
|
||
show: false,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
|
||
data: [],
|
||
},
|
||
],
|
||
}
|
||
|
||
option012.series[0].data = data.filter(function (item) {
|
||
if (item.data == 2020) {
|
||
return item.value
|
||
}
|
||
})
|
||
|
||
let b = data.filter(function (item) {
|
||
return item.data == 2021
|
||
})
|
||
|
||
option012.series[1].data = b.map(function (item) {
|
||
return item.value
|
||
})
|
||
|
||
myChart012.setOption(option012)
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/res-enterprise", function ({ data }) {
|
||
let option15 = {
|
||
tooltip: {
|
||
trigger: "item",
|
||
show: true,
|
||
showContent: true,
|
||
formatter: `<span style="width:120px;text-align:center">{b}: {c} ({d}%)</span>`,
|
||
},
|
||
legend: {
|
||
top: 0,
|
||
left: "center",
|
||
bottom: 70,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
label: {
|
||
overflow: "break",
|
||
formatter: `{b}\n{d}%`,
|
||
},
|
||
|
||
series: [
|
||
{
|
||
type: "pie",
|
||
radius: ["50%", "70%"],
|
||
avoidLabelOverlap: false,
|
||
top: 15,
|
||
bottom: 0,
|
||
label: {
|
||
show: false,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
|
||
labelLine: {
|
||
show: true,
|
||
},
|
||
data: [],
|
||
},
|
||
],
|
||
}
|
||
|
||
var allText = []
|
||
option15.series[0].data = data.map(function (item, index) {
|
||
allText.push(item.number)
|
||
return {
|
||
value: item.number,
|
||
name: item.rank,
|
||
itemStyle: {
|
||
color: myColor[index],
|
||
},
|
||
}
|
||
})
|
||
|
||
myChart15.setOption(option15)
|
||
|
||
var all = $(".supervision").find("i")
|
||
|
||
all.each(function (a, b) {
|
||
b.innerText = allText[a]
|
||
})
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/rsad-enterprise", function ({ data }) {
|
||
let option14 = {
|
||
tooltip: {
|
||
trigger: "item",
|
||
show: true,
|
||
showContent: true,
|
||
formatter: `<span style="width:120px;text-align:center">{b}: {c} ({d}%)</span>`,
|
||
},
|
||
legend: {
|
||
top: "0%",
|
||
left: "center",
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
type: "pie",
|
||
radius: ["50%", "70%"],
|
||
top: 15,
|
||
bottom: 0,
|
||
avoidLabelOverlap: false,
|
||
|
||
labelLine: {
|
||
show: true,
|
||
},
|
||
label: {
|
||
show:false,
|
||
overflow: "break",
|
||
formatter: `{b}\n{d}%`,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
data: [],
|
||
},
|
||
],
|
||
}
|
||
|
||
var allText = []
|
||
option14.series[0].data = data.map(function (item, index) {
|
||
allText.push(item.number)
|
||
return {
|
||
value: item.number,
|
||
name: item.rank,
|
||
itemStyle: {
|
||
color: myColor[index],
|
||
},
|
||
}
|
||
})
|
||
myChart14.setOption(option14)
|
||
|
||
var all = $(".survey").find("i")
|
||
|
||
all.each(function (a, b) {
|
||
b.innerText = allText[a]
|
||
})
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/enterprise-credits", function ({ data }) {
|
||
let option011 = {
|
||
tooltip: {
|
||
trigger: "item",
|
||
show: true,
|
||
showContent: true,
|
||
formatter: `<span style="width:120px;text-align:center">{b}: {c} ({d}%)</span>`,
|
||
},
|
||
legend: {
|
||
top: "0%",
|
||
left: "center",
|
||
|
||
textStyle: {
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
type: "pie",
|
||
radius: ["50%", "70%"],
|
||
avoidLabelOverlap: true,
|
||
top: 15,
|
||
bottom: 0,
|
||
label: {
|
||
overflow: "break",
|
||
formatter: `{b}\n{d}%`,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
|
||
labelLine: {
|
||
show: true,
|
||
},
|
||
minShowLabelAngle: 15,
|
||
data: [],
|
||
},
|
||
],
|
||
}
|
||
|
||
var allText = []
|
||
option011.series[0].data = data.map(function (item, index) {
|
||
allText.push(item.number)
|
||
return {
|
||
value: item.number,
|
||
name: item.level,
|
||
itemStyle: {
|
||
color: myColor[index],
|
||
},
|
||
}
|
||
})
|
||
|
||
// myChart011.setOption(option011)
|
||
|
||
// var all = $(".credit").find("i")
|
||
|
||
// all.each(function (a, b) {
|
||
// b.innerText = allText[a]
|
||
// })
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/new6", function ({ data }) {
|
||
console.log("jianzhu1dadassda",data)
|
||
let option4 = {
|
||
tooltip: {
|
||
trigger: "item",
|
||
show: true,
|
||
showContent: true,
|
||
formatter: `<span style="width:120px;text-align:center">{b}: {c} ({d}%)</span>`,
|
||
},
|
||
legend: {
|
||
top: "0%",
|
||
left: "center",
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
type: "pie",
|
||
radius: ["50%", "70%"],
|
||
avoidLabelOverlap: true,
|
||
top: 15,
|
||
bottom: 0,
|
||
label: {
|
||
show: false,
|
||
overflow: "break",
|
||
formatter: `{b}\n{d}%`,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
|
||
labelLine: {
|
||
show: true,
|
||
},
|
||
minShowLabelAngle: 15,
|
||
data: [],
|
||
},
|
||
],
|
||
}
|
||
|
||
var allText = []
|
||
option4.series[0].data = data.map(function (item, index) {
|
||
allText.push(item.number)
|
||
return {
|
||
value: item.number,
|
||
name: item.rank,
|
||
itemStyle: {
|
||
color: myColor[index],
|
||
},
|
||
}
|
||
})
|
||
|
||
myChart4.setOption(option4)
|
||
|
||
var all = $(".register").find("i")
|
||
|
||
all.each(function (a, b) {
|
||
b.innerText = allText[a]
|
||
})
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/new10", function ({ data }) {
|
||
let a = $(".smallBox ").find("b")
|
||
|
||
a[0].innerText = data[0].in
|
||
a[1].innerText = data[0].out
|
||
})
|
||
|
||
/**
|
||
* @建筑业企业四个柱状图
|
||
*/
|
||
|
||
$.get("http://118.178.224.202:8024/api/enterprise/jzy-count", function (data) {
|
||
console.log("jianzhu11",data)
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
|
||
let option5 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: 0,
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 20,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
show: false,
|
||
type: "value",
|
||
boundaryGap: [0, 0.01],
|
||
max: 180,
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: 0,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "施工许可项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
|
||
offset: [$(".echart012").width(), -13],
|
||
formatter: "{c}个",
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart5.setOption(option5)
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/enterprise/jzy-count", function (data) {
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
let option6 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: 0,
|
||
top: 0,
|
||
textStyle: {
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 20,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
show: false,
|
||
type: "value",
|
||
boundaryGap: [0, 0.01],
|
||
max: 180,
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: 0,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "施工许可项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
width: "100%",
|
||
offset: [$(".echart012").width(), -13],
|
||
formatter: "{c}个",
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
/* myChart6.setOption(option6)
|
||
*/})
|
||
|
||
$.get("http://118.178.224.202:8024/api/enterprise/kcsj-count", function (data) {
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
let option7 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: 0,
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 20,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
show: false,
|
||
type: "value",
|
||
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: 0,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "施工许可项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
width: "100%",
|
||
offset: [$(".echart012").width(), -13],
|
||
formatter: "{c}个",
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart7.setOption(option7)
|
||
})
|
||
|
||
$.get("http://118.178.224.202:8024/api/enterprise/jl-count", function (data) {
|
||
let area = data.data.map(function (item) {
|
||
return item.area
|
||
})
|
||
let value = data.data.map(function (item) {
|
||
return item.count
|
||
})
|
||
|
||
let option8 = {
|
||
tooltip: {
|
||
trigger: "axis",
|
||
axisPointer: {
|
||
type: "shadow",
|
||
},
|
||
},
|
||
legend: {
|
||
left: 0,
|
||
top: 0,
|
||
selectedMode: false,
|
||
itemWidth: 15,
|
||
itemHeight:10,
|
||
textStyle: {
|
||
fontSize: 13,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
grid: {
|
||
left: 0,
|
||
bottom: 20,
|
||
top: 40,
|
||
right: 0,
|
||
},
|
||
xAxis: {
|
||
show: false,
|
||
type: "value",
|
||
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "#e1e1e1",
|
||
},
|
||
},
|
||
axisLabel: {
|
||
color: "black",
|
||
},
|
||
splitLine: {
|
||
show: false,
|
||
},
|
||
},
|
||
yAxis: {
|
||
type: "category",
|
||
data: area,
|
||
axisTick: {
|
||
show: false,
|
||
lineStyle: {
|
||
color: "#1A95D2",
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisLabel: {
|
||
verticalAlign: "bottom",
|
||
align: "left",
|
||
lineHeight: 28,
|
||
margin: 0,
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
series: [
|
||
{
|
||
name: "施工许可项目",
|
||
type: "bar",
|
||
|
||
data: value,
|
||
itemStyle: {
|
||
color: "#83BBFF",
|
||
borderRadius: 5,
|
||
},
|
||
barWidth: 10,
|
||
|
||
showBackground: {
|
||
show: true,
|
||
},
|
||
backgroundStyle: {
|
||
color: "#E6F1FF",
|
||
borderRadius: 5,
|
||
},
|
||
label: {
|
||
show: true,
|
||
position: "left",
|
||
align: "right",
|
||
width: "100%",
|
||
offset: [$(".echart012").width(), -13],
|
||
formatter: "{c}个",
|
||
fontSize: 14,
|
||
color: "#6e7178",
|
||
},
|
||
},
|
||
],
|
||
}
|
||
myChart8.setOption(option8)
|
||
})
|
||
|
||
// 在册人员
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/pperson", function (data) {
|
||
if (data && data.data[0]) {
|
||
$(".person1").text(data.data[0].count)
|
||
}
|
||
})
|
||
|
||
// 重叠人员
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/ooverlap", function (data) {
|
||
if (data && data.data[0]) {
|
||
$(".person2").text(data.data[0].count)
|
||
}
|
||
})
|
||
|
||
// 管理人员
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/mmanage", function (data) {
|
||
$(".person_manage").text(data.data[0].count)
|
||
})
|
||
|
||
// 劳务人员
|
||
$.get("http://118.178.224.202:8024/api/constructionpermit/llabor", function (data) {
|
||
$(".person_service").text(data.data[0].count)
|
||
// 根据比例设置宽高
|
||
let radio = $(".person_manage").text() / $(".person_service").text()
|
||
$(".box_manage").css({ width: $(".box_service").width() * radio, height: $(".box_service").height() * radio })
|
||
})
|
||
|
||
// 省内产值/省外产值
|
||
$.get("http://118.178.224.202:8024/api/new10", function (data) {
|
||
$("#province_inner").text(data.data[0].in)
|
||
$("#province_outer").text(data.data[0].out)
|
||
})
|