diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index e2d46b7c..fcc850ee 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -56,7 +56,7 @@ - + diff --git a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/SeedData/ZeroTemplateSeedData.cs b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/SeedData/ZeroTemplateSeedData.cs deleted file mode 100644 index ec438ae7..00000000 --- a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/SeedData/ZeroTemplateSeedData.cs +++ /dev/null @@ -1,51 +0,0 @@ -//// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 -//// -//// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 -//// -//// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! - -//using Admin.NET.Core; -//using ReZero.SuperAPI; - -//namespace Admin.NET.Plugin.ReZero; - -///// -///// 超级API文件模板表种子数据 -///// -//public class ZeroTemplateSeedData : ISqlSugarEntitySeedData -//{ -// /// -// /// 种子数据 -// /// -// /// -// public IEnumerable HasData() -// { -// return -// [ -// // Admin.NET 实体模板 -// new ZeroTemplate -// { -// Id=1300000000101, -// TypeId=TemplateType.Entity, -// Title="Admin.NET 实体模板", -// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// \r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// \r\n /// {{item.Description}}\r\n ///\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n", -// TemplateContentStyle="csharp", -// Url="C:\\Admin.NET.Entity\\{0}.cs", -// SortId=100, -// CreateTime=DateTime.Parse("2025-03-15 00:00:00") -// }, -// // Admin.NET 接口模板 -// new ZeroTemplate -// { -// Id=1300000000201, -// TypeId=TemplateType.Api, -// Title="Admin.NET 接口模板", -// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// \r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// \r\n /// {{item.Description}}\r\n ///\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n", -// TemplateContentStyle="csharp", -// Url="C:\\Admin.NET.Service\\{0}.cs", -// SortId=100, -// CreateTime=DateTime.Parse("2025-03-15 00:00:00") -// }, -// ]; -// } -//} \ No newline at end of file diff --git a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Service/RezeroTemplate.cs b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Service/RezeroTemplate.cs new file mode 100644 index 00000000..6021f75d --- /dev/null +++ b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Service/RezeroTemplate.cs @@ -0,0 +1,44 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using ReZero.SuperAPI; + +namespace Admin.NET.Plugin.ReZero.Service; + +/// +/// 初始化Admin.NET默认模板 +/// +public class RezeroTemplate +{ + public static void InitTemplate() + { + // Admin.NET 实体模板 + var entiyTemplate = new ZeroTemplate + { + Id = 1300000000100, + TypeId = TemplateType.Entity, + Title = "Admin.NET 实体模板", + TemplateContent = "// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// \r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// \r\n /// {{item.Description}}\r\n ///\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n", + TemplateContentStyle = "csharp", + Url = "C:\\Admin.NET.Entity\\{0}.cs", + SortId = 100, + CreateTime = DateTime.Parse("2025-03-15 00:00:00") + }; + //// Admin.NET 接口模板 + //var serviceTemplate = new ZeroTemplate + //{ + // Id = 1300000000200, + // TypeId = TemplateType.Api, + // Title = "Admin.NET 实体模板", + // TemplateContent = "// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// \r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// \r\n /// {{item.Description}}\r\n ///\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n", + // TemplateContentStyle = "csharp", + // Url = "C:\\Admin.NET.Service\\{0}.cs", + // SortId = 200, + // CreateTime = DateTime.Parse("2025-03-15 00:00:00") + //}; + ZeroDb.Db.Storageable(entiyTemplate).ExecuteCommand(); + } +} \ No newline at end of file diff --git a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Startup.cs b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Startup.cs index f9507126..d4ad78c0 100644 --- a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Startup.cs +++ b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Startup.cs @@ -50,6 +50,9 @@ public class Startup : AppStartup { api.EnableSuperApi(superAPIOption); }); + + // 初始化Admin.NET默认模板 + RezeroTemplate.InitTemplate(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) diff --git a/Web/package.json b/Web/package.json index dce455a8..3fe1c6dd 100644 --- a/Web/package.json +++ b/Web/package.json @@ -36,7 +36,7 @@ "echarts": "^5.6.0", "echarts-gl": "^2.0.9", "echarts-wordcloud": "^2.1.0", - "element-plus": "^2.9.6", + "element-plus": "^2.9.7", "exceljs": "^4.4.0", "ezuikit-js": "^8.1.7", "gcoord": "^1.0.7", @@ -46,7 +46,7 @@ "jsplumb": "^2.15.6", "jwchat": "^2.0.3", "lodash-es": "^4.17.21", - "md-editor-v3": "^5.4.2", + "md-editor-v3": "^5.4.3", "mitt": "^3.0.1", "monaco-editor": "^0.52.2", "mqtt": "^5.10.4", @@ -71,12 +71,12 @@ "vue-grid-layout": "3.0.0-beta1", "vue-i18n": "^11.1.2", "vue-json-pretty": "^2.4.0", - "vue-plugin-hiprint": "^0.0.59-beta2", + "vue-plugin-hiprint": "^0.0.59-beta4", "vue-router": "^4.5.0", "vue-signature-pad": "^3.0.2", "vue3-flag-icons": "^0.0.3", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.4.20", + "vxe-pc-ui": "^4.4.21", "vxe-table": "^4.11.28", "vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-export-xlsx": "^4.0.7", diff --git a/Web/src/stores/themeConfig.ts b/Web/src/stores/themeConfig.ts index 1d15dfc3..0ee78284 100644 --- a/Web/src/stores/themeConfig.ts +++ b/Web/src/stores/themeConfig.ts @@ -137,7 +137,7 @@ export const useThemeConfig = defineStore('themeConfig', { // 网站主标题(菜单导航、浏览器当前网页标题) globalTitle: 'Admin.NET.Pro', // 网站副标题(登录页顶部文字) - globalViceTitle: 'Admin.NET.Pro', + globalViceTitle: 'Admin.NET', // 网站副标题(登录页顶部文字) globalViceTitleMsg: '站在巨人肩膀上的 .NET 通用权限开发框架', // 版权和备案文字 diff --git a/Web/src/views/login/component/account.vue b/Web/src/views/login/component/account.vue index 623d9132..60273569 100644 --- a/Web/src/views/login/component/account.vue +++ b/Web/src/views/login/component/account.vue @@ -229,7 +229,7 @@ const onSignIn = async () => { const publicKey = window.__env__.VITE_SM_PUBLIC_KEY; const password = sm2.doEncrypt(state.ruleForm.password, publicKey, 1); - const tenantid = route.query.tenantid ?? 0; + const tenantid = route.query.tid ?? 0; const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthLoginPost({ ...state.ruleForm, password: password, tenantId: Number(tenantid) })); if (err) { getCaptcha(); // 重新获取验证码