413 lines
9.5 KiB
JavaScript
413 lines
9.5 KiB
JavaScript
//编制重点县图表
|
|
/* var option11 = {
|
|
tooltip: {
|
|
trigger: "item",
|
|
show: true,
|
|
showContent: true,
|
|
},
|
|
|
|
series: [{
|
|
// name: "Access From",
|
|
type: "pie",
|
|
radius: ["70%", "90%"],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
color: "#3D9DF4",
|
|
},
|
|
label: {
|
|
show: true,
|
|
position: "center",
|
|
color: "#3D9DF4",
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: "40",
|
|
fontWeight: "bold",
|
|
},
|
|
itemStyle: {
|
|
shadowBlur: 10,
|
|
shadowOffsetX: 0,
|
|
shadowColor: "rgba(0, 0, 0, 0.5)",
|
|
},
|
|
},
|
|
labelLine: {
|
|
show: false,
|
|
},
|
|
data: [{
|
|
value: 100,
|
|
name: "100%",
|
|
label: {
|
|
position: "center",
|
|
fontSize: 18,
|
|
color: "#3D9DF4",
|
|
},
|
|
}, ],
|
|
}, ],
|
|
}
|
|
option11 && myChart11.setOption(option11)
|
|
*/
|
|
|
|
var taskId1 = "228927561610117120"
|
|
var quotaCode1 = "Q234608555365322753"
|
|
// var mubiao1 = 4;
|
|
//$.post('https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/targetProgress.do?taskId=' + taskId1 + '&taskSystem=government"aCode=' + quotaCode1, function (data) {
|
|
var url1 = "https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode=" + quotaCode1 + "&systemName=government"
|
|
console.log(url1)
|
|
var myChart11 = echarts.init(document.querySelector(".echart11"))
|
|
|
|
$.post(url1, function (data) {
|
|
// debugger;
|
|
var d = unique(data.infoList)
|
|
console.log("得到的编制信息",data)
|
|
var mubiao1 = countTotal(d, "targetValue")
|
|
var nb_value = countTotal(d, "currentValue")
|
|
console.log("得到的编1111",mubiao1,nb_value)
|
|
$("#lblval1").html(mubiao1)
|
|
$("#lblval2").html(nb_value)
|
|
nb_value_lv = (nb_value / mubiao1) * 100
|
|
|
|
/* var myChart1 = echarts.init(document.getElementById("chart1"))
|
|
*/ var option11 = {
|
|
tooltip: {
|
|
trigger: "item",
|
|
formatter: "{b} {c} %",
|
|
},
|
|
graphic: {
|
|
type: "text",
|
|
left: "center",
|
|
top: "center",
|
|
width: 30,
|
|
style: {
|
|
text: "" + nb_value_lv + "%",
|
|
fill: "#228DF8",
|
|
fontSize: 18,
|
|
fontWeight: 700,
|
|
},
|
|
},
|
|
series: [
|
|
{
|
|
name: "",
|
|
type: "pie",
|
|
radius: ["70%", "90%"],
|
|
avoidLabelOverlap: false,
|
|
label: {
|
|
show: false,
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: false,
|
|
},
|
|
},
|
|
labelLine: {
|
|
show: true,
|
|
},
|
|
data: [
|
|
{
|
|
value: nb_value_lv,
|
|
name: "",
|
|
itemStyle: {
|
|
normal: {
|
|
color: "#3E9DF4",
|
|
label: {
|
|
show: true,
|
|
formatter: "{c}%",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
option11 && myChart11.setOption(option11)
|
|
})
|
|
|
|
/* 已编制重点县“一县一策”方案的县市区 */
|
|
|
|
$.get("https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode=" + quotaCode1 + "&systemName=government", function (data) {
|
|
console.log("得到的table数据",data)
|
|
let d = unique(data.infoList)
|
|
d.forEach(p => { $("#chart1_items").append('<tr><td>' + ningbo_allareas[p['areaCode']] + '</td><td>完成备案</td><td>已完成</td><td>100%</td></tr>'); })
|
|
})
|
|
|
|
|
|
|
|
|
|
/* 新增租赁住房 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var myChart12 = echarts.init(document.querySelector(".echart12"))
|
|
|
|
//新增租赁住房数量
|
|
|
|
var taskId3 = "249477757645451264"
|
|
var quotaCode3 = "Q250305589481046017"
|
|
var url3 = "https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode=" + quotaCode3 + "&systemName=government"
|
|
$.post(url3, function (data) {
|
|
// debugger;
|
|
var d = unique(data.infoList)
|
|
var mubiao3 = countTotal(d, "targetValue")
|
|
var nb_value = countTotal(d, "currentValue")
|
|
$("#lblmubiao3").html(mubiao3)
|
|
$("#lbldangqian3").html(nb_value)
|
|
/* var myChart3 = echarts.init(document.getElementById("chart3"))
|
|
*/ var colors = ["#31C563", "#5c8ff8"]
|
|
option12 = {
|
|
color: colors,
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
type: "cross",
|
|
},
|
|
},
|
|
grid: {
|
|
bottom: 39,
|
|
right: 100,
|
|
top: 35,
|
|
},
|
|
// toolbox: {
|
|
// feature: {
|
|
// dataView: {show: true, readOnly: false},
|
|
// restore: {show: true},
|
|
// saveAsImage: {show: true}
|
|
// }
|
|
// },
|
|
legend: {
|
|
data: ["完成值", "目标值"],
|
|
},
|
|
xAxis: [
|
|
{
|
|
type: "category",
|
|
axisTick: {
|
|
alignWithLabel: true,
|
|
},
|
|
data: d.map(function (item) {
|
|
return ningbo_allareas[item["areaCode"]]
|
|
}),
|
|
axisLabel: {
|
|
rotate: 30,
|
|
},
|
|
},
|
|
],
|
|
yAxis: [
|
|
{
|
|
type: "value",
|
|
name: "套",
|
|
min: 0,
|
|
max: 15000,
|
|
position: "left",
|
|
axisLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: colors[0],
|
|
},
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLabel: {
|
|
formatter: "{value} 套",
|
|
},
|
|
},
|
|
{
|
|
type: "value",
|
|
name: "套",
|
|
min: 0,
|
|
max: 15000,
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
|
|
position: "right",
|
|
axisLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: colors[1],
|
|
},
|
|
},
|
|
axisLabel: {
|
|
formatter: "{value} 套",
|
|
},
|
|
},
|
|
],
|
|
series: [
|
|
{
|
|
name: "完成值",
|
|
type: "bar",
|
|
data: d.map(function (item) {
|
|
return item["currentValue"]
|
|
}),
|
|
},
|
|
{
|
|
name: "目标值",
|
|
type: "bar",
|
|
yAxisIndex: 1,
|
|
data: d.map(function (item) {
|
|
return item["targetValue"]
|
|
}), //['1932', '645', '0', '0', '373', '0', '1308', '8960', '1235', '0', '266', '2579', '1520', '180', '1002']
|
|
},
|
|
],
|
|
}
|
|
myChart12.setOption(option12)
|
|
})
|
|
|
|
//保障性住房
|
|
|
|
|
|
$.get("http://118.178.224.202:8024/api/housing-s",function(data){
|
|
$("#mianji").html(data.data[0].housingArea)
|
|
$("#fugailv").html(data.data[0].rate)
|
|
$("#hushu").html(data.data[0].rent)
|
|
$("#butieshu").html(data.data[0].rental)
|
|
$("#gongzushu").html(data.data[0].information)
|
|
})
|
|
|
|
//实物配租
|
|
|
|
|
|
$.get("http://118.178.224.202:8024/api/pr-housing",function(data){
|
|
data.data.map(item=>{
|
|
$("#shiwupz").append("<tr><td>"+ item.area +"</td><td>"+ item.mdaLease +"</td></tr>")
|
|
})
|
|
data.data.map(item=>{
|
|
$("#zulinshu").append("<tr><td>"+ item.area +"</td><td>"+ item.smAssistance +"</td></tr>")
|
|
})
|
|
})
|
|
|
|
// $('#lblmubiao3').html(20000);
|
|
/* var taskId3 = "249477757645451264"
|
|
|
|
var quotaCode3 = "Q250305589481046017"
|
|
var url3 =
|
|
"https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode=" +
|
|
quotaCode3 +
|
|
"&systemName=government"
|
|
|
|
$.post(url3, function(data) {
|
|
// debugger;
|
|
var d = unique(data.infoList)
|
|
// var mubiao3 = countTotal(d, 'targetValue');
|
|
// var nb_value = countTotal(d, 'currentValue');
|
|
// $('#lblmubiao3').html(mubiao3);
|
|
// $('#lbldangqian3').html(nb_value);
|
|
// var myChart3 = echarts.init(document.getElementById('chart3'));
|
|
var colors = ["#31C563", "#5c8ff8"]
|
|
var option12 = {
|
|
color: colors,
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
type: "cross",
|
|
},
|
|
},
|
|
grid: {
|
|
bottom: 39,
|
|
right: 100,
|
|
top: 35,
|
|
},
|
|
// toolbox: {
|
|
// feature: {
|
|
// dataView: {show: true, readOnly: false},
|
|
// restore: {show: true},
|
|
// saveAsImage: {show: true}
|
|
// }
|
|
// },
|
|
legend: {
|
|
top: 0,
|
|
left: "center",
|
|
textStyle: {
|
|
fontSize: 16,
|
|
color: "#797979",
|
|
},
|
|
},
|
|
xAxis: [{
|
|
type: "category",
|
|
axisTick: {
|
|
alignWithLabel: true,
|
|
},
|
|
data: d.map(function(item) {
|
|
return ningbo_allareas[item["areaCode"]]
|
|
}),
|
|
axisLabel: {
|
|
rotate: 30,
|
|
fontSize: 16,
|
|
},
|
|
}, ],
|
|
yAxis: [{
|
|
type: "value",
|
|
name: "套",
|
|
min: 0,
|
|
max: 15000,
|
|
position: "left",
|
|
axisTick: {
|
|
show: true,
|
|
},
|
|
axisLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: colors[0],
|
|
},
|
|
},
|
|
splitLine: { show: false },
|
|
axisLabel: {
|
|
formatter: "{value} 套",
|
|
fontSize: 16,
|
|
},
|
|
nameTextStyle: {
|
|
color: "#31C563",
|
|
fontSize: 16,
|
|
},
|
|
},
|
|
{
|
|
type: "value",
|
|
name: "套",
|
|
min: 0,
|
|
max: 15000,
|
|
splitLine: { show: false },
|
|
|
|
position: "right",
|
|
axisTick: {
|
|
show: true,
|
|
},
|
|
axisLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: colors[1],
|
|
},
|
|
},
|
|
axisLabel: {
|
|
formatter: "{value} 套",
|
|
fontSize: 16,
|
|
},
|
|
nameTextStyle: {
|
|
color: colors[1],
|
|
fontSize: 16,
|
|
},
|
|
},
|
|
],
|
|
series: [{
|
|
name: "完成值",
|
|
type: "bar",
|
|
data: d.map(function(item) {
|
|
return item["currentValue"]
|
|
}),
|
|
barWidth: 15,
|
|
},
|
|
{
|
|
name: "目标值",
|
|
type: "bar",
|
|
yAxisIndex: 1,
|
|
data: d.map(function(item) {
|
|
return item["targetValue"]
|
|
}), //['1932', '645', '0', '0', '373', '0', '1308', '8960', '1235', '0', '266', '2579', '1520', '180', '1002']
|
|
barWidth: 15,
|
|
},
|
|
],
|
|
}
|
|
myChart12.setOption(option12)
|
|
}) */ |