变更台账导出功能完成

This commit is contained in:
2026-09-30 09:15:33 +08:00
parent 7352d5c186
commit 3f6b16f8be
5 changed files with 62 additions and 7 deletions
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { useEcharts } from '@/hooks/common/echarts';
defineOptions({
@@ -8,6 +8,10 @@ defineOptions({
const props = defineProps(['data','typeList'])
watch(() => props.data, (newVal:any) => {
init();
});
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
trigger: 'item',
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { useEcharts } from '@/hooks/common/echarts';
defineOptions({
@@ -7,6 +7,9 @@ defineOptions({
});
const props = defineProps(['data'])
watch(() => props.data, (newVal:any) => {
init();
});
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref } from 'vue';
import { watch, nextTick } from 'vue';
import { useEcharts } from '@/hooks/common/echarts';
defineOptions({
@@ -7,6 +7,11 @@ defineOptions({
});
const props = defineProps(['data','total'])
watch(() => [props.data, props.total], () => {
nextTick(() => {
init();
});
},{immediate: true,deep: true});
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
@@ -24,7 +29,7 @@ const { domRef, updateOptions } = useEcharts(() => ({
},
},
title: {
text: `{a|${props.total}}\n{b|已评价}`,
text: '',
textStyle: {
rich: {
a: {
@@ -77,6 +82,7 @@ function init() {
name: item.label,
value: item.count
}));
opts.title.text = `{a|${props.total}}\n{b|已评价}`;
opts.series[0].data = result || [];
opts.series[0].color = ["#52c41a", "#faad14", "#f5222d", "#94A3B8"];
return opts;