diff --git a/Yi.Abp.Net8/framework/Yi.Framework.BackgroundWorkers.Hangfire/YiTokenAuthorizationFilter.cs b/Yi.Abp.Net8/framework/Yi.Framework.BackgroundWorkers.Hangfire/YiTokenAuthorizationFilter.cs index eeb0171b..4c7c3bb8 100644 --- a/Yi.Abp.Net8/framework/Yi.Framework.BackgroundWorkers.Hangfire/YiTokenAuthorizationFilter.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.BackgroundWorkers.Hangfire/YiTokenAuthorizationFilter.cs @@ -75,6 +75,7 @@ public class YiTokenAuthorizationFilter : IDashboardAsyncAuthorizationFilter, IT function sendToken() { // 获取输入的 token var token = document.getElementById("tokenInput").value; + token = token.replace('Bearer ',''); // 构建请求 URL var url = "/hangfire"; // 发送 GET 请求 @@ -107,7 +108,7 @@ public class YiTokenAuthorizationFilter : IDashboardAsyncAuthorizationFilter, IT

Yi-hangfire

输入您的Token,我们将验证您是否为管理员

- + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScopeInput.cs similarity index 87% rename from Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScopeInput.cs index 4ef0c9c1..3ce38966 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScopeInput.cs @@ -2,7 +2,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { - public class UpdateDataScpoceInput + public class UpdateDataScopeInput { public Guid RoleId { get; set; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/RoleService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/RoleService.cs index 7ea3f185..6188f0ce 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/RoleService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/RoleService.cs @@ -39,7 +39,7 @@ namespace Yi.Framework.Rbac.Application.Services.System private ISqlSugarRepository _userRoleRepository; - public async Task UpdateDataScpoceAsync(UpdateDataScpoceInput input) + public async Task UpdateDataScopeAsync(UpdateDataScopeInput input) { //只有自定义的需要特殊处理 if (input.DataScope == DataScopeEnum.CUSTOM) diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/AddModuleCommand.cs b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/AddModuleCommand.cs index d1e9b1dc..6540a976 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/AddModuleCommand.cs +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/AddModuleCommand.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.CommandLineUtils; @@ -39,12 +40,11 @@ namespace Yi.Abp.Tool.Commands } CheckFirstSlnPath(slnPath); - var dotnetSlnCommandPart1 = $"dotnet sln \"{slnPath}\" add \"{modulePath}\\{moduleName}."; - var dotnetSlnCommandPart2 = new List() { "Application", "Application.Contracts", "Domain", "Domain.Shared", "SqlSugarCore" }; - var paths = dotnetSlnCommandPart2.Select(x => $@"{modulePath}\{moduleName}." + x).ToArray(); + var dotnetSlnCommandPart = new List() { "Application", "Application.Contracts", "Domain", "Domain.Shared", "SqlSugarCore" }; + var paths = dotnetSlnCommandPart.Select(x => Path.Combine(modulePath, $"{moduleName}.{x}")).ToArray(); CheckPathExist(paths); - - var cmdCommands = dotnetSlnCommandPart2.Select(x => dotnetSlnCommandPart1 + x+"\"").ToArray(); + + var cmdCommands = dotnetSlnCommandPart.Select(x => $"dotnet sln \"{slnPath}\" add \"{Path.Combine(modulePath, $"{moduleName}.{x}")}\"").ToArray(); StartCmd(cmdCommands); Console.WriteLine("恭喜~模块添加成功!"); @@ -81,15 +81,24 @@ namespace Yi.Abp.Tool.Commands { ProcessStartInfo psi = new ProcessStartInfo { - FileName = "cmd.exe", - Arguments = $"/c chcp 65001&{string.Join("&", cmdCommands)}", RedirectStandardInput = true, RedirectStandardOutput = true, RedirectStandardError = true, CreateNoWindow = true, UseShellExecute = false }; - + // 判断操作系统 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + psi.FileName = "cmd.exe"; + psi.Arguments = $"/c chcp 65001&{string.Join("&", cmdCommands)}"; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + psi.FileName = "/bin/bash"; + psi.Arguments = $"-c \"{string.Join("; ", cmdCommands)}\""; + } + Process proc = new Process { StartInfo = psi diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/CloneCommand.cs b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/CloneCommand.cs index 00802bc9..d959e170 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/CloneCommand.cs +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/CloneCommand.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.CommandLineUtils; @@ -35,15 +36,24 @@ namespace Yi.Abp.Tool.Commands { ProcessStartInfo psi = new ProcessStartInfo { - FileName = "cmd.exe", - Arguments = $"/c chcp 65001&{string.Join("&", cmdCommands)}", RedirectStandardInput = true, RedirectStandardOutput = true, RedirectStandardError = true, CreateNoWindow = true, UseShellExecute = false }; - + // 判断操作系统 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + psi.FileName = "cmd.exe"; + psi.Arguments = $"/c chcp 65001&{string.Join("&", cmdCommands)}"; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + psi.FileName = "/bin/bash"; + psi.Arguments = $"-c \"{string.Join("; ", cmdCommands)}\""; + } + Process proc = new Process { StartInfo = psi diff --git a/Yi.Pure.Vue3/src/api/system/role.ts b/Yi.Pure.Vue3/src/api/system/role.ts index a112cf85..49032d49 100644 --- a/Yi.Pure.Vue3/src/api/system/role.ts +++ b/Yi.Pure.Vue3/src/api/system/role.ts @@ -38,7 +38,7 @@ export const delRole = roleIds => { /** 修改角色数据权限 */ export const updataDataScope = data => { - return http.request("put", `/role/data-scpoce`, { data }); + return http.request("put", `/role/data-scope`, { data }); }; /** 根据角色ID查询菜单下拉树结构 */ diff --git a/Yi.RuoYi.Vue3/src/api/system/role.js b/Yi.RuoYi.Vue3/src/api/system/role.js index dc6da671..63f8d15e 100644 --- a/Yi.RuoYi.Vue3/src/api/system/role.js +++ b/Yi.RuoYi.Vue3/src/api/system/role.js @@ -40,7 +40,7 @@ export function updateRole(data) { // 角色数据权限 export function dataScope(data) { return request({ - url: '/role/data-scpoce', + url: '/role/data-scope', method: 'put', data: data }) diff --git a/Yi.RuoYi.Vue3/src/views/system/role/index.vue b/Yi.RuoYi.Vue3/src/views/system/role/index.vue index 5fdc3334..aef256ca 100644 --- a/Yi.RuoYi.Vue3/src/views/system/role/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/role/index.vue @@ -3,11 +3,11 @@ + @keyup.enter="handleQuery" /> + @keyup.enter="handleQuery" /> @@ -16,7 +16,7 @@ + start-placeholder="开始日期" end-placeholder="结束日期"> 搜索 @@ -29,11 +29,11 @@ 修改 + v-hasPermi="['system:role:edit']">修改 删除 + v-hasPermi="['system:role:remove']">删除 导出 @@ -52,7 +52,7 @@ @@ -72,7 +72,7 @@ + v-hasPermi="['system:role:edit']"> @@ -83,7 +83,7 @@ + @pagination="getList" /> @@ -110,7 +110,7 @@ {{ dict.label - }} + }} @@ -119,8 +119,8 @@ 父子联动 + :check-strictly="!form.menuCheckStrictly" empty-text="加载中,请稍候" + :props="{ label: 'label', children: 'children' }"> @@ -155,8 +155,8 @@ 父子联动 + :check-strictly="!form.deptCheckStrictly" empty-text="加载中,请稍候" + :props="{ label: 'label', children: 'children' }">