From a4799a5093b311c145ac254d82742f09bdd07eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=99=E6=84=8F?= Date: Sat, 21 Jun 2025 17:26:21 +0800 Subject: [PATCH 01/70] =?UTF-8?q?feat:=20=E6=8A=A5=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Converter/CamelCaseValueConverter.cs | 45 ++ .../Admin.NET.Core/Entity/SysReportConfig.cs | 87 +++ .../Entity/SysReportDataSource.cs | 39 + .../Admin.NET.Core/Entity/SysReportGroup.cs | 27 + .../Admin.NET.Core/Enum/ErrorCodeEnum.cs | 24 + .../Enum/ReportConfigDsTypeEnum.cs | 25 + .../SeedData/SysMenuSeedData.cs | 13 + .../ReportConfig/Dto/SysReportConfigInput.cs | 63 ++ .../ReportConfig/Dto/SysReportConfigOutput.cs | 32 + .../Dto/SysReportDataSourceDetail.cs | 38 + .../Dto/SysReportDataSourceInput.cs | 26 + .../Dto/SysReportDataSourceOutput.cs | 28 + .../ReportConfig/Dto/SysReportGroupInput.cs | 26 + .../ReportConfig/Dto/SysReportLayoutConfig.cs | 89 +++ .../ReportConfig/SysReportConfigService.cs | 310 ++++++++ .../SysReportDataSourceService.cs | 185 +++++ .../ReportConfig/SysReportGroupService.cs | 81 ++ Admin.NET/Admin.NET.Web.Core/Startup.cs | 7 + Web/package.json | 1 + Web/src/api-services/api.ts | 3 + .../apis/sys-report-config-api.ts | 732 ++++++++++++++++++ .../apis/sys-report-data-source-api.ts | 467 +++++++++++ .../api-services/apis/sys-report-group-api.ts | 382 +++++++++ .../models/add-report-config-input.ts | 180 +++++ .../models/add-report-data-source-input.ts | 118 +++ .../models/add-report-group-input.ts | 102 +++ ...netresult-list-dictionary-string-object.ts | 70 ++ ...etresult-list-report-data-source-output.ts | 71 ++ .../admin-netresult-list-sys-report-group.ts | 71 ++ ...etresult-report-config-parse-sql-output.ts | 69 ++ ...l-sugar-paged-list-report-config-output.ts | 69 ++ ...sugar-paged-list-sys-report-data-source.ts | 69 ++ ...dmin-netresult-sys-report-layout-config.ts | 69 ++ Web/src/api-services/models/index.ts | 28 + .../models/page-report-config-input.ts | 100 +++ .../models/page-report-data-source-input.ts | 92 +++ .../models/report-config-ds-type-enum.ts | 24 + .../report-config-execute-sql-script-input.ts | 38 + .../models/report-config-output.ts | 188 +++++ .../models/report-config-parse-sql-input.ts | 46 ++ .../models/report-config-parse-sql-output.ts | 30 + .../models/report-data-source-output.ts | 46 ++ ...l-sugar-paged-list-report-config-output.ts | 79 ++ ...sugar-paged-list-sys-report-data-source.ts | 79 ++ .../models/sys-report-data-source.ts | 118 +++ .../api-services/models/sys-report-field.ts | 70 ++ .../api-services/models/sys-report-group.ts | 102 +++ .../models/sys-report-layout-config.ts | 40 + .../api-services/models/sys-report-param.ts | 54 ++ .../models/update-report-config-input.ts | 180 +++++ .../models/update-report-data-source-input.ts | 118 +++ .../models/update-report-group-input.ts | 102 +++ Web/src/router/route.ts | 13 + .../component/editReportConfig.vue | 594 ++++++++++++++ .../reportGroupPanel/editReportGroup.vue | 81 ++ .../component/reportGroupPanel/index.vue | 170 ++++ .../reportConfig/component/reportView.vue | 230 ++++++ Web/src/views/system/reportConfig/index.vue | 245 ++++++ .../system/reportConfig/inputCtrlType.ts | 5 + .../component/editReportDataSource.vue | 95 +++ .../views/system/reportDataSource/index.vue | 180 +++++ .../system/reportDataSource/sqlSugarDbType.ts | 26 + 62 files changed, 6791 insertions(+) create mode 100644 Admin.NET/Admin.NET.Core/Converter/CamelCaseValueConverter.cs create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysReportConfig.cs create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysReportDataSource.cs create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysReportGroup.cs create mode 100644 Admin.NET/Admin.NET.Core/Enum/ReportConfigDsTypeEnum.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigInput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigOutput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceDetail.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceInput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceOutput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportGroupInput.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportLayoutConfig.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportConfigService.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportDataSourceService.cs create mode 100644 Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportGroupService.cs create mode 100644 Web/src/api-services/apis/sys-report-config-api.ts create mode 100644 Web/src/api-services/apis/sys-report-data-source-api.ts create mode 100644 Web/src/api-services/apis/sys-report-group-api.ts create mode 100644 Web/src/api-services/models/add-report-config-input.ts create mode 100644 Web/src/api-services/models/add-report-data-source-input.ts create mode 100644 Web/src/api-services/models/add-report-group-input.ts create mode 100644 Web/src/api-services/models/admin-netresult-list-dictionary-string-object.ts create mode 100644 Web/src/api-services/models/admin-netresult-list-report-data-source-output.ts create mode 100644 Web/src/api-services/models/admin-netresult-list-sys-report-group.ts create mode 100644 Web/src/api-services/models/admin-netresult-report-config-parse-sql-output.ts create mode 100644 Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-report-config-output.ts create mode 100644 Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-sys-report-data-source.ts create mode 100644 Web/src/api-services/models/admin-netresult-sys-report-layout-config.ts create mode 100644 Web/src/api-services/models/page-report-config-input.ts create mode 100644 Web/src/api-services/models/page-report-data-source-input.ts create mode 100644 Web/src/api-services/models/report-config-ds-type-enum.ts create mode 100644 Web/src/api-services/models/report-config-execute-sql-script-input.ts create mode 100644 Web/src/api-services/models/report-config-output.ts create mode 100644 Web/src/api-services/models/report-config-parse-sql-input.ts create mode 100644 Web/src/api-services/models/report-config-parse-sql-output.ts create mode 100644 Web/src/api-services/models/report-data-source-output.ts create mode 100644 Web/src/api-services/models/sql-sugar-paged-list-report-config-output.ts create mode 100644 Web/src/api-services/models/sql-sugar-paged-list-sys-report-data-source.ts create mode 100644 Web/src/api-services/models/sys-report-data-source.ts create mode 100644 Web/src/api-services/models/sys-report-field.ts create mode 100644 Web/src/api-services/models/sys-report-group.ts create mode 100644 Web/src/api-services/models/sys-report-layout-config.ts create mode 100644 Web/src/api-services/models/sys-report-param.ts create mode 100644 Web/src/api-services/models/update-report-config-input.ts create mode 100644 Web/src/api-services/models/update-report-data-source-input.ts create mode 100644 Web/src/api-services/models/update-report-group-input.ts create mode 100644 Web/src/views/system/reportConfig/component/editReportConfig.vue create mode 100644 Web/src/views/system/reportConfig/component/reportGroupPanel/editReportGroup.vue create mode 100644 Web/src/views/system/reportConfig/component/reportGroupPanel/index.vue create mode 100644 Web/src/views/system/reportConfig/component/reportView.vue create mode 100644 Web/src/views/system/reportConfig/index.vue create mode 100644 Web/src/views/system/reportConfig/inputCtrlType.ts create mode 100644 Web/src/views/system/reportDataSource/component/editReportDataSource.vue create mode 100644 Web/src/views/system/reportDataSource/index.vue create mode 100644 Web/src/views/system/reportDataSource/sqlSugarDbType.ts diff --git a/Admin.NET/Admin.NET.Core/Converter/CamelCaseValueConverter.cs b/Admin.NET/Admin.NET.Core/Converter/CamelCaseValueConverter.cs new file mode 100644 index 00000000..aa3e378b --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Converter/CamelCaseValueConverter.cs @@ -0,0 +1,45 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Admin.NET.Core; + +/// +/// 首字母小写(驼峰样式)Converter +/// +public class CamelCaseValueConverter : JsonConverter +{ + private static readonly CamelCaseNamingStrategy NamingStrategy = new(true, true); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteNull(); + return; + } + + if (typeof(IEnumerable).IsAssignableFrom(value.GetType())) + serializer.Serialize(writer, ((IEnumerable)value).Select(u => NamingStrategy.GetPropertyName(u, false))); + else + writer.WriteValue(NamingStrategy.GetPropertyName(value + "", false)); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + return reader.Value; + } + + public override bool CanConvert(Type objectType) + { + if (objectType == typeof(string) || typeof(IEnumerable).IsAssignableFrom(objectType)) + return true; + + return false; + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysReportConfig.cs b/Admin.NET/Admin.NET.Core/Entity/SysReportConfig.cs new file mode 100644 index 00000000..91fc655f --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysReportConfig.cs @@ -0,0 +1,87 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表配置 +/// +[SugarTable(null, "报表配置")] +[SysTable] +public class SysReportConfig : EntityBase +{ + /// + /// 名称 + /// + [SugarColumn(ColumnDescription = "名称", Length = 255)] + public string Name { get; set; } + + /// + /// 描述 + /// + [SugarColumn(ColumnDescription = "描述", Length = 500)] + public string? Description { get; set; } + + /// + /// 数据源类型 + /// + [SugarColumn(ColumnDescription = "数据源类型")] + public ReportConfigDsTypeEnum DsType { get; set; } + + /// + /// 数据源 + /// + [SugarColumn(ColumnDescription = "数据源")] + public string? DataSource { get; set; } + + /// + /// 分组Id + /// + [SugarColumn(ColumnDescription = "分组Id")] + public long? GroupId { get; set; } + + /// + /// 分组 + /// + [Navigate(NavigateType.OneToOne, nameof(GroupId))] + public SysReportGroup Group { get; set; } + + /// + /// 脚本语句 + /// + [SugarColumn(ColumnDescription = "脚本语句", ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string? SqlScript { get; set; } + + /// + /// 接口地址 + /// + [SugarColumn(ColumnDescription = "接口地址", Length = 4000)] + public string? ApiUrl { get; set; } + + /// + /// 接口请求方式 + /// + [SugarColumn(ColumnDescription = "接口请求方式", Length = 10)] + public string? ApiHttpMethod { get; set; } + + /// + /// 接口参数 + /// + [SugarColumn(ColumnDescription = "接口参数", Length = 4000)] + public string? ApiParams { get; set; } + + /// + /// 参数 + /// + [SugarColumn(ColumnDescription = "参数", ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string? Params { get; set; } + + /// + /// 列表字段 + /// + [SugarColumn(ColumnDescription = "列表字段", ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string? Fields { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysReportDataSource.cs b/Admin.NET/Admin.NET.Core/Entity/SysReportDataSource.cs new file mode 100644 index 00000000..ee7d69ee --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysReportDataSource.cs @@ -0,0 +1,39 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表数据源 +/// +[SugarTable(null, "报表数据源")] +[SysTable] +public class SysReportDataSource : EntityBase +{ + /// + /// 名称 + /// + [SugarColumn(ColumnDescription = "名称", Length = 255)] + public string Name { get; set; } + + /// + /// 数据库类型 + /// + [SugarColumn(ColumnDescription = "数据库类型", Length = 20)] + public string DbType { get; set; } + + /// + /// 连接字符串 + /// + [SugarColumn(ColumnDescription = "连接字符串", Length = 2000)] + public string ConnectionString { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnDescription = "备注", Length = 500)] + public string? Memo { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysReportGroup.cs b/Admin.NET/Admin.NET.Core/Entity/SysReportGroup.cs new file mode 100644 index 00000000..bc0f68d9 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysReportGroup.cs @@ -0,0 +1,27 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表分组 +/// +[SugarTable(null, "报表分组")] +[SysTable] +public class SysReportGroup : EntityBase +{ + /// + /// 编码 + /// + [SugarColumn(ColumnDescription = "编码", Length = 80)] + public string Number { get; set; } + + /// + /// 名称 + /// + [SugarColumn(ColumnDescription = "名称", Length = 255)] + public string Name { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs index 71ce30c5..e0b7ec12 100644 --- a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs +++ b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs @@ -846,4 +846,28 @@ public enum ErrorCodeEnum /// [ErrorCodeItemMetadata("身份标识已存在")] O1000, + + /// + /// 名称已存在 + /// + [ErrorCodeItemMetadata("名称已存在")] + C1000, + + /// + /// 数据源类型为 Sql 才允许执行 + /// + [ErrorCodeItemMetadata("数据源类型为 Sql 才允许执行")] + C1001, + + /// + /// 数据源不存在 + /// + [ErrorCodeItemMetadata("数据源不存在")] + C1002, + + /// + /// 编码已存在 + /// + [ErrorCodeItemMetadata("编码已存在")] + C1003, } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Enum/ReportConfigDsTypeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ReportConfigDsTypeEnum.cs new file mode 100644 index 00000000..4633e9f0 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Enum/ReportConfigDsTypeEnum.cs @@ -0,0 +1,25 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表配置数据源类型 +/// +public enum ReportConfigDsTypeEnum +{ + /// + /// Sql + /// + [Description("Sql")] + Sql = 0, + + /// + /// Api + /// + [Description("Api")] + Api = 1, +} \ 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 31c49312..b60a0426 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs @@ -216,6 +216,19 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1310000000721, Pid=1310000000701, Title="SqlSugar", Path="/doc/SqlSugar", Name="sysSqlSugar", Component="layout/routerView/link", IsIframe=false, IsKeepAlive=false, OutLink="https://www.donet5.com/Home/Doc", Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 }, new SysMenu{ Id=1310000000801, Pid=0, Title="关于项目", Path="/about", Name="about", Component="/about/index", Icon="ele-InfoFilled", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2023-03-12 00:00:00"), OrderNo=15000 }, + + new SysMenu{ Id=1310000000901, Pid=0, Title="报表开发", Path="/report", Name="report", Component="Layout", Icon="iconfont icon-ico_shuju", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=14500 }, + new SysMenu{ Id=1310000000911, Pid=1310000000901, Title="数据源配置", Path="/report/sysReportDataSource", Name="sysReportDataSource", Component="/system/reportDataSource/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000912, Pid=1310000000911, Title="查询", Permission="sysReportDataSource/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000913, Pid=1310000000911, Title="编辑", Permission="sysReportDataSource/update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000914, Pid=1310000000911, Title="增加", Permission="sysReportDataSource/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000915, Pid=1310000000911, Title="删除", Permission="sysReportDataSource/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000916, Pid=1310000000911, Title="复制", Permission="sysReportDataSource/copy", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000921, Pid=1310000000901, Title="报表配置", Path="/report/sysReportConfig", Name="sysReportConfig", Component="/system/reportConfig/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=110 }, + new SysMenu{ Id=1310000000922, Pid=1310000000921, Title="查询", Permission="sysReportConfig/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000923, Pid=1310000000921, Title="编辑", Permission="sysReportConfig/update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000924, Pid=1310000000921, Title="增加", Permission="sysReportConfig/v", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000925, Pid=1310000000921, Title="删除", Permission="sysReportConfig/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, ]; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigInput.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigInput.cs new file mode 100644 index 00000000..f4c2e01f --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigInput.cs @@ -0,0 +1,63 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表配置分页输入参数 +/// +public class PageReportConfigInput : BasePageInput +{ + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 分组Id + /// + public long? GroupId { get; set; } +} + +public class AddReportConfigInput : SysReportConfig +{ +} + +public class UpdateReportConfigInput : SysReportConfig +{ +} + +/// +/// 报表配置解析Sql输入参数 +/// +public class ReportConfigParseSqlInput +{ + /// + /// 数据源 + /// + public string DataSource { get; set; } + + /// + /// 脚本语句 + /// + public string SqlScript { get; set; } + + /// + /// 执行参数 + /// + public Dictionary ExecParams { get; set; } = new(); +} + +/// +/// 报表配置执行Sql脚本输入参数 +/// +public class ReportConfigExecuteSqlScriptInput : BaseIdInput +{ + /// + /// 执行参数 + /// + public Dictionary ExecParams { get; set; } = new(); +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigOutput.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigOutput.cs new file mode 100644 index 00000000..fa19666f --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportConfigOutput.cs @@ -0,0 +1,32 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Newtonsoft.Json; + +namespace Admin.NET.Core; + +/// +/// 报表配置输出参数 +/// +public class ReportConfigOutput : SysReportConfig +{ + /// + /// 分组名称 + /// + public string GroupName { get; set; } +} + +/// +/// 报表配置解析Sql输出参数 +/// +public class ReportConfigParseSqlOutput +{ + /// + /// 报表字段名称集合 + /// + [JsonConverter(typeof(CamelCaseValueConverter))] + public List FieldNames { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceDetail.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceDetail.cs new file mode 100644 index 00000000..7b01e33d --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceDetail.cs @@ -0,0 +1,38 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表数据源详情 +/// +public class SysReportDataSourceDetail +{ + /// + /// Id + /// + public string Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 是否内置 + /// + public bool IsBuildIn { get; set; } + + /// + /// 数据库类型 + /// + public SqlSugar.DbType DbType { get; set; } + + /// + /// 连接字符串 + /// + public string ConnectionString { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceInput.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceInput.cs new file mode 100644 index 00000000..b9ca98b9 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceInput.cs @@ -0,0 +1,26 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表数据源分页输入参数 +/// +public class PageReportDataSourceInput : BasePageInput +{ + /// + /// 名称 + /// + public string Name { get; set; } +} + +public class AddReportDataSourceInput : SysReportDataSource +{ +} + +public class UpdateReportDataSourceInput : SysReportDataSource +{ +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceOutput.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceOutput.cs new file mode 100644 index 00000000..ccd957d4 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportDataSourceOutput.cs @@ -0,0 +1,28 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表数据源输出参数 +/// +public class ReportDataSourceOutput +{ + /// + /// Id + /// + public string Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 是否内置 + /// + public bool IsBuildIn { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportGroupInput.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportGroupInput.cs new file mode 100644 index 00000000..e25c2580 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportGroupInput.cs @@ -0,0 +1,26 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 报表分组分页输入参数 +/// +public class PageReportGroupInput : BasePageInput +{ + /// + /// 名称 + /// + public string Name { get; set; } +} + +public class AddReportGroupInput : SysReportGroup +{ +} + +public class UpdateReportGroupInput : SysReportGroup +{ +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportLayoutConfig.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportLayoutConfig.cs new file mode 100644 index 00000000..a2dd5c3a --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/Dto/SysReportLayoutConfig.cs @@ -0,0 +1,89 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Newtonsoft.Json; + +namespace Admin.NET.Core; + +/// +/// 报表布局配置 +/// +public class SysReportLayoutConfig +{ + /// + /// 报表字段集合 + /// + public List Fields { get; set; } + + /// + /// 报表参数集合 + /// + public List Params { get; set; } +} + +/// +/// 报表字段 +/// +public class SysReportField +{ + /// + /// 字段名 + /// + [JsonConverter(typeof(CamelCaseValueConverter))] + public string FieldName { get; set; } + + /// + /// 字段标题 + /// + public string Title { get; set; } + + /// + /// 是否合计 + /// + public bool IsSummary { get; set; } + + /// + /// 是否显示 + /// + public bool Visible { get; set; } + + /// + /// 分组标题 + /// + public string GroupTitle { get; set; } + + /// + /// 列宽度 + /// + public int Width { get; set; } +} + +/// +/// 报表参数 +/// +public class SysReportParam +{ + /// + /// 参数名 + /// + [JsonConverter(typeof(CamelCaseValueConverter))] + public string ParamName { get; set; } + + /// + /// 参数标题 + /// + public string Title { get; set; } + + /// + /// 输入控件类型 + /// + public string InputCtrl { get; set; } + + /// + /// 默认值 + /// + public object DefaultValue { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportConfigService.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportConfigService.cs new file mode 100644 index 00000000..849dbf6a --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportConfigService.cs @@ -0,0 +1,310 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core.Service; + +/// +/// 报表配置服务 +/// +[ApiDescriptionSettings(Order = 500, Description = "报表配置")] +public class SysReportConfigService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + private readonly SysReportDataSourceService _sysReportDataSourceService; + private readonly SysTenantService _sysTenantService; + private readonly UserManager _userManager; + + /// + /// 报表配置服务构造函数 + /// + public SysReportConfigService(SqlSugarRepository rep, + SysReportDataSourceService sysReportDataSourceService, + SysTenantService sysTenantService, + UserManager userManager + ) + { + _rep = rep; + _sysReportDataSourceService = sysReportDataSourceService; + _sysTenantService = sysTenantService; + _userManager = userManager; + } + + /// + /// 获取报表配置分页列表 + /// + /// + /// + [DisplayName("获取报表配置分页列表")] + public async Task> Page(PageReportConfigInput input) + { + return await _rep.AsQueryable() + .LeftJoin((c, g) => c.GroupId == g.Id) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), (c, g) => c.Name.Contains(input.Name.Trim())) + .WhereIF(input.GroupId is > 0, (c, g) => c.GroupId == input.GroupId) + .Select((c, g) => new ReportConfigOutput + { + GroupName = g.Name + }, true) + .OrderBuilder(input) + .ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加报表配置 + /// + /// + /// + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("增加报表配置")] + public async Task Add(AddReportConfigInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Name == input.Name && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1000); + + await _rep.InsertAsync(input.Adapt()); + } + + /// + /// 更新报表配置 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("更新报表配置")] + public async Task Update(UpdateReportConfigInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Name == input.Name && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1000); + + await _rep.UpdateAsync(input.Adapt()); + } + + /// + /// 删除报表配置 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("删除报表配置")] + public async Task Delete(BaseIdInput input) + { + await _rep.DeleteAsync(u => u.Id == input.Id); + } + + /// + /// 复制报表配置 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Copy"), HttpPost] + [DisplayName("复制报表配置")] + public async Task Copy(BaseIdInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id); + if (entity == null) + throw Oops.Bah(ErrorCodeEnum.D1002); + + entity.Id = YitIdHelper.NextId(); + entity.Name = $"{entity.Name} - 副本"; + entity.CreateTime = DateTime.Now; + entity.CreateUserId = null; + entity.CreateUserName = null; + entity.UpdateTime = null; + entity.UpdateUserId = null; + entity.UpdateUserName = null; + + await Add(entity.Adapt()); + } + + /// + /// 获取报表布局配置 + /// + /// 输入参数 + [ApiDescriptionSettings(Name = "GetLayoutConfig"), HttpGet] + [DisplayName("获取报表布局配置")] + public SysReportLayoutConfig GetLayoutConfig([FromQuery] BaseIdInput input) + { + var entity = _rep.GetFirst(u => u.Id == input.Id); + if (entity == null) throw Oops.Bah(ErrorCodeEnum.D1002); + + return new SysReportLayoutConfig + { + Fields = string.IsNullOrEmpty(entity.Fields) ? [] : JSON.Deserialize>(entity.Fields), + Params = string.IsNullOrEmpty(entity.Params) ? [] : JSON.Deserialize>(entity.Params), + }; + } + + /// + /// 解析报表配置Sql + /// + /// 输入参数 + [ApiDescriptionSettings(Name = "ParseSql"), HttpPost] + [DisplayName("解析报表配置Sql")] + public async Task ParseSql(ReportConfigParseSqlInput input) + { + var dataTable = await InnerExecuteSqlScript(input.DataSource, input.SqlScript, input.ExecParams); + var fieldNames = (from DataColumn column in dataTable.Columns select column.ColumnName).ToList(); + + return new ReportConfigParseSqlOutput + { + FieldNames = fieldNames + }; + } + + /// + /// 执行报表配置Sql脚本 + /// + /// 输入参数 + [ApiDescriptionSettings(Name = "ExecuteSqlScript"), HttpPost] + [DisplayName("执行报表配置Sql脚本")] + // 指定使用 CamelCaseDictionaryKey 的序列化配置选项,使字典的 Key 转换为驼峰样式 + [UnifySerializerSetting("CamelCaseDictionaryKey")] + public async Task>> ExecuteSqlScript(ReportConfigExecuteSqlScriptInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id); + if (entity == null) throw Oops.Bah(ErrorCodeEnum.D1002); + + if (entity.DsType != ReportConfigDsTypeEnum.Sql) + throw Oops.Bah(ErrorCodeEnum.C1001); + + var layoutConfig = GetLayoutConfig(input); + + var execParams = new Dictionary(input.ExecParams); + + // 补充没有传入的参数,如果传入 null,则填充空字符串,不为 null sqlsugar 才会构造参数 + foreach (var param in layoutConfig.Params) + { + execParams.TryAdd(param.ParamName, ""); + execParams[param.ParamName] ??= ""; + } + + var dataTable = await InnerExecuteSqlScript(entity.DataSource, entity.SqlScript, execParams); + + // 处理汇总字段 + var summaryFieldNames = layoutConfig.Fields.Where(u => u.IsSummary).Select(u => u.FieldName).ToList(); + if (summaryFieldNames.Count > 0) + { + var summaryInfo = new Dictionary(); + UnifyContext.Fill(summaryInfo); + foreach (var summaryFieldName in summaryFieldNames) + { + summaryInfo[summaryFieldName] = dataTable.AsEnumerable().Sum(row => + { + decimal.TryParse(row[summaryFieldName] + "", out decimal summaryValue); + return summaryValue; + }); + } + } + + return dataTable.AsEnumerable().Select(UtilMethods.DataRowToDictionary).ToList(); + } + + /// + /// 执行Sql脚本内部实现 + /// + /// + /// + /// + /// + private async Task InnerExecuteSqlScript(string dataSource, string sqlScript, Dictionary execParams) + { + var isSelectQuery = IsSelectQuery(sqlScript); + + var dataSourceDetailList = await _sysReportDataSourceService.GetDataSourceListIncludeDetail(); + var dataSourceDetail = dataSourceDetailList.FirstOrDefault(u => u.Id == dataSource) ?? throw Oops.Bah(ErrorCodeEnum.C1002); + ISqlSugarClient dbClient = GetDbClient(dataSourceDetail); + + var newExecParams = BuildInParamsHandle(dbClient, sqlScript, execParams); + var parameters = newExecParams.Select(u => new SugarParameter(u.Key, u.Value)).ToList(); + + if (isSelectQuery) + { + // SELECT 查询 + var dataTable = await dbClient.Ado.GetDataTableAsync(sqlScript, parameters); + return dataTable; + } + else + { + // 存储过程 + var dataTable = await dbClient.Ado.UseStoredProcedure().GetDataTableAsync(sqlScript, parameters); + return dataTable; + } + } + + /// + /// 获取 DbClient + /// + /// + /// + private ISqlSugarClient GetDbClient(SysReportDataSourceDetail dataSourceDetail) + { + ISqlSugarClient dbClient = null; + if (dataSourceDetail.IsBuildIn) + { + // 获取内置数据库和租户的连接 + dbClient = _sysTenantService.GetTenantDbConnectionScope(long.Parse(dataSourceDetail.Id)); + } + else + { + if (SqlSugarSetup.ITenant.IsAnyConnection(dataSourceDetail.Id)) + { + dbClient = SqlSugarSetup.ITenant.GetConnectionScope(dataSourceDetail.Id); + } + + // dbClient 不存在或者连接字符串不一样,则重新设置 + if (dbClient == null || dbClient.CurrentConnectionConfig.ConnectionString != dataSourceDetail.ConnectionString) + { + // 获取默认库连接配置 + var dbOptions = App.GetOptions(); + var mainConnConfig = dbOptions.ConnectionConfigs.First(u => u.ConfigId.ToString() == SqlSugarConst.MainConfigId); + + // 设置连接配置 + var tenantConnConfig = new DbConnectionConfig + { + ConfigId = dataSourceDetail.Id, + DbType = dataSourceDetail.DbType, + IsAutoCloseConnection = true, + ConnectionString = dataSourceDetail.ConnectionString, + DbSettings = new DbSettings + { + EnableUnderLine = mainConnConfig.DbSettings.EnableUnderLine, + }, + }; + SqlSugarSetup.ITenant.AddConnection(tenantConnConfig); + dbClient = SqlSugarSetup.ITenant.GetConnectionScope(dataSourceDetail.Id); + } + } + + return dbClient; + } + + /// + /// 内置参数处理 + /// + private Dictionary BuildInParamsHandle(ISqlSugarClient dbClient, string sqlScript, Dictionary execParams) + { + var newExecParams = new Dictionary(execParams); + + if (sqlScript.IndexOf("@curTenantId", StringComparison.Ordinal) > -1) newExecParams["@curTenantId"] = _userManager.TenantId; + if (sqlScript.IndexOf("@curUserId", StringComparison.Ordinal) > -1) newExecParams["@curUserId"] = _userManager.UserId; + + return newExecParams; + } + + private static bool IsSelectQuery(string sqlScript) + { + // 使用正则表达式判断是否包含 SELECT 关键字(忽略大小写) + var pattern = @"\bselect\b"; + var isSelectQuery = Regex.IsMatch(sqlScript, pattern, RegexOptions.IgnoreCase); + + return isSelectQuery; + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportDataSourceService.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportDataSourceService.cs new file mode 100644 index 00000000..8d3f3909 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportDataSourceService.cs @@ -0,0 +1,185 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Furion.Localization; + +namespace Admin.NET.Core.Service; + +/// +/// 报表数据源服务 +/// +[ApiDescriptionSettings(Order = 500, Description = "报表数据源")] +public class SysReportDataSourceService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + private readonly SqlSugarRepository _tenantRep; + private readonly ISqlSugarClient _db; + + /// + /// 报表数据源服务构造函数 + /// + public SysReportDataSourceService(SqlSugarRepository rep, + SqlSugarRepository tenantRep, + ISqlSugarClient db + ) + { + _rep = rep; + _tenantRep = tenantRep; + _db = db; + } + + /// + /// 获取报表数据源分页列表 + /// + /// + /// + [DisplayName("获取报表数据源分页列表")] + public async Task> Page(PageReportDataSourceInput input) + { + var list = await _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .Select(u => new SysReportDataSource(), true) + .OrderBuilder(input) + .ToPagedListAsync(input.Page, input.PageSize); + + // // 清空连接字符串 + // foreach (var item in list.Items) item.ConnectionString = ""; + + return list; + } + + /// + /// 增加报表数据源 + /// + /// + /// + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("增加报表数据源")] + public async Task Add(AddReportDataSourceInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Name == input.Name && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1000); + + await _rep.InsertAsync(input.Adapt()); + } + + /// + /// 更新报表数据源 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("更新报表数据源")] + public async Task Update(UpdateReportDataSourceInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Name == input.Name && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1000); + + var updateEntity = input.Adapt(); + + // // 如果连接字符串为空,则使用原来的值 + // if (string.IsNullOrEmpty(updateEntity.ConnectionString)) + // { + // var entity = await _rep.GetFirstAsync(u => u.Id == input.Id); + // updateEntity.ConnectionString = entity.ConnectionString; + // } + + await _rep.UpdateAsync(updateEntity); + } + + /// + /// 删除报表数据源 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("删除报表数据源")] + public async Task Delete(BaseIdInput input) + { + await _rep.DeleteAsync(u => u.Id == input.Id); + } + + /// + /// 获取包含详细信息的数据源列表 + /// + /// + [NonAction] + public async Task> GetDataSourceListIncludeDetail() + { + var list = new List(); + + // 从配置获取数据源 + var configs = App.GetOptions().ConnectionConfigs; + foreach (var config in configs) + { + var configId = config.ConfigId.ToString(); + var db = _db.AsTenant().GetConnectionScope(configId); + list.Add(new SysReportDataSourceDetail + { + Id = configId, + Name = db.Ado.Connection.Database, + IsBuildIn = true, + DbType = config.DbType, + ConnectionString = db.Ado.Connection.ConnectionString, + }); + } + + // 从租户获取数据源 + var tenantList = await _tenantRep.AsQueryable() + .LeftJoin((u, o) => u.OrgId == o.Id).ClearFilter() + .Where((u, o) => u.TenantType == TenantTypeEnum.Db) + .Select((u, o) => new { u.Id, o.Name, u.DbType, u.Connection }) + .ToListAsync(); + foreach (var tenant in tenantList) + { + list.Add(new SysReportDataSourceDetail + { + Id = tenant.Id.ToString(), + Name = tenant.Name, + IsBuildIn = true, + DbType = tenant.DbType, + ConnectionString = tenant.Connection, + }); + } + + // 用户自定义 + var dsList = await _rep.GetListAsync(); + foreach (var ds in dsList) + { + list.Add(new SysReportDataSourceDetail + { + Id = ds.Id.ToString(), + Name = ds.Name, + IsBuildIn = false, + DbType = Enum.Parse(ds.DbType), + ConnectionString = ds.ConnectionString, + }); + } + + foreach (var item in list.Where(item => item.IsBuildIn)) item.Name += L.Text["(内置)"]; + + return list; + } + + /// + /// 获取报表数据源列表 + /// + [ApiDescriptionSettings(Name = "GetDataSourceList"), HttpGet] + [DisplayName("获取报表数据源列表")] + public async Task> GetDataSourceList() + { + return (await GetDataSourceListIncludeDetail()).Select(u => new ReportDataSourceOutput + { + Id = u.Id, + Name = u.Name, + IsBuildIn = u.IsBuildIn + }).ToList(); + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportGroupService.cs b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportGroupService.cs new file mode 100644 index 00000000..73b37a6d --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Service/ReportConfig/SysReportGroupService.cs @@ -0,0 +1,81 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core.Service; + +/// +/// 报表分组服务 +/// +[ApiDescriptionSettings(Order = 500, Description = "报表分组")] +public class SysReportGroupService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + + /// + /// 报表分组服务构造函数 + /// + public SysReportGroupService(SqlSugarRepository rep) + { + _rep = rep; + } + + /// + /// 获取报表分组列表 + /// + /// + [ApiDescriptionSettings(Name = "GetList"), HttpGet] + [DisplayName("获取报表分组列表")] + public async Task> GetList() + { + return await _rep.AsQueryable().OrderBy(u => u.Number).ToListAsync(); + } + + /// + /// 增加报表分组 + /// + /// + /// + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("增加报表分组")] + public async Task Add(AddReportGroupInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Number == input.Number && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1003); + + await _rep.InsertAsync(input.Adapt()); + } + + /// + /// 更新报表分组 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("更新报表分组")] + public async Task Update(UpdateReportGroupInput input) + { + var isExist = await _rep.IsAnyAsync(u => u.Number == input.Number && u.Id != input.Id); + if (isExist) + throw Oops.Bah(ErrorCodeEnum.C1003); + + await _rep.UpdateAsync(input.Adapt()); + } + + /// + /// 删除报表分组 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("删除报表分组")] + public async Task Delete(BaseIdInput input) + { + await _rep.DeleteAsync(u => u.Id == input.Id); + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Web.Core/Startup.cs b/Admin.NET/Admin.NET.Web.Core/Startup.cs index 74005d85..3d340a58 100644 --- a/Admin.NET/Admin.NET.Web.Core/Startup.cs +++ b/Admin.NET/Admin.NET.Web.Core/Startup.cs @@ -24,6 +24,7 @@ using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; using MQTTnet.AspNetCore; using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; using OnceMi.AspNetCore.OSS; using RabbitMQ.Client; using SixLabors.ImageSharp.Web.DependencyInjection; @@ -133,6 +134,12 @@ public class Startup : AppStartup //options.JsonSerializerOptions.Converters.AddDateTimeTypeConverters("yyyy-MM-dd HH:mm:ss", localized: true); // 时间格式 }); + // 增加字典Key小写处理序列化配置选项 + var camelCaseDictionaryKeyContractJsonSetting = new JsonSerializerSettings(); + SetNewtonsoftJsonSetting(camelCaseDictionaryKeyContractJsonSetting); + camelCaseDictionaryKeyContractJsonSetting.ContractResolver = new CamelCasePropertyNamesContractResolver(); // 首字母小写(驼峰样式),字典 Key 也会转换为驼峰样式 + services.AddUnifyJsonOptions("CamelCaseDictionaryKey", camelCaseDictionaryKeyContractJsonSetting); + // SqlSugar services.AddSqlSugar(); diff --git a/Web/package.json b/Web/package.json index 0e4a7174..cc384fd3 100644 --- a/Web/package.json +++ b/Web/package.json @@ -67,6 +67,7 @@ "sm-crypto-v2": "^1.12.0", "sortablejs": "^1.15.6", "splitpanes": "^4.0.4", + "sql-formatter": "^15.6.5", "uuid": "^11.1.0", "vcrontab-3": "^3.3.22", "vform3-builds": "^3.0.10", diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index ec424ba0..7c4107f4 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -54,6 +54,9 @@ export * from './apis/sys-pos-api'; export * from './apis/sys-print-api'; export * from './apis/sys-proc-api'; export * from './apis/sys-region-api'; +export * from './apis/sys-report-config-api'; +export * from './apis/sys-report-data-source-api'; +export * from './apis/sys-report-group-api'; export * from './apis/sys-role-api'; export * from './apis/sys-schedule-api'; export * from './apis/sys-server-api'; diff --git a/Web/src/api-services/apis/sys-report-config-api.ts b/Web/src/api-services/apis/sys-report-config-api.ts new file mode 100644 index 00000000..7a216020 --- /dev/null +++ b/Web/src/api-services/apis/sys-report-config-api.ts @@ -0,0 +1,732 @@ +/* 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 { AddReportConfigInput } from '../models'; +import { AdminNETResultListDictionaryStringObject } from '../models'; +import { AdminNETResultReportConfigParseSqlOutput } from '../models'; +import { AdminNETResultSqlSugarPagedListReportConfigOutput } from '../models'; +import { AdminNETResultSysReportLayoutConfig } from '../models'; +import { BaseIdInput } from '../models'; +import { PageReportConfigInput } from '../models'; +import { ReportConfigExecuteSqlScriptInput } from '../models'; +import { ReportConfigParseSqlInput } from '../models'; +import { UpdateReportConfigInput } from '../models'; +/** + * SysReportConfigApi - axios parameter creator + * @export + */ +export const SysReportConfigApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加报表配置 + * @param {AddReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigAddPost: async (body?: AddReportConfigInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigCopyPost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/copy`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 执行报表配置Sql脚本 + * @param {ReportConfigExecuteSqlScriptInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigExecuteSqlScriptPost: async (body?: ReportConfigExecuteSqlScriptInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/executeSqlScript`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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} + */ + apiSysReportConfigGetLayoutConfigGet: 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 apiSysReportConfigGetLayoutConfigGet.'); + } + const localVarPath = `/api/sysReportConfig/getLayoutConfig`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {PageReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigPagePost: async (body?: PageReportConfigInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 解析报表配置Sql + * @param {ReportConfigParseSqlInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigParseSqlPost: async (body?: ReportConfigParseSqlInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/parseSql`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {UpdateReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportConfigUpdatePost: async (body?: UpdateReportConfigInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportConfig/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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, + }; + }, + } +}; + +/** + * SysReportConfigApi - functional programming interface + * @export + */ +export const SysReportConfigApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary 增加报表配置 + * @param {AddReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigAddPost(body?: AddReportConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigAddPost(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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigCopyPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigCopyPost(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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 执行报表配置Sql脚本 + * @param {ReportConfigExecuteSqlScriptInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigExecuteSqlScriptPost(body?: ReportConfigExecuteSqlScriptInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigExecuteSqlScriptPost(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 apiSysReportConfigGetLayoutConfigGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigGetLayoutConfigGet(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 {PageReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigPagePost(body?: PageReportConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 解析报表配置Sql + * @param {ReportConfigParseSqlInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigParseSqlPost(body?: ReportConfigParseSqlInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigParseSqlPost(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 {UpdateReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigUpdatePost(body?: UpdateReportConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportConfigApiAxiosParamCreator(configuration).apiSysReportConfigUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * SysReportConfigApi - factory interface + * @export + */ +export const SysReportConfigApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加报表配置 + * @param {AddReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigAddPost(body?: AddReportConfigInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 复制报表配置 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigCopyPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigCopyPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除报表配置 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 执行报表配置Sql脚本 + * @param {ReportConfigExecuteSqlScriptInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigExecuteSqlScriptPost(body?: ReportConfigExecuteSqlScriptInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigExecuteSqlScriptPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取报表布局配置 + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigGetLayoutConfigGet(id: number, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigGetLayoutConfigGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取报表配置分页列表 + * @param {PageReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigPagePost(body?: PageReportConfigInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 解析报表配置Sql + * @param {ReportConfigParseSqlInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigParseSqlPost(body?: ReportConfigParseSqlInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigParseSqlPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新报表配置 + * @param {UpdateReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportConfigUpdatePost(body?: UpdateReportConfigInput, options?: AxiosRequestConfig): Promise> { + return SysReportConfigApiFp(configuration).apiSysReportConfigUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SysReportConfigApi - object-oriented interface + * @export + * @class SysReportConfigApi + * @extends {BaseAPI} + */ +export class SysReportConfigApi extends BaseAPI { + /** + * + * @summary 增加报表配置 + * @param {AddReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigAddPost(body?: AddReportConfigInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 复制报表配置 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigCopyPost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigCopyPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除报表配置 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 执行报表配置Sql脚本 + * @param {ReportConfigExecuteSqlScriptInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigExecuteSqlScriptPost(body?: ReportConfigExecuteSqlScriptInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigExecuteSqlScriptPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取报表布局配置 + * @param {number} id 主键Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigGetLayoutConfigGet(id: number, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigGetLayoutConfigGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取报表配置分页列表 + * @param {PageReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigPagePost(body?: PageReportConfigInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 解析报表配置Sql + * @param {ReportConfigParseSqlInput} [body] 输入参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigParseSqlPost(body?: ReportConfigParseSqlInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigParseSqlPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新报表配置 + * @param {UpdateReportConfigInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportConfigApi + */ + public async apiSysReportConfigUpdatePost(body?: UpdateReportConfigInput, options?: AxiosRequestConfig) : Promise> { + return SysReportConfigApiFp(this.configuration).apiSysReportConfigUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/apis/sys-report-data-source-api.ts b/Web/src/api-services/apis/sys-report-data-source-api.ts new file mode 100644 index 00000000..6a5f6069 --- /dev/null +++ b/Web/src/api-services/apis/sys-report-data-source-api.ts @@ -0,0 +1,467 @@ +/* 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 { AddReportDataSourceInput } from '../models'; +import { AdminNETResultListReportDataSourceOutput } from '../models'; +import { AdminNETResultSqlSugarPagedListSysReportDataSource } from '../models'; +import { BaseIdInput } from '../models'; +import { PageReportDataSourceInput } from '../models'; +import { UpdateReportDataSourceInput } from '../models'; +/** + * SysReportDataSourceApi - axios parameter creator + * @export + */ +export const SysReportDataSourceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加报表数据源 + * @param {AddReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportDataSourceAddPost: async (body?: AddReportDataSourceInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportDataSource/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportDataSourceDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportDataSource/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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} + */ + apiSysReportDataSourceGetDataSourceListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportDataSource/getDataSourceList`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {PageReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportDataSourcePagePost: async (body?: PageReportDataSourceInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportDataSource/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {UpdateReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportDataSourceUpdatePost: async (body?: UpdateReportDataSourceInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportDataSource/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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, + }; + }, + } +}; + +/** + * SysReportDataSourceApi - functional programming interface + * @export + */ +export const SysReportDataSourceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary 增加报表数据源 + * @param {AddReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceAddPost(body?: AddReportDataSourceInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportDataSourceApiAxiosParamCreator(configuration).apiSysReportDataSourceAddPost(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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportDataSourceApiAxiosParamCreator(configuration).apiSysReportDataSourceDeletePost(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 apiSysReportDataSourceGetDataSourceListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportDataSourceApiAxiosParamCreator(configuration).apiSysReportDataSourceGetDataSourceListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取报表数据源分页列表 + * @param {PageReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourcePagePost(body?: PageReportDataSourceInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportDataSourceApiAxiosParamCreator(configuration).apiSysReportDataSourcePagePost(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 {UpdateReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceUpdatePost(body?: UpdateReportDataSourceInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportDataSourceApiAxiosParamCreator(configuration).apiSysReportDataSourceUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * SysReportDataSourceApi - factory interface + * @export + */ +export const SysReportDataSourceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加报表数据源 + * @param {AddReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceAddPost(body?: AddReportDataSourceInput, options?: AxiosRequestConfig): Promise> { + return SysReportDataSourceApiFp(configuration).apiSysReportDataSourceAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除报表数据源 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return SysReportDataSourceApiFp(configuration).apiSysReportDataSourceDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取报表数据源列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceGetDataSourceListGet(options?: AxiosRequestConfig): Promise> { + return SysReportDataSourceApiFp(configuration).apiSysReportDataSourceGetDataSourceListGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取报表数据源分页列表 + * @param {PageReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourcePagePost(body?: PageReportDataSourceInput, options?: AxiosRequestConfig): Promise> { + return SysReportDataSourceApiFp(configuration).apiSysReportDataSourcePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新报表数据源 + * @param {UpdateReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportDataSourceUpdatePost(body?: UpdateReportDataSourceInput, options?: AxiosRequestConfig): Promise> { + return SysReportDataSourceApiFp(configuration).apiSysReportDataSourceUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SysReportDataSourceApi - object-oriented interface + * @export + * @class SysReportDataSourceApi + * @extends {BaseAPI} + */ +export class SysReportDataSourceApi extends BaseAPI { + /** + * + * @summary 增加报表数据源 + * @param {AddReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportDataSourceApi + */ + public async apiSysReportDataSourceAddPost(body?: AddReportDataSourceInput, options?: AxiosRequestConfig) : Promise> { + return SysReportDataSourceApiFp(this.configuration).apiSysReportDataSourceAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除报表数据源 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportDataSourceApi + */ + public async apiSysReportDataSourceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise> { + return SysReportDataSourceApiFp(this.configuration).apiSysReportDataSourceDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取报表数据源列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportDataSourceApi + */ + public async apiSysReportDataSourceGetDataSourceListGet(options?: AxiosRequestConfig) : Promise> { + return SysReportDataSourceApiFp(this.configuration).apiSysReportDataSourceGetDataSourceListGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取报表数据源分页列表 + * @param {PageReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportDataSourceApi + */ + public async apiSysReportDataSourcePagePost(body?: PageReportDataSourceInput, options?: AxiosRequestConfig) : Promise> { + return SysReportDataSourceApiFp(this.configuration).apiSysReportDataSourcePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新报表数据源 + * @param {UpdateReportDataSourceInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportDataSourceApi + */ + public async apiSysReportDataSourceUpdatePost(body?: UpdateReportDataSourceInput, options?: AxiosRequestConfig) : Promise> { + return SysReportDataSourceApiFp(this.configuration).apiSysReportDataSourceUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/apis/sys-report-group-api.ts b/Web/src/api-services/apis/sys-report-group-api.ts new file mode 100644 index 00000000..78da74ac --- /dev/null +++ b/Web/src/api-services/apis/sys-report-group-api.ts @@ -0,0 +1,382 @@ +/* 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 { AddReportGroupInput } from '../models'; +import { AdminNETResultListSysReportGroup } from '../models'; +import { BaseIdInput } from '../models'; +import { UpdateReportGroupInput } from '../models'; +/** + * SysReportGroupApi - axios parameter creator + * @export + */ +export const SysReportGroupApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加报表分组 + * @param {AddReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportGroupAddPost: async (body?: AddReportGroupInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportGroup/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportGroupDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportGroup/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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} + */ + apiSysReportGroupGetListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportGroup/getList`; + // 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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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 {UpdateReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysReportGroupUpdatePost: async (body?: UpdateReportGroupInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysReportGroup/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 + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + 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, + }; + }, + } +}; + +/** + * SysReportGroupApi - functional programming interface + * @export + */ +export const SysReportGroupApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary 增加报表分组 + * @param {AddReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupAddPost(body?: AddReportGroupInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportGroupApiAxiosParamCreator(configuration).apiSysReportGroupAddPost(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 {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportGroupApiAxiosParamCreator(configuration).apiSysReportGroupDeletePost(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 apiSysReportGroupGetListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportGroupApiAxiosParamCreator(configuration).apiSysReportGroupGetListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新报表分组 + * @param {UpdateReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupUpdatePost(body?: UpdateReportGroupInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysReportGroupApiAxiosParamCreator(configuration).apiSysReportGroupUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * SysReportGroupApi - factory interface + * @export + */ +export const SysReportGroupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加报表分组 + * @param {AddReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupAddPost(body?: AddReportGroupInput, options?: AxiosRequestConfig): Promise> { + return SysReportGroupApiFp(configuration).apiSysReportGroupAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除报表分组 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return SysReportGroupApiFp(configuration).apiSysReportGroupDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取报表分组列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupGetListGet(options?: AxiosRequestConfig): Promise> { + return SysReportGroupApiFp(configuration).apiSysReportGroupGetListGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新报表分组 + * @param {UpdateReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysReportGroupUpdatePost(body?: UpdateReportGroupInput, options?: AxiosRequestConfig): Promise> { + return SysReportGroupApiFp(configuration).apiSysReportGroupUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SysReportGroupApi - object-oriented interface + * @export + * @class SysReportGroupApi + * @extends {BaseAPI} + */ +export class SysReportGroupApi extends BaseAPI { + /** + * + * @summary 增加报表分组 + * @param {AddReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportGroupApi + */ + public async apiSysReportGroupAddPost(body?: AddReportGroupInput, options?: AxiosRequestConfig) : Promise> { + return SysReportGroupApiFp(this.configuration).apiSysReportGroupAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除报表分组 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportGroupApi + */ + public async apiSysReportGroupDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise> { + return SysReportGroupApiFp(this.configuration).apiSysReportGroupDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取报表分组列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportGroupApi + */ + public async apiSysReportGroupGetListGet(options?: AxiosRequestConfig) : Promise> { + return SysReportGroupApiFp(this.configuration).apiSysReportGroupGetListGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新报表分组 + * @param {UpdateReportGroupInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysReportGroupApi + */ + public async apiSysReportGroupUpdatePost(body?: UpdateReportGroupInput, options?: AxiosRequestConfig) : Promise> { + return SysReportGroupApiFp(this.configuration).apiSysReportGroupUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/models/add-report-config-input.ts b/Web/src/api-services/models/add-report-config-input.ts new file mode 100644 index 00000000..29ac1f63 --- /dev/null +++ b/Web/src/api-services/models/add-report-config-input.ts @@ -0,0 +1,180 @@ +/* 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 { ReportConfigDsTypeEnum } from './report-config-ds-type-enum'; +import { SysReportGroup } from './sys-report-group'; + /** + * + * + * @export + * @interface AddReportConfigInput + */ +export interface AddReportConfigInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof AddReportConfigInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof AddReportConfigInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof AddReportConfigInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof AddReportConfigInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof AddReportConfigInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof AddReportConfigInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof AddReportConfigInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof AddReportConfigInput + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof AddReportConfigInput + */ + name?: string | null; + + /** + * 描述 + * + * @type {string} + * @memberof AddReportConfigInput + */ + description?: string | null; + + /** + * @type {ReportConfigDsTypeEnum} + * @memberof AddReportConfigInput + */ + dsType?: ReportConfigDsTypeEnum; + + /** + * 数据源 + * + * @type {string} + * @memberof AddReportConfigInput + */ + dataSource?: string | null; + + /** + * 分组Id + * + * @type {number} + * @memberof AddReportConfigInput + */ + groupId?: number | null; + + /** + * @type {SysReportGroup} + * @memberof AddReportConfigInput + */ + group?: SysReportGroup; + + /** + * 脚本语句 + * + * @type {string} + * @memberof AddReportConfigInput + */ + sqlScript?: string | null; + + /** + * 接口地址 + * + * @type {string} + * @memberof AddReportConfigInput + */ + apiUrl?: string | null; + + /** + * 接口请求方式 + * + * @type {string} + * @memberof AddReportConfigInput + */ + apiHttpMethod?: string | null; + + /** + * 接口参数 + * + * @type {string} + * @memberof AddReportConfigInput + */ + apiParams?: string | null; + + /** + * 参数 + * + * @type {string} + * @memberof AddReportConfigInput + */ + params?: string | null; + + /** + * 列表字段 + * + * @type {string} + * @memberof AddReportConfigInput + */ + fields?: string | null; +} diff --git a/Web/src/api-services/models/add-report-data-source-input.ts b/Web/src/api-services/models/add-report-data-source-input.ts new file mode 100644 index 00000000..09947276 --- /dev/null +++ b/Web/src/api-services/models/add-report-data-source-input.ts @@ -0,0 +1,118 @@ +/* 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 AddReportDataSourceInput + */ +export interface AddReportDataSourceInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof AddReportDataSourceInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof AddReportDataSourceInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof AddReportDataSourceInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof AddReportDataSourceInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof AddReportDataSourceInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof AddReportDataSourceInput + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + name?: string | null; + + /** + * 数据库类型 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + dbType?: string | null; + + /** + * 连接字符串 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + connectionString?: string | null; + + /** + * 备注 + * + * @type {string} + * @memberof AddReportDataSourceInput + */ + memo?: string | null; +} diff --git a/Web/src/api-services/models/add-report-group-input.ts b/Web/src/api-services/models/add-report-group-input.ts new file mode 100644 index 00000000..04da9e7a --- /dev/null +++ b/Web/src/api-services/models/add-report-group-input.ts @@ -0,0 +1,102 @@ +/* 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 AddReportGroupInput + */ +export interface AddReportGroupInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof AddReportGroupInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof AddReportGroupInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof AddReportGroupInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof AddReportGroupInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof AddReportGroupInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof AddReportGroupInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof AddReportGroupInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof AddReportGroupInput + */ + isDelete?: boolean; + + /** + * 编码 + * + * @type {string} + * @memberof AddReportGroupInput + */ + number?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof AddReportGroupInput + */ + name?: string | null; +} diff --git a/Web/src/api-services/models/admin-netresult-list-dictionary-string-object.ts b/Web/src/api-services/models/admin-netresult-list-dictionary-string-object.ts new file mode 100644 index 00000000..9ecee875 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-list-dictionary-string-object.ts @@ -0,0 +1,70 @@ +/* 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 AdminNETResultListDictionaryStringObject + */ +export interface AdminNETResultListDictionaryStringObject { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultListDictionaryStringObject + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultListDictionaryStringObject + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultListDictionaryStringObject + */ + message?: string | null; + + /** + * 数据 + * + * @type {Array<{ [key: string]: any; }>} + * @memberof AdminNETResultListDictionaryStringObject + */ + result?: Array<{ [key: string]: any; }> | null; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultListDictionaryStringObject + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultListDictionaryStringObject + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-list-report-data-source-output.ts b/Web/src/api-services/models/admin-netresult-list-report-data-source-output.ts new file mode 100644 index 00000000..f6d52307 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-list-report-data-source-output.ts @@ -0,0 +1,71 @@ +/* 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 { ReportDataSourceOutput } from './report-data-source-output'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultListReportDataSourceOutput + */ +export interface AdminNETResultListReportDataSourceOutput { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultListReportDataSourceOutput + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultListReportDataSourceOutput + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultListReportDataSourceOutput + */ + message?: string | null; + + /** + * 数据 + * + * @type {Array} + * @memberof AdminNETResultListReportDataSourceOutput + */ + result?: Array | null; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultListReportDataSourceOutput + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultListReportDataSourceOutput + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-list-sys-report-group.ts b/Web/src/api-services/models/admin-netresult-list-sys-report-group.ts new file mode 100644 index 00000000..28c7d856 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-list-sys-report-group.ts @@ -0,0 +1,71 @@ +/* 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 { SysReportGroup } from './sys-report-group'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultListSysReportGroup + */ +export interface AdminNETResultListSysReportGroup { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultListSysReportGroup + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultListSysReportGroup + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultListSysReportGroup + */ + message?: string | null; + + /** + * 数据 + * + * @type {Array} + * @memberof AdminNETResultListSysReportGroup + */ + result?: Array | null; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultListSysReportGroup + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultListSysReportGroup + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-report-config-parse-sql-output.ts b/Web/src/api-services/models/admin-netresult-report-config-parse-sql-output.ts new file mode 100644 index 00000000..7b0361d8 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-report-config-parse-sql-output.ts @@ -0,0 +1,69 @@ +/* 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 { ReportConfigParseSqlOutput } from './report-config-parse-sql-output'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultReportConfigParseSqlOutput + */ +export interface AdminNETResultReportConfigParseSqlOutput { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + message?: string | null; + + /** + * @type {ReportConfigParseSqlOutput} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + result?: ReportConfigParseSqlOutput; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultReportConfigParseSqlOutput + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-report-config-output.ts b/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-report-config-output.ts new file mode 100644 index 00000000..6282b392 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-report-config-output.ts @@ -0,0 +1,69 @@ +/* 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 { SqlSugarPagedListReportConfigOutput } from './sql-sugar-paged-list-report-config-output'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultSqlSugarPagedListReportConfigOutput + */ +export interface AdminNETResultSqlSugarPagedListReportConfigOutput { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + message?: string | null; + + /** + * @type {SqlSugarPagedListReportConfigOutput} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + result?: SqlSugarPagedListReportConfigOutput; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultSqlSugarPagedListReportConfigOutput + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-sys-report-data-source.ts b/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-sys-report-data-source.ts new file mode 100644 index 00000000..563b8df8 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-sql-sugar-paged-list-sys-report-data-source.ts @@ -0,0 +1,69 @@ +/* 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 { SqlSugarPagedListSysReportDataSource } from './sql-sugar-paged-list-sys-report-data-source'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultSqlSugarPagedListSysReportDataSource + */ +export interface AdminNETResultSqlSugarPagedListSysReportDataSource { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + message?: string | null; + + /** + * @type {SqlSugarPagedListSysReportDataSource} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + result?: SqlSugarPagedListSysReportDataSource; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultSqlSugarPagedListSysReportDataSource + */ + time?: Date; +} diff --git a/Web/src/api-services/models/admin-netresult-sys-report-layout-config.ts b/Web/src/api-services/models/admin-netresult-sys-report-layout-config.ts new file mode 100644 index 00000000..c68ee974 --- /dev/null +++ b/Web/src/api-services/models/admin-netresult-sys-report-layout-config.ts @@ -0,0 +1,69 @@ +/* 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 { SysReportLayoutConfig } from './sys-report-layout-config'; + /** + * 全局返回结果 + * + * @export + * @interface AdminNETResultSysReportLayoutConfig + */ +export interface AdminNETResultSysReportLayoutConfig { + + /** + * 状态码 + * + * @type {number} + * @memberof AdminNETResultSysReportLayoutConfig + */ + code?: number; + + /** + * 类型success、warning、error + * + * @type {string} + * @memberof AdminNETResultSysReportLayoutConfig + */ + type?: string | null; + + /** + * 错误信息 + * + * @type {string} + * @memberof AdminNETResultSysReportLayoutConfig + */ + message?: string | null; + + /** + * @type {SysReportLayoutConfig} + * @memberof AdminNETResultSysReportLayoutConfig + */ + result?: SysReportLayoutConfig; + + /** + * 附加数据 + * + * @type {any} + * @memberof AdminNETResultSysReportLayoutConfig + */ + extras?: any | null; + + /** + * 时间 + * + * @type {Date} + * @memberof AdminNETResultSysReportLayoutConfig + */ + time?: Date; +} diff --git a/Web/src/api-services/models/index.ts b/Web/src/api-services/models/index.ts index a5abeaa0..f7e22ddf 100644 --- a/Web/src/api-services/models/index.ts +++ b/Web/src/api-services/models/index.ts @@ -14,6 +14,9 @@ export * from './add-plugin-input'; export * from './add-pos-input'; export * from './add-print-input'; export * from './add-region-input'; +export * from './add-report-config-input'; +export * from './add-report-data-source-input'; +export * from './add-report-group-input'; export * from './add-role-input'; export * from './add-schedule-input'; export * from './add-subscribe-message-template-input'; @@ -50,6 +53,7 @@ export * from './admin-netresult-list-db-backup-output'; export * from './admin-netresult-list-db-column-output'; export * from './admin-netresult-list-db-output'; export * from './admin-netresult-list-db-table-info'; +export * from './admin-netresult-list-dictionary-string-object'; export * from './admin-netresult-list-enum-entity'; export * from './admin-netresult-list-enum-type-output'; export * from './admin-netresult-list-int64'; @@ -58,6 +62,7 @@ export * from './admin-netresult-list-log-vis-output'; export * from './admin-netresult-list-menu-output'; export * from './admin-netresult-list-nu-get-package'; export * from './admin-netresult-list-pos-output'; +export * from './admin-netresult-list-report-data-source-output'; export * from './admin-netresult-list-role-output'; export * from './admin-netresult-list-role-table-output'; export * from './admin-netresult-list-stat-log-output'; @@ -75,6 +80,7 @@ export * from './admin-netresult-list-sys-menu'; export * from './admin-netresult-list-sys-notice'; export * from './admin-netresult-list-sys-org'; export * from './admin-netresult-list-sys-region'; +export * from './admin-netresult-list-sys-report-group'; export * from './admin-netresult-list-sys-schedule'; export * from './admin-netresult-list-sys-user'; export * from './admin-netresult-list-sys-user-ext-org'; @@ -87,6 +93,7 @@ export * from './admin-netresult-login-user-output'; export * from './admin-netresult-model-list-output'; export * from './admin-netresult-notice-output'; export * from './admin-netresult-object'; +export * from './admin-netresult-report-config-parse-sql-output'; export * from './admin-netresult-sm-key-pair-output'; export * from './admin-netresult-sql-sugar-paged-list-chat-list-output'; export * from './admin-netresult-sql-sugar-paged-list-job-detail-output'; @@ -94,6 +101,7 @@ export * from './admin-netresult-sql-sugar-paged-list-oauth-user-output'; export * from './admin-netresult-sql-sugar-paged-list-open-access-output'; export * from './admin-netresult-sql-sugar-paged-list-page-pos-output'; export * from './admin-netresult-sql-sugar-paged-list-page-role-output'; +export * from './admin-netresult-sql-sugar-paged-list-report-config-output'; export * from './admin-netresult-sql-sugar-paged-list-sys-code-gen'; export * from './admin-netresult-sql-sugar-paged-list-sys-config'; export * from './admin-netresult-sql-sugar-paged-list-sys-config-tenant'; @@ -113,6 +121,7 @@ export * from './admin-netresult-sql-sugar-paged-list-sys-online-user'; export * from './admin-netresult-sql-sugar-paged-list-sys-plugin'; export * from './admin-netresult-sql-sugar-paged-list-sys-print'; export * from './admin-netresult-sql-sugar-paged-list-sys-region'; +export * from './admin-netresult-sql-sugar-paged-list-sys-report-data-source'; export * from './admin-netresult-sql-sugar-paged-list-sys-upgrade'; export * from './admin-netresult-sql-sugar-paged-list-sys-wechat-pay'; export * from './admin-netresult-sql-sugar-paged-list-tenant-output'; @@ -133,6 +142,7 @@ export * from './admin-netresult-sys-log-msg'; export * from './admin-netresult-sys-log-op'; export * from './admin-netresult-sys-notice'; export * from './admin-netresult-sys-print'; +export * from './admin-netresult-sys-report-layout-config'; export * from './admin-netresult-sys-schedule'; export * from './admin-netresult-sys-upgrade'; export * from './admin-netresult-sys-user'; @@ -354,6 +364,8 @@ export * from './page-pos-input'; export * from './page-pos-output'; export * from './page-print-input'; export * from './page-region-input'; +export * from './page-report-config-input'; +export * from './page-report-data-source-input'; export * from './page-role-input'; export * from './page-role-output'; export * from './page-sys-wechat-pay-input'; @@ -373,6 +385,12 @@ export * from './public-message-input'; export * from './query-region-input'; export * from './ram-info'; export * from './refund-request-input'; +export * from './report-config-ds-type-enum'; +export * from './report-config-execute-sql-script-input'; +export * from './report-config-output'; +export * from './report-config-parse-sql-input'; +export * from './report-config-parse-sql-output'; +export * from './report-data-source-output'; export * from './reset-pwd-user-input'; export * from './role-api-input'; export * from './role-input'; @@ -404,6 +422,7 @@ export * from './sql-sugar-paged-list-oauth-user-output'; export * from './sql-sugar-paged-list-open-access-output'; export * from './sql-sugar-paged-list-page-pos-output'; export * from './sql-sugar-paged-list-page-role-output'; +export * from './sql-sugar-paged-list-report-config-output'; export * from './sql-sugar-paged-list-sys-code-gen'; export * from './sql-sugar-paged-list-sys-config'; export * from './sql-sugar-paged-list-sys-config-tenant'; @@ -423,6 +442,7 @@ export * from './sql-sugar-paged-list-sys-online-user'; export * from './sql-sugar-paged-list-sys-plugin'; export * from './sql-sugar-paged-list-sys-print'; export * from './sql-sugar-paged-list-sys-region'; +export * from './sql-sugar-paged-list-sys-report-data-source'; export * from './sql-sugar-paged-list-sys-upgrade'; export * from './sql-sugar-paged-list-sys-wechat-pay'; export * from './sql-sugar-paged-list-tenant-output'; @@ -469,6 +489,11 @@ export * from './sys-org'; export * from './sys-plugin'; export * from './sys-print'; export * from './sys-region'; +export * from './sys-report-data-source'; +export * from './sys-report-field'; +export * from './sys-report-group'; +export * from './sys-report-layout-config'; +export * from './sys-report-param'; export * from './sys-schedule'; export * from './sys-tenant-upload-carousel-file-body'; export * from './sys-upgrade'; @@ -512,6 +537,9 @@ export * from './update-plugin-input'; export * from './update-pos-input'; export * from './update-print-input'; export * from './update-region-input'; +export * from './update-report-config-input'; +export * from './update-report-data-source-input'; +export * from './update-report-group-input'; export * from './update-role-input'; export * from './update-schedule-input'; export * from './update-sys-ldap-input'; diff --git a/Web/src/api-services/models/page-report-config-input.ts b/Web/src/api-services/models/page-report-config-input.ts new file mode 100644 index 00000000..a64183df --- /dev/null +++ b/Web/src/api-services/models/page-report-config-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 { Filter } from './filter'; +import { Search } from './search'; + /** + * 报表配置分页输入参数 + * + * @export + * @interface PageReportConfigInput + */ +export interface PageReportConfigInput { + + /** + * @type {Search} + * @memberof PageReportConfigInput + */ + search?: Search; + + /** + * 模糊查询关键字 + * + * @type {string} + * @memberof PageReportConfigInput + */ + keyword?: string | null; + + /** + * @type {Filter} + * @memberof PageReportConfigInput + */ + filter?: Filter; + + /** + * 当前页码 + * + * @type {number} + * @memberof PageReportConfigInput + */ + page?: number; + + /** + * 页码容量 + * + * @type {number} + * @memberof PageReportConfigInput + */ + pageSize?: number; + + /** + * 排序字段 + * + * @type {string} + * @memberof PageReportConfigInput + */ + field?: string | null; + + /** + * 排序方向 + * + * @type {string} + * @memberof PageReportConfigInput + */ + order?: string | null; + + /** + * 降序排序 + * + * @type {string} + * @memberof PageReportConfigInput + */ + descStr?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof PageReportConfigInput + */ + name?: string | null; + + /** + * 分组Id + * + * @type {number} + * @memberof PageReportConfigInput + */ + groupId?: number | null; +} diff --git a/Web/src/api-services/models/page-report-data-source-input.ts b/Web/src/api-services/models/page-report-data-source-input.ts new file mode 100644 index 00000000..af99b3d4 --- /dev/null +++ b/Web/src/api-services/models/page-report-data-source-input.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. + */ + +import { Filter } from './filter'; +import { Search } from './search'; + /** + * 报表数据源分页输入参数 + * + * @export + * @interface PageReportDataSourceInput + */ +export interface PageReportDataSourceInput { + + /** + * @type {Search} + * @memberof PageReportDataSourceInput + */ + search?: Search; + + /** + * 模糊查询关键字 + * + * @type {string} + * @memberof PageReportDataSourceInput + */ + keyword?: string | null; + + /** + * @type {Filter} + * @memberof PageReportDataSourceInput + */ + filter?: Filter; + + /** + * 当前页码 + * + * @type {number} + * @memberof PageReportDataSourceInput + */ + page?: number; + + /** + * 页码容量 + * + * @type {number} + * @memberof PageReportDataSourceInput + */ + pageSize?: number; + + /** + * 排序字段 + * + * @type {string} + * @memberof PageReportDataSourceInput + */ + field?: string | null; + + /** + * 排序方向 + * + * @type {string} + * @memberof PageReportDataSourceInput + */ + order?: string | null; + + /** + * 降序排序 + * + * @type {string} + * @memberof PageReportDataSourceInput + */ + descStr?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof PageReportDataSourceInput + */ + name?: string | null; +} diff --git a/Web/src/api-services/models/report-config-ds-type-enum.ts b/Web/src/api-services/models/report-config-ds-type-enum.ts new file mode 100644 index 00000000..5ce6bc0e --- /dev/null +++ b/Web/src/api-services/models/report-config-ds-type-enum.ts @@ -0,0 +1,24 @@ +/* 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. + */ + +/** + * 报表配置数据源类型
 Sql Sql = 0
 Api Api = 1
