From e3176306d81874ab34ece6fb0d030d9a47d30598 Mon Sep 17 00:00:00 2001 From: Cyrus Zhou Date: Sat, 28 Jun 2025 14:23:03 +0200 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Entity/SysLang.cs | 86 +++ .../Admin.NET.Core/Enum/DirectionEnum.cs | 25 + Admin.NET/Admin.NET.Core/Enum/WeekEnum.cs | 51 ++ .../SeedData/SysLangSeedData.cs | 114 ++++ .../SeedData/SysMenuSeedData.cs | 7 + .../Service/Lang/Dto/SysLangDto.cs | 109 ++++ .../Service/Lang/Dto/SysLangInput.cs | 418 ++++++++++++++ .../Service/Lang/Dto/SysLangOutput.cs | 118 ++++ .../Service/Lang/SysLangService.cs | 111 ++++ Web/src/api-services/api.ts | 1 + Web/src/api-services/apis/sys-lang-api.ts | 513 ++++++++++++++++++ .../api-services/models/add-sys-lang-input.ts | 94 ++++ ...lt-sql-sugar-paged-list-sys-lang-output.ts | 57 ++ .../models/admin-result-sys-lang.ts | 57 ++ .../models/delete-sys-lang-input.ts | 26 + Web/src/api-services/models/direction-enum.ts | 23 + .../models/move-db-column-input.ts | 44 ++ .../models/page-sys-lang-input.ts | 106 ++++ .../sql-sugar-paged-list-sys-lang-output.ts | 63 +++ .../api-services/models/sys-lang-output.ts | 136 +++++ Web/src/api-services/models/sys-lang.ts | 136 +++++ .../models/update-sys-lang-input.ts | 100 ++++ Web/src/api-services/models/week-enum.ts | 28 + Web/src/layout/navBars/topBar/user.vue | 14 +- .../system/lang/component/editDialog.vue | 177 ++++++ Web/src/views/system/lang/index.vue | 171 ++++++ 26 files changed, 2780 insertions(+), 5 deletions(-) create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysLang.cs create mode 100644 Admin.NET/Admin.NET.Core/Enum/DirectionEnum.cs create mode 100644 Admin.NET/Admin.NET.Core/Enum/WeekEnum.cs create mode 100644 Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangDto.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangInput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangOutput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs create mode 100644 Web/src/api-services/apis/sys-lang-api.ts create mode 100644 Web/src/api-services/models/add-sys-lang-input.ts create mode 100644 Web/src/api-services/models/admin-result-sql-sugar-paged-list-sys-lang-output.ts create mode 100644 Web/src/api-services/models/admin-result-sys-lang.ts create mode 100644 Web/src/api-services/models/delete-sys-lang-input.ts create mode 100644 Web/src/api-services/models/direction-enum.ts create mode 100644 Web/src/api-services/models/move-db-column-input.ts create mode 100644 Web/src/api-services/models/page-sys-lang-input.ts create mode 100644 Web/src/api-services/models/sql-sugar-paged-list-sys-lang-output.ts create mode 100644 Web/src/api-services/models/sys-lang-output.ts create mode 100644 Web/src/api-services/models/sys-lang.ts create mode 100644 Web/src/api-services/models/update-sys-lang-input.ts create mode 100644 Web/src/api-services/models/week-enum.ts create mode 100644 Web/src/views/system/lang/component/editDialog.vue create mode 100644 Web/src/views/system/lang/index.vue diff --git a/Admin.NET/Admin.NET.Core/Entity/SysLang.cs b/Admin.NET/Admin.NET.Core/Entity/SysLang.cs new file mode 100644 index 000000000..18cdf4d11 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysLang.cs @@ -0,0 +1,86 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +[SugarTable(null, "语言配置")] +[SysTable] +[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)] +[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)] +public class SysLang : EntityBase +{ + /// + /// 语言名称 + /// + [SugarColumn( ColumnDescription = "语言名称")] + public string Name { get; set; } + + /// + /// 语言代码(如 zh_CN) + /// + [SugarColumn(ColumnDescription = "语言代码")] + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + [SugarColumn(ColumnDescription = "ISO 语言代码")] + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + [SugarColumn(ColumnDescription = "URL 语言代码")] + public string UrlCode { get; set; } + + /// + /// 书写方向(1=从左到右,2=从右到左) + /// + [SugarColumn(ColumnDescription = "书写方向",DefaultValue ="1")] + public DirectionEnum Direction { get; set; }= DirectionEnum.Ltr; + + /// + /// 日期格式(如 YYYY-MM-DD) + /// + [SugarColumn(ColumnDescription = "日期格式")] + public string DateFormat { get; set; } + + /// + /// 时间格式(如 HH:MM:SS) + /// + [SugarColumn(ColumnDescription = "时间格式")] + public string TimeFormat { get; set; } + + /// + /// 每周起始日(如 0=星期日,1=星期一) + /// + [SugarColumn(ColumnDescription = "每周起始日", DefaultValue ="7")] + public WeekEnum WeekStart { get; set; }= WeekEnum.Sunday; + + /// + /// 分组符号(如 ,) + /// + [SugarColumn( ColumnDescription = "分组符号")] + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + [SugarColumn(ColumnDescription = "小数点符号")] + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + [SugarColumn( ColumnDescription = "千分位分隔符")] + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + [SugarColumn( ColumnDescription = "是否启用")] + public bool Active { get; set; } +} diff --git a/Admin.NET/Admin.NET.Core/Enum/DirectionEnum.cs b/Admin.NET/Admin.NET.Core/Enum/DirectionEnum.cs new file mode 100644 index 000000000..cdbfe2e4d --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Enum/DirectionEnum.cs @@ -0,0 +1,25 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 书写方向枚举 +/// +[Description("书写方向枚举")] +public enum DirectionEnum +{ + /// + /// 从左到右 + /// + [Description("从左到右")] + Ltr=1, + /// + /// 从右到左 + /// + [Description("从右到左")] + Rtl=2 +} diff --git a/Admin.NET/Admin.NET.Core/Enum/WeekEnum.cs b/Admin.NET/Admin.NET.Core/Enum/WeekEnum.cs new file mode 100644 index 000000000..b69eaa0d8 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Enum/WeekEnum.cs @@ -0,0 +1,51 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 周枚举 +/// +[Description("周枚举")] +public enum WeekEnum +{ + /// + /// 周一 + /// + [Description("周一")] + Monday = 1, + /// + /// 周二 + /// + [Description("周二")] + Tuesday = 2, + /// + /// 周三 + /// + [Description("周三")] + Wednesday = 3, + /// + /// 周四 + /// + [Description("周四")] + Thursday = 4, + /// + /// 周五 + /// + [Description("周五")] + Friday = 5, + /// + /// 周六 + /// + [Description("周六")] + Saturday = 6, + /// + /// 周日 + /// + [Description("周日")] + Sunday = 7, + +} diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs new file mode 100644 index 000000000..b95ef0033 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs @@ -0,0 +1,114 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical; + +namespace Admin.NET.Core; + +/// +/// 系统字典类型表种子数据 +/// +public class SysLangSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + new SysLang{ Id=1300000000001,Name="Chinese (Simplified) / 简体中文", Code="zh_CN", IsoCode="zh_CN", UrlCode="zh-cn", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日", TimeFormat="%H时%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, + new SysLang{ Id=1300000000002,Name="Chinese (HK) / 繁體中文", Code="zh_HK", IsoCode="zh_HK", UrlCode="zh-hk", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日 %A", TimeFormat="%I時%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, + new SysLang{ Id=1300000000003,Name="Chinese (Traditional) / 繁體中文", Code="zh_TW", IsoCode="zh_TW", UrlCode="zh-tw", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日", TimeFormat="%H時%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, + new SysLang{ Id=1300000000004,Name="Italian / Italiano", Code="it_IT", IsoCode="it", UrlCode="it", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=true}, + new SysLang{ Id=1300000000005,Name="English (US)", Code="en_US", IsoCode="en", UrlCode="en", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000006,Name="Amharic / አምሃርኛ", Code="am_ET", IsoCode="am_ET", UrlCode="am-et", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000007,Name="Arabic / الْعَرَبيّة", Code="ar_001", IsoCode="ar", UrlCode="ar", Direction=DirectionEnum.Rtl, DateFormat="%d %b, %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Saturday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000008,Name="Arabic (Syria) / الْعَرَبيّة", Code="ar_SY", IsoCode="ar_SY", UrlCode="ar-sy", Direction=DirectionEnum.Rtl, DateFormat="%d %b, %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Saturday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000009,Name="Azerbaijani / Azərbaycanca", Code="az_AZ", IsoCode="az", UrlCode="az", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000010,Name="Basque / Euskara", Code="eu_ES", IsoCode="eu_ES", UrlCode="eu-es", Direction=DirectionEnum.Ltr, DateFormat="%a, %Y.eko %bren %da", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000011,Name="Bengali / বাংলা", Code="bn_IN", IsoCode="bn_IN", UrlCode="bn-in", Direction=DirectionEnum.Ltr, DateFormat="%A %d %b %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000012,Name="Bosnian / bosanski jezik", Code="bs_BA", IsoCode="bs", UrlCode="bs", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000013,Name="Bulgarian / български език", Code="bg_BG", IsoCode="bg", UrlCode="bg", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H,%M,%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000014,Name="Catalan / Català", Code="ca_ES", IsoCode="ca_ES", UrlCode="ca-es", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000015,Name="Croatian / hrvatski jezik", Code="hr_HR", IsoCode="hr", UrlCode="hr", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000016,Name="Czech / Čeština", Code="cs_CZ", IsoCode="cs_CZ", UrlCode="cs-cz", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000017,Name="Danish / Dansk", Code="da_DK", IsoCode="da_DK", UrlCode="da-dk", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000018,Name="Dutch (BE) / Nederlands (BE)", Code="nl_BE", IsoCode="nl_BE", UrlCode="nl-be", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000019,Name="Dutch / Nederlands", Code="nl_NL", IsoCode="nl", UrlCode="nl", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000020,Name="English (AU)", Code="en_AU", IsoCode="en_AU", UrlCode="en-au", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000021,Name="English (CA)", Code="en_CA", IsoCode="en_CA", UrlCode="en-ca", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000022,Name="English (UK)", Code="en_GB", IsoCode="en_GB", UrlCode="en-gb", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000023,Name="English (IN)", Code="en_IN", IsoCode="en_IN", UrlCode="en-in", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,2,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000024,Name="Estonian / Eesti keel", Code="et_EE", IsoCode="et", UrlCode="et", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000025,Name="Finnish / Suomi", Code="fi_FI", IsoCode="fi", UrlCode="fi", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H.%M.%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000026,Name="French (BE) / Français (BE)", Code="fr_BE", IsoCode="fr_BE", UrlCode="fr-be", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000027,Name="French (CA) / Français (CA)", Code="fr_CA", IsoCode="fr_CA", UrlCode="fr-ca", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000028,Name="French (CH) / Français (CH)", Code="fr_CH", IsoCode="fr_CH", UrlCode="fr-ch", Direction=DirectionEnum.Ltr, DateFormat="%d. %m. %Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep="'",Active=false}, + new SysLang{ Id=1300000000029,Name="French / Français", Code="fr_FR", IsoCode="fr", UrlCode="fr", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000030,Name="Galician / Galego", Code="gl_ES", IsoCode="gl", UrlCode="gl", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000031,Name="Georgian / ქართული ენა", Code="ka_GE", IsoCode="ka", UrlCode="ka", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000032,Name="German / Deutsch", Code="de_DE", IsoCode="de", UrlCode="de", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000033,Name="German (CH) / Deutsch (CH)", Code="de_CH", IsoCode="de_CH", UrlCode="de-ch", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,3]",DecimalPoint=".",ThousandsSep="'",Active=false}, + new SysLang{ Id=1300000000034,Name="Greek / Ελληνικά", Code="el_GR", IsoCode="el_GR", UrlCode="el-gr", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000035,Name="Gujarati / ગુજરાતી", Code="gu_IN", IsoCode="gu", UrlCode="gu", Direction=DirectionEnum.Ltr, DateFormat="%A %d %b %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000036,Name="Hebrew / עִבְרִי", Code="he_IL", IsoCode="he", UrlCode="he", Direction=DirectionEnum.Rtl, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000037,Name="Hindi / हिंदी", Code="hi_IN", IsoCode="hi", UrlCode="hi", Direction=DirectionEnum.Ltr, DateFormat="%A %d %b %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000038,Name="Hungarian / Magyar", Code="hu_HU", IsoCode="hu", UrlCode="hu", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000039,Name="Indonesian / Bahasa Indonesia", Code="id_ID", IsoCode="id", UrlCode="id", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000040,Name="Japanese / 日本語", Code="ja_JP", IsoCode="ja", UrlCode="ja", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日", TimeFormat="%H時%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000041,Name="Kabyle / Taqbaylit", Code="kab_DZ", IsoCode="kab", UrlCode="kab", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Saturday,Grouping="[]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000042,Name="Khmer / ភាសាខ្មែរ", Code="km_KH", IsoCode="km", UrlCode="km", Direction=DirectionEnum.Ltr, DateFormat="%d %B %Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000043,Name="Korean (KP) / 한국어 (KP)", Code="ko_KP", IsoCode="ko_KP", UrlCode="ko-kp", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000044,Name="Korean (KR) / 한국어 (KR)", Code="ko_KR", IsoCode="ko_KR", UrlCode="ko-kr", Direction=DirectionEnum.Ltr, DateFormat="%Y년 %m월 %d일", TimeFormat="%H시 %M분 %S초",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000045,Name="Lao / ພາສາລາວ", Code="lo_LA", IsoCode="lo", UrlCode="lo", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000046,Name="Latvian / latviešu valoda", Code="lv_LV", IsoCode="lv", UrlCode="lv", Direction=DirectionEnum.Ltr, DateFormat="%Y.%m.%d.", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000047,Name="Lithuanian / Lietuvių kalba", Code="lt_LT", IsoCode="lt", UrlCode="lt", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000048,Name="Luxembourgish", Code="lb_LU", IsoCode="lb", UrlCode="lb", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000049,Name="Macedonian / македонски јазик", Code="mk_MK", IsoCode="mk", UrlCode="mk", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000050,Name="Malayalam / മലയാളം", Code="ml_IN", IsoCode="ml", UrlCode="ml", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000051,Name="Mongolian / монгол", Code="mn_MN", IsoCode="mn", UrlCode="mn", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep="'",Active=false}, + new SysLang{ Id=1300000000052,Name="Malay / Bahasa Melayu", Code="ms_MY", IsoCode="ms", UrlCode="ms", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000053,Name="Norwegian Bokmål / Norsk bokmål", Code="nb_NO", IsoCode="nb_NO", UrlCode="nb-no", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000054,Name="Persian / فارسی", Code="fa_IR", IsoCode="fa", UrlCode="fa", Direction=DirectionEnum.Rtl, DateFormat="%Y/%m/%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Saturday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000055,Name="Polish / Język polski", Code="pl_PL", IsoCode="pl", UrlCode="pl", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000056,Name="Portuguese (AO) / Português (AO)", Code="pt_AO", IsoCode="pt_AO", UrlCode="pt-ao", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000057,Name="Portuguese (BR) / Português (BR)", Code="pt_BR", IsoCode="pt_BR", UrlCode="pt-br", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000058,Name="Portuguese / Português", Code="pt_PT", IsoCode="pt", UrlCode="pt", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000059,Name="Romanian / română", Code="ro_RO", IsoCode="ro", UrlCode="ro", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000060,Name="Russian / русский язык", Code="ru_RU", IsoCode="ru", UrlCode="ru", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000061,Name="Serbian (Cyrillic) / српски", Code="sr_RS", IsoCode="sr_RS", UrlCode="sr-rs", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y.", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[]",DecimalPoint=",",ThousandsSep="null",Active=false}, + new SysLang{ Id=1300000000062,Name="Serbian (Latin) / srpski", Code="sr@latin", IsoCode="sr@latin", UrlCode="sr@latin", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Sunday,Grouping="[]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000063,Name="Slovak / Slovenský jazyk", Code="sk_SK", IsoCode="sk", UrlCode="sk", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000064,Name="Slovenian / slovenščina", Code="sl_SI", IsoCode="sl", UrlCode="sl", Direction=DirectionEnum.Ltr, DateFormat="%d. %m. %Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000065,Name="Spanish (AR) / Español (AR)", Code="es_AR", IsoCode="es_AR", UrlCode="es-ar", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000066,Name="Spanish (BO) / Español (BO)", Code="es_BO", IsoCode="es_BO", UrlCode="es-bo", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000067,Name="Spanish (CL) / Español (CL)", Code="es_CL", IsoCode="es_CL", UrlCode="es-cl", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000068,Name="Spanish (CO) / Español (CO)", Code="es_CO", IsoCode="es_CO", UrlCode="es-co", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000069,Name="Spanish (CR) / Español (CR)", Code="es_CR", IsoCode="es_CR", UrlCode="es-cr", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000070,Name="Spanish (DO) / Español (DO)", Code="es_DO", IsoCode="es_DO", UrlCode="es-do", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000071,Name="Spanish (EC) / Español (EC)", Code="es_EC", IsoCode="es_EC", UrlCode="es-ec", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000072,Name="Spanish (GT) / Español (GT)", Code="es_GT", IsoCode="es_GT", UrlCode="es-gt", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000073,Name="Spanish (MX) / Español (MX)", Code="es_MX", IsoCode="es_MX", UrlCode="es-mx", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000074,Name="Spanish (PA) / Español (PA)", Code="es_PA", IsoCode="es_PA", UrlCode="es-pa", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000075,Name="Spanish (PE) / Español (PE)", Code="es_PE", IsoCode="es_PE", UrlCode="es-pe", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000076,Name="Spanish (PY) / Español (PY)", Code="es_PY", IsoCode="es_PY", UrlCode="es-py", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000077,Name="Spanish (UY) / Español (UY)", Code="es_UY", IsoCode="es_UY", UrlCode="es-uy", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000078,Name="Spanish (VE) / Español (VE)", Code="es_VE", IsoCode="es_VE", UrlCode="es-ve", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000079,Name="Spanish / Español", Code="es_ES", IsoCode="es", UrlCode="es", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000080,Name="Swedish / Svenska", Code="sv_SE", IsoCode="sv", UrlCode="sv", Direction=DirectionEnum.Ltr, DateFormat="%Y-%m-%d", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000081,Name="Thai / ภาษาไทย", Code="th_TH", IsoCode="th", UrlCode="th", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000082,Name="Tagalog / Filipino", Code="tl_PH", IsoCode="tl", UrlCode="tl", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000083,Name="Turkish / Türkçe", Code="tr_TR", IsoCode="tr", UrlCode="tr", Direction=DirectionEnum.Ltr, DateFormat="%d-%m-%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000084,Name="Ukrainian / українська", Code="uk_UA", IsoCode="uk", UrlCode="uk", Direction=DirectionEnum.Ltr, DateFormat="%d.%m.%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=" ",Active=false}, + new SysLang{ Id=1300000000085,Name="Vietnamese / Tiếng Việt", Code="vi_VN", IsoCode="vi", UrlCode="vi", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000086,Name="Albanian / Shqip", Code="sq_AL", IsoCode="sq", UrlCode="sq", Direction=DirectionEnum.Ltr, DateFormat="%Y-%b-%d", TimeFormat="%I.%M.%S.",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=false}, + new SysLang{ Id=1300000000087,Name="Telugu / తెలుగు", Code="te_IN", IsoCode="te", UrlCode="te", Direction=DirectionEnum.Ltr, DateFormat="%B %d %A %Y", TimeFormat="%p%I.%M.%S",WeekStart=WeekEnum.Sunday,Grouping="[]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000088,Name="Burmese / ဗမာစာ", Code="my_MM", IsoCode="my", UrlCode="mya", Direction=DirectionEnum.Ltr, DateFormat="%Y %b %d %A", TimeFormat="%I:%M:%S %p",WeekStart=WeekEnum.Sunday,Grouping="[3,3]",DecimalPoint=".",ThousandsSep=",",Active=false}, + }; + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs index 0ea47802d..fd2ad50db 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs @@ -172,6 +172,13 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1300200090301, Pid=1300200090101, Title="编辑", Permission="sysTenantConfig:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1300200090401, Pid=1300200090101, Title="增加", Permission="sysTenantConfig:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1300200090501, Pid=1300200090101, Title="删除", Permission="sysTenantConfig:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + // 语言管理 + new SysMenu{ Id=1300200100101, Pid=1300200000101, Title="语言管理", Path="/system/lang", Name="sysLang", Component="/system/lang/index", Icon="iconfont icon-zhongyingwen", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2025-06-28 00:00:00"), OrderNo=190 }, + new SysMenu{ Id=1300200100201, Pid=1300200100101, Title="查询", Permission="sysLang:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200100301, Pid=1300200100101, Title="编辑", Permission="sysLang:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200100401, Pid=1300200100101, Title="增加", Permission="sysLang:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200100501, Pid=1300200100101, Title="删除", Permission="sysLang:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, // 系统监控 new SysMenu{ Id=1300300070101, Pid=1300300000101, Title="系统监控", Path="/platform/server", Name="sysServer", Component="/system/server/index", Icon="ele-Monitor", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=150 }, diff --git a/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangDto.cs b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangDto.cs new file mode 100644 index 000000000..3a24449dd --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangDto.cs @@ -0,0 +1,109 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 语言输出参数 +/// +public class SysLangDto +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 语言名称 + /// + public string Name { get; set; } + + /// + /// 语言代码 + /// + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + public string UrlCode { get; set; } + + /// + /// 书写方向 + /// + public DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + public string DateFormat { get; set; } + + /// + /// 时间格式 + /// + public string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + public WeekEnum WeekStart { get; set; } + + /// + /// 分组符号 + /// + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + public bool Active { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangInput.cs b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangInput.cs new file mode 100644 index 000000000..060c2ce03 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangInput.cs @@ -0,0 +1,418 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 语言基础输入参数 +/// +public class SysLangBaseInput +{ + /// + /// 主键Id + /// + public virtual long? Id { get; set; } + + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + public virtual string Name { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + public virtual string Code { get; set; } + + /// + /// ISO 语言代码 + /// + [Required(ErrorMessage = "ISO 语言代码不能为空")] + public virtual string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + [Required(ErrorMessage = "URL 语言代码不能为空")] + public virtual string UrlCode { get; set; } + + /// + /// 书写方向 + /// + [Required(ErrorMessage = "书写方向不能为空")] + public virtual DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + [Required(ErrorMessage = "日期格式不能为空")] + public virtual string DateFormat { get; set; } + + /// + /// 时间格式 + /// + [Required(ErrorMessage = "时间格式不能为空")] + public virtual string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + [Required(ErrorMessage = "每周起始日不能为空")] + public virtual WeekEnum? WeekStart { get; set; } + + /// + /// 分组符号 + /// + [Required(ErrorMessage = "分组符号不能为空")] + public virtual string Grouping { get; set; } + + /// + /// 小数点符号 + /// + [Required(ErrorMessage = "小数点符号不能为空")] + public virtual string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + public virtual string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + [Required(ErrorMessage = "是否启用不能为空")] + public virtual bool? Active { get; set; } + +} + +/// +/// 多语言分页查询输入参数 +/// +public class PageSysLangInput : BasePageInput +{ + /// + /// 语言名称 + /// + public string Name { get; set; } + + /// + /// 语言代码 + /// + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + public string UrlCode { get; set; } + + /// + /// 是否启用 + /// + public bool? Active { get; set; } + + /// + /// 选中主键列表 + /// + public List SelectKeyList { get; set; } +} + +/// +/// 多语言增加输入参数 +/// +public class AddSysLangInput +{ + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + [MaxLength(255, ErrorMessage = "语言名称字符长度不能超过255")] + public string Name { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + [MaxLength(255, ErrorMessage = "语言代码字符长度不能超过255")] + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + [Required(ErrorMessage = "ISO 语言代码不能为空")] + [MaxLength(255, ErrorMessage = "ISO 语言代码字符长度不能超过255")] + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + [Required(ErrorMessage = "URL 语言代码不能为空")] + [MaxLength(255, ErrorMessage = "URL 语言代码字符长度不能超过255")] + public string UrlCode { get; set; } + + /// + /// 书写方向 + /// + [Required(ErrorMessage = "书写方向不能为空")] + public DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + [Required(ErrorMessage = "日期格式不能为空")] + [MaxLength(255, ErrorMessage = "日期格式字符长度不能超过255")] + public string DateFormat { get; set; } + + /// + /// 时间格式 + /// + [Required(ErrorMessage = "时间格式不能为空")] + [MaxLength(255, ErrorMessage = "时间格式字符长度不能超过255")] + public string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + [Required(ErrorMessage = "每周起始日不能为空")] + public WeekEnum? WeekStart { get; set; } + + /// + /// 分组符号 + /// + [Required(ErrorMessage = "分组符号不能为空")] + [MaxLength(255, ErrorMessage = "分组符号字符长度不能超过255")] + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + [Required(ErrorMessage = "小数点符号不能为空")] + [MaxLength(255, ErrorMessage = "小数点符号字符长度不能超过255")] + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + [MaxLength(255, ErrorMessage = "千分位分隔符字符长度不能超过255")] + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + [Required(ErrorMessage = "是否启用不能为空")] + public bool? Active { get; set; } + +} + +/// +/// 多语言删除输入参数 +/// +public class DeleteSysLangInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long? Id { get; set; } + +} + +/// +/// 多语言更新输入参数 +/// +public class UpdateSysLangInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long? Id { get; set; } + + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + [MaxLength(255, ErrorMessage = "语言名称字符长度不能超过255")] + public string Name { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + [MaxLength(255, ErrorMessage = "语言代码字符长度不能超过255")] + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + [Required(ErrorMessage = "ISO 语言代码不能为空")] + [MaxLength(255, ErrorMessage = "ISO 语言代码字符长度不能超过255")] + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + [Required(ErrorMessage = "URL 语言代码不能为空")] + [MaxLength(255, ErrorMessage = "URL 语言代码字符长度不能超过255")] + public string UrlCode { get; set; } + + /// + /// 书写方向 + /// + [Required(ErrorMessage = "书写方向不能为空")] + public DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + [Required(ErrorMessage = "日期格式不能为空")] + [MaxLength(255, ErrorMessage = "日期格式字符长度不能超过255")] + public string DateFormat { get; set; } + + /// + /// 时间格式 + /// + [Required(ErrorMessage = "时间格式不能为空")] + [MaxLength(255, ErrorMessage = "时间格式字符长度不能超过255")] + public string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + [Required(ErrorMessage = "每周起始日不能为空")] + public WeekEnum? WeekStart { get; set; } + + /// + /// 分组符号 + /// + [Required(ErrorMessage = "分组符号不能为空")] + [MaxLength(255, ErrorMessage = "分组符号字符长度不能超过255")] + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + [Required(ErrorMessage = "小数点符号不能为空")] + [MaxLength(255, ErrorMessage = "小数点符号字符长度不能超过255")] + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + [MaxLength(255, ErrorMessage = "千分位分隔符字符长度不能超过255")] + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + [Required(ErrorMessage = "是否启用不能为空")] + public bool? Active { get; set; } + +} + +/// +/// 多语言主键查询输入参数 +/// +public class QueryByIdSysLangInput : DeleteSysLangInput +{ +} + +/// +/// 多语言数据导入实体 +/// +[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)] +public class ImportSysLangInput : BaseImportInput +{ + /// + /// 语言名称 + /// + [ImporterHeader(Name = "*语言名称")] + [ExporterHeader("*语言名称", Format = "", Width = 25, IsBold = true)] + public string Name { get; set; } + + /// + /// 语言代码 + /// + [ImporterHeader(Name = "*语言代码")] + [ExporterHeader("*语言代码", Format = "", Width = 25, IsBold = true)] + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + [ImporterHeader(Name = "*ISO 语言代码")] + [ExporterHeader("*ISO 语言代码", Format = "", Width = 25, IsBold = true)] + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + [ImporterHeader(Name = "*URL 语言代码")] + [ExporterHeader("*URL 语言代码", Format = "", Width = 25, IsBold = true)] + public string UrlCode { get; set; } + + /// + /// 书写方向 + /// + [ImporterHeader(Name = "*书写方向")] + [ExporterHeader("*书写方向", Format = "", Width = 25, IsBold = true)] + public DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + [ImporterHeader(Name = "*日期格式")] + [ExporterHeader("*日期格式", Format = "", Width = 25, IsBold = true)] + public string DateFormat { get; set; } + + /// + /// 时间格式 + /// + [ImporterHeader(Name = "*时间格式")] + [ExporterHeader("*时间格式", Format = "", Width = 25, IsBold = true)] + public string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + [ImporterHeader(Name = "*每周起始日")] + [ExporterHeader("*每周起始日", Format = "", Width = 25, IsBold = true)] + public WeekEnum? WeekStart { get; set; } + + /// + /// 分组符号 + /// + [ImporterHeader(Name = "*分组符号")] + [ExporterHeader("*分组符号", Format = "", Width = 25, IsBold = true)] + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + [ImporterHeader(Name = "*小数点符号")] + [ExporterHeader("*小数点符号", Format = "", Width = 25, IsBold = true)] + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + [ImporterHeader(Name = "千分位分隔符")] + [ExporterHeader("千分位分隔符", Format = "", Width = 25, IsBold = true)] + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + [ImporterHeader(Name = "*是否启用")] + [ExporterHeader("*是否启用", Format = "", Width = 25, IsBold = true)] + public bool? Active { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangOutput.cs b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangOutput.cs new file mode 100644 index 000000000..75256ff4d --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/Lang/Dto/SysLangOutput.cs @@ -0,0 +1,118 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! +namespace Admin.NET.Core; + +/// +/// 语言输出参数 +/// +public class SysLangOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 语言名称 + /// + public string Name { get; set; } + + /// + /// 语言代码 + /// + public string Code { get; set; } + + /// + /// ISO 语言代码 + /// + public string IsoCode { get; set; } + + /// + /// URL 语言代码 + /// + public string UrlCode { get; set; } + + /// + /// 书写方向 + /// + public DirectionEnum Direction { get; set; } + + /// + /// 日期格式 + /// + public string DateFormat { get; set; } + + /// + /// 时间格式 + /// + public string TimeFormat { get; set; } + + /// + /// 每周起始日 + /// + public WeekEnum WeekStart { get; set; } + + /// + /// 分组符号 + /// + public string Grouping { get; set; } + + /// + /// 小数点符号 + /// + public string DecimalPoint { get; set; } + + /// + /// 千分位分隔符 + /// + public string? ThousandsSep { get; set; } + + /// + /// 是否启用 + /// + public bool Active { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + +} + +/// +/// 多语言数据导入模板实体 +/// +public class ExportSysLangOutput : ImportSysLangInput +{ + [ImporterHeader(IsIgnore = true)] + [ExporterHeader(IsIgnore = true)] + public override string Error { get; set; } +} diff --git a/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs b/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs new file mode 100644 index 000000000..ef0e3d2c7 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs @@ -0,0 +1,111 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core.Service; + +/// +/// 语言服务 🧩 +/// +[ApiDescriptionSettings(Order = 100, Description = "语言服务")] +public partial class SysLangService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _sysLangRep; + + public SysLangService(SqlSugarRepository sysLangRep) + { + _sysLangRep = sysLangRep; + } + + /// + /// 分页查询语言 🔖 + /// + /// + /// + [DisplayName("分页查询语言")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(PageSysLangInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _sysLangRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) || u.Code.Contains(input.Keyword) || u.IsoCode.Contains(input.Keyword) || u.UrlCode.Contains(input.Keyword)) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.IsoCode), u => u.IsoCode.Contains(input.IsoCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.UrlCode), u => u.UrlCode.Contains(input.UrlCode.Trim())) + .Select(); + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 获取语言详情 ℹ️ + /// + /// + /// + [DisplayName("获取语言详情")] + [ApiDescriptionSettings(Name = "Detail"), HttpGet] + public async Task Detail([FromQuery] QueryByIdSysLangInput input) + { + return await _sysLangRep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 增加语言 ➕ + /// + /// + /// + [DisplayName("增加语言")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddSysLangInput input) + { + var entity = input.Adapt(); + return await _sysLangRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新语言 ✏️ + /// + /// + /// + [DisplayName("更新语言")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateSysLangInput input) + { + var entity = input.Adapt(); + await _sysLangRep.AsUpdateable(entity) + .ExecuteCommandAsync(); + } + + /// + /// 删除语言 ❌ + /// + /// + /// + [DisplayName("删除语言")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(DeleteSysLangInput input) + { + var entity = await _sysLangRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _sysLangRep.DeleteAsync(entity); //真删除 + } + + /// + /// 获取下拉列表数据 🔖 + /// + /// + [DisplayName("获取下拉列表数据")] + [ApiDescriptionSettings(Name = "DropdownData"), HttpPost] + public async Task DropdownData() + { + var data = await _sysLangRep.Context.Queryable() + .Where(m => m.Active == true) + .Select(u => new + { + Value = u.UrlCode, + Label = $"{u.Name}" + }).ToListAsync(); + return data; + } +} diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index bfb38e7f9..1dca9d3b4 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -27,6 +27,7 @@ export * from './apis/sys-email-api'; export * from './apis/sys-enum-api'; export * from './apis/sys-file-api'; export * from './apis/sys-job-api'; +export * from './apis/sys-lang-api'; export * from './apis/sys-ldap-api'; export * from './apis/sys-log-diff-api'; export * from './apis/sys-log-ex-api'; diff --git a/Web/src/api-services/apis/sys-lang-api.ts b/Web/src/api-services/apis/sys-lang-api.ts new file mode 100644 index 000000000..3be0fa1ec --- /dev/null +++ b/Web/src/api-services/apis/sys-lang-api.ts @@ -0,0 +1,513 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysLangInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysLangOutput } from '../models'; +import { AdminResultSysLang } from '../models'; +import { DeleteSysLangInput } from '../models'; +import { PageSysLangInput } from '../models'; +import { UpdateSysLangInput } from '../models'; +/** + * SysLangApi - axios parameter creator + * @export + */ +export const SysLangApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加语言 ➕ + * @param {AddSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangAddPost: async (body?: AddSysLangInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLang/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除语言 ❌ + * @param {DeleteSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangDeletePost: async (body?: DeleteSysLangInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLang/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取语言详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysLangDetailGet.'); + } + const localVarPath = `/api/sysLang/detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + if (id !== undefined) { + localVarQueryParameter['Id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取下拉列表数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangDropdownDataPost: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLang/dropdownData`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询语言 🔖 + * @param {PageSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangPagePost: async (body?: PageSysLangInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLang/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新语言 ✏️ + * @param {UpdateSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangUpdatePost: async (body?: UpdateSysLangInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLang/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SysLangApi - functional programming interface + * @export + */ +export const SysLangApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary 增加语言 ➕ + * @param {AddSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangAddPost(body?: AddSysLangInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除语言 ❌ + * @param {DeleteSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDeletePost(body?: DeleteSysLangInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取语言详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangDetailGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取下拉列表数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDropdownDataPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangDropdownDataPost(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询语言 🔖 + * @param {PageSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangPagePost(body?: PageSysLangInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新语言 ✏️ + * @param {UpdateSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangUpdatePost(body?: UpdateSysLangInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangApiAxiosParamCreator(configuration).apiSysLangUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * SysLangApi - factory interface + * @export + */ +export const SysLangApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加语言 ➕ + * @param {AddSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangAddPost(body?: AddSysLangInput, options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除语言 ❌ + * @param {DeleteSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDeletePost(body?: DeleteSysLangInput, options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取语言详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDetailGet(id: number, options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangDetailGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取下拉列表数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangDropdownDataPost(options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangDropdownDataPost(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询语言 🔖 + * @param {PageSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangPagePost(body?: PageSysLangInput, options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新语言 ✏️ + * @param {UpdateSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangUpdatePost(body?: UpdateSysLangInput, options?: AxiosRequestConfig): Promise> { + return SysLangApiFp(configuration).apiSysLangUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SysLangApi - object-oriented interface + * @export + * @class SysLangApi + * @extends {BaseAPI} + */ +export class SysLangApi extends BaseAPI { + /** + * + * @summary 增加语言 ➕ + * @param {AddSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangAddPost(body?: AddSysLangInput, options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除语言 ❌ + * @param {DeleteSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangDeletePost(body?: DeleteSysLangInput, options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取语言详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangDetailGet(id: number, options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangDetailGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取下拉列表数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangDropdownDataPost(options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangDropdownDataPost(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询语言 🔖 + * @param {PageSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangPagePost(body?: PageSysLangInput, options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新语言 ✏️ + * @param {UpdateSysLangInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangApi + */ + public async apiSysLangUpdatePost(body?: UpdateSysLangInput, options?: AxiosRequestConfig) : Promise> { + return SysLangApiFp(this.configuration).apiSysLangUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/models/add-sys-lang-input.ts b/Web/src/api-services/models/add-sys-lang-input.ts new file mode 100644 index 000000000..858385419 --- /dev/null +++ b/Web/src/api-services/models/add-sys-lang-input.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DirectionEnum } from './direction-enum'; +import { WeekEnum } from './week-enum'; +/** + * 多语言增加输入参数 + * @export + * @interface AddSysLangInput + */ +export interface AddSysLangInput { + /** + * 语言名称 + * @type {string} + * @memberof AddSysLangInput + */ + name: string; + /** + * 语言代码 + * @type {string} + * @memberof AddSysLangInput + */ + code: string; + /** + * ISO 语言代码 + * @type {string} + * @memberof AddSysLangInput + */ + isoCode: string; + /** + * URL 语言代码 + * @type {string} + * @memberof AddSysLangInput + */ + urlCode: string; + /** + * + * @type {DirectionEnum} + * @memberof AddSysLangInput + */ + direction: DirectionEnum; + /** + * 日期格式 + * @type {string} + * @memberof AddSysLangInput + */ + dateFormat: string; + /** + * 时间格式 + * @type {string} + * @memberof AddSysLangInput + */ + timeFormat: string; + /** + * + * @type {WeekEnum} + * @memberof AddSysLangInput + */ + weekStart: WeekEnum; + /** + * 分组符号 + * @type {string} + * @memberof AddSysLangInput + */ + grouping: string; + /** + * 小数点符号 + * @type {string} + * @memberof AddSysLangInput + */ + decimalPoint: string; + /** + * 千分位分隔符 + * @type {string} + * @memberof AddSysLangInput + */ + thousandsSep?: string | null; + /** + * 是否启用 + * @type {boolean} + * @memberof AddSysLangInput + */ + active: boolean; +} diff --git a/Web/src/api-services/models/admin-result-sql-sugar-paged-list-sys-lang-output.ts b/Web/src/api-services/models/admin-result-sql-sugar-paged-list-sys-lang-output.ts new file mode 100644 index 000000000..c597b746e --- /dev/null +++ b/Web/src/api-services/models/admin-result-sql-sugar-paged-list-sys-lang-output.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SqlSugarPagedListSysLangOutput } from './sql-sugar-paged-list-sys-lang-output'; +/** + * 全局返回结果 + * @export + * @interface AdminResultSqlSugarPagedListSysLangOutput + */ +export interface AdminResultSqlSugarPagedListSysLangOutput { + /** + * 状态码 + * @type {number} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + code?: number; + /** + * 类型success、warning、error + * @type {string} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + type?: string | null; + /** + * 错误信息 + * @type {string} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + message?: string | null; + /** + * + * @type {SqlSugarPagedListSysLangOutput} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + result?: SqlSugarPagedListSysLangOutput; + /** + * 附加数据 + * @type {any} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + extras?: any | null; + /** + * 时间 + * @type {Date} + * @memberof AdminResultSqlSugarPagedListSysLangOutput + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-result-sys-lang.ts b/Web/src/api-services/models/admin-result-sys-lang.ts new file mode 100644 index 000000000..498bd536f --- /dev/null +++ b/Web/src/api-services/models/admin-result-sys-lang.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SysLang } from './sys-lang'; +/** + * 全局返回结果 + * @export + * @interface AdminResultSysLang + */ +export interface AdminResultSysLang { + /** + * 状态码 + * @type {number} + * @memberof AdminResultSysLang + */ + code?: number; + /** + * 类型success、warning、error + * @type {string} + * @memberof AdminResultSysLang + */ + type?: string | null; + /** + * 错误信息 + * @type {string} + * @memberof AdminResultSysLang + */ + message?: string | null; + /** + * + * @type {SysLang} + * @memberof AdminResultSysLang + */ + result?: SysLang; + /** + * 附加数据 + * @type {any} + * @memberof AdminResultSysLang + */ + extras?: any | null; + /** + * 时间 + * @type {Date} + * @memberof AdminResultSysLang + */ + time?: Date; +} diff --git a/Web/src/api-services/models/delete-sys-lang-input.ts b/Web/src/api-services/models/delete-sys-lang-input.ts new file mode 100644 index 000000000..435332e6a --- /dev/null +++ b/Web/src/api-services/models/delete-sys-lang-input.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * 多语言删除输入参数 + * @export + * @interface DeleteSysLangInput + */ +export interface DeleteSysLangInput { + /** + * 主键Id + * @type {number} + * @memberof DeleteSysLangInput + */ + id: number; +} diff --git a/Web/src/api-services/models/direction-enum.ts b/Web/src/api-services/models/direction-enum.ts new file mode 100644 index 000000000..7e941d770 --- /dev/null +++ b/Web/src/api-services/models/direction-enum.ts @@ -0,0 +1,23 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * 书写方向枚举
 从左到右 Ltr = 1
 从右到左 Rtl = 2
+ * @export + * @enum {string} + */ +export enum DirectionEnum { + NUMBER_1 = 1, + NUMBER_2 = 2 +} + diff --git a/Web/src/api-services/models/move-db-column-input.ts b/Web/src/api-services/models/move-db-column-input.ts new file mode 100644 index 000000000..92c9fa4b2 --- /dev/null +++ b/Web/src/api-services/models/move-db-column-input.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface MoveDbColumnInput + */ +export interface MoveDbColumnInput { + /** + * 数据库配置ID + * @type {string} + * @memberof MoveDbColumnInput + */ + configId?: string | null; + /** + * 目标表名 + * @type {string} + * @memberof MoveDbColumnInput + */ + tableName?: string | null; + /** + * 要移动的列名 + * @type {string} + * @memberof MoveDbColumnInput + */ + columnName?: string | null; + /** + * 移动到该列后方(为空时移动到首列) + * @type {string} + * @memberof MoveDbColumnInput + */ + afterColumnName?: string | null; +} diff --git a/Web/src/api-services/models/page-sys-lang-input.ts b/Web/src/api-services/models/page-sys-lang-input.ts new file mode 100644 index 000000000..3bbb1390c --- /dev/null +++ b/Web/src/api-services/models/page-sys-lang-input.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { Filter } from './filter'; +import { Search } from './search'; +/** + * 多语言分页查询输入参数 + * @export + * @interface PageSysLangInput + */ +export interface PageSysLangInput { + /** + * + * @type {Search} + * @memberof PageSysLangInput + */ + search?: Search; + /** + * 模糊查询关键字 + * @type {string} + * @memberof PageSysLangInput + */ + keyword?: string | null; + /** + * + * @type {Filter} + * @memberof PageSysLangInput + */ + filter?: Filter; + /** + * 当前页码 + * @type {number} + * @memberof PageSysLangInput + */ + page?: number; + /** + * 页码容量 + * @type {number} + * @memberof PageSysLangInput + */ + pageSize?: number; + /** + * 排序字段 + * @type {string} + * @memberof PageSysLangInput + */ + field?: string | null; + /** + * 排序方向 + * @type {string} + * @memberof PageSysLangInput + */ + order?: string | null; + /** + * 降序排序 + * @type {string} + * @memberof PageSysLangInput + */ + descStr?: string | null; + /** + * 语言名称 + * @type {string} + * @memberof PageSysLangInput + */ + name?: string | null; + /** + * 语言代码 + * @type {string} + * @memberof PageSysLangInput + */ + code?: string | null; + /** + * ISO 语言代码 + * @type {string} + * @memberof PageSysLangInput + */ + isoCode?: string | null; + /** + * URL 语言代码 + * @type {string} + * @memberof PageSysLangInput + */ + urlCode?: string | null; + /** + * 是否启用 + * @type {boolean} + * @memberof PageSysLangInput + */ + active?: boolean | null; + /** + * 选中主键列表 + * @type {Array} + * @memberof PageSysLangInput + */ + selectKeyList?: Array | null; +} diff --git a/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-output.ts b/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-output.ts new file mode 100644 index 000000000..c0f2100c2 --- /dev/null +++ b/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-output.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SysLangOutput } from './sys-lang-output'; +/** + * 分页泛型集合 + * @export + * @interface SqlSugarPagedListSysLangOutput + */ +export interface SqlSugarPagedListSysLangOutput { + /** + * 页码 + * @type {number} + * @memberof SqlSugarPagedListSysLangOutput + */ + page?: number; + /** + * 页容量 + * @type {number} + * @memberof SqlSugarPagedListSysLangOutput + */ + pageSize?: number; + /** + * 总条数 + * @type {number} + * @memberof SqlSugarPagedListSysLangOutput + */ + total?: number; + /** + * 总页数 + * @type {number} + * @memberof SqlSugarPagedListSysLangOutput + */ + totalPages?: number; + /** + * 当前页集合 + * @type {Array} + * @memberof SqlSugarPagedListSysLangOutput + */ + items?: Array | null; + /** + * 是否有上一页 + * @type {boolean} + * @memberof SqlSugarPagedListSysLangOutput + */ + hasPrevPage?: boolean; + /** + * 是否有下一页 + * @type {boolean} + * @memberof SqlSugarPagedListSysLangOutput + */ + hasNextPage?: boolean; +} diff --git a/Web/src/api-services/models/sys-lang-output.ts b/Web/src/api-services/models/sys-lang-output.ts new file mode 100644 index 000000000..a296dc760 --- /dev/null +++ b/Web/src/api-services/models/sys-lang-output.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DirectionEnum } from './direction-enum'; +import { WeekEnum } from './week-enum'; +/** + * 语言输出参数 + * @export + * @interface SysLangOutput + */ +export interface SysLangOutput { + /** + * 主键Id + * @type {number} + * @memberof SysLangOutput + */ + id?: number; + /** + * 语言名称 + * @type {string} + * @memberof SysLangOutput + */ + name?: string | null; + /** + * 语言代码 + * @type {string} + * @memberof SysLangOutput + */ + code?: string | null; + /** + * ISO 语言代码 + * @type {string} + * @memberof SysLangOutput + */ + isoCode?: string | null; + /** + * URL 语言代码 + * @type {string} + * @memberof SysLangOutput + */ + urlCode?: string | null; + /** + * + * @type {DirectionEnum} + * @memberof SysLangOutput + */ + direction?: DirectionEnum; + /** + * 日期格式 + * @type {string} + * @memberof SysLangOutput + */ + dateFormat?: string | null; + /** + * 时间格式 + * @type {string} + * @memberof SysLangOutput + */ + timeFormat?: string | null; + /** + * + * @type {WeekEnum} + * @memberof SysLangOutput + */ + weekStart?: WeekEnum; + /** + * 分组符号 + * @type {string} + * @memberof SysLangOutput + */ + grouping?: string | null; + /** + * 小数点符号 + * @type {string} + * @memberof SysLangOutput + */ + decimalPoint?: string | null; + /** + * 千分位分隔符 + * @type {string} + * @memberof SysLangOutput + */ + thousandsSep?: string | null; + /** + * 是否启用 + * @type {boolean} + * @memberof SysLangOutput + */ + active?: boolean; + /** + * 创建时间 + * @type {Date} + * @memberof SysLangOutput + */ + createTime?: Date | null; + /** + * 更新时间 + * @type {Date} + * @memberof SysLangOutput + */ + updateTime?: Date | null; + /** + * 创建者Id + * @type {number} + * @memberof SysLangOutput + */ + createUserId?: number | null; + /** + * 创建者姓名 + * @type {string} + * @memberof SysLangOutput + */ + createUserName?: string | null; + /** + * 修改者Id + * @type {number} + * @memberof SysLangOutput + */ + updateUserId?: number | null; + /** + * 修改者姓名 + * @type {string} + * @memberof SysLangOutput + */ + updateUserName?: string | null; +} diff --git a/Web/src/api-services/models/sys-lang.ts b/Web/src/api-services/models/sys-lang.ts new file mode 100644 index 000000000..cde7511c2 --- /dev/null +++ b/Web/src/api-services/models/sys-lang.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DirectionEnum } from './direction-enum'; +import { WeekEnum } from './week-enum'; +/** + * + * @export + * @interface SysLang + */ +export interface SysLang { + /** + * 雪花Id + * @type {number} + * @memberof SysLang + */ + id?: number; + /** + * 创建时间 + * @type {Date} + * @memberof SysLang + */ + createTime?: Date; + /** + * 更新时间 + * @type {Date} + * @memberof SysLang + */ + updateTime?: Date | null; + /** + * 创建者Id + * @type {number} + * @memberof SysLang + */ + createUserId?: number | null; + /** + * 创建者姓名 + * @type {string} + * @memberof SysLang + */ + createUserName?: string | null; + /** + * 修改者Id + * @type {number} + * @memberof SysLang + */ + updateUserId?: number | null; + /** + * 修改者姓名 + * @type {string} + * @memberof SysLang + */ + updateUserName?: string | null; + /** + * 语言名称 + * @type {string} + * @memberof SysLang + */ + name?: string | null; + /** + * 语言代码(如 zh_CN) + * @type {string} + * @memberof SysLang + */ + code?: string | null; + /** + * ISO 语言代码 + * @type {string} + * @memberof SysLang + */ + isoCode?: string | null; + /** + * URL 语言代码 + * @type {string} + * @memberof SysLang + */ + urlCode?: string | null; + /** + * + * @type {DirectionEnum} + * @memberof SysLang + */ + direction?: DirectionEnum; + /** + * 日期格式(如 YYYY-MM-DD) + * @type {string} + * @memberof SysLang + */ + dateFormat?: string | null; + /** + * 时间格式(如 HH:MM:SS) + * @type {string} + * @memberof SysLang + */ + timeFormat?: string | null; + /** + * + * @type {WeekEnum} + * @memberof SysLang + */ + weekStart?: WeekEnum; + /** + * 分组符号(如 ,) + * @type {string} + * @memberof SysLang + */ + grouping?: string | null; + /** + * 小数点符号 + * @type {string} + * @memberof SysLang + */ + decimalPoint?: string | null; + /** + * 千分位分隔符 + * @type {string} + * @memberof SysLang + */ + thousandsSep?: string | null; + /** + * 是否启用 + * @type {boolean} + * @memberof SysLang + */ + active?: boolean; +} diff --git a/Web/src/api-services/models/update-sys-lang-input.ts b/Web/src/api-services/models/update-sys-lang-input.ts new file mode 100644 index 000000000..3c1975a2e --- /dev/null +++ b/Web/src/api-services/models/update-sys-lang-input.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DirectionEnum } from './direction-enum'; +import { WeekEnum } from './week-enum'; +/** + * 多语言更新输入参数 + * @export + * @interface UpdateSysLangInput + */ +export interface UpdateSysLangInput { + /** + * 主键Id + * @type {number} + * @memberof UpdateSysLangInput + */ + id: number; + /** + * 语言名称 + * @type {string} + * @memberof UpdateSysLangInput + */ + name: string; + /** + * 语言代码 + * @type {string} + * @memberof UpdateSysLangInput + */ + code: string; + /** + * ISO 语言代码 + * @type {string} + * @memberof UpdateSysLangInput + */ + isoCode: string; + /** + * URL 语言代码 + * @type {string} + * @memberof UpdateSysLangInput + */ + urlCode: string; + /** + * + * @type {DirectionEnum} + * @memberof UpdateSysLangInput + */ + direction: DirectionEnum; + /** + * 日期格式 + * @type {string} + * @memberof UpdateSysLangInput + */ + dateFormat: string; + /** + * 时间格式 + * @type {string} + * @memberof UpdateSysLangInput + */ + timeFormat: string; + /** + * + * @type {WeekEnum} + * @memberof UpdateSysLangInput + */ + weekStart: WeekEnum; + /** + * 分组符号 + * @type {string} + * @memberof UpdateSysLangInput + */ + grouping: string; + /** + * 小数点符号 + * @type {string} + * @memberof UpdateSysLangInput + */ + decimalPoint: string; + /** + * 千分位分隔符 + * @type {string} + * @memberof UpdateSysLangInput + */ + thousandsSep?: string | null; + /** + * 是否启用 + * @type {boolean} + * @memberof UpdateSysLangInput + */ + active: boolean; +} diff --git a/Web/src/api-services/models/week-enum.ts b/Web/src/api-services/models/week-enum.ts new file mode 100644 index 000000000..7841cd9b8 --- /dev/null +++ b/Web/src/api-services/models/week-enum.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * 周枚举
 周一 Monday = 1
 周二 Tuesday = 2
 周三 Wednesday = 3
 周四 Thursday = 4
 周五 Friday = 5
 周六 Saturday = 6
 周日 Sunday = 7
