44cfc292 by 任超

style:首页地图

1 parent 235283e5
<template>
<div class="fzqk">
<div class="home-title">
<span class="title-name">发证情况</span>
<span class="title-more">更多>></span>
</div>
<div class="home-content">
<div class="top">
<div class="img">
<img :src="imgSrc" alt="" />
</div>
<div class="word">
<div class="name">发证总量</div>
<div class="num">{{ fzzl }}</div>
<div class="unit"></div>
</div>
</div>
<div class="bottom">
<div class="name">证书</div>
<div class="smallnum">{{ zs }}</div>
<div class="unit"></div>
</div>
<div class="bottom">
<div class="name">证明</div>
<div class="smallnum">{{ zm }}</div>
<div class="unit"></div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "fzqk",
components: {},
data () {
return {
fzzl: 132176,
zs: 54237,
zm: 77939,
imgSrc: require("./images/zs.png"),
};
},
methods: {},
};
</script>
<style scoped lang="scss">
@import "./home.scss";
.fzqk {
width: 100%;
height: 100%;
.top {
width: 100%;
height: 50%;
display: flex;
align-items: center;
.img {
width: 100px;
height: 100px;
img {
width: 80px;
height: 80px;
border-radius: 50%;
background: #0f93f6;
margin: 10px;
}
}
.word {
width: calc(100% - 100px);
height: 80px;
padding-left: 20px;
}
}
.bottom {
width: 50%;
height: 50%;
float: left;
}
.name {
font-size: 16px;
color: #606266;
width: 100%;
height: 40px;
line-height: 40px;
}
.num,
.smallnum {
display: inline-block;
font-size: 30px;
color: #0f93f6;
height: 40px;
line-height: 40px;
}
.smallnum {
font-size: 20px;
}
.unit {
display: inline-block;
font-size: 14px;
color: #606266;
height: 40px;
line-height: 40px;
}
}
</style>
\ No newline at end of file
.home {
background: #dfe7f3;
background: #fff;
height: 100%;
width: 100%;
box-sizing: border-box;
padding: 10px;
display: flex;
justify-content: space-between;
overflow-y: hidden;
&-left,
&-center,
&-right {
width: 32%;
height: 100%;
border-radius: 4px;
}
&-left {
width: 25%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
&-top {
width: 100%;
height: 35%;
background: #fff;
margin-bottom: 15px;
border-radius: 4px;
}
&-bottom {
width: 100%;
height: calc(65% - 15px);
background: #fff;
border-radius: 4px;
}
}
&-center {
width: calc(40% - 30px);
background: #fff;
margin: 0 15px;
}
&-right {
width: 35%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
&-top {
width: 100%;
height: 35%;
background: #fff;
margin-bottom: 15px;
border-radius: 4px;
}
&-bottom {
width: 100%;
height: calc(65% - 15px);
background: #fff;
border-radius: 4px;
}
}
&-title {
width: 100%;
height: 40px;
line-height: 40px;
border-bottom: 1px solid #dfe7f3;
font-size: 16px;
.title-name,
.title-more {
display: inline-block;
height: 24px;
line-height: 24px;
margin-top: 8px;
}
.title-name {
float: left;
margin-left: 20px;
padding-left: 10px;
border-left: 4px solid #0F93F6;
}
.title-more {
display: inline-block;
float: right;
margin-right: 20px;
color: #97a8be;
cursor: pointer;
}
}
&-content {
width: 100%;
height: calc(100% - 41px);
padding: 0 20px 20px 20px;
width: 50%;
padding-top: 25px;
}
}
\ No newline at end of file
......
<template>
<div class="home">
<div class="home-left">
<div class="home-left-top">
<fzqk></fzqk>
</div>
<div class="home-left-bottom">
<wlqk></wlqk>
</div>
</div>
<div class="home-center">
<wgsl></wgsl>
</div>
<div class="home-right">
<div class="home-right-top">
<jgfl></jgfl>
</div>
<div class="home-right-bottom">
<wgzj></wgzj>
</div>
</div>
</div>
</template>
<script>
// 监管首页
import fzqk from "./fzqk.vue";
import wlqk from "./wlqk.vue";
import wgsl from "./wgsl.vue";
import jgfl from "./jgfl.vue";
import wgzj from "./wgzj.vue";
export default {
name: "home",
components: { fzqk, wlqk, wgsl, jgfl, wgzj },
components: { wgsl },
data () {
return {};
},
......
<template>
<div class="jgfl">
<div class="home-title">
<span class="title-name">监管分类</span>
<span class="title-more">更多>></span>
</div>
<div class="home-content">
<div id="jgfl-myChart" class="chart"></div>
</div>
</div>
</template>
<script>
export default {
name: "jgfl",
components: {},
data () {
return {
data: [20118, 416232, 224447, 32, 48842],
};
},
mounted () {
this.echartInit();
},
methods: {
echartInit () {
let _this = this;
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(
document.getElementById("jgfl-myChart")
);
// 绘制图表
myChart.setOption({
title: {
text: "(单位: 件)",
textStyle: {
fontSize: 16,
color: "#606266",
fontWeight: "normal",
},
},
color: "red",
radar: {
indicator: [
{ name: "原则监管", max: 22000 },
{ name: "时效监管", max: 420000 },
{ name: "证书监管", max: 230000 },
{ name: "年限监管", max: 38000 },
{ name: "内容监管", max: 50000 },
],
name: {
color: "#606266",
formatter: function (value, indicator) {
if (value == "原则监管") {
return value + " " + _this.data[0];
} else if (value == "时效监管") {
return value + " " + _this.data[1];
} else if (value == "证书监管") {
return value + " " + _this.data[2];
} else if (value == "年限监管") {
return value + " " + _this.data[3];
} else if (value == "内容监管") {
return value + " " + _this.data[4];
}
},
},
splitLine: {
lineStyle: {
color: "#0F93F6",
},
},
splitArea: {
show: false
}
},
series: [
{
type: "radar",
data: [
{
value: _this.data,
},
],
},
],
});
},
},
};
</script>
<style scoped lang="scss">
@import "./home.scss";
.jgfl {
width: 100%;
height: 100%;
.chart {
width: 100%;
height: calc(100% - 10px);
margin-top: 10px;
}
}
</style>
\ No newline at end of file
<template>
<div class="wgsl">
<div id="wgsl-myChart" class="chart"></div>
<div class="title">陕西省不动产信息接入</div>
<div class="map-box" ref="mapContainProvince" />
</div>
</template>
<script>
// 网络情况
import echarts from "echarts";
export default {
name: "wgsl",
components: {},
data () {
return {};
},
mounted () {
return {
provinceName: "shanxi1",
mapName: "陕西",
listArr: [{
name: '西安市',
value: '6000'
},
{
name: '宝鸡市',
value: '8000'
},
{
name: '咸阳市',
value: '3000'
},
{
name: '铜川市',
value: '7000'
},
{
name: '渭南市',
value: '1000'
},
{
name: '延安市',
value: '2000'
},
{
name: '榆林市',
value: '600'
},
{
name: '汉中市',
value: '3000'
},
{
name: '安康市',
value: '1000'
},
{
name: '商洛市',
value: '1000'
}], //城市json
max: "9000", //最大value值
min: "500", // 最小value值
};
},
methods: {
drawProvinceMap (provinceName, mapName) {
this.provinceName = provinceName;
this.mapName = mapName;
require(`./map/${this.provinceName}.js`);
let _this = this;
let myChart8 = echarts.init(this.$refs.mapContainProvince);
const option = {
visualMap: {
min: _this.min,
max: _this.max,
show: false,
inRange: {
color: ["lightskyblue"],
},
},
tooltip: {
trigger: "item",
formatter: function (params) {
return params.value ? params.name + ':' + params.value + '件' : params.name + ':' + '0件'
},
borderColor: "#CB000C",
borderWidth: "1",
},
series: [
{
type: "map",
map: this.mapName,
itemStyle: {
// normal: { label: { show: true } },
normal: { //正常状态
label: {
show: true,
formatter: '{b}', //地图上显示的数据,分别对应data中的name和value
color: '#fff',
},
areaColor: '#409EFF' //地图区域的颜色
},
emphasis: {
label: { show: true },
areaColor: "#67C23A", //鼠标进入时的颜色
},
},
data: _this.listArr,
},
],
};
myChart8.setOption(option);
},
},
};
mounted () {
this.drawProvinceMap("shanxi1", "陕西");
}
}
</script>
<style scoped lang="scss">
@import "./home.scss";
<style scoped>
.wgsl {
width: 100%;
height: 100%;
}
.chart {
width: 100%;
height: 100%;
background: url("./images/map.png") 50% 50% no-repeat;
}
.title {
text-align: center;
line-height: 36px;
font-size: 26px;
}
.map-box {
display: inline-block;
width: 100%;
height: 80vh;
}
</style>
\ No newline at end of file
</style>
......
<template>
<div class="wgzj">
<div class="home-title">
<span class="title-name">违规总计</span>
<span class="title-more">更多>></span>
</div>
<div class="home-content">
<div class="table-box">
<paging-table v-loading="loading" :data="data" :column="column" :pagination="false"></paging-table>
</div>
</div>
</div>
</template>
<script>
import pagingTable from "@/components/pagingTable/pagingTable.vue";
export default {
name: "wgzj",
components: { pagingTable },
data () {
return {
loading: false,
data: [
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "南郑区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "南郑区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "南郑区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
{
xzq: "汉台区",
yzjg: "4818",
sxjg: "367575",
zsjg: "72920",
nxjg: "3",
nrjg: "3082",
zj: "448398",
},
],
column: [
{
prop: "xzq",
label: "行政区/监管(件)",
},
{
prop: "yzjg",
label: "原则监管",
width: 60,
},
{
prop: "sxjg",
label: "时效监管",
},
{
prop: "zsjg",
label: "证书监管",
width: 60,
},
{
prop: "nxjg",
label: "年限监管",
width: 60,
},
{
prop: "nrjg",
label: "内容监管",
width: 60,
},
{
prop: "zj",
label: "总计",
},
],
};
},
methods: {},
};
</script>
<style scoped lang="scss">
@import "./home.scss";
.wgzj {
width: 100%;
height: 100%;
.table-box {
height: calc(100% - 20px);
overflow-y: scroll;
margin-top: 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="wlqk">
<div id="wlqk-myChart" class="chart"></div>
</div>
</template>
<script>
// 网络情况
export default {
name: "wlqk",
components: {},
data () {
return {
xAxisData: [],
wldkData: [],
wlzcData: [],
};
},
mounted () {
this.echartInit();
},
methods: {
echartInit () {
let _this = this;
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(
document.getElementById("wlqk-myChart")
);
// 绘制图表
myChart.setOption({
color: ["#ee9096", "#8fb657"],
legend: {
data: ["网络断开", "网络正常"],
top: 20,
},
xAxis: [
{
type: "category",
data: _this.xAxisData,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
name: "网络断开",
type: "bar",
data: _this.wldkData,
},
{
name: "网络正常",
type: "bar",
data: _this.wlzcData,
},
],
});
},
},
};
</script>
<style scoped lang="scss">
@import "./home.scss";
.wlqk {
width: 100%;
height: 100%;
.chart {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file