测试文件

This commit is contained in:
Wjl
2022-01-11 14:22:25 +08:00
parent 0d51d41ffd
commit 37c93d07d0
283 changed files with 36491 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,148 @@
html,
body {
height: 100%;
font-family: PingFangSC-Regular, PingFang SC;
color: #363a44;
}
.container {
font-size: 14px;
display: flex;
flex-direction: column;
height: 100%;
position: relative;
}
.container .top {
display: flex;
justify-content: space-between;
background: #ffffff;
font-size: 14px;
padding: 0 16px;
}
.container .top > a {
display: inline-block;
text-align: center;
color: rgb(170, 163, 163);
padding: 15px 0;
}
.container .top .cycle {
color: #1492ff;
border-bottom: 2px solid #1492ff;
}
.container ul {
overflow: scroll;
position: absolute;
width: 100%;
top: 51px;
bottom: 0;
}
.container ul i {
font-size: 20px;
color: #1492ff;
margin-right: 8px;
font-style: normal;
}
.container ul > li:not(:last-child) {
background: #ffffff;
/* margin-top: 15px; */
}
.container ul > li:not(:last-child) > :nth-child(1) {
padding: 10px 0;
display: flex;
align-items: center;
font-size: 15px;
padding-left: 16px;
}
.container ul > li:not(:last-child) .card {
display: flex;
justify-content: space-between;
padding: 10px 16px;
color: #6e7178;
line-height: 30px;
align-items: center;
}
.container ul > li:not(:last-child) .card img {
width: 40px;
}
.container ul #goverment > :nth-child(n + 2) {
display: flex;
flex-direction: column;
align-items: left;
padding: 10px 16px;
color: #6e7178;
}
.container ul #goverment > :nth-child(n + 2) img {
width: 30px;
}
.container ul #goverment > :nth-child(n + 2) :nth-child(2) {
margin: 10px 0;
}
.container ul #county {
background: #ffffff;
margin-top: 15px;
padding-bottom: 30px;
}
.container ul #county > :nth-child(1) {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 0 10px;
}
.container ul #county > :nth-child(1) > span {
font-size: 15px;
padding-left: 16px;
}
.container ul #county > :nth-child(1) .mapButton {
padding-right: 10px;
}
.container ul #county > :nth-child(1) .mapButton span {
display: inline-block;
padding: 5px 15px;
border: 1px solid #b8b0b0;
/* border-left: none; */
}
.container ul #county > :nth-child(1) .mapButton :nth-child(1) {
margin-right: -5px;
}
.container ul #county > :nth-child(1) .mapButtonColor {
color: #0066ff;
border: 1px solid #0066ff !important;
background: #d9e8ff;
}
.container ul #county p {
margin: 0;
text-align: right;
padding-right: 15px;
color: #6e7178;
}
.container ul #county .echart2,
.container ul #county .echart3 {
width: 100%;
height: 500px;
}
.container ul #county .echart3 {
display: none;
}
.container ul #county .table {
color: #6e7178;
padding: 0 20%;
}
.container ul #county .table > div {
display: flex;
flex-wrap: wrap;
}
.container ul #county .table > div span {
width: 50%;
text-align: left;
margin: 10px 0;
}
.container ul #county .table > div span i {
color: #6da4f9;
font-size: 14px;
margin-left: 7px;
}
.container ul #county .table > :nth-child(n + 2) {
color: #6e7178;
}
.container ul #county .table .zulin {
display: none;
}

