+
@@ -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";
diff --git a/src/views/XQXY.vue b/src/views/XQXY.vue
index 4c1b716..d9ac45d 100644
--- a/src/views/XQXY.vue
+++ b/src/views/XQXY.vue
@@ -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],其中left、top自己设置。
- // 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, // 材质粗糙度,0完全光滑,1完全粗糙
- // 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],其中left、top自己设置。
+ // 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, // 材质粗糙度,0完全光滑,1完全粗糙
+ // metalness: 0, // 0材质是非金属 ,1金属
+ // roughnessAdjust: 0,
+ // },
+ // viewControl: {
+ // distance: 30, // 地图视角 控制初始大小
+ // rotateSensitivity: 1, // 旋转
+ // zoomSensitivity: 1, // 缩放
+ // },
+ // };
+ // myChart.setOption(option);
+ // });
}
- );
+ }
+ registerMap();
},
},
mounted() {
diff --git a/src/views/ZHDY.vue b/src/views/ZHDY.vue
index c2d4923..5a503e5 100644
--- a/src/views/ZHDY.vue
+++ b/src/views/ZHDY.vue
@@ -1037,7 +1037,17 @@ export default {
console.log(item);
percent = ((item.value / total) * 100).toFixed(2);
if (name !== "") {
- return `{name|${name}}` + "\t" + "\t"+"\t" + "\t" + `{num|${percent}}`+"\t" + "\t"+`{name|%}`;
+ return (
+ `{name|${name}}` +
+ "\t" +
+ "\t" +
+ "\t" +
+ "\t" +
+ `{num|${percent}}` +
+ "\t" +
+ "\t" +
+ `{name|%}`
+ );
// return `{name|${name}` + `{num|${percent}}{name|kWh}`;
} else {
return "";
@@ -1056,7 +1066,7 @@ export default {
},
num: {
// fontSize: 12,
- fontWeight:700,
+ fontWeight: 700,
fontSize: "0.0833rem",
color: color[1],
},
@@ -1161,177 +1171,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],其中left、top自己设置。
- // 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, // 材质粗糙度,0完全光滑,1完全粗糙
- // 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],其中left、top自己设置。
+ // 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, // 材质粗糙度,0完全光滑,1完全粗糙
+ // metalness: 0, // 0材质是非金属 ,1金属
+ // roughnessAdjust: 0,
+ // },
+ // viewControl: {
+ // distance: 30, // 地图视角 控制初始大小
+ // rotateSensitivity: 1, // 旋转
+ // zoomSensitivity: 1, // 缩放
+ // },
+ // };
+ // myChart.setOption(option);
+ // });
}
- );
+ }
+ registerMap();
},
},
mounted() {
@@ -2011,7 +2020,7 @@ export default {
line-height: 36px;
}
p.second {
- width:118px;
+ width: 118px;
height: 36px;
padding-left: 15px;
font-size: 30px;