<template>
	<div class="mapChartsWrap">
		<Echarts :option="mapOption"></Echarts>
	</div>
</template>

<script setup>
import Echarts from "@/components/Chart/index.vue";
import { getMapOption } from "../../utils/charts";
import { ref, onMounted, shallowRef } from "vue";
import { getAreaDistribution } from "@/api/exportControl";

// 这儿接收父组件传递过来的date参数
const props = defineProps({
	date: {
		type: String,
		default: ""
	}
});

const mapOption = shallowRef({});
onMounted(() => {
	mapOption.value = getMapOption();
	// 区域分布查询
	getAreaDistribution(props.date).then(res => {
		console.log("res", res);
	});
});
</script>

<style lang="scss" scoped>
.mapChartsWrap {
	width: 100%;
	height: 100%;
}
</style>
