From ec8ff4f6259404460a0b4437e29a40986c2c4b9d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 12 十月 2026 18:31:43 +0800
Subject: [PATCH] feat(workflow): 集成自动化审批功能并优化多个业务模块
---
src/views/energy/shared.ts | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/views/energy/shared.ts b/src/views/energy/shared.ts
new file mode 100644
index 0000000..d59185c
--- /dev/null
+++ b/src/views/energy/shared.ts
@@ -0,0 +1,18 @@
+import type { EnergyType } from '#/api/energy';
+
+export const energyOptions = [
+ { label: '姘�', value: 'WATER' },
+ { label: '鐢�', value: 'ELECTRICITY' },
+ { label: '钂告苯', value: 'STEAM' },
+];
+export const energyInfo: Record<EnergyType, { name: string; unit: string; color: string }> = {
+ WATER: { name: '姘�', unit: 'm鲁', color: '#1677ff' },
+ ELECTRICITY: { name: '鐢�', unit: 'kWh', color: '#d48806' },
+ STEAM: { name: '钂告苯', unit: 't', color: '#389e0d' },
+};
+export const productOptions = ['鐕曠獫', '婊嬭ˉ鍝佸師娴�', '鍏敤鑳借��', '鍏朵粬'].map(value => ({ label: value, value }));
+export const areaOptions = ['鐕曠獫鐢熶骇鍖�', '鍘熸祮鐢熶骇鍖�', '娓呮礂鍖�', '鐏弻鍖�', '鐏岃鍖呰鍖�', '鍔ㄥ姏绔�', '浠撳偍鍖�', '鍔炲叕鐢熸椿鍖�'].map(value => ({ value }));
+export const purposeOptions = ['鍘熸枡娓呮礂', '璁惧娓呮礂 / CIP', '钂哥叜鎻愬彇', '鐏弻', '鐏岃鍖呰', '鍒跺喎', '閲囨殩', '鏃ュ父鐢ㄨ兘'].map(value => ({ value }));
+export function numberText(value: number | undefined, digits = 3) {
+ return Number(value ?? 0).toLocaleString('zh-CN', { maximumFractionDigits: digits, minimumFractionDigits: digits === 2 ? 2 : 0 });
+}
--
Gitblit v1.9.3