😎1、调整登录服务类 2、适配多核处理器显示 3、升级npm包依赖

This commit is contained in:
zuohuaijun 2024-09-10 13:37:16 +08:00
parent d73c666e5a
commit df22472d17
74 changed files with 225 additions and 166 deletions

View File

@ -25,7 +25,8 @@
"LoginInfo": { "LoginInfo": {
"Enabled": true, // Swagger "Enabled": true, // Swagger
"CheckUrl": "/api/swagger/checkUrl", "CheckUrl": "/api/swagger/checkUrl",
"SubmitUrl": "/api/swagger/submitUrl" "SubmitUrl": "/api/swagger/submitUrl",
"EnableOnProduction": false //
}, },
"EnumToNumber": true // "EnumToNumber": true //
} }

View File

@ -32,7 +32,6 @@
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" /> <PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
<PackageReference Include="NewLife.Redis" Version="5.7.2024.801" /> <PackageReference Include="NewLife.Redis" Version="5.7.2024.801" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.6.0" /> <PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.6.0" />
<PackageReference Include="PluginCore.AspNetCore" Version="1.4.3" />
<PackageReference Include="QRCoder" Version="1.6.0" /> <PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" /> <PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" /> <PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
@ -42,7 +41,7 @@
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" /> <PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
<PackageReference Include="SSH.NET" Version="2024.1.0" /> <PackageReference Include="SSH.NET" Version="2024.1.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1082" /> <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1084" />
<PackageReference Include="UAParser" Version="3.1.47" /> <PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" /> <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup> </ItemGroup>

View File

