This commit is contained in:
姚宇浩 2024-05-27 15:56:16 +08:00
parent 86f791b347
commit fedefff43b
3 changed files with 17 additions and 12 deletions

View File

@ -230,7 +230,6 @@ const handle = (current) => {
.bo { .bo {
width: 100%; width: 100%;
display: flex; display: flex;
// align-items: center;
} }
.title { .title {
margin: 10px auto; margin: 10px auto;
@ -243,7 +242,6 @@ const handle = (current) => {
height: 33px; height: 33px;
width: 33px; width: 33px;
} }
.name { .name {
font-family: PangMenZhengDao, PangMenZhengDao; font-family: PangMenZhengDao, PangMenZhengDao;
font-weight: 600; font-weight: 600;

View File

@ -13,7 +13,7 @@ import {
} from "vue"; } from "vue";
// echarts // echarts
import * as echarts from "echarts"; import * as echarts from "echarts";
const emit = defineEmits(["village"]);
const props = defineProps({ const props = defineProps({
list1: { list1: {
type: Array, type: Array,
@ -215,13 +215,13 @@ const getOption = () => {
]), ]),
}, },
}, },
label:{ label: {
show:true, show: true,
position:'right', position: "right",
color:'#ffffff', color: "#ffffff",
formatter:function(data){ formatter: function (data) {
return data.value return data.value;
} },
}, },
}, },
], ],
@ -261,6 +261,10 @@ const setChart = () => {
var myChart = echarts.init(chart.value); var myChart = echarts.init(chart.value);
// 使 // 使
myChart.setOption(data.option); myChart.setOption(data.option);
myChart.on("click", function (params) {
console.log(params);
emit('village',params.name);
});
}; };
// 使 // 使
onBeforeMount(() => { onBeforeMount(() => {

View File

@ -203,7 +203,7 @@
alt="" alt=""
/> />
</div> </div>
<ylXZZC :list1="data.zccs1" :list2="data.zccs2"></ylXZZC> <ylXZZC :list1="data.zccs1" :list2="data.zccs2" @village='chooseVillage'></ylXZZC>
</div> </div>
</div> </div>
</div> </div>
@ -231,6 +231,9 @@ const leftchoose = ref({
const change = (name, index) => { const change = (name, index) => {
leftchoose.value[name] = index; leftchoose.value[name] = index;
}; };
const chooseVillage=(village)=>{
console.log(village);
}
const data = reactive({ const data = reactive({
leftTop1: [], leftTop1: [],
leftTop2: [], leftTop2: [],