This commit is contained in:
unknown 2023-12-04 09:27:02 +08:00
parent 787023b2bd
commit 46c36491af
68 changed files with 135923 additions and 796 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -47,17 +47,6 @@
</div>
<div class="ynl">
<p class="title">用能量</p>
<!-- <ul class="typeBox">
<li :class="type == '电' ? 'active' : ''" @click="type = '电'">
</li>
<li :class="type == '水' ? 'active' : ''" @click="type = '水'">
</li>
<li :class="type == '蒸汽' ? 'active' : ''" @click="type = '蒸汽'">
蒸汽
</li>
</ul> -->
<div id="ynl"></div>
</div>
</div>
@ -130,6 +119,24 @@
</div>
</div>
<div id="map"></div>
<div class="tooltip">
<img src="../assets/客户侧总体用能情况分析/Vector.png" alt="" />
<div class="title1">碳排放监测数据总览</div>
<div class="txt">
<div class="one">
<span>接入用户数:</span>
<p style="color: #d9e363">
300<span style="color: #d9e363"></span>
</p>
</div>
<div class="two">
<span>碳排放总量:</span>
<p style="color: #44bfd6">
450<span style="color: #44bfd6">万千瓦时</span>
</p>
</div>
</div>
</div>
<div class="footer">
<div class="qyhyfb">
<p class="title">企业行业分布</p>
@ -1244,6 +1251,264 @@ export default {
};
this.defineEcharts("qyhyfb", option);
},
initMap() {
//
var data = [
{
name: "济南市",
value: 1,
coord: [117.000923, 36.675807],
},
{
name: "青岛市",
value: 2,
coord: [120.382639, 36.067082],
},
{
name: "淄博市",
value: 3,
coord: [118.059134, 36.804685],
},
{
name: "枣庄市",
value: 4,
coord: [117.557964, 34.856424],
},
{
name: "东营市",
value: 5,
coord: [118.674767, 37.434751],
},
{
name: "烟台市",
value: 6,
coord: [121.447935, 37.463822],
},
{
name: "潍坊市",
value: 7,
coord: [119.161756, 36.706774],
},
{
name: "济宁市",
value: 8,
coord: [116.587245, 35.415393],
},
{
name: "泰安市",
value: 9,
coord: [117.089415, 36.188078],
},
{
name: "威海市",
value: 10,
coord: [122.120419, 37.513068],
},
{
name: "日照市",
value: 11,
coord: [119.526888, 35.416377],
},
{
name: "临沂市",
value: 12,
coord: [118.356448, 35.104672],
},
{
name: "德州市",
value: 13,
coord: [116.357465, 37.434093],
},
{
name: "聊城市",
value: 14,
coord: [115.986869, 36.455829],
},
{
name: "滨州市",
value: 15,
coord: [118.016974, 37.383542],
},
{
name: "菏泽市",
value: 16,
coord: [115.469381, 35.246531],
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, { renderer: "webgl" });
window.addEventListener("resize", function () {
myChart.resize();
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
// show: false,
},
name: "山东",
type: "map",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
aspectScale: 0.9, //
emphasis: {
itemStyle: {
areaColor: "#70EAF4", //
borderWidth: 2, //
},
label: {
fontSize: 12, //
color: "#fff",
},
},
label: {
show: true, //
formatter: function (params) {
var name = params.name;
var value = params.value;
var text = ` {fline|${value}}\n{tline|${name}} `;
return text;
},
textStyle: {
color: "#000", //
fontSize: 16, //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: 14,
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: 12,
},
},
},
itemStyle: {
opacity: 0.8, //
borderWidth: 2, //线
borderColor: "#0699E4", //线
areaColor: {
x: 0.5,
y: 0.7,
r: 0.5,
colorStops: [
{
offset: 0,
color: "rgba(20,110,230,0.4)",
},
{
offset: 1,
color: "rgba(6,33,121,0.4)",
},
],
global: false, // false
},
},
groundplane: {
show: true,
},
data: data,
z: 999,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "rgb(0, 102, 204)", //
textureTiling: 0, // 1
roughness: 0.8, //
metalness: 0.0, // 0.0
roughnessAdjust: 0,
},
viewControl: {
distance: 90, //
rotateSensitivity: 0, //
zoomSensitivity: 1.5, //
},
zoom: 1.25,
},
],
animation: true,
};
myChart.setOption(option);
myChart.on("click", chartClick);
//
function chartClick(param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
// var selectedPro = param.name;
// if (!cityProper[selectedPro]) {
// option.series.splice(1);
// option.legend = null;
// option.visualMap = null;
// myChart.setOption(option, true);
// return;
// }
//
// $.get(cityProper[selectedPro], function (geojson) {
// echarts.registerMap(selectedPro, geojson);
// //series[0][1],lefttop
// option.series[0] = {
// name: "",
// type: "map",
// map: selectedPro,
// boxDepth: 80, //
// regionHeight: 5, //
// itemStyle: {
// normal: {
// label: {
// show: true,
// },
// },
// emphasis: {
// label: {
// show: true,
// },
// },
// },
// groundplane: {
// show: false,
// },
// data: data,
// shading: "realistic",
// // shading: 'realistic'
// realisticMaterial: {
// detailTexture: "#fff", //
// textureTiling: 1, // 1
// roughness: 0, // 01
// metalness: 0, // 0 1
// roughnessAdjust: 0,
// },
// viewControl: {
// distance: 30, //
// rotateSensitivity: 1, //
// zoomSensitivity: 1, //
// },
// };
// myChart.setOption(option);
// });
}
}
);
},
nyxhqk() {
var attaData1 = [62, 52, 34, 61, 75, 140];
var attaData2 = [162, 152, 134, 161, 115, 150];
@ -1260,7 +1525,7 @@ export default {
},
legend: {
left: "center",
top:40,
top: 40,
data: [
{
name: "2020",
@ -1375,263 +1640,7 @@ export default {
this.defineEcharts("sh", this.circles5);
this.defineEcharts("hg", this.circles6);
this.nyxhqk();
var data = [
{
name: "南京市",
value: 1,
},
{
name: "济南市",
value: 2,
},
{
name: "徐州市",
value: 3,
},
{
name: "常州市",
value: 4,
},
{
name: "苏州市",
value: 5,
},
{
name: "南通市",
value: 6,
},
{
name: "连云港市",
value: 7,
},
{
name: "淮安市",
value: 8,
},
{
name: "盐城市",
value: 9,
},
{
name: "扬州市",
value: 10,
},
{
name: "镇江市",
value: 11,
},
{
name: "泰州市",
value: 12,
},
{
name: "宿迁市",
value: 13,
},
];
var splitList = [
{
start: 1,
end: 1,
label: "济南市",
color: "#236da8",
},
{
start: 2,
end: 2,
label: "无锡市",
color: "#2884db",
},
{
start: 3,
end: 3,
label: "徐州市",
color: "#244779",
},
{
start: 4,
end: 4,
label: "常州市",
color: "#246198",
},
{
start: 5,
end: 5,
label: "苏州市",
color: "#2884db",
},
{
start: 6,
end: 6,
label: "南通市",
color: "#2884db",
},
{
start: 7,
end: 7,
label: "连云港市",
color: "#244779",
},
{
start: 8,
end: 8,
label: "淮安市",
color: "#244779",
},
{
start: 9,
end: 9,
label: "盐城市",
color: "#244779",
},
{
start: 10,
end: 10,
label: "扬州市",
color: "#246198",
},
{
start: 11,
end: 11,
label: "镇江市",
color: "#2884db",
},
{
start: 12,
end: 12,
label: "泰州市",
color: "#2884db",
},
{
start: 13,
end: 13,
label: "宿迁市",
color: "#244779",
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, {
devicePixelRatio: 10, // 2
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
},
name: "山东",
type: "map3D",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
label: {
show: true, //
textStyle: {
color: "#fff", //
fontSize: 12, //
fontFamily: "微软雅黑",
backgroundColor: "rgba(0,0,0,0)", //0
},
},
itemStyle: {
opacity: 1, //
borderWidth: 1.5, //线
borderColor: "#0699E4", //线
},
groundplane: {
show: true,
},
data: data,
//shading: 'realistic',
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#093099", //
textureTiling: 0, // 1
roughness: 0, // 01
metalness: 1, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 80, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
},
],
dataRange: {
show: false,
splitList: splitList,
},
animation: true,
};
myChart.setOption(option);
myChart.on("click", this.chartClick);
let chartClick = function (param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
var selectedPro = param.name;
if (!cityProper[selectedPro]) {
option.series.splice(1);
option.legend = null;
option.visualMap = null;
myChart.setOption(option, true);
return;
}
//
$.get(cityProper[selectedPro], function (geojson) {
echarts.registerMap(selectedPro, geojson);
//series[0][1],lefttop
option.series[0] = {
name: "",
type: "map",
map: selectedPro,
boxDepth: 80, //
regionHeight: 5, //
itemStyle: {
normal: {
label: {
show: true,
},
},
emphasis: {
label: {
show: true,
},
},
},
groundplane: {
show: false,
},
data: data,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#fff", //
textureTiling: 1, // 1
roughness: 0, // 01
metalness: 0, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 100, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
};
myChart.setOption(option);
});
};
}
);
this.initMap();
},
beforeDestroy() {
//
@ -2231,6 +2240,74 @@ export default {
transform: translateX(-50%);
overflow: hidden;
}
.tooltip {
position: absolute;
width: 281px;
height: 170px;
background: url("../assets/客户侧总体用能情况分析/组 3123.png");
background-size: cover;
z-index: 1;
top: 418px;
right: 542px;
padding: 14px;
box-sizing: border-box;
padding-top: 36px;
img {
position: absolute;
width: 11px;
height: 11px;
top: 42px;
right: 14px;
cursor: pointer;
margin-right: 14px;
}
.title1 {
height: 27px;
font-size: 22px;
font-family: "YouSheBiaoTiHei";
font-weight: 400;
color: #60edff;
line-height: 25px;
margin-bottom: 10px;
}
.txt {
display: flex;
flex-direction: column;
width: 100%;
font-family: "AlibabaPuHuiTi";
div {
display: flex;
align-items: center;
margin: 10px;
margin-left: 0;
span:nth-of-type(1) {
width: 89px;
height: 21px;
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 0.87);
line-height: 20px;
}
p {
width: 143px;
height: 21px;
font-size: 30px;
font-weight: 700;
line-height: 20px;
span {
margin-left: 10px;
}
}
}
}
}
}
}
</style>

