统计报表页面 时间范围切换 echarts图表更新修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { useEcharts } from '@/hooks/common/echarts';
|
||||
|
||||
defineOptions({
|
||||
@@ -7,6 +7,11 @@ defineOptions({
|
||||
});
|
||||
|
||||
const props = defineProps<{ data: { org_name: string; count: number; }[]; }>();
|
||||
watch(() => [props.data], () => {
|
||||
nextTick(() => {
|
||||
init();
|
||||
});
|
||||
},{immediate: true,deep: true});
|
||||
|
||||
const { domRef, updateOptions } = useEcharts(() => ({
|
||||
tooltip: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { useEcharts } from '@/hooks/common/echarts';
|
||||
|
||||
defineOptions({
|
||||
@@ -7,6 +7,11 @@ defineOptions({
|
||||
});
|
||||
|
||||
const props = defineProps<{ data?: { name: string; value: number }[]; }>();
|
||||
watch(() => [props.data], () => {
|
||||
nextTick(() => {
|
||||
init();
|
||||
});
|
||||
},{immediate: true,deep: true});
|
||||
const chartData = ref<{ name: string; value: number; }[]>([]);
|
||||
|
||||
const { domRef, updateOptions } = useEcharts(() => ({
|
||||
|
||||
Reference in New Issue
Block a user