@ -21,3 +21,24 @@ public class LoginOutput
/// </summary> /// </summary>
public string RefreshToken { get; set; } public string RefreshToken { get; set; }
} }
/// <summary>
/// 验证码输出
/// </summary>
public class CaptchaOutput
{
/// <summary>
/// Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 图片
/// </summary>
public string Img { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public int ExpirySeconds { get; set; }
}

View File

@ -18,36 +18,24 @@ public class SysAuthService : IDynamicApiController, ITransient
{ {
private readonly UserManager _userManager; private readonly UserManager _userManager;
private readonly SqlSugarRepository<SysUser> _sysUserRep; private readonly SqlSugarRepository<SysUser> _sysUserRep;
private readonly SqlSugarRepository<SysUserLdap> _sysUserLdap;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly SysRoleService _sysRoleService;
private readonly SysOnlineUserService _sysOnlineUserService;
private readonly SysConfigService _sysConfigService; private readonly SysConfigService _sysConfigService;
private readonly ICaptcha _captcha;
private readonly SysCacheService _sysCacheService; private readonly SysCacheService _sysCacheService;
private readonly SysLdapService _sysLdapService; private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ICaptcha _captcha;
public SysAuthService(UserManager userManager, public SysAuthService(UserManager userManager,
SqlSugarRepository<SysUser> sysUserRep, SqlSugarRepository<SysUser> sysUserRep,
SqlSugarRepository<SysUserLdap> sysUserLdapRep,
IHttpContextAccessor httpContextAccessor,
SysRoleService sysRoleService,
SysOnlineUserService sysOnlineUserService,
SysConfigService sysConfigService, SysConfigService sysConfigService,
ICaptcha captcha,
SysCacheService sysCacheService, SysCacheService sysCacheService,
SysLdapService sysLdapService) IHttpContextAccessor httpContextAccessor,
ICaptcha captcha)
{ {
_userManager = userManager; _userManager = userManager;
_sysUserRep = sysUserRep; _sysUserRep = sysUserRep;
_sysUserLdap = sysUserLdapRep;
_httpContextAccessor = httpContextAccessor;
_sysRoleService = sysRoleService;
_sysOnlineUserService = sysOnlineUserService;
_sysConfigService = sysConfigService; _sysConfigService = sysConfigService;
_captcha = captcha;
_sysCacheService = sysCacheService; _sysCacheService = sysCacheService;
_sysLdapService = sysLdapService; _httpContextAccessor = httpContextAccessor;
_captcha = captcha;
} }
/// <summary> /// <summary>
@ -93,25 +81,15 @@ public class SysAuthService : IDynamicApiController, ITransient
if (tenant != null && tenant.Status == StatusEnum.Disable) if (tenant != null && tenant.Status == StatusEnum.Disable)
throw Oops.Oh(ErrorCodeEnum.Z1003); throw Oops.Oh(ErrorCodeEnum.Z1003);
// 国密SM2解密前端密码传输SM2加密后的
try
{
input.Password = CryptogramUtil.SM2Decrypt(input.Password);
}
catch
{
throw Oops.Oh(ErrorCodeEnum.D0010);
}
// 是否开启域登录验证 // 是否开启域登录验证
if (await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysDomainLogin)) if (await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysDomainLogin))
{ {
var userLdap = await _sysUserLdap.GetFirstAsync(u => u.UserId == user.Id && u.TenantId == tenant.Id); var userLdap = await _sysUserRep.ChangeRepository<SqlSugarRepository<SysUserLdap>>().GetFirstAsync(u => u.UserId == user.Id && u.TenantId == tenant.Id);
if (userLdap == null) if (userLdap == null)
{ {
VerifyPassword(input, keyPasswordErrorTimes, passwordErrorTimes, user); VerifyPassword(input, keyPasswordErrorTimes, passwordErrorTimes, user);
} }
else if (!await _sysLdapService.AuthAccount(tenant.Id, userLdap.Account, input.Password)) else if (!await App.GetRequiredService<SysLdapService>().AuthAccount(tenant.Id, userLdap.Account, input.Password))
{ {
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30)); _sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
throw Oops.Oh(ErrorCodeEnum.D1000); throw Oops.Oh(ErrorCodeEnum.D1000);
@ -145,6 +123,9 @@ public class SysAuthService : IDynamicApiController, ITransient
} }
else else
{ {
// 国密SM2解密前端密码传输SM2加密后的
input.Password = CryptogramUtil.SM2Decrypt(input.Password);
if (!CryptogramUtil.Decrypt(user.Password).Equals(input.Password)) if (!CryptogramUtil.Decrypt(user.Password).Equals(input.Password))
{ {
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30)); _sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
@ -215,7 +196,7 @@ public class SysAuthService : IDynamicApiController, ITransient
loginMode = LoginModeEnum.PC; loginMode = LoginModeEnum.PC;
// 单用户登录 // 单用户登录
await _sysOnlineUserService.SingleLogin(user.Id, loginMode); await App.GetRequiredService<SysOnlineUserService>().SingleLogin(user.Id, loginMode);
// 生成Token令牌 // 生成Token令牌
var tokenExpire = await _sysConfigService.GetTokenExpire(); var tokenExpire = await _sysConfigService.GetTokenExpire();
@ -277,8 +258,8 @@ public class SysAuthService : IDynamicApiController, ITransient
// 角色集合 // 角色集合
var roleIds = await _sysUserRep.ChangeRepository<SqlSugarRepository<SysUserRole>>().AsQueryable().Where(u => u.UserId == user.Id).Select(u => u.RoleId).ToListAsync(); var roleIds = await _sysUserRep.ChangeRepository<SqlSugarRepository<SysUserRole>>().AsQueryable().Where(u => u.UserId == user.Id).Select(u => u.RoleId).ToListAsync();
// 接口集合 // 接口集合
var apis = (await _sysRoleService.GetUserApiList())[0]; var apis = (await App.GetRequiredService<SysRoleService>().GetUserApiList())[0];
// 水印文字(若系统水印为空则禁止显示) // 水印文字(若系统水印为空则显示)
var watermarkText = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysWebWatermark); var watermarkText = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysWebWatermark);
if (!string.IsNullOrWhiteSpace(watermarkText)) if (!string.IsNullOrWhiteSpace(watermarkText))
watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIpAddressToIPv4(true)}-{DateTime.Now}"; watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIpAddressToIPv4(true)}-{DateTime.Now}";
@ -312,7 +293,7 @@ public class SysAuthService : IDynamicApiController, ITransient
/// <param name="accessToken"></param> /// <param name="accessToken"></param>
/// <returns></returns> /// <returns></returns>
[DisplayName("获取刷新Token")] [DisplayName("获取刷新Token")]
public virtual string GetRefreshToken([FromQuery] string accessToken) public string GetRefreshToken([FromQuery] string accessToken)
{ {
var refreshTokenExpire = _sysConfigService.GetRefreshTokenExpire().GetAwaiter().GetResult(); var refreshTokenExpire = _sysConfigService.GetRefreshTokenExpire().GetAwaiter().GetResult();
return JWTEncryption.GenerateRefreshToken(accessToken, refreshTokenExpire); return JWTEncryption.GenerateRefreshToken(accessToken, refreshTokenExpire);
@ -336,19 +317,19 @@ public class SysAuthService : IDynamicApiController, ITransient
/// <returns></returns> /// <returns></returns>
[SuppressMonitor] [SuppressMonitor]
[DisplayName("获取验证码")] [DisplayName("获取验证码")]
public dynamic GetCaptcha() public CaptchaOutput GetCaptcha()
{ {
var codeId = YitIdHelper.NextId().ToString(); var codeId = YitIdHelper.NextId().ToString();
var captcha = _captcha.Generate(codeId); var captcha = _captcha.Generate(codeId);
var expirySeconds = App.GetOptions<CaptchaOptions>()?.ExpirySeconds ?? 60; var expirySeconds = App.GetOptions<CaptchaOptions>()?.ExpirySeconds ?? 60;
return new { Id = codeId, Img = captcha.Base64, ExpirySeconds = expirySeconds }; return new CaptchaOutput { Id = codeId, Img = captcha.Base64, ExpirySeconds = expirySeconds };
} }
/// <summary> /// <summary>
/// Swagger登录检查 🔖 /// Swagger登录检查 🔖
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("/api/swagger/checkUrl"), NonUnify] [Route("/api/swagger/checkUrl"), NonUnify]
[DisplayName("Swagger登录检查")] [DisplayName("Swagger登录检查")]
public int SwaggerCheckUrl() public int SwaggerCheckUrl()
{ {
@ -360,7 +341,7 @@ public class SysAuthService : IDynamicApiController, ITransient
/// </summary> /// </summary>
/// <param name="auth"></param> /// <param name="auth"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost("/api/swagger/submitUrl"), NonUnify] [Route("/api/swagger/submitUrl"), NonUnify]
[DisplayName("Swagger登录提交")] [DisplayName("Swagger登录提交")]
public async Task<int> SwaggerSubmitUrl([FromForm] SpecificationAuth auth) public async Task<int> SwaggerSubmitUrl([FromForm] SpecificationAuth auth)
{ {

View File

@ -58,7 +58,7 @@ public class SysServerService : IDynamicApiController, ITransient
memoryMetrics.UsedRam, // 已用内存 memoryMetrics.UsedRam, // 已用内存
memoryMetrics.TotalRam, // 总内存 memoryMetrics.TotalRam, // 总内存
memoryMetrics.RamRate, // 内存使用率 memoryMetrics.RamRate, // 内存使用率
memoryMetrics.CpuRate, // Cpu使用率 memoryMetrics.CpuRates, // Cpu使用率
StartTime = programStartTime.ToString("yyyy-MM-dd HH:mm:ss"), // 服务启动时间 StartTime = programStartTime.ToString("yyyy-MM-dd HH:mm:ss"), // 服务启动时间
RunTime = programRunTime, // 服务运行时间 RunTime = programRunTime, // 服务运行时间
}; };

View File

@ -31,7 +31,11 @@ public static class ComputerUtil
memoryMetrics.UsedRam = Math.Round(memoryMetrics.Used / 1024, 2) + "GB"; memoryMetrics.UsedRam = Math.Round(memoryMetrics.Used / 1024, 2) + "GB";
memoryMetrics.TotalRam = Math.Round(memoryMetrics.Total / 1024, 2) + "GB"; memoryMetrics.TotalRam = Math.Round(memoryMetrics.Total / 1024, 2) + "GB";
memoryMetrics.RamRate = Math.Ceiling(100 * memoryMetrics.Used / memoryMetrics.Total).ToString() + "%"; memoryMetrics.RamRate = Math.Ceiling(100 * memoryMetrics.Used / memoryMetrics.Total).ToString() + "%";
memoryMetrics.CpuRate = Math.Ceiling(GetCPURate().ParseToDouble()) + "%"; var cpuRates = GetCPURates();
if (cpuRates != null)
{
memoryMetrics.CpuRates = cpuRates.Select(u => Math.Ceiling(u.ParseToDouble()) + "%").ToList();
}
return memoryMetrics; return memoryMetrics;
} }
@ -170,25 +174,25 @@ public static class ComputerUtil
return RuntimeInformation.IsOSPlatform(OSPlatform.OSX); return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
} }
public static string GetCPURate() public static List<string> GetCPURates()
{ {
string cpuRate; var cpuRates = new List<string>();
if (IsMacOS()) if (IsMacOS())
{ {
string output = ShellUtil.Bash("top -l 1 | grep \"CPU usage\" | awk '{print $3 + $5}'"); string output = ShellUtil.Bash("top -l 1 | grep \"CPU usage\" | awk '{print $3 + $5}'");
cpuRate = output.Trim(); cpuRates.Add(output.Trim());
} }
else if (IsUnix()) else if (IsUnix())
{ {
string output = ShellUtil.Bash("top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'"); string output = ShellUtil.Bash("top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'");
cpuRate = output.Trim(); cpuRates.Add(output.Trim());
} }
else else
{ {
string output = ShellUtil.Cmd("wmic", "cpu get LoadPercentage"); string output = ShellUtil.Cmd("wmic", "cpu get LoadPercentage");
cpuRate = output.Replace("LoadPercentage", string.Empty).Trim(); cpuRates.AddRange(output.Replace("LoadPercentage", string.Empty).Trim().Split("\r\r\n"));
} }
return cpuRate; return cpuRates;
} }
/// <summary> /// <summary>
@ -258,7 +262,7 @@ public class MemoryMetrics
/// <summary> /// <summary>
/// CPU使用率% /// CPU使用率%
/// </summary> /// </summary>
public string CpuRate { get; set; } public List<string> CpuRates { get; set; }
/// <summary> /// <summary>
/// 总内存 GB /// 总内存 GB

