This commit is contained in:
unknown 2023-12-05 16:31:56 +08:00
parent dbd7475e3f
commit 0c642b288c
26 changed files with 42419 additions and 49 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

View File

@ -988,7 +988,9 @@ export default {
color: "#D8C74A", color: "#D8C74A",
}, },
}, },
data: [], data: [
],
}, },
{ {
tooltip: { tooltip: {
@ -1208,30 +1210,30 @@ export default {
}; };
// series // series
const series = [ const series = [
{ // {
z: 2, // z: 2,
name: "底部", // name: "",
type: "pictorialBar", // type: "pictorialBar",
data: [1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1,1,1,1], // data: [1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1,1,1,1],
symbol: "diamond", // symbol: "diamond",
symbolOffset: [0, "50%"], // symbolOffset: [0, "50%"],
symbolSize: [18, 12], // symbolSize: [18, 12],
itemStyle: { // itemStyle: {
color: { // color: {
type: "linear", // type: "linear",
x: 0, // x: 0,
x2: 1, // x2: 1,
y: 0, // y: 0,
y2: 0, // y2: 0,
colorStops: [ // colorStops: [
{ offset: 0, color: "rgba(27, 126, 242, 1)" }, // { offset: 0, color: "rgba(27, 126, 242, 1)" },
{ offset: 0.5, color: "rgba(27, 126, 242, 1)" }, // { offset: 0.5, color: "rgba(27, 126, 242, 1)" },
{ offset: 0.5, color: "rgba(27, 126, 242, .7)" }, // { offset: 0.5, color: "rgba(27, 126, 242, .7)" },
{ offset: 1, color: "rgba(27, 126, 242, 1)" }, // { offset: 1, color: "rgba(27, 126, 242, 1)" },
], // ],
}, // },
}, // },
}, // },
{ {
z: 3, z: 3,
name: "上部1", name: "上部1",
@ -1240,7 +1242,7 @@ export default {
data: dataArr.disinfeced, data: dataArr.disinfeced,
symbol: "diamond", symbol: "diamond",
symbolOffset: [0, "-50%"], symbolOffset: [0, "-50%"],
symbolSize: ["0.09rem", "0.06rem"], symbolSize: [18, 12],
label: { label: {
normal: { normal: {
show: true, show: true,
@ -1255,13 +1257,13 @@ export default {
}, },
itemStyle: { itemStyle: {
borderColor: "#28F1FA", borderColor: "#28F1FA",
borderWidth: 2, borderWidth: 4,
color: "#28F1FA", color: "#28F1FA",
}, },
}, },
{ {
z: 1, z: 1,
stack: "总量", stack: "",
type: "bar", type: "bar",
name: "电费", name: "电费",
barWidth: 18, barWidth: 18,

View File

@ -1395,7 +1395,6 @@ export default {
let src = require("../assets/shandong.json"); let src = require("../assets/shandong.json");
function registerMap() { function registerMap() {
echarts.registerMap("山东", src); echarts.registerMap("山东", src);
//json //json
var mapFeatures = echarts.getMap("山东").geoJson.features; var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {}; var geoCoordMap = {};
@ -1440,9 +1439,9 @@ export default {
zlevel: 3, zlevel: 3,
rippleEffect: { rippleEffect: {
// //
period: 4, // period: 3, //
brushType: "fill", // stroke, fill brushType: "fill", // stroke, fill
scale: 10, // scale: 5, //
}, },
symbol: "circle", symbol: "circle",
symbolSize: 7, symbolSize: 7,

View File

@ -1137,12 +1137,69 @@ export default {
window.addEventListener("resize", function () { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();
}); });
//
//
let src = require("../assets/shandong.json"); let src = require("../assets/shandong.json");
function registerMap() { function registerMap() {
echarts.registerMap("山东", src); echarts.registerMap("山东", src);
//json
var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {};
//
mapFeatures.forEach(function (v) {
//
var name = v.properties.name;
//
geoCoordMap[name] = v.properties.center;
});
//value
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value),
});
}
}
return res;
};
let option = { let option = {
// 使2D
geo: {
// 2D
show: false, // 2D
map: "山东",
roam: false, //
layoutCenter: ["50%", "50%"], //
layoutSize: "155%", //
aspectScale: 0.9, //
zlevel: 1,
},
series: [ series: [
//
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 3,
rippleEffect: {
//
period: 3, //
brushType: "fill", // stroke, fill
scale: 5, //
},
symbol: "circle",
symbolSize: 7,
itemStyle: {
normal: {
show: true,
color: "#D8C74A",
},
},
data: [],
},
{ {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
@ -1160,12 +1217,13 @@ export default {
borderWidth: 2, // borderWidth: 2, //
}, },
label: { label: {
fontSize: "0.0625rem", // fontSize: "0.06rem", //
color: "#fff", color: "#fff",
}, },
}, },
label: { label: {
show: true, // show: true, //
zlevel: 4,
formatter: function (params) { formatter: function (params) {
var name = params.name; var name = params.name;
var value = params.value; var value = params.value;
@ -1174,24 +1232,25 @@ export default {
}, },
textStyle: { textStyle: {
color: "#000", // color: "#000", //
fontSize: "0.0833rem", // fontSize: "0.08rem", //
fontFamily: "微软雅黑", fontFamily: "微软雅黑",
// backgroundColor: { // backgroundColor: {
// image: "../assets//.png", // image: require("../assets//.png"),
// }, // },
// padding: [15, 20], // backgroundSize: "10px 10px",
// backgroundPosition: "top left",
}, },
rich: { rich: {
fline: { fline: {
padding: [0, 35], padding: [0, 35],
color: "#FDCC00", color: "#FDCC00",
fontSize: "0.0729rem", fontSize: "0.07rem",
fontWeight: 600, fontWeight: 600,
}, },
tline: { tline: {
padding: [0, 27], padding: [0, 27],
color: "#fff", color: "#fff",
fontSize: "0.0625rem", fontSize: "0.06rem",
}, },
}, },
}, },
@ -1241,6 +1300,8 @@ export default {
animation: true, animation: true,
}; };
option.series[0].data = convertData(data); //
myChart.setOption(option); myChart.setOption(option);
myChart.on("click", chartClick); myChart.on("click", chartClick);
// //

View File

@ -1174,12 +1174,69 @@ export default {
window.addEventListener("resize", function () { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();
}); });
//
//
let src = require("../assets/shandong.json"); let src = require("../assets/shandong.json");
function registerMap() { function registerMap() {
echarts.registerMap("山东", src); echarts.registerMap("山东", src);
//json
var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {};
//
mapFeatures.forEach(function (v) {
//
var name = v.properties.name;
//
geoCoordMap[name] = v.properties.center;
});
//value
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value),
});
}
}
return res;
};
let option = { let option = {
// 使2D
geo: {
// 2D
show: false, // 2D
map: "山东",
roam: false, //
layoutCenter: ["50%", "50%"], //
layoutSize: "155%", //
aspectScale: 0.9, //
zlevel: 1,
},
series: [ series: [
//
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 3,
rippleEffect: {
//
period: 3, //
brushType: "fill", // stroke, fill
scale: 5, //
},
symbol: "circle",
symbolSize: 7,
itemStyle: {
normal: {
show: true,
color: "#D8C74A",
},
},
data: [],
},
{ {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
@ -1197,13 +1254,13 @@ export default {
borderWidth: 2, // borderWidth: 2, //
}, },
label: { label: {
// fontSize: 12, // fontSize: "0.06rem", //
fontSize: "0.0625rem", //
color: "#fff", color: "#fff",
}, },
}, },
label: { label: {
show: true, // show: true, //
zlevel: 4,
formatter: function (params) { formatter: function (params) {
var name = params.name; var name = params.name;
var value = params.value; var value = params.value;
@ -1212,27 +1269,25 @@ export default {
}, },
textStyle: { textStyle: {
color: "#000", // color: "#000", //
// fontSize: 16, // fontSize: "0.08rem", //
fontSize: "0.0833rem", //
fontFamily: "微软雅黑", fontFamily: "微软雅黑",
// backgroundColor: { // backgroundColor: {
// image: "../assets//.png", // image: require("../assets//.png"),
// }, // },
// padding: [15, 20], // backgroundSize: "10px 10px",
// backgroundPosition: "top left",
}, },
rich: { rich: {
fline: { fline: {
padding: [0, 35], padding: [0, 35],
color: "#FDCC00", color: "#FDCC00",
// fontSize: 14, fontSize: "0.07rem",
fontSize: "0.0729rem",
fontWeight: 600, fontWeight: 600,
}, },
tline: { tline: {
padding: [0, 27], padding: [0, 27],
color: "#fff", color: "#fff",
// fontSize: 12, fontSize: "0.06rem",
fontSize: "0.0625rem",
}, },
}, },
}, },
@ -1282,6 +1337,8 @@ export default {
animation: true, animation: true,
}; };
option.series[0].data = convertData(data); //
myChart.setOption(option); myChart.setOption(option);
myChart.on("click", chartClick); myChart.on("click", chartClick);
// //