😎1、完善根据不同租户设置系统配置信息 2、代码清理

This commit is contained in:
zuohuaijun 2025-01-15 23:05:38 +08:00
parent af7024bb7b
commit f0d6898b3a
48 changed files with 1258 additions and 2349 deletions

View File

@ -23,21 +23,12 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
new SysConfig{ Id=1300000000111, Name="默认密码", Code=ConfigConst.SysPassword, Value="Admin.NET++010101", SysFlag=YesNoEnum.Y, Remark="默认密码", OrderNo=20, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-19 00:00:00") },
// 新业务系统记得更改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取
new SysConfig{ Id=1300000000251, Name="国密SM2密匙", Code=ConfigConst.SysSM2Key, Value="04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9;3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A", SysFlag=YesNoEnum.Y, Remark="国密SM2密匙", OrderNo=160, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000261, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="True", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000271, Name="开启密码强度验证", Code=ConfigConst.SysPasswordStrength, Value="True", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=170, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000281, Name="密码强度验证正则表达式", Code=ConfigConst.SysPasswordStrengthExpression, Value="(?=^.{6,20}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", SysFlag=YesNoEnum.Y, Remark="必须包含大小写字母、数字和特殊字符的组合长度在6-20之间", OrderNo=180, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000291, Name="密码时间有效期", Code=ConfigConst.SysPasswordExpirationTime, Value="0", SysFlag=YesNoEnum.Y, Remark="默认0表示永不过期否则表示过期天数", OrderNo=190, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000301, Name="密码历史记录验证", Code=ConfigConst.SysPasswordRecord, Value="False", SysFlag=YesNoEnum.Y, Remark="是否验证历史密码禁止再次使用", OrderNo=200, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1310000000301, Name="系统主标题", Code=ConfigConst.SysWebTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统主标题", OrderNo=300, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000311, Name="系统副标题", Code=ConfigConst.SysWebViceTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统副标题", OrderNo=310, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000321, Name="系统描述", Code=ConfigConst.SysWebViceDesc, Value="站在巨人肩膀上的 .NET 通用权限开发框架", SysFlag=YesNoEnum.Y, Remark="系统描述", OrderNo=320, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000331, Name="水印内容", Code=ConfigConst.SysWebWatermark, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="水印内容", OrderNo=330, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000341, Name="版权说明", Code=ConfigConst.SysWebCopyright, Value="Copyright © 2021-present Admin.NET All rights reserved.", SysFlag=YesNoEnum.Y, Remark="版权说明", OrderNo=340, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000351, Name="系统图标", Code=ConfigConst.SysWebLogo, Value="/upload/logo.png", SysFlag=YesNoEnum.Y, Remark="系统图标", OrderNo=350, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000361, Name="ICP备案号", Code=ConfigConst.SysWebIcp, Value="省ICP备12345678号", SysFlag=YesNoEnum.Y, Remark="ICP备案号", OrderNo=360, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000371, Name="ICP地址", Code=ConfigConst.SysWebIcpUrl, Value="https://beian.miit.gov.cn", SysFlag=YesNoEnum.Y, Remark="ICP地址", OrderNo=370, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000211, Name="国密SM2密匙", Code=ConfigConst.SysSM2Key, Value="04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9;3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A", SysFlag=YesNoEnum.Y, Remark="国密SM2密匙", OrderNo=160, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000221, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="True", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000231, Name="开启密码强度验证", Code=ConfigConst.SysPasswordStrength, Value="True", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=170, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000241, Name="密码强度验证正则表达式", Code=ConfigConst.SysPasswordStrengthExpression, Value="(?=^.{6,20}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", SysFlag=YesNoEnum.Y, Remark="必须包含大小写字母、数字和特殊字符的组合长度在6-20之间", OrderNo=180, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000251, Name="密码时间有效期", Code=ConfigConst.SysPasswordExpirationTime, Value="0", SysFlag=YesNoEnum.Y, Remark="默认0表示永不过期否则表示过期天数", OrderNo=190, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000261, Name="密码历史记录验证", Code=ConfigConst.SysPasswordRecord, Value="False", SysFlag=YesNoEnum.Y, Remark="是否验证历史密码禁止再次使用", OrderNo=200, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
];
}
}

View File

@ -0,0 +1,54 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Application;
/// <summary>
/// 系统租户表种子数据
/// </summary>
[SeedData(500)]
public class SysTenantSeedData : ISqlSugarEntitySeedData<SysTenant>
{
/// <summary>
/// 种子数据
/// </summary>
/// <returns></returns>
public IEnumerable<SysTenant> HasData()
{
var defaultDbConfig = App.GetOptions<DbConnectionOptions>().ConnectionConfigs[0];
return
[
new SysTenant
{
Id=SqlSugarConst.DefaultTenantId,
OrgId=SqlSugarConst.DefaultTenantId,
UserId=1300000000111,
Host="gitee.com",
TenantType=TenantTypeEnum.Id,
DbType=defaultDbConfig.DbType,
Connection=defaultDbConfig.ConnectionString,
ConfigId=SqlSugarConst.MainConfigId,
Remark="默认租户",
CreateTime=DateTime.Parse("2022-02-10 00:00:00"),
Logo = "/upload/logo.png",
Title = "Admin.NET.Pro",
ViceTitle = "Admin.NET",
ViceDesc = "站在巨人肩膀上的 .NET 通用权限开发框架",
Copyright = "Copyright © 2021-present Admin.NET All rights reserved.",
Icp = "省ICP备12345678号",
IcpUrl = "https://beian.miit.gov.cn",
Watermark = "Admin.NET",
Version = "v2.0.0",
ThemeColor = "#0f59a4",
Layout = "columns", // defaults|classic|transverse|columns
Animation = "fadeDown",
Captcha = true,
SecondVer = false
},
];
}
}

View File

@ -33,7 +33,7 @@
<PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" />
<PackageReference Include="MailKit" Version="4.9.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" />
<PackageReference Include="MiniExcel" Version="1.36.0" />
<PackageReference Include="MiniExcel" Version="1.36.1" />
<PackageReference Include="MiniWord" Version="0.9.2" />
<PackageReference Include="MQTTnet" Version="5.0.1.1416" />
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
@ -45,11 +45,11 @@
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.6.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.9.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.174" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.175" />
<PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1163" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1164" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>
@ -67,9 +67,9 @@
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="9.0.0" />
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="9.0.0" />
<PackageReference Include="Lazy.Captcha.Core" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.1" />
</ItemGroup>
</Project>

View File

@ -94,4 +94,88 @@ public partial class SysTenant : EntityBase
/// </summary>
[SugarColumn(IsIgnore = true)]
public long OrgPid { get; set; }
/// <summary>
/// 系统图标
/// </summary>
[SugarColumn(ColumnDescription = "系统图标", Length = 256, DefaultValue = "/upload/logo.png"), Required, MaxLength(256)]
public virtual string Logo { get; set; }
/// <summary>
/// 主标题
/// </summary>
[SugarColumn(ColumnDescription = "主标题", Length = 32, DefaultValue = "Admin.NET"), MaxLength(32)]
public virtual string Title { get; set; }
/// <summary>
/// 副标题
/// </summary>
[SugarColumn(ColumnDescription = "副标题", Length = 64), MaxLength(64)]
public virtual string? ViceTitle { get; set; }
/// <summary>
/// 副描述
/// </summary>
[SugarColumn(ColumnDescription = "副描述", Length = 128), MaxLength(128)]
public virtual string? ViceDesc { get; set; }
/// <summary>
/// 版权信息
/// </summary>
[SugarColumn(ColumnDescription = "版权信息", Length = 128), MaxLength(128)]
public virtual string? Copyright { get; set; }
/// <summary>
/// ICP备案号
/// </summary>
[SugarColumn(ColumnDescription = "ICP备案号", Length = 32), MaxLength(32)]
public virtual string? Icp { get; set; }
/// <summary>
/// ICP地址
/// </summary>
[SugarColumn(ColumnDescription = "ICP地址", Length = 32), MaxLength(32)]
public virtual string? IcpUrl { get; set; }
/// <summary>
/// 水印
/// </summary>
[SugarColumn(ColumnDescription = "水印", Length = 32), MaxLength(32)]
public virtual string? Watermark { get; set; }
/// <summary>
/// 版本号
/// </summary>
[SugarColumn(ColumnDescription = "版本号", Length = 16), MaxLength(16)]
public virtual string? Version { get; set; }
/// <summary>
/// 主题颜色
/// </summary>
[SugarColumn(ColumnDescription = "主题颜色", Length = 16, DefaultValue = "#0F59A4"), MaxLength(16)]
public virtual string ThemeColor { get; set; }
/// <summary>
/// 布局模式
/// </summary>
[SugarColumn(ColumnDescription = "布局模式", Length = 32, DefaultValue = "columns"), MaxLength(32)]
public virtual string Layout { get; set; }
/// <summary>
/// 页面动画
/// </summary>
[SugarColumn(ColumnDescription = "页面动画", Length = 32, DefaultValue = "fadeDown"), MaxLength(32)]
public virtual string Animation { get; set; }
/// <summary>
/// 图形验证码
/// </summary>
[SugarColumn(ColumnDescription = "图形验证码")]
public virtual bool Captcha { get; set; }
/// <summary>
/// 登录二次验证
/// </summary>
[SugarColumn(ColumnDescription = "登录二次验证")]
public virtual bool SecondVer { get; set; }
}

View File