View File

@ -75,7 +75,14 @@ public class CryptogramUtil
/// <returns></returns> /// <returns></returns>
public static string SM2Decrypt(string cipherText) public static string SM2Decrypt(string cipherText)
{ {
return GMUtil.SM2Decrypt(PrivateKey, cipherText); try
{
return GMUtil.SM2Decrypt(PrivateKey, cipherText);
}
catch
{
throw Oops.Oh(ErrorCodeEnum.D0010);
}
} }
/// <summary> /// <summary>

View File

@ -22,7 +22,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Newtonsoft.Json; using Newtonsoft.Json;
using OnceMi.AspNetCore.OSS; using OnceMi.AspNetCore.OSS;
using PluginCore.AspNetCore.Extensions;
using SixLabors.ImageSharp.Web.DependencyInjection; using SixLabors.ImageSharp.Web.DependencyInjection;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -101,9 +100,6 @@ public class Startup : AppStartup
// 三方授权登录OAuth // 三方授权登录OAuth
services.AddOAuth(); services.AddOAuth();
// 插件 PluginCore
services.AddPluginCore();
// ElasticSearch // ElasticSearch
services.AddElasticSearch(); services.AddElasticSearch();
@ -259,9 +255,6 @@ public class Startup : AppStartup
// 启用跨域,必须在 UseRouting 和 UseAuthentication 之间注册 // 启用跨域,必须在 UseRouting 和 UseAuthentication 之间注册
app.UseCorsAccessor(); app.UseCorsAccessor();
// 插件 PluginCore
app.UsePluginCore();
// 启用鉴权授权 // 启用鉴权授权
app.UseAuthentication(); app.UseAuthentication();
app.UseAuthorization(); app.UseAuthorization();

