1
dengjunjie
2025-10-27 a3b0d1807604a9f48979453c1a2e4053ae045552
新建文件夹/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -218,6 +218,29 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "TacticsEnum":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(TacticsEnum);
                            List<int> enums = Enum.GetValues(typeof(TacticsEnum)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(TacticsEnum).GetField(((TacticsEnum)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;
            }