Compare commits

..

3 Commits

Author SHA1 Message Date
ae04a588a0 提交 2025-11-06 14:23:03 +08:00
210231ada4 修改地图撒点数据处理 2025-10-31 12:51:49 +08:00
47ef3fcac8 修改地图撒点数据处理 2025-10-30 18:14:08 +08:00
4 changed files with 31 additions and 43 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 MiB

View File

@ -76,7 +76,7 @@ export const publicRoutes = [
name: "/platformBusinessData", name: "/platformBusinessData",
component: () => import("@/views/platformBusinessData/index"), component: () => import("@/views/platformBusinessData/index"),
meta: {} meta: {}
} },
]; ];
const router = createRouter({ const router = createRouter({

View File

@ -65,9 +65,8 @@ const generateRandomHeights = (points, minHeight = 10, maxHeight = 25) => {
})); }));
}; };
// 获取动态配置 - 只展示 initialPoints 中的数据 // 获取动态配置
const getChartOption = () => { const getChartOption = () => {
// 每次调用生成新的随机高度
const pointsWithRandomHeights = generateRandomHeights(initialPoints); const pointsWithRandomHeights = generateRandomHeights(initialPoints);
return { return {
@ -83,7 +82,7 @@ const getChartOption = () => {
borderColor: "#30DCFF", borderColor: "#30DCFF",
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: calcResponsivePX(12) fontSize: 12
} }
}, },
geo3D: { geo3D: {
@ -91,20 +90,18 @@ const getChartOption = () => {
map: "sichuan", map: "sichuan",
regionHeight: 6, regionHeight: 6,
boxHeight: 2, boxHeight: 2,
roam: false, roam: true,
label: { label: {
show: false, // 隐藏地图区域标签,只显示散点 show: false,
color: "#fff", color: "#fff",
fontSize: calcResponsivePX(10), fontSize: 10,
fontWeight: "bold", fontWeight: "bold"
borderWidth: 5,
borderColor: "rgba(40,40,41,0.48)"
}, },
itemStyle: { itemStyle: {
color: "rgba(27,129,150,0.18)", color: "rgba(27,129,150,0.18)",
borderColor: "#61cfff", borderColor: "#61cfff",
borderWidth: 2, borderWidth: 2,
opacity: 0.3 // 降低地图透明度,突出散点 opacity: 0.3
}, },
emphasis: { emphasis: {
itemStyle: { itemStyle: {
@ -129,14 +126,7 @@ const getChartOption = () => {
alpha: 45, alpha: 45,
beta: 10 beta: 10
}, },
groundPlane: { show: false }, groundPlane: { show: false }
postEffect: {
enable: true,
bloom: {
enable: true,
bloomIntensity: 0.25
}
}
}, },
series: [ series: [
{ {
@ -147,35 +137,33 @@ const getChartOption = () => {
name: p.name, name: p.name,
value: p.value, value: p.value,
count: p.count, count: p.count,
// 为每个点单独配置 label // 关键:使用正确的 label 配置方式
label: { label: {
show: true, show: true,
position: [0, 0, p.value[2] + 3], // 3D坐标 [x, y, z]在点上方3个单位
formatter: p.name, formatter: p.name,
backgroundColor: 'rgba(0,0,0,0.7)', position: [p.value[2] + 5, p.value[2] + 5, p.value[2] + 5], // [x, y, z] - 在点上方固定偏移
borderWidth: 1, distance: 0, // 重要设置为0使用绝对位置
padding: [2, 6], textStyle: {
borderRadius: 3, backgroundColor: 'rgba(0,0,0,0.7)',
color: '#fff', borderWidth: 1,
fontSize: 10 borderColor: '#30dcff',
padding: [4, 8],
borderRadius: 4,
color: '#fff',
fontSize: 10
}
} }
})), })),
symbol: "triangle", // 改为圆形,更明显 symbol: "triangle", // 改为圆形,更明显
symbolSize: calcResponsivePX(12), // 增大符号尺寸 symbolSize: calcResponsivePX(12), // 增大符号尺寸
itemStyle: { color: "#FFBE34" }, itemStyle: { color: "#FFBE34" },
// label: { label: {
// show: true, textStyle: {
// position: "top", backgroundColor: 'rgba(255,190,52,0.9)',
// formatter: "{b}", // 只显示名称 color: '#000',
// color: "#FFF", fontWeight: 'bold'
// fontSize: calcResponsivePX(11), }
// fontWeight: "bold", }
// backgroundColor: "rgba(0,0,0,0.8)",
// // borderColor: "#FFBE34",
// borderWidth: calcResponsivePX(1),
// padding: [4, 6],
// borderRadius: calcResponsivePX(1)
// }
} }
] ]
} }
@ -232,7 +220,7 @@ onUnmounted(() => {
text-align: center; text-align: center;
color: #c4f3fe; color: #c4f3fe;
background: url("~@/assets/images/recruitment/card-title@2x.png") no-repeat background: url("~@/assets/images/recruitment/card-title@2x.png") no-repeat
center; center;
background-size: auto 100%; background-size: auto 100%;
margin-top: 0.7vw; margin-top: 0.7vw;
} }

View File

@ -80,7 +80,7 @@
:type2="cardThreeInfo.type2" :type2="cardThreeInfo.type2"
> >
<template v-slot:header> <template v-slot:header>
<div class="header_bg" style="margin-top:1vw">近2个月保供比亚迪入职人员分析</div> <div class="header_bg" style="margin-top:1vw">近2个月保供入职人员分析</div>
</template> </template>
<ListView/> <ListView/>
@ -173,7 +173,7 @@ const cardTwoInfo = {
} }
}; };
const cardThreeInfo = { const cardThreeInfo = {
title: "重点企业保供案例(比亚迪)", title: "重点企业保供案例",
// description: "4000+毕业生", // description: "4000+毕业生",
type1: { type1: {
title: "招募总人数", title: "招募总人数",