View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>住房保障</title>
<link rel="stylesheet" href="./1.css" />
<link rel="stylesheet" href="../global.css" />
</head>
<body>
<div class="container">
<div class="top">
<a href="#level"> 住房水平 </a>
<a href="#guarantee"> 保障性住房 </a>
<a href="#goverment"> 政府投资公租房保障 </a>
<a href="#county"> 区(县市)分布 </a>
</div>
<ul>
<li id="level">
<div>
<span>住房水平</span>
</div>
<div class="card">
<span>城市居民人均自有现住房面积 <br />
<i>46.8888</i>平方米
</span>
<!-- <img src="./1.png" alt="" /> -->
</div>
</li>
<li id="guarantee" style="margin-top: 15px;">
<div>
<span>保障性住房</span>
</div>
<div class="card">
<span>新增收益住房困难家庭 <br />
<i>24.65</i>万户
</span>
<!-- <img src="./2.png" alt="" /> -->
</div>
<div class="card">
<span>货币安置及新建棚户区改造安置用房 <br />
<i>13</i>万套
</span>
<!-- <img src="./3.png" alt="" /> -->
</div>
<div class="card">
<span>城镇住房保障收益覆盖率 <br />
<i> 24.65</i>
</span>
<!-- <img src="./4.png" alt="" /> -->
</div>
</li>
<li id="goverment" style="margin-top: 15px;">
<div>
<span>政府投资公租房保障</span>
</div>
<div>
<!-- <img src="./1 copy.png" alt="" /> -->
<span>政府投资公租房保障实物配租</span>
<span><i>23,540</i></span>
</div>
<div>
<!-- <img src="./2 copy.png" alt="" /> -->
<span>政府投资公租房保障租赁补贴</span>
<span><i>14,090</i></span>
</div>
<div>
<!-- <img src="./1 copy.png" alt="" /> -->
<span>公租房项目信息 </span>
<span><i> 29,143</i></span>
</div>
</li>
<li id="county">
<div>
<span>区(县市)分布</span>
<div class="mapButton">
<span>实物配租</span>
<span>租赁补贴</span>
</div>
</div>
<p>单位:户</p>
<div class="echart2"></div>
<div class="echart3"></div>
<div class="table">
<div class="peizu"></div>
<div class="zulin"></div>
</div>
</li>
</ul>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.min.js"></script>
<script src="../ningbo_allareas.js"></script>
<script src="../jquery.js"></script>
<script src="./1.js"></script>
</body>
</html>

View File