View File

@ -1010,7 +1010,7 @@ export default {
subtext: "工业",
text: "85.2%",
left: "48",
align:"center",
align: "center",
top: "40%",
// padding: [10, 0],
textStyle: {
@ -1127,7 +1127,7 @@ export default {
text: "85.2%",
left: "48",
top: "40%",
align:"center",
align: "center",
padding: [10, 0],
textStyle: {
color: "#fff",
@ -1207,6 +1207,265 @@ export default {
};
this.defineEcharts("xuefeng", option);
},
//
initMap() {
//
var data = [
{
name: "济南市",
value: 1,
coord: [117.000923, 36.675807],
},
{
name: "青岛市",
value: 2,
coord: [120.382639, 36.067082],
},
{
name: "淄博市",
value: 3,
coord: [118.059134, 36.804685],
},
{
name: "枣庄市",
value: 4,
coord: [117.557964, 34.856424],
},
{
name: "东营市",
value: 5,
coord: [118.674767, 37.434751],
},
{
name: "烟台市",
value: 6,
coord: [121.447935, 37.463822],
},
{
name: "潍坊市",
value: 7,
coord: [119.161756, 36.706774],
},
{
name: "济宁市",
value: 8,
coord: [116.587245, 35.415393],
},
{
name: "泰安市",
value: 9,
coord: [117.089415, 36.188078],
},
{
name: "威海市",
value: 10,
coord: [122.120419, 37.513068],
},
{
name: "日照市",
value: 11,
coord: [119.526888, 35.416377],
},
{
name: "临沂市",
value: 12,
coord: [118.356448, 35.104672],
},
{
name: "德州市",
value: 13,
coord: [116.357465, 37.434093],
},
{
name: "聊城市",
value: 14,
coord: [115.986869, 36.455829],
},
{
name: "滨州市",
value: 15,
coord: [118.016974, 37.383542],
},
{
name: "菏泽市",
value: 16,
coord: [115.469381, 35.246531],
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, { renderer: "webgl" });
window.addEventListener("resize", function () {
myChart.resize();
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
// show: false,
},
name: "山东",
type: "map",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
aspectScale: 0.9, //
emphasis: {
itemStyle: {
areaColor: "#70EAF4", //
borderWidth: 2, //
},
label: {
fontSize: 12, //
color: "#fff",
},
},
label: {
show: true, //
formatter: function (params) {
var name = params.name;
var value = params.value;
var text = ` {fline|${value}}\n{tline|${name}} `;
return text;
},
textStyle: {
color: "#000", //
fontSize: 16, //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: 14,
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: 12,
},
},
},
itemStyle: {
opacity: 0.8, //
borderWidth: 2, //线
borderColor: "#0699E4", //线
areaColor: {
x: 0.5,
y: 0.7,
r: 0.5,
colorStops: [
{
offset: 0,
color: "rgba(20,110,230,0.4)",
},
{
offset: 1,
color: "rgba(6,33,121,0.4)",
},
],
global: false, // false
},
},
groundplane: {
show: true,
},
data: data,
z: 999,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "rgb(0, 102, 204)", //
textureTiling: 0, // 1
roughness: 0.8, //
metalness: 0.0, // 0.0
roughnessAdjust: 0,
},
viewControl: {
distance: 90, //
rotateSensitivity: 0, //
zoomSensitivity: 1.5, //
},
zoom: 1.25,
},
],
animation: true,
};
myChart.setOption(option);
myChart.on("click", chartClick);
//
function chartClick(param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
// var selectedPro = param.name;
// if (!cityProper[selectedPro]) {
// option.series.splice(1);
// option.legend = null;
// option.visualMap = null;
// myChart.setOption(option, true);
// return;
// }
//
// $.get(cityProper[selectedPro], function (geojson) {
// echarts.registerMap(selectedPro, geojson);
// //series[0][1],lefttop
// option.series[0] = {
// name: "",
// type: "map",
// map: selectedPro,
// boxDepth: 80, //
// regionHeight: 5, //
// itemStyle: {
// normal: {
// label: {
// show: true,
// },
// },
// emphasis: {
// label: {
// show: true,
// },
// },
// },
// groundplane: {
// show: false,
// },
// data: data,
// shading: "realistic",
// // shading: 'realistic'
// realisticMaterial: {
// detailTexture: "#fff", //
// textureTiling: 1, // 1
// roughness: 0, // 01
// metalness: 0, // 0 1
// roughnessAdjust: 0,
// },
// viewControl: {
// distance: 30, //
// rotateSensitivity: 1, //
// zoomSensitivity: 1, //
// },
// };
// myChart.setOption(option);
// });
}
}
);
},
},
mounted() {
this.defineEcharts("ndqylfb", this.option1);
@ -1215,263 +1474,7 @@ export default {
this.defineEcharts("pcfxb", this.option4);
this.gongye();
this.xuefeng();
var data = [
{
name: "南京市",
value: 1,
},
{
name: "济南市",
value: 2,
},
{
name: "徐州市",
value: 3,
},
{
name: "常州市",
value: 4,
},
{
name: "苏州市",
value: 5,
},
{
name: "南通市",
value: 6,
},
{
name: "连云港市",
value: 7,
},
{
name: "淮安市",
value: 8,
},
{
name: "盐城市",
value: 9,
},
{
name: "扬州市",
value: 10,
},
{
name: "镇江市",
value: 11,
},
{
name: "泰州市",
value: 12,
},
{
name: "宿迁市",
value: 13,
},
];
var splitList = [
{
start: 1,
end: 1,
label: "济南市",
color: "#236da8",
},
{
start: 2,
end: 2,
label: "无锡市",
color: "#2884db",
},
{
start: 3,
end: 3,
label: "徐州市",
color: "#244779",
},
{
start: 4,
end: 4,
label: "常州市",
color: "#246198",
},
{
start: 5,
end: 5,
label: "苏州市",
color: "#2884db",
},
{
start: 6,
end: 6,
label: "南通市",
color: "#2884db",
},
{
start: 7,
end: 7,
label: "连云港市",
color: "#244779",
},
{
start: 8,
end: 8,
label: "淮安市",
color: "#244779",
},
{
start: 9,
end: 9,
label: "盐城市",
color: "#244779",
},
{
start: 10,
end: 10,
label: "扬州市",
color: "#246198",
},
{
start: 11,
end: 11,
label: "镇江市",
color: "#2884db",
},
{
start: 12,
end: 12,
label: "泰州市",
color: "#2884db",
},
{
start: 13,
end: 13,
label: "宿迁市",
color: "#244779",
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, {
devicePixelRatio: 10, // 2
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
},
name: "山东",
type: "map3D",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
label: {
show: true, //
textStyle: {
color: "#fff", //
fontSize: 12, //
fontFamily: "微软雅黑",
backgroundColor: "rgba(0,0,0,0)", //0
},
},
itemStyle: {
opacity: 1, //
borderWidth: 1.5, //线
borderColor: "#0699E4", //线
},
groundplane: {
show: true,
},
data: data,
//shading: 'realistic',
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#093099", //
textureTiling: 0, // 1
roughness: 0, // 01
metalness: 1, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 80, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
},
],
dataRange: {
show: false,
splitList: splitList,
},
animation: true,
};
myChart.setOption(option);
myChart.on("click", this.chartClick);
let chartClick = function (param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
var selectedPro = param.name;
if (!cityProper[selectedPro]) {
option.series.splice(1);
option.legend = null;
option.visualMap = null;
myChart.setOption(option, true);
return;
}
//
$.get(cityProper[selectedPro], function (geojson) {
echarts.registerMap(selectedPro, geojson);
//series[0][1],lefttop
option.series[0] = {
name: "",
type: "map",
map: selectedPro,
boxDepth: 80, //
regionHeight: 5, //
itemStyle: {
normal: {
label: {
show: true,
},
},
emphasis: {
label: {
show: true,
},
},
},
groundplane: {
show: false,
},
data: data,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#fff", //
textureTiling: 1, // 1
roughness: 0, // 01
metalness: 0, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 100, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
};
myChart.setOption(option);
});
};
}
);
this.initMap();
},
beforeDestroy() {
//
@ -2069,7 +2072,7 @@ export default {
.title {
position: absolute;
left: 50%;
width: 144px;
width: 1.2rem;
height: 36px;
font-size: 18px;
font-family: "Source Han Sans";
@ -2129,15 +2132,14 @@ export default {
}
}
}
#map {
width: 994px;
position: absolute;
height: 627px;
left: 50%;
transform: translateX(-50%);
overflow: hidden;
}
}
#map {
width: 994px;
position: absolute;
height: 627px;
left: 50%;
transform: translateX(-50%);
overflow: hidden;
}
}
</style>