View File

@ -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.09.09", "lastBuildTime": "2024.09.10",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun", "author": "zuohuaijun",
"license": "MIT", "license": "MIT",
@ -71,7 +71,7 @@
"vue-router": "^4.4.3", "vue-router": "^4.4.3",
"vue-signature-pad": "^3.0.2", "vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2", "vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.1.20", "vxe-pc-ui": "^4.1.21",
"vxe-table": "^4.7.59", "vxe-table": "^4.7.59",
"vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.5", "vxe-table-plugin-export-xlsx": "^4.0.5",
@ -85,8 +85,8 @@
"@types/node": "^20.14.14", "@types/node": "^20.14.14",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8", "@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.4.0", "@typescript-eslint/parser": "^8.5.0",
"@vitejs/plugin-vue": "^5.1.3", "@vitejs/plugin-vue": "^5.1.3",
"@vitejs/plugin-vue-jsx": "^4.0.1", "@vitejs/plugin-vue-jsx": "^4.0.1",
"@vue/compiler-sfc": "^3.5.3", "@vue/compiler-sfc": "^3.5.3",
@ -98,8 +98,8 @@
"prettier": "^3.3.3", "prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.78.0", "sass": "^1.78.0",
"terser": "^5.31.6", "terser": "^5.32.0",
"typescript": "^5.5.4", "typescript": "^5.6.2",
"vite": "^5.4.3", "vite": "^5.4.3",
"vite-plugin-cdn-import": "^1.0.1", "vite-plugin-cdn-import": "^1.0.1",
"vite-plugin-compression2": "^1.3.0", "vite-plugin-compression2": "^1.3.0",