@@ -0,0 +1,405 @@
/* try {
require("../jquery")
} catch (error) {
console.log(error)
}
*/
/**
* 页面加载时
*/
window.onload = function () {
$(".top :first-child").addClass("cycle")
$(".mapButton :first-child").addClass("mapButtonColor")
}
/**
* 头部四个标题点击事件
*/
$(".top")
.children()
.click(function () {
$(".top").children().removeClass("cycle")
$(this).addClass("cycle")
})
/**
* 保障性住房按钮切换
*/
$(".mapButton")
.children()
.click(function (e) {
$(".mapButton").children().removeClass("mapButtonColor")
$(e.target).addClass("mapButtonColor")
if (e.target.innerText == "实物配租") {
$(".peizu").css("display", "flex")
$(".zulin").css("display", "none")
// $(".p0").text("单位:户")
} else {
$(".peizu").css("display", "none")
$(".zulin").css("display", "flex")
// $(".p0").text("单位:元")
}
})
/**
* 实物配租按钮切换
*/
$(".mapButton")
.children()
.click(function () {
$(".mapButton").children().removeClass("mapButtonColor")
$(this).addClass("mapButtonColor")
if (this.innerText == "实物配租") {
$(".echart2").css("display", "block")
$(".echart3").css("display", "none")
$(".peizu").css("display", "flex")
$(".zulin").css("display", "none")
} else {
$(".echart3").css("display", "block")
$(".echart2").css("display", "none")
$(".peizu").css("display", "none")
$(".zulin").css("display", "flex")
}
})
//重设echart宽度
$(".echart3").css("width", $("#county").width())
var myChart2 = echarts.init(document.querySelector(".echart2"))
var myChart3 = echarts.init(document.querySelector(".echart3"))
var quotaCode3 = "Q249971129640398848"
var baseUrl = "https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode="
var url3 = baseUrl + quotaCode3 + "&systemName=government"
$.post(url3, function (data) {
d = unique(data.infoList)
$.get("https://sznbs.ningbo.gov.cn:89/szzf/zdrw/fj_zhujianjun/330200_full.json", function (mapJson) {
// 地图2
echarts.registerMap("宁波市", mapJson)
var option2 = {
title: {
text: "",
x: "left",
},
tooltip: {
trigger: "item",
// formatter: function(params, ticket, callback) {
// if (params.data !== undefined) {
// let currentValue = d[params.dataIndex]["currentValue"]
// let targetValue = d[params.dataIndex]["targetValue"]
// return (
// params.name +
// " 政府投资公租房" +
// currentValue +
// "套"
// )
// }
// },
},
geo: {
show: true,
map: "宁波市",
emphasis: {
label: {
show: true,
},
},
roam: false, //不开启缩放和平移
zoom: 1.23, //视角缩放比例
label: {
normal: {
show: true,
fontSize: "10",
color: "white",
},
},
itemStyle: {
normal: {
color: "red",
borderColor: "rgba(0, 0, 0, 0.2)",
},
emphasis: {
label: {
show: true,
position: "top",
color: "red",
},
areaColor: "#ccc", //鼠标选择区域颜色
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
regions: [],
},
series: [
{
mapType: "宁波市",
name: "实物配租",
type: "map",
label: {
show: true,
},
geoIndex: 0,
data: [
{
name: "鄞州区",
value: 5332,
},
{
name: "海曙区",
value: 3930,
},
{
name: "象山县",
value: 3033,
},
{
name: "江北区",
value: 2222,
},
{
name: "宁海县",
value: 1357,
},
{
name: "北仑区",
value: 1140,
},
{
name: "镇海区",
value: 1112,
},
{
name: "奉化区",
value: 1107,
},
{
name: "慈溪市",
value: 1079,
},
{
name: "余姚市",
value: 886,
},
],
},
],
}
d.forEach(function (item) {
// debugger
let c = parseFloat((item["currentValue"] / item["targetValue"]) * 100).toFixed(0) < 100 ? "#FF5C11" : "#15BE50"
option2.geo.regions.push({
name: ningbo_allareas[item["areaCode"]],
itemStyle: {
normal: {
areaColor: "#8BCCFE",
},
emphasis: {
areaColor: "#8BCCFE",
},
},
label: {
show: true,
},
})
// myColor1.push(c)
})
myChart2.setOption(option2)
// 地图3
echarts.registerMap("宁波市", mapJson)
var option3 = {
title: {
text: "",
x: "left",
},
tooltip: {
trigger: "item",
// formatter: function(params, ticket, callback) {
// if (params.data !== undefined) {
// let currentValue = d[params.dataIndex]["currentValue"]
// let targetValue = d[params.dataIndex]["targetValue"]
// return (
// params.name +
// " 政府投资公租房" +
// currentValue +
// "套"
// )
// }
// },
},
geo: {
show: true,
map: "宁波市",
emphasis: {
label: {
show: true,
// position: '',
// color: 'red'
},
},
roam: false, //不开启缩放和平移
zoom: 1.23, //视角缩放比例
label: {
normal: {
show: true,
fontSize: "10",
color: "white",
},
},
itemStyle: {
normal: {
color: "#8BCCFE",
borderColor: "rgba(0, 0, 0, 0.2)",
},
emphasis: {
label: {
show: true,
position: "top",
color: "red",
},
areaColor: "#ccc", //鼠标选择区域颜色
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
// data:this.dataList
// 地图区域
regions: [],
},
series: [
{
mapType: "宁波市",
name: "租赁补贴",
type: "map",
//map: '宁波市',//要和echarts.registerMap中第一个参数一致
label: {
show: true,
},
geoIndex: 0,
data: [
{
name: "鄞州区",
value: 2605,
},
{
name: "海曙区",
value: 2971,
},
{
name: "象山县",
value: 0,
},
{
name: "江北区",
value: 2463,
},
{
name: "宁海县",
value: 877,
},
{
name: "北仑区",
value: 1626,
},
{
name: "镇海区",
value: 577,
},
{
name: "奉化区",
value: 403,
},
{
name: "慈溪市",
value: 1043,
},
{
name: "余姚市",
value: 68,
},
],
},
],
}
d.forEach(function (item) {
// debugger
let c = parseFloat((item["currentValue"] / item["targetValue"]) * 100).toFixed(0) < 100 ? "#FF5C11" : "#15BE50"
option2.geo.regions.push({
name: ningbo_allareas[item["areaCode"]],
itemStyle: {
normal: {
areaColor: "#8BCCFE",
},
emphasis: {
areaColor: "#8BCCFE",
},
},
label: {
show: true,
},
})
// myColor1.push(c)
})
myChart3.setOption(option3)
})
})
/**
* 统一后端数据
*/
$.get(" https://dingdingoa.nbjs.gov.cn/yidongduanapi/api/pr-housing", function ({ data }) {
// console.log(data)
data.forEach(function (item) {
$(".peizu").append("<span>" + item.area + "<i>" + item.mdaLease + "</i></span>")
$(".zulin").append("<span>" + item.area + "<i>" + item.smAssistance + "</i></span>")
})
})
$.get(" https://dingdingoa.nbjs.gov.cn/yidongduanapi/api/housing-s", function ({ data }) {
console.log("得到的数据",data)
$("#level>.card i").text(data[0].housingArea)
$("#guarantee>:last-child").find("i").text(data[0].rate)
$("#goverment").children().eq(1).find("i").text(data[0].rent)
$("#goverment").children().eq(2).find("i").text(data[0].rental)
$("#goverment").children().eq(3).find("i").text(data[0].information)
})

View File

@@ -0,0 +1,183 @@
html,
body {
height: 100%;
font-family: PingFangSC-Regular, PingFang SC;
// font-family: fangsong;
color: #363a44;
}
.container {
font-size: 14px;
display: flex;
flex-direction: column;
height: 100%;
position: relative;
.top {
display: flex;
justify-content: space-between;
background: #ffffff;
font-size: 14px;
padding: 0 16px;
> a {
display: inline-block;
text-align: center;
color: #b3b5b9;
padding: 15px 0;
}
.cycle {
color: #1492ff;
border-bottom: 2px solid #1492ff;
}
}
ul {
overflow: scroll;
position: absolute;
width: 100%;
top: 52px;
bottom: 0;
i {
font-size: 20px;
color: #1492ff;
margin-right: 8px;
font-style: normal;
}
> li:not(:last-child) {
background: #ffffff;
margin-top: 15px;
> :nth-child(1) {
padding: 10px 0;
display: flex;
align-items: center;
font-size: 15px;
padding-left: 16px;
}
.card {
display: flex;
justify-content: space-between;
padding: 10px 16px;
color: #b3b5b9;
line-height: 30px;
align-items: center;
img {
width: 40px;
}
}
}
#goverment {
> :nth-child(n + 2) {
display: flex;
flex-direction: space-between;
align-items: center;
padding: 15px 0;
color: #b3b5b9;
img {
width: 30px;
}
:nth-child(2) {
margin: 10px 0;
}
}
// .card {
// display: flex;
// justify-content: space-between;
// padding: 10px 16px;
// color: #b3b5b9;
// line-height: 30px;
// align-items: center;
// img {
// width: 40px;
// }
// }
}
#county {
background: #ffffff;
margin-top: 15px;
padding-bottom: 30px;
> :nth-child(1) {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 0 10px;
> span {
font-size: 15px;
padding-left: 16px;
}
.mapButton {
padding-right: 10px;
span {
display: inline-block;
padding: 5px 15px;
border: 1px solid rgb(184, 176, 176);
}
:nth-child(1) {
margin-right: -5px;
}
}
.mapButtonColor {
color: #0066ff;
border: 1px solid #0066ff !important;
background: #d9e8ff;
}
}
p {
margin: 0;
text-align: right;
padding-right: 15px;
color: #b3b5b9;
}
.echart2,
.echart3 {
width: 100%;
height: 500px;
}
.echart3 {
display: none;
}
.table {
color: #b3b5b9;
padding: 0 20%;
> div {
display: flex;
flex-wrap: wrap;
span {
width: 50%;
text-align: left;
margin: 10px 0;
i {
color: #6da4f9;
font-size: 14px;
margin-left: 7px;
}
}
}
> :nth-child(n + 2) {
color: #b3b5b9;
}
.zulin {
display: none;
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB