| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core; |
| | | |
| | | /// <summary> |
| | | /// 导出日志数据 |
| | | /// </summary> |
| | | [ExcelExporter(Name = "日志数据", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)] |
| | | public class ExportLogDto |
| | | { |
| | | /// <summary> |
| | | /// 记录器类别名称 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "记录器类别名称", IsBold = true)] |
| | | public string LogName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志级别 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志级别", IsBold = true)] |
| | | public string LogLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 事件Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "事件Id", IsBold = true)] |
| | | public string EventId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志消息 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志消息", IsBold = true)] |
| | | public string Message { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常对象 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "异常对象", IsBold = true)] |
| | | public string Exception { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 当前状态值 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "当前状态值", IsBold = true)] |
| | | public string State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志记录时间 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志记录时间", IsBold = true)] |
| | | public DateTime LogDateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 线程Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "线程Id", IsBold = true)] |
| | | public int ThreadId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 请求跟踪Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "请求跟踪Id", IsBold = true)] |
| | | public string TraceId { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | public class PageOpLogInput : PageVisLogInput |
| | | { |
| | | /// <summary> |
| | | /// 模块名称 |
| | | /// </summary> |
| | | public string? ControllerName { get; set; } |
| | | } |
| | | |
| | | public class PageExLogInput : PageOpLogInput |
| | | { |
| | | } |
| | | |
| | | public class PageVisLogInput : PageLogInput |
| | | { |
| | | /// <summary> |
| | | /// 方法名称 |
| | | ///</summary> |
| | | public string? ActionName { get; set; } |
| | | } |
| | | |
| | | public class PageLogInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 开始时间 |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束时间 |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 账号 |
| | | /// </summary> |
| | | public string? Account { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 操作用时 |
| | | /// </summary> |
| | | public long? Elapsed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public string Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// IP地址 |
| | | /// </summary> |
| | | public string? RemoteIp { get; set; } |
| | | } |
| | | |
| | | public class LogInput |
| | | { |
| | | /// <summary> |
| | | /// 开始时间 |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束时间 |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | public class LogVisOutput |
| | | { |
| | | /// <summary> |
| | | /// 登录地点 |
| | | /// </summary> |
| | | public string Location { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | | public double? Longitude { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 维度 |
| | | /// </summary> |
| | | public double? Latitude { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 真实姓名 |
| | | /// </summary> |
| | | public string RealName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志时间 |
| | | /// </summary> |
| | | public DateTime? LogDateTime { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统差异日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 330)] |
| | | public class SysLogDiffService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogDiff> _sysLogDiffRep; |
| | | |
| | | public SysLogDiffService(SqlSugarRepository<SysLogDiff> sysLogDiffRep) |
| | | { |
| | | _sysLogDiffRep = sysLogDiffRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取差异日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取差异日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogDiff>> Page(PageLogInput input) |
| | | { |
| | | return await _sysLogDiffRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取差异日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取差异日志详情")] |
| | | public async Task<SysLogDiff> GetDetail(long id) |
| | | { |
| | | return await _sysLogDiffRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空差异日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空差异日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogDiffRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogDiff>(); |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统异常日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 350)] |
| | | public class SysLogExService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogEx> _sysLogExRep; |
| | | |
| | | public SysLogExService(SqlSugarRepository<SysLogEx> sysLogExRep) |
| | | { |
| | | _sysLogExRep = sysLogExRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取异常日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取异常日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogEx>> Page(PageExLogInput input) |
| | | { |
| | | return await _sysLogExRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ControllerName), u => u.ControllerName == input.ControllerName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status == "200", u => u.Status == input.Status) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status != "200", u => u.Status != input.Status) |
| | | //.OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .IgnoreColumns(u => new { u.RequestParam, u.ReturnResult, u.Message }) |
| | | .OrderBuilder(input) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取异常日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取异常日志详情")] |
| | | public async Task<SysLogEx> GetDetail(long id) |
| | | { |
| | | return await _sysLogExRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空异常日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空异常日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogExRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogEx>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导出异常日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Export"), NonUnify] |
| | | [DisplayName("导出异常日志")] |
| | | public async Task<IActionResult> ExportLogEx(LogInput input) |
| | | { |
| | | var logExList = await _sysLogExRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()), |
| | | u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .Select<ExportLogDto>().ToListAsync(); |
| | | |
| | | IExcelExporter excelExporter = new ExcelExporter(); |
| | | var res = await excelExporter.ExportAsByteArray(logExList); |
| | | return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "异常日志.xlsx" }; |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统操作日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 360)] |
| | | public class SysLogOpService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogOp> _sysLogOpRep; |
| | | |
| | | public SysLogOpService(SqlSugarRepository<SysLogOp> sysLogOpRep) |
| | | { |
| | | _sysLogOpRep = sysLogOpRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取操作日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取操作日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogOp>> Page(PageOpLogInput input) |
| | | { |
| | | return await _sysLogOpRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ControllerName), u => u.ControllerName == input.ControllerName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | //.OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .IgnoreColumns(u => new { u.RequestParam, u.ReturnResult, u.Message }) |
| | | .OrderBuilder(input) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取操作日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取操作日志详情")] |
| | | public async Task<SysLogOp> GetDetail(long id) |
| | | { |
| | | return await _sysLogOpRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空操作日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空操作日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogOpRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogOp>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导出操作日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Export"), NonUnify] |
| | | [DisplayName("导出操作日志")] |
| | | public async Task<IActionResult> ExportLogOp(LogInput input) |
| | | { |
| | | var logOpList = await _sysLogOpRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()), |
| | | u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .Select<ExportLogDto>().ToListAsync(); |
| | | |
| | | IExcelExporter excelExporter = new ExcelExporter(); |
| | | var res = await excelExporter.ExportAsByteArray(logOpList); |
| | | return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "操作日志.xlsx" }; |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统访问日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 340)] |
| | | public class SysLogVisService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogVis> _sysLogVisRep; |
| | | |
| | | public SysLogVisService(SqlSugarRepository<SysLogVis> sysLogVisRep) |
| | | { |
| | | _sysLogVisRep = sysLogVisRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取访问日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取访问日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogVis>> Page(PageVisLogInput input) |
| | | { |
| | | return await _sysLogVisRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status == "200", u => u.Status == input.Status) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status != "200", u => u.Status != input.Status) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空访问日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空访问日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogVisRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogVis>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取访问日志列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [DisplayName("获取访问日志列表")] |
| | | public async Task<List<LogVisOutput>> GetList() |
| | | { |
| | | return await _sysLogVisRep.AsQueryable() |
| | | .Where(u => u.Longitude > 0 && u.Longitude > 0) |
| | | .Select(u => new LogVisOutput |
| | | { |
| | | Location = u.Location, |
| | | Longitude = u.Longitude, |
| | | Latitude = u.Latitude, |
| | | RealName = u.RealName, |
| | | LogDateTime = u.LogDateTime |
| | | }).ToListAsync(); |
| | | } |
| | | } |
| | |
| | | 装X|特么的|SB|屌爆了|你妹|马勒戈壁|蛋疼|买了个表|妈蛋|日了狗 |
| | | 吃翔 |
| | | 装13 |
| | | 屁民 |
| | |
| | | // } |
| | | //], |
| | | "DbSettings": { |
| | | "EnableInitDb": true, // 启用库初始化 |
| | | "EnableInitDb": false, // 启用库初始化 |
| | | "EnableDiffLog": false, // 启用库表差异日志 |
| | | "EnableUnderLine": false // 启用驼峰转下划线 |
| | | }, |
| | | "TableSettings": { |
| | | "EnableInitTable": true, // 启用表初始化 |
| | | "EnableInitTable": false, // 启用表初始化 |
| | | "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] |
| | | }, |
| | | "SeedSettings": { |
| | | "EnableInitSeed": true, // 启用种子初始化 |
| | | "EnableInitSeed": false, // 启用种子初始化 |
| | | "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] |
| | | } |
| | | } |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 上下游系统配置常量 |
| | | /// </summary> |
| | | public class SystemConfigConst |
| | | { |
| | | /// <summary> |
| | | /// 服务地址 |
| | | /// </summary> |
| | | public const string ServiceAddress = "system_service_address"; |
| | | /// <summary> |
| | | /// 服务端口 |
| | | /// </summary> |
| | | public const string ServicePort = "system_service_port"; |
| | | |
| | | /// <summary> |
| | | /// WMS地址 |
| | | /// </summary> |
| | | public const string WMSAddress = "system_wms_address"; |
| | | /// <summary> |
| | | /// WMS端口 |
| | | /// </summary> |
| | | public const string WMSPort = "system_wms_port"; |
| | | |
| | | /// <summary> |
| | | /// 赋码系统地址 |
| | | /// </summary> |
| | | public const string CodingAddress = "system_coding_address"; |
| | | /// <summary> |
| | | /// 赋码系统端口 |
| | | /// </summary> |
| | | public const string CodingPort = "system_coding_port"; |
| | | |
| | | /// <summary> |
| | | /// RCS地址 |
| | | /// </summary> |
| | | public const string RCSAddress = "system_rcs_address"; |
| | | /// <summary> |
| | | /// RCS端口 |
| | | /// </summary> |
| | | public const string RCSPort = "system_rcs_port"; |
| | | } |
| | |
| | | namespace Admin.NET.Application; |
| | | namespace WCS.Application; |
| | | |
| | | ///// <summary> |
| | | ///// 示例开放接口 |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 系统信息保存输入参数 |
| | | /// </summary> |
| | | public class SystemSaveInput |
| | | { |
| | | /// <summary> |
| | | /// 服务地址 |
| | | /// </summary> |
| | | public string ServiceAddress { get; set; } |
| | | /// <summary> |
| | | /// 服务端口 |
| | | /// </summary> |
| | | public string ServicePort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMS地址 |
| | | /// </summary> |
| | | public string WMSAddress { get; set; } |
| | | /// <summary> |
| | | /// WMS端口 |
| | | /// </summary> |
| | | public string WMSPort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 赋码系统 |
| | | /// </summary> |
| | | public string CodingAddress { get; set; } |
| | | /// <summary> |
| | | /// 赋码端口 |
| | | /// </summary> |
| | | public string CodingPort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// RCS地址 |
| | | /// </summary> |
| | | public string RCSAddress { get; set; } |
| | | /// <summary> |
| | | /// RCS端口 |
| | | /// </summary> |
| | | public string RCSPort { get; set; } |
| | | } |
| New file |
| | |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Text.RegularExpressions; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.TCBGetPressureTestReportResponse.Types; |
| | | |
| | | namespace WCS.Application; |
| | | /// <summary> |
| | | /// 系统参数配置服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 440)] |
| | | public class SysConfigService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SysCacheService _sysCacheService; |
| | | private readonly SqlSugarRepository<SysConfig> _sysConfigRep; |
| | | |
| | | public SysConfigService(SysCacheService sysCacheService, |
| | | SqlSugarRepository<SysConfig> sysConfigRep) |
| | | { |
| | | _sysCacheService = sysCacheService; |
| | | _sysConfigRep = sysConfigRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取上下游系统信息 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | //[AllowAnonymous] |
| | | [DisplayName("获取上下游系统信息")] |
| | | public async Task<dynamic> GetSystemInfo() |
| | | { |
| | | var serviceAddress = await GetConfigValue<string>(SystemConfigConst.ServiceAddress); |
| | | var servicePort = await GetConfigValue<string>(SystemConfigConst.ServicePort); |
| | | var wmsAddress = await GetConfigValue<string>(SystemConfigConst.WMSAddress); |
| | | var wmsPort = await GetConfigValue<string>(SystemConfigConst.WMSPort); |
| | | var codingAddress = await GetConfigValue<string>(SystemConfigConst.CodingAddress); |
| | | var codingPort = await GetConfigValue<string>(SystemConfigConst.CodingPort); |
| | | var rcsAddress = await GetConfigValue<string>(SystemConfigConst.RCSAddress); |
| | | var rcsPort = await GetConfigValue<string>(SystemConfigConst.RCSPort); |
| | | |
| | | return new |
| | | { |
| | | ServiceAddress = serviceAddress, |
| | | ServicePort = servicePort, |
| | | WMSAddress = wmsAddress, |
| | | WMSPort = wmsPort, |
| | | CodingAddress = codingAddress, |
| | | CodingPort = codingPort, |
| | | RCSAddress = rcsAddress, |
| | | RCSPort = rcsPort, |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 保存上下游系统信息 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [UnitOfWork] |
| | | [DisplayName("保存上下游系统信息")] |
| | | public async Task SaveSystemInfo(SystemSaveInput input) |
| | | { |
| | | await UpdateConfigValue(SystemConfigConst.ServiceAddress, input.ServiceAddress); |
| | | await UpdateConfigValue(SystemConfigConst.ServicePort, input.ServicePort); |
| | | await UpdateConfigValue(SystemConfigConst.WMSAddress, input.WMSAddress); |
| | | await UpdateConfigValue(SystemConfigConst.WMSPort, input.WMSPort); |
| | | await UpdateConfigValue(SystemConfigConst.CodingAddress, input.CodingAddress); |
| | | await UpdateConfigValue(SystemConfigConst.CodingPort, input.CodingPort); |
| | | await UpdateConfigValue(SystemConfigConst.RCSAddress, input.RCSAddress); |
| | | await UpdateConfigValue(SystemConfigConst.RCSPort, input.RCSPort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取参数配置值 |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <returns></returns> |
| | | [NonAction] |
| | | public async Task<T> GetConfigValue<T>(string code) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(code)) return default; |
| | | |
| | | var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}"); |
| | | if (string.IsNullOrEmpty(value)) |
| | | { |
| | | var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code); |
| | | value = config != null ? config.Value : default; |
| | | _sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(value)) return default; |
| | | return (T)Convert.ChangeType(value, typeof(T)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新参数配置值 |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | [NonAction] |
| | | public async Task UpdateConfigValue(string code, string value) |
| | | { |
| | | var config = await _sysConfigRep.GetFirstAsync(u => u.Code == code); |
| | | if (config == null) return; |
| | | |
| | | config.Value = value; |
| | | await _sysConfigRep.AsUpdateable(config).ExecuteCommandAsync(); |
| | | |
| | | _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}"); |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Builder; |
| | | using Microsoft.AspNetCore.Hosting; |
| | | |
| | | namespace Admin.NET.Application; |
| | | namespace WCS.Application; |
| | | |
| | | [AppStartup(100)] |
| | | public class Startup : AppStartup |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存上下游系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSaveSystemInfoPost: async (body?: InfoSaveInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/saveSystemInfo`; |
| | | // 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; |
| | | } |
| | | |
| | | localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; |
| | | |
| | | 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}; |
| | | const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; |
| | | localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); |
| | | |
| | | return { |
| | | url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, |
| | | options: localVarRequestOptions, |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSysInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/sysInfo`; |
| | | // 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: 'GET', ...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 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSystemInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/systemInfo`; |
| | | // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| | | const localVarUrlObj = new URL(localVarPath, 'https://example.com'); |
| | | let baseOptions; |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSaveSystemInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSaveSystemInfoPost(body, options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSysInfoGet(options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSystemInfoGet(options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSaveSystemInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSaveSystemInfoPost(body, options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSysInfoGet(options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSystemInfoGet(options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | |
| | | } |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | * @memberof SysConfigApi |
| | | */ |
| | | public async apiSysConfigSaveSystemInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSaveSystemInfoPost(body, options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | |
| | | } |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | * @memberof SysConfigApi |
| | | */ |
| | | public async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSystemInfoGet(options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 更新参数配置 🔖 |
| | | * @param {UpdateConfigInput} [body] |
| | | * @param {*} [options] Override http request option. |
| New file |
| | |
| | | <template> |
| | | <div> |
| | | <el-card shadow="hover" v-loading="state.isLoading"> |
| | | <el-descriptions title="上下游系统信息配置" :column="2" :border="true"> |
| | | <template #title> |
| | | <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> |
| | | <ele-Setting /> </el-icon> 上下游系统信息配置 |
| | | </template> |
| | | |
| | | <el-descriptions-item label="服务地址"> |
| | | <el-input v-model="state.formData.serviceAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="服务端口"> |
| | | <el-input v-model="state.formData.servicePort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="WMS地址"> |
| | | <el-input v-model="state.formData.wmsAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="WMS端口"> |
| | | <el-input v-model="state.formData.wmsPort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="赋码系统地址"> |
| | | <el-input v-model="state.formData.codingAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="赋码系统端口"> |
| | | <el-input v-model="state.formData.codingPort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="RCS地址"> |
| | | <el-input v-model="state.formData.rcsAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="RCS端口"> |
| | | <el-input v-model="state.formData.rcsPort" /> |
| | | </el-descriptions-item> |
| | | |
| | | <template #extra> |
| | | <el-button type="primary" icon="ele-SuccessFilled" @click="onSave">保存</el-button> |
| | | </template> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts" name="systemInfoSetting"> |
| | | import { nextTick, reactive, ref } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | import { getAPI } from '/@/utils/axios-utils'; |
| | | import { SysConfigApi } from '/@/api-services'; |
| | | |
| | | const state = reactive({ |
| | | isLoading: false, |
| | | formData: { |
| | | serviceAddress: '', |
| | | servicePort: '', |
| | | wmsAddress: '', |
| | | wmsPort: '', |
| | | codingAddress: '', |
| | | codingPort: '', |
| | | rcsAddress: '', |
| | | rcsPort: '', |
| | | }, |
| | | }); |
| | | |
| | | |
| | | // 保存 |
| | | const onSave = async () => { |
| | | try { |
| | | state.isLoading = true; |
| | | const res = await getAPI(SysConfigApi).apiSysConfigSaveSystemInfoPost({ |
| | | serviceAddress: state.formData.serviceAddress, |
| | | servicePort: state.formData.servicePort, |
| | | wmsAddress: state.formData.wmsAddress, |
| | | wmsPort: state.formData.wmsPort, |
| | | codingAddress: state.formData.codingAddress, |
| | | codingPort: state.formData.codingPort, |
| | | rcsAddress: state.formData.rcsAddress, |
| | | rcsPort: state.formData.rcsPort |
| | | }); |
| | | if (res.data!.type !== 'success') return; |
| | | await loadData(); |
| | | ElMessage.success('保存成功'); |
| | | } finally { |
| | | nextTick(() => { |
| | | state.isLoading = false; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 加载数据 |
| | | const loadData = async () => { |
| | | try { |
| | | state.isLoading = true; |
| | | const res = await getAPI(SysConfigApi).apiSysConfigSystemInfoGet(); |
| | | if (res.data!.type !== 'success') return; |
| | | |
| | | const result = res.data.result; |
| | | state.formData = { |
| | | serviceAddress: result.serviceAddress, |
| | | servicePort: result.servicePort, |
| | | wmsAddress: result.wmsAddress, |
| | | wmsPort: result.wmsPort, |
| | | codingAddress: result.codingAddress, |
| | | codingPort: result.codingPort, |
| | | rcsAddress: result.rcsAddress, |
| | | rcsPort: result.rcsPort |
| | | }; |
| | | } finally { |
| | | nextTick(() => { |
| | | state.isLoading = false; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | loadData(); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avatar-uploader .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | object-fit: contain; |
| | | } |
| | | |
| | | :deep(.avatar-uploader) .el-upload { |
| | | border: 1px dashed var(--el-border-color); |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: var(--el-transition-duration-fast); |
| | | } |
| | | |
| | | :deep(.avatar-uploader) .el-upload:hover { |
| | | border-color: var(--el-color-primary); |
| | | } |
| | | |
| | | .el-icon.avatar-uploader-icon { |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, |
| | | |
| | | /* Strict Type-Checking Options */ |
| | | "strict": true /* Enable all strict type-checking options. */, |
| | | "strict": false /* Enable all strict type-checking options. */, |
| | | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ |
| | | // "strictNullChecks": true, /* Enable strict null checks. */ |
| | | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ |
| | |
| | | "skipLibCheck": true /* Skip type checking of declaration files. */, |
| | | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ |
| | | }, |
| | | "include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled |
| | | "include": [ |
| | | "src/**/*.ts", |
| | | "src/**/*.d.ts", |
| | | "src/**/*.tsx", |
| | | "src/**/*.vue" |
| | | ], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled |
| | | "exclude": ["node_modules", "dist"] // Indicates the file directory that does not need to be compiled |
| | | } |