😎1、将密匙配置移到库参数配置里面 2、升级依赖
This commit is contained in:
parent
2f039f2865
commit
a8963c40e9
@ -53,11 +53,8 @@
|
|||||||
},
|
},
|
||||||
// 密码策略
|
// 密码策略
|
||||||
"Cryptogram": {
|
"Cryptogram": {
|
||||||
"StrongPassword": false, // 是否开启密码强度验证
|
|
||||||
"PasswordStrengthValidation": "(?=^.{6,16}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", // 密码强度验证正则表达式,必须须包含大小写字母、数字和特殊字符的组合,长度在6-16之间
|
|
||||||
"PasswordStrengthValidationMsg": "密码必须包含大小写字母、数字和特殊字符的组合,长度在6-16之间", // 密码强度验证消息提示
|
|
||||||
"CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4
|
"CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4
|
||||||
// 新业务系统记得改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取。前端公钥配置:VITE_SM_PUBLIC_KEY,前后端必须保持一致,数据库建好后密匙也就固定了。
|
// 新业务系统记得改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取
|
||||||
"PublicKey": "04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9", // 公钥
|
"PublicKey": "04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9", // 公钥
|
||||||
"PrivateKey": "3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A" // 私钥
|
"PrivateKey": "3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A" // 私钥
|
||||||
}
|
}
|
||||||
|
|||||||
@ -296,11 +296,12 @@ public class AppAuthService : IDynamicApiController, ITransient
|
|||||||
throw Oops.Oh(ErrorCodeEnum.D1028);
|
throw Oops.Oh(ErrorCodeEnum.D1028);
|
||||||
|
|
||||||
// 验证密码强度
|
// 验证密码强度
|
||||||
if (CryptogramUtil.StrongPassword)
|
if (await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysPasswordStrength))
|
||||||
{
|
{
|
||||||
user.Password = input.PasswordNew.TryValidate(CryptogramUtil.PasswordStrengthValidation)
|
var sysConfig = await _sysConfigService.GetConfig(ConfigConst.SysPasswordStrengthExpression);
|
||||||
|
user.Password = input.PasswordNew.TryValidate(sysConfig.Value)
|
||||||
? CryptogramUtil.Encrypt(input.PasswordNew)
|
? CryptogramUtil.Encrypt(input.PasswordNew)
|
||||||
: throw Oops.Oh(CryptogramUtil.PasswordStrengthValidationMsg);
|
: throw Oops.Oh(sysConfig.Remark);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -91,6 +91,16 @@ public class ConfigConst
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string SysSM2Key = "sys_sm2_key";
|
public const string SysSM2Key = "sys_sm2_key";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开启密码强度验证
|
||||||
|
/// </summary>
|
||||||
|
public const string SysPasswordStrength = "sys_password_strength";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码强度验证正则表达式
|
||||||
|
/// </summary>
|
||||||
|
public const string SysPasswordStrengthExpression = "sys_password_strength_expression";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default 分组
|
/// Default 分组
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -38,15 +38,13 @@ public class DatabaseLoggingWriter : IDatabaseLoggingWriter, IDisposable
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 获取第二行
|
var targetLine = logText.Split('\n')[1]; // 获取第二行
|
||||||
var targetLine = logText.Split('\n')[1];
|
var parts = targetLine.Split('.'); // 按点号分割字符串
|
||||||
// 按点号分割字符串
|
|
||||||
var parts = targetLine.Split('.');
|
|
||||||
// 获取最后两个部分
|
// 获取最后两个部分
|
||||||
if (parts.Length >= 2)
|
if (parts.Length >= 2)
|
||||||
{
|
{
|
||||||
var actionName = parts[^1].Split('(')[0].Trim(); // 去除方法参数部分
|
var actionName = parts[^1].Split('(')[0].Trim(); // 移除方法参数部分
|
||||||
var controllerName = parts[^2].Trim(); // 获取Controller名称
|
var controllerName = parts[^2].Trim(); // 获取Controller名称
|
||||||
return (actionName, controllerName);
|
return (actionName, controllerName);
|
||||||
}
|
}
|
||||||
return (string.Empty, string.Empty);
|
return (string.Empty, string.Empty);
|
||||||
|
|||||||
@ -34,16 +34,19 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
|
|||||||
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=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=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=1300000000241, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
new SysConfig{ Id=1300000000241, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", 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=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.SysPasswordStrength, Value="False", 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.SysPasswordStrengthExpression, Value="(?=^.{6,16}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", SysFlag=YesNoEnum.Y, Remark="必须须包含大小写字母、数字和特殊字符的组合,长度在6-16之间", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 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=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=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=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=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=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=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=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=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=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=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=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=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=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=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") },
|
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") },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7,8 +7,6 @@
|
|||||||
using Hardware.Info;
|
using Hardware.Info;
|
||||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||||
using Org.BouncyCastle.Crypto.Parameters;
|
|
||||||
using Org.BouncyCastle.Utilities.Encoders;
|
|
||||||
|
|
||||||
namespace Admin.NET.Core.Service;
|
namespace Admin.NET.Core.Service;
|
||||||
|
|
||||||
@ -36,15 +34,7 @@ public class SysCommonService : IDynamicApiController, ITransient
|
|||||||
[DisplayName("获取国密公钥私钥对")]
|
[DisplayName("获取国密公钥私钥对")]
|
||||||
public SmKeyPairOutput GetSmKeyPair()
|
public SmKeyPairOutput GetSmKeyPair()
|
||||||
{
|
{
|
||||||
var kp = GM.GenerateKeyPair();
|
return CryptogramUtil.GetSmKeyPair();
|
||||||
var privateKey = Hex.ToHexString(((ECPrivateKeyParameters)kp.Private).D.ToByteArray()).ToUpper();
|
|
||||||
var publicKey = Hex.ToHexString(((ECPublicKeyParameters)kp.Public).Q.GetEncoded()).ToUpper();
|
|
||||||
|
|
||||||
return new SmKeyPairOutput
|
|
||||||
{
|
|
||||||
PrivateKey = privateKey,
|
|
||||||
PublicKey = publicKey,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -74,12 +74,25 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[ApiDescriptionSettings(Name = "Update"), HttpPost]
|
[ApiDescriptionSettings(Name = "Update"), HttpPost]
|
||||||
[DisplayName("更新参数配置")]
|
[DisplayName("更新参数配置")]
|
||||||
|
[UnitOfWork]
|
||||||
public async Task UpdateConfig(UpdateConfigInput input)
|
public async Task UpdateConfig(UpdateConfigInput input)
|
||||||
{
|
{
|
||||||
var isExist = await _sysConfigRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id);
|
var isExist = await _sysConfigRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id);
|
||||||
if (isExist)
|
if (isExist)
|
||||||
throw Oops.Oh(ErrorCodeEnum.D9000);
|
throw Oops.Oh(ErrorCodeEnum.D9000);
|
||||||
|
|
||||||
|
//// 若修改国密SM2密匙则密码重新加密
|
||||||
|
//if (input.Code == ConfigConst.SysSM2Key && CryptogramUtil.CryptoType == CryptogramEnum.SM2.ToString())
|
||||||
|
//{
|
||||||
|
// var sysUserRep = _sysConfigRep.ChangeRepository<SqlSugarRepository<SysUser>>();
|
||||||
|
// var sysUsers = await sysUserRep.AsQueryable().Select(u => new { u.Id, u.Password }).ToListAsync();
|
||||||
|
// foreach(var user in sysUsers)
|
||||||
|
// {
|
||||||
|
// user.Password = CryptogramUtil.Encrypt(CryptogramUtil.Decrypt(user.Password));
|
||||||
|
// }
|
||||||
|
// await sysUserRep.AsUpdateable(sysUsers).UpdateColumns(u => new { u.Password }).ExecuteCommandAsync();
|
||||||
|
//}
|
||||||
|
|
||||||
var config = input.Adapt<SysConfig>();
|
var config = input.Adapt<SysConfig>();
|
||||||
await _sysConfigRep.AsUpdateable(config).IgnoreColumns(true).ExecuteCommandAsync();
|
await _sysConfigRep.AsUpdateable(config).IgnoreColumns(true).ExecuteCommandAsync();
|
||||||
|
|
||||||
@ -136,6 +149,17 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|||||||
return await _sysConfigRep.GetByIdAsync(input.Id);
|
return await _sysConfigRep.GetByIdAsync(input.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据Code获取参数配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonAction]
|
||||||
|
public async Task<SysConfig> GetConfig(string code)
|
||||||
|
{
|
||||||
|
return await _sysConfigRep.GetFirstAsync(u => u.Code == code);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据Code获取参数配置值 🔖
|
/// 根据Code获取参数配置值 🔖
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -330,11 +330,12 @@ public class SysUserService : IDynamicApiController, ITransient
|
|||||||
throw Oops.Oh(ErrorCodeEnum.D1028);
|
throw Oops.Oh(ErrorCodeEnum.D1028);
|
||||||
|
|
||||||
// 验证密码强度
|
// 验证密码强度
|
||||||
if (CryptogramUtil.StrongPassword)
|
if (await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysPasswordStrength))
|
||||||
{
|
{
|
||||||
user.Password = input.PasswordNew.TryValidate(CryptogramUtil.PasswordStrengthValidation)
|
var sysConfig = await _sysConfigService.GetConfig(ConfigConst.SysPasswordStrengthExpression);
|
||||||
|
user.Password = input.PasswordNew.TryValidate(sysConfig.Value)
|
||||||
? CryptogramUtil.Encrypt(input.PasswordNew)
|
? CryptogramUtil.Encrypt(input.PasswordNew)
|
||||||
: throw Oops.Oh(CryptogramUtil.PasswordStrengthValidationMsg);
|
: throw Oops.Oh(sysConfig.Remark);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
//
|
//
|
||||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Org.BouncyCastle.Crypto.Parameters;
|
||||||
|
using Org.BouncyCastle.Utilities.Encoders;
|
||||||
|
|
||||||
namespace Admin.NET.Core;
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
public class CryptogramUtil
|
public class CryptogramUtil
|
||||||
{
|
{
|
||||||
public static readonly bool StrongPassword = App.GetConfig<bool>("Cryptogram:StrongPassword"); // 是否开启密码强度验证
|
|
||||||
public static readonly string PasswordStrengthValidation = App.GetConfig<string>("Cryptogram:PasswordStrengthValidation"); // 密码强度验证正则表达式
|
|
||||||
public static readonly string PasswordStrengthValidationMsg = App.GetConfig<string>("Cryptogram:PasswordStrengthValidationMsg"); // 密码强度验证提示
|
|
||||||
public static readonly string CryptoType = App.GetConfig<string>("Cryptogram:CryptoType"); // 加密类型
|
public static readonly string CryptoType = App.GetConfig<string>("Cryptogram:CryptoType"); // 加密类型
|
||||||
public static readonly string PublicKey = App.GetConfig<string>("Cryptogram:PublicKey"); // 公钥
|
public static readonly string PublicKey = App.GetConfig<string>("Cryptogram:PublicKey"); // 公钥
|
||||||
public static readonly string PrivateKey = App.GetConfig<string>("Cryptogram:PrivateKey"); // 私钥
|
public static readonly string PrivateKey = App.GetConfig<string>("Cryptogram:PrivateKey"); // 私钥
|
||||||
@ -18,6 +18,23 @@ public class CryptogramUtil
|
|||||||
public static readonly string SM4_key = "0123456789abcdeffedcba9876543210";
|
public static readonly string SM4_key = "0123456789abcdeffedcba9876543210";
|
||||||
public static readonly string SM4_iv = "595298c7c6fd271f0402f804c33d3f66";
|
public static readonly string SM4_iv = "595298c7c6fd271f0402f804c33d3f66";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取国密公钥私钥对
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static SmKeyPairOutput GetSmKeyPair()
|
||||||
|
{
|
||||||
|
var kp = GM.GenerateKeyPair();
|
||||||
|
var privateKey = Hex.ToHexString(((ECPrivateKeyParameters)kp.Private).D.ToByteArray()).ToUpper();
|
||||||
|
var publicKey = Hex.ToHexString(((ECPublicKeyParameters)kp.Public).Q.GetEncoded()).ToUpper();
|
||||||
|
|
||||||
|
return new SmKeyPairOutput
|
||||||
|
{
|
||||||
|
PrivateKey = privateKey,
|
||||||
|
PublicKey = publicKey,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加密
|
/// 加密
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "admin.net.pro",
|
"name": "admin.net.pro",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.4.33",
|
"version": "2.4.33",
|
||||||
"lastBuildTime": "2024.11.20",
|
"lastBuildTime": "2024.11.21",
|
||||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||||
"author": "zuohuaijun",
|
"author": "zuohuaijun",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"@vue-office/docx": "^1.6.2",
|
"@vue-office/docx": "^1.6.2",
|
||||||
"@vue-office/excel": "^1.7.11",
|
"@vue-office/excel": "^1.7.11",
|
||||||
"@vue-office/pdf": "^2.0.9",
|
"@vue-office/pdf": "^2.0.9",
|
||||||
"@vueuse/core": "^11.2.0",
|
"@vueuse/core": "^11.3.0",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
|
|||||||
@ -270,6 +270,104 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura
|
|||||||
options: localVarRequestOptions,
|
options: localVarRequestOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2解密字符串 🔖
|
||||||
|
* @param {string} cipherText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysCommonSM2DecryptCipherTextPost: async (cipherText: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'cipherText' is not null or undefined
|
||||||
|
if (cipherText === null || cipherText === undefined) {
|
||||||
|
throw new RequiredError('cipherText','Required parameter cipherText was null or undefined when calling apiSysCommonSM2DecryptCipherTextPost.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/sysCommon/sM2Decrypt/{cipherText}`
|
||||||
|
.replace(`{${"cipherText"}}`, encodeURIComponent(String(cipherText)));
|
||||||
|
// 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 国密SM2加密字符串 🔖
|
||||||
|
* @param {string} plainText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysCommonSM2EncryptPlainTextPost: async (plainText: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'plainText' is not null or undefined
|
||||||
|
if (plainText === null || plainText === undefined) {
|
||||||
|
throw new RequiredError('plainText','Required parameter plainText was null or undefined when calling apiSysCommonSM2EncryptPlainTextPost.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/sysCommon/sM2Encrypt/{plainText}`
|
||||||
|
.replace(`{${"plainText"}}`, encodeURIComponent(String(plainText)));
|
||||||
|
// 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 获取国密公钥私钥对 🏆
|
* @summary 获取国密公钥私钥对 🏆
|
||||||
@ -392,6 +490,34 @@ export const SysCommonApiFp = function(configuration?: Configuration) {
|
|||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2解密字符串 🔖
|
||||||
|
* @param {string} cipherText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysCommonSM2DecryptCipherTextPost(cipherText: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
|
||||||
|
const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonSM2DecryptCipherTextPost(cipherText, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2加密字符串 🔖
|
||||||
|
* @param {string} plainText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysCommonSM2EncryptPlainTextPost(plainText: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
|
||||||
|
const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonSM2EncryptPlainTextPost(plainText, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取国密公钥私钥对 🏆
|
* @summary 获取国密公钥私钥对 🏆
|
||||||
@ -464,6 +590,26 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base
|
|||||||
async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
||||||
return SysCommonApiFp(configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(axios, basePath));
|
return SysCommonApiFp(configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2解密字符串 🔖
|
||||||
|
* @param {string} cipherText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysCommonSM2DecryptCipherTextPost(cipherText: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysCommonApiFp(configuration).apiSysCommonSM2DecryptCipherTextPost(cipherText, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2加密字符串 🔖
|
||||||
|
* @param {string} plainText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysCommonSM2EncryptPlainTextPost(plainText: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysCommonApiFp(configuration).apiSysCommonSM2EncryptPlainTextPost(plainText, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取国密公钥私钥对 🏆
|
* @summary 获取国密公钥私钥对 🏆
|
||||||
@ -538,6 +684,28 @@ export class SysCommonApi extends BaseAPI {
|
|||||||
public async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
public async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
||||||
return SysCommonApiFp(this.configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(this.axios, this.basePath));
|
return SysCommonApiFp(this.configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2解密字符串 🔖
|
||||||
|
* @param {string} cipherText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysCommonApi
|
||||||
|
*/
|
||||||
|
public async apiSysCommonSM2DecryptCipherTextPost(cipherText: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysCommonApiFp(this.configuration).apiSysCommonSM2DecryptCipherTextPost(cipherText, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 国密SM2加密字符串 🔖
|
||||||
|
* @param {string} plainText
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysCommonApi
|
||||||
|
*/
|
||||||
|
public async apiSysCommonSM2EncryptPlainTextPost(plainText: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysCommonApiFp(this.configuration).apiSysCommonSM2EncryptPlainTextPost(plainText, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取国密公钥私钥对 🏆
|
* @summary 获取国密公钥私钥对 🏆
|
||||||
|
|||||||
@ -82,6 +82,30 @@ export interface PageCodeGenInput {
|
|||||||
*/
|
*/
|
||||||
descStr?: string | null;
|
descStr?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据库表名
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
tableName?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务名(业务代码包名称)
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
busName?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命名空间
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
nameSpace?: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作者姓名
|
* 作者姓名
|
||||||
*
|
*
|
||||||
@ -90,6 +114,30 @@ export interface PageCodeGenInput {
|
|||||||
*/
|
*/
|
||||||
authorName?: string | null;
|
authorName?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成方式
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
generateType?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否生成菜单
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
generateMenu?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用 Api Service
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof PageCodeGenInput
|
||||||
|
*/
|
||||||
|
isApiService?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类名
|
* 类名
|
||||||
*
|
*
|
||||||
@ -138,38 +186,6 @@ export interface PageCodeGenInput {
|
|||||||
*/
|
*/
|
||||||
connectionString?: string | null;
|
connectionString?: string | null;
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成方式
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
generateType?: string | null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据库表名
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
tableName?: string | null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 命名空间
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
nameSpace?: string | null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务名(业务代码包名称)
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
busName?: string | null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能名(数据库表名称)
|
* 功能名(数据库表名称)
|
||||||
*
|
*
|
||||||
@ -186,14 +202,6 @@ export interface PageCodeGenInput {
|
|||||||
*/
|
*/
|
||||||
menuApplication?: string | null;
|
menuApplication?: string | null;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否生成菜单
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
generateMenu?: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单父级
|
* 菜单父级
|
||||||
*
|
*
|
||||||
@ -233,12 +241,4 @@ export interface PageCodeGenInput {
|
|||||||
* @memberof PageCodeGenInput
|
* @memberof PageCodeGenInput
|
||||||
*/
|
*/
|
||||||
printName?: string | null;
|
printName?: string | null;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否使用 Api Service
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof PageCodeGenInput
|
|
||||||
*/
|
|
||||||
isApiService?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,14 +85,6 @@ export interface SysOAuthUser {
|
|||||||
*/
|
*/
|
||||||
isDelete?: boolean;
|
isDelete?: boolean;
|
||||||
|
|
||||||
/**
|
|
||||||
* 邮箱
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof SysOAuthUser
|
|
||||||
*/
|
|
||||||
email?: string | null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统用户Id
|
* 系统用户Id
|
||||||
*
|
*
|
||||||
@ -155,6 +147,14 @@ export interface SysOAuthUser {
|
|||||||
*/
|
*/
|
||||||
avatar?: string | null;
|
avatar?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysOAuthUser
|
||||||
|
*/
|
||||||
|
email?: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*
|
*
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-form-item label="配置名称" prop="name" :rules="[{ required: true, message: '配置名称不能为空', trigger: 'blur' }]">
|
<el-form-item label="配置名称" prop="name" :rules="[{ required: true, message: '配置名称不能为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="state.ruleForm.name" placeholder="配置名称" clearable />
|
<el-input v-model="state.ruleForm.name" placeholder="配置名称" clearable :disabled="state.ruleForm.sysFlag == 1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
@ -21,8 +21,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-form-item label="值" prop="value" :rules="[{ required: true, message: '值不能为空', trigger: 'blur' }]">
|
<el-form-item label="值" prop="value" :rules="[{ required: true, message: '值不能为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="state.ruleForm.value" placeholder="值">
|
<template v-slot:label v-if="state.ruleForm.code == 'sys_sm2_key'">
|
||||||
<template #append>
|
<div>
|
||||||
|
值
|
||||||
|
<el-tooltip raw-content content="国密SM2的公匙和私匙之间用英文符号分号';'分隔" placement="top">
|
||||||
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="state.ruleForm.value" placeholder="值" clearable type="textarea" :rows="5">
|
||||||
|
<!-- <template #append>
|
||||||
<el-space :size="10" spacer="|">
|
<el-space :size="10" spacer="|">
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
style="color: inherit"
|
style="color: inherit"
|
||||||
@ -42,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template> -->
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@ -109,13 +109,13 @@ const options = useVxeTable<SysConfig>(
|
|||||||
columns: [
|
columns: [
|
||||||
// { type: 'checkbox', width: 40, fixed: 'left' },
|
// { type: 'checkbox', width: 40, fixed: 'left' },
|
||||||
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||||
{ field: 'name', title: '配置名称', minWidth: 200, showOverflow: 'tooltip', sortable: true },
|
{ field: 'name', title: '配置名称', minWidth: 200, headerAlign: 'center', align: 'left', showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: 'code', title: '配置编码', minWidth: 200, showOverflow: 'tooltip', sortable: true },
|
{ field: 'code', title: '配置编码', minWidth: 200, headerAlign: 'center', align: 'left', showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: 'value', title: '属性值', minWidth: 150, showOverflow: 'tooltip', sortable: true },
|
{ field: 'value', title: '属性值', minWidth: 150, showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: 'sysFlag', title: '内置参数', width: 80, showOverflow: 'tooltip', sortable: true, slots: { default: 'row_sysFlag' } },
|
{ field: 'sysFlag', title: '内置参数', width: 80, showOverflow: 'tooltip', sortable: true, slots: { default: 'row_sysFlag' } },
|
||||||
{ field: 'groupCode', title: '分组编码', minWidth: 120, showOverflow: 'tooltip', sortable: true },
|
{ field: 'groupCode', title: '分组编码', minWidth: 120, showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip', sortable: true },
|
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: 'remark', title: '备注', minWidth: 300, showOverflow: 'tooltip', sortable: true },
|
{ field: 'remark', title: '备注', minWidth: 300, headerAlign: 'center', align: 'left', showOverflow: 'tooltip', sortable: true },
|
||||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
{ 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: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user