+ * @export + * @enum {string} + */ +export enum WeekEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3, + NUMBER_4 = 4, + NUMBER_5 = 5, + NUMBER_6 = 6, + NUMBER_7 = 7 +} + diff --git a/Web/src/layout/navBars/topBar/user.vue b/Web/src/layout/navBars/topBar/user.vue index b30637b0d..4d879d7cb 100644 --- a/Web/src/layout/navBars/topBar/user.vue +++ b/Web/src/layout/navBars/topBar/user.vue @@ -18,9 +18,10 @@ @@ -103,7 +104,7 @@ import Push from 'push.js'; import { signalR } from '/@/views/system/onlineUser/signalR'; import { Avatar, CircleCloseFilled, Loading, Lock, Switch } from '@element-plus/icons-vue'; import { clearAccessAfterReload, getAPI } from '/@/utils/axios-utils'; -import { SysAuthApi, SysNoticeApi } from '/@/api-services/api'; +import { SysAuthApi, SysNoticeApi, SysLangApi } from '/@/api-services/api'; import { auth } from '/@/utils/authFunction'; // 引入组件 @@ -127,6 +128,7 @@ const state = reactive({ disabledI18n: 'zh-cn', disabledSize: 'large', noticeList: [] as any, // 站内信列表 + languages: [] as any, // 语言列表 }); // 设置分割样式 const layoutUserFlexNum = computed(() => { @@ -198,7 +200,7 @@ const onHandleCommandClick = (path: string) => { .then(async () => { clearAccessAfterReload(); }) - .catch(() => {}); + .catch(() => { }); } else if (path === 'changeTenant') { changeTenantRef.value?.openDialog(); } else { @@ -252,6 +254,8 @@ onMounted(async () => { Push.clear(); } }); + var langRes = await getAPI(SysLangApi).apiSysLangDropdownDataPost(); + state.languages = langRes.data.result ?? []; // 加载未读的站内信 var res = await getAPI(SysNoticeApi).apiSysNoticeUnReadListGet(); state.noticeList = res.data.result ?? []; diff --git a/Web/src/views/system/lang/component/editDialog.vue b/Web/src/views/system/lang/component/editDialog.vue new file mode 100644 index 000000000..31159f822 --- /dev/null +++ b/Web/src/views/system/lang/component/editDialog.vue @@ -0,0 +1,177 @@ + + + \ No newline at end of file diff --git a/Web/src/views/system/lang/index.vue b/Web/src/views/system/lang/index.vue new file mode 100644 index 000000000..b7edfbacf --- /dev/null +++ b/Web/src/views/system/lang/index.vue @@ -0,0 +1,171 @@ + + + \ No newline at end of file -- Gitee From e7f0853f71f8ce6694749690f342e78b388e2b27 Mon Sep 17 00:00:00 2001 From: Cyrus Zhou Date: Tue, 1 Jul 2025 11:34:46 +0200 Subject: [PATCH 2/7] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E7=BF=BB=E8=AF=91=E8=A1=A8=202.=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AE=BE=E7=BD=AE=203.=E7=B3=BB=E7=BB=9F=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=AE=9E=E7=8E=B0=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E8=AE=BE=E7=BD=AE=E5=92=8C=E8=BE=93=E5=87=BA=E3=80=82?= =?UTF-8?q?=204.=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=B7=BB=E5=8A=A0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BB=84=E4=BB=B6g-multi-l?= =?UTF-8?q?ang-Input=20=E4=BD=BF=E7=94=A8=E6=96=B9=E5=BC=8F=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Const/ClaimConst.cs | 5 + .../Admin.NET.Core/Entity/SysLangText.cs | 44 + Admin.NET/Admin.NET.Core/Entity/SysUser.cs | 5 + .../Extension/SqlSugarExtension.cs | 39 + .../SeedData/SysLangSeedData.cs | 2 +- .../SeedData/SysMenuSeedData.cs | 9 +- .../Service/Auth/Dto/LoginUserOutput.cs | 5 + .../Service/Auth/SysAuthService.cs | 4 +- .../Service/Lang/SysLangService.cs | 2 + .../Service/LangText/Dto/SysLangTextDto.cs | 74 ++ .../Service/LangText/Dto/SysLangTextInput.cs | 261 +++++ .../Service/LangText/Dto/SysLangTextOutput.cs | 83 ++ .../Service/LangText/SysLangTextService.cs | 261 +++++ .../Service/Menu/SysMenuService.cs | 96 +- .../Service/User/UserManager.cs | 2 + Web/src/App.vue | 4 +- Web/src/api-services/api.ts | 1 + .../api-services/apis/sys-lang-text-api.ts | 907 ++++++++++++++++++ .../admin-result-list-sys-lang-text-output.ts | 57 ++ .../models/admin-result-sys-lang-text.ts | 57 ++ ...l-sugar-paged-list-sys-lang-text-output.ts | 63 ++ .../models/sys-lang-text-import-body.ts | 26 + .../models/sys-lang-text-output.ts | 92 ++ Web/src/api-services/models/sys-lang-text.ts | 92 ++ Web/src/api/system/sysLangText.ts | 54 ++ Web/src/components/multiLangInput/index.vue | 154 +++ Web/src/layout/navBars/topBar/user.vue | 5 +- Web/src/main.ts | 3 + Web/src/stores/useLangStore.ts | 17 + .../system/langText/component/editDialog.vue | 121 +++ Web/src/views/system/langText/index.vue | 206 ++++ .../views/system/menu/component/editMenu.vue | 4 +- .../views/system/user/component/editUser.vue | 15 +- .../system/user/component/userCenter.vue | 15 +- 34 files changed, 2760 insertions(+), 25 deletions(-) create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysLangText.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextDto.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextInput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextOutput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/LangText/SysLangTextService.cs create mode 100644 Web/src/api-services/apis/sys-lang-text-api.ts create mode 100644 Web/src/api-services/models/admin-result-list-sys-lang-text-output.ts create mode 100644 Web/src/api-services/models/admin-result-sys-lang-text.ts create mode 100644 Web/src/api-services/models/sql-sugar-paged-list-sys-lang-text-output.ts create mode 100644 Web/src/api-services/models/sys-lang-text-import-body.ts create mode 100644 Web/src/api-services/models/sys-lang-text-output.ts create mode 100644 Web/src/api-services/models/sys-lang-text.ts create mode 100644 Web/src/api/system/sysLangText.ts create mode 100644 Web/src/components/multiLangInput/index.vue create mode 100644 Web/src/stores/useLangStore.ts create mode 100644 Web/src/views/system/langText/component/editDialog.vue create mode 100644 Web/src/views/system/langText/index.vue diff --git a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs index 7fdf85f36..7b3218bbb 100644 --- a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs +++ b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs @@ -65,4 +65,9 @@ public class ClaimConst /// 登录模式PC、APP /// public const string LoginMode = "LoginMode"; + + /// + /// 语言代码 + /// + public const string LangCode = "LangCode"; } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysLangText.cs b/Admin.NET/Admin.NET.Core/Entity/SysLangText.cs new file mode 100644 index 000000000..43bfbdd32 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysLangText.cs @@ -0,0 +1,44 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +[SugarTable(null, "翻译表")] +[SysTable] +[SugarIndex("index_{table}_N", nameof(EntityName), OrderByType.Asc)] +[SugarIndex("index_{table}_F", nameof(FieldName), OrderByType.Asc)] +public class SysLangText : EntityBase +{ + /// + /// 所属实体名 + /// + [SugarColumn( ColumnDescription = "所属实体名")] + public string EntityName { get; set; } + + /// + /// 语言代码(如 zh_CN) + /// + [SugarColumn(ColumnDescription = "所属实体ID")] + public long EntityId { get; set; } + + /// + /// 字段名 + /// + [SugarColumn(ColumnDescription = "字段名")] + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + [SugarColumn(ColumnDescription = "语言代码")] + public string LangCode { get; set; } + + /// + /// 多语言内容 + /// + [SugarColumn(ColumnDescription = "翻译内容")] + public string Content { get; set; } +} diff --git a/Admin.NET/Admin.NET.Core/Entity/SysUser.cs b/Admin.NET/Admin.NET.Core/Entity/SysUser.cs index 0894459e3..864032dcc 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysUser.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysUser.cs @@ -313,6 +313,11 @@ public partial class SysUser : EntityBaseTenantOrg [MaxLength(512)] public string? Signature { get; set; } + /// + /// 语言代码(如 zh_CN) + /// + [SugarColumn(ColumnDescription = "语言代码")] + public string LangCode { get; set; } = "zh_CN"; /// /// 验证超级管理员类型,若账号类型为超级管理员则报错 /// diff --git a/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs b/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs index 830c476db..6bf9819c0 100644 --- a/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs +++ b/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs @@ -324,4 +324,43 @@ public static class SqlSugarExtension } #endregion 视图操作 + /// + /// 列表转换为树形结构 + /// + /// + /// 列表数据 + /// 设置子节点列表。例如:item => item.Children + /// 设置元素的父级 Id。例如:item => item.ParentId + /// 根节点的父级 Id,默认为 0 + /// + /// + public static IEnumerable ToTree( + this IEnumerable source, + Func> childrenSelector, + Func parentIdSelector, + int rootParentId) + where T : class + { + var lookup = source.ToLookup(parentIdSelector); + List BuildTree(long parentId) + { + return lookup[parentId].Select(item => + { + var children = BuildTree(GetId(item)); + childrenSelector(item).Clear(); + childrenSelector(item).AddRange(children); + return item; + }).ToList(); + } + + // 需要提供获取Id的方法,可以用反射或者自己传参数 + long GetId(T item) + { + var prop = typeof(T).GetProperty("Id"); + if (prop == null) throw new Exception("没有找到Id属性"); + return (long)prop.GetValue(item); + } + + return BuildTree(rootParentId); + } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs index b95ef0033..661a124e2 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysLangSeedData.cs @@ -25,7 +25,7 @@ public class SysLangSeedData : ISqlSugarEntitySeedData new SysLang{ Id=1300000000002,Name="Chinese (HK) / 繁體中文", Code="zh_HK", IsoCode="zh_HK", UrlCode="zh-hk", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日 %A", TimeFormat="%I時%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, new SysLang{ Id=1300000000003,Name="Chinese (Traditional) / 繁體中文", Code="zh_TW", IsoCode="zh_TW", UrlCode="zh-tw", Direction=DirectionEnum.Ltr, DateFormat="%Y年%m月%d日", TimeFormat="%H時%M分%S秒",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, new SysLang{ Id=1300000000004,Name="Italian / Italiano", Code="it_IT", IsoCode="it", UrlCode="it", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Monday,Grouping="[3,0]",DecimalPoint=",",ThousandsSep=".",Active=true}, - new SysLang{ Id=1300000000005,Name="English (US)", Code="en_US", IsoCode="en", UrlCode="en", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, + new SysLang{ Id=1300000000005,Name="English (US)", Code="en_US", IsoCode="en", UrlCode="en", Direction=DirectionEnum.Ltr, DateFormat="%m/%d/%Y", TimeFormat="%H:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=true}, new SysLang{ Id=1300000000006,Name="Amharic / አምሃርኛ", Code="am_ET", IsoCode="am_ET", UrlCode="am-et", Direction=DirectionEnum.Ltr, DateFormat="%d/%m/%Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Sunday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, new SysLang{ Id=1300000000007,Name="Arabic / الْعَرَبيّة", Code="ar_001", IsoCode="ar", UrlCode="ar", Direction=DirectionEnum.Rtl, DateFormat="%d %b, %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Saturday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, new SysLang{ Id=1300000000008,Name="Arabic (Syria) / الْعَرَبيّة", Code="ar_SY", IsoCode="ar_SY", UrlCode="ar-sy", Direction=DirectionEnum.Rtl, DateFormat="%d %b, %Y", TimeFormat="%I:%M:%S",WeekStart=WeekEnum.Saturday,Grouping="[3,0]",DecimalPoint=".",ThousandsSep=",",Active=false}, diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs index fd2ad50db..38b777900 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs @@ -174,12 +174,19 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1300200090501, Pid=1300200090101, Title="删除", Permission="sysTenantConfig:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, // 语言管理 - new SysMenu{ Id=1300200100101, Pid=1300200000101, Title="语言管理", Path="/system/lang", Name="sysLang", Component="/system/lang/index", Icon="iconfont icon-zhongyingwen", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2025-06-28 00:00:00"), OrderNo=190 }, + new SysMenu{ Id=1300200100101, Pid=1300200000101, Title="语言管理", Path="/system/lang", Name="sysLang", Component="/system/lang/index", Icon="iconfont icon-diqiu", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2025-06-28 00:00:00"), OrderNo=190 }, new SysMenu{ Id=1300200100201, Pid=1300200100101, Title="查询", Permission="sysLang:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1300200100301, Pid=1300200100101, Title="编辑", Permission="sysLang:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1300200100401, Pid=1300200100101, Title="增加", Permission="sysLang:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1300200100501, Pid=1300200100101, Title="删除", Permission="sysLang:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + // 翻译管理 + new SysMenu{ Id=1300200200101, Pid=1300200000101, Title="翻译管理", Path="/system/langText", Name="sysLangText", Component="/system/langText/index", Icon="iconfont icon-zhongyingwen", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2025-06-28 00:00:00"), OrderNo=200 }, + new SysMenu{ Id=1300200200201, Pid=1300200200101, Title="查询", Permission="sysLangText:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200200301, Pid=1300200200101, Title="编辑", Permission="sysLangText:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200200401, Pid=1300200200101, Title="增加", Permission="sysLangText:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300200200501, Pid=1300200200101, Title="删除", Permission="sysLangText:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + // 系统监控 new SysMenu{ Id=1300300070101, Pid=1300300000101, Title="系统监控", Path="/platform/server", Name="sysServer", Component="/system/server/index", Icon="ele-Monitor", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=150 }, diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs index 0c895ae10..a4ff9c6d4 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs @@ -110,4 +110,9 @@ public class LoginUserOutput /// 当前切换到的租户Id /// public long? CurrentTenantId { get; set; } + + /// + /// 语言代码 + /// + public string LangCode { get; internal set; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index c82966e1a..cdabc9832 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -244,6 +244,7 @@ public class SysAuthService : IDynamicApiController, ITransient { ClaimConst.OrgId, user.OrgId }, { ClaimConst.OrgName, user.SysOrg?.Name }, { ClaimConst.OrgType, user.SysOrg?.Type }, + { ClaimConst.LangCode, user.LangCode } }, tokenExpire); // 生成刷新Token令牌 @@ -323,7 +324,8 @@ public class SysAuthService : IDynamicApiController, ITransient Buttons = buttons, RoleIds = roleIds, TenantId = user.TenantId, - WatermarkText = watermarkText + WatermarkText = watermarkText, + LangCode = user.LangCode, }; //将登录信息中的当前租户id,更新为当前所切换到的租户 diff --git a/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs b/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs index ef0e3d2c7..584986113 100644 --- a/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Lang/SysLangService.cs @@ -95,6 +95,7 @@ public partial class SysLangService : IDynamicApiController, ITransient /// 获取下拉列表数据 🔖 /// /// + [AllowAnonymous] [DisplayName("获取下拉列表数据")] [ApiDescriptionSettings(Name = "DropdownData"), HttpPost] public async Task DropdownData() @@ -103,6 +104,7 @@ public partial class SysLangService : IDynamicApiController, ITransient .Where(m => m.Active == true) .Select(u => new { + Code = u.Code, Value = u.UrlCode, Label = $"{u.Name}" }).ToListAsync(); diff --git a/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextDto.cs b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextDto.cs new file mode 100644 index 000000000..16e15a310 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextDto.cs @@ -0,0 +1,74 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 翻译表输出参数 +/// +public class SysLangTextDto +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 所属实体名 + /// + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + public long EntityId { get; set; } + + /// + /// 字段名 + /// + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + public string Content { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextInput.cs b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextInput.cs new file mode 100644 index 000000000..5eb331236 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextInput.cs @@ -0,0 +1,261 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 翻译表基础输入参数 +/// +public class SysLangTextBaseInput +{ + /// + /// 主键Id + /// + public virtual long? Id { get; set; } + + /// + /// 所属实体名 + /// + [Required(ErrorMessage = "所属实体名不能为空")] + public virtual string EntityName { get; set; } + + /// + /// 所属实体ID + /// + [Required(ErrorMessage = "所属实体ID不能为空")] + public virtual long? EntityId { get; set; } + + /// + /// 字段名 + /// + [Required(ErrorMessage = "字段名不能为空")] + public virtual string FieldName { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + public virtual string LangCode { get; set; } + + /// + /// 翻译内容 + /// + [Required(ErrorMessage = "翻译内容不能为空")] + public virtual string Content { get; set; } + +} + +/// +/// 翻译表分页查询输入参数 +/// +public class PageSysLangTextInput : BasePageInput +{ + /// + /// 所属实体名 + /// + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + public long? EntityId { get; set; } + + /// + /// 字段名 + /// + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + public string Content { get; set; } + + /// + /// 选中主键列表 + /// + public List SelectKeyList { get; set; } +} + +/// +/// 翻译表增加输入参数 +/// +public class AddSysLangTextInput +{ + /// + /// 所属实体名 + /// + [Required(ErrorMessage = "所属实体名不能为空")] + [MaxLength(255, ErrorMessage = "所属实体名字符长度不能超过255")] + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + [Required(ErrorMessage = "所属实体ID不能为空")] + public long? EntityId { get; set; } + + /// + /// 字段名 + /// + [Required(ErrorMessage = "字段名不能为空")] + [MaxLength(255, ErrorMessage = "字段名字符长度不能超过255")] + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + [MaxLength(255, ErrorMessage = "语言代码字符长度不能超过255")] + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + [Required(ErrorMessage = "翻译内容不能为空")] + public string Content { get; set; } + +} +/// +/// 翻译表输入参数 +/// +public class ListSysLangTextInput +{ + /// + /// 所属实体名 + /// + [Required(ErrorMessage = "所属实体名不能为空")] + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + [Required(ErrorMessage = "所属实体ID不能为空")] + public long? EntityId { get; set; } + + /// + /// 字段名 + /// + [Required(ErrorMessage = "字段名不能为空")] + public string FieldName { get; set; } + /// + /// 语言代码 + /// + public string LangCode { get; set; } + +} +/// +/// 翻译表删除输入参数 +/// +public class DeleteSysLangTextInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long? Id { get; set; } + +} + +/// +/// 翻译表更新输入参数 +/// +public class UpdateSysLangTextInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long? Id { get; set; } + + /// + /// 所属实体名 + /// + [Required(ErrorMessage = "所属实体名不能为空")] + [MaxLength(255, ErrorMessage = "所属实体名字符长度不能超过255")] + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + [Required(ErrorMessage = "所属实体ID不能为空")] + public long? EntityId { get; set; } + + /// + /// 字段名 + /// + [Required(ErrorMessage = "字段名不能为空")] + [MaxLength(255, ErrorMessage = "字段名字符长度不能超过255")] + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + [Required(ErrorMessage = "语言代码不能为空")] + [MaxLength(255, ErrorMessage = "语言代码字符长度不能超过255")] + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + [Required(ErrorMessage = "翻译内容不能为空")] + public string Content { get; set; } + +} + +/// +/// 翻译表主键查询输入参数 +/// +public class QueryByIdSysLangTextInput : DeleteSysLangTextInput +{ +} + +/// +/// 翻译表数据导入实体 +/// +[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)] +public class ImportSysLangTextInput : BaseImportInput +{ + /// + /// 所属实体名 + /// + [ImporterHeader(Name = "*所属实体名")] + [ExporterHeader("*所属实体名", Format = "", Width = 25, IsBold = true)] + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + [ImporterHeader(Name = "*所属实体ID")] + [ExporterHeader("*所属实体ID", Format = "", Width = 25, IsBold = true)] + public long? EntityId { get; set; } + + /// + /// 字段名 + /// + [ImporterHeader(Name = "*字段名")] + [ExporterHeader("*字段名", Format = "", Width = 25, IsBold = true)] + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + [ImporterHeader(Name = "*语言代码")] + [ExporterHeader("*语言代码", Format = "", Width = 25, IsBold = true)] + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + [ImporterHeader(Name = "*翻译内容")] + [ExporterHeader("*翻译内容", Format = "", Width = 25, IsBold = true)] + public string Content { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextOutput.cs b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextOutput.cs new file mode 100644 index 000000000..08bdc2831 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/LangText/Dto/SysLangTextOutput.cs @@ -0,0 +1,83 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! +namespace Admin.NET.Core; + +/// +/// 翻译表输出参数 +/// +public class SysLangTextOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 所属实体名 + /// + public string EntityName { get; set; } + + /// + /// 所属实体ID + /// + public long EntityId { get; set; } + + /// + /// 字段名 + /// + public string FieldName { get; set; } + + /// + /// 语言代码 + /// + public string LangCode { get; set; } + + /// + /// 翻译内容 + /// + public string Content { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + +} + +/// +/// 翻译表数据导入模板实体 +/// +public class ExportSysLangTextOutput : ImportSysLangTextInput +{ + [ImporterHeader(IsIgnore = true)] + [ExporterHeader(IsIgnore = true)] + public override string Error { get; set; } +} diff --git a/Admin.NET/Admin.NET.Core/Service/LangText/SysLangTextService.cs b/Admin.NET/Admin.NET.Core/Service/LangText/SysLangTextService.cs new file mode 100644 index 000000000..e41172656 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/LangText/SysLangTextService.cs @@ -0,0 +1,261 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + + +namespace Admin.NET.Core.Service; + +/// +/// 翻译服务 🧩 +/// +[ApiDescriptionSettings(Order = 100, Description = "翻译服务")] +public partial class SysLangTextService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _sysLangTextRep; + private readonly ISqlSugarClient _sqlSugarClient; + + public SysLangTextService(SqlSugarRepository sysLangTextRep, ISqlSugarClient sqlSugarClient) + { + _sysLangTextRep = sysLangTextRep; + _sqlSugarClient = sqlSugarClient; + } + + /// + /// 分页查询翻译表 🔖 + /// + /// + /// + [DisplayName("分页查询翻译表")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(PageSysLangTextInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _sysLangTextRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.EntityName.Contains(input.Keyword) || u.FieldName.Contains(input.Keyword) || u.LangCode.Contains(input.Keyword) || u.Content.Contains(input.Keyword)) + .WhereIF(!string.IsNullOrWhiteSpace(input.EntityName), u => u.EntityName.Contains(input.EntityName.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.FieldName), u => u.FieldName.Contains(input.FieldName.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.LangCode), u => u.LangCode.Contains(input.LangCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Content), u => u.Content.Contains(input.Content.Trim())) + .WhereIF(input.EntityId != null, u => u.EntityId == input.EntityId) + .Select(); + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + [DisplayName("获取翻译表")] + [ApiDescriptionSettings(Name = "List"), HttpPost] + public async Task> List(ListSysLangTextInput input) + { + var query = _sysLangTextRep.AsQueryable() + .Where(u => u.EntityName == input.EntityName.Trim() && u.FieldName == input.FieldName.Trim() && u.EntityId == input.EntityId) + .WhereIF(!string.IsNullOrWhiteSpace(input.LangCode), u => u.LangCode == input.LangCode.Trim()) + .Select(); + return await query.ToListAsync(); + } + /// + /// 获取翻译表详情 ℹ️ + /// + /// + /// + [DisplayName("获取翻译表详情")] + [ApiDescriptionSettings(Name = "Detail"), HttpGet] + public async Task Detail([FromQuery] QueryByIdSysLangTextInput input) + { + return await _sysLangTextRep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 增加翻译表 ➕ + /// + /// + /// + [DisplayName("增加翻译表")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddSysLangTextInput input) + { + var entity = input.Adapt(); + return await _sysLangTextRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新翻译表 ✏️ + /// + /// + /// + [DisplayName("更新翻译表")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateSysLangTextInput input) + { + var entity = input.Adapt(); + await _sysLangTextRep.AsUpdateable(entity) + .ExecuteCommandAsync(); + } + + /// + /// 删除翻译表 ❌ + /// + /// + /// + [DisplayName("删除翻译表")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(DeleteSysLangTextInput input) + { + var entity = await _sysLangTextRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _sysLangTextRep.DeleteAsync(entity); //真删除 + } + + /// + /// 批量删除翻译表 ❌ + /// + /// + /// + [DisplayName("批量删除翻译表")] + [ApiDescriptionSettings(Name = "BatchDelete"), HttpPost] + public async Task BatchDelete([Required(ErrorMessage = "主键列表不能为空")] List input) + { + var exp = Expressionable.Create(); + foreach (var row in input) exp = exp.Or(it => it.Id == row.Id); + var list = await _sysLangTextRep.AsQueryable().Where(exp.ToExpression()).ToListAsync(); + + await _sysLangTextRep.DeleteAsync(list); //真删除 + } + + private static readonly object _sysLangTextBatchSaveLock = new object(); + /// + /// 批量保存翻译表 ✏️ + /// + /// + /// + [DisplayName("批量保存翻译表")] + [ApiDescriptionSettings(Name = "BatchSave"), HttpPost] + public void BatchSave([Required(ErrorMessage = "列表不能为空")] List input) + { + lock (_sysLangTextBatchSaveLock) + { + // 校验并过滤必填基本类型为null的字段 + var rows = input.Where(x => + { + if (!string.IsNullOrWhiteSpace(x.Error)) return false; + if (x.EntityId == null) + { + x.Error = "所属实体ID不能为空"; + return false; + } + return true; + }).Adapt>(); + + var storageable = _sysLangTextRep.Context.Storageable(rows) + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.EntityName), "所属实体名不能为空") + .SplitError(it => it.Item.EntityName?.Length > 255, "所属实体名长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.FieldName), "字段名不能为空") + .SplitError(it => it.Item.FieldName?.Length > 255, "字段名长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.LangCode), "语言代码不能为空") + .SplitError(it => it.Item.LangCode?.Length > 255, "语言代码长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.Content), "翻译内容不能为空") + .WhereColumns(it => new { it.EntityId, it.EntityName, it.FieldName, it.LangCode }) + .SplitInsert(it => it.NotAny()) + .SplitUpdate(it => it.Any()) + .ToStorage(); + + storageable.AsInsertable.ExecuteCommand();// 不存在插入 + storageable.AsUpdateable.UpdateColumns(it => new + { + it.EntityName, + it.EntityId, + it.FieldName, + it.LangCode, + it.Content, + }).ExecuteCommand();// 存在更新 + if (storageable.ErrorList.Any()) + { + throw Oops.Oh($"处理过程中出现以下错误:{string.Join(";", storageable.ErrorList.Distinct())}"); + } + } + } + + /// + /// 导出翻译表记录 🔖 + /// + /// + /// + [DisplayName("导出翻译表记录")] + [ApiDescriptionSettings(Name = "Export"), HttpPost, NonUnify] + public async Task Export(PageSysLangTextInput input) + { + var list = (await Page(input)).Items?.Adapt>() ?? new(); + if (input.SelectKeyList?.Count > 0) list = list.Where(x => input.SelectKeyList.Contains(x.Id)).ToList(); + return ExcelHelper.ExportTemplate(list, "翻译表导出记录"); + } + + /// + /// 下载翻译表数据导入模板 ⬇️ + /// + /// + [DisplayName("下载翻译表数据导入模板")] + [ApiDescriptionSettings(Name = "Import"), HttpGet, NonUnify] + public IActionResult DownloadTemplate() + { + return ExcelHelper.ExportTemplate(new List(), "翻译表导入模板"); + } + + private static readonly object _sysLangTextImportLock = new object(); + /// + /// 导入翻译表记录 💾 + /// + /// + [DisplayName("导入翻译表记录")] + [ApiDescriptionSettings(Name = "Import"), HttpPost, NonUnify, UnitOfWork] + public IActionResult ImportData([Required] IFormFile file) + { + lock (_sysLangTextImportLock) + { + var stream = ExcelHelper.ImportData(file, (list, markerErrorAction) => + { + _sqlSugarClient.Utilities.PageEach(list, 2048, pageItems => + { + + // 校验并过滤必填基本类型为null的字段 + var rows = pageItems.Where(x => + { + if (!string.IsNullOrWhiteSpace(x.Error)) return false; + if (x.EntityId == null) + { + x.Error = "所属实体ID不能为空"; + return false; + } + return true; + }).Adapt>(); + + var storageable = _sysLangTextRep.Context.Storageable(rows) + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.EntityName), "所属实体名不能为空") + .SplitError(it => it.Item.EntityName?.Length > 255, "所属实体名长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.FieldName), "字段名不能为空") + .SplitError(it => it.Item.FieldName?.Length > 255, "字段名长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.LangCode), "语言代码不能为空") + .SplitError(it => it.Item.LangCode?.Length > 255, "语言代码长度不能超过255个字符") + .SplitError(it => string.IsNullOrWhiteSpace(it.Item.Content), "翻译内容不能为空") + .SplitError(it => it.Item.Content?.Length > 255, "翻译内容长度不能超过255个字符") + .WhereColumns(it => new { it.EntityId, it.EntityName, it.FieldName, it.LangCode }) + .SplitInsert(it => it.NotAny()) + .SplitUpdate(it => it.Any()) + .ToStorage(); + + storageable.AsInsertable.ExecuteCommand();// 不存在插入 + storageable.AsUpdateable.UpdateColumns(it => new + { + it.EntityName, + it.EntityId, + it.FieldName, + it.LangCode, + it.Content, + }).ExecuteCommand();// 存在更新 + + // 标记错误信息 + markerErrorAction.Invoke(storageable, pageItems, rows); + }); + }); + + return stream; + } + } +} diff --git a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs index 0e884c82d..72523d082 100644 --- a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs @@ -19,10 +19,12 @@ public class SysMenuService : IDynamicApiController, ITransient private readonly SysUserMenuService _sysUserMenuService; private readonly SysCacheService _sysCacheService; private readonly UserManager _userManager; + private readonly SqlSugarRepository _sysLangTextRep; public SysMenuService( SqlSugarRepository sysTenantMenuRep, SqlSugarRepository sysMenuRep, + SqlSugarRepository sysLangTextRep, SysRoleMenuService sysRoleMenuService, SysUserRoleService sysUserRoleService, SysUserMenuService sysUserMenuService, @@ -36,6 +38,7 @@ public class SysMenuService : IDynamicApiController, ITransient _sysUserMenuService = sysUserMenuService; _sysTenantMenuRep = sysTenantMenuRep; _sysCacheService = sysCacheService; + _sysLangTextRep = sysLangTextRep; } /// @@ -45,18 +48,41 @@ public class SysMenuService : IDynamicApiController, ITransient [DisplayName("获取登录菜单树")] public async Task> GetLoginMenuTree() { + var langCode = _userManager.LangCode; var (query, _) = GetSugarQueryableAndTenantId(_userManager.TenantId); - if (_userManager.SuperAdmin || _userManager.SysAdmin) + + // 先把菜单表作为主表 + var menuQuery = query.Where(u => u.Type != MenuTypeEnum.Btn && u.Status == StatusEnum.Enable); + + if (!(_userManager.SuperAdmin || _userManager.SysAdmin)) { - var menuList = await query.Where(u => u.Type != MenuTypeEnum.Btn && u.Status == StatusEnum.Enable) - .OrderBy(u => new { u.OrderNo, u.Id }) - .ToTreeAsync(u => u.Children, u => u.Pid, 0); - return menuList.Adapt>(); + var menuIdList = await GetMenuIdList(); + menuQuery = menuQuery.Where(u => menuIdList.Contains(u.Id)); } - var menuIdList = await GetMenuIdList(); - var menuTree = await query.Where(u => u.Type != MenuTypeEnum.Btn && u.Status == StatusEnum.Enable) - .OrderBy(u => new { u.OrderNo, u.Id }).ToTreeAsync(u => u.Children, u => u.Pid, 0, menuIdList.Select(d => (object)d).ToArray()); + // 联表翻译表 LEFT JOIN (翻译表可无则保留原值) + var finalQuery = menuQuery + .OrderBy(u => new { u.OrderNo, u.Id }) + .LeftJoin((menu, lang) => + lang.EntityName == "SysMenu" + && lang.FieldName == "Title" + && lang.EntityId == menu.Id + && lang.LangCode == langCode + ) + .Select((menu, lang) => new + { + menu, + Title = SqlFunc.IIF(SqlFunc.IsNullOrEmpty(lang.Content), menu.Title, lang.Content), + }).Mapper(it => + { + it.menu.Title = it.Title; + }).ToList() + .Select(it=>it.menu); + + var menuTree = finalQuery.ToTree( + it => it.Children, it => it.Pid, 0 + ); + return menuTree.Adapt>(); } @@ -67,21 +93,61 @@ public class SysMenuService : IDynamicApiController, ITransient [DisplayName("获取菜单列表")] public async Task> GetList([FromQuery] MenuInput input) { + var langCode = _userManager.LangCode; var menuIdList = _userManager.SuperAdmin || _userManager.SysAdmin ? new List() : await GetMenuIdList(); var (query, _) = GetSugarQueryableAndTenantId(input.TenantId); // 有筛选条件时返回list列表(防止构造不出树) if (!string.IsNullOrWhiteSpace(input.Title) || input.Type is > 0) { - return await query.WhereIF(!string.IsNullOrWhiteSpace(input.Title), u => u.Title.Contains(input.Title)) - .WhereIF(input.Type is > 0, u => u.Type == input.Type) - .WhereIF(menuIdList.Count > 1, u => menuIdList.Contains(u.Id)) - .OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToListAsync(); + var menuQuery = query.WhereIF(!string.IsNullOrWhiteSpace(input.Title), u => u.Title.Contains(input.Title)) + .WhereIF(input.Type is > 0, u => u.Type == input.Type) + .WhereIF(menuIdList.Count > 1, u => menuIdList.Contains(u.Id)); + var finalQuery = menuQuery + .OrderBy(u => new { u.OrderNo, u.Id }) + .LeftJoin((menu, lang) => + lang.EntityName == "SysMenu" + && lang.FieldName == "Title" + && lang.EntityId == menu.Id + && lang.LangCode == langCode + ) + .Select((menu, lang) => new + { + menu, + Title = SqlFunc.IIF(SqlFunc.IsNullOrEmpty(lang.Content), menu.Title, lang.Content), + }).Mapper(it => + { + it.menu.Title = it.Title; + }).ToList() + .Select(it => it.menu); + return finalQuery.Distinct().ToList(); } - return _userManager.SuperAdmin || _userManager.SysAdmin ? - await query.OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0) : - await query.OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0, menuIdList.Select(d => (object)d).ToArray()); // 角色菜单授权时 + if (!(_userManager.SuperAdmin || _userManager.SysAdmin)) + { + query = query.Where(u => menuIdList.Contains(u.Id)); + } + var final1Query = query + .OrderBy(u => new { u.OrderNo, u.Id }) + .LeftJoin((menu, lang) => + lang.EntityName == "SysMenu" + && lang.FieldName == "Title" + && lang.EntityId == menu.Id + && lang.LangCode == langCode + ) + .Select((menu, lang) => new + { + menu, + Title = SqlFunc.IIF(SqlFunc.IsNullOrEmpty(lang.Content), menu.Title, lang.Content), + }).Mapper(it => + { + it.menu.Title = it.Title; + }).ToList() + .Select(it => it.menu); + var menuTree = final1Query.ToTree( + it => it.Children, it => it.Pid, 0 + ); + return menuTree.ToList(); // 角色菜单授权时 } /// diff --git a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs index f3eb32a1a..09e41bb97 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs @@ -58,6 +58,8 @@ public class UserManager : IScoped /// public string OpenId => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OpenId)?.Value; + public string LangCode => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.LangCode)?.Value ?? "zh_CN"; + public UserManager(IHttpContextAccessor httpContextAccessor) { _httpContextAccessor = httpContextAccessor; diff --git a/Web/src/App.vue b/Web/src/App.vue index df8af646d..0e9e1065c 100644 --- a/Web/src/App.vue +++ b/Web/src/App.vue @@ -23,6 +23,7 @@ import setIntroduction from '/@/utils/setIconfont'; // import Watermark from '/@/utils/watermark'; import { SysConfigApi } from '/@/api-services'; import { getAPI } from '/@/utils/axios-utils'; +import { useLangStore } from '/@/stores/useLangStore'; // 引入组件 const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue')); @@ -168,7 +169,8 @@ const updateFavicon = (url: string): void => { // 加载系统信息 loadSysInfo(); - +const langStore = useLangStore(); +langStore.loadLanguages(); // 阻止火狐浏览器在拖动时打开新窗口 document.body.ondrop = function (event) { event.preventDefault(); diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index 1dca9d3b4..d65951722 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -28,6 +28,7 @@ export * from './apis/sys-enum-api'; export * from './apis/sys-file-api'; export * from './apis/sys-job-api'; export * from './apis/sys-lang-api'; +export * from './apis/sys-lang-text-api'; export * from './apis/sys-ldap-api'; export * from './apis/sys-log-diff-api'; export * from './apis/sys-log-ex-api'; diff --git a/Web/src/api-services/apis/sys-lang-text-api.ts b/Web/src/api-services/apis/sys-lang-text-api.ts new file mode 100644 index 000000000..5bff8760c --- /dev/null +++ b/Web/src/api-services/apis/sys-lang-text-api.ts @@ -0,0 +1,907 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysLangTextInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListSysLangTextOutput } from '../models'; +import { AdminResultSqlSugarPagedListSysLangTextOutput } from '../models'; +import { AdminResultSysLangText } from '../models'; +import { DeleteSysLangTextInput } from '../models'; +import { ImportSysLangTextInput } from '../models'; +import { ListSysLangTextInput } from '../models'; +import { PageSysLangTextInput } from '../models'; +import { UpdateSysLangTextInput } from '../models'; +/** + * SysLangTextApi - axios parameter creator + * @export + */ +export const SysLangTextApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加翻译表 ➕ + * @param {AddSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextAddPost: async (body?: AddSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 批量删除翻译表 ❌ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextBatchDeletePost: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling apiSysLangTextBatchDeletePost.'); + } + const localVarPath = `/api/sysLangText/batchDelete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 批量保存翻译表 ✏️ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextBatchSavePost: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling apiSysLangTextBatchSavePost.'); + } + const localVarPath = `/api/sysLangText/batchSave`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除翻译表 ❌ + * @param {DeleteSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextDeletePost: async (body?: DeleteSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取翻译表详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysLangTextDetailGet.'); + } + const localVarPath = `/api/sysLangText/detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + if (id !== undefined) { + localVarQueryParameter['Id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 导出翻译表记录 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextExportPost: async (body?: PageSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/export`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 下载翻译表数据导入模板 ⬇️ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextImportGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/import`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 导入翻译表记录 💾 + * @param {Blob} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextImportPostForm: async (file?: Blob, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/import`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new FormData(); + + // authentication Bearer required + + + if (file !== undefined) { + localVarFormParams.append('file', file as any); + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取翻译表 + * @param {ListSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextListPost: async (body?: ListSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询翻译表 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextPagePost: async (body?: PageSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新翻译表 ✏️ + * @param {UpdateSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysLangTextUpdatePost: async (body?: UpdateSysLangTextInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysLangText/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SysLangTextApi - functional programming interface + * @export + */ +export const SysLangTextApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary 增加翻译表 ➕ + * @param {AddSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextAddPost(body?: AddSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 批量删除翻译表 ❌ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextBatchDeletePost(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextBatchDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 批量保存翻译表 ✏️ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextBatchSavePost(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextBatchSavePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除翻译表 ❌ + * @param {DeleteSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextDeletePost(body?: DeleteSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取翻译表详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextDetailGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 导出翻译表记录 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextExportPost(body?: PageSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextExportPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 下载翻译表数据导入模板 ⬇️ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextImportGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextImportGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 导入翻译表记录 💾 + * @param {Blob} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextImportPostForm(file?: Blob, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextImportPostForm(file, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取翻译表 + * @param {ListSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextListPost(body?: ListSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextListPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询翻译表 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextPagePost(body?: PageSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新翻译表 ✏️ + * @param {UpdateSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextUpdatePost(body?: UpdateSysLangTextInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysLangTextApiAxiosParamCreator(configuration).apiSysLangTextUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * SysLangTextApi - factory interface + * @export + */ +export const SysLangTextApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加翻译表 ➕ + * @param {AddSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextAddPost(body?: AddSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 批量删除翻译表 ❌ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextBatchDeletePost(body: Array, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextBatchDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 批量保存翻译表 ✏️ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextBatchSavePost(body: Array, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextBatchSavePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除翻译表 ❌ + * @param {DeleteSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextDeletePost(body?: DeleteSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取翻译表详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextDetailGet(id: number, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextDetailGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 导出翻译表记录 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextExportPost(body?: PageSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextExportPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 下载翻译表数据导入模板 ⬇️ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextImportGet(options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextImportGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 导入翻译表记录 💾 + * @param {Blob} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextImportPostForm(file?: Blob, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextImportPostForm(file, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取翻译表 + * @param {ListSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextListPost(body?: ListSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextListPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询翻译表 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextPagePost(body?: PageSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新翻译表 ✏️ + * @param {UpdateSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysLangTextUpdatePost(body?: UpdateSysLangTextInput, options?: AxiosRequestConfig): Promise> { + return SysLangTextApiFp(configuration).apiSysLangTextUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SysLangTextApi - object-oriented interface + * @export + * @class SysLangTextApi + * @extends {BaseAPI} + */ +export class SysLangTextApi extends BaseAPI { + /** + * + * @summary 增加翻译表 ➕ + * @param {AddSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextAddPost(body?: AddSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 批量删除翻译表 ❌ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextBatchDeletePost(body: Array, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextBatchDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 批量保存翻译表 ✏️ + * @param {Array} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextBatchSavePost(body: Array, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextBatchSavePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除翻译表 ❌ + * @param {DeleteSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextDeletePost(body?: DeleteSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取翻译表详情 ℹ️ + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextDetailGet(id: number, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextDetailGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 导出翻译表记录 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextExportPost(body?: PageSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextExportPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 下载翻译表数据导入模板 ⬇️ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextImportGet(options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextImportGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 导入翻译表记录 💾 + * @param {Blob} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextImportPostForm(file?: Blob, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextImportPostForm(file, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取翻译表 + * @param {ListSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextListPost(body?: ListSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextListPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询翻译表 🔖 + * @param {PageSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextPagePost(body?: PageSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新翻译表 ✏️ + * @param {UpdateSysLangTextInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysLangTextApi + */ + public async apiSysLangTextUpdatePost(body?: UpdateSysLangTextInput, options?: AxiosRequestConfig) : Promise> { + return SysLangTextApiFp(this.configuration).apiSysLangTextUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/models/admin-result-list-sys-lang-text-output.ts b/Web/src/api-services/models/admin-result-list-sys-lang-text-output.ts new file mode 100644 index 000000000..9d35a957e --- /dev/null +++ b/Web/src/api-services/models/admin-result-list-sys-lang-text-output.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SysLangTextOutput } from './sys-lang-text-output'; +/** + * 全局返回结果 + * @export + * @interface AdminResultListSysLangTextOutput + */ +export interface AdminResultListSysLangTextOutput { + /** + * 状态码 + * @type {number} + * @memberof AdminResultListSysLangTextOutput + */ + code?: number; + /** + * 类型success、warning、error + * @type {string} + * @memberof AdminResultListSysLangTextOutput + */ + type?: string | null; + /** + * 错误信息 + * @type {string} + * @memberof AdminResultListSysLangTextOutput + */ + message?: string | null; + /** + * 数据 + * @type {Array} + * @memberof AdminResultListSysLangTextOutput + */ + result?: Array | null; + /** + * 附加数据 + * @type {any} + * @memberof AdminResultListSysLangTextOutput + */ + extras?: any | null; + /** + * 时间 + * @type {Date} + * @memberof AdminResultListSysLangTextOutput + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-result-sys-lang-text.ts b/Web/src/api-services/models/admin-result-sys-lang-text.ts new file mode 100644 index 000000000..f8fd1e4b1 --- /dev/null +++ b/Web/src/api-services/models/admin-result-sys-lang-text.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SysLangText } from './sys-lang-text'; +/** + * 全局返回结果 + * @export + * @interface AdminResultSysLangText + */ +export interface AdminResultSysLangText { + /** + * 状态码 + * @type {number} + * @memberof AdminResultSysLangText + */ + code?: number; + /** + * 类型success、warning、error + * @type {string} + * @memberof AdminResultSysLangText + */ + type?: string | null; + /** + * 错误信息 + * @type {string} + * @memberof AdminResultSysLangText + */ + message?: string | null; + /** + * + * @type {SysLangText} + * @memberof AdminResultSysLangText + */ + result?: SysLangText; + /** + * 附加数据 + * @type {any} + * @memberof AdminResultSysLangText + */ + extras?: any | null; + /** + * 时间 + * @type {Date} + * @memberof AdminResultSysLangText + */ + time?: Date; +} diff --git a/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-text-output.ts b/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-text-output.ts new file mode 100644 index 000000000..f63a72b0a --- /dev/null +++ b/Web/src/api-services/models/sql-sugar-paged-list-sys-lang-text-output.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { SysLangTextOutput } from './sys-lang-text-output'; +/** + * 分页泛型集合 + * @export + * @interface SqlSugarPagedListSysLangTextOutput + */ +export interface SqlSugarPagedListSysLangTextOutput { + /** + * 页码 + * @type {number} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + page?: number; + /** + * 页容量 + * @type {number} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + pageSize?: number; + /** + * 总条数 + * @type {number} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + total?: number; + /** + * 总页数 + * @type {number} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + totalPages?: number; + /** + * 当前页集合 + * @type {Array} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + items?: Array | null; + /** + * 是否有上一页 + * @type {boolean} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + hasPrevPage?: boolean; + /** + * 是否有下一页 + * @type {boolean} + * @memberof SqlSugarPagedListSysLangTextOutput + */ + hasNextPage?: boolean; +} diff --git a/Web/src/api-services/models/sys-lang-text-import-body.ts b/Web/src/api-services/models/sys-lang-text-import-body.ts new file mode 100644 index 000000000..1b9d61949 --- /dev/null +++ b/Web/src/api-services/models/sys-lang-text-import-body.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface SysLangTextImportBody + */ +export interface SysLangTextImportBody { + /** + * + * @type {Blob} + * @memberof SysLangTextImportBody + */ + file: Blob; +} diff --git a/Web/src/api-services/models/sys-lang-text-output.ts b/Web/src/api-services/models/sys-lang-text-output.ts new file mode 100644 index 000000000..49d4e5553 --- /dev/null +++ b/Web/src/api-services/models/sys-lang-text-output.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * 翻译表输出参数 + * @export + * @interface SysLangTextOutput + */ +export interface SysLangTextOutput { + /** + * 主键Id + * @type {number} + * @memberof SysLangTextOutput + */ + id?: number; + /** + * 所属实体名 + * @type {string} + * @memberof SysLangTextOutput + */ + entityName?: string | null; + /** + * 所属实体ID + * @type {number} + * @memberof SysLangTextOutput + */ + entityId?: number; + /** + * 字段名 + * @type {string} + * @memberof SysLangTextOutput + */ + fieldName?: string | null; + /** + * 语言代码 + * @type {string} + * @memberof SysLangTextOutput + */ + langCode?: string | null; + /** + * 翻译内容 + * @type {string} + * @memberof SysLangTextOutput + */ + content?: string | null; + /** + * 创建时间 + * @type {Date} + * @memberof SysLangTextOutput + */ + createTime?: Date | null; + /** + * 更新时间 + * @type {Date} + * @memberof SysLangTextOutput + */ + updateTime?: Date | null; + /** + * 创建者Id + * @type {number} + * @memberof SysLangTextOutput + */ + createUserId?: number | null; + /** + * 创建者姓名 + * @type {string} + * @memberof SysLangTextOutput + */ + createUserName?: string | null; + /** + * 修改者Id + * @type {number} + * @memberof SysLangTextOutput + */ + updateUserId?: number | null; + /** + * 修改者姓名 + * @type {string} + * @memberof SysLangTextOutput + */ + updateUserName?: string | null; +} diff --git a/Web/src/api-services/models/sys-lang-text.ts b/Web/src/api-services/models/sys-lang-text.ts new file mode 100644 index 000000000..8d791510b --- /dev/null +++ b/Web/src/api-services/models/sys-lang-text.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface SysLangText + */ +export interface SysLangText { + /** + * 雪花Id + * @type {number} + * @memberof SysLangText + */ + id?: number; + /** + * 创建时间 + * @type {Date} + * @memberof SysLangText + */ + createTime?: Date; + /** + * 更新时间 + * @type {Date} + * @memberof SysLangText + */ + updateTime?: Date | null; + /** + * 创建者Id + * @type {number} + * @memberof SysLangText + */ + createUserId?: number | null; + /** + * 创建者姓名 + * @type {string} + * @memberof SysLangText + */ + createUserName?: string | null; + /** + * 修改者Id + * @type {number} + * @memberof SysLangText + */ + updateUserId?: number | null; + /** + * 修改者姓名 + * @type {string} + * @memberof SysLangText + */ + updateUserName?: string | null; + /** + * 所属实体名 + * @type {string} + * @memberof SysLangText + */ + entityName?: string | null; + /** + * 语言代码(如 zh_CN) + * @type {number} + * @memberof SysLangText + */ + entityId?: number; + /** + * 字段名 + * @type {string} + * @memberof SysLangText + */ + fieldName?: string | null; + /** + * 语言代码 + * @type {string} + * @memberof SysLangText + */ + langCode?: string | null; + /** + * 多语言内容 + * @type {string} + * @memberof SysLangText + */ + content?: string | null; +} diff --git a/Web/src/api/system/sysLangText.ts b/Web/src/api/system/sysLangText.ts new file mode 100644 index 000000000..7bb146c45 --- /dev/null +++ b/Web/src/api/system/sysLangText.ts @@ -0,0 +1,54 @@ +import {useBaseApi} from '/@/api/base'; + +// 翻译接口服务 +export const useSysLangTextApi = () => { + const baseApi = useBaseApi("sysLangText"); + return { + // 分页查询翻译 + page: baseApi.page, + // 查看翻译详细 + detail: baseApi.detail, + // 新增翻译 + add: baseApi.add, + // 更新翻译 + update: baseApi.update, + // 删除翻译 + delete: baseApi.delete, + // 批量删除翻译 + batchDelete: baseApi.batchDelete, + // 导出翻译数据 + exportData: baseApi.exportData, + // 导入翻译数据 + importData: baseApi.importData, + // 下载翻译数据导入模板 + downloadTemplate: baseApi.downloadTemplate, + } +} + +// 翻译实体 +export interface SysLangText { + // 主键Id + id: number; + // 所属实体名 + entityName?: string; + // 所属实体ID + entityId?: number; + // 字段名 + fieldName?: string; + // 语言代码 + langCode?: string; + // 翻译内容 + content?: string; + // 创建时间 + createTime: string; + // 更新时间 + updateTime: string; + // 创建者Id + createUserId: number; + // 创建者姓名 + createUserName: string; + // 修改者Id + updateUserId: number; + // 修改者姓名 + updateUserName: string; +} \ No newline at end of file diff --git a/Web/src/components/multiLangInput/index.vue b/Web/src/components/multiLangInput/index.vue new file mode 100644 index 000000000..ac7e01257 --- /dev/null +++ b/Web/src/components/multiLangInput/index.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/Web/src/layout/navBars/topBar/user.vue b/Web/src/layout/navBars/topBar/user.vue index 4d879d7cb..014502b0f 100644 --- a/Web/src/layout/navBars/topBar/user.vue +++ b/Web/src/layout/navBars/topBar/user.vue @@ -106,7 +106,9 @@ import { Avatar, CircleCloseFilled, Loading, Lock, Switch } from '@element-plus/ import { clearAccessAfterReload, getAPI } from '/@/utils/axios-utils'; import { SysAuthApi, SysNoticeApi, SysLangApi } from '/@/api-services/api'; import { auth } from '/@/utils/authFunction'; +import { useLangStore } from '/@/stores/useLangStore'; +const langStore = useLangStore(); // 引入组件 const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/topBar/userNews.vue')); const Search = defineAsyncComponent(() => import('/@/layout/navBars/topBar/search.vue')); @@ -254,8 +256,7 @@ onMounted(async () => { Push.clear(); } }); - var langRes = await getAPI(SysLangApi).apiSysLangDropdownDataPost(); - state.languages = langRes.data.result ?? []; + state.languages = langStore.languages; // 加载未读的站内信 var res = await getAPI(SysNoticeApi).apiSysNoticeUnReadListGet(); state.noticeList = res.data.result ?? []; diff --git a/Web/src/main.ts b/Web/src/main.ts index 4c59ade46..75fadfc77 100644 --- a/Web/src/main.ts +++ b/Web/src/main.ts @@ -22,6 +22,7 @@ import 'vform3-builds/dist/designer.style.css'; // 关闭自动打印 import { disAutoConnect } from 'vue-plugin-hiprint'; import sysDict from "/src/components/sysDict/sysDict.vue"; +import multiLangInput from "/src/components/multiLangInput/index.vue"; disAutoConnect(); const app = createApp(App); @@ -31,5 +32,7 @@ other.elSvg(app); // 注册全局字典组件 app.component('GSysDict', sysDict); +// 注册全局多语言组件 +app.component('GMultiLangInput', multiLangInput); app.use(pinia).use(router).use(ElementPlus).use(i18n).use(VueGridLayout).use(VForm3).use(VueSignaturePad).use(vue3TreeOrg).mount('#app'); diff --git a/Web/src/stores/useLangStore.ts b/Web/src/stores/useLangStore.ts new file mode 100644 index 000000000..18613e9a1 --- /dev/null +++ b/Web/src/stores/useLangStore.ts @@ -0,0 +1,17 @@ +import { defineStore } from 'pinia'; +import { getAPI } from '/@/utils/axios-utils'; +import { SysLangApi } from '/@/api-services/api'; + +export const useLangStore = defineStore('lang', { + state: () => ({ + languages: [] as any[], + }), + actions: { + async loadLanguages() { + if (this.languages.length === 0) { + const res = await getAPI(SysLangApi).apiSysLangDropdownDataPost(); + this.languages = res.data.result ?? []; + } + }, + }, +}); diff --git a/Web/src/views/system/langText/component/editDialog.vue b/Web/src/views/system/langText/component/editDialog.vue new file mode 100644 index 000000000..1c8d76437 --- /dev/null +++ b/Web/src/views/system/langText/component/editDialog.vue @@ -0,0 +1,121 @@ + + + \ No newline at end of file diff --git a/Web/src/views/system/langText/index.vue b/Web/src/views/system/langText/index.vue new file mode 100644 index 000000000..94f1683fb --- /dev/null +++ b/Web/src/views/system/langText/index.vue @@ -0,0 +1,206 @@ + + + \ No newline at end of file diff --git a/Web/src/views/system/menu/component/editMenu.vue b/Web/src/views/system/menu/component/editMenu.vue index 13fe787d0..cda4757d2 100644 --- a/Web/src/views/system/menu/component/editMenu.vue +++ b/Web/src/views/system/menu/component/editMenu.vue @@ -21,12 +21,12 @@ - + - +