From e77a86ef6b4e1729ce7b9f92ee5a5ec663909097 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Fri, 30 Jul 2021 15:30:40 +0800 Subject: [PATCH 001/538] - --- SoEasyPlatform/Code/Apis/SystemController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoEasyPlatform/Code/Apis/SystemController.cs b/SoEasyPlatform/Code/Apis/SystemController.cs index 75928b21..f793a788 100644 --- a/SoEasyPlatform/Code/Apis/SystemController.cs +++ b/SoEasyPlatform/Code/Apis/SystemController.cs @@ -51,7 +51,7 @@ public ActionResult>> GetDbType() { trees.Add(new TreeModel() { - Id = ((int)type).ToString(), + Id = type.ToString(), Title = type.ToString(), IsSelectable = true }); From d4f23f42f95a29561934c767712566072b1c7101 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Fri, 30 Jul 2021 22:43:49 +0800 Subject: [PATCH 002/538] bug --- SoEasyPlatform/wwwroot/views/system/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/SoEasyPlatform/wwwroot/views/system/index.js b/SoEasyPlatform/wwwroot/views/system/index.js index a04a6ff7..2c6a04df 100644 --- a/SoEasyPlatform/wwwroot/views/system/index.js +++ b/SoEasyPlatform/wwwroot/views/system/index.js @@ -85,6 +85,7 @@ btnEdit.$Open("#divOpen", { } else { gridInfo = gridInfo[0]; frmSave.$FillControls(gridInfo); + saveDbTypeName.value = saveDbType.value; return true; } }, From 1bfbb3187de5556efb2f4eeea62cf8949b050ba0 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Fri, 30 Jul 2021 22:49:52 +0800 Subject: [PATCH 003/538] bug --- SoEasyPlatform/wwwroot/views/shared/overwritesugar.js | 7 +++++++ SoEasyPlatform/wwwroot/views/system/index.js | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/SoEasyPlatform/wwwroot/views/shared/overwritesugar.js b/SoEasyPlatform/wwwroot/views/shared/overwritesugar.js index b7ee6d41..67ec1b53 100644 --- a/SoEasyPlatform/wwwroot/views/shared/overwritesugar.js +++ b/SoEasyPlatform/wwwroot/views/shared/overwritesugar.js @@ -6,6 +6,9 @@ var _root = "/api/"; var SugarContext = { Form: function (element, value) { $(function () { + if (value.before != null) { + value.before(); + } var url = value.url; var callback = value.callback; var ajaxFormOption = { @@ -185,6 +188,10 @@ var SugarContext = { return rows; }, Button: function (formElement, value) { + if (value.before != null) + { + value.before(); + } var context = this; SugarContext.Form($(formElement).closest("form")[0], value); }, diff --git a/SoEasyPlatform/wwwroot/views/system/index.js b/SoEasyPlatform/wwwroot/views/system/index.js index 2c6a04df..c813c2b0 100644 --- a/SoEasyPlatform/wwwroot/views/system/index.js +++ b/SoEasyPlatform/wwwroot/views/system/index.js @@ -16,21 +16,29 @@ } }; divFrom.$Form({ + before: function () { + btnSearch.$Loading(); + }, url: configs.url.Get, callback: function (msg) { msg.Data.Dblfunc = function () { btnEdit.click(); }; divGrid.$Grid(msg.Data); + btnSearch.$CloseLoading(); } }) btnSearch.$Button({ + before: function () { + btnSearch.$Loading(); + }, url: configs.url.Get, callback: function (msg) { msg.Data.Dblfunc = function () { btnEdit.click(); }; divGrid.$Grid(msg.Data); + btnSearch.$CloseLoading(); } }); From e2dcdc59feec1cc1f7e6c09624eb9ad5a0a0746f Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Mon, 9 Aug 2021 19:57:58 +0800 Subject: [PATCH 004/538] BUG --- SoEasyPlatform/Code/Apis/CodeTableController.cs | 2 +- SoEasyPlatform/Code/Apis/CodeTableControllerBiz.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SoEasyPlatform/Code/Apis/CodeTableController.cs b/SoEasyPlatform/Code/Apis/CodeTableController.cs index d52495d5..af888ca0 100644 --- a/SoEasyPlatform/Code/Apis/CodeTableController.cs +++ b/SoEasyPlatform/Code/Apis/CodeTableController.cs @@ -125,7 +125,7 @@ public ActionResult> SaveCodetableImport([FromForm] int dbid, [F { entity = new CodeTable(); } - foreach (var columnInfo in tableDb.DbMaintenance.GetColumnInfosByTableName(item.Name)) + foreach (var columnInfo in tableDb.DbMaintenance.GetColumnInfosByTableName(item.Name,false)) { CodeColumnsViewModel column = new CodeColumnsViewModel() { diff --git a/SoEasyPlatform/Code/Apis/CodeTableControllerBiz.cs b/SoEasyPlatform/Code/Apis/CodeTableControllerBiz.cs index 07e87b26..9c9ed087 100644 --- a/SoEasyPlatform/Code/Apis/CodeTableControllerBiz.cs +++ b/SoEasyPlatform/Code/Apis/CodeTableControllerBiz.cs @@ -89,7 +89,7 @@ private void AutoFillColumns(List dbColumns) private void CheckAddName(CodeTableViewModel viewModel, Repository codeTableDb) { CheckClassName(viewModel); - var isAny = codeTableDb.IsAny(it => it.TableName == viewModel.TableName && it.IsDeleted == false); + var isAny = codeTableDb.IsAny(it => it.TableName == viewModel.TableName && it.IsDeleted == false&&(viewModel.DbId.Value==0||viewModel.DbId==it.DbId)); if (isAny) { throw new Exception(viewModel.TableName + "表名已存在"); From 5b6ff67104d9b56aafa860dd8adda6bee5ba516d Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Mon, 9 Aug 2021 21:01:51 +0800 Subject: [PATCH 005/538] - --- SoEasyPlatform/Code/AppStart/InitTable.cs | 2 +- SoEasyPlatform/Pages/Database.cshtml | 62 ++++++++++ SoEasyPlatform/Pages/Database.cshtml.cs | 25 ++++ SoEasyPlatform/Pages/Index.cshtml | 116 +++++++++--------- SoEasyPlatform/Pages/Index.cshtml.cs | 11 +- SoEasyPlatform/Pages/Shared/Menu.cshtml | 2 +- SoEasyPlatform/Pages/Shared/_Layout.cshtml | 52 +------- SoEasyPlatform/wwwroot/build/js/custom.js | 24 ++-- SoEasyPlatform/wwwroot/views/shared/layout.js | 1 + 9 files changed, 165 insertions(+), 130 deletions(-) create mode 100644 SoEasyPlatform/Pages/Database.cshtml create mode 100644 SoEasyPlatform/Pages/Database.cshtml.cs diff --git a/SoEasyPlatform/Code/AppStart/InitTable.cs b/SoEasyPlatform/Code/AppStart/InitTable.cs index 9ddda891..28dc65d2 100644 --- a/SoEasyPlatform/Code/AppStart/InitTable.cs +++ b/SoEasyPlatform/Code/AppStart/InitTable.cs @@ -400,7 +400,7 @@ private static void InitMenu(SqlSugarClient db) Icon="fa fa-edit", Child=new List() { - new Menu{ MenuName="配置数据库" , Url="/"}, + new Menu{ MenuName="配置数据库" , Url="/Database"}, new Menu{ MenuName="CodeFirst" , Url="/CodeFirst"}, new Menu{ MenuName="DbFirst" , Url="/DbFirst"}, new Menu{ MenuName="配置业务",Url="/BIZ" }, diff --git a/SoEasyPlatform/Pages/Database.cshtml b/SoEasyPlatform/Pages/Database.cshtml new file mode 100644 index 00000000..454da85a --- /dev/null +++ b/SoEasyPlatform/Pages/Database.cshtml @@ -0,0 +1,62 @@ +@page +@{ + ViewData["Title"] = "数据库连接管理"; + Layout = "~/Pages/Shared/_Layout.cshtml"; +} +@section js{ + +} + diff --git a/SoEasyPlatform/Pages/Database.cshtml.cs b/SoEasyPlatform/Pages/Database.cshtml.cs new file mode 100644 index 00000000..a1efebaa --- /dev/null +++ b/SoEasyPlatform/Pages/Database.cshtml.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.Logging; + +namespace SoEasyPlatform.Pages +{ + public class DatabaseModel : PageModel + { + private readonly ILogger _logger; + + public DatabaseModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + + } + } +} diff --git a/SoEasyPlatform/Pages/Index.cshtml b/SoEasyPlatform/Pages/Index.cshtml index 454da85a..579ac289 100644 --- a/SoEasyPlatform/Pages/Index.cshtml +++ b/SoEasyPlatform/Pages/Index.cshtml @@ -1,62 +1,68 @@ @page -@{ - ViewData["Title"] = "数据库连接管理"; - Layout = "~/Pages/Shared/_Layout.cshtml"; -} -@section js{ - -} -