Merge pull request 'main' (#1) from Admin.NET/Admin.NET.Pro:main into main
Reviewed-on: http://101.43.53.74:3000/coolcalf/Admin.NET.Pro/pulls/1
This commit is contained in:
commit
52f4af3d29
@ -17,10 +17,10 @@
|
||||
<PackageReference Include="AngleSharp" Version="1.1.2" />
|
||||
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.1" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.4" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.4" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.5.4" />
|
||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.2" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.5" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.5" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.5.5" />
|
||||
<PackageReference Include="Hardware.Info" Version="100.1.0.1" />
|
||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||
<PackageReference Include="IPTools.International" Version="1.6.0" />
|
||||
@ -36,10 +36,10 @@
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.8" />
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.5.0" />
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.7.0" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.166" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1070" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1075" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -81,6 +81,11 @@ public class ConfigConst
|
||||
/// </summary>
|
||||
public const string SysRegionSyncLevel = "sys_region_sync_level";
|
||||
|
||||
/// <summary>
|
||||
/// Default 分组
|
||||
/// </summary>
|
||||
public const string SysDefaultGroup = "Default";
|
||||
|
||||
/// <summary>
|
||||
/// WebConfig 分组
|
||||
/// </summary>
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成模板配置
|
||||
/// 代码生成模板配置表
|
||||
/// </summary>
|
||||
[SugarTable(null, "代码生成模板配置")]
|
||||
[SugarTable(null, "代码生成模板配置表")]
|
||||
[SysTable]
|
||||
public partial class SysCodeGenTemplate : EntityBase
|
||||
{
|
||||
@ -21,27 +21,29 @@ public partial class SysCodeGenTemplate : EntityBase
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是内置模板(Y-是,N-否)
|
||||
/// 代码生成类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是内置模板")]
|
||||
public CodeGenTypeEnum Type { get; set; }
|
||||
[SugarColumn(ColumnDescription = "代码生成类型")]
|
||||
public CodeGenTypeEnum Type { get; set; } = CodeGenTypeEnum.Backend;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是内置模板(Y-是,N-否)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是内置模板")]
|
||||
public YesNoEnum SysFlag { get; set; }
|
||||
public YesNoEnum SysFlag { get; set; } = YesNoEnum.Y;
|
||||
|
||||
/// <summary>
|
||||
/// 输出位置
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "输出位置", Length = 256)]
|
||||
[Required, MaxLength(256)]
|
||||
public string OutputFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "描述", Length = 200)]
|
||||
[SugarColumn(ColumnDescription = "描述", Length = 256)]
|
||||
[Required, MaxLength(256)]
|
||||
public string Describe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -26,8 +26,8 @@ public class AppEventSubscriber : IEventSubscriber, ISingleton, IDisposable
|
||||
[EventSubscribe(CommonConst.AddExLog)]
|
||||
public async Task CreateExLog(EventHandlerExecutingContext context)
|
||||
{
|
||||
var rep = _serviceScope.ServiceProvider.GetRequiredService<SqlSugarRepository<SysLogEx>>();
|
||||
await rep.InsertAsync((SysLogEx)context.Source.Payload);
|
||||
var db = _serviceScope.ServiceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
await db.CopyNew().Insertable((SysLogEx)context.Source.Payload).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统配置表种子数据
|
||||
/// 代码生成模板配置表种子数据
|
||||
/// </summary>
|
||||
public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemplate>
|
||||
{
|
||||
@ -25,7 +25,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
|
||||
|
||||
new SysCodeGenTemplate{ Id=36036980202001, SysFlag=YesNoEnum.Y, Type=CodeGenTypeEnum.Backend, Name="service_Service.cs.vm", OutputFile="Service/{TableName}/{TableName}Service.cs", Describe ="(服务端)业务"},
|
||||
new SysCodeGenTemplate{ Id=36036980202002, SysFlag=YesNoEnum.Y, Type=CodeGenTypeEnum.Backend, Name="service_InputDto.cs.vm", OutputFile="Service/{TableName}/Dto/{TableName}Input.cs", Describe ="(服务端)输入参数"},
|
||||
new SysCodeGenTemplate{ Id=36036980202003, SysFlag=YesNoEnum.Y, Type=CodeGenTypeEnum.Backend, Name="service_OutputDto.cs.vm", OutputFile="Service/{TableName}/Dto/{TableName}Output.cs", Describe ="(服务端)输出参数"},
|
||||
new SysCodeGenTemplate{ Id=36036980202003, SysFlag=YesNoEnum.Y, Type=CodeGenTypeEnum.Backend, Name="service_OutputDto.cs.vm", OutputFile="Service/{TableName}/Dto/{TableName}Output.cs", Describe ="(服务端)输出参数"},
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -19,28 +19,28 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new SysConfig{ Id=1300000000101, Name="演示环境", Code=ConfigConst.SysDemoEnv, Value="False", SysFlag=YesNoEnum.Y, Remark="演示环境", OrderNo=10, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000111, Name="默认密码", Code=ConfigConst.SysPassword, Value="123456", SysFlag=YesNoEnum.Y, Remark="默认密码", OrderNo=20, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000121, Name="密码最大错误次数", Code=ConfigConst.SysPasswordMaxErrorTimes, Value="5", SysFlag=YesNoEnum.Y, Remark="允许密码最大输入错误次数", OrderNo=30, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000131, Name="日志保留天数", Code=ConfigConst.SysLogRetentionDays, Value="180", SysFlag=YesNoEnum.Y, Remark="日志保留天数(天)", OrderNo=40, GroupCode="Default", 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="Default", 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="Default", 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="WebConfig", 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="WebConfig", 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="Default", 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="Default", 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="Default", 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="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000221, Name="数据校验日志", Code=ConfigConst.SysValidationLog, Value="True", SysFlag=YesNoEnum.Y, Remark="是否数据校验日志", OrderNo=130, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000231, Name="行政区域同步层级", Code=ConfigConst.SysRegionSyncLevel, Value="3", SysFlag=YesNoEnum.Y, Remark="行政区域同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级", OrderNo=140, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000301, Name="系统主标题", Code=ConfigConst.SysWebTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统主标题", OrderNo=300, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000311, Name="系统副标题", Code=ConfigConst.SysWebViceTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统副标题", OrderNo=310, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000321, Name="系统描述", Code=ConfigConst.SysWebViceDesc, Value="站在巨人肩膀上的 .NET 通用权限开发框架", SysFlag=YesNoEnum.Y, Remark="系统描述", OrderNo=320, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000331, Name="水印内容", Code=ConfigConst.SysWebWatermark, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="水印内容", OrderNo=330, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000341, Name="版权说明", Code=ConfigConst.SysWebCopyright, Value="Copyright © 2021-present Admin.NET All rights reserved.", SysFlag=YesNoEnum.Y, Remark="版权说明", OrderNo=340, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000351, Name="系统图标", Code=ConfigConst.SysWebLogo, Value="/upload/logo.png", SysFlag=YesNoEnum.Y, Remark="系统图标", OrderNo=350, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000361, Name="ICP备案号", Code=ConfigConst.SysWebIcp, Value="省ICP备12345678号", SysFlag=YesNoEnum.Y, Remark="ICP备案号", OrderNo=360, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000371, Name="ICP地址", Code=ConfigConst.SysWebIcpUrl, Value="https://beian.miit.gov.cn", SysFlag=YesNoEnum.Y, Remark="ICP地址", OrderNo=370, GroupCode="WebConfig", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000101, Name="演示环境", Code=ConfigConst.SysDemoEnv, Value="False", SysFlag=YesNoEnum.Y, Remark="演示环境", OrderNo=10, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000111, Name="默认密码", Code=ConfigConst.SysPassword, Value="123456", SysFlag=YesNoEnum.Y, Remark="默认密码", OrderNo=20, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000121, Name="密码最大错误次数", Code=ConfigConst.SysPasswordMaxErrorTimes, Value="5", SysFlag=YesNoEnum.Y, Remark="允许密码最大输入错误次数", OrderNo=30, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
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=1300000000221, Name="数据校验日志", Code=ConfigConst.SysValidationLog, Value="True", SysFlag=YesNoEnum.Y, Remark="是否数据校验日志", OrderNo=130, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000231, Name="行政区域同步层级", Code=ConfigConst.SysRegionSyncLevel, Value="3", SysFlag=YesNoEnum.Y, Remark="行政区域同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级", OrderNo=140, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000301, 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=1300000000311, 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=1300000000321, 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=1300000000331, 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=1300000000341, 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=1300000000351, 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=1300000000361, 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=1300000000371, 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") },
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -4,8 +4,6 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Elastic.Clients.Elasticsearch.MachineLearning;
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
@ -137,7 +135,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
|
||||
orderNo += 10; // 每个配置排序间隔10
|
||||
}
|
||||
// 多库代码生成---这里要切回主库
|
||||
var provider = _db.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||
var provider = _db.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||
provider.Insertable(codeGenConfigs).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
||||
var codeGen = input.Adapt<SysCodeGen>();
|
||||
await _db.Updateable(codeGen).ExecuteCommandAsync();
|
||||
|
||||
// 更新配置表
|
||||
// 更新配置表
|
||||
_codeGenConfigService.AddList(GetColumnList(input.Adapt<AddCodeGenInput>()), codeGen);
|
||||
}
|
||||
|
||||
@ -377,13 +377,13 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
||||
if (templateList[i].Type == CodeGenTypeEnum.Frontend)
|
||||
tmpPath = Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.Parent!.FullName, _codeGenOptions.FrontRootPath, "src");
|
||||
else
|
||||
tmpPath = Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.FullName, input.NameSpace);
|
||||
tmpPath = Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.FullName, input.NameSpace);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpPath = templateList[i].Type == CodeGenTypeEnum.Frontend ? Path.Combine(outputPath, _codeGenOptions.FrontRootPath, "src") : Path.Combine(outputPath, input!.NameSpace!);
|
||||
}
|
||||
targetFile = Path.Combine( tmpPath, targetFile);
|
||||
targetFile = Path.Combine(tmpPath, targetFile);
|
||||
|
||||
var dirPath = new DirectoryInfo(targetFile).Parent!.FullName;
|
||||
if (!Directory.Exists(dirPath))
|
||||
|
||||
@ -56,16 +56,18 @@ public class SysConstService : IDynamicApiController, ITransient
|
||||
{
|
||||
var typeList = GetConstAttributeList();
|
||||
var type = typeList.FirstOrDefault(u => u.Name == typeName);
|
||||
|
||||
var isEnum = type.BaseType.Name == "Enum";
|
||||
constlist = type.GetFields()?
|
||||
.Where(isEnum, u => u.FieldType.Name == typeName)
|
||||
.Select(u => new ConstOutput
|
||||
{
|
||||
Name = u.Name,
|
||||
Code = isEnum ? (int)u.GetValue(BindingFlags.Instance) : u.GetValue(BindingFlags.Instance)
|
||||
}).ToList();
|
||||
_sysCacheService.Set(key, constlist);
|
||||
if (type != null)
|
||||
{
|
||||
var isEnum = type.BaseType.Name == "Enum";
|
||||
constlist = type.GetFields()?
|
||||
.Where(isEnum, u => u.FieldType.Name == typeName)
|
||||
.Select(u => new ConstOutput
|
||||
{
|
||||
Name = u.Name,
|
||||
Code = isEnum ? (int)u.GetValue(BindingFlags.Instance) : u.GetValue(BindingFlags.Instance)
|
||||
}).ToList();
|
||||
_sysCacheService.Set(key, constlist);
|
||||
}
|
||||
}
|
||||
return await Task.FromResult(constlist);
|
||||
}
|
||||
|
||||
@ -44,15 +44,4 @@ public class SysLogDiffService : IDynamicApiController, ITransient
|
||||
{
|
||||
return await _sysLogDiffRep.GetFirstAsync(u => u.Id == id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空差异日志 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "Clear"), HttpPost]
|
||||
[DisplayName("清空差异日志")]
|
||||
public void Clear()
|
||||
{
|
||||
_sysLogDiffRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogDiff>();
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ public class PhoneInput
|
||||
/// <summary>
|
||||
/// 手机号码
|
||||
/// </summary>
|
||||
/// <example>13980134216</example>
|
||||
/// <example>13980134216</example>
|
||||
[Required(ErrorMessage = "手机号码不能为空")]
|
||||
[DataValidation(ValidationTypes.PhoneNumber, ErrorMessage = "手机号码不正确")]
|
||||
public string Phone { get; set; }
|
||||
|
||||
@ -13,37 +13,37 @@ public class BaseOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public virtual DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public virtual DateTime UpdateTime { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 创建者Id
|
||||
///// </summary>
|
||||
///// </summary>
|
||||
//public virtual long CreateUserId { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 创建者部门Id
|
||||
///// </summary>
|
||||
///// </summary>
|
||||
//public virtual long CreateOrgId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建者名称
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public virtual string CreateUserName { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 修改者Id
|
||||
///// </summary>
|
||||
///// </summary>
|
||||
//public virtual long UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改者名称
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public virtual string UpdateUserName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@ -84,9 +84,9 @@ public static class ComputerUtil
|
||||
{
|
||||
DiskName = disk[0],
|
||||
TypeName = ShellHelper.Bash("diskutil info " + disk[0] + " | awk '/File System Personality/ {print $4}'").Replace("\n", string.Empty),
|
||||
TotalSize = long.Parse(disk[1]) / 1024,
|
||||
Used = long.Parse(disk[2]) / 1024,
|
||||
AvailableFreeSpace = long.Parse(disk[3]) / 1024,
|
||||
TotalSize = Math.Round(long.Parse(disk[1]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
Used = Math.Round(long.Parse(disk[2]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
AvailableFreeSpace = Math.Round(long.Parse(disk[3]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
AvailablePercent = decimal.Parse(disk[4].Replace("%", ""))
|
||||
};
|
||||
diskInfos.Add(diskInfo);
|
||||
@ -112,9 +112,9 @@ public static class ComputerUtil
|
||||
{
|
||||
DiskName = disk[0],
|
||||
TypeName = disk[1],
|
||||
TotalSize = long.Parse(disk[2]) / 1024,
|
||||
Used = long.Parse(disk[3]) / 1024,
|
||||
AvailableFreeSpace = long.Parse(disk[4]) / 1024,
|
||||
TotalSize = Math.Round(long.Parse(disk[2]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
Used = Math.Round(long.Parse(disk[3]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
AvailableFreeSpace = Math.Round(long.Parse(disk[4]) / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
AvailablePercent = decimal.Parse(disk[5].Replace("%", ""))
|
||||
};
|
||||
diskInfos.Add(diskInfo);
|
||||
@ -130,8 +130,8 @@ public static class ComputerUtil
|
||||
{
|
||||
DiskName = item.Name,
|
||||
TypeName = item.DriveType.ToString(),
|
||||
TotalSize = item.TotalSize / 1024 / 1024 / 1024,
|
||||
AvailableFreeSpace = item.AvailableFreeSpace / 1024 / 1024 / 1024,
|
||||
TotalSize = Math.Round(item.TotalSize / 1024 / 1024 / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
AvailableFreeSpace = Math.Round(item.AvailableFreeSpace / 1024 / 1024 / 1024.0m, 2, MidpointRounding.AwayFromZero),
|
||||
};
|
||||
obj.Used = obj.TotalSize - obj.AvailableFreeSpace;
|
||||
obj.AvailablePercent = decimal.Ceiling(obj.Used / (decimal)obj.TotalSize * 100);
|
||||
@ -294,22 +294,22 @@ public class DiskInfo
|
||||
/// <summary>
|
||||
/// 总剩余
|
||||
/// </summary>
|
||||
public long TotalFree { get; set; }
|
||||
public decimal TotalFree { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总量
|
||||
/// </summary>
|
||||
public long TotalSize { get; set; }
|
||||
public decimal TotalSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已使用
|
||||
/// </summary>
|
||||
public long Used { get; set; }
|
||||
public decimal Used { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 可使用
|
||||
/// </summary>
|
||||
public long AvailableFreeSpace { get; set; }
|
||||
public decimal AvailableFreeSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用百分比
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.08.16",
|
||||
"lastBuildTime": "2024.08.24",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -21,32 +21,32 @@
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue-office/pdf": "^2.0.2",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"@vueuse/core": "^11.0.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
"async-validator": "^4.2.5",
|
||||
"axios": "^1.7.4",
|
||||
"axios": "^1.7.5",
|
||||
"countup.js": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"echarts": "^5.5.1",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.8.0",
|
||||
"element-plus": "^2.8.1",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit": "^1.0.0",
|
||||
"ezuikit-js": "^8.0.9",
|
||||
"ezuikit-js": "^8.0.11",
|
||||
"gcoord": "^1.0.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-table2excel": "^1.1.2",
|
||||
"jsplumb": "^2.15.6",
|
||||
"lodash-es": "^4.17.21",
|
||||
"md-editor-v3": "^4.18.1",
|
||||
"md-editor-v3": "^4.19.1",
|
||||
"mitt": "^3.0.1",
|
||||
"monaco-editor": "^0.50.0",
|
||||
"monaco-editor": "^0.51.0",
|
||||
"mqtt": "^4.3.8",
|
||||
"nprogress": "^0.2.0",
|
||||
"ol": "^10.0.0",
|
||||
"ol": "^10.1.0",
|
||||
"pinia": "^2.2.2",
|
||||
"print-js": "^1.6.0",
|
||||
"push.js": "^1.0.12",
|
||||
@ -64,13 +64,13 @@
|
||||
"vue-demi": "0.14.6",
|
||||
"vue-draggable-plus": "^0.5.3",
|
||||
"vue-grid-layout": "3.0.0-beta1",
|
||||
"vue-i18n": "^9.13.1",
|
||||
"vue-i18n": "^9.14.0",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-plugin-hiprint": "0.0.57-beta28",
|
||||
"vue-router": "^4.4.3",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.0.96",
|
||||
"vxe-pc-ui": "^4.1.5",
|
||||
"vxe-table": "^4.7.59",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.5",
|
||||
@ -84,13 +84,13 @@
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
||||
"@typescript-eslint/parser": "^8.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
||||
"@typescript-eslint/parser": "^8.2.0",
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"@vue/compiler-sfc": "^3.4.38",
|
||||
"code-inspector-plugin": "^0.15.2",
|
||||
"eslint": "^9.9.0",
|
||||
"eslint": "^9.9.1",
|
||||
"eslint-plugin-vue": "^9.27.0",
|
||||
"globals": "^15.8.0",
|
||||
"less": "^4.2.0",
|
||||
@ -99,7 +99,7 @@
|
||||
"sass": "^1.77.8",
|
||||
"terser": "^5.31.6",
|
||||
"typescript": "^5.5.4",
|
||||
"vite": "^5.4.1",
|
||||
"vite": "^5.4.2",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression2": "^1.2.0",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
|
||||
@ -423,7 +423,7 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 代码生成到本地 🔖
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -688,7 +688,7 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 代码生成到本地 🔖
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -818,7 +818,7 @@ export const SysCodeGenApiFactory = function (configuration?: Configuration, bas
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 代码生成到本地 🔖
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -945,7 +945,7 @@ export class SysCodeGenApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 代码生成到本地 🔖
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -26,49 +26,6 @@ import { PageLogInput } from '../models';
|
||||
*/
|
||||
export const SysLogDiffApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 清空差异日志 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysLogDiffClearPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysLogDiff/clear`;
|
||||
// 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;
|
||||
}
|
||||
|
||||
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 获取差异日志详情 🔖
|
||||
@ -175,19 +132,6 @@ export const SysLogDiffApiAxiosParamCreator = function (configuration?: Configur
|
||||
*/
|
||||
export const SysLogDiffApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 清空差异日志 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysLogDiffClearPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysLogDiffApiAxiosParamCreator(configuration).apiSysLogDiffClearPost(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取差异日志详情 🔖
|
||||
@ -225,15 +169,6 @@ export const SysLogDiffApiFp = function(configuration?: Configuration) {
|
||||
*/
|
||||
export const SysLogDiffApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 清空差异日志 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysLogDiffClearPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysLogDiffApiFp(configuration).apiSysLogDiffClearPost(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取差异日志详情 🔖
|
||||
@ -264,16 +199,6 @@ export const SysLogDiffApiFactory = function (configuration?: Configuration, bas
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class SysLogDiffApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 清空差异日志 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysLogDiffApi
|
||||
*/
|
||||
public async apiSysLogDiffClearPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysLogDiffApiFp(this.configuration).apiSysLogDiffClearPost(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取差异日志详情 🔖
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="库类型" prop="dbType" :rules="[{ required: true, message: '描述不能为空', trigger: 'blur' }]">
|
||||
<el-select v-model="state.ruleForm.dbType" placeholder="数据库类型" clearable disabled class="w100">
|
||||
<el-select v-model="state.ruleForm.dbType" placeholder="数据库类型" filterable clearable disabled class="w100">
|
||||
<el-option label="MySql" :value="'0'" />
|
||||
<el-option label="SqlServer" :value="'1'" />
|
||||
<el-option label="Sqlite" :value="'2'" />
|
||||
|
||||
@ -25,14 +25,14 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="显示字段" prop="columnName">
|
||||
<el-select v-model="state.ruleForm.columnName" class="w100">
|
||||
<el-select v-model="state.ruleForm.columnName" filterable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' [' + item.columnComment + ']'" :value="item.columnName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="链接字段" prop="linkColumnName">
|
||||
<el-select v-model="state.ruleForm.linkColumnName" class="w100">
|
||||
<el-select v-model="state.ruleForm.linkColumnName" filterable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' [' + item.columnComment + ']'" :value="item.columnName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<el-table-column prop="effectType" label="作用类型" width="140" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<div class="effect-type-container">
|
||||
<el-select v-model="scope.row.effectType" class="m-2" placeholder="Select" :disabled="judgeColumns(scope.row)" @change="effectTypeChange(scope.row, scope.$index)">
|
||||
<el-select v-model="scope.row.effectType" class="m-2" placeholder="Select" :disabled="judgeColumns(scope.row)" @change="effectTypeChange(scope.row, scope.$index)" filterable>
|
||||
<el-option v-for="item in state.effectTypeList" :key="item.code" :label="item.value" :value="item.code" />
|
||||
</el-select>
|
||||
<el-button
|
||||
@ -35,7 +35,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictTypeCode" label="字典" width="180" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.dictTypeCode" class="m-2" :disabled="effectTypeEnable(scope.row)">
|
||||
<el-select v-model="scope.row.dictTypeCode" class="m-2" :disabled="effectTypeEnable(scope.row)" filterable>
|
||||
<el-option v-for="item in state.dictTypeCodeList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</template>
|
||||
@ -68,7 +68,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="queryType" label="查询方式" min-width="120" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.queryType" class="m-2" placeholder="Select" :disabled="!scope.row.queryWhether">
|
||||
<el-select v-model="scope.row.queryType" class="m-2" placeholder="Select" :disabled="!scope.row.queryWhether" filterable>
|
||||
<el-option v-for="item in state.queryTypeList" :key="item.code" :label="item.value" :value="item.code" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="sysPreviewCode">
|
||||
import { reactive, ref, nextTick, toRaw } from 'vue';
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
import * as monaco from 'monaco-editor';
|
||||
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
|
||||
import commonFunction from '/@/utils/commonFunction';
|
||||
@ -111,7 +111,7 @@ const cancel = () => {
|
||||
state.isShowDialog = false;
|
||||
};
|
||||
|
||||
//复制代码
|
||||
// 复制代码
|
||||
const handleCopy = () => {
|
||||
copyText(state.codes[state.current]);
|
||||
};
|
||||
|
||||
@ -18,28 +18,28 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="数据库表" prop="tableName">
|
||||
<el-select v-model="state.ruleForm.tableName" class="w100" filterable clearable @change="TableChanged()">
|
||||
<el-select v-model="state.ruleForm.tableName" filterable clearable @change="TableChanged()" class="w100">
|
||||
<el-option v-for="item in state.tableData" :key="item.entityName" :label="item.tableName + ' [' + item.tableComment + ']'" :value="item.tableName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="显示字段" prop="displayColumn">
|
||||
<el-select v-model="state.ruleForm.displayColumn" class="w100">
|
||||
<el-select v-model="state.ruleForm.displayColumn" filterable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' [' + item.columnComment + ']'" :value="item.columnName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="选择值字段" prop="valueColumn">
|
||||
<el-select v-model="state.ruleForm.valueColumn" class="w100">
|
||||
<el-select v-model="state.ruleForm.valueColumn" filterable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' [' + item.columnComment + ']'" :value="item.columnName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="父级字段" prop="pidColumn">
|
||||
<el-select v-model="state.ruleForm.pidColumn" class="w100">
|
||||
<el-select v-model="state.ruleForm.pidColumn" filterable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' [' + item.columnComment + ']'" :value="item.columnName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -115,6 +115,9 @@
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysDictType/delete'" @click="handleDeleteDictData(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="复制">
|
||||
<el-button icon="ele-CopyDocument" text type="primary" v-auth="'sysDictType/add'" @click="openCopyDictData(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -140,7 +143,7 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysDictTypeApi, SysDictDataApi } from '/@/api-services/api';
|
||||
import { SysDictType, PageDictTypeInput, SysDictData, PageDictDataInput } from '/@/api-services/models';
|
||||
import { SysDictType, PageDictTypeInput, SysDictData, PageDictDataInput, UpdateDictDataInput } from '/@/api-services/models';
|
||||
|
||||
const xGridDictType = ref<VxeGridInstance>();
|
||||
const xGridDictData = ref<VxeGridInstance>();
|
||||
@ -287,7 +290,7 @@ const optionsDictData = useVxeTable<SysDictData>(
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'status', title: '状态', width: 80, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ title: '操作', fixed: 'right', width: 120, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
@ -344,6 +347,14 @@ const handleEditDictData = (row: any) => {
|
||||
editRefDictData.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开复制字典值页面
|
||||
const openCopyDictData = (row: any) => {
|
||||
state.title = '复制字典值';
|
||||
var copyRow = JSON.parse(JSON.stringify(row)) as UpdateDictDataInput;
|
||||
copyRow.id = 0;
|
||||
editRefDictData.value?.openDialog(copyRow);
|
||||
};
|
||||
|
||||
// 删除字典值
|
||||
const handleDeleteDictData = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除字典值:【${row.value}】?`, '提示', {
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysLogDiff/clear'"> 清空 </el-button>
|
||||
</template>
|
||||
<template #toolbar_buttons> </template>
|
||||
<template #toolbar_tools>
|
||||
<vxe-button circle icon="vxe-icon-upload" name="导入" code="showImport" class="mr12" />
|
||||
</template>
|
||||
@ -85,7 +83,6 @@
|
||||
|
||||
<script lang="ts" setup name="sysLogDiff">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { useDateTimeShortCust } from '/@/hooks/dateTimeShortCust';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -196,15 +193,6 @@ const gridEvents: VxeGridListeners<SysLogDiff> = {
|
||||
},
|
||||
};
|
||||
|
||||
// 清空日志
|
||||
const handleClear = async () => {
|
||||
options.loading = true;
|
||||
await getAPI(SysLogDiffApi).apiSysLogDiffClearPost();
|
||||
options.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
// 查看详情
|
||||
const handleView = async ({ row }: any) => {
|
||||
const { data } = await getAPI(SysLogDiffApi).apiSysLogDiffDetailIdGet(row.id);
|
||||
|
||||
@ -62,12 +62,9 @@
|
||||
<ModifyRecord :data="row" />
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button icon="ele-Edit" text type="primary" v-auth="'sysMenu/update'" @click="handleEdit(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysMenu/delete'" @click="handleDelete(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-button icon="ele-Edit" text type="primary" v-auth="'sysMenu/update'" @click="handleEdit(row)"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysMenu/delete'" @click="handleDelete(row)"> 删除 </el-button>
|
||||
<el-button icon="ele-CopyDocument" text type="primary" v-auth="'sysMenu/add'" @click="openCopyMenu(row)"> 复制 </el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -88,7 +85,7 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysMenuApi } from '/@/api-services/api';
|
||||
import { SysMenu } from '/@/api-services/models';
|
||||
import { SysMenu, UpdateMenuInput } from '/@/api-services/models';
|
||||
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editMenuRef = ref<InstanceType<typeof EditMenu>>();
|
||||
@ -117,7 +114,7 @@ const options = useVxeTable<SysMenu>(
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'status', title: '状态', width: 100, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ title: '操作', fixed: 'right', width: 210, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
@ -170,6 +167,15 @@ const handleEdit = (row: any) => {
|
||||
editMenuRef.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开复制页面
|
||||
const openCopyMenu = (row: any) => {
|
||||
state.title = '复制菜单';
|
||||
var copyRow = JSON.parse(JSON.stringify(row)) as UpdateMenuInput;
|
||||
copyRow.id = 0;
|
||||
copyRow.title = '';
|
||||
editMenuRef.value?.openDialog(copyRow);
|
||||
};
|
||||
|
||||
// 删除当前行
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除菜单:【${row.title}】?`, '提示', {
|
||||
|
||||
@ -61,12 +61,9 @@
|
||||
<ModifyRecord :data="row" />
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button icon="ele-Edit" size="small" text type="primary" @click="handleEdit(row)" v-auth="'sysOrg/update'"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" size="small" text type="danger" @click="handleDelete(row)" v-auth="'sysOrg/delete'"></el-button>
|
||||
</el-tooltip>
|
||||
<el-button icon="ele-Edit" text type="primary" @click="handleEdit(row)" v-auth="'sysOrg/update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" text type="danger" @click="handleDelete(row)" v-auth="'sysOrg/delete'"> 删除 </el-button>
|
||||
<el-button icon="ele-CopyDocument" text type="primary" @click="openCopyOrg(row)" v-auth="'sysOrg/add'"> 复制 </el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -91,7 +88,7 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysDictDataApi, SysOrgApi } from '/@/api-services';
|
||||
import { SysOrg } from '/@/api-services/models';
|
||||
import { SysOrg, UpdateOrgInput } from '/@/api-services/models';
|
||||
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editOrgRef = ref<InstanceType<typeof EditOrg>>();
|
||||
@ -123,7 +120,7 @@ const options = useVxeTable<SysOrg>(
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'status', title: '状态', width: 80, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ title: '操作', fixed: 'right', width: 210, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
@ -195,6 +192,15 @@ const handleEdit = (row: any) => {
|
||||
editOrgRef.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开复制页面
|
||||
const openCopyOrg = (row: any) => {
|
||||
state.title = '复制机构';
|
||||
var copyRow = JSON.parse(JSON.stringify(row)) as UpdateOrgInput;
|
||||
copyRow.id = 0;
|
||||
copyRow.name = '';
|
||||
editOrgRef.value?.openDialog(copyRow);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除机构:【${row.name}】?`, '提示', {
|
||||
|
||||
@ -45,12 +45,9 @@
|
||||
<ModifyRecord :data="row" />
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button icon="ele-Edit" text type="primary" v-auth="'sysPos/update'" @click="handleEdit(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysPos/delete'" @click="handleDelete(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-button icon="ele-Edit" text type="primary" v-auth="'sysPos/update'" @click="handleEdit(row)"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysPos/delete'" @click="handleDelete(row)"> 删除 </el-button>
|
||||
<el-button icon="ele-CopyDocument" text type="primary" v-auth="'sysPos/add'" @click="openCopyMenu(row)"> 复制 </el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -71,7 +68,7 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysPosApi } from '/@/api-services/api';
|
||||
import { PagePosOutput, PagePosInput } from '/@/api-services/models';
|
||||
import { PagePosOutput, PagePosInput, UpdatePosInput } from '/@/api-services/models';
|
||||
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editPosRef = ref<InstanceType<typeof EditPos>>();
|
||||
@ -103,7 +100,7 @@ const options = useVxeTable<PagePosOutput>(
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'status', title: '状态', width: 80, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ title: '操作', fixed: 'right', width: 210, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
@ -157,6 +154,15 @@ const handleEdit = (row: any) => {
|
||||
editPosRef.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开复制页面
|
||||
const openCopyMenu = (row: any) => {
|
||||
state.title = '复制职位';
|
||||
var copyRow = JSON.parse(JSON.stringify(row)) as UpdatePosInput;
|
||||
copyRow.id = 0;
|
||||
copyRow.name = '';
|
||||
editPosRef.value?.openDialog(copyRow);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除职位:【${row.name}】?`, '提示', {
|
||||
|
||||
@ -80,6 +80,9 @@
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysUser/delete'" @click="handleDelete(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="复制" placement="top">
|
||||
<el-button icon="ele-CopyDocument" text type="primary" v-auth="'sysUser/add'" @click="openCopyMenu(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-button icon="ele-RefreshLeft" text type="danger" v-auth="'sysUser/resetPwd'" @click="resetQueryPwd(row)">重置密码</el-button>
|
||||
<el-button icon="ele-Unlock" text type="primary" v-auth="'sysUser/unlockLogin'" @click="handleUnlock(row)">解除锁定</el-button>
|
||||
</template>
|
||||
@ -108,10 +111,10 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysUserApi, SysOrgApi } from '/@/api-services/api';
|
||||
import { SysOrg, PageTenantInput, UserOutput } from '/@/api-services/models';
|
||||
import { SysOrg, PageTenantInput, UserOutput, UpdateUserInput } from '/@/api-services/models';
|
||||
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const treeRef = ref<InstanceType<typeof OrgTree>>();
|
||||
// const treeRef = ref<InstanceType<typeof OrgTree>>();
|
||||
const editUserRef = ref<InstanceType<typeof EditUser>>();
|
||||
const state = reactive({
|
||||
treeData: [] as Array<SysOrg>,
|
||||
@ -154,7 +157,7 @@ const options = useVxeTable<UserOutput>(
|
||||
{ field: 'status', title: '状态', width: 80, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip' },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 280, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ title: '操作', fixed: 'right', width: 300, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
@ -222,6 +225,15 @@ const handleEdit = (row: any) => {
|
||||
editUserRef.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开复制页面
|
||||
const openCopyMenu = (row: any) => {
|
||||
state.title = '复制账号';
|
||||
var copyRow = JSON.parse(JSON.stringify(row)) as UpdateUserInput;
|
||||
copyRow.id = 0;
|
||||
copyRow.account = '';
|
||||
editUserRef.value?.openDialog(copyRow);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除账号:【${row.account}】?`, '提示', {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user