Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -16,8 +16,8 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
||||
public string AreaID { get; set; }
|
||||
public string AreaName { get; set; }
|
||||
public int Type { get; set; }
|
||||
public DateTimeOffset? CreatedTime { get; set; }
|
||||
public DateTimeOffset? UpdatedTime { get; set; }
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
public string CreatedUserId { get; set; }
|
||||
public string CreatedUserName { get; set; }
|
||||
public string UpdatedUserId { get; set; }
|
||||
@@ -34,7 +34,7 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
||||
public string Note { get; set; }
|
||||
|
||||
public int Type { get; set; }
|
||||
public DateTimeOffset? UpdatedTime { get; set; }
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
public string UpdatedUserId { get; set; }
|
||||
public string UpdatedUserName { get; set; }
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
||||
public string AreaID { get; set; }
|
||||
public string AreaName { get; set; }
|
||||
public int Type { get; set; }
|
||||
public DateTimeOffset? CreatedTime { get; set; }
|
||||
public DateTimeOffset? UpdatedTime { get; set; }
|
||||
public DateTime CreatedTime { get; set; }
|
||||
public DateTime UpdatedTime { get; set; }
|
||||
public string CreatedUserId { get; set; }
|
||||
public string CreatedUserName { get; set; }
|
||||
public string UpdatedUserId { get; set; }
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace Ewide.Core
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Comment("创建时间")]
|
||||
public virtual DateTimeOffset? CreatedTime { get; set; }
|
||||
public virtual DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[Comment("更新时间")]
|
||||
public virtual DateTimeOffset? UpdatedTime { get; set; }
|
||||
public virtual DateTime? UpdatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者Id
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Ewide.Core
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
[Comment("操作时间")]
|
||||
public DateTimeOffset CreatedTime { get; set; }
|
||||
public DateTime CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人Id
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Ewide.Core
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
[Comment("操作时间")]
|
||||
public DateTimeOffset OpTime { get; set; }
|
||||
public DateTime OpTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Ewide.Core
|
||||
/// 访问时间
|
||||
/// </summary>
|
||||
[Comment("访问时间")]
|
||||
public DateTimeOffset VisTime { get; set; }
|
||||
public DateTime VisTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访问人
|
||||
|
||||
@@ -59,13 +59,13 @@ namespace Ewide.Core
|
||||
/// 发布时间
|
||||
/// </summary>
|
||||
[Comment("发布时间")]
|
||||
public DateTimeOffset PublicTime { get; set; }
|
||||
public DateTime PublicTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 撤回时间
|
||||
/// </summary>
|
||||
[Comment("撤回时间")]
|
||||
public DateTimeOffset CancelTime { get; set; }
|
||||
public DateTime CancelTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Ewide.Core
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
[Comment("阅读时间")]
|
||||
public DateTimeOffset ReadTime { get; set; }
|
||||
public DateTime ReadTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(字典 0未读 1已读)
|
||||
|
||||
@@ -30,14 +30,14 @@ namespace Ewide.Core
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
[Comment("开始时间")]
|
||||
public DateTimeOffset BeginTime { get; set; } = DateTimeOffset.Now;
|
||||
public DateTime BeginTime { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
/// <example>null</example>
|
||||
[Comment("结束时间")]
|
||||
public DateTimeOffset? EndTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cron表达式
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Ewide.Core
|
||||
/// 生日
|
||||
/// </summary>
|
||||
[Comment("生日")]
|
||||
public DateTimeOffset Birthday { get; set; }
|
||||
public DateTime? Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别-男_1、女_2
|
||||
@@ -93,7 +93,7 @@ namespace Ewide.Core
|
||||
/// 最后登录时间
|
||||
/// </summary>
|
||||
[Comment("最后登录时间")]
|
||||
public DateTimeOffset LastLoginTime { get; set; }
|
||||
public DateTime LastLoginTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员类型-超级管理员_1、非管理员_2
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Ewide.Core
|
||||
//Param = JsonSerializerUtility.Serialize(context.ActionArguments),
|
||||
//Result = JsonSerializerUtility.Serialize(actionContext.Result),
|
||||
ElapsedTime = sw.ElapsedMilliseconds,
|
||||
OpTime = DateTimeOffset.Now,
|
||||
OpTime = DateTime.Now,
|
||||
Account = httpContext.User?.FindFirstValue(ClaimConst.CLAINM_ACCOUNT)
|
||||
};
|
||||
await sysOpLog.InsertAsync();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Ewide.Core
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new SysTimer{Id="971bc338-0c03-46d4-8113-c7738d54ea18", JobName="百度api", JobGroup="默认分组", BeginTime=DateTimeOffset.Parse("2021-03-21 00:00:00+08:00"), Interval=30, TriggerType=TriggerTypeEnum.Simple, RequestUrl="https://www.baidu.com", RequestType=RequestTypeEnum.Post, IsDeleted=false }, // 142307070910556
|
||||
new SysTimer{Id="971bc338-0c03-46d4-8113-c7738d54ea18", JobName="百度api", JobGroup="默认分组", BeginTime=DateTime.Parse("2021-03-21 00:00:00+08:00"), Interval=30, TriggerType=TriggerTypeEnum.Simple, RequestUrl="https://www.baidu.com", RequestType=RequestTypeEnum.Post, IsDeleted=false }, // 142307070910556
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace Ewide.Core
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new SysUser{Id="d0ead3dc-5096-4e15-bc6d-f640be5301ec", Account="superAdmin", Name="superAdmin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false }, // 142307070910551
|
||||
new SysUser{Id="5398fb9a-2209-4ce7-a2c1-b6a983e502b5", Account="admin", Name="admin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=2, IsDeleted=false }, // 142307070910552
|
||||
new SysUser{Id="16a74726-e156-499f-9942-0e0e24ad0c3f", Account="zuohuaijun", Name="zuohuaijun", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.None, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false } // 142307070910553
|
||||
new SysUser{Id="d0ead3dc-5096-4e15-bc6d-f640be5301ec", Account="superAdmin", Name="superAdmin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false }, // 142307070910551
|
||||
new SysUser{Id="5398fb9a-2209-4ce7-a2c1-b6a983e502b5", Account="admin", Name="admin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=2, IsDeleted=false }, // 142307070910552
|
||||
new SysUser{Id="16a74726-e156-499f-9942-0e0e24ad0c3f", Account="zuohuaijun", Name="zuohuaijun", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.None, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false } // 142307070910553
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,10 +115,14 @@ namespace Ewide.Core.Service
|
||||
var httpContext = App.GetService<IHttpContextAccessor>().HttpContext;
|
||||
var loginOutput = user.Adapt<LoginOutput>();
|
||||
|
||||
loginOutput.LastLoginTime = user.LastLoginTime = DateTimeOffset.Now;
|
||||
loginOutput.LastLoginTime = user.LastLoginTime = DateTime.Now;
|
||||
var ip = httpContext.Request.Headers["X-Real-IP"].FirstOrDefault();
|
||||
loginOutput.LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
|
||||
|
||||
///如果真实ip为空的话,就获取客户端主机IPv4地址
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
loginOutput.LastLoginIp = httpContext.GetRemoteIpAddressToIPv4();
|
||||
}
|
||||
//var ipInfo = IpTool.Search(loginOutput.LastLoginIp);
|
||||
//loginOutput.LastLoginAddress = ipInfo.Country + ipInfo.Province + ipInfo.City + "[" + ipInfo.NetworkOperator + "][" + ipInfo.Latitude + ipInfo.Longitude + "]";
|
||||
|
||||
@@ -174,14 +178,34 @@ namespace Ewide.Core.Service
|
||||
{
|
||||
_httpContextAccessor.SignoutToSwagger();
|
||||
//_httpContextAccessor.HttpContext.Response.Headers["access-token"] = "invalid token";
|
||||
var user = _userManager.User;
|
||||
var userId = user.Id;
|
||||
|
||||
var httpContext = App.GetService<IHttpContextAccessor>().HttpContext;
|
||||
var loginOutput = user.Adapt<LoginOutput>();
|
||||
|
||||
|
||||
var ip = httpContext.Request.Headers["X-Real-IP"];
|
||||
var LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
|
||||
var clent = Parser.GetDefault().Parse(httpContext.Request.Headers["User-Agent"]);
|
||||
loginOutput.LastLoginBrowser = clent.UA.Family + clent.UA.Major;
|
||||
///如果真实ip为空的话,就获取客户端主机IPv4地址
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
LastLoginIp = httpContext.GetRemoteIpAddressToIPv4();
|
||||
}
|
||||
// 增加退出日志
|
||||
await new SysLogVis
|
||||
{
|
||||
Name = "退出",
|
||||
VisTime = DateTime.Now,
|
||||
Success = true,
|
||||
Message = "退出成功",
|
||||
VisType = 2
|
||||
VisType = 2,
|
||||
Browser = loginOutput.LastLoginBrowser,
|
||||
Os = loginOutput.LastLoginOs,
|
||||
Ip = LastLoginIp,
|
||||
Account = loginOutput.Account
|
||||
}.InsertAsync();
|
||||
|
||||
await Task.CompletedTask;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 生日
|
||||
/// </summary>
|
||||
public DateTimeOffset Birthday { get; set; }
|
||||
public DateTime? Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别(字典 1男 2女)
|
||||
@@ -73,7 +73,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 最后登陆时间
|
||||
/// </summary>
|
||||
public DateTimeOffset LastLoginTime { get; set; }
|
||||
public DateTime LastLoginTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后登陆地址
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
public DateTimeOffset OpTime { get; set; }
|
||||
public DateTime OpTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 访问时间
|
||||
/// </summary>
|
||||
public DateTimeOffset VisTime { get; set; }
|
||||
public DateTime VisTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访问人
|
||||
|
||||
@@ -45,12 +45,12 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 发布时间
|
||||
/// </summary>
|
||||
public DateTimeOffset PublicTime { get; set; }
|
||||
public DateTime PublicTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 撤回时间
|
||||
/// </summary>
|
||||
public DateTimeOffset CancelTime { get; set; }
|
||||
public DateTime CancelTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
||||
|
||||
@@ -39,6 +39,6 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
public DateTimeOffset ReadTime { get; set; }
|
||||
public DateTime ReadTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
public DateTimeOffset ReadTime { get; set; }
|
||||
public DateTime ReadTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Ewide.Core.Service.Notice
|
||||
await UpdatePublicInfo(notice);
|
||||
// 如果是发布,则设置发布时间
|
||||
if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||
notice.PublicTime = DateTimeOffset.Now;
|
||||
notice.PublicTime = DateTime.Now;
|
||||
var newItem = await notice.InsertNowAsync();
|
||||
|
||||
// 通知到的人
|
||||
@@ -113,7 +113,7 @@ namespace Ewide.Core.Service.Notice
|
||||
var notice = input.Adapt<SysNotice>();
|
||||
if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||
{
|
||||
notice.PublicTime = DateTimeOffset.Now;
|
||||
notice.PublicTime = DateTime.Now;
|
||||
await UpdatePublicInfo(notice);
|
||||
}
|
||||
await notice.UpdateAsync();
|
||||
@@ -179,11 +179,11 @@ namespace Ewide.Core.Service.Notice
|
||||
|
||||
if (input.Status == (int)NoticeStatus.CANCEL)
|
||||
{
|
||||
notice.CancelTime = DateTimeOffset.Now;
|
||||
notice.CancelTime = DateTime.Now;
|
||||
}
|
||||
else if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||
{
|
||||
notice.PublicTime = DateTimeOffset.Now;
|
||||
notice.PublicTime = DateTime.Now;
|
||||
}
|
||||
await notice.UpdateAsync();
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Ewide.Core.Service.Notice
|
||||
if (noticeUser != null)
|
||||
{
|
||||
noticeUser.ReadStatus = status;
|
||||
noticeUser.ReadTime = DateTimeOffset.Now;
|
||||
noticeUser.ReadTime = DateTime.Now;
|
||||
await noticeUser.UpdateAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTimeOffset BeginTime { get; set; } = DateTimeOffset.Now;
|
||||
public DateTime BeginTime { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
/// <example>null</example>
|
||||
public DateTimeOffset? EndTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cron表达式
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 生日
|
||||
/// </summary>
|
||||
public virtual DateTimeOffset Birthday { get; set; }
|
||||
public virtual DateTime? Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别-男_1、女_2
|
||||
|
||||
@@ -158,6 +158,7 @@ namespace Ewide.Core.Service
|
||||
|
||||
var user = input.Adapt<SysUser>();
|
||||
await user.UpdateExcludeAsync(new[] { nameof(SysUser.Password), nameof(SysUser.Status), nameof(SysUser.AdminType) }, true);
|
||||
user.UpdateIncludeNow(new[] { nameof(SysUser.Birthday) });
|
||||
input.SysEmpParam.Id = user.Id.ToString();
|
||||
// 更新员工及附属机构职位信息
|
||||
await _sysEmpService.AddOrUpdate(input.SysEmpParam);
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Ewide.Core
|
||||
/// <returns></returns>
|
||||
private static string GetRunTime()
|
||||
{
|
||||
return FormatTime((long)(DateTimeOffset.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds);
|
||||
return FormatTime((long)(DateTime.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds);
|
||||
//return DateTimeUtil.FormatTime(Environment.TickCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Ewide.EntityFramework.Core
|
||||
if (entity.State == EntityState.Added)
|
||||
{
|
||||
obj.Id = Guid.NewGuid().ToString();
|
||||
obj.CreatedTime = DateTimeOffset.Now;
|
||||
obj.CreatedTime = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(userId))
|
||||
{
|
||||
obj.CreatedUserId = userId;
|
||||
@@ -122,7 +122,7 @@ namespace Ewide.EntityFramework.Core
|
||||
}
|
||||
else if (entity.State == EntityState.Modified)
|
||||
{
|
||||
obj.UpdatedTime = DateTimeOffset.Now;
|
||||
obj.UpdatedTime = DateTime.Now;
|
||||
obj.UpdatedUserId = userId;
|
||||
obj.UpdatedUserName = userName;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Ewide.EntityFramework.Core
|
||||
if (entity.State == EntityState.Added)
|
||||
{
|
||||
obj.Id = Guid.NewGuid().ToString();
|
||||
obj.CreatedTime = DateTimeOffset.Now;
|
||||
obj.CreatedTime = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(userId))
|
||||
{
|
||||
obj.CreatedUserId = userId;
|
||||
@@ -56,7 +56,7 @@ namespace Ewide.EntityFramework.Core
|
||||
}
|
||||
else if (entity.State == EntityState.Modified)
|
||||
{
|
||||
obj.UpdatedTime = DateTimeOffset.Now;
|
||||
obj.UpdatedTime = DateTime.Now;
|
||||
obj.UpdatedUserId = userId;
|
||||
obj.UpdatedUserName = userName;
|
||||
}
|
||||
|
||||
@@ -99,6 +99,9 @@ export default {
|
||||
var chartDom = this.$refs.chart;
|
||||
var myChart = echarts.init(chartDom);
|
||||
myChart.setOption(this.options);
|
||||
window.addEventListener("resize",function(){
|
||||
myChart.resize();
|
||||
})
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -4,63 +4,188 @@
|
||||
<Auth auth="sysMachine:query">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card :bordered="false" :loading="loading" style="margin-bottom: 20px" title="系统信息">
|
||||
<a-card
|
||||
:bordered="false"
|
||||
:loading="loading"
|
||||
style="margin-bottom: 20px"
|
||||
title="系统信息"
|
||||
>
|
||||
<template>
|
||||
<a-descriptions bordered>
|
||||
<a-descriptions-item :span="3" label="主机名称:">{{ machineBaseInfo.hostName }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="操作系统:">{{ machineBaseInfo.systemOs }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="系统架构:">{{ machineBaseInfo.osArchitecture }}</a-descriptions-item>
|
||||
<a-descriptions-item
|
||||
:span="3"
|
||||
label="运行框架:"
|
||||
>{{ machineBaseInfo.frameworkDescription }}</a-descriptions-item>
|
||||
<a-descriptions-item label="CPU核数:">{{ machineBaseInfo.processorCount }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="主机名称:">{{
|
||||
machineBaseInfo.hostName
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="操作系统:">{{
|
||||
machineBaseInfo.systemOs
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="系统架构:">{{
|
||||
machineBaseInfo.osArchitecture
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="运行框架:">{{
|
||||
machineBaseInfo.frameworkDescription
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="运行时间:">{{
|
||||
machineUseInfo.runTime
|
||||
}}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</template>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card :bordered="false" :loading="loading" style="margin-bottom: 20px" title="网络信息">
|
||||
<a-card
|
||||
:bordered="false"
|
||||
:loading="loading"
|
||||
style="margin-bottom: 20px"
|
||||
title="网络信息"
|
||||
>
|
||||
<template>
|
||||
<a-descriptions bordered>
|
||||
<a-descriptions-item
|
||||
:span="3"
|
||||
label="外网信息:"
|
||||
style="ant-descriptions-item-label ant-descriptions-item-colon"
|
||||
>{{ machineBaseInfo.wanIp }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="IPv4地址:">{{ machineBaseInfo.lanIp }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="网卡MAC:">{{ machineBaseInfo.ipMac }}</a-descriptions-item>
|
||||
<a-descriptions-item
|
||||
:span="3"
|
||||
label="流量统计:"
|
||||
>{{ machineNetworkInfo.sendAndReceived }}</a-descriptions-item>
|
||||
<a-descriptions-item label="网络速度::">{{ machineNetworkInfo.networkSpeed }}</a-descriptions-item>
|
||||
>{{ machineBaseInfo.wanIp }}</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item :span="3" label="IPv4地址:">{{
|
||||
machineBaseInfo.lanIp
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="网卡MAC:">{{
|
||||
machineBaseInfo.ipMac
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="流量统计:">{{
|
||||
machineNetworkInfo.sendAndReceived
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="网络速度::">{{
|
||||
machineNetworkInfo.networkSpeed
|
||||
}}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</template>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-card :bordered="false" :loading="loading" title="其他信息">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card
|
||||
:bordered="false"
|
||||
style="margin-bottom: 20px;height:340px"
|
||||
:loading="loading"
|
||||
:title="Cputitle">
|
||||
<template>
|
||||
<a-descriptions bordered>
|
||||
<a-descriptions-item :span="3" label="运行时间:">{{ machineUseInfo.runTime }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="CPU使用率:">{{ machineUseInfo.cpuRate }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="总内存:">{{ machineUseInfo.totalRam }}</a-descriptions-item>
|
||||
<a-descriptions-item :span="2" label="内存使用率:">{{ machineUseInfo.ramRate }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<p>CPU使用率为:</p>
|
||||
<div class="Ramcpu" ref="cpuchart"></div>
|
||||
</template>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card
|
||||
:bordered="false"
|
||||
:loading="loading"
|
||||
style="margin-bottom: 20px;height:340px"
|
||||
:title="Ramtitle"
|
||||
>
|
||||
<template>
|
||||
<p>内存使用率为:</p>
|
||||
<div
|
||||
class="Ramcpu"
|
||||
ref="Ramchart"></div>
|
||||
</template>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-card :bordered="false" :loading="loading" title="其他信息">
|
||||
<template>
|
||||
<a-descriptions bordered>
|
||||
<a-descriptions-item :span="3" label="CPU使用率:">
|
||||
{{machineUseInfo.cpuRate}}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item :span="3" label="总内存:">{{
|
||||
machineUseInfo.totalRam
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item :span="2" label="内存使用率:" >{{
|
||||
machineUseInfo.ramRate
|
||||
}}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</template>
|
||||
</a-card> -->
|
||||
</Auth>
|
||||
</container>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
machineBaseInfo: [],
|
||||
machineUseInfo: [],
|
||||
Cputitle:'',
|
||||
Ramtitle:'',
|
||||
machineNetworkInfo: [],
|
||||
Cpuoption : {
|
||||
color:'#96cff0',
|
||||
animation:false,
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
animation: false
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
max: 100,
|
||||
type: 'value',
|
||||
axisLine:{
|
||||
show:true
|
||||
},
|
||||
axisLabel:{
|
||||
show:false,
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
type: 'line',
|
||||
areaStyle: {},
|
||||
smooth:true,
|
||||
showSymbol: false,
|
||||
hoverAnimation: false,
|
||||
}]
|
||||
},
|
||||
Ramoption : {
|
||||
animation:false,
|
||||
color:'#dab7b7',
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
animation: false
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
max: 100,
|
||||
type: 'value',
|
||||
axisLine:{
|
||||
show:true
|
||||
},
|
||||
axisLabel:{
|
||||
show:false,
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
center:['50%','50%'],
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
type: 'line',
|
||||
areaStyle: {},
|
||||
smooth:true,
|
||||
showSymbol: false,
|
||||
hoverAnimation: false,
|
||||
}]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -76,12 +201,36 @@ export default {
|
||||
this.machineBaseInfo = MachineBase;
|
||||
this.machineUseInfo = MachineUseInfo;
|
||||
this.machineNetworkInfo = MachineNetwork;
|
||||
this.Cputitle = "核心数:"+MachineBase.processorCount
|
||||
this.Ramtitle = "总内存:"+MachineUseInfo.totalRam
|
||||
this.Cpuoption.series[0].data.shift();
|
||||
this.Cpuoption.series[0].data.push(this.machineUseInfo.cpuRate)
|
||||
this.Ramoption.series[0].data.shift();
|
||||
this.Ramoption.series[0].data.push(this.machineUseInfo.ramRate)
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
refreshData() {
|
||||
this.onLoadCodes();
|
||||
this.CpuLine();
|
||||
this.RamLine();
|
||||
},
|
||||
CpuLine(){
|
||||
var chartDom = this.$refs.cpuchart;
|
||||
var myChart1 = echarts.init(chartDom);
|
||||
myChart1.setOption(this.Cpuoption);
|
||||
window.addEventListener("resize",function(){
|
||||
myChart1.resize();
|
||||
})
|
||||
},
|
||||
RamLine(){
|
||||
var chartDom = this.$refs.Ramchart;
|
||||
var myChart = echarts.init(chartDom);
|
||||
myChart.setOption(this.Ramoption);
|
||||
window.addEventListener("resize",function(){
|
||||
myChart.resize();
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timer = setInterval(this.refreshData, 3000);
|
||||
@@ -91,3 +240,11 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.Ramcpu{
|
||||
Height:300px;
|
||||
width:120%;
|
||||
left:-10%;
|
||||
top:-35px;
|
||||
}
|
||||
</style>
|
||||
@@ -25,7 +25,7 @@
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="生日">
|
||||
<a-date-picker
|
||||
@change="(date) => form.birthday = date ? $moment(date).format('YYYY-MM-DD') : undefined"
|
||||
@change="(date) => form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null"
|
||||
class="w-100-p"
|
||||
placeholder="请选择生日"
|
||||
v-model="form.birthday"
|
||||
|
||||
Reference in New Issue
Block a user