From ea5759573821bbd2b633c52c7fc8ad268eb9baf1 Mon Sep 17 00:00:00 2001 From: cuiyouliang Date: Wed, 11 Jun 2025 16:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=83=A8=E5=88=86=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.ts | 19 ++++ src/views/oms/order/index.vue | 174 ++++++++++++++++++++-------------- vite.config.ts | 4 +- 3 files changed, 124 insertions(+), 73 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 2b0aad5..8347e82 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -316,3 +316,22 @@ export const removeClass = (ele: HTMLElement, cls: string) => { export const isExternal = (path: string) => { return /^(https?:|http?:|mailto:|tel:)/.test(path); }; + +// 获取枚举值的中文label回显 +/** + *@param id 要匹配的id + *@param emuList枚举值 + */ +export const getEmulistLabelById = (id: string, emuList: any) => { + if (!id) { + return '--'; + } + if (emuList && emuList.length) { + const { label } = emuList.find((item: any) => { + return item.value == id; + }); + return label || '--'; + } else { + return '--'; + } +}; diff --git a/src/views/oms/order/index.vue b/src/views/oms/order/index.vue index db90371..b221ccd 100644 --- a/src/views/oms/order/index.vue +++ b/src/views/oms/order/index.vue @@ -1,18 +1,17 @@