huangxiaoqiang
2026-03-17 c52beb3de8041240d8c5c530d46797ecbdbdabdb
项目代码/WCS/WCSServer/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -362,6 +362,30 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "enanleEnum":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(EnanleEnum);
                            List<int> enums = Enum.GetValues(typeof(EnanleEnum)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(EnanleEnum).GetField(((EnanleEnum)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                }
                return result;
            }