View File

@ -18,9 +18,9 @@ import { Configuration } from '../configuration';
// @ts-ignore // @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import { AdminResultBoolean } from '../models'; import { AdminResultBoolean } from '../models';
import { AdminResultCaptchaOutput } from '../models';
import { AdminResultLoginOutput } from '../models'; import { AdminResultLoginOutput } from '../models';
import { AdminResultLoginUserOutput } from '../models'; import { AdminResultLoginUserOutput } from '../models';
import { AdminResultObject } from '../models';
import { AdminResultString } from '../models'; import { AdminResultString } from '../models';
import { LoginInput } from '../models'; import { LoginInput } from '../models';
import { LoginPhoneInput } from '../models'; import { LoginPhoneInput } from '../models';
@ -506,7 +506,7 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> { async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultCaptchaOutput>>> {
const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthCaptchaGet(options); const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthCaptchaGet(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
@ -630,7 +630,7 @@ export const SysAuthApiFactory = function (configuration?: Configuration, basePa
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> { async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultCaptchaOutput>> {
return SysAuthApiFp(configuration).apiSysAuthCaptchaGet(options).then((request) => request(axios, basePath)); return SysAuthApiFp(configuration).apiSysAuthCaptchaGet(options).then((request) => request(axios, basePath));
}, },
/** /**
@ -730,7 +730,7 @@ export class SysAuthApi extends BaseAPI {
* @throws {RequiredError} * @throws {RequiredError}
* @memberof SysAuthApi * @memberof SysAuthApi
*/ */
public async apiSysAuthCaptchaGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> { public async apiSysAuthCaptchaGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultCaptchaOutput>> {
return SysAuthApiFp(this.configuration).apiSysAuthCaptchaGet(options).then((request) => request(this.axios, this.basePath)); return SysAuthApiFp(this.configuration).apiSysAuthCaptchaGet(options).then((request) => request(this.axios, this.basePath));
} }
/** /**

View File

@ -83,7 +83,7 @@ export interface AddConfigInput {
* @type {boolean} * @type {boolean}
* @memberof AddConfigInput * @memberof AddConfigInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface AddDictDataInput {
* @type {boolean} * @type {boolean}
* @memberof AddDictDataInput * @memberof AddDictDataInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface AddDictTypeInput {
* @type {boolean} * @type {boolean}
* @memberof AddDictTypeInput * @memberof AddDictTypeInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -85,7 +85,7 @@ export interface AddMenuInput {
* @type {boolean} * @type {boolean}
* @memberof AddMenuInput * @memberof AddMenuInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface AddNoticeInput {
* @type {boolean} * @type {boolean}
* @memberof AddNoticeInput * @memberof AddNoticeInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface AddOpenAccessInput {
* @type {boolean} * @type {boolean}
* @memberof AddOpenAccessInput * @memberof AddOpenAccessInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface AddOrgInput {
* @type {boolean} * @type {boolean}
* @memberof AddOrgInput * @memberof AddOrgInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface AddPluginInput {
* @type {boolean} * @type {boolean}
* @memberof AddPluginInput * @memberof AddPluginInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface AddPosInput {
* @type {boolean} * @type {boolean}
* @memberof AddPosInput * @memberof AddPosInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface AddPrintInput {
* @type {boolean} * @type {boolean}
* @memberof AddPrintInput * @memberof AddPrintInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface AddRoleInput {
* @type {boolean} * @type {boolean}
* @memberof AddRoleInput * @memberof AddRoleInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface AddScheduleInput {
* @type {boolean} * @type {boolean}
* @memberof AddScheduleInput * @memberof AddScheduleInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface AddSysLdapInput {
* @type {boolean} * @type {boolean}
* @memberof AddSysLdapInput * @memberof AddSysLdapInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface AddTenantInput {
* @type {boolean} * @type {boolean}
* @memberof AddTenantInput * @memberof AddTenantInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -89,7 +89,7 @@ export interface AddUserInput {
* @type {boolean} * @type {boolean}
* @memberof AddUserInput * @memberof AddUserInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -0,0 +1,69 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { CaptchaOutput } from './captcha-output';
/**
*
*
* @export
* @interface AdminResultCaptchaOutput
*/
export interface AdminResultCaptchaOutput {
/**
*
*
* @type {number}
* @memberof AdminResultCaptchaOutput
*/
code?: number;
/**
* successwarningerror
*
* @type {string}
* @memberof AdminResultCaptchaOutput
*/
type?: string | null;
/**
*
*
* @type {string}
* @memberof AdminResultCaptchaOutput
*/
message?: string | null;
/**
* @type {CaptchaOutput}
* @memberof AdminResultCaptchaOutput
*/
result?: CaptchaOutput;
/**
*
*
* @type {any}
* @memberof AdminResultCaptchaOutput
*/
extras?: any | null;
/**
*
*
* @type {Date}
* @memberof AdminResultCaptchaOutput
*/
time?: Date;
}

View File

@ -13,46 +13,34 @@
*/ */
/** /**
* *
* *
* @export * @export
* @interface WechatPayParaOutput * @interface CaptchaOutput
*/ */
export interface WechatPayParaOutput { export interface CaptchaOutput {
/** /**
* Id
*
* @type {string} * @type {string}
* @memberof WechatPayParaOutput * @memberof CaptchaOutput
*/ */
appId?: string | null; id?: string | null;
/** /**
*
*
* @type {string} * @type {string}
* @memberof WechatPayParaOutput * @memberof CaptchaOutput
*/ */
timeStamp?: string | null; img?: string | null;
/** /**
* @type {string} *
* @memberof WechatPayParaOutput *
* @type {number}
* @memberof CaptchaOutput
*/ */
nonceStr?: string | null; expirySeconds?: number;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
_package?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
signType?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
paySign?: string | null;
} }

View File

@ -12,7 +12,6 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import { WechatPayParaOutput } from './wechat-pay-para-output';
/** /**
* *
* *
@ -32,10 +31,4 @@ export interface CreatePayTransactionOutput {
* @memberof CreatePayTransactionOutput * @memberof CreatePayTransactionOutput
*/ */
outTradeNumber?: string | null; outTradeNumber?: string | null;
/**
* @type {WechatPayParaOutput}
* @memberof CreatePayTransactionOutput
*/
singInfo?: WechatPayParaOutput;
} }

View File

@ -20,6 +20,7 @@ export * from './add-sys-ldap-input';
export * from './add-tenant-input'; export * from './add-tenant-input';
export * from './add-user-input'; export * from './add-user-input';
export * from './admin-result-boolean'; export * from './admin-result-boolean';
export * from './admin-result-captcha-output';
export * from './admin-result-create-pay-transaction-native-output'; export * from './admin-result-create-pay-transaction-native-output';
export * from './admin-result-create-pay-transaction-output'; export * from './admin-result-create-pay-transaction-output';
export * from './admin-result-data-set'; export * from './admin-result-data-set';
@ -124,6 +125,7 @@ export * from './calendar';
export * from './calendar-algorithm-type'; export * from './calendar-algorithm-type';
export * from './calendar-week-rule'; export * from './calendar-week-rule';
export * from './calling-conventions'; export * from './calling-conventions';
export * from './captcha-output';
export * from './card-type-enum'; export * from './card-type-enum';
export * from './change-pwd-input'; export * from './change-pwd-input';
export * from './cluster-status'; export * from './cluster-status';
@ -422,7 +424,6 @@ export * from './visual-db-table';
export * from './visual-table'; export * from './visual-table';
export * from './wechat-pay-output'; export * from './wechat-pay-output';
export * from './wechat-pay-para-input'; export * from './wechat-pay-para-input';
export * from './wechat-pay-para-output';
export * from './wechat-pay-transaction-input'; export * from './wechat-pay-transaction-input';
export * from './wechat-user-login'; export * from './wechat-user-login';
export * from './wx-open-id-login-input'; export * from './wx-open-id-login-input';

View File

@ -83,7 +83,7 @@ export interface OAuthUserOutput {
* @type {boolean} * @type {boolean}
* @memberof OAuthUserOutput * @memberof OAuthUserOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface OpenAccessOutput {
* @type {boolean} * @type {boolean}
* @memberof OpenAccessOutput * @memberof OpenAccessOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface PagePosOutput {
* @type {boolean} * @type {boolean}
* @memberof PagePosOutput * @memberof PagePosOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface PageRoleOutput {
* @type {boolean} * @type {boolean}
* @memberof PageRoleOutput * @memberof PageRoleOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface PosOutput {
* @type {boolean} * @type {boolean}
* @memberof PosOutput * @memberof PosOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -82,7 +82,7 @@ export interface SysCodeGenConfig {
* @type {boolean} * @type {boolean}
* @memberof SysCodeGenConfig * @memberof SysCodeGenConfig
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface SysCodeGenTemplate {
* @type {boolean} * @type {boolean}
* @memberof SysCodeGenTemplate * @memberof SysCodeGenTemplate
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface SysCodeGen {
* @type {boolean} * @type {boolean}
* @memberof SysCodeGen * @memberof SysCodeGen
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface SysConfig {
* @type {boolean} * @type {boolean}
* @memberof SysConfig * @memberof SysConfig
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface SysDictData {
* @type {boolean} * @type {boolean}
* @memberof SysDictData * @memberof SysDictData
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface SysDictType {
* @type {boolean} * @type {boolean}
* @memberof SysDictType * @memberof SysDictType
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -82,7 +82,7 @@ export interface SysFile {
* @type {boolean} * @type {boolean}
* @memberof SysFile * @memberof SysFile
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface SysLdap {
* @type {boolean} * @type {boolean}
* @memberof SysLdap * @memberof SysLdap
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -82,7 +82,7 @@ export interface SysLogDiff {
* @type {boolean} * @type {boolean}
* @memberof SysLogDiff * @memberof SysLogDiff
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface SysLogEx {
* @type {boolean} * @type {boolean}
* @memberof SysLogEx * @memberof SysLogEx
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface SysLogOp {
* @type {boolean} * @type {boolean}
* @memberof SysLogOp * @memberof SysLogOp
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface SysLogVis {
* @type {boolean} * @type {boolean}
* @memberof SysLogVis * @memberof SysLogVis
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface SysMenu {
* @type {boolean} * @type {boolean}
* @memberof SysMenu * @memberof SysMenu
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface SysNotice {
* @type {boolean} * @type {boolean}
* @memberof SysNotice * @memberof SysNotice
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface SysOAuthUser {
* @type {boolean} * @type {boolean}
* @memberof SysOAuthUser * @memberof SysOAuthUser
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface SysOrg {
* @type {boolean} * @type {boolean}
* @memberof SysOrg * @memberof SysOrg
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface SysPlugin {
* @type {boolean} * @type {boolean}
* @memberof SysPlugin * @memberof SysPlugin
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface SysPrint {
* @type {boolean} * @type {boolean}
* @memberof SysPrint * @memberof SysPrint
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface SysSchedule {
* @type {boolean} * @type {boolean}
* @memberof SysSchedule * @memberof SysSchedule
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -88,7 +88,7 @@ export interface SysUser {
* @type {boolean} * @type {boolean}
* @memberof SysUser * @memberof SysUser
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -82,7 +82,7 @@ export interface SysWechatPay {
* @type {boolean} * @type {boolean}
* @memberof SysWechatPay * @memberof SysWechatPay
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -82,7 +82,7 @@ export interface SysWechatRefund {
* @type {boolean} * @type {boolean}
* @memberof SysWechatRefund * @memberof SysWechatRefund
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* () * ()

View File

@ -85,7 +85,7 @@ export interface TenantOutput {
* @type {boolean} * @type {boolean}
* @memberof TenantOutput * @memberof TenantOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface UpdateConfigInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateConfigInput * @memberof UpdateConfigInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface UpdateDictDataInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateDictDataInput * @memberof UpdateDictDataInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface UpdateDictTypeInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateDictTypeInput * @memberof UpdateDictTypeInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -85,7 +85,7 @@ export interface UpdateMenuInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateMenuInput * @memberof UpdateMenuInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface UpdateNoticeInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateNoticeInput * @memberof UpdateNoticeInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* *

View File

@ -83,7 +83,7 @@ export interface UpdateOpenAccessInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateOpenAccessInput * @memberof UpdateOpenAccessInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface UpdateOrgInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateOrgInput * @memberof UpdateOrgInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface UpdatePluginInput {
* @type {boolean} * @type {boolean}
* @memberof UpdatePluginInput * @memberof UpdatePluginInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface UpdatePosInput {
* @type {boolean} * @type {boolean}
* @memberof UpdatePosInput * @memberof UpdatePosInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -84,7 +84,7 @@ export interface UpdatePrintInput {
* @type {boolean} * @type {boolean}
* @memberof UpdatePrintInput * @memberof UpdatePrintInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface UpdateRoleInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateRoleInput * @memberof UpdateRoleInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface UpdateScheduleInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateScheduleInput * @memberof UpdateScheduleInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -83,7 +83,7 @@ export interface UpdateSysLdapInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateSysLdapInput * @memberof UpdateSysLdapInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -85,7 +85,7 @@ export interface UpdateTenantInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateTenantInput * @memberof UpdateTenantInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -89,7 +89,7 @@ export interface UpdateUserInput {
* @type {boolean} * @type {boolean}
* @memberof UpdateUserInput * @memberof UpdateUserInput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -88,7 +88,7 @@ export interface UserOutput {
* @type {boolean} * @type {boolean}
* @memberof UserOutput * @memberof UserOutput
*/ */
isDelete?: boolean | null; isDelete?: boolean;
/** /**
* Id * Id

View File

@ -60,13 +60,15 @@
</el-col> </el-col>
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12" style="text-align: center"> <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12" style="text-align: center">
<el-progress <el-progress
v-for="(item, index) in state.machineUseInfo.cpuRates"
:key="index"
type="dashboard" type="dashboard"
:percentage="parseInt(state.machineUseInfo.cpuRate == undefined ? 0 : state.machineUseInfo.cpuRate.substr(0, state.machineUseInfo.cpuRate.length - 1))" :percentage="parseInt(item == undefined ? 0 : item.substr(0, item.length - 1))"
:color="'var(--el-color-primary)'" :color="'var(--el-color-primary)'"
> >
<template #default> <template #default>
<span>{{ state.machineUseInfo.cpuRate }}<br /></span> <span>{{ item }}<br /></span>
<span style="font-size: 10px"> CPU使用率 </span> <span style="font-size: 10px"> CPU使用率<br />核心 {{ index + 1 }}</span>
</template> </template>
</el-progress> </el-progress>
</el-col> </el-col>