From 1e77723d6fbc3b6b58a5b712cdc81421d01c2b00 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 3 Jun 2024 19:15:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0Enum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/enum.js | 11 +++++++++++ src/utils/verificate.js | 1 + 2 files changed, 12 insertions(+) diff --git a/src/utils/enum.js b/src/utils/enum.js index c6b6f4b7..66c03736 100644 --- a/src/utils/enum.js +++ b/src/utils/enum.js @@ -106,6 +106,17 @@ export const iMEnum = new EnumFactory({ 30: '都开为开/单停为停', }, parseInt) +export const qTypeEnum = new EnumFactory({ + 10: '单选', + 20: '多选', + 30: '判断', +}, parseInt) + +export const qLevelEnum = new EnumFactory({ + 10: '低', + 20: '中', + 30: '高', +}, parseInt) export const mpointTypeEnum = new EnumFactory({ 10: '自动采集', diff --git a/src/utils/verificate.js b/src/utils/verificate.js index 51c97443..71f523b2 100644 --- a/src/utils/verificate.js +++ b/src/utils/verificate.js @@ -27,6 +27,7 @@ export function genTree(data) { const map = {} data.forEach(item => { item.label = item.name + item.parentId = item.parent if(item.fullname){ item.label = item.fullname }