+ * @export + * @enum {string} + */ +export enum ReportConfigDsTypeEnum { + NUMBER_0 = 0, + NUMBER_1 = 1 +} + diff --git a/Web/src/api-services/models/report-config-execute-sql-script-input.ts b/Web/src/api-services/models/report-config-execute-sql-script-input.ts new file mode 100644 index 00000000..9861718b --- /dev/null +++ b/Web/src/api-services/models/report-config-execute-sql-script-input.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + /** + * 报表配置执行Sql脚本输入参数 + * + * @export + * @interface ReportConfigExecuteSqlScriptInput + */ +export interface ReportConfigExecuteSqlScriptInput { + + /** + * 主键Id + * + * @type {number} + * @memberof ReportConfigExecuteSqlScriptInput + */ + id: number; + + /** + * 执行参数 + * + * @type {{ [key: string]: any; }} + * @memberof ReportConfigExecuteSqlScriptInput + */ + execParams?: { [key: string]: any; } | null; +} diff --git a/Web/src/api-services/models/report-config-output.ts b/Web/src/api-services/models/report-config-output.ts new file mode 100644 index 00000000..c7aeeceb --- /dev/null +++ b/Web/src/api-services/models/report-config-output.ts @@ -0,0 +1,188 @@ +/* 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 { ReportConfigDsTypeEnum } from './report-config-ds-type-enum'; +import { SysReportGroup } from './sys-report-group'; + /** + * 报表配置输出参数 + * + * @export + * @interface ReportConfigOutput + */ +export interface ReportConfigOutput { + + /** + * 雪花Id + * + * @type {number} + * @memberof ReportConfigOutput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof ReportConfigOutput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof ReportConfigOutput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof ReportConfigOutput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof ReportConfigOutput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof ReportConfigOutput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof ReportConfigOutput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof ReportConfigOutput + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof ReportConfigOutput + */ + name?: string | null; + + /** + * 描述 + * + * @type {string} + * @memberof ReportConfigOutput + */ + description?: string | null; + + /** + * @type {ReportConfigDsTypeEnum} + * @memberof ReportConfigOutput + */ + dsType?: ReportConfigDsTypeEnum; + + /** + * 数据源 + * + * @type {string} + * @memberof ReportConfigOutput + */ + dataSource?: string | null; + + /** + * 分组Id + * + * @type {number} + * @memberof ReportConfigOutput + */ + groupId?: number | null; + + /** + * @type {SysReportGroup} + * @memberof ReportConfigOutput + */ + group?: SysReportGroup; + + /** + * 脚本语句 + * + * @type {string} + * @memberof ReportConfigOutput + */ + sqlScript?: string | null; + + /** + * 接口地址 + * + * @type {string} + * @memberof ReportConfigOutput + */ + apiUrl?: string | null; + + /** + * 接口请求方式 + * + * @type {string} + * @memberof ReportConfigOutput + */ + apiHttpMethod?: string | null; + + /** + * 接口参数 + * + * @type {string} + * @memberof ReportConfigOutput + */ + apiParams?: string | null; + + /** + * 参数 + * + * @type {string} + * @memberof ReportConfigOutput + */ + params?: string | null; + + /** + * 列表字段 + * + * @type {string} + * @memberof ReportConfigOutput + */ + fields?: string | null; + + /** + * 分组名称 + * + * @type {string} + * @memberof ReportConfigOutput + */ + groupName?: string | null; +} diff --git a/Web/src/api-services/models/report-config-parse-sql-input.ts b/Web/src/api-services/models/report-config-parse-sql-input.ts new file mode 100644 index 00000000..a1486901 --- /dev/null +++ b/Web/src/api-services/models/report-config-parse-sql-input.ts @@ -0,0 +1,46 @@ +/* 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. + */ + + /** + * 报表配置解析Sql输入参数 + * + * @export + * @interface ReportConfigParseSqlInput + */ +export interface ReportConfigParseSqlInput { + + /** + * 数据源 + * + * @type {string} + * @memberof ReportConfigParseSqlInput + */ + dataSource?: string | null; + + /** + * 脚本语句 + * + * @type {string} + * @memberof ReportConfigParseSqlInput + */ + sqlScript?: string | null; + + /** + * 执行参数 + * + * @type {{ [key: string]: any; }} + * @memberof ReportConfigParseSqlInput + */ + execParams?: { [key: string]: any; } | null; +} diff --git a/Web/src/api-services/models/report-config-parse-sql-output.ts b/Web/src/api-services/models/report-config-parse-sql-output.ts new file mode 100644 index 00000000..b5ba5746 --- /dev/null +++ b/Web/src/api-services/models/report-config-parse-sql-output.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + /** + * 报表配置解析Sql输出参数 + * + * @export + * @interface ReportConfigParseSqlOutput + */ +export interface ReportConfigParseSqlOutput { + + /** + * 报表字段名称集合 + * + * @type {Array} + * @memberof ReportConfigParseSqlOutput + */ + fieldNames?: Array | null; +} diff --git a/Web/src/api-services/models/report-data-source-output.ts b/Web/src/api-services/models/report-data-source-output.ts new file mode 100644 index 00000000..d958b9bb --- /dev/null +++ b/Web/src/api-services/models/report-data-source-output.ts @@ -0,0 +1,46 @@ +/* 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 ReportDataSourceOutput + */ +export interface ReportDataSourceOutput { + + /** + * Id + * + * @type {string} + * @memberof ReportDataSourceOutput + */ + id?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof ReportDataSourceOutput + */ + name?: string | null; + + /** + * 是否内置 + * + * @type {boolean} + * @memberof ReportDataSourceOutput + */ + isBuildIn?: boolean; +} diff --git a/Web/src/api-services/models/sql-sugar-paged-list-report-config-output.ts b/Web/src/api-services/models/sql-sugar-paged-list-report-config-output.ts new file mode 100644 index 00000000..d9bc879f --- /dev/null +++ b/Web/src/api-services/models/sql-sugar-paged-list-report-config-output.ts @@ -0,0 +1,79 @@ +/* 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 { ReportConfigOutput } from './report-config-output'; + /** + * 分页泛型集合 + * + * @export + * @interface SqlSugarPagedListReportConfigOutput + */ +export interface SqlSugarPagedListReportConfigOutput { + + /** + * 页码 + * + * @type {number} + * @memberof SqlSugarPagedListReportConfigOutput + */ + page?: number; + + /** + * 页容量 + * + * @type {number} + * @memberof SqlSugarPagedListReportConfigOutput + */ + pageSize?: number; + + /** + * 总条数 + * + * @type {number} + * @memberof SqlSugarPagedListReportConfigOutput + */ + total?: number; + + /** + * 总页数 + * + * @type {number} + * @memberof SqlSugarPagedListReportConfigOutput + */ + totalPages?: number; + + /** + * 当前页集合 + * + * @type {Array} + * @memberof SqlSugarPagedListReportConfigOutput + */ + items?: Array | null; + + /** + * 是否有上一页 + * + * @type {boolean} + * @memberof SqlSugarPagedListReportConfigOutput + */ + hasPrevPage?: boolean; + + /** + * 是否有下一页 + * + * @type {boolean} + * @memberof SqlSugarPagedListReportConfigOutput + */ + hasNextPage?: boolean; +} diff --git a/Web/src/api-services/models/sql-sugar-paged-list-sys-report-data-source.ts b/Web/src/api-services/models/sql-sugar-paged-list-sys-report-data-source.ts new file mode 100644 index 00000000..3181324f --- /dev/null +++ b/Web/src/api-services/models/sql-sugar-paged-list-sys-report-data-source.ts @@ -0,0 +1,79 @@ +/* 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 { SysReportDataSource } from './sys-report-data-source'; + /** + * 分页泛型集合 + * + * @export + * @interface SqlSugarPagedListSysReportDataSource + */ +export interface SqlSugarPagedListSysReportDataSource { + + /** + * 页码 + * + * @type {number} + * @memberof SqlSugarPagedListSysReportDataSource + */ + page?: number; + + /** + * 页容量 + * + * @type {number} + * @memberof SqlSugarPagedListSysReportDataSource + */ + pageSize?: number; + + /** + * 总条数 + * + * @type {number} + * @memberof SqlSugarPagedListSysReportDataSource + */ + total?: number; + + /** + * 总页数 + * + * @type {number} + * @memberof SqlSugarPagedListSysReportDataSource + */ + totalPages?: number; + + /** + * 当前页集合 + * + * @type {Array} + * @memberof SqlSugarPagedListSysReportDataSource + */ + items?: Array | null; + + /** + * 是否有上一页 + * + * @type {boolean} + * @memberof SqlSugarPagedListSysReportDataSource + */ + hasPrevPage?: boolean; + + /** + * 是否有下一页 + * + * @type {boolean} + * @memberof SqlSugarPagedListSysReportDataSource + */ + hasNextPage?: boolean; +} diff --git a/Web/src/api-services/models/sys-report-data-source.ts b/Web/src/api-services/models/sys-report-data-source.ts new file mode 100644 index 00000000..049e409b --- /dev/null +++ b/Web/src/api-services/models/sys-report-data-source.ts @@ -0,0 +1,118 @@ +/* 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 SysReportDataSource + */ +export interface SysReportDataSource { + + /** + * 雪花Id + * + * @type {number} + * @memberof SysReportDataSource + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof SysReportDataSource + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof SysReportDataSource + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof SysReportDataSource + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof SysReportDataSource + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof SysReportDataSource + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof SysReportDataSource + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof SysReportDataSource + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof SysReportDataSource + */ + name?: string | null; + + /** + * 数据库类型 + * + * @type {string} + * @memberof SysReportDataSource + */ + dbType?: string | null; + + /** + * 连接字符串 + * + * @type {string} + * @memberof SysReportDataSource + */ + connectionString?: string | null; + + /** + * 备注 + * + * @type {string} + * @memberof SysReportDataSource + */ + memo?: string | null; +} diff --git a/Web/src/api-services/models/sys-report-field.ts b/Web/src/api-services/models/sys-report-field.ts new file mode 100644 index 00000000..214c2c9b --- /dev/null +++ b/Web/src/api-services/models/sys-report-field.ts @@ -0,0 +1,70 @@ +/* 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 SysReportField + */ +export interface SysReportField { + + /** + * 字段名 + * + * @type {string} + * @memberof SysReportField + */ + fieldName?: string | null; + + /** + * 字段标题 + * + * @type {string} + * @memberof SysReportField + */ + title?: string | null; + + /** + * 是否合计 + * + * @type {boolean} + * @memberof SysReportField + */ + isSummary?: boolean; + + /** + * 是否显示 + * + * @type {boolean} + * @memberof SysReportField + */ + visible?: boolean; + + /** + * 分组标题 + * + * @type {string} + * @memberof SysReportField + */ + groupTitle?: string | null; + + /** + * 列宽度 + * + * @type {number} + * @memberof SysReportField + */ + width?: number; +} diff --git a/Web/src/api-services/models/sys-report-group.ts b/Web/src/api-services/models/sys-report-group.ts new file mode 100644 index 00000000..49c2e6cf --- /dev/null +++ b/Web/src/api-services/models/sys-report-group.ts @@ -0,0 +1,102 @@ +/* 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 SysReportGroup + */ +export interface SysReportGroup { + + /** + * 雪花Id + * + * @type {number} + * @memberof SysReportGroup + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof SysReportGroup + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof SysReportGroup + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof SysReportGroup + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof SysReportGroup + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof SysReportGroup + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof SysReportGroup + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof SysReportGroup + */ + isDelete?: boolean; + + /** + * 编码 + * + * @type {string} + * @memberof SysReportGroup + */ + number?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof SysReportGroup + */ + name?: string | null; +} diff --git a/Web/src/api-services/models/sys-report-layout-config.ts b/Web/src/api-services/models/sys-report-layout-config.ts new file mode 100644 index 00000000..ac96fa51 --- /dev/null +++ b/Web/src/api-services/models/sys-report-layout-config.ts @@ -0,0 +1,40 @@ +/* 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 { SysReportField } from './sys-report-field'; +import { SysReportParam } from './sys-report-param'; + /** + * 报表布局配置 + * + * @export + * @interface SysReportLayoutConfig + */ +export interface SysReportLayoutConfig { + + /** + * 报表字段集合 + * + * @type {Array} + * @memberof SysReportLayoutConfig + */ + fields?: Array | null; + + /** + * 报表参数集合 + * + * @type {Array} + * @memberof SysReportLayoutConfig + */ + params?: Array | null; +} diff --git a/Web/src/api-services/models/sys-report-param.ts b/Web/src/api-services/models/sys-report-param.ts new file mode 100644 index 00000000..63bda48e --- /dev/null +++ b/Web/src/api-services/models/sys-report-param.ts @@ -0,0 +1,54 @@ +/* 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 SysReportParam + */ +export interface SysReportParam { + + /** + * 参数名 + * + * @type {string} + * @memberof SysReportParam + */ + paramName?: string | null; + + /** + * 参数标题 + * + * @type {string} + * @memberof SysReportParam + */ + title?: string | null; + + /** + * 输入控件类型 + * + * @type {string} + * @memberof SysReportParam + */ + inputCtrl?: string | null; + + /** + * 默认值 + * + * @type {any} + * @memberof SysReportParam + */ + defaultValue?: any | null; +} diff --git a/Web/src/api-services/models/update-report-config-input.ts b/Web/src/api-services/models/update-report-config-input.ts new file mode 100644 index 00000000..d7a63ac8 --- /dev/null +++ b/Web/src/api-services/models/update-report-config-input.ts @@ -0,0 +1,180 @@ +/* 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 { ReportConfigDsTypeEnum } from './report-config-ds-type-enum'; +import { SysReportGroup } from './sys-report-group'; + /** + * + * + * @export + * @interface UpdateReportConfigInput + */ +export interface UpdateReportConfigInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof UpdateReportConfigInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof UpdateReportConfigInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof UpdateReportConfigInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof UpdateReportConfigInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof UpdateReportConfigInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof UpdateReportConfigInput + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + name?: string | null; + + /** + * 描述 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + description?: string | null; + + /** + * @type {ReportConfigDsTypeEnum} + * @memberof UpdateReportConfigInput + */ + dsType?: ReportConfigDsTypeEnum; + + /** + * 数据源 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + dataSource?: string | null; + + /** + * 分组Id + * + * @type {number} + * @memberof UpdateReportConfigInput + */ + groupId?: number | null; + + /** + * @type {SysReportGroup} + * @memberof UpdateReportConfigInput + */ + group?: SysReportGroup; + + /** + * 脚本语句 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + sqlScript?: string | null; + + /** + * 接口地址 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + apiUrl?: string | null; + + /** + * 接口请求方式 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + apiHttpMethod?: string | null; + + /** + * 接口参数 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + apiParams?: string | null; + + /** + * 参数 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + params?: string | null; + + /** + * 列表字段 + * + * @type {string} + * @memberof UpdateReportConfigInput + */ + fields?: string | null; +} diff --git a/Web/src/api-services/models/update-report-data-source-input.ts b/Web/src/api-services/models/update-report-data-source-input.ts new file mode 100644 index 00000000..3bdbd933 --- /dev/null +++ b/Web/src/api-services/models/update-report-data-source-input.ts @@ -0,0 +1,118 @@ +/* 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 UpdateReportDataSourceInput + */ +export interface UpdateReportDataSourceInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof UpdateReportDataSourceInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof UpdateReportDataSourceInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof UpdateReportDataSourceInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof UpdateReportDataSourceInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof UpdateReportDataSourceInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof UpdateReportDataSourceInput + */ + isDelete?: boolean; + + /** + * 名称 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + name?: string | null; + + /** + * 数据库类型 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + dbType?: string | null; + + /** + * 连接字符串 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + connectionString?: string | null; + + /** + * 备注 + * + * @type {string} + * @memberof UpdateReportDataSourceInput + */ + memo?: string | null; +} diff --git a/Web/src/api-services/models/update-report-group-input.ts b/Web/src/api-services/models/update-report-group-input.ts new file mode 100644 index 00000000..46ffd20d --- /dev/null +++ b/Web/src/api-services/models/update-report-group-input.ts @@ -0,0 +1,102 @@ +/* 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 UpdateReportGroupInput + */ +export interface UpdateReportGroupInput { + + /** + * 雪花Id + * + * @type {number} + * @memberof UpdateReportGroupInput + */ + id?: number; + + /** + * 创建时间 + * + * @type {Date} + * @memberof UpdateReportGroupInput + */ + createTime?: Date; + + /** + * 更新时间 + * + * @type {Date} + * @memberof UpdateReportGroupInput + */ + updateTime?: Date | null; + + /** + * 创建者Id + * + * @type {number} + * @memberof UpdateReportGroupInput + */ + createUserId?: number | null; + + /** + * 创建者姓名 + * + * @type {string} + * @memberof UpdateReportGroupInput + */ + createUserName?: string | null; + + /** + * 修改者Id + * + * @type {number} + * @memberof UpdateReportGroupInput + */ + updateUserId?: number | null; + + /** + * 修改者姓名 + * + * @type {string} + * @memberof UpdateReportGroupInput + */ + updateUserName?: string | null; + + /** + * 软删除 + * + * @type {boolean} + * @memberof UpdateReportGroupInput + */ + isDelete?: boolean; + + /** + * 编码 + * + * @type {string} + * @memberof UpdateReportGroupInput + */ + number?: string | null; + + /** + * 名称 + * + * @type {string} + * @memberof UpdateReportGroupInput + */ + name?: string | null; +} diff --git a/Web/src/router/route.ts b/Web/src/router/route.ts index 40a86e08..ac199a25 100644 --- a/Web/src/router/route.ts +++ b/Web/src/router/route.ts @@ -85,6 +85,19 @@ export const dynamicRoutes: Array = [ icon: 'ele-View', }, }, + { + path: '/report/view/:reportConfigId/:tagsViewName?', + name: 'sysReportView', + component: () => import('/@/views/system/reportConfig/component/reportView.vue'), + meta: { + title: '报表查看', + isHide: true, + isKeepAlive: true, + isAffix: false, + isIframe: false, + icon: '', + }, + }, ]; /** diff --git a/Web/src/views/system/reportConfig/component/editReportConfig.vue b/Web/src/views/system/reportConfig/component/editReportConfig.vue new file mode 100644 index 00000000..d837f4c3 --- /dev/null +++ b/Web/src/views/system/reportConfig/component/editReportConfig.vue @@ -0,0 +1,594 @@ + + + + + diff --git a/Web/src/views/system/reportConfig/component/reportGroupPanel/editReportGroup.vue b/Web/src/views/system/reportConfig/component/reportGroupPanel/editReportGroup.vue new file mode 100644 index 00000000..abb549e7 --- /dev/null +++ b/Web/src/views/system/reportConfig/component/reportGroupPanel/editReportGroup.vue @@ -0,0 +1,81 @@ + + + diff --git a/Web/src/views/system/reportConfig/component/reportGroupPanel/index.vue b/Web/src/views/system/reportConfig/component/reportGroupPanel/index.vue new file mode 100644 index 00000000..98f76b72 --- /dev/null +++ b/Web/src/views/system/reportConfig/component/reportGroupPanel/index.vue @@ -0,0 +1,170 @@ + + + diff --git a/Web/src/views/system/reportConfig/component/reportView.vue b/Web/src/views/system/reportConfig/component/reportView.vue new file mode 100644 index 00000000..6a37eb24 --- /dev/null +++ b/Web/src/views/system/reportConfig/component/reportView.vue @@ -0,0 +1,230 @@ + + + diff --git a/Web/src/views/system/reportConfig/index.vue b/Web/src/views/system/reportConfig/index.vue new file mode 100644 index 00000000..8400dbaa --- /dev/null +++ b/Web/src/views/system/reportConfig/index.vue @@ -0,0 +1,245 @@ + + + diff --git a/Web/src/views/system/reportConfig/inputCtrlType.ts b/Web/src/views/system/reportConfig/inputCtrlType.ts new file mode 100644 index 00000000..22917a68 --- /dev/null +++ b/Web/src/views/system/reportConfig/inputCtrlType.ts @@ -0,0 +1,5 @@ +export const sqlSugarDbTypes = [ + { label: '输入框', value: 'Input' }, + { label: '日期选择器', value: 'Date' }, + { label: '选择器', value: 'Select' }, +]; diff --git a/Web/src/views/system/reportDataSource/component/editReportDataSource.vue b/Web/src/views/system/reportDataSource/component/editReportDataSource.vue new file mode 100644 index 00000000..3faba907 --- /dev/null +++ b/Web/src/views/system/reportDataSource/component/editReportDataSource.vue @@ -0,0 +1,95 @@ + + + diff --git a/Web/src/views/system/reportDataSource/index.vue b/Web/src/views/system/reportDataSource/index.vue new file mode 100644 index 00000000..87385828 --- /dev/null +++ b/Web/src/views/system/reportDataSource/index.vue @@ -0,0 +1,180 @@ + + + diff --git a/Web/src/views/system/reportDataSource/sqlSugarDbType.ts b/Web/src/views/system/reportDataSource/sqlSugarDbType.ts new file mode 100644 index 00000000..a1dac361 --- /dev/null +++ b/Web/src/views/system/reportDataSource/sqlSugarDbType.ts @@ -0,0 +1,26 @@ +export const sqlSugarDbTypes = [ + { label: 'MySql', value: '0' }, + { label: 'SqlServer', value: '1' }, + { label: 'Sqlite', value: '2' }, + { label: 'Oracle', value: '3' }, + { label: 'PostgreSQL', value: '4' }, + { label: 'Dm', value: '5' }, + { label: 'Kdbndp', value: '6' }, + { label: 'Oscar', value: '7' }, + { label: 'MySqlConnector', value: '8' }, + { label: 'Access', value: '9' }, + { label: 'OpenGauss', value: '10' }, + { label: 'QuestDB', value: '11' }, + { label: 'HG', value: '12' }, + { label: 'ClickHouse', value: '13' }, + { label: 'GBase', value: '14' }, + { label: 'Odbc', value: '15' }, + { label: 'OceanBaseForOracle', value: '16' }, + { label: 'TDengine', value: '17' }, + { label: 'GaussDB', value: '18' }, + { label: 'OceanBase', value: '19' }, + { label: 'Tidb', value: '20' }, + { label: 'Vastbase', value: '21' }, + { label: 'PolarDB', value: '22' }, + { label: 'Doris', value: '23' }, +]; From c6696787e45546e1ebfd3853e985bdf410ccfb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=99=E6=84=8F?= Date: Wed, 25 Jun 2025 11:43:09 +0800 Subject: [PATCH 02/70] =?UTF-8?q?style:=20=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs | 2 +- Web/src/views/system/openAccess/index.vue | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs index e0b7ec12..d9d5bbb0 100644 --- a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs +++ b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs @@ -314,7 +314,7 @@ public enum ErrorCodeEnum D3000, /// - /// 字典类型已存在 + /// 字典类型已存在,名称或编码重复 /// [ErrorCodeItemMetadata("字典类型已存在,名称或编码重复")] D3001, diff --git a/Web/src/views/system/openAccess/index.vue b/Web/src/views/system/openAccess/index.vue index 8f23c199..b3ec8718 100644 --- a/Web/src/views/system/openAccess/index.vue +++ b/Web/src/views/system/openAccess/index.vue @@ -38,10 +38,10 @@