@ -25,30 +25,19 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
new SysConfig{ Id=1300000000131, Name="日志保留天数", Code=ConfigConst.SysLogRetentionDays, Value="180", SysFlag=YesNoEnum.Y, Remark="日志保留天数(天)", OrderNo=40, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000141, Name="记录操作日志", Code=ConfigConst.SysOpLog, Value="True", SysFlag=YesNoEnum.Y, Remark="是否记录操作日志", OrderNo=50, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000151, Name="单设备登录", Code=ConfigConst.SysSingleLogin, Value="False", SysFlag=YesNoEnum.Y, Remark="是否开启单设备登录", OrderNo=60, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000161, Name="登录二次验证", Code=ConfigConst.SysSecondVer, Value="False", SysFlag=YesNoEnum.Y, Remark="是否开启登录二次验证", OrderNo=70, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000171, Name="图形验证码", Code=ConfigConst.SysCaptcha, Value="True", SysFlag=YesNoEnum.Y, Remark="是否开启图形验证码", OrderNo=80, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000181, Name="Token过期时间", Code=ConfigConst.SysTokenExpire, Value="10080", SysFlag=YesNoEnum.Y, Remark="Token过期时间分钟", OrderNo=90, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000191, Name="RefreshToken过期时间", Code=ConfigConst.SysRefreshTokenExpire, Value="20160", SysFlag=YesNoEnum.Y, Remark="刷新Token过期时间分钟一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)", OrderNo=100, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000201, Name="发送异常日志邮件", Code=ConfigConst.SysErrorMail, Value="False", SysFlag=YesNoEnum.Y, Remark="是否发送异常日志邮件", OrderNo=110, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000211, Name="域登录验证", Code=ConfigConst.SysDomainLogin, Value="False", SysFlag=YesNoEnum.Y, Remark="是否开启域登录验证", OrderNo=120, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000241, Name="行政区划同步层级", Code=ConfigConst.SysRegionSyncLevel, Value="3", SysFlag=YesNoEnum.Y, Remark="行政区划同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000161, Name="Token过期时间", Code=ConfigConst.SysTokenExpire, Value="10080", SysFlag=YesNoEnum.Y, Remark="Token过期时间分钟", OrderNo=90, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000171, Name="RefreshToken过期时间", Code=ConfigConst.SysRefreshTokenExpire, Value="20160", SysFlag=YesNoEnum.Y, Remark="刷新Token过期时间分钟一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)", OrderNo=100, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000181, Name="发送异常日志邮件", Code=ConfigConst.SysErrorMail, Value="False", SysFlag=YesNoEnum.Y, Remark="是否发送异常日志邮件", OrderNo=110, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000191, Name="域登录验证", Code=ConfigConst.SysDomainLogin, Value="False", SysFlag=YesNoEnum.Y, Remark="是否开启域登录验证", OrderNo=120, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000201, Name="行政区划同步层级", Code=ConfigConst.SysRegionSyncLevel, Value="3", SysFlag=YesNoEnum.Y, Remark="行政区划同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
// 新业务系统记得更改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取
new SysConfig{ Id=1300000000251, Name="国密SM2密匙", Code=ConfigConst.SysSM2Key, Value="04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9;3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A", SysFlag=YesNoEnum.Y, Remark="国密SM2密匙", OrderNo=160, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000261, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=170, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000271, Name="开启密码强度验证", Code=ConfigConst.SysPasswordStrength, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=180, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000281, Name="密码强度验证正则表达式", Code=ConfigConst.SysPasswordStrengthExpression, Value="(?=^.{6,20}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", SysFlag=YesNoEnum.Y, Remark="必须包含大小写字母、数字和特殊字符的组合长度在6-20之间", OrderNo=190, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000291, Name="密码时间有效期", Code=ConfigConst.SysPasswordExpirationTime, Value="0", SysFlag=YesNoEnum.Y, Remark="默认0表示永不过期否则表示过期天数", OrderNo=200, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000301, Name="密码历史记录验证", Code=ConfigConst.SysPasswordRecord, Value="False", SysFlag=YesNoEnum.Y, Remark="是否验证历史密码禁止再次使用", OrderNo=210, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000401, Name="显示系统更新日志", Code=ConfigConst.SysUpgrade, Value="True", SysFlag=YesNoEnum.Y, Remark="是否显示系统更新日志", OrderNo=220, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
new SysConfig{ Id=1310000000301, Name="系统主标题", Code=ConfigConst.SysWebTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统主标题", OrderNo=300, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000311, Name="系统副标题", Code=ConfigConst.SysWebViceTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统副标题", OrderNo=310, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000321, Name="系统描述", Code=ConfigConst.SysWebViceDesc, Value="站在巨人肩膀上的 .NET 通用权限开发框架", SysFlag=YesNoEnum.Y, Remark="系统描述", OrderNo=320, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000331, Name="水印内容", Code=ConfigConst.SysWebWatermark, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="水印内容", OrderNo=330, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000341, Name="版权说明", Code=ConfigConst.SysWebCopyright, Value="Copyright © 2021-present Admin.NET All rights reserved.", SysFlag=YesNoEnum.Y, Remark="版权说明", OrderNo=340, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000351, Name="系统图标", Code=ConfigConst.SysWebLogo, Value="/upload/logo.png", SysFlag=YesNoEnum.Y, Remark="系统图标", OrderNo=350, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000361, Name="ICP备案号", Code=ConfigConst.SysWebIcp, Value="省ICP备12345678号", SysFlag=YesNoEnum.Y, Remark="ICP备案号", OrderNo=360, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1310000000371, Name="ICP地址", Code=ConfigConst.SysWebIcpUrl, Value="https://beian.miit.gov.cn", SysFlag=YesNoEnum.Y, Remark="ICP地址", OrderNo=370, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000211, Name="国密SM2密匙", Code=ConfigConst.SysSM2Key, Value="04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9;3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A", SysFlag=YesNoEnum.Y, Remark="国密SM2密匙", OrderNo=160, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000221, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=170, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000231, Name="开启密码强度验证", Code=ConfigConst.SysPasswordStrength, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=180, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
new SysConfig{ Id=1300000000241, Name="密码强度验证正则表达式", Code=ConfigConst.SysPasswordStrengthExpression, Value="(?=^.{6,20}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", SysFlag=YesNoEnum.Y, Remark="必须包含大小写字母、数字和特殊字符的组合长度在6-20之间", OrderNo=190, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
new SysConfig{ Id=1300000000251, Name="密码时间有效期", Code=ConfigConst.SysPasswordExpirationTime, Value="0", SysFlag=YesNoEnum.Y, Remark="默认0表示永不过期否则表示过期天数", OrderNo=200, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000261, Name="密码历史记录验证", Code=ConfigConst.SysPasswordRecord, Value="False", SysFlag=YesNoEnum.Y, Remark="是否验证历史密码禁止再次使用", OrderNo=210, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-17 00:00:00") },
new SysConfig{ Id=1300000000271, Name="显示系统更新日志", Code=ConfigConst.SysUpgrade, Value="True", SysFlag=YesNoEnum.Y, Remark="是否显示系统更新日志", OrderNo=220, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
];
}
}

View File

@ -31,8 +31,22 @@ public class SysTenantSeedData : ISqlSugarEntitySeedData<SysTenant>
DbType=defaultDbConfig.DbType,
Connection=defaultDbConfig.ConnectionString,
ConfigId=SqlSugarConst.MainConfigId,
Remark="系统默认",
CreateTime=DateTime.Parse("2022-02-10 00:00:00")
Remark="默认租户",
CreateTime=DateTime.Parse("2022-02-10 00:00:00"),
Logo = "/upload/logo.png",
Title = "Admin.NET.Pro",
ViceTitle = "Admin.NET",
ViceDesc = "站在巨人肩膀上的 .NET 通用权限开发框架",
Copyright = "Copyright © 2021-present Admin.NET All rights reserved.",
Icp = "省ICP备12345678号",
IcpUrl = "https://beian.miit.gov.cn",
Watermark = "Admin.NET",
Version = "v2.0.0",
ThemeColor = "#0f59a4",
Layout = "columns", // defaults|classic|transverse|columns
Animation = "fadeDown",
Captcha = true,
SecondVer = false
},
];
}

View File

@ -12,10 +12,15 @@ namespace Admin.NET.Core.Service;
public class LoginUserOutput
{
/// <summary>
/// 用户id
/// 用户Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long? TenantId { get; set; }
/// <summary>
/// 账号名称
/// </summary>

View File

@ -291,6 +291,7 @@ public class SysAuthService : IDynamicApiController, ITransient
return new LoginUserOutput
{
Id = user.Id,
TenantId = user.TenantId,
Account = user.Account,
RealName = user.RealName,
Phone = user.Phone,

View File

@ -1,68 +0,0 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
/// <summary>
/// 系统信息保存输入参数
/// </summary>
public class InfoSaveInput
{
/// <summary>
/// 系统图标Data URI scheme base64 编码)
/// </summary>
public string SysLogoBase64 { get; set; }
/// <summary>
/// 系统图标文件名
/// </summary>
public string SysLogoFileName { get; set; }
/// <summary>
/// 系统主标题
/// </summary>
public string SysTitle { get; set; }
/// <summary>
/// 系统副标题
/// </summary>
public string SysViceTitle { get; set; }
/// <summary>
/// 系统描述
/// </summary>
public string SysViceDesc { get; set; }
/// <summary>
/// 水印内容
/// </summary>
public string SysWatermark { get; set; }
/// <summary>
/// 版权说明
/// </summary>
public string SysCopyright { get; set; }
/// <summary>
/// ICP备案号
/// </summary>
public string SysIcp { get; set; }
/// <summary>
/// ICP地址
/// </summary>
public string SysIcpUrl { get; set; }
/// <summary>
/// 登录二次验证
/// </summary>
public bool? SysSecondVer { get; set; }
/// <summary>
/// 图形验证码
/// </summary>
public bool? SysCaptcha { get; set; }
}

View File

@ -264,101 +264,6 @@ public class SysConfigService : IDynamicApiController, ITransient
}
}
/// <summary>
/// 获取系统信息 🔖
/// </summary>
/// <returns></returns>
[SuppressMonitor]
[AllowAnonymous]
[DisplayName("获取系统信息")]
public async Task<dynamic> GetSysInfo()
{
var sysLogo = await GetConfigValueByCode<string>(ConfigConst.SysWebLogo);
var sysTitle = await GetConfigValueByCode<string>(ConfigConst.SysWebTitle);
var sysViceTitle = await GetConfigValueByCode<string>(ConfigConst.SysWebViceTitle);
var sysViceDesc = await GetConfigValueByCode<string>(ConfigConst.SysWebViceDesc);
var sysWatermark = await GetConfigValueByCode<string>(ConfigConst.SysWebWatermark);
var sysCopyright = await GetConfigValueByCode<string>(ConfigConst.SysWebCopyright);
var sysIcp = await GetConfigValueByCode<string>(ConfigConst.SysWebIcp);
var sysIcpUrl = await GetConfigValueByCode<string>(ConfigConst.SysWebIcpUrl);
var sysSecondVer = await GetConfigValueByCode<bool>(ConfigConst.SysSecondVer); // 登录二次验证
var sysCaptcha = await GetConfigValueByCode<bool>(ConfigConst.SysCaptcha); // 图形验证码
var sysForceChangePassword = await GetConfigValueByCode<bool>(ConfigConst.SysForceChangePassword); // 强制修改密码
var sysPasswordExpirationTime = await GetConfigValueByCode<int>(ConfigConst.SysPasswordExpirationTime); // 密码有效期
var publicKey = App.GetConfig<string>("Cryptogram:PublicKey", true); // 获取密码加解密公钥配置
return new
{
SysLogo = sysLogo,
SysTitle = sysTitle,
SysViceTitle = sysViceTitle,
SysViceDesc = sysViceDesc,
SysWatermark = sysWatermark,
SysCopyright = sysCopyright,
SysIcp = sysIcp,
SysIcpUrl = sysIcpUrl,
SysSecondVer = sysSecondVer,
SysCaptcha = sysCaptcha,
SysForceChangePassword = sysForceChangePassword,
SysPasswordExpirationTime = sysPasswordExpirationTime,
PublicKey = publicKey
};
}
/// <summary>
/// 保存系统信息 🔖
/// </summary>
/// <returns></returns>
[UnitOfWork]
[DisplayName("保存系统信息")]
public async Task SaveSysInfo(InfoSaveInput input)
{
// logo 不为空才保存
if (!string.IsNullOrEmpty(input.SysLogoBase64))
{
// 旧图标文件相对路径
var oldSysLogoRelativeFilePath = await GetConfigValueByCode<string>(ConfigConst.SysWebLogo) ?? "";
var oldSysLogoAbsoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, oldSysLogoRelativeFilePath.TrimStart('/'));
var groups = Regex.Match(input.SysLogoBase64, @"data:image/(?<type>.+?);base64,(?<data>.+)").Groups;
//var type = groups["type"].Value;
var base64Data = groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
// 根据文件名取扩展名
var ext = string.IsNullOrWhiteSpace(input.SysLogoFileName) ? ".png" : Path.GetExtension(input.SysLogoFileName);
// 本地图标保存路径
var path = "upload";
var fileName = $"{input.SysTitle}-logo{ext}".ToLower();
var absoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, path, fileName);
// 删除已存在文件
if (File.Exists(oldSysLogoAbsoluteFilePath))
File.Delete(oldSysLogoAbsoluteFilePath);
// 创建文件夹
var absoluteFileDir = Path.GetDirectoryName(absoluteFilePath);
if (!Directory.Exists(absoluteFileDir))
Directory.CreateDirectory(absoluteFileDir);
// 保存图标文件
await File.WriteAllBytesAsync(absoluteFilePath, binData);
// 保存图标配置
var relativeUrl = $"/{path}/{fileName}";
await UpdateConfigValue(ConfigConst.SysWebLogo, relativeUrl);
}
await UpdateConfigValue(ConfigConst.SysWebTitle, input.SysTitle);
await UpdateConfigValue(ConfigConst.SysWebViceTitle, input.SysViceTitle);
await UpdateConfigValue(ConfigConst.SysWebViceDesc, input.SysViceDesc);
await UpdateConfigValue(ConfigConst.SysWebWatermark, input.SysWatermark);
await UpdateConfigValue(ConfigConst.SysWebCopyright, input.SysCopyright);
await UpdateConfigValue(ConfigConst.SysWebIcp, input.SysIcp);
await UpdateConfigValue(ConfigConst.SysWebIcpUrl, input.SysIcpUrl);
await UpdateConfigValue(ConfigConst.SysSecondVer, (input.SysSecondVer ?? false).ToString());
await UpdateConfigValue(ConfigConst.SysCaptcha, (input.SysCaptcha ?? true).ToString());
}
/// <summary>
/// 清除配置缓存
/// </summary>

