测试文件

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

View File

@@ -0,0 +1,98 @@
.centercontent .nongcuncontent {
display: flex;
flex-direction: row;
justify-content: space-around;
width: 100%;
padding-bottom: 15px;
text-align: center;
}
.centercontent .nongcuncontent .nongcuntext {
font-size: 14px;
color: #6e7178;
}
.centercontent .echart61 {
width: 100%;
height: 250px;
}
.centercontent .echart62 {
width: 100%;
height: 500px;
}
.centercontent .echart63 {
width: 100%;
height: 250px;
}
.centercontent .echart64 {
display: block;
width: 100%;
height: 250px;
}
.centercontent .echart65 {
display: block;
width: 100%;
height: 250px;
}
.centercontent .jiantou {
width: 10px;
height: 10px;
margin: 5px;
transform: rotate(135deg);
border-top: 1px solid #bebebe;
border-right: 1px solid #bebebe;
}
.centercontent .nongcuntitle {
display: flex;
justify-content: space-between;
}
.xianshi ul li {
list-style: none;
}
/* 这块给xianshi定义宽高 */
.xianshi {
font-size: 12px;
position: absolute;
top: 35px;
right: -90px;
display: block;
width: 200px;
transform: rotate(-135deg);
border: 2px solid #e1e1e1;
border-radius: 5px;
background: #fff;
}
/* 用伪类来实现下拉 */
.jiantou:hover > .xianshi {
display: block;
}
.xianshi > ul {
float: right;
width: 200px;
}
.xianshi > ul > li {
margin-top: 2px;
padding: 5px;
background: #fff;
}
.xianshi > ul > li:not(:last-child) {
border-bottom: 1px #e1e1e1 solid;
}
.centercontent .nongcun {
display: block;
}
.xianshi .color {
background: #d3d3d3;
}

View File

