From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/views/dashboard/bagCodeHome/modules/batch-status-chart.vue | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/src/views/dashboard/bagCodeHome/modules/batch-status-chart.vue b/src/views/dashboard/bagCodeHome/modules/batch-status-chart.vue
new file mode 100644
index 0000000..45a27ff
--- /dev/null
+++ b/src/views/dashboard/bagCodeHome/modules/batch-status-chart.vue
@@ -0,0 +1,43 @@
+<script lang="ts" setup>
+import type { EchartsUIType } from '@vben/plugins/echarts';
+import type { MesBagCodeHomeApi } from '#/api/mes/bag-code-home';
+
+import { ref, watch } from 'vue';
+
+import { DICT_TYPE } from '@vben/constants';
+import { getDictLabel } from '@vben/hooks';
+import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
+
+import { Card } from 'ant-design-vue';
+
+import { getStatusChartOptions } from '../chart-options';
+import { BATCH_STATUS_COLOR_MAP } from '../data';
+
+defineOptions({ name: 'BagCodeHomeBatchStatusChart' });
+
+const props = defineProps<{
+ list: MesBagCodeHomeApi.StatusItem[];
+}>();
+
+const chartRef = ref<EchartsUIType>();
+const { renderEcharts } = useEcharts(chartRef);
+
+watch(
+ () => props.list,
+ async (list) => {
+ const data = list.map((item) => ({
+ itemStyle: { color: BATCH_STATUS_COLOR_MAP[item.status] || '#909399' },
+ name: getDictLabel(DICT_TYPE.MES_PRO_BATCH_STATUS, item.status) || `鐘舵��${item.status}`,
+ value: item.count,
+ }));
+ await renderEcharts(getStatusChartOptions(data));
+ },
+ { immediate: true },
+);
+</script>
+
+<template>
+ <Card title="鎵规鐘舵�佸垎甯�" class="h-full">
+ <EchartsUI ref="chartRef" class="h-[320px] w-full" />
+ </Card>
+</template>
--
Gitblit v1.9.3