View File

@ -157,7 +157,7 @@ public class SysDictDataService : IDynamicApiController, ITransient
if (dictDataList == null)
{
dictDataList = await _sysDictDataRep.AsQueryable().ClearFilter()
.InnerJoin<SysDictType>((u , a) => u.DictTypeId == a.Id)
.InnerJoin<SysDictType>((u, a) => u.DictTypeId == a.Id)
.Where((u, a) => a.SysFlag == YesNoEnum.Y || u.TenantId == _userManager.TenantId)
.Where(u => u.DictTypeId == dictTypeId).OrderBy(u => new { u.OrderNo, u.Code }).ToListAsync();
_sysCacheService.Set($"{CacheConst.KeyDict}{dictType.Code}", dictDataList);

View File

@ -0,0 +1,95 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
/// <summary>
/// 系统信息保存输入参数
/// </summary>
public class SysInfoInput
{
/// <summary>
/// 图标Data URI scheme base64 编码)
/// </summary>
public string LogoBase64 { get; set; }
/// <summary>
/// 图标文件名
/// </summary>
public string LogoFileName { get; set; }
/// <summary>
/// 主标题
/// </summary>
[Required(ErrorMessage = "主标题不能为空")]
public string Title { get; set; }
/// <summary>
/// 副标题
/// </summary>
public string ViceTitle { get; set; }
/// <summary>
/// 副描述
/// </summary>
public string ViceDesc { get; set; }
/// <summary>
/// 版权信息
/// </summary>
[Required(ErrorMessage = "版权信息不能为空")]
public string Copyright { get; set; }
/// <summary>
/// ICP备案号
/// </summary>
[Required(ErrorMessage = "ICP备案号不能为空")]
public string Icp { get; set; }
/// <summary>
/// ICP地址
/// </summary>
[Required(ErrorMessage = "ICP地址不能为空")]
public string IcpUrl { get; set; }
/// <summary>
/// 水印
/// </summary>
public string Watermark { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 主题颜色
/// </summary>
[Required(ErrorMessage = "主题颜色不能为空")]
public string ThemeColor { get; set; }
/// <summary>
/// 布局模式
/// </summary>
[Required(ErrorMessage = "布局模式不能为空")]
public string Layout { get; set; }
/// <summary>
/// 页面动画
/// </summary>
[Required(ErrorMessage = "页面动画不能为空")]
public string Animation { get; set; }
/// <summary>
/// 图形验证码
/// </summary>
public bool Captcha { get; set; } = true;
/// <summary>
/// 登录二次验证
/// </summary>
public bool SecondVer { get; set; } = false;
}

View File

@ -548,4 +548,101 @@ public class SysTenantService : IDynamicApiController, ITransient
return sqlSugarScopeProvider;
}
}
/// <summary>
/// 获取系统信息 🔖
/// </summary>
/// <returns></returns>
[SuppressMonitor]
[AllowAnonymous]
[DisplayName("获取系统信息")]
public async Task<dynamic> GetSysInfo(long tenantId)
{
//// 还可以根据域名判断租户
//var host = App.HttpContext.Request.Host.ToString();
if (tenantId < 1 && App.User != null) tenantId = long.Parse(App.User?.FindFirst(ClaimConst.TenantId)?.Value ?? "0");
if (tenantId < 1) tenantId = SqlSugarConst.DefaultTenantId;
var tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == tenantId);
if (tenant == null) return "";
// 获取首页轮播图列表
var forceChangePassword = await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysForceChangePassword); // 强制修改密码
var passwordExpirationTime = await _sysConfigService.GetConfigValueByCode<int>(ConfigConst.SysPasswordExpirationTime); // 密码有效期
var publicKey = App.GetConfig<string>("Cryptogram:PublicKey", true); // 获取密码加解密公钥配置
return new
{
TenantId = tenant.Id,
tenant.Logo,
tenant.Title,
tenant.ViceTitle,
tenant.ViceDesc,
tenant.Copyright,
tenant.Icp,
tenant.IcpUrl,
tenant.Watermark,
tenant.Version,
tenant.ThemeColor,
tenant.Layout,
tenant.Animation,
tenant.Captcha,
tenant.SecondVer,
ForceChangePassword = forceChangePassword,
PasswordExpirationTime = passwordExpirationTime,
PublicKey = publicKey
};
}
/// <summary>
/// 保存系统信息 🔖
/// </summary>
/// <returns></returns>
[UnitOfWork]
[DisplayName("保存系统信息")]
public async Task SaveSysInfo(SysInfoInput input)
{
var tenantId = long.Parse(App.User?.FindFirst(ClaimConst.TenantId)?.Value ?? "0");
var tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == tenantId);
_ = tenant ?? throw Oops.Oh(ErrorCodeEnum.D1002);
tenant = input.Adapt<SysTenant>();
tenant.Id = tenantId;
// logo 不为空才保存
if (!string.IsNullOrEmpty(input.LogoBase64))
{
// 旧图标文件相对路径
var oldSysLogoRelativeFilePath = tenant.Logo ?? "";
var oldSysLogoAbsoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, oldSysLogoRelativeFilePath.TrimStart('/'));
var groups = Regex.Match(input.LogoBase64, @"data:image/(?<type>.+?);base64,(?<data>.+)").Groups;
//var type = groups["type"].Value;
var base64Data = groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
// 根据文件名取扩展名
var ext = string.IsNullOrWhiteSpace(input.LogoFileName) ? ".png" : Path.GetExtension(input.LogoFileName);
// 本地图标保存路径
var path = "upload";
var fileName = $"{input.Title}-logo{ext}".ToLower();
var absoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, path, fileName);
// 删除已存在文件
if (File.Exists(oldSysLogoAbsoluteFilePath))
File.Delete(oldSysLogoAbsoluteFilePath);
// 创建文件夹
var absoluteFileDir = Path.GetDirectoryName(absoluteFilePath);
if (!Directory.Exists(absoluteFileDir))
Directory.CreateDirectory(absoluteFileDir);
// 保存图标文件
await File.WriteAllBytesAsync(absoluteFilePath, binData);
// 保存图标配置
tenant.Logo = $"/{path}/{fileName}";
}
await _sysTenantRep.AsUpdateable(tenant).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
}

View File

@ -1,15 +1,13 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using System.Globalization;
namespace Admin.NET.Core;
using System;
/// <summary>
/// 安全的基本数学运算方法类
/// </summary>

View File