View File

@ -120,6 +120,11 @@
</div>
</div>
<div id="map"></div>
<div class="tooltip">
<p class="first">山东省</p>
<p class="second">8000<sapn class="danwei1"></sapn></p>
<p class="thrid">7895<span class="danwei2">kwh)</span></p>
</div>
<div class="footer">
<div class="ndqylfb">
<p class="title">年度签约量分布</p>
@ -669,7 +674,7 @@ export default {
shadowBlur: 20,
},
},
data: [300, 400, 200, 250, 320, 180, 190, 400, 160, 300, 480,300],
data: [300, 400, 200, 250, 320, 180, 190, 400, 160, 300, 480, 300],
},
],
};
@ -1055,6 +1060,264 @@ export default {
};
this.defineEcharts("yhhyzb", option);
},
initMap() {
//
var data = [
{
name: "济南市",
value: 1,
coord: [117.000923, 36.675807],
},
{
name: "青岛市",
value: 2,
coord: [120.382639, 36.067082],
},
{
name: "淄博市",
value: 3,
coord: [118.059134, 36.804685],
},
{
name: "枣庄市",
value: 4,
coord: [117.557964, 34.856424],
},
{
name: "东营市",
value: 5,
coord: [118.674767, 37.434751],
},
{
name: "烟台市",
value: 6,
coord: [121.447935, 37.463822],
},
{
name: "潍坊市",
value: 7,
coord: [119.161756, 36.706774],
},
{
name: "济宁市",
value: 8,
coord: [116.587245, 35.415393],
},
{
name: "泰安市",
value: 9,
coord: [117.089415, 36.188078],
},
{
name: "威海市",
value: 10,
coord: [122.120419, 37.513068],
},
{
name: "日照市",
value: 11,
coord: [119.526888, 35.416377],
},
{
name: "临沂市",
value: 12,
coord: [118.356448, 35.104672],
},
{
name: "德州市",
value: 13,
coord: [116.357465, 37.434093],
},
{
name: "聊城市",
value: 14,
coord: [115.986869, 36.455829],
},
{
name: "滨州市",
value: 15,
coord: [118.016974, 37.383542],
},
{
name: "菏泽市",
value: 16,
coord: [115.469381, 35.246531],
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, { renderer: "webgl" });
window.addEventListener("resize", function () {
myChart.resize();
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
// show: false,
},
name: "山东",
type: "map",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
aspectScale: 0.9, //
emphasis: {
itemStyle: {
areaColor: "#70EAF4", //
borderWidth: 2, //
},
label: {
fontSize: 12, //
color: "#fff",
},
},
label: {
show: true, //
formatter: function (params) {
var name = params.name;
var value = params.value;
var text = ` {fline|${value}}\n{tline|${name}} `;
return text;
},
textStyle: {
color: "#000", //
fontSize: 16, //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: 14,
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: 12,
},
},
},
itemStyle: {
opacity: 0.8, //
borderWidth: 2, //线
borderColor: "#0699E4", //线
areaColor: {
x: 0.5,
y: 0.7,
r: 0.5,
colorStops: [
{
offset: 0,
color: "rgba(20,110,230,0.4)",
},
{
offset: 1,
color: "rgba(6,33,121,0.4)",
},
],
global: false, // false
},
},
groundplane: {
show: true,
},
data: data,
z: 999,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "rgb(0, 102, 204)", //
textureTiling: 0, // 1
roughness: 0.8, //
metalness: 0.0, // 0.0
roughnessAdjust: 0,
},
viewControl: {
distance: 90, //
rotateSensitivity: 0, //
zoomSensitivity: 1.5, //
},
zoom: 1.25,
},
],
animation: true,
};
myChart.setOption(option);
myChart.on("click", chartClick);
//
function chartClick(param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
// var selectedPro = param.name;
// if (!cityProper[selectedPro]) {
// option.series.splice(1);
// option.legend = null;
// option.visualMap = null;
// myChart.setOption(option, true);
// return;
// }
//
// $.get(cityProper[selectedPro], function (geojson) {
// echarts.registerMap(selectedPro, geojson);
// //series[0][1],lefttop
// option.series[0] = {
// name: "",
// type: "map",
// map: selectedPro,
// boxDepth: 80, //
// regionHeight: 5, //
// itemStyle: {
// normal: {
// label: {
// show: true,
// },
// },
// emphasis: {
// label: {
// show: true,
// },
// },
// },
// groundplane: {
// show: false,
// },
// data: data,
// shading: "realistic",
// // shading: 'realistic'
// realisticMaterial: {
// detailTexture: "#fff", //
// textureTiling: 1, // 1
// roughness: 0, // 01
// metalness: 0, // 0 1
// roughnessAdjust: 0,
// },
// viewControl: {
// distance: 30, //
// rotateSensitivity: 1, //
// zoomSensitivity: 1, //
// },
// };
// myChart.setOption(option);
// });
}
}
);
},
},
mounted() {
this.defineEcharts("ndqylfb", this.option);
@ -1063,263 +1326,7 @@ export default {
this.pcfx();
this.yhhyzb();
this.ndsdl();
var data = [
{
name: "南京市",
value: 1,
},
{
name: "济南市",
value: 2,
},
{
name: "徐州市",
value: 3,
},
{
name: "常州市",
value: 4,
},
{
name: "苏州市",
value: 5,
},
{
name: "南通市",
value: 6,
},
{
name: "连云港市",
value: 7,
},
{
name: "淮安市",
value: 8,
},
{
name: "盐城市",
value: 9,
},
{
name: "扬州市",
value: 10,
},
{
name: "镇江市",
value: 11,
},
{
name: "泰州市",
value: 12,
},
{
name: "宿迁市",
value: 13,
},
];
var splitList = [
{
start: 1,
end: 1,
label: "济南市",
color: "#236da8",
},
{
start: 2,
end: 2,
label: "无锡市",
color: "#2884db",
},
{
start: 3,
end: 3,
label: "徐州市",
color: "#244779",
},
{
start: 4,
end: 4,
label: "常州市",
color: "#246198",
},
{
start: 5,
end: 5,
label: "苏州市",
color: "#2884db",
},
{
start: 6,
end: 6,
label: "南通市",
color: "#2884db",
},
{
start: 7,
end: 7,
label: "连云港市",
color: "#244779",
},
{
start: 8,
end: 8,
label: "淮安市",
color: "#244779",
},
{
start: 9,
end: 9,
label: "盐城市",
color: "#244779",
},
{
start: 10,
end: 10,
label: "扬州市",
color: "#246198",
},
{
start: 11,
end: 11,
label: "镇江市",
color: "#2884db",
},
{
start: 12,
end: 12,
label: "泰州市",
color: "#2884db",
},
{
start: 13,
end: 13,
label: "宿迁市",
color: "#244779",
},
];
var chartDom = document.getElementById("map");
var myChart = this.$echarts.init(chartDom, null, {
devicePixelRatio: 10, // 2
});
//
$.get(
"https://geo.datav.aliyun.com/areas_v3/bound/370000_full.json",
function (geojson) {
echarts.registerMap("山东", geojson);
let option = {
series: [
{
tooltip: {
trigger: "item",
},
name: "山东",
type: "map3D",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
label: {
show: true, //
textStyle: {
color: "#fff", //
fontSize: 12, //
fontFamily: "微软雅黑",
backgroundColor: "rgba(0,0,0,0)", //0
},
},
itemStyle: {
opacity: 1, //
borderWidth: 1.5, //线
borderColor: "#0699E4", //线
},
groundplane: {
show: true,
},
data: data,
//shading: 'realistic',
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#093099", //
textureTiling: 0, // 1
roughness: 0, // 01
metalness: 1, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 80, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
},
],
dataRange: {
show: false,
splitList: splitList,
},
animation: true,
};
myChart.setOption(option);
myChart.on("click", this.chartClick);
let chartClick = function (param) {
console.log(param);
myChart.setOption(option, false);
window.addEventListener("resize", function () {
myChart.resize();
});
var selectedPro = param.name;
if (!cityProper[selectedPro]) {
option.series.splice(1);
option.legend = null;
option.visualMap = null;
myChart.setOption(option, true);
return;
}
//
$.get(cityProper[selectedPro], function (geojson) {
echarts.registerMap(selectedPro, geojson);
//series[0][1],lefttop
option.series[0] = {
name: "",
type: "map",
map: selectedPro,
boxDepth: 80, //
regionHeight: 5, //
itemStyle: {
normal: {
label: {
show: true,
},
},
emphasis: {
label: {
show: true,
},
},
},
groundplane: {
show: false,
},
data: data,
shading: "realistic",
// shading: 'realistic'
realisticMaterial: {
detailTexture: "#fff", //
textureTiling: 1, // 1
roughness: 0, // 01
metalness: 0, // 0 1
roughnessAdjust: 0,
},
viewControl: {
distance: 100, //
rotateSensitivity: 1, //
zoomSensitivity: 1, //
},
};
myChart.setOption(option);
});
};
}
);
this.initMap();
},
beforeDestroy() {
//
@ -1965,6 +1972,60 @@ export default {
transform: translateX(-50%);
overflow: hidden;
}
.tooltip {
position: absolute;
width: 0.927083rem /* 178/192 */;
// width: 178px;
height: 193px;
background: url("../assets/zhsdy/10.png");
background-size: cover;
z-index: 1;
top: 400px;
right: 480px;
padding: 14px;
box-sizing: border-box;
padding-top: 16px;
text-align: center;
p.first {
width: 60px;
height: 36px;
font-size: 20px;
font-weight: 700;
padding-left: 30px;
color: #ffffff;
line-height: 36px;
}
p.second {
width:118px;
height: 36px;
padding-left: 15px;
font-size: 30px;
font-weight: 700;
color: #f1db50;
line-height: 36px;
.danwei1 {
margin-left: 3px;
color: #fff;
font-size: 14px;
font-weight: 400;
}
}
p.thrid {
width: 137px;
height: 36px;
padding-left: 20px;
font-size: 30px;
font-weight: 700;
color: #59f1fc;
line-height: 36px;
span.danwei2 {
margin-left: 3px;
color: #fff;
font-size: 14px;
font-weight: 400;
}
}
}
}
}
</style>