@@ -0,0 +1,542 @@
// 省级美丽宜居示范村创建
// Area:地区 Finish完成值
var myChart61 = echarts.init(document.querySelector(".echart61"))
var myChart62 = echarts.init(document.querySelector(".echart62"))
var livablev = "http://118.178.224.202:8024/api/livable-v"
$.get(livablev, function (data) {
var d = []
d = data.data
let arryArea = []
let arryFinish = []
let arryMbiao = []
let countFinish = 0
let countMbiao = 0
d.forEach(function (item) {
arryArea.push(item.area)
arryFinish.push(item.finish)
arryMbiao.push(item.finish)
countFinish += item.finish
countMbiao += item.target
})
$("#countFinish").empty().append(countFinish)
$("#countMbiao").empty().append(countMbiao)
var option61 = {
tooltip: {
trigger: "item",
show: false,
showContent: true,
},
// legend: {
// top: "5%",
// left: "center",
// itemStyle: {
// tooltip: true,
// },
// },
series: [{
// name: "Access From",
type: "pie",
radius: ["70%", "90%"],
avoidLabelOverlap: false,
label: {
show: true,
// position: "center",
},
itemStyle: {
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: countMbiao,
name: (countMbiao/countMbiao*100).toFixed(0) + "%" ,
label: {
position: "center",
fontSize: 16,
},
},
{
value: countMbiao-countMbiao,
// name: "43%",
itemStyle: {
color: "#EEEEEE",
},
label: {
position: "center",
fontSize: 16,
},
},
],
}, ],
}
myChart61.setOption(option61)
var option62 = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
confine: true,
formatter: "{b}" + "  " + "{a0}" + ": " + "{c0}",
},
legend: {
top: "0",
left: 0,
selectedMode: false,
itemWidth: 15,
itemHeight:10,
textStyle: {
fontSize: 13,
color: "#6e7178",
},
},
grid: {
left: 0,
right: 0,
bottom: 0,
top: 40,
},
yAxis: [
{
type: "category",
axisLabel: {
align: "left",
verticalAlign: "bottom",
lineHeight: 34,
margin: -0,
fontSize: 14,
color: "#6e7178",
},
// tick是刻度tickeline刻度线axis是轴
axisTick: {
show: false,
},
axisTickLine: {
show: false,
},
axisLine: {
show: false,
},
data: arryArea,
},
],
xAxis: [
{
show: false,
},
],
// label: {
// show: true,
// position: "left",
// align: "right",
// offset: [380, -13],
// formatter: "{c}个",
// fontSize: 14,
// color: "red",
// },
label: {
show: true,
position: "left",
align: "right",
offset: [$(".echart62").width(), -13],
formatter: "{c}个",
fontSize: 14,
color: "#6e7178",
},
series: [
{
name: "各区县市完成值",
type: "bar",
barWidth: 10,
data: arryFinish,
itemStyle: {
color: "#83BBFF",
borderRadius: 5,
},
showBackground: {
show: true,
},
backgroundStyle: {
color: "#E6F1FF",
borderRadius: 5,
},
},
],
}
myChart62.setOption(option62)
})
// var taskId2 = "229185203687473152"
// var quotaCode2 = "Q229262828229443587"
// var url2 =
// "https://sznbs.ningbo.gov.cn:89/nbszhjkzz/tojcms/getQuotaByTaksIdOrQuotaCode.do?parentQuotaCode=" +
// quotaCode2 +
// "&systemName=government"
// $.post(url2, function (data) {
// var d = unique(data.infoList)
// // var colors = ["#31C563"]
// var option62 = {
// // color: colors,
// tooltip: {
// trigger: "axis",
// axisPointer: {
// type: "cross",
// },
// },
// legend: {
// top: "5%",
// left: "center",
// itemStyle: {
// tooltip: true,
// },
// textStyle: {
// fontSize: 16,
// color: "#797979",
// },
// },
// grid: {
// left: "1%",
// // right: "1%",
// bottom: 25,
// containLabel: true,
// },
// yAxis: [{
// type: "category",
// axisTick: {
// alignWithLabel: true,
// },
// axisLabel: {
// fontSize: 16,
// interval: 0,
// },
// data: d.map(function (item) {
// return ningbo_allareas[item["areaCode"]]
// }),
// },],
// xAxis: {
// type: "value",
// name: "套",
// min: 0,
// max: 5,
// position: "left",
// axisLine: {
// show: true,
// lineStyle: {
// // color: colors[0],
// },
// },
// axisTick: {
// show: true,
// },
// splitLine: {
// show: false,
// },
// axisLabel: {
// formatter: "{value} 套",
// fontSize: 16,
// },
// nameTextStyle: {
// // color: "#31C563",
// fontSize: 16,
// },
// },
// series: [{
// name: "各区县市完成值",
// type: "bar",
// barWidth: "30%",
// data: d.map(function (item) {
// return item["currentValue"]
// }),
// itemStyle: {
// normal: {
// color: "#31C563",
// label: {
// show: false, //显示文本
// textStyle: {
// color: "#000",
// fontSize: "14",
// },
// },
// },
// },
// },],
// }
// myChart62.setOption(option62)
// })
// 农村房屋隐患排查整治
// FenM, FenZ:所有农村房屋排查录入率 FenZ1, FenM1: 鉴定为C、D级用作生产经营自建房的整治改造率 FenZ2, FenM2: 初判不安全的农村房屋鉴定率
var myChart63 = echarts.init(document.querySelector(".echart63"))
var myChart64 = echarts.init(document.querySelector(".echart64"))
var myChart65 = echarts.init(document.querySelector(".echart65"))
var new1 = "http://118.178.224.202:8024/api/new1"
$.get(new1, function (data) {
var d = []
d = data.data
let arryFenM = d[0]?.fenM
let arryFenZ = d[0]?.fenZ
let arryFenM1 = d[0]?.fenM1
let arryFenZ1 = d[0]?.fenZ1
let arryFenM2 = d[0]?.fenM2
let arryFenZ2 = d[0]?.fenZ2
let rate1 = arryFenM == 0 ? 0 : Number((arryFenZ / arryFenM) * 100)
let other1 = Number(100 - rate1)
let rate_percent1 = rate1.toFixed(1) + "%"
let other_percent1 = other1.toFixed(1) + "%"
let ratedata1 = [
{
value: rate1,
name: rate_percent1,
label: {
position: "center",
fontSize: 18,
// color: "#31C463",
},
// itemStyle: {
// color: "#31C463",
// },
},
{
value: other1,
name: other_percent1,
itemStyle: {
color: "#EFEFEF",
},
label: {
show: false,
},
},
]
let rate2 = arryFenM == 0 ? 0 : Number((arryFenZ1 / arryFenM1) * 100)
let other2 = Number(100 - rate2)
let rate_percent2 = rate2.toFixed(1) + "%"
let other_percent2 = other2.toFixed(1) + "%"
let ratedata2 = [
{
value: rate2,
name: rate_percent2,
label: {
position: "center",
fontSize: 18,
// color: "#31C463",
},
// itemStyle: {
// color: "#31C463",
// },
},
{
value: other2,
name: other_percent2,
itemStyle: {
color: "#EFEFEF",
},
label: {
show: false,
},
},
]
let rate3 = arryFenM == 0 ? 0 : Number((arryFenZ2 / arryFenM2) * 100)
let other3 = Number(100 - rate3)
let rate_percent3 = rate3.toFixed(1) + "%"
let other_percent3 = other3.toFixed(1) + "%"
let ratedata3 = [
{
value: rate3,
name: rate_percent3,
label: {
position: "center",
fontSize: 18,
// color: "#31C463",
},
// itemStyle: {
// color: "#31C463",
// },
},
{
value: other3,
name: other_percent3,
itemStyle: {
color: "#EFEFEF",
},
label: {
show: false,
},
},
]
var option63 = {
tooltip: {
trigger: "item",
show: false,
showContent: true,
},
// legend: {
// top: "5%",
// left: "center",
// itemStyle: {
// tooltip: true,
// },
// },
series: [
{
// name: "Access From",
type: "pie",
radius: ["55%", "70%"],
avoidLabelOverlap: false,
label: {
show: true,
// position: "center",
},
itemStyle: {
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: ratedata1,
},
],
}
myChart63.setOption(option63)
var option64 = {
tooltip: {
trigger: "item",
show: false,
showContent: true,
},
// legend: {
// top: "5%",
// left: "center",
// itemStyle: {
// tooltip: true,
// },
// },
series: [
{
// name: "Access From",
type: "pie",
radius: ["55%", "70%"],
avoidLabelOverlap: false,
label: {
show: true,
// position: "center",
},
itemStyle: {
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: ratedata2,
},
],
}
myChart64.setOption(option64)
var option65 = {
tooltip: {
trigger: "item",
show: false,
showContent: true,
},
// legend: {
// top: "5%",
// left: "center",
// itemStyle: {
// tooltip: true,
// },
// },
series: [
{
// name: "Access From",
type: "pie",
radius: ["55%", "70%"],
avoidLabelOverlap: false,
label: {
show: true,
// position: "center",
},
itemStyle: {
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: ratedata3,
},
],
}
myChart65.setOption(option65)
})

View File

@@ -0,0 +1,73 @@
.nongcun {
position: absolute;
top: 73px;
left: 20px;
height: 720px;
visibility: hidden;
background: #ffffff;
width: 83.5%;
padding: 10px 20px;
h3 {
text-align: left;
padding: 10px 20px;
padding-left: 20px;
border-bottom: 1px solid #e1e1e1;
}
b {
margin: 0 10px;
font-size: 18px;
}
.top {
box-shadow: 0 0 1px 1px #e1e1e1;
margin-bottom: 20px;
> .flex {
display: flex;
justify-content: space-between;
align-items: flex-start;
> .left {
width: 40%;
text-align: left;
padding-left: 20px;
padding-top: 10px;
span {
margin-right: 20px;
}
> div {
height: 250px;
}
}
.echart61 {
width: 90%;
height: 250px;
margin: 0 auto;
}
.echart62 {
width: 60%;
height: 250px;
padding-top: 10px;
}
}
}
.bottom {
box-shadow: 0 0 1px 1px #e1e1e1;
padding-bottom: 20px;
.flex {
display: flex;
justify-content: space-around;
> div {
width: 30%;
> :nth-child(1) {
width: 80%;
height: 250px;
margin: 0 auto;
}
> :nth-child(2) {
font-weight: bold;
text-align: center;
}
}
}
}
}