土地资源

This commit is contained in:
沈鸿 2025-05-15 10:14:43 +08:00
parent bea334086a
commit 05249ceca6
13 changed files with 604 additions and 88 deletions

3
components.d.ts vendored
View File

@ -42,6 +42,9 @@ declare module 'vue' {
CustomScrollTitle: typeof import('./src/components/custom-scroll-title/index.vue')['default'] CustomScrollTitle: typeof import('./src/components/custom-scroll-title/index.vue')['default']
CustomTableOperate: typeof import('./src/components/custom-table-operate/index.vue')['default'] CustomTableOperate: typeof import('./src/components/custom-table-operate/index.vue')['default']
CustomTableTree: typeof import('./src/components/custom-table-tree/index.vue')['default'] CustomTableTree: typeof import('./src/components/custom-table-tree/index.vue')['default']
IndexCo: typeof import('./src/components/custom-echart-line/index-co.vue')['default']
IndexRe: typeof import('./src/components/new-hyaline-cake/index-re.vue')['default']
NewHyalineCake: typeof import('./src/components/custom-echart-hyaline-cake/new-hyaline-cake.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SubTop: typeof import('./src/components/subTop.vue')['default'] SubTop: typeof import('./src/components/subTop.vue')['default']

View File

@ -0,0 +1,463 @@
<template>
<div ref="chartRef" :style="{ width: width, height: height }"></div>
</template>
<script setup>
import { ref, watch, onMounted, nextTick } from 'vue';
import { cloneDeep } from 'lodash';
import { useEcharts } from '@/hooks/useEcharts';
defineOptions({ name: 'NewHyalineCake' });
// props
const props = defineProps({
chartData: {
type: Array,
default: () => [
//
{ name: '项目一', value: 60 },
{ name: '项目二', value: 44 },
{ name: '项目三', value: 32 },
],
},
option: {
type: Object,
default: () => ({
// 1
k: 1,
//
itemGap: 0.2,
// z
itemHeight: 120,
// 使>0 itemHeight 使 autoItemHeight * value
autoItemHeight: 0,
//
opacity: 0.6,
//
legendSuffix: '',
}),
},
width: {
type: String,
default: '100%',
},
height: {
type: String,
default: '100%',
},
});
//
const emit = defineEmits(['click']);
// DOM
const chartRef = ref(null);
// 使 useEcharts ECharts
const { setOptions, getInstance } = useEcharts(chartRef);
// ECharts
const chartOption = ref({});
// series-surface.parametricEquation
function getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h) {
//
const midRatio = (startRatio + endRatio) / 2;
const startRadian = startRatio * Math.PI * 2;
const endRadian = endRatio * Math.PI * 2;
const midRadian = midRatio * Math.PI * 2;
//
if (startRatio === 0 && endRatio === 1) {
isSelected = false;
}
// k 1/3 k 使
k = typeof k !== 'undefined' ? k : 1 / 3;
//
const offsetX = Math.cos(midRadian) * props.option.itemGap;
const offsetY = Math.sin(midRadian) * props.option.itemGap;
// 1
const hoverRate = isHovered ? 1.08 : 1;
// parametric
return {
u: {
// u -π 3π
min: -Math.PI,
max: Math.PI * 3,
step: Math.PI / 32,
},
v: {
// v
min: 0,
max: Math.PI * 2,
step: Math.PI / 20,
},
x(u, v) {
//
if (u < startRadian) {
return offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
}
//
if (u > endRadian) {
return offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
}
//
return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
},
y(u, v) {
if (u < startRadian) {
return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
}
if (u > endRadian) {
return offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
}
return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
},
z(u, v) {
// u < -π/2 使
if (u < -Math.PI * 0.5) {
return Math.sin(u);
}
// u > 2.5π
if (u > Math.PI * 2.5) {
return Math.sin(u) * h * 0.1;
}
// z v
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
},
};
}
// 3D
function getPie3D(pieData) {
const series = [];
let sumValue = 0;
//
pieData.forEach((item) => {
sumValue += item.value;
});
// k
const k = props.option.k ?? 1;
// series
pieData.forEach((dataItem, idx) => {
const seriesItem = {
name: dataItem.name ?? `series${idx}`,
type: 'surface',
parametric: true,
wireframe: { show: false },
pieData: dataItem,
itemStyle: {
opacity: props.option.opacity,
borderRadius: 300,
borderColor: '#fff',
borderWidth: 0,
},
pieStatus: {
selected: false,
hovered: false,
k,
},
};
//
if (dataItem.itemStyle) {
const customStyle = {};
if (dataItem.itemStyle.color !== undefined) {
customStyle.color = dataItem.itemStyle.color;
}
if (dataItem.itemStyle.opacity !== undefined) {
customStyle.opacity = dataItem.itemStyle.opacity;
}
seriesItem.itemStyle = { ...seriesItem.itemStyle, ...customStyle };
}
series.push(seriesItem);
});
// startRatio/endRatio
let startValue = 0;
series.forEach((serie) => {
const endValue = startValue + serie.pieData.value;
const startRatio = startValue / sumValue;
const endRatio = endValue / sumValue;
serie.pieData.startRatio = startRatio;
serie.pieData.endRatio = endRatio;
//
serie.parametricEquation = getParametricEquation(
startRatio,
endRatio,
false,
true,
k,
// 使
props.option.autoItemHeight > 0 ? props.option.autoItemHeight * serie.pieData.value : props.option.itemHeight
);
startValue = endValue;
});
// hover
series.push({
name: 'mouseoutSeries',
type: 'surface',
parametric: true,
wireframe: { show: false },
itemStyle: { opacity: 0 },
parametricEquation: {
u: { min: 0, max: Math.PI * 2, step: Math.PI / 20 },
v: { min: 0, max: Math.PI, step: Math.PI / 20 },
x(u, v) {
return Math.sin(v) * Math.sin(u) + Math.sin(u);
},
y(u, v) {
return Math.sin(v) * Math.cos(u) + Math.cos(u);
},
z(u, v) {
return Math.cos(v) > 0 ? 0.1 : -0.1;
},
},
});
//
const option = Object.assign(
{
tooltip: {
backgroundColor: 'rgba(18, 55, 85, 0.8)',
borderColor: '#35d0c0',
color: '#fff',
position: (point, params, dom, rect, size) => {
// tooltip
let x = point[0],
y = point[1];
const [viewW, viewH] = size.viewSize;
const [boxW, boxH] = size.contentSize;
if (x + boxW > viewW) x -= boxW;
if (y + boxH > viewH) y -= boxH;
if (x < 0) x = 0;
if (y < 0) y = 0;
return [x, y];
},
formatter: (params) => {
//
if (params.seriesName !== 'mouseoutSeries') {
return `
<span style="color:#FFF">
${params.seriesName}<br/>
<span style="
display:inline-block;
margin-right:5px;
border-radius:10px;
width:10px;
height:10px;
background-color:${params.color};"></span>
${chartOption.value.series[params.seriesIndex].pieData.value}
</span>`;
}
return '';
},
},
xAxis3D: { min: -1, max: 1 },
yAxis3D: { min: -1, max: 1 },
zAxis3D: { min: -1, max: 1 },
grid3D: {
show: false,
boxHeight: 5,
top: '0',
left: '-20%',
viewControl: {
// 3D
alpha: 60, //
distance: 240, //
rotateSensitivity: 10,
zoomSensitivity: 10,
panSensitivity: 10,
autoRotate: true,
autoRotateAfterStill: 2,
},
},
legend: {
show: true,
selectedMode: false,
right: '5%',
top: '25%',
orient: 'vertical',
icon: 'circle',
itemHeight: 12,
itemWidth: 12,
itemGap: 10,
textStyle: {
color: '#fff',
fontSize: 14,
fontWeight: '400',
},
//
formatter: (name) => {
const item = props.chartData.find((d) => d.name === name);
return item ? ` ${name} ${item.value}${props.option.legendSuffix || ''}` : name;
},
},
series,
},
//
props.option
);
return option;
}
//
function initChart() {
// 3D
const baseOption = getPie3D(props.chartData);
//
const finalOption = Object.assign({}, baseOption, cloneDeep(props.option || {}));
chartOption.value = finalOption;
//
setOptions(chartOption.value);
// DOM + ECharts
nextTick(() => {
const chart = getInstance();
if (!chart) {
console.warn('ECharts 实例未初始化,事件绑定失败');
return;
}
//
chart.off('click');
chart.off('mouseover');
chart.off('globalout');
chart.on('click', handleClick);
chart.on('mouseover', handleMouseover);
chart.on('globalout', handleGlobalout);
});
}
function handleClick(params) {
//
if (params.seriesName === 'mouseoutSeries') return;
const optionVal = chartOption.value;
const series = optionVal.series;
const idx = params.seriesIndex;
//
const isSelected = !series[idx].pieStatus.selected;
const isHovered = series[idx].pieStatus.hovered;
const k = series[idx].pieStatus.k;
const startRatio = series[idx].pieData.startRatio;
const endRatio = series[idx].pieData.endRatio;
const h = series[idx].pieData.value;
//
if (selectedIndex !== null && selectedIndex !== idx) {
const prev = series[selectedIndex];
prev.parametricEquation = getParametricEquation(
prev.pieData.startRatio,
prev.pieData.endRatio,
false,
false,
prev.pieStatus.k,
prev.pieData.value
);
prev.pieStatus.selected = false;
selectedIndex = null;
}
// /
series[idx].parametricEquation = getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h);
series[idx].pieStatus.selected = isSelected;
//
selectedIndex = isSelected ? idx : null;
//
setOptions(optionVal);
// click 使
emit('click', params);
}
function handleMouseover(params) {
const optionVal = chartOption.value;
const series = optionVal.series;
const idx = params.seriesIndex;
//
if (params.seriesName === 'mouseoutSeries') {
return;
}
//
if (hoveredIndex === idx) {
return;
}
console.log('hoveredIndexOne :>> ', hoveredIndex);
console.log('idx= :>> ', idx);
//
if (hoveredIndex !== null) {
const prev = series[hoveredIndex];
const isSelected = prev.pieStatus.selected;
prev.parametricEquation = getParametricEquation(
prev.pieData.startRatio,
prev.pieData.endRatio,
isSelected,
false,
prev.pieStatus.k,
prev.pieData.value
);
prev.pieStatus.hovered = false;
hoveredIndex = null;
}
//
const isSelected = series[idx].pieStatus.selected;
const startRatio = series[idx].pieData.startRatio;
const endRatio = series[idx].pieData.endRatio;
const k = series[idx].pieStatus.k;
const h = series[idx].pieData.value;
series[idx].parametricEquation = getParametricEquation(startRatio, endRatio, isSelected, true, k, h);
series[idx].pieStatus.hovered = true;
hoveredIndex = idx;
console.log('hoveredIndexTwo :>> ', hoveredIndex);
setOptions(optionVal);
}
function handleGlobalout() {
if (hoveredIndex !== null) {
const optionVal = chartOption.value;
const series = optionVal.series;
const prev = series[hoveredIndex];
const isSelected = prev.pieStatus.selected;
prev.parametricEquation = getParametricEquation(
prev.pieData.startRatio,
prev.pieData.endRatio,
isSelected,
false,
prev.pieStatus.k,
prev.pieData.value
);
prev.pieStatus.hovered = false;
hoveredIndex = null;
setOptions(optionVal);
}
}
//
let selectedIndex = null;
let hoveredIndex = null;
//
onMounted(() => {
initChart();
});
//
watch(
[() => props.chartData, () => props.option],
() => {
if (props.chartData && props.chartData.length) {
initChart();
}
},
{ immediate: true, deep: true }
);
</script>
<style scoped>
/* 可根据需要自定义图表容器样式 */
</style>

