😎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": {
"Enabled": true, // Swagger
"CheckUrl": "/api/swagger/checkUrl",
"SubmitUrl": "/api/swagger/submitUrl"
"SubmitUrl": "/api/swagger/submitUrl",
"EnableOnProduction": false //
},
"EnumToNumber": true //
}

View File

@ -32,7 +32,6 @@
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
<PackageReference Include="NewLife.Redis" Version="5.7.2024.801" />
<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="RabbitMQ.Client" Version="6.8.1" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
@ -42,7 +41,7 @@
<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.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="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>

View File

@ -20,4 +20,25 @@ public class LoginOutput
/// 刷新Token
/// </summary>
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 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 ICaptcha _captcha;
private readonly SysCacheService _sysCacheService;
private readonly SysLdapService _sysLdapService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ICaptcha _captcha;
public SysAuthService(UserManager userManager,
SqlSugarRepository<SysUser> sysUserRep,
SqlSugarRepository<SysUserLdap> sysUserLdapRep,
IHttpContextAccessor httpContextAccessor,
SysRoleService sysRoleService,
SysOnlineUserService sysOnlineUserService,
SysConfigService sysConfigService,
ICaptcha captcha,
SysCacheService sysCacheService,
SysLdapService sysLdapService)
IHttpContextAccessor httpContextAccessor,
ICaptcha captcha)
{
_userManager = userManager;
_sysUserRep = sysUserRep;
_sysUserLdap = sysUserLdapRep;
_httpContextAccessor = httpContextAccessor;
_sysRoleService = sysRoleService;
_sysOnlineUserService = sysOnlineUserService;
_sysConfigService = sysConfigService;
_captcha = captcha;
_sysCacheService = sysCacheService;
_sysLdapService = sysLdapService;
_httpContextAccessor = httpContextAccessor;
_captcha = captcha;
}
/// <summary>
@ -93,25 +81,15 @@ public class SysAuthService : IDynamicApiController, ITransient
if (tenant != null && tenant.Status == StatusEnum.Disable)
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))
{
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)
{
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));
throw Oops.Oh(ErrorCodeEnum.D1000);
@ -145,6 +123,9 @@ public class SysAuthService : IDynamicApiController, ITransient
}
else
{
// 国密SM2解密前端密码传输SM2加密后的
input.Password = CryptogramUtil.SM2Decrypt(input.Password);
if (!CryptogramUtil.Decrypt(user.Password).Equals(input.Password))
{
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
@ -215,7 +196,7 @@ public class SysAuthService : IDynamicApiController, ITransient
loginMode = LoginModeEnum.PC;
// 单用户登录
await _sysOnlineUserService.SingleLogin(user.Id, loginMode);
await App.GetRequiredService<SysOnlineUserService>().SingleLogin(user.Id, loginMode);
// 生成Token令牌
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 apis = (await _sysRoleService.GetUserApiList())[0];
// 水印文字(若系统水印为空则禁止显示)
var apis = (await App.GetRequiredService<SysRoleService>().GetUserApiList())[0];
// 水印文字(若系统水印为空则显示)
var watermarkText = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysWebWatermark);
if (!string.IsNullOrWhiteSpace(watermarkText))
watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIpAddressToIPv4(true)}-{DateTime.Now}";
@ -312,7 +293,7 @@ public class SysAuthService : IDynamicApiController, ITransient
/// <param name="accessToken"></param>
/// <returns></returns>
[DisplayName("获取刷新Token")]
public virtual string GetRefreshToken([FromQuery] string accessToken)
public string GetRefreshToken([FromQuery] string accessToken)
{
var refreshTokenExpire = _sysConfigService.GetRefreshTokenExpire().GetAwaiter().GetResult();
return JWTEncryption.GenerateRefreshToken(accessToken, refreshTokenExpire);
@ -336,19 +317,19 @@ public class SysAuthService : IDynamicApiController, ITransient
/// <returns></returns>
[SuppressMonitor]
[DisplayName("获取验证码")]
public dynamic GetCaptcha()
public CaptchaOutput GetCaptcha()
{
var codeId = YitIdHelper.NextId().ToString();
var captcha = _captcha.Generate(codeId);
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>
/// Swagger登录检查 🔖
/// </summary>
/// <returns></returns>
[HttpPost("/api/swagger/checkUrl"), NonUnify]
[Route("/api/swagger/checkUrl"), NonUnify]
[DisplayName("Swagger登录检查")]
public int SwaggerCheckUrl()
{
@ -360,7 +341,7 @@ public class SysAuthService : IDynamicApiController, ITransient
/// </summary>
/// <param name="auth"></param>
/// <returns></returns>
[HttpPost("/api/swagger/submitUrl"), NonUnify]
[Route("/api/swagger/submitUrl"), NonUnify]
[DisplayName("Swagger登录提交")]
public async Task<int> SwaggerSubmitUrl([FromForm] SpecificationAuth auth)
{

View File

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

View File

@ -31,7 +31,11 @@ public static class ComputerUtil
memoryMetrics.UsedRam = Math.Round(memoryMetrics.Used / 1024, 2) + "GB";
memoryMetrics.TotalRam = Math.Round(memoryMetrics.Total / 1024, 2) + "GB";
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;
}
@ -170,25 +174,25 @@ public static class ComputerUtil
return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
}
public static string GetCPURate()
public static List<string> GetCPURates()
{
string cpuRate;
var cpuRates = new List<string>();
if (IsMacOS())
{
string output = ShellUtil.Bash("top -l 1 | grep \"CPU usage\" | awk '{print $3 + $5}'");
cpuRate = output.Trim();
cpuRates.Add(output.Trim());
}
else if (IsUnix())
{
string output = ShellUtil.Bash("top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'");
cpuRate = output.Trim();
cpuRates.Add(output.Trim());
}
else
{
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>
@ -258,7 +262,7 @@ public class MemoryMetrics
/// <summary>
/// CPU使用率%
/// </summary>
public string CpuRate { get; set; }
public List<string> CpuRates { get; set; }
/// <summary>
/// 总内存 GB

View File

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

View File

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

View File

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

View File

@ -18,9 +18,9 @@ import { Configuration } from '../configuration';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import { AdminResultBoolean } from '../models';
import { AdminResultCaptchaOutput } from '../models';
import { AdminResultLoginOutput } from '../models';
import { AdminResultLoginUserOutput } from '../models';
import { AdminResultObject } from '../models';
import { AdminResultString } from '../models';
import { LoginInput } from '../models';
import { LoginPhoneInput } from '../models';
@ -506,7 +506,7 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @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);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
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.
* @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));
},
/**
@ -730,7 +730,7 @@ export class SysAuthApi extends BaseAPI {
* @throws {RequiredError}
* @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));
}
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -89,7 +89,7 @@ export interface AddUserInput {
* @type {boolean}
* @memberof AddUserInput
*/
isDelete?: boolean | null;
isDelete?: boolean;
/**
* 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
* @interface WechatPayParaOutput
* @interface CaptchaOutput
*/
export interface WechatPayParaOutput {
export interface CaptchaOutput {
/**
* Id
*
* @type {string}
* @memberof WechatPayParaOutput
* @memberof CaptchaOutput
*/
appId?: string | null;
id?: string | null;
/**
*
*
* @type {string}
* @memberof WechatPayParaOutput
* @memberof CaptchaOutput
*/
timeStamp?: string | null;
img?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*
*
* @type {number}
* @memberof CaptchaOutput
*/
nonceStr?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
_package?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
signType?: string | null;
/**
* @type {string}
* @memberof WechatPayParaOutput
*/
paySign?: string | null;
expirySeconds?: number;
}

View File

@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { WechatPayParaOutput } from './wechat-pay-para-output';
/**
*
*
@ -32,10 +31,4 @@ export interface CreatePayTransactionOutput {
* @memberof CreatePayTransactionOutput
*/
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-user-input';
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-output';
export * from './admin-result-data-set';
@ -124,6 +125,7 @@ export * from './calendar';
export * from './calendar-algorithm-type';
export * from './calendar-week-rule';
export * from './calling-conventions';
export * from './captcha-output';
export * from './card-type-enum';
export * from './change-pwd-input';
export * from './cluster-status';
@ -422,7 +424,6 @@ export * from './visual-db-table';
export * from './visual-table';
export * from './wechat-pay-output';
export * from './wechat-pay-para-input';
export * from './wechat-pay-para-output';
export * from './wechat-pay-transaction-input';
export * from './wechat-user-login';
export * from './wx-open-id-login-input';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -60,13 +60,15 @@
</el-col>
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12" style="text-align: center">
<el-progress
v-for="(item, index) in state.machineUseInfo.cpuRates"
:key="index"
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)'"
>
<template #default>
<span>{{ state.machineUseInfo.cpuRate }}<br /></span>
<span style="font-size: 10px"> CPU使用率 </span>
<span>{{ item }}<br /></span>
<span style="font-size: 10px"> CPU使用率<br />核心 {{ index + 1 }}</span>
</template>
</el-progress>
</el-col>