@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.16" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.1" />
</ItemGroup>
<ItemGroup>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -55,7 +55,7 @@
"print-js": "^1.6.0",
"push.js": "^1.0.12",
"qrcodejs2-fixes": "^0.0.2",
"qs": "^6.13.1",
"qs": "^6.14.0",
"relation-graph": "^2.2.10",
"screenfull": "^6.0.2",
"sm-crypto-v2": "^1.9.3",
@ -74,7 +74,7 @@
"vue-router": "^4.5.0",
"vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.3.71",
"vxe-pc-ui": "^4.3.73",
"vxe-table": "^4.10.0",
"vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.7",
@ -83,7 +83,7 @@
},
"devDependencies": {
"@iconify/vue": "^4.3.0",
"@plugin-web-update-notification/vite": "^1.7.1",
"@plugin-web-update-notification/vite": "^1.8.0",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.12",
"@types/nprogress": "^0.2.3",

View File

@ -13,7 +13,6 @@
*/
export * from './apis/apijsonapi';
export * from './apis/alipay-api';
export * from './apis/sys-app-api';
export * from './apis/sys-auth-api';
export * from './apis/sys-cache-api';
export * from './apis/sys-code-gen-api';

View File

@ -1,721 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 { AddSysAppInput } from '../models';
import { AdminResultInt64 } from '../models';
import { AdminResultListInt64 } from '../models';
import { AdminResultLoginOutput } from '../models';
import { AdminResultObject } from '../models';
import { AdminResultSqlSugarPagedListSysAppOutput } from '../models';
import { BaseIdInput } from '../models';
import { BasePageInput } from '../models';
import { ChangeAppInput } from '../models';
import { UpdateAppMenuInput } from '../models';
import { UpdateSysAppInput } from '../models';
/**
* SysAppApi - axios parameter creator
* @export
*/
export const SysAppApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary 🔖
* @param {AddSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppAppDataGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/appData`;
// 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 {ChangeAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/changeApp`;
// 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}
*/
apiSysAppDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/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 {UpdateAppMenuInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/grantMenu`;
// 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]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppMenuListGet: async (id?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/menuList`;
// 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 {BasePageInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppPagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/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 {UpdateSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysAppUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysApp/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,
};
},
}
};
/**
* SysAppApi - functional programming interface
* @export
*/
export const SysAppApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary 🔖
* @param {AddSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt64>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppAddPost(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 apiSysAppAppDataGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppAppDataGet(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {ChangeAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultLoginOutput>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppChangeAppPost(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 apiSysAppDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppDeletePost(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 {UpdateAppMenuInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppGrantMenuPost(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]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppMenuListGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListInt64>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppMenuListGet(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 {BasePageInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysAppOutput>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppPagePost(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 {UpdateSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysAppApiAxiosParamCreator(configuration).apiSysAppUpdatePost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* SysAppApi - factory interface
* @export
*/
export const SysAppApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
*
* @summary 🔖
* @param {AddSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt64>> {
return SysAppApiFp(configuration).apiSysAppAddPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppAppDataGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
return SysAppApiFp(configuration).apiSysAppAppDataGet(options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {ChangeAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultLoginOutput>> {
return SysAppApiFp(configuration).apiSysAppChangeAppPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {BaseIdInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysAppApiFp(configuration).apiSysAppDeletePost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {UpdateAppMenuInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysAppApiFp(configuration).apiSysAppGrantMenuPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {number} [id]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppMenuListGet(id?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListInt64>> {
return SysAppApiFp(configuration).apiSysAppMenuListGet(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {BasePageInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysAppOutput>> {
return SysAppApiFp(configuration).apiSysAppPagePost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {UpdateSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysAppUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysAppApiFp(configuration).apiSysAppUpdatePost(body, options).then((request) => request(axios, basePath));
},
};
};
/**
* SysAppApi - object-oriented interface
* @export
* @class SysAppApi
* @extends {BaseAPI}
*/
export class SysAppApi extends BaseAPI {
/**
*
* @summary 🔖
* @param {AddSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt64>> {
return SysAppApiFp(this.configuration).apiSysAppAddPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppAppDataGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
return SysAppApiFp(this.configuration).apiSysAppAppDataGet(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {ChangeAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultLoginOutput>> {
return SysAppApiFp(this.configuration).apiSysAppChangeAppPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {BaseIdInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysAppApiFp(this.configuration).apiSysAppDeletePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {UpdateAppMenuInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysAppApiFp(this.configuration).apiSysAppGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {number} [id]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppMenuListGet(id?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListInt64>> {
return SysAppApiFp(this.configuration).apiSysAppMenuListGet(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {BasePageInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppPagePost(body?: BasePageInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysAppOutput>> {
return SysAppApiFp(this.configuration).apiSysAppPagePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {UpdateSysAppInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysAppApi
*/
public async apiSysAppUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysAppApiFp(this.configuration).apiSysAppUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@ -20,13 +20,11 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
import { AddConfigInput } from '../models';
import { AdminResultListString } from '../models';
import { AdminResultListSysConfig } from '../models';
import { AdminResultObject } from '../models';
import { AdminResultSqlSugarPagedListSysConfig } from '../models';
import { AdminResultString } from '../models';
import { AdminResultSysConfig } from '../models';
import { BatchConfigInput } from '../models';
import { DeleteConfigInput } from '../models';
import { InfoSaveInput } from '../models';
import { PageConfigInput } from '../models';
import { UpdateConfigInput } from '../models';
/**
@ -467,97 +465,6 @@ export const SysConfigApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {InfoSaveInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysConfigSaveSysInfoPost: async (body?: InfoSaveInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysConfig/saveSysInfo`;
// 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}
*/
apiSysConfigSysInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysConfig/sysInfo`;
// 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 🔖
@ -740,33 +647,6 @@ export const SysConfigApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {InfoSaveInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysConfigSaveSysInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSaveSysInfoPost(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 apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSysInfoGet(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -879,25 +759,6 @@ export const SysConfigApiFactory = function (configuration?: Configuration, base
async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysConfig>> {
return SysConfigApiFp(configuration).apiSysConfigPagePost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {InfoSaveInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysConfigSaveSysInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysConfigApiFp(configuration).apiSysConfigSaveSysInfoPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
return SysConfigApiFp(configuration).apiSysConfigSysInfoGet(options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1016,27 +877,6 @@ export class SysConfigApi extends BaseAPI {
public async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysConfig>> {
return SysConfigApiFp(this.configuration).apiSysConfigPagePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {InfoSaveInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysConfigApi
*/
public async apiSysConfigSaveSysInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysConfigApiFp(this.configuration).apiSysConfigSaveSysInfoPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysConfigApi
*/
public async apiSysConfigSysInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
return SysConfigApiFp(this.configuration).apiSysConfigSysInfoGet(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖

View File

@ -21,11 +21,13 @@ import { AddTenantInput } from '../models';
import { AdminResultInt32 } from '../models';
import { AdminResultListInt64 } from '../models';
import { AdminResultListSysUser } from '../models';
import { AdminResultObject } from '../models';
import { AdminResultSqlSugarPagedListTenantOutput } from '../models';
import { AdminResultString } from '../models';
import { DeleteTenantInput } from '../models';
import { PageTenantInput } from '../models';
import { RoleMenuInput } from '../models';
import { SysInfoInput } from '../models';
import { TenantIdInput } from '../models';
import { TenantInput } from '../models';
import { TenantUserInput } from '../models';
@ -420,6 +422,54 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {SysInfoInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysTenantSaveSysInfoPost: async (body?: SysInfoInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysTenant/saveSysInfo`;
// 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 🔖
@ -511,6 +561,55 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {number} tenantId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysTenantSysInfoTenantIdGet: async (tenantId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'tenantId' is not null or undefined
if (tenantId === null || tenantId === undefined) {
throw new RequiredError('tenantId','Required parameter tenantId was null or undefined when calling apiSysTenantSysInfoTenantIdGet.');
}
const localVarPath = `/api/sysTenant/sysInfo/{tenantId}`
.replace(`{${"tenantId"}}`, encodeURIComponent(String(tenantId)));
// 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 🔖
@ -728,6 +827,20 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {SysInfoInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantSaveSysInfoPost(body?: SysInfoInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantSaveSysInfoPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -755,6 +868,20 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {number} tenantId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantSysInfoTenantIdGet(tenantId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantSysInfoTenantIdGet(tenantId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -872,6 +999,16 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
async apiSysTenantResetPwdPost(body?: TenantUserInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
return SysTenantApiFp(configuration).apiSysTenantResetPwdPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {SysInfoInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantSaveSysInfoPost(body?: SysInfoInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysTenantApiFp(configuration).apiSysTenantSaveSysInfoPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -891,6 +1028,16 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
async apiSysTenantSyncTenantDbPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysTenantApiFp(configuration).apiSysTenantSyncTenantDbPost(options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {number} tenantId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantSysInfoTenantIdGet(tenantId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
return SysTenantApiFp(configuration).apiSysTenantSysInfoTenantIdGet(tenantId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1009,6 +1156,17 @@ export class SysTenantApi extends BaseAPI {
public async apiSysTenantResetPwdPost(body?: TenantUserInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
return SysTenantApiFp(this.configuration).apiSysTenantResetPwdPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {SysInfoInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysTenantApi
*/
public async apiSysTenantSaveSysInfoPost(body?: SysInfoInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysTenantApiFp(this.configuration).apiSysTenantSaveSysInfoPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
@ -1030,6 +1188,17 @@ export class SysTenantApi extends BaseAPI {
public async apiSysTenantSyncTenantDbPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysTenantApiFp(this.configuration).apiSysTenantSyncTenantDbPost(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {number} tenantId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysTenantApi
*/
public async apiSysTenantSysInfoTenantIdGet(tenantId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
return SysTenantApiFp(this.configuration).apiSysTenantSysInfoTenantIdGet(tenantId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖

View File

@ -85,6 +85,14 @@ export interface AddDictDataInput {
*/
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof AddDictDataInput
*/
tenantId?: number | null;
/**
* Id
*

View File

@ -1,102 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 AddSysAppInput
*/
export interface AddSysAppInput {
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
logo: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
name: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
title: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
viceTitle: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
viceDesc: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
watermark: string;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
copyright: string;
/**
* ICP备案号
*
* @type {string}
* @memberof AddSysAppInput
*/
icp: string;
/**
*
*
* @type {number}
* @memberof AddSysAppInput
*/
orderNo: number;
/**
*
*
* @type {string}
* @memberof AddSysAppInput
*/
remark?: string | null;
}

View File

@ -88,15 +88,7 @@ export interface AddTenantInput {
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof AddTenantInput
*/
appId?: number | null;
/**
* Id
* Id
*
* @type {number}
* @memberof AddTenantInput
@ -193,6 +185,118 @@ export interface AddTenantInput {
*/
orgPid?: number;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
logo: string;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
title?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
viceTitle?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
viceDesc?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
copyright?: string | null;
/**
* ICP备案号
*
* @type {string}
* @memberof AddTenantInput
*/
icp?: string | null;
/**
* ICP地址
*
* @type {string}
* @memberof AddTenantInput
*/
icpUrl?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
watermark?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
version?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
themeColor?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
layout?: string | null;
/**
*
*
* @type {string}
* @memberof AddTenantInput
*/
animation?: string | null;
/**
*
*
* @type {boolean}
* @memberof AddTenantInput
*/
captcha?: boolean;
/**
*
*
* @type {boolean}
* @memberof AddTenantInput
*/
secondVer?: boolean;
/**
*
*

View File

@ -1,69 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 { SqlSugarPagedListSysAppOutput } from './sql-sugar-paged-list-sys-app-output';
/**
*
*
* @export
* @interface AdminResultSqlSugarPagedListSysAppOutput
*/
export interface AdminResultSqlSugarPagedListSysAppOutput {
/**
*
*
* @type {number}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
code?: number;
/**
* successwarningerror
*
* @type {string}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
type?: string | null;
/**
*
*
* @type {string}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
message?: string | null;
/**
* @type {SqlSugarPagedListSysAppOutput}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
result?: SqlSugarPagedListSysAppOutput;
/**
*
*
* @type {any}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
extras?: any | null;
/**
*
*
* @type {Date}
* @memberof AdminResultSqlSugarPagedListSysAppOutput
*/
time?: Date;
}

View File

@ -1,30 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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.
*/
/**
* Id输入参数
*
* @export
* @interface BaseIdInput
*/
export interface BaseIdInput {
/**
* Id
*
* @type {number}
* @memberof BaseIdInput
*/
id: number;
}

View File

@ -1,84 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 BasePageInput
*/
export interface BasePageInput {
/**
* @type {Search}
* @memberof BasePageInput
*/
search?: Search;
/**
*
*
* @type {string}
* @memberof BasePageInput
*/
keyword?: string | null;
/**
* @type {Filter}
* @memberof BasePageInput
*/
filter?: Filter;
/**
*
*
* @type {number}
* @memberof BasePageInput
*/
page?: number;
/**
*
*
* @type {number}
* @memberof BasePageInput
*/
pageSize?: number;
/**
*
*
* @type {string}
* @memberof BasePageInput
*/
field?: string | null;
/**
*
*
* @type {string}
* @memberof BasePageInput
*/
order?: string | null;
/**
*
*
* @type {string}
* @memberof BasePageInput
*/
descStr?: string | null;
}

View File

@ -1,38 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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.
*/
/**
* iId
*
* @export
* @interface ChangeAppInput
*/
export interface ChangeAppInput {
/**
* Id
*
* @type {number}
* @memberof ChangeAppInput
*/
id: number;
/**
* Id
*
* @type {number}
* @memberof ChangeAppInput
*/
tenantId: number;
}

View File

@ -16,7 +16,6 @@ export * from './add-region-input';
export * from './add-role-input';
export * from './add-schedule-input';
export * from './add-subscribe-message-template-input';
export * from './add-sys-app-input';
export * from './add-sys-ldap-input';
export * from './add-tenant-input';
export * from './add-upgrade-input';
@ -83,7 +82,6 @@ export * from './admin-result-sql-sugar-paged-list-oauth-user-output';
export * from './admin-result-sql-sugar-paged-list-open-access-output';
export * from './admin-result-sql-sugar-paged-list-page-pos-output';
export * from './admin-result-sql-sugar-paged-list-page-role-output';
export * from './admin-result-sql-sugar-paged-list-sys-app-output';
export * from './admin-result-sql-sugar-paged-list-sys-code-gen';
export * from './admin-result-sql-sugar-paged-list-sys-config';
export * from './admin-result-sql-sugar-paged-list-sys-dict-data';
@ -134,8 +132,6 @@ export * from './aliyun-send-sms-template-input';
export * from './amount';
export * from './api-output';
export * from './assembly';
export * from './base-id-input';
export * from './base-page-input';
export * from './base-proc-input';
export * from './batch-config-input';
export * from './calendar';
@ -144,7 +140,6 @@ export * from './calendar-week-rule';
export * from './calling-conventions';
export * from './captcha-output';
export * from './card-type-enum';
export * from './change-app-input';
export * from './change-pwd-input';
export * from './cluster-status';
export * from './code-gen-config';
@ -240,7 +235,6 @@ export * from './icontainer';
export * from './icustom-attribute-provider';
export * from './idisposable';
export * from './isite';
export * from './info-save-input';
export * from './int-ptr';
export * from './invoice-info';
export * from './invoice-key-info';
@ -345,7 +339,6 @@ 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-sys-app-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-dict-data';
@ -375,7 +368,6 @@ export * from './stress-test-input';
export * from './struct-layout-attribute';
export * from './swagger-submit-url-body';
export * from './sync-sys-ldap-input';
export * from './sys-app-output';
export * from './sys-code-gen';
export * from './sys-code-gen-config';
export * from './sys-code-gen-template';
@ -388,6 +380,7 @@ export * from './sys-file-upload-avatar-body';
export * from './sys-file-upload-file-body';
export * from './sys-file-upload-files-body';
export * from './sys-file-upload-signature-body';
export * from './sys-info-input';
export * from './sys-job-cluster';
export * from './sys-job-detail';
export * from './sys-job-trigger';
@ -432,7 +425,6 @@ export * from './type';
export * from './type-attributes';
export * from './type-info';
export * from './unlock-login-input';
export * from './update-app-menu-input';
export * from './update-code-gen-input';
export * from './update-config-input';
export * from './update-db-column-input';
@ -451,7 +443,6 @@ export * from './update-print-input';
export * from './update-region-input';
export * from './update-role-input';
export * from './update-schedule-input';
export * from './update-sys-app-input';
export * from './update-sys-ldap-input';
export * from './update-tenant-input';
export * from './update-upgrade-input';

View File

@ -1,110 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 InfoSaveInput
*/
export interface InfoSaveInput {
/**
* Data URI scheme base64
*
* @type {string}
* @memberof InfoSaveInput
*/
sysLogoBase64?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysLogoFileName?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysTitle?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysViceTitle?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysViceDesc?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysWatermark?: string | null;
/**
*
*
* @type {string}
* @memberof InfoSaveInput
*/
sysCopyright?: string | null;
/**
* ICP备案号
*
* @type {string}
* @memberof InfoSaveInput
*/
sysIcp?: string | null;
/**
* ICP地址
*
* @type {string}
* @memberof InfoSaveInput
*/
sysIcpUrl?: string | null;
/**
*
*
* @type {boolean}
* @memberof InfoSaveInput
*/
sysSecondVer?: boolean | null;
/**
*
*
* @type {boolean}
* @memberof InfoSaveInput
*/
sysCaptcha?: boolean | null;
}

View File

@ -22,13 +22,21 @@ import { AccountTypeEnum } from './account-type-enum';
export interface LoginUserOutput {
/**
* id
* Id
*
* @type {number}
* @memberof LoginUserOutput
*/
id?: number;
/**
* Id
*
* @type {number}
* @memberof LoginUserOutput
*/
tenantId?: number | null;
/**
*
*

View File

@ -1,79 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 { SysAppOutput } from './sys-app-output';
/**
*
*
* @export
* @interface SqlSugarPagedListSysAppOutput
*/
export interface SqlSugarPagedListSysAppOutput {
/**
*
*
* @type {number}
* @memberof SqlSugarPagedListSysAppOutput
*/
page?: number;
/**
*
*
* @type {number}
* @memberof SqlSugarPagedListSysAppOutput
*/
pageSize?: number;
/**
*
*
* @type {number}
* @memberof SqlSugarPagedListSysAppOutput
*/
total?: number;
/**
*
*
* @type {number}
* @memberof SqlSugarPagedListSysAppOutput
*/
totalPages?: number;
/**
*
*
* @type {Array<SysAppOutput>}
* @memberof SqlSugarPagedListSysAppOutput
*/
items?: Array<SysAppOutput> | null;
/**
*
*
* @type {boolean}
* @memberof SqlSugarPagedListSysAppOutput
*/
hasPrevPage?: boolean;
/**
*
*
* @type {boolean}
* @memberof SqlSugarPagedListSysAppOutput
*/
hasNextPage?: boolean;
}

View File

@ -85,6 +85,14 @@ export interface SysDictData {
*/
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof SysDictData
*/
tenantId?: number | null;
/**
* Id
*

View File

@ -13,50 +13,42 @@
*/
/**
*
*
*
* @export
* @interface SysAppOutput
* @interface SysInfoInput
*/
export interface SysAppOutput {
export interface SysInfoInput {
/**
* Id
*
* @type {number}
* @memberof SysAppOutput
*/
id?: number;
/**
*
* Data URI scheme base64
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
name?: string | null;
logoBase64?: string | null;
/**
*
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
logo?: string | null;
logoFileName?: string | null;
/**
*
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
title?: string | null;
title: string;
/**
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
viceTitle?: string | null;
@ -64,103 +56,87 @@ export interface SysAppOutput {
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
viceDesc?: string | null;
/**
*
*
* @type {string}
* @memberof SysAppOutput
*/
watermark?: string | null;
/**
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
copyright?: string | null;
copyright: string;
/**
* ICP备案号
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
icp?: string | null;
icp: string;
/**
*
*
* @type {number}
* @memberof SysAppOutput
*/
orderNo?: number;
/**
*
* ICP地址
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
remark?: string | null;
icpUrl: string;
/**
*
*
* @type {Date}
* @memberof SysAppOutput
*/
createTime?: Date | null;
/**
*
*
* @type {Date}
* @memberof SysAppOutput
*/
updateTime?: Date | null;
/**
* Id
*
* @type {number}
* @memberof SysAppOutput
*/
createUserId?: number | null;
/**
*
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
createUserName?: string | null;
watermark?: string | null;
/**
* Id
*
* @type {number}
* @memberof SysAppOutput
*/
updateUserId?: number | null;
/**
*
*
*
* @type {string}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
updateUserName?: string | null;
version?: string | null;
/**
*
*
*
* @type {string}
* @memberof SysInfoInput
*/
themeColor: string;
/**
*
*
* @type {string}
* @memberof SysInfoInput
*/
layout: string;
/**
*
*
* @type {string}
* @memberof SysInfoInput
*/
animation: string;
/**
*
*
* @type {boolean}
* @memberof SysAppOutput
* @memberof SysInfoInput
*/
isDelete?: boolean;
captcha?: boolean;
/**
*
*
* @type {boolean}
* @memberof SysInfoInput
*/
secondVer?: boolean;
}

View File

@ -88,15 +88,7 @@ export interface TenantOutput {
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof TenantOutput
*/
appId?: number | null;
/**
* Id
* Id
*
* @type {number}
* @memberof TenantOutput
@ -193,6 +185,118 @@ export interface TenantOutput {
*/
orgPid?: number;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
logo: string;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
title?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
viceTitle?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
viceDesc?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
copyright?: string | null;
/**
* ICP备案号
*
* @type {string}
* @memberof TenantOutput
*/
icp?: string | null;
/**
* ICP地址
*
* @type {string}
* @memberof TenantOutput
*/
icpUrl?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
watermark?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
version?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
themeColor?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
layout?: string | null;
/**
*
*
* @type {string}
* @memberof TenantOutput
*/
animation?: string | null;
/**
*
*
* @type {boolean}
* @memberof TenantOutput
*/
captcha?: boolean;
/**
*
*
* @type {boolean}
* @memberof TenantOutput
*/
secondVer?: boolean;
/**
*
*

View File

@ -1,38 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 UpdateAppMenuInput
*/
export interface UpdateAppMenuInput {
/**
* Id
*
* @type {number}
* @memberof UpdateAppMenuInput
*/
id: number;
/**
* Id集合
*
* @type {Array<number>}
* @memberof UpdateAppMenuInput
*/
menuIdList?: Array<number> | null;
}

View File

@ -85,6 +85,14 @@ export interface UpdateDictDataInput {
*/
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof UpdateDictDataInput
*/
tenantId?: number | null;
/**
* Id
*

View File

@ -1,110 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* 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 UpdateSysAppInput
*/
export interface UpdateSysAppInput {
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
logo: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
name: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
title: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
viceTitle: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
viceDesc: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
watermark: string;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
copyright: string;
/**
* ICP备案号
*
* @type {string}
* @memberof UpdateSysAppInput
*/
icp: string;
/**
*
*
* @type {number}
* @memberof UpdateSysAppInput
*/
orderNo: number;
/**
*
*
* @type {string}
* @memberof UpdateSysAppInput
*/
remark?: string | null;
/**
* Id
*
* @type {number}
* @memberof UpdateSysAppInput
*/
id: number;
}

View File

@ -88,15 +88,7 @@ export interface UpdateTenantInput {
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof UpdateTenantInput
*/
appId?: number | null;
/**
* Id
* Id
*
* @type {number}
* @memberof UpdateTenantInput
@ -193,6 +185,118 @@ export interface UpdateTenantInput {
*/
orgPid?: number;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
logo: string;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
title?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
viceTitle?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
viceDesc?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
copyright?: string | null;
/**
* ICP备案号
*
* @type {string}
* @memberof UpdateTenantInput
*/
icp?: string | null;
/**
* ICP地址
*
* @type {string}
* @memberof UpdateTenantInput
*/
icpUrl?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
watermark?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
version?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
themeColor?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
layout?: string | null;
/**
*
*
* @type {string}
* @memberof UpdateTenantInput
*/
animation?: string | null;
/**
*
*
* @type {boolean}
* @memberof UpdateTenantInput
*/
captcha?: boolean;
/**
*
*
* @type {boolean}
* @memberof UpdateTenantInput
*/
secondVer?: boolean;
/**
*
*

View File

@ -29,9 +29,9 @@ import 'jwchat/lib/style.css';
import { disAutoConnect } from 'vue-plugin-hiprint';
disAutoConnect();
// 加载系统信息
import { loadSysInfo } from '/@/utils/sysInfo';
loadSysInfo();
// // 加载系统信息
// import { loadSysInfo } from '/@/utils/sysInfo';
// loadSysInfo();
const app = createApp(App);
directive(app);

View File

@ -10,7 +10,7 @@ export const useThemeConfig = defineStore('themeConfig', {
*
*/
// 默认 primary 主题颜色
primary: '#0F59A4', //胭脂红:#F03F24 //飞燕草蓝:#0F59A4 //薄荷绿:#207F4C
primary: '#0f59a4', //胭脂红:#f03f24 //飞燕草蓝:#0f59a4 //薄荷绿:#207f4c
// 是否开启深色模式
isIsDark: false,

View File

@ -70,6 +70,7 @@ export const useUserInfo = defineStore('userInfo', {
var d = res.data.result;
const userInfos = {
id: d.id,
tenantId: d.tenantId,
account: d.account,
realName: d.realName,
phone: d.phone,

View File

@ -98,6 +98,7 @@ declare interface ThemeConfigState {
logoUrl: string; // 系统 logo 地址
icp: string; // Icp备案号
icpUrl: string; // Icp地址
version: string; // 版本号
secondVer: boolean; // 是否开启二级验证
captcha: boolean; // 是否开启验证码
forceChangePassword: boolean; // 是否开启强制修改密码

View File

@ -3,15 +3,15 @@ import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
import logoImg from '/@/assets/logo.png';
import { SysConfigApi } from '/@/api-services';
import { SysTenantApi } from '/@/api-services';
import { feature, getAPI } from '/@/utils/axios-utils';
const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig);
// 加载系统信息
export async function loadSysInfo() {
const [err, res] = await feature(getAPI(SysConfigApi).apiSysConfigSysInfoGet());
export async function loadSysInfo(tenantid: number) {
const [err, res] = await feature(getAPI(SysTenantApi).apiSysTenantSysInfoTenantIdGet(Number(tenantid)));
if (err) {
// 默认 logo 地址
themeConfig.value.logoUrl = logoImg;
@ -20,37 +20,45 @@ export async function loadSysInfo() {
Local.set('themeConfig', storesThemeConfig.themeConfig);
return;
} else {
if (res.data.type != 'success') return;
if (res.data.type != 'success' || res.data.result == null) return;
const data = res.data.result;
// 系统logo
themeConfig.value.logoUrl = data.sysLogo;
themeConfig.value.logoUrl = data.logo;
// 主标题
themeConfig.value.globalTitle = data.sysTitle;
themeConfig.value.globalTitle = data.title;
// 副标题
themeConfig.value.globalViceTitle = data.sysViceTitle;
themeConfig.value.globalViceTitle = data.viceTitle;
// 系统说明
themeConfig.value.globalViceTitleMsg = data.sysViceDesc;
themeConfig.value.globalViceTitleMsg = data.viceDesc;
// Icp备案信息
themeConfig.value.icp = data.sysIcp;
themeConfig.value.icpUrl = data.sysIcpUrl;
themeConfig.value.icp = data.icp;
themeConfig.value.icpUrl = data.icpUrl;
// 水印
themeConfig.value.isWatermark = data.sysWatermark != null;
themeConfig.value.watermarkText = data.sysWatermark;
themeConfig.value.isWatermark = data.watermark != null;
themeConfig.value.watermarkText = data.watermark;
// 版权说明
themeConfig.value.copyright = data.sysCopyright;
themeConfig.value.copyright = data.copyright;
// 版本号
themeConfig.value.version = data.version;
// 全局主题
themeConfig.value.primary = data.themeColor;
// 布局切换
themeConfig.value.layout = data.layout;
// 面切动画
themeConfig.value.animation = data.animation;
// 登录验证
themeConfig.value.secondVer = data.sysSecondVer;
themeConfig.value.captcha = data.sysCaptcha;
themeConfig.value.secondVer = data.secondVer;
themeConfig.value.captcha = data.captcha;
// 开启强制修改密码
themeConfig.value.forceChangePassword = data.sysForceChangePassword;
themeConfig.value.forceChangePassword = data.forceChangePassword;
// 是否验证密码有效期
themeConfig.value.passwordExpirationTime = data.sysPasswordExpirationTime;
themeConfig.value.passwordExpirationTime = data.passwordExpirationTime;
// 密码加解密公匙
window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
// 更新 favicon
updateFavicon(data.sysLogo);
updateFavicon(data.logo);
// 保存配置
Local.remove('themeConfig');

View File

@ -56,18 +56,22 @@
<script setup lang="ts" name="loginIndex">
import { defineAsyncComponent, onMounted, reactive, computed } from 'vue';
import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
import { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading';
// import logoMini from '/@/assets/logo-mini.svg';
import loginIconTwo from '/@/assets/login-icon-two.svg';
import loginIconTwo1 from '/@/assets/login-icon-two1.svg';
import loginIconTwo2 from '/@/assets/login-icon-two2.svg';
//
import { loadSysInfo } from '/@/utils/sysInfo';
//
const Account = defineAsyncComponent(() => import('/@/views/login/component/account.vue'));
const Mobile = defineAsyncComponent(() => import('/@/views/login/component/mobile.vue'));
const Scan = defineAsyncComponent(() => import('/@/views/login/component/scan.vue'));
const route = useRoute();
const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig);
const state = reactive({
@ -80,6 +84,9 @@ const getThemeConfig = computed(() => {
});
//
onMounted(() => {
var tenantid = route.query.tenantid ?? 0;
loadSysInfo(Number(tenantid));
NextLoading.done();
});
</script>

View File

@ -1,210 +0,0 @@
<template>
<div class="sys-app-container">
<el-dialog v-model="state.isShowDialog" draggable :close-on-click-modal="false">
<template #header>
<div style="color: #fff">
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
<span>{{ props.title }}</span>
</div>
</template>
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
<el-row :gutter="35">
<el-col :xs="24" :sm="10" :md="10" :lg="10" :xl="10" class="mb20">
<el-form-item label="名称" prop="name" :rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.name" maxlength="32" placeholder="应用名称" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="14" :md="14" :lg="14" :xl="14" class="mb20">
<el-form-item label="Logo" prop="logo" :rules="[{ required: true, message: '应用Logo不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.logo" class="w80" maxlength="256" placeholder="应用Logo" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="10" :md="10" :lg="10" :xl="10" class="mb20">
<el-form-item label="标题" prop="title" :rules="[{ required: true, message: '标题不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.title" placeholder="应用标题" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="14" :md="14" :lg="14" :xl="14" class="mb20">
<el-form-item label="副标题" prop="viceTitle" :rules="[{ required: true, message: '副标题不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.viceTitle" placeholder="应用副标题" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="副标题描述" prop="viceDesc" :rules="[{ required: true, message: '副标题描述不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.viceDesc" placeholder="应用副标题描述" maxlength="64" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="版权信息" prop="copyright" :rules="[{ required: true, message: '版权信息不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.copyright" placeholder="版权信息" maxlength="64" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="9" :md="9" :lg="9" :xl="9" class="mb20">
<el-form-item label="备案号" prop="icp" :rules="[{ required: true, message: '备案号不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.icp" placeholder="备案号" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="9" :md="9" :lg="9" :xl="9" class="mb20">
<el-form-item label="水印" prop="watermark" :rules="[{ required: true, message: '水印不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.watermark" placeholder="应用水印" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="排序">
<el-input-number v-model="state.ruleForm.orderNo" placeholder="排序" class="w100" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="备注">
<el-input v-model="state.ruleForm.remark" placeholder="请输入备注内容" show-word-limit clearable type="textarea" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-auth="'sysApp:grantMenu'">
<el-form-item label="菜单权限" v-loading="state.loading">
<el-tree
ref="treeRef"
:data="state.menuData"
node-key="id"
show-checkbox
:props="{ children: 'children', label: 'title', class: treeNodeClass }"
icon="ele-Menu"
highlight-current
default-expand-all
style="height: 600px; overflow-y: auto"
>
<template #default="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.path" style="margin-left: 5px !important">
<el-tag effect="plain" type="warning">{{ data.path }}</el-tag>
</span>
</template>
</el-tree>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button icon="ele-CircleCloseFilled" @click="cancel"> </el-button>
<el-button type="primary" icon="ele-CircleCheckFilled" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script lang="ts" setup name="sysEditApp">
import { onMounted, reactive, ref } from 'vue';
import type { ElTree } from 'element-plus';
import { getAPI } from '/@/utils/axios-utils';
import { SysMenuApi, SysAppApi } from '/@/api-services/api';
import { SysMenu } from '/@/api-services/models';
import { auth } from '/@/utils/authFunction';
const props = defineProps({
title: String,
});
const emits = defineEmits(['handleQuery']);
const ruleFormRef = ref();
const treeRef = ref<InstanceType<typeof ElTree>>();
const state = reactive({
loading: false,
isShowDialog: false,
ruleForm: {} as any,
menuData: [] as Array<SysMenu>, //
});
onMounted(async () => {
state.loading = true;
if (auth('sysApp:grantMenu')) {
const res = await getAPI(SysMenuApi).apiSysMenuListGet(undefined, undefined, true);
state.menuData = res.data.result ?? [];
}
state.loading = false;
});
//
const openDialog = async (row: any) => {
ruleFormRef.value?.resetFields();
treeRef.value?.setCheckedKeys([]); //
state.ruleForm = JSON.parse(JSON.stringify(row));
if (row.id && auth('sysApp:grantMenu')) {
const res = await getAPI(SysAppApi).apiSysAppGrantMenuGet(row.id);
treeRef.value?.setCheckedKeys(res.data.result ?? []);
}
state.isShowDialog = true;
};
//
const closeDialog = () => {
emits('handleQuery');
state.isShowDialog = false;
};
//
const cancel = () => {
state.isShowDialog = false;
};
//
const submit = () => {
ruleFormRef.value.validate(async (valid: boolean) => {
if (!valid) return;
const menuIdList = (treeRef.value?.getCheckedKeys() as Array<number>) ?? []; //.concat(treeRef.value?.getHalfCheckedKeys());
if (state.ruleForm.id != undefined && state.ruleForm.id > 0) {
await getAPI(SysAppApi).apiSysAppUpdatePost(state.ruleForm);
} else {
state.ruleForm.id = await getAPI(SysAppApi)
.apiSysAppAddPost(state.ruleForm)
.then((res) => res.data.result);
}
if (state.ruleForm.id && auth('sysApp:grantMenu')) {
await getAPI(SysAppApi).apiSysAppGrantMenuPost({ id: state.ruleForm.id, menuIdList: menuIdList });
}
closeDialog();
});
};
//
const treeNodeClass = (node: SysMenu) => {
let addClass = true; //
for (const index in node.children) {
//
if (node.children[index].children?.length ?? 0 > 0) {
addClass = false;
break;
}
}
return addClass ? 'penultimate-node' : '';
};
//
defineExpose({ openDialog });
</script>
<style lang="scss" scoped>
.menu-data-tree {
width: 100%;
border: 1px solid var(--el-border-color);
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
padding: 5px;
}
:deep(.penultimate-node) {
.el-tree-node__children {
padding-left: 40px;
white-space: pre-wrap;
line-height: 100%;
.el-tree-node {
display: inline-block;
}
.el-tree-node__content {
padding-left: 5px !important;
padding-right: 5px;
}
}
}
</style>

View File

@ -1,147 +0,0 @@
<template>
<div class="sys-app-container">
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
<el-form :model="state.queryParams" ref="queryForm" :inline="true">
<el-form-item label="关键字">
<el-input v-model="state.queryParams.keyword" placeholder="关键字" clearable />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysApp:page'"> 查询 </el-button>
<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
</el-button-group>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="ele-Plus" @click="openAddApp" v-auth="'sysApp:add'"> 新增 </el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
<el-table :data="state.appData" style="width: 100%" v-loading="state.loading" border>
<el-table-column type="index" label="序号" width="55" align="center" fixed />
<el-table-column prop="logo" label="图标" width="55" align="center" show-overflow-tooltip>
<template #default="scope">
<el-avatar shape="square" :src="scope.row.logo" size="small" />
</template>
</el-table-column>
<el-table-column prop="name" label="名称" width="180" align="center" show-overflow-tooltip />
<el-table-column prop="title" label="标题" width="180" align="center" show-overflow-tooltip />
<el-table-column prop="viceTitle" label="副标题" width="180" align="center" show-overflow-tooltip />
<el-table-column prop="viceDesc" label="描述" width="300" align="center" show-overflow-tooltip />
<el-table-column prop="watermark" label="水印" width="130" align="center" show-overflow-tooltip />
<el-table-column prop="copyright" label="版权信息" width="350" align="center" show-overflow-tooltip />
<el-table-column prop="icp" label="备案号" width="130" align="center" show-overflow-tooltip />
<el-table-column prop="orderNo" label="排序" width="70" align="center" show-overflow-tooltip />
<el-table-column label="修改记录" width="100" align="center" show-overflow-tooltip>
<template #default="scope">
<ModifyRecord :data="scope.row" />
</template>
</el-table-column>
<el-table-column label="操作" width="130" fixed="right" align="center" show-overflow-tooltip>
<template #default="scope">
<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditApp(scope.row)" v-auth="'sysApp:update'"> 编辑 </el-button>
<el-button icon="ele-Delete" size="small" text type="danger" @click="delApp(scope.row)" v-auth="'sysApp:delete'"> 删除 </el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-model:currentPage="state.tableParams.page"
v-model:page-size="state.tableParams.pageSize"
:total="state.tableParams.total"
:page-sizes="[10, 20, 50, 100]"
size="small"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
layout="total, sizes, prev, pager, next, jumper"
/>
</el-card>
<EditApp ref="editAppRef" :title="state.editAppTitle" @handleQuery="handleQuery" />
</div>
</template>
<script lang="ts" setup name="sysApp">
import { onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import EditApp from '/@/views/system/app/component/editApp.vue';
import ModifyRecord from '/@/components/table/modifyRecord.vue';
import { getAPI } from '/@/utils/axios-utils';
import { SysAppApi } from '/@/api-services/api';
const editAppRef = ref<InstanceType<typeof EditApp>>();
const state = reactive({
loading: false,
appData: [] as any[],
queryParams: {
keyword: undefined,
},
tableParams: {
page: 1,
pageSize: 50,
total: 0 as any,
},
editAppTitle: '',
});
onMounted(async () => {
await handleQuery();
});
//
const handleQuery = async () => {
state.loading = true;
let params = Object.assign(state.queryParams, state.tableParams);
let res = await getAPI(SysAppApi).apiSysAppPagePost(params);
state.appData = res.data.result?.items ?? [];
state.tableParams.total = res.data.result?.total;
state.loading = false;
};
//
const resetQuery = async () => {
state.queryParams.keyword = undefined;
await handleQuery();
};
//
const openAddApp = () => {
state.editAppTitle = '添加应用';
editAppRef.value?.openDialog({ id: undefined, status: 1, orderNo: 100 });
};
//
const openEditApp = async (row: any) => {
state.editAppTitle = '编辑应用';
editAppRef.value?.openDialog(row);
};
//
const delApp = (row: any) => {
ElMessageBox.confirm(`确定删除应用:【${row.name}】?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
await getAPI(SysAppApi).apiSysAppDeletePost({ id: row.id });
await handleQuery();
ElMessage.success('删除成功');
})
.catch(() => {});
};
//
const handleSizeChange = async (val: number) => {
state.tableParams.pageSize = val;
await handleQuery();
};
//
const handleCurrentChange = async (val: number) => {
state.tableParams.page = val;
await handleQuery();
};
</script>

View File

@ -1,131 +1,261 @@
<template>
<div>
<el-card shadow="hover" v-loading="state.isLoading">
<el-descriptions title="系统信息配置" :column="2" :border="true">
<el-descriptions title="系统信息配置" :column="2" :border="true" size="default">
<template #title>
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Setting /> </el-icon>
</template>
<el-descriptions-item label="系统图标" :span="2">
<!-- <template #label>
<div class="cell-item">
<el-icon><ele-PictureRounded /></el-icon>
</div>
</template> -->
<el-descriptions-item label="系统图标">
<template #label>
<el-icon><ele-School /></el-icon>
</template>
<el-upload ref="uploadRef" class="avatar-uploader" :showFileList="false" :autoUpload="false" accept=".jpg,.png,.svg" action :limit="1" :onChange="handleUploadChange">
<img v-if="state.formData.sysLogo" :src="state.formData.sysLogo" class="avatar" />
<img v-if="state.sysInfo.logo" :src="state.sysInfo.logo" class="avatar" />
<SvgIcon v-else class="avatar-uploader-icon" name="ele-Plus" :size="28" />
</el-upload>
</el-descriptions-item>
<el-descriptions-item label="租户标识">
<template #label>
<el-icon><ele-User /></el-icon>
</template>
{{ state.sysInfo.tenantId }}
<p>
<el-tag style="border: 1 solid var(--el-border-color)">访问地址{{ host }}/?tenantid={{ state.sysInfo.tenantId }}</el-tag>
</p>
</el-descriptions-item>
<el-descriptions-item label="系统主标题">
<el-input v-model="state.formData.sysTitle" />
<template #label>
<el-icon><ele-Star /></el-icon>
</template>
<el-input v-model="state.sysInfo.title" />
</el-descriptions-item>
<el-descriptions-item label="系统副标题">
<el-input v-model="state.formData.sysViceTitle" />
<template #label>
<el-icon><ele-Star /></el-icon>
</template>
<el-input v-model="state.sysInfo.viceTitle" />
</el-descriptions-item>
<el-descriptions-item label="系统描述" :span="2">
<el-input v-model="state.formData.sysViceDesc" />
<template #label>
<el-icon><ele-Guide /></el-icon>
</template>
<el-input v-model="state.sysInfo.viceDesc" type="textarea" />
</el-descriptions-item>
<el-descriptions-item label="水印内容" :span="2">
<el-input v-model="state.formData.sysWatermark" placeholder="若此处留空,则不显示水印" />
<el-descriptions-item label="水印内容">
<template #label>
<el-icon><ele-Football /></el-icon>
</template>
<el-input v-model="state.sysInfo.watermark" placeholder="若此处留空,则不显示水印" />
</el-descriptions-item>
<el-descriptions-item label="版权说明" :span="2">
<el-input v-model="state.formData.sysCopyright" />
<el-descriptions-item label="版权说明">
<template #label>
<el-icon><ele-Stamp /></el-icon>
</template>
<el-input v-model="state.sysInfo.copyright" />
</el-descriptions-item>
<el-descriptions-item label="版本号">
<template #label>
<el-icon><ele-Clock /></el-icon>
</template>
<el-input v-model="state.sysInfo.version" />
</el-descriptions-item>
<el-descriptions-item label="主题颜色">
<template #label>
<el-icon><ele-Grid /></el-icon>
</template>
<el-input v-model="state.sysInfo.themeColor">
<template #prepend>
<div :style="`background-color: ${state.sysInfo.themeColor}; color: white; width: 100px; height: 100%; margin: -20px; text-align: center;`">{{ state.colorName }}</div>
<!-- <div style="background-color: red; color: white; width: 100px; height: 100%; margin: -20px; text-align: center">{{ state.colorName }}</div> -->
</template>
<template #append>
<el-button type="primary" icon="ele-Grid" @click="state.dialogChineseColorVisible = true" style="display: flex">主题色</el-button>
</template>
</el-input>
</el-descriptions-item>
<el-descriptions-item label="布局模式">
<template #label>
<el-icon><ele-Menu /></el-icon>
</template>
<el-select v-model="state.sysInfo.layout" placeholder="布局模式">
<el-option label="默认布局" value="defaults" />
<el-option label="经典布局" value="classic" />
<el-option label="横向布局" value="transverse" />
<el-option label="分栏布局" value="columns" />
</el-select>
</el-descriptions-item>
<el-descriptions-item label="页面动画">
<template #label>
<el-icon><ele-Position /></el-icon>
</template>
<el-select v-model="state.sysInfo.animation" placeholder="页面动画">
<el-option label="slide-right" value="slide-right"></el-option>
<el-option label="slide-left" value="slide-left"></el-option>
<el-option label="opacitys" value="opacitys"></el-option>
<el-option label="fade" value="fade"></el-option>
<el-option label="fadeUp" value="fadeUp"></el-option>
<el-option label="fadeDown" value="fadeDown"></el-option>
<el-option label="fadeLeft" value="fadeLeft"></el-option>
<el-option label="fadeRight" value="fadeRight"></el-option>
<el-option label="lightSpeedLeft" value="lightSpeedLeft"></el-option>
<el-option label="lightSpeedRight" value="lightSpeedRight"></el-option>
<el-option label="zoom" value="zoom"></el-option>
<el-option label="zoomUp" value="zoomUp"></el-option>
<el-option label="zoomDown" value="zoomDown"></el-option>
<el-option label="zoomLeft" value="zoomLeft"></el-option>
<el-option label="zoomRight" value="zoomRight"></el-option>
<el-option label="flip" value="flip"></el-option>
<el-option label="flipX" value="flipX"></el-option>
<el-option label="flipY" value="flipY"></el-option>
<el-option label="backUp" value="backUp"></el-option>
<el-option label="backDown" value="backDown"></el-option>
<el-option label="backLeft" value="backLeft"></el-option>
<el-option label="backRight" value="backRight"></el-option>
<el-option label="bounce" value="bounce"></el-option>
<el-option label="bounceUp" value="bounceUp"></el-option>
<el-option label="bounceDown" value="bounceDown"></el-option>
<el-option label="bounceLeft" value="bounceLeft"></el-option>
<el-option label="bounceRight" value="bounceRight"></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="ICP备案号">
<el-input v-model="state.formData.sysIcp" />
<template #label>
<el-icon><ele-Share /></el-icon> ICP
</template>
<el-input v-model="state.sysInfo.icp" />
</el-descriptions-item>
<el-descriptions-item label="ICP地址">
<el-input v-model="state.formData.sysIcpUrl" />
<template #label>
<el-icon><ele-Link /></el-icon> ICP
</template>
<el-input v-model="state.sysInfo.icpUrl" />
</el-descriptions-item>
<el-descriptions-item label="图形验证码">
<el-radio-group v-model="state.formData.sysCaptcha">
<template #label>
<el-icon><ele-Unlock /></el-icon>
</template>
<el-radio-group v-model="state.sysInfo.captcha">
<el-radio :value="true">启用</el-radio>
<el-radio :value="false">禁用</el-radio>
</el-radio-group>
</el-descriptions-item>
<el-descriptions-item label="登录二次验证">
<el-radio-group v-model="state.formData.sysSecondVer">
<template #label>
<el-icon><ele-Unlock /></el-icon>
</template>
<el-radio-group v-model="state.sysInfo.secondVer">
<el-radio :value="true">启用</el-radio>
<el-radio :value="false">禁用</el-radio>
</el-radio-group>
</el-descriptions-item>
<el-descriptions-item label="首页轮播图" :rowspan="5">
<template #label>
<el-icon><ele-Picture /></el-icon>
</template>
<el-upload v-model:file-list="carouselFileList" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<el-icon><ele-Plus /></el-icon>
</el-upload>
</el-descriptions-item>
<template #extra>
<el-button type="primary" icon="ele-SuccessFilled" @click="onSave">保存</el-button>
<el-button type="primary" icon="ele-SuccessFilled" @click="saveSysInfo">保存</el-button>
</template>
</el-descriptions>
</el-card>
<el-dialog v-model="state.dialogChineseColorVisible">
<template #header>
<div style="color: #fff">
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-MagicStick /> </el-icon>
<span> 中国传统颜色 </span>
</div>
</template>
<div style="height: 70vh; overflow-y: scroll; overflow-x: hidden">
<el-row :gutter="20">
<el-col :xs="6" :sm="4" :md="4" :lg="4" :xl="3" class="mb15" v-for="i in chineseColors" :key="i" @click="setThemeColor(i)">
<div class="traditionalColors" :style="'background:' + i.hex">
<el-icon class="traditionalColors-circleCheck" v-if="state.sysInfo.themeColor == i.hex" size="20" color="#fff"><ele-CircleCheck /></el-icon>
</div>
<div class="traditionalColors-chines mt10" style="cursor: grab">{{ i.name }}</div>
<div class="traditionalColors-chines" style="cursor: grab; color: gray">{{ i.hex }}</div>
</el-col>
</el-row>
</div>
</el-dialog>
<el-dialog v-model="state.dialogImagePreviewVisible">
<img w-full :src="state.dialogImagePreviewUrl" alt="" />
</el-dialog>
</div>
</template>
<script setup lang="ts" name="sysInfoSetting">
import { nextTick, reactive, ref } from 'vue';
import { ElMessage, UploadInstance } from 'element-plus';
import { nextTick, onMounted, reactive, ref } from 'vue';
import { ElMessage, UploadInstance, UploadProps, UploadUserFile } from 'element-plus';
import { fileToBase64 } from '/@/utils/base64Conver';
import chineseColors from '/@/layout/navBars/topBar/colors.json';
import { getAPI } from '/@/utils/axios-utils';
import { SysConfigApi } from '/@/api-services';
import { SysInfoInput, SysTenantApi } from '/@/api-services';
import loginIconTwo from '/@/assets/login-icon-two.svg';
import loginIconTwo1 from '/@/assets/login-icon-two1.svg';
import loginIconTwo2 from '/@/assets/login-icon-two2.svg';
const host = window.location.host;
const uploadRef = ref<UploadInstance>();
const state = reactive({
isLoading: false,
file: undefined as any,
formData: {
sysLogoBlob: undefined,
sysLogo: '',
sysLogoFileName: '',
sysTitle: '',
sysViceTitle: '',
sysViceDesc: '',
sysWatermark: '',
sysCopyright: '',
sysIcp: '',
sysIcpUrl: '',
sysSecondVer: false,
sysCaptcha: true,
sysInfo: {} as SysInfoInput | any, //
logoFile: undefined as any, // logo
dialogChineseColorVisible: false, //
colorName: '飞燕草蓝', //
dialogImagePreviewVisible: false, //
dialogImagePreviewUrl: '', //
});
//
const carouselFileList = ref<UploadUserFile[]>([
{
name: '1',
url: loginIconTwo,
},
{
name: '2',
url: loginIconTwo1,
},
{
name: '3',
url: loginIconTwo2,
},
]);
//
onMounted(async () => {
await loadSysInfoData();
console.log('系统信息', state.sysInfo);
});
// onChange
const handleUploadChange = (file: any) => {
uploadRef.value!.clearFiles();
state.file = file;
state.formData.sysLogo = URL.createObjectURL(state.file.raw); // logo
state.logoFile = file;
state.sysInfo.logo = URL.createObjectURL(state.logoFile.raw); // logo
};
//
const onSave = async () => {
const saveSysInfo = async () => {
// base64
let sysLogoBase64 = '';
let sysLogoFileName = '';
if (state.file) {
sysLogoBase64 = (await fileToBase64(state.file.raw)) as string;
sysLogoFileName = state.file.raw.name;
if (state.logoFile) {
state.sysInfo.logoBase64 = (await fileToBase64(state.logoFile.raw)) as string;
state.sysInfo.logoFileName = state.logoFile.raw.name;
}
try {
state.isLoading = true;
const res = await getAPI(SysConfigApi).apiSysConfigSaveSysInfoPost({
sysLogoBase64: sysLogoBase64,
sysLogoFileName: sysLogoFileName,
sysTitle: state.formData.sysTitle,
sysViceTitle: state.formData.sysViceTitle,
sysViceDesc: state.formData.sysViceDesc,
sysWatermark: state.formData.sysWatermark,
sysCopyright: state.formData.sysCopyright,
sysIcp: state.formData.sysIcp,
sysIcpUrl: state.formData.sysIcpUrl,
sysSecondVer: state.formData.sysSecondVer,
sysCaptcha: state.formData.sysCaptcha,
});
if (res.data.code !== 200) return;
state.file = undefined;
await getAPI(SysTenantApi).apiSysTenantSaveSysInfoPost(state.sysInfo);
state.logoFile = undefined;
ElMessage.success('保存成功');
//
// window.location.reload();
} finally {
nextTick(() => {
state.isLoading = false;
@ -133,28 +263,14 @@ const onSave = async () => {
}
};
//
const loadData = async () => {
//
const loadSysInfoData = async () => {
try {
state.isLoading = true;
const res = await getAPI(SysConfigApi).apiSysConfigSysInfoGet();
var tenantId = state.sysInfo.tenantId ?? 0;
const res = await getAPI(SysTenantApi).apiSysTenantSysInfoTenantIdGet(tenantId);
if (res.data!.type !== 'success') return;
const result = res.data.result;
state.formData = {
sysLogoBlob: undefined,
sysLogo: result.sysLogo,
sysLogoFileName: '',
sysTitle: result.sysTitle,
sysViceTitle: result.sysViceTitle,
sysViceDesc: result.sysViceDesc,
sysWatermark: result.sysWatermark,
sysCopyright: result.sysCopyright,
sysIcp: result.sysIcp,
sysIcpUrl: result.sysIcpUrl,
sysSecondVer: result.sysSecondVer,
sysCaptcha: result.sysCaptcha,
};
state.sysInfo = res.data.result;
} finally {
nextTick(() => {
state.isLoading = false;
@ -162,7 +278,24 @@ const loadData = async () => {
}
};
loadData();
//
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
console.log(uploadFile, uploadFiles);
};
//
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
state.dialogImagePreviewUrl = uploadFile.url!;
state.dialogImagePreviewVisible = true;
};
//
const setThemeColor = (e: any) => {
navigator.clipboard.writeText(e.hex);
state.sysInfo.themeColor = e.hex;
state.colorName = e.name;
state.dialogChineseColorVisible = false;
};
</script>
<style lang="scss" scoped>
@ -191,4 +324,17 @@ loadData();
height: 100px;
text-align: center;
}
.traditionalColors {
height: 50px;
position: relative;
}
.traditionalColors-chines {
text-align: center;
}
.traditionalColors-circleCheck {
position: absolute;
left: calc(50% - 10px);
top: calc(50% - 10px);
}
</style>