View File

@ -204,6 +204,7 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 13px; font-size: 13px;
flex: none;
.rank { .rank {
margin-right: 5px; margin-right: 5px;
} }
@ -212,7 +213,7 @@ onUnmounted(() => {
} }
} }
.ranking-column { .ranking-column {
width: 100%; flex: 1;
.inside-column { .inside-column {
position: relative; position: relative;
overflow: hidden; overflow: hidden;

View File

@ -7,9 +7,9 @@ import echarts from '../utils/echarts';
export const useEcharts = (elRef, theme = 'default') => { export const useEcharts = (elRef, theme = 'default') => {
// 新增轮播相关状态 // 新增轮播相关状态
const autoPlayTimer = ref(null); const autoPlayTimer = ref(null); // 定时器句柄
const currentIndex = ref(-1); const currentIndex = ref(-1); // 当前高亮的数据索引
const dataLength = ref(0); const dataLength = ref(0); // 当前系列的数据总长度
let mapClickHandler = null; let mapClickHandler = null;
@ -18,29 +18,41 @@ export const useEcharts = (elRef, theme = 'default') => {
const { const {
interval = 2000, // 轮播间隔(ms) interval = 2000, // 轮播间隔(ms)
seriesIndex = 0, // 默认操作第一个系列 seriesIndex = 0, // 默认操作第一个系列
showTooltip = true, // 是否显示提示框 showTooltip = false, // 是否显示提示框默认是false外部配置了无论是否true都会显示
showMarkPoint = true, // 是否显示默认的动态标记点
} = options; } = options;
stopAutoPlay(); // 先停止已有轮播 stopAutoPlay(); // 先停止已有轮播
// 获取数据长度 // 获取当前系列的数据长度
const seriesData = unref(getOptions).series?.[seriesIndex]?.data; const seriesData = unref(getOptions).series?.[seriesIndex]?.data;
const xAxisData = unref(getOptions).xAxis?.data || [];
// 获取当前 option 中的 yAxis 类型来判断是否倒置
const axisType = unref(getOptions).yAxis?.type;
const isCategoryY = axisType === 'category';
dataLength.value = seriesData?.length || 0; dataLength.value = seriesData?.length || 0;
if (dataLength.value === 0) return; if (dataLength.value === 0) return;
autoPlayTimer.value = setInterval(() => { autoPlayTimer.value = setInterval(() => {
currentIndex.value = (currentIndex.value + 1) % dataLength.value; currentIndex.value = (currentIndex.value + 1) % dataLength.value;
// 更新MarkPoint点信息
if (showMarkPoint) {
updateMarkPoint(currentIndex.value, xAxisData, seriesData, isCategoryY);
}
// 执行轮播动作 // 重置之前的高亮
chartInstance?.dispatchAction({ chartInstance?.dispatchAction({
type: 'downplay', type: 'downplay',
seriesIndex: seriesIndex, seriesIndex: seriesIndex,
}); });
// 高亮当前项
chartInstance?.dispatchAction({ chartInstance?.dispatchAction({
type: 'highlight', type: 'highlight',
seriesIndex: seriesIndex, seriesIndex: seriesIndex,
dataIndex: currentIndex.value, dataIndex: currentIndex.value,
}); });
// 显示 tooltip可选
if (showTooltip) { if (showTooltip) {
chartInstance?.dispatchAction({ chartInstance?.dispatchAction({
type: 'showTip', type: 'showTip',
@ -51,6 +63,40 @@ export const useEcharts = (elRef, theme = 'default') => {
}, interval); }, interval);
}; };
function updateMarkPoint(index, xAxis, seriesData, isCategoryY) {
const x = isCategoryY ? seriesData[index] : xAxis[index];
const y = isCategoryY ? xAxis[index] : seriesData[index];
const updatedSeries = chartInstance.getOption().series;
if (updatedSeries[0].markPoint && Array.isArray(updatedSeries[0].markPoint.data) && updatedSeries[0].markPoint.data.length > 1) {
// 已初始化:只改坐标
updatedSeries[0].markPoint.data.forEach((el) => {
el.coord = [x, y];
});
} else {
// 未初始化或数据不对:重建
updatedSeries[0].markPoint = {
symbol: 'circle',
symbolSize: 8,
itemStyle: {
color: '#ffffff',
},
label: {
show: false,
},
data: [
{ coord: [x, y], symbolSize: 16, itemStyle: { color: '#ffffff' }, z: 12 },
{ coord: [x, y], symbolSize: 24, itemStyle: { color: 'rgba(1, 238, 255, 0.5)' }, z: 11 },
{ coord: [x, y], symbolSize: 40, itemStyle: { color: 'rgba(1, 238, 255, 0.3)' }, z: 10 },
],
};
}
chartInstance.setOption({
series: updatedSeries,
});
}
// 新增方法 - 停止轮播 // 新增方法 - 停止轮播
const stopAutoPlay = () => { const stopAutoPlay = () => {
if (autoPlayTimer.value) { if (autoPlayTimer.value) {

View File

@ -32,6 +32,9 @@ import {
CalendarComponent, CalendarComponent,
GraphicComponent, GraphicComponent,
GeoComponent, GeoComponent,
MarkPointComponent,
MarkLineComponent,
MarkAreaComponent,
} from 'echarts/components'; } from 'echarts/components';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
@ -64,6 +67,9 @@ echarts.use([
ScatterChart, ScatterChart,
EffectScatterChart, EffectScatterChart,
GeoComponent, GeoComponent,
MarkPointComponent,
MarkLineComponent,
MarkAreaComponent,
]); ]);
export default echarts; export default echarts;

View File

@ -27,16 +27,17 @@ const state = reactive({
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
}, },
backgroundColor: 'rgba(18, 55, 85, 0.8);', backgroundColor: 'rgba(0,0,0,0.6);',
borderColor: '#35d0c0', borderColor: '#35d0c0',
formatter: (data) => { formatter: (data) => {
const params = data[0]; const params = data[0];
let str = `<div class="custom-echarts-tips" > let str = `<div class="custom-echarts-tips" >
<span>${params.name}</span><br/> <span>${params.name}</span><br/>
<span>${params.marker} ${params.data} </span> <span>${params.marker} ${params.data} </span>
</div>`; </div>`;
return str; return str;
}, },
extraCssText: 'backdrop-filter: blur(8px);',
}, },
barStyle: { barStyle: {
barWidth: 14, barWidth: 14,
@ -46,13 +47,13 @@ const state = reactive({
}, },
color: { color: {
type: 'linear', type: 'linear',
x: 0, x: 1,
y: 0, y: 0,
x2: 0, x2: 0,
y2: 1, y2: 0,
colorStops: [ colorStops: [
{ offset: 0, color: '#35D0C0' }, { offset: 0, color: '#35D0C0' },
{ offset: 1, color: '#35D0C0' }, { offset: 1, color: 'rgba(53,208,192,0)' },
], ],
global: false, global: false,
}, },

View File

@ -128,16 +128,15 @@ const _circleNum = computed(() => {
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
&.active { &.active {
background-color: rgba($color: #4aeb82, $alpha: 0.4); background: rgba(38, 122, 102, 0.3);
border: 1px solid rgba($color: #008f32, $alpha: 08); border: 1px solid #35d0c0;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
.spot { .spot {
transform: scale(1.2); transform: scale(1.2);
} }
._label, ._label {
._value { font-size: 16px;
font-size: 18px;
} }
} }
._label { ._label {

View File

@ -1,5 +1,5 @@
<template> <template>
<centerMap :dialog-title="'土地类型'" @mapclick="doMapclick"> <centerMap class="land-map-body" :dialog-title="'土地类型'" @mapclick="doMapclick">
<template #header> <template #header>
<div class="land-map-pop-header"> <div class="land-map-pop-header">
<div class="title">土地类型</div> <div class="title">土地类型</div>
@ -49,6 +49,11 @@ const all = computed(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.land-map-body {
:deep(.el-dialog__body) {
overflow: visible;
}
}
.land-map-pop-header { .land-map-pop-header {
display: inline-flex; display: inline-flex;
justify-content: space-between; justify-content: space-between;

View File

@ -26,7 +26,7 @@ const state = reactive({
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
}, },
backgroundColor: 'rgba(18, 55, 85, 0.8);', backgroundColor: 'rgba(0,0,0,0.6);',
borderColor: '#35d0c0', borderColor: '#35d0c0',
formatter: (data) => { formatter: (data) => {
const params = data[0]; const params = data[0];
@ -36,11 +36,12 @@ const state = reactive({
</div>`; </div>`;
return str; return str;
}, },
extraCssText: 'backdrop-filter: blur(8px);',
}, },
barStyle: { barStyle: {
barWidth: 15, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [8, 8, 0, 0], // borderRadius: 8, //
}, },
color: { color: {
type: 'linear', type: 'linear',
@ -49,23 +50,14 @@ const state = reactive({
x2: 0, x2: 0,
y2: 1, y2: 1,
colorStops: [ colorStops: [
{ offset: 0, color: '#35D0C0' }, { offset: 0, color: '#35d0c0' },
{ offset: 1, color: '#35D0C0' }, { offset: 1, color: 'rgba(53,208,192,0)' },
], ],
global: false, global: false,
}, },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
// name: '',
// splitLine: {
// show: false,
// lineStyle: {
// type: 'dashed',
// color: '',
// width: 1,
// },
// },
axisTick: { axisTick: {
show: false, show: false,
alignWithLabel: false, alignWithLabel: false,
@ -78,44 +70,11 @@ const state = reactive({
color: 'rgba(28, 158, 222, 1)', color: 'rgba(28, 158, 222, 1)',
}, },
}, },
// axisLine: {
// show: true,
// lineStyle: {
// type: 'solid',
// width: 1,
// // color: '#000',
// },
// },
// axisLabel: {
// margin: 8,
// interval: 'auto',
// rotate: 0,
// fontSize: 10,
// color: '#fff',
// },
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
// name: '()', // name: '()',
}, },
// label: {
// show: true,
// position: 'insideTop',
// distance: -10,
// formatter: () => {
// return `{z|}{a|}`;
// },
// rich: {
// a: {
// widht: 18,
// height: 18,
// backgroundColor: {
// image:
// 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKUSURBVHgBpVPPaxNBFH4zszubTTY2sSRSrFCC1dIepChoD9JgKwiem6s3vYl4lyb/QS/+wJPnBPQ/0LQ91KsHe5BaWo3Yupqk6WZ3Z3Z2xt2tKUUNHnww8OB775tv3nwP4D8DDQOqqoqh9iuPjlpeVkkxQurvBAoiREGlUcHbpUWcHaWkoGUivAWOPyUt5iiYgbABS/IkCTp5YxMAF1rTui36Rt70acipFmOEcqE8n+vaWZbf74jnl++KAQlOLlcKNZuA6X7JcPw9K2uSPOd68bY1NXtJL0zGeWiO5h3fsbxxk5abNRIrPlawVK8TmGtRx89ZJIVy93NzC9et0sMU6JMxzkF+XXc/1Fbab1+bmuq2RNcZ39jg9UojTBTkSx3spIu6oaHMLevC9E3r4tNBcxwU8NhCeurZg9y1GwRYJucX9e2lRYwi5TiW8nmEYe6FusIsfWfkyjIMiauZ0j2PozRJ92lxi2E1mAGcB8jwjoakQS1EZ4cRxBg1McUMkzNaFqEBgbeTTWYhlZChUs4wghCUw5gh43xnIv75mACBKkxkpKFbARiYtUNnbRhBW7hrUvicUCoK73flsQK7uSlZCgXI892X7uZjEU3992auwr1Xh++eEKr3fY8E9sx8YiiSyHlRhrFvPQT0NOyGP3puwDfO0XwuYseRf9mnoFtfOVx9tM6/fGShOPRhxy/ndsWbWvPI3rGRKtDAkWspQM8MkUpHtk6L0NIlOkAIpRhnro8Mo38Kep493guaUA3j5ydPiCpUAyrS3toMbEFcQke6ppWxteDAlszYV9L7zk9Bh4mWmzTXqlLB0Tr8uY3RTpQjWxcK09gx9hLcYm1l2/OyXF6VVVSViY0RKPhHHJGrpHTo2v8EGgI2uB3r9kQAAAAASUVORK5CYII=',
// },
// },
// },
// },
}, },
data: [], data: [],
}); });

View File

@ -1,5 +1,5 @@
<template> <template>
<custom-echart-hyaline-cake height="100%" :chart-data="state.data" :option="state.option" /> <new-hyaline-cake height="100%" :chart-data="state.data" :option="state.option" />
</template> </template>
<script setup> <script setup>
@ -15,19 +15,19 @@ const props = defineProps({
const state = reactive({ const state = reactive({
option: { option: {
opacity: 0.6, opacity: 1,
itemGap: 0.2, itemGap: 0.1,
legendSuffix: '万亩', legendSuffix: '万亩',
itemHeight: 120, itemHeight: 500,
grid3D: { grid3D: {
show: false, show: false,
boxHeight: 5, boxHeight: 1,
top: '0', top: '0',
left: '-20%', left: '-20%',
viewControl: { viewControl: {
//3d //3d
alpha: 30, //( ) alpha: 45, //( )
distance: 260, //zoom() distance: 300, //zoom()
rotateSensitivity: 10, //0 rotateSensitivity: 10, //0
zoomSensitivity: 10, //0 zoomSensitivity: 10, //0
panSensitivity: 10, //0 panSensitivity: 10, //0

View File

@ -31,7 +31,7 @@ const state = reactive({
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
}, },
backgroundColor: 'rgba(18, 55, 85, 0.8);', backgroundColor: 'rgba(0,0,0,0.6);',
borderColor: '#35d0c0', borderColor: '#35d0c0',
formatter: (data) => { formatter: (data) => {
const params = data[0]; const params = data[0];
@ -41,6 +41,7 @@ const state = reactive({
</div>`; </div>`;
return str; return str;
}, },
extraCssText: 'backdrop-filter: blur(8px);',
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -60,7 +61,6 @@ const state = reactive({
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
// name: '',
}, },
}, },
data: [], data: [],

View File

@ -20,10 +20,10 @@ const state = reactive({
option: { option: {
// //
dataset: [], dataset: [],
type: 'column', type: 'row',
rowNum: 6, rowNum: 6,
isAnimation: true, isAnimation: true,
waitTime: 5, waitTime: 2,
unit: '万元', unit: '万元',
sort: true, sort: true,
height: 12, height: 12,
@ -32,9 +32,9 @@ const state = reactive({
borderRadius: '12px', borderRadius: '12px',
carousel: 'single', carousel: 'single',
indexPrefix: 'TOP', indexPrefix: 'TOP',
indexFontSize: 12, indexFontSize: 20,
leftFontSize: 14, leftFontSize: 16,
rightFontSize: 14, rightFontSize: 16,
valueFormatter: (item) => { valueFormatter: (item) => {
return item.value; return item.value;
}, },
@ -61,8 +61,11 @@ watch(
&:deep(.row-item) { &:deep(.row-item) {
.ranking-info { .ranking-info {
color: #35d0c0 !important; color: #35d0c0 !important;
font-family: 'DingTalk JinBuTi, DingTalk JinBuTi-Regular'; font-weight: 400;
font-weight: 700; font-style: italic;
}
.ranking-value {
font-style: italic;
} }
.inside-column { .inside-column {

View File

@ -9,7 +9,7 @@
</customBack> </customBack>
</div> </div>
<div class="left-charts-item"> <div class="left-charts-item">
<customBack top-title="农村土地资源项目效益" :top-postion="'left'"> <customBack top-title="农村土地资源" :top-postion="'left'">
<template #back> <template #back>
<landTwo :data="state.data.two" /> <landTwo :data="state.data.two" />
</template> </template>
@ -55,14 +55,31 @@
</customBack> </customBack>
</div> </div>
<div class="right-charts-item"> <div class="right-charts-item">
<customBack top-title="年度农用地规划面积" :top-postion="'right'"> <customBack
top-title="管理需求分类"
:down-title="'永久基本农田'"
:top-postion="'right'"
:down-width="'140px'"
:options="[
{ label: '永久基本农田', value: '530926' },
{ label: '耿马镇', value: '42611' },
{ label: '勐撒镇', value: '9259' },
{ label: '勐永镇', value: '17787' },
{ label: '孟定镇', value: '42610' },
{ label: '勐简乡', value: '17788' },
{ label: '贺派乡', value: '40161' },
{ label: '四排山乡', value: '40163' },
{ label: '大兴乡', value: '40159' },
]"
:is-down="true"
>
<template #back> <template #back>
<landFive :data="state.data.five" /> <landFive :data="state.data.five" />
</template> </template>
</customBack> </customBack>
</div> </div>
<div class="right-charts-item"> <div class="right-charts-item">
<customBack top-title="各地农用地利用面积" :top-postion="'right'"> <customBack top-title="全县作物情况" :top-postion="'right'">
<template #back> <template #back>
<landSix :data="state.data.six" /> <landSix :data="state.data.six" />
</template> </template>
@ -198,9 +215,22 @@ const handleCommand = (data) => {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep(.custom-back-content) {
padding: 8px !important; /* 强制覆盖 padding */
}
.data-home-index { .data-home-index {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-family: 'DingTalk JinBuTi, DingTalk JinBuTi-Regular';
font-weight: 400;
:deep(*) {
font-family: inherit;
font-weight: inherit;
}
:deep(.title-top-content) {
font-size: 24px;
}
.left-charts { .left-charts {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;