From b198b25c8ba70401445bbf5fa8d59818977ec3d3 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期四, 15 八月 2024 08:00:27 +0800
Subject: [PATCH] 系统接口地址配置
---
Admin.NET/Admin.NET.Core/Service/Log/SysLogExService.cs | 86 +++++
Admin.NET/Admin.NET.Core/Service/Log/SysLogOpService.cs | 84 ++++
Admin.NET/WCS.Application/Configuration/Database.json | 6
Web/tsconfig.json | 9
Admin.NET/Admin.NET.Core/Service/Log/Dto/ExportLogDto.cs | 68 ++++
Admin.NET/Admin.NET.Core/Service/Log/SysLogDiffService.cs | 58 +++
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogInput.cs | 73 ++++
Admin.NET/WCS.Application/Startup.cs | 2
Web/src/api-services/apis/sys-config-api.ts | 158 +++++++++
Admin.NET/Admin.NET.Web.Entry/sensitive-words.txt | 4
/dev/null | 21 -
Web/src/views/system/infoSetting/system.vue | 143 ++++++++
Admin.NET/WCS.Application/OpenApi/DemoOpenApi.cs | 2
Admin.NET/WCS.Application/Service/Config/SysConfigService.cs | 110 ++++++
Admin.NET/WCS.Application/Const/SystemConfigConst.cs | 44 ++
Admin.NET/Admin.NET.Core/Service/Log/SysLogVisService.cs | 72 ++++
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogVisOutput.cs | 35 ++
Admin.NET/WCS.Application/Service/Config/Dto/SystemSaveInput.cs | 44 ++
18 files changed, 987 insertions(+), 32 deletions(-)
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/Dto/ExportLogDto.cs b/Admin.NET/Admin.NET.Core/Service/Log/Dto/ExportLogDto.cs
new file mode 100644
index 0000000..bd99c03
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/Dto/ExportLogDto.cs
@@ -0,0 +1,68 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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; }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogInput.cs b/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogInput.cs
new file mode 100644
index 0000000..c342f4b
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogInput.cs
@@ -0,0 +1,73 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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; }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogVisOutput.cs b/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogVisOutput.cs
new file mode 100644
index 0000000..8e69aaf
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/Dto/LogVisOutput.cs
@@ -0,0 +1,35 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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; }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/SysLogDiffService.cs b/Admin.NET/Admin.NET.Core/Service/Log/SysLogDiffService.cs
new file mode 100644
index 0000000..8db3141
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/SysLogDiffService.cs
@@ -0,0 +1,58 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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>();
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/SysLogExService.cs b/Admin.NET/Admin.NET.Core/Service/Log/SysLogExService.cs
new file mode 100644
index 0000000..2519a26
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/SysLogExService.cs
@@ -0,0 +1,86 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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" };
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/SysLogOpService.cs b/Admin.NET/Admin.NET.Core/Service/Log/SysLogOpService.cs
new file mode 100644
index 0000000..7d3d2d2
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/SysLogOpService.cs
@@ -0,0 +1,84 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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" };
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/Log/SysLogVisService.cs b/Admin.NET/Admin.NET.Core/Service/Log/SysLogVisService.cs
new file mode 100644
index 0000000..9c681fd
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Service/Log/SysLogVisService.cs
@@ -0,0 +1,72 @@
+锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
+//
+// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
+//
+// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+
+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();
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Web.Entry/sensitive-words.txt b/Admin.NET/Admin.NET.Web.Entry/sensitive-words.txt
index 901a560..e69de29 100644
--- a/Admin.NET/Admin.NET.Web.Entry/sensitive-words.txt
+++ b/Admin.NET/Admin.NET.Web.Entry/sensitive-words.txt
@@ -1,4 +0,0 @@
-瑁匵|鐗逛箞鐨剕SB|灞岀垎浜唡浣犲|椹嫆鎴堝|铔嬬柤|涔颁簡涓〃|濡堣泲|鏃ヤ簡鐙�
-鍚冪繑
-瑁�13
-灞佹皯
diff --git a/Admin.NET/WCS.Application/Configuration/Database.json b/Admin.NET/WCS.Application/Configuration/Database.json
index 5132322..7f1fb9f 100644
--- a/Admin.NET/WCS.Application/Configuration/Database.json
+++ b/Admin.NET/WCS.Application/Configuration/Database.json
@@ -24,16 +24,16 @@
// }
//],
"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]
}
}
diff --git a/Admin.NET/WCS.Application/Const/ApplicationConst.cs b/Admin.NET/WCS.Application/Const/ApplicationConst.cs
deleted file mode 100644
index 7451100..0000000
--- a/Admin.NET/WCS.Application/Const/ApplicationConst.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-锘縩amespace Admin.NET.Application;
-
-/// <summary>
-/// 涓氬姟搴旂敤鐩稿叧甯搁噺
-/// </summary>
-public class ApplicationConst
-{
- /// <summary>
- /// API鍒嗙粍鍚嶇О
- /// </summary>
- public const string GroupName = "xxx涓氬姟搴旂敤";
-}
\ No newline at end of file
diff --git a/Admin.NET/WCS.Application/Const/SystemConfigConst.cs b/Admin.NET/WCS.Application/Const/SystemConfigConst.cs
new file mode 100644
index 0000000..75a3a9e
--- /dev/null
+++ b/Admin.NET/WCS.Application/Const/SystemConfigConst.cs
@@ -0,0 +1,44 @@
+锘�
+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";
+}
diff --git a/Admin.NET/WCS.Application/OpenApi/DemoOpenApi.cs b/Admin.NET/WCS.Application/OpenApi/DemoOpenApi.cs
index b5d2f6b..0224c16 100644
--- a/Admin.NET/WCS.Application/OpenApi/DemoOpenApi.cs
+++ b/Admin.NET/WCS.Application/OpenApi/DemoOpenApi.cs
@@ -1,4 +1,4 @@
-锘縩amespace Admin.NET.Application;
+锘縩amespace WCS.Application;
///// <summary>
///// 绀轰緥寮�鏀炬帴鍙�
diff --git a/Admin.NET/WCS.Application/Service/Config/Dto/SystemSaveInput.cs b/Admin.NET/WCS.Application/Service/Config/Dto/SystemSaveInput.cs
new file mode 100644
index 0000000..68a0dc5
--- /dev/null
+++ b/Admin.NET/WCS.Application/Service/Config/Dto/SystemSaveInput.cs
@@ -0,0 +1,44 @@
+锘�
+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; }
+}
\ No newline at end of file
diff --git a/Admin.NET/WCS.Application/Service/Config/SysConfigService.cs b/Admin.NET/WCS.Application/Service/Config/SysConfigService.cs
new file mode 100644
index 0000000..2c691a9
--- /dev/null
+++ b/Admin.NET/WCS.Application/Service/Config/SysConfigService.cs
@@ -0,0 +1,110 @@
+锘�
+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}");
+ }
+}
diff --git a/Admin.NET/WCS.Application/Startup.cs b/Admin.NET/WCS.Application/Startup.cs
index 35dbc7e..fadba3d 100644
--- a/Admin.NET/WCS.Application/Startup.cs
+++ b/Admin.NET/WCS.Application/Startup.cs
@@ -1,7 +1,7 @@
锘縰sing Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
-namespace Admin.NET.Application;
+namespace WCS.Application;
[AppStartup(100)]
public class Startup : AppStartup
diff --git a/Web/LICENSE b/Web/LICENSE
deleted file mode 100644
index 6f6a7ea..0000000
--- a/Web/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 lyt-Top
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/Web/src/api-services/apis/sys-config-api.ts b/Web/src/api-services/apis/sys-config-api.ts
index 5bee5bf..5e0506c 100644
--- a/Web/src/api-services/apis/sys-config-api.ts
+++ b/Web/src/api-services/apis/sys-config-api.ts
@@ -467,12 +467,103 @@
},
/**
*
+ * @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;
@@ -692,12 +783,39 @@
},
/**
*
+ * @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);
@@ -817,12 +935,31 @@
},
/**
*
+ * @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));
},
/**
*
@@ -942,6 +1079,17 @@
public async apiSysConfigSaveSysInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysConfigApiFp(this.configuration).apiSysConfigSaveSysInfoPost(body, options).then((request) => request(this.axios, this.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 鑾峰彇绯荤粺淇℃伅 馃敄
@@ -952,6 +1100,16 @@
public async apiSysConfigSysInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
return SysConfigApiFp(this.configuration).apiSysConfigSysInfoGet(options).then((request) => request(this.axios, this.basePath));
}
+ /**
+ *
+ * @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 鏇存柊鍙傛暟閰嶇疆 馃敄
diff --git a/Web/src/views/system/infoSetting/system.vue b/Web/src/views/system/infoSetting/system.vue
new file mode 100644
index 0000000..a494e70
--- /dev/null
+++ b/Web/src/views/system/infoSetting/system.vue
@@ -0,0 +1,143 @@
+<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>
diff --git a/Web/tsconfig.json b/Web/tsconfig.json
index aed1401..14ab5d9 100644
--- a/Web/tsconfig.json
+++ b/Web/tsconfig.json
@@ -25,7 +25,7 @@
"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. */
@@ -69,6 +69,11 @@
"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
}
--
Gitblit v1.8.0