1
qinchulong
2025-03-03 c3b8825e0d0cc99aeb5cc380ace9259adbc69304
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -172,6 +172,30 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "mateType":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(MateTypeEnum);
                            List<int> enums = Enum.GetValues(type).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = type.GetField(((MateTypeEnum)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;
                    case "taskType":
                        {
                            List<object> data = new List<object>();