This commit is contained in:
lll 2023-12-04 14:49:57 +08:00
parent 687cf494d3
commit dc8d3c20d1
6 changed files with 671 additions and 681 deletions

View File

@ -26,7 +26,7 @@ const routes = [
];
const router = new VueRouter({
mode: "history",
mode: "hash",
base: process.env.BASE_URL,
routes,
});

View File

@ -561,26 +561,20 @@ export default {
) {
//
let midRatio = (startRatio + endRatio) / 2;
let startRadian = startRatio * Math.PI * 2;
let endRadian = endRatio * Math.PI * 2;
let midRadian = midRatio * Math.PI * 2;
//
if (startRatio === 0 && endRatio === 1) {
isSelected = false;
}
// / k 1/3
k = typeof k !== "undefined" ? k : 1 / 3;
// x y 0
let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;
// 1
let hoverRate = isHovered ? 1.05 : 1;
//
return {
u: {
@ -588,13 +582,11 @@ export default {
max: Math.PI * 3,
step: Math.PI / 32,
},
v: {
min: 0,
max: Math.PI * 2,
step: Math.PI / 20,
},
x: function (u, v) {
if (u < startRadian) {
return (
@ -884,6 +876,7 @@ export default {
};
this.defineEcharts("ynflzb", option);
},
//
initMap() {
//
var data = [
@ -974,174 +967,173 @@ export default {
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,
},
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
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: "0.06rem", //
color: "#fff",
},
name: "山东",
type: "map",
map: "山东",
boxDepth: 60, //
regionHeight: 6, //
aspectScale: 0.9, //
emphasis: {
itemStyle: {
areaColor: "#70EAF4", //
borderWidth: 2, //
},
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: "0.08rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: "0.07rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: "0.06rem",
},
},
fontSize: "0.06rem", //
color: "#fff",
},
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,
};
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: "0.08rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: "0.07rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: "0.06rem",
},
},
},
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);
// });
}
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);
// });
}
);
}
registerMap();
},
//
initfbqk() {
@ -1490,9 +1482,7 @@ export default {
background: url("../assets/客户侧总体用能情况分析/用能量-框.png");
background-size: cover;
margin-top: 6px;
position: relative;
.title {
position: absolute;
left: 190px;
@ -1690,6 +1680,7 @@ export default {
width: 100%;
height: 100%;
position: relative;
background: url();
display: flex;
flex-direction: column;
align-items: center;
@ -1708,8 +1699,8 @@ export default {
}
#yhzyfbqk {
width: 100%;
height: 100%;
width: 994px;
height: 324px;
}
}
}

View File

@ -790,7 +790,7 @@ export default {
fontWeight: "normal",
// .0625rem /* 12/192 */
// fontSize: fontSizeRem(12),
fontSize:"0.0625rem",
fontSize: "0.0625rem",
color: "#fff",
},
},
@ -1392,178 +1392,178 @@ export default {
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: {
// .0625rem /* 12/192 */
// fontSize: 12, //
fontSize: "0.0625rem", //
color: "#fff",
},
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
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: {
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, //
fontSize:"0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
// fontSize: 14,
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
// fontSize: 12,
fontSize: "0.0625rem",
},
},
// .0625rem /* 12/192 */
// fontSize: 12, //
fontSize: "0.0625rem", //
color: "#fff",
},
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,
};
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, //
fontSize: "0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
// fontSize: 14,
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
// fontSize: 12,
fontSize: "0.0625rem",
},
},
},
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);
// });
}
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);
// });
}
);
}
registerMap();
},
nyxhqk() {
var attaData1 = [62, 52, 34, 61, 75, 140];

View File

@ -17,28 +17,28 @@
<div class="bottom">
<div class="bottomBox">
<img src="../assets/客户侧总体用能情况分析/图标.png" alt="" />
<div>
<div class="box1">
<p>用电量(MWH)</p>
<p><span>84.00</span><span>-13.20%</span></p>
</div>
</div>
<div class="bottomBox">
<img src="../assets/客户侧总体用能情况分析/图标(1).png" alt="" />
<div>
<div class="box1">
<p>用蒸汽量(m2)</p>
<p><span>45.32</span><span>-23.20%</span></p>
</div>
</div>
<div class="bottomBox">
<img src="../assets/客户侧总体用能情况分析/组 3125.png" alt="" />
<div>
<div class="box1">
<p>用水量(m2)</p>
<p><span>56.00</span><span>-33.20%</span></p>
</div>
</div>
<div class="bottomBox">
<img src="../assets/客户侧总体用能情况分析/组 3124.png" alt="" />
<div>
<div class="box1">
<p>用汽量(m2)</p>
<p><span>37.00</span><span>43.20%</span></p>
</div>
@ -180,7 +180,7 @@ export default {
borderWidth: 2, //
},
label: {
fontSize: 12, //
fontSize: "0.06rem", //
color: "#fff",
},
},
@ -194,7 +194,7 @@ export default {
},
textStyle: {
color: "#000", //
fontSize: 16, //
fontSize: "0.08rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
@ -205,13 +205,13 @@ export default {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: 14,
fontSize: "0.07rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: 12,
fontSize: "0.06rem",
},
},
},
@ -444,17 +444,18 @@ export default {
width: 72px;
height: 72px;
}
div {
.box1 {
display: flex;
flex-direction: column;
height: 72px;
p:nth-of-type(1) {
width: 120px;
margin-bottom: 10px;
margin-top: 5px;
font-size: 14px;
font-family: " AlibabaPuHuiTi";
font-family: "AlibabaPuHuiTi";
font-weight: 400;
}
span:nth-of-type(1) {
font-size: 20px;
font-family: "AlibabaPuHuiTi";

View File

@ -1298,173 +1298,172 @@ export default {
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: "0.0625rem", //
color: "#fff",
},
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
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: {
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: "0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: "0.0625rem",
},
},
fontSize: "0.0625rem", //
color: "#fff",
},
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,
};
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: "0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: "0.0625rem",
},
},
},
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);
// });
}
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);
// });
}
);
}
registerMap();
},
},
mounted() {

View File

@ -1160,177 +1160,176 @@ export default {
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, //
fontSize: "0.0625rem", //
color: "#fff",
},
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
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: {
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, //
fontSize: "0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
// fontSize: 14,
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
// fontSize: 12,
fontSize: "0.0625rem",
},
},
// fontSize: 12, //
fontSize: "0.0625rem", //
color: "#fff",
},
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,
};
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, //
fontSize: "0.0833rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// },
// padding: [15, 20],
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
// fontSize: 14,
fontSize: "0.0729rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
// fontSize: 12,
fontSize: "0.0625rem",
},
},
},
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);
// });
}
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);
// });
}
);
}
registerMap();
},
},
mounted() {
@ -1377,7 +1376,7 @@ export default {
line-height: 47px;
letter-spacing: 3px;
color: #fff;
margin-left: -60px;
margin-left: 60px;
}
img:nth-of-type(1) {
@ -2010,7 +2009,7 @@ export default {
line-height: 36px;
}
p.second {
width:118px;
width: 118px;
height: 36px;
padding-left: 15px;
font-size: 30px;