diff --git a/.gitmodules b/.gitmodules index e2f67f6a..5d673544 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "refs/Furion"] - path = refs/Furion - url = https://github.com/nsnail/Furion.git + path = refs/Furion + url = https://github.com/nsnail/Furion.git [submodule "refs/ns-ext"] - path = refs/ns-ext - url = https://github.com/nsnail/ns-ext.git + path = refs/ns-ext + url = https://github.com/nsnail/ns-ext.git [submodule "refs/FreeSql"] - path = refs/FreeSql - url = https://github.com/nsnail/FreeSql.git + path = refs/FreeSql + url = https://github.com/nsnail/FreeSql.git \ No newline at end of file diff --git a/NetAdmin.sln b/NetAdmin.sln index d63f2c76..f482e3c4 100644 --- a/NetAdmin.sln +++ b/NetAdmin.sln @@ -8,63 +8,63 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "backend", "backend", "{4DAF9366-855F-46BB-AE4C-660C92FA0697}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0CAC-4828-A807-34A693F73859}" - ProjectSection(SolutionItems) = preProject - .commitlintrc.js = .commitlintrc.js - .editorconfig = .editorconfig - .gitattributes = .gitattributes - .gitignore = .gitignore - .gitmodules = .gitmodules - CHANGELOG.md = CHANGELOG.md - Directory.Build.props = Directory.Build.props - Dockerfile = Dockerfile - dotnet-tools.json = dotnet-tools.json - global.json = global.json - LICENSE = LICENSE - NetAdmin.sln.DotSettings = NetAdmin.sln.DotSettings - nuget.config = nuget.config - package.json = package.json - README.md = README.md - EndProjectSection + ProjectSection(SolutionItems) = preProject + .commitlintrc.js = .commitlintrc.js + .editorconfig = .editorconfig + .gitattributes = .gitattributes + .gitignore = .gitignore + .gitmodules = .gitmodules + CHANGELOG.md = CHANGELOG.md + Directory.Build.props = Directory.Build.props + Dockerfile = Dockerfile + dotnet-tools.json = dotnet-tools.json + global.json = global.json + LICENSE = LICENSE + NetAdmin.sln.DotSettings = NetAdmin.sln.DotSettings + nuget.config = nuget.config + package.json = package.json + README.md = README.md + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B25C9-0901-4923-913F-00F9A6B352A5}" - ProjectSection(SolutionItems) = preProject - 1.git.pull.request.ps1 = scripts/1.git.pull.request.ps1 - 2.git.release.ps1 = scripts/2.git.release.ps1 - 3.git.recreate.branch.ps1 = scripts/3.git.recreate.branch.ps1 - clean.ln.csx = scripts/clean.ln.csx - code.clean.csx = scripts/code.clean.csx - code.clean.ps1 = scripts/code.clean.ps1 - find.unused.ln.csx = scripts/find.unused.ln.csx - gen.cs.tt = scripts/gen.cs.tt - gen.id.linq = scripts/gen.id.linq - gen.ln.cmd = scripts/gen.ln.cmd - gen.resx.tt = scripts/gen.resx.tt - image.optimize.csx = scripts/image.optimize.csx - install.as.tpl.ps1 = scripts/install.as.tpl.ps1 - rename.csx = scripts/rename.csx - resharper.full.ps1 = scripts/resharper.full.ps1 - switcher.freesql.json = scripts/switcher.freesql.json - switcher.furion.json = scripts/switcher.furion.json - switcher.nsext.json = scripts/switcher.nsext.json - switcher.ps1 = scripts/switcher.ps1 - sync.sln.files.csx = scripts/sync.sln.files.csx - EndProjectSection + ProjectSection(SolutionItems) = preProject + 1.git.pull.request.ps1 = scripts/1.git.pull.request.ps1 + 2.git.release.ps1 = scripts/2.git.release.ps1 + 3.git.recreate.branch.ps1 = scripts/3.git.recreate.branch.ps1 + clean.ln.csx = scripts/clean.ln.csx + code.clean.csx = scripts/code.clean.csx + code.clean.ps1 = scripts/code.clean.ps1 + find.unused.ln.csx = scripts/find.unused.ln.csx + gen.cs.tt = scripts/gen.cs.tt + gen.id.linq = scripts/gen.id.linq + gen.ln.cmd = scripts/gen.ln.cmd + gen.resx.tt = scripts/gen.resx.tt + image.optimize.csx = scripts/image.optimize.csx + install.as.tpl.ps1 = scripts/install.as.tpl.ps1 + rename.csx = scripts/rename.csx + resharper.full.ps1 = scripts/resharper.full.ps1 + switcher.freesql.json = scripts/switcher.freesql.json + switcher.furion.json = scripts/switcher.furion.json + switcher.nsext.json = scripts/switcher.nsext.json + switcher.ps1 = scripts/switcher.ps1 + sync.sln.files.csx = scripts/sync.sln.files.csx + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1129FE25-466B-4F4F-85FC-3752664245E1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3C6F049E-3EE8-4D66-9AFF-E8A369032487}" - ProjectSection(SolutionItems) = preProject - ci.yml = .github/workflows/ci.yml - EndProjectSection + ProjectSection(SolutionItems) = preProject + ci.yml = .github/workflows/ci.yml + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}" - ProjectSection(SolutionItems) = preProject - code.quality.props = build/code.quality.props - copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets - minver.targets = build/minver.targets - prebuild.targets = build/prebuild.targets - stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset - EndProjectSection + ProjectSection(SolutionItems) = preProject + code.quality.props = build/code.quality.props + copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets + minver.targets = build/minver.targets + prebuild.targets = build/prebuild.targets + stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Infrastructure", "src\backend\NetAdmin.Infrastructure\NetAdmin.Infrastructure.csproj", "{1E62C322-EE42-4699-A6F1-791C53EFA62D}" EndProject @@ -105,92 +105,92 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Tests", "src\backend\NetAdmin.Tests\NetAdmin.Tests.csproj", "{00604162-C444-478B-B773-3AB23C856CA7}" EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.Build.0 = Release|Any CPU - {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Release|Any CPU.Build.0 = Release|Any CPU - {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Release|Any CPU.Build.0 = Release|Any CPU - {58509C57-09FA-4E3C-BC07-78E786A2A326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58509C57-09FA-4E3C-BC07-78E786A2A326}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58509C57-09FA-4E3C-BC07-78E786A2A326}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58509C57-09FA-4E3C-BC07-78E786A2A326}.Release|Any CPU.Build.0 = Release|Any CPU - {70C54E1B-2083-4196-AB68-34CAF0075D82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70C54E1B-2083-4196-AB68-34CAF0075D82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70C54E1B-2083-4196-AB68-34CAF0075D82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70C54E1B-2083-4196-AB68-34CAF0075D82}.Release|Any CPU.Build.0 = Release|Any CPU - {91839A15-D08F-4848-A301-F793412BC688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91839A15-D08F-4848-A301-F793412BC688}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91839A15-D08F-4848-A301-F793412BC688}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91839A15-D08F-4848-A301-F793412BC688}.Release|Any CPU.Build.0 = Release|Any CPU - {91452C22-4B57-4F16-9AF6-42C7BF830504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91452C22-4B57-4F16-9AF6-42C7BF830504}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91452C22-4B57-4F16-9AF6-42C7BF830504}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91452C22-4B57-4F16-9AF6-42C7BF830504}.Release|Any CPU.Build.0 = Release|Any CPU - {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Release|Any CPU.Build.0 = Release|Any CPU - {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Release|Any CPU.Build.0 = Release|Any CPU - {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Release|Any CPU.Build.0 = Release|Any CPU - {34650E82-D257-46DA-BD6B-DE307113347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34650E82-D257-46DA-BD6B-DE307113347B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34650E82-D257-46DA-BD6B-DE307113347B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34650E82-D257-46DA-BD6B-DE307113347B}.Release|Any CPU.Build.0 = Release|Any CPU - {96668960-310F-4682-B3F9-1E8F1EED8C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96668960-310F-4682-B3F9-1E8F1EED8C90}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96668960-310F-4682-B3F9-1E8F1EED8C90}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96668960-310F-4682-B3F9-1E8F1EED8C90}.Release|Any CPU.Build.0 = Release|Any CPU - {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Release|Any CPU.Build.0 = Release|Any CPU - {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {4DAF9366-855F-46BB-AE4C-660C92FA0697} = {C84EB5A0-37AD-4B17-A51E-E36888C4441E} - {12AE5B4B-CB1A-498E-83B8-04E201E31D86} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} - {3F23258D-8299-4992-9F51-2EE9B52CF9D2} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} - {CBFBF29B-27E8-4DB1-ADD6-4B750897ACD3} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} - {D9C3EF66-2757-473D-A26B-54FD08DA203F} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} - {70C54E1B-2083-4196-AB68-34CAF0075D82} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {91452C22-4B57-4F16-9AF6-42C7BF830504} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {58509C57-09FA-4E3C-BC07-78E786A2A326} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {91839A15-D08F-4848-A301-F793412BC688} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {1E62C322-EE42-4699-A6F1-791C53EFA62D} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {96668960-310F-4682-B3F9-1E8F1EED8C90} = {CBFBF29B-27E8-4DB1-ADD6-4B750897ACD3} - {E38B2EB4-D7A5-4777-9236-3B348919DF23} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} - {7CB632D3-3635-4F8D-AFE7-F496D37D422B} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} - {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} - {89260294-80FC-49F1-8D73-AECD39AFF2B7} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} - {C7F27698-DA05-4ACD-B0D7-4791B3972002} = {89260294-80FC-49F1-8D73-AECD39AFF2B7} - {3C6F049E-3EE8-4D66-9AFF-E8A369032487} = {1129FE25-466B-4F4F-85FC-3752664245E1} - {00604162-C444-478B-B773-3AB23C856CA7} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} - {34650E82-D257-46DA-BD6B-DE307113347B} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} - {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} - {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.Build.0 = Release|Any CPU + {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E38B2EB4-D7A5-4777-9236-3B348919DF23}.Release|Any CPU.Build.0 = Release|Any CPU + {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}.Release|Any CPU.Build.0 = Release|Any CPU + {58509C57-09FA-4E3C-BC07-78E786A2A326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58509C57-09FA-4E3C-BC07-78E786A2A326}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58509C57-09FA-4E3C-BC07-78E786A2A326}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58509C57-09FA-4E3C-BC07-78E786A2A326}.Release|Any CPU.Build.0 = Release|Any CPU + {70C54E1B-2083-4196-AB68-34CAF0075D82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70C54E1B-2083-4196-AB68-34CAF0075D82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70C54E1B-2083-4196-AB68-34CAF0075D82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70C54E1B-2083-4196-AB68-34CAF0075D82}.Release|Any CPU.Build.0 = Release|Any CPU + {91839A15-D08F-4848-A301-F793412BC688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91839A15-D08F-4848-A301-F793412BC688}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91839A15-D08F-4848-A301-F793412BC688}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91839A15-D08F-4848-A301-F793412BC688}.Release|Any CPU.Build.0 = Release|Any CPU + {91452C22-4B57-4F16-9AF6-42C7BF830504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91452C22-4B57-4F16-9AF6-42C7BF830504}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91452C22-4B57-4F16-9AF6-42C7BF830504}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91452C22-4B57-4F16-9AF6-42C7BF830504}.Release|Any CPU.Build.0 = Release|Any CPU + {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CB632D3-3635-4F8D-AFE7-F496D37D422B}.Release|Any CPU.Build.0 = Release|Any CPU + {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}.Release|Any CPU.Build.0 = Release|Any CPU + {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}.Release|Any CPU.Build.0 = Release|Any CPU + {34650E82-D257-46DA-BD6B-DE307113347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34650E82-D257-46DA-BD6B-DE307113347B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34650E82-D257-46DA-BD6B-DE307113347B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34650E82-D257-46DA-BD6B-DE307113347B}.Release|Any CPU.Build.0 = Release|Any CPU + {96668960-310F-4682-B3F9-1E8F1EED8C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96668960-310F-4682-B3F9-1E8F1EED8C90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96668960-310F-4682-B3F9-1E8F1EED8C90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96668960-310F-4682-B3F9-1E8F1EED8C90}.Release|Any CPU.Build.0 = Release|Any CPU + {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7F27698-DA05-4ACD-B0D7-4791B3972002}.Release|Any CPU.Build.0 = Release|Any CPU + {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4DAF9366-855F-46BB-AE4C-660C92FA0697} = {C84EB5A0-37AD-4B17-A51E-E36888C4441E} + {12AE5B4B-CB1A-498E-83B8-04E201E31D86} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} + {3F23258D-8299-4992-9F51-2EE9B52CF9D2} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} + {CBFBF29B-27E8-4DB1-ADD6-4B750897ACD3} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} + {D9C3EF66-2757-473D-A26B-54FD08DA203F} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} + {70C54E1B-2083-4196-AB68-34CAF0075D82} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {91452C22-4B57-4F16-9AF6-42C7BF830504} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {58509C57-09FA-4E3C-BC07-78E786A2A326} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {91839A15-D08F-4848-A301-F793412BC688} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {1E62C322-EE42-4699-A6F1-791C53EFA62D} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {96668960-310F-4682-B3F9-1E8F1EED8C90} = {CBFBF29B-27E8-4DB1-ADD6-4B750897ACD3} + {E38B2EB4-D7A5-4777-9236-3B348919DF23} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} + {7CB632D3-3635-4F8D-AFE7-F496D37D422B} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} + {CE895E44-EEC3-4ECE-A56A-8A82E7D863E3} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86} + {89260294-80FC-49F1-8D73-AECD39AFF2B7} = {4DAF9366-855F-46BB-AE4C-660C92FA0697} + {C7F27698-DA05-4ACD-B0D7-4791B3972002} = {89260294-80FC-49F1-8D73-AECD39AFF2B7} + {3C6F049E-3EE8-4D66-9AFF-E8A369032487} = {1129FE25-466B-4F4F-85FC-3752664245E1} + {00604162-C444-478B-B773-3AB23C856CA7} = {D9C3EF66-2757-473D-A26B-54FD08DA203F} + {34650E82-D257-46DA-BD6B-DE307113347B} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} + {19872A4C-3C9A-4C62-A33B-74F5B8D6F77C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} + {C2CC1596-3BEE-43EA-A9BE-4EDE5716296C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2} + EndGlobalSection EndGlobal \ No newline at end of file diff --git a/NetAdmin.sln.DotSettings b/NetAdmin.sln.DotSettings index e3ff26fb..7d7fc7a2 100644 --- a/NetAdmin.sln.DotSettings +++ b/NetAdmin.sln.DotSettings @@ -1,5 +1,5 @@ - Inherit + Inherit True DO_NOT_SHOW DO_NOT_SHOW diff --git a/assets/res/Statements.ln b/assets/res/Statements.ln index d8e5f83d..1d159ae8 100644 --- a/assets/res/Statements.ln +++ b/assets/res/Statements.ln @@ -63,6 +63,7 @@ XML注释文件不存在 用户头像不能为空 用户档案不能为空 用户编号不存在 +用户编号不能为空 目标设备不能为空 短信验证请求不能为空 站内信不存在 diff --git a/build/code.quality.props b/build/code.quality.props index 1b3eaf71..c9025f2a 100644 --- a/build/code.quality.props +++ b/build/code.quality.props @@ -23,7 +23,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/package.json b/package.json index fe7e1728..33d0be0f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "devDependencies": { "cz-git": "^1.8.0", "commitizen": "^4.3.0", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "standard-version": "^9.5.0" }, "config": { diff --git a/scripts/sync.sln.files.csx b/scripts/sync.sln.files.csx index 201e1d6f..b197fa69 100644 --- a/scripts/sync.sln.files.csx +++ b/scripts/sync.sln.files.csx @@ -8,12 +8,12 @@ content = Regex.Replace( "Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"meta\", \"meta\", \"{5198A03D-0CAC-4828-A807-34A693F73859}\"(?:.|\n)*?EndProject", $$""" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0CAC-4828-A807-34A693F73859}" -{{'\t'}}ProjectSection(SolutionItems) = preProject + ProjectSection(SolutionItems) = preProject {{string.Join('\n', Directory.GetFiles(@"../", "*").Where(x => !x.EndsWith(".sln") && !x.EndsWith(".user")) - .Select(x=>$"\t\t{Path.GetFileName(x)} = {Path.GetFileName(x)}") + .Select(x=>$" {Path.GetFileName(x)} = {Path.GetFileName(x)}") )}} -{{'\t'}}EndProject + EndProject """ ); @@ -22,12 +22,12 @@ content = Regex.Replace( "Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"workflows\", \"workflows\", \"{3C6F049E-3EE8-4D66-9AFF-E8A369032487}\"(?:.|\n)*?EndProject", $$""" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3C6F049E-3EE8-4D66-9AFF-E8A369032487}" -{{'\t'}}ProjectSection(SolutionItems) = preProject + ProjectSection(SolutionItems) = preProject {{string.Join('\n', Directory.GetFiles(@"../.github/workflows", "*") - .Select(x=>$"\t\t{Path.GetFileName(x)} = .github/workflows/{Path.GetFileName(x)}") + .Select(x=>$" {Path.GetFileName(x)} = .github/workflows/{Path.GetFileName(x)}") )}} -{{'\t'}}EndProject + EndProject """ ); @@ -36,12 +36,12 @@ content = Regex.Replace( "Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"scripts\", \"scripts\", \"{BB0B25C9-0901-4923-913F-00F9A6B352A5}\"(?:.|\n)*?EndProject", $$""" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B25C9-0901-4923-913F-00F9A6B352A5}" -{{'\t'}}ProjectSection(SolutionItems) = preProject + ProjectSection(SolutionItems) = preProject {{string.Join('\n', Directory.GetFiles(@"../scripts", "*") - .Select(x=>$"\t\t{Path.GetFileName(x)} = scripts/{Path.GetFileName(x)}") + .Select(x=>$" {Path.GetFileName(x)} = scripts/{Path.GetFileName(x)}") )}} -{{'\t'}}EndProject + EndProject """ ); @@ -50,12 +50,12 @@ content = Regex.Replace( "Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"build\", \"build\", \"{8E4C93BA-9493-4892-80C4-5E174C504829}\"(?:.|\n)*?EndProject", $$""" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}" -{{'\t'}}ProjectSection(SolutionItems) = preProject + ProjectSection(SolutionItems) = preProject {{string.Join('\n', Directory.GetFiles(@"../build", "*") - .Select(x=>$"\t\t{Path.GetFileName(x)} = build/{Path.GetFileName(x)}") + .Select(x=>$" {Path.GetFileName(x)} = build/{Path.GetFileName(x)}") )}} -{{'\t'}}EndProject + EndProject """ ); diff --git a/src/backend/NetAdmin.Domain/Dto/Sys/User/CreateUserReq.cs b/src/backend/NetAdmin.Domain/Dto/Sys/User/CreateUserReq.cs index 49a3bab3..a3fd26e5 100644 --- a/src/backend/NetAdmin.Domain/Dto/Sys/User/CreateUserReq.cs +++ b/src/backend/NetAdmin.Domain/Dto/Sys/User/CreateUserReq.cs @@ -13,7 +13,6 @@ public sealed record CreateUserReq : CreateUpdateUserReq, IRegister public override string PasswordText { get; init; } /// - [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))] public new CreateUserProfileReq Profile { get; init; } /// diff --git a/src/backend/NetAdmin.Domain/Dto/Sys/User/SetUserEnabledReq.cs b/src/backend/NetAdmin.Domain/Dto/Sys/User/SetUserEnabledReq.cs new file mode 100644 index 00000000..0a0f255e --- /dev/null +++ b/src/backend/NetAdmin.Domain/Dto/Sys/User/SetUserEnabledReq.cs @@ -0,0 +1,19 @@ +using NetAdmin.Domain.DbMaps.Dependency.Fields; +using NetAdmin.Domain.DbMaps.Sys; + +namespace NetAdmin.Domain.Dto.Sys.User; + +/// +/// 请求:启用/禁用用户 +/// +public sealed record SetUserEnabledReq : Sys_User +{ + /// + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public override bool Enabled { get; init; } + + /// + [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户编号不能为空))] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public override long Id { get; init; } +} \ No newline at end of file diff --git a/src/backend/NetAdmin.Domain/Dto/Sys/User/UpdateUserReq.cs b/src/backend/NetAdmin.Domain/Dto/Sys/User/UpdateUserReq.cs index 7e3ce2cc..8bb806c8 100644 --- a/src/backend/NetAdmin.Domain/Dto/Sys/User/UpdateUserReq.cs +++ b/src/backend/NetAdmin.Domain/Dto/Sys/User/UpdateUserReq.cs @@ -14,7 +14,6 @@ public sealed record UpdateUserReq : CreateUpdateUserReq public override long Id { get; init; } /// - [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))] public new UpdateUserProfileReq Profile { get; init; } /// diff --git a/src/backend/NetAdmin.Host/NetAdmin.Host.csproj b/src/backend/NetAdmin.Host/NetAdmin.Host.csproj index e6a75d24..176ffcc4 100644 --- a/src/backend/NetAdmin.Host/NetAdmin.Host.csproj +++ b/src/backend/NetAdmin.Host/NetAdmin.Host.csproj @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/src/backend/NetAdmin.Host/Utils/RequestLogger.cs b/src/backend/NetAdmin.Host/Utils/RequestLogger.cs index 39a922c9..dccb3c3b 100644 --- a/src/backend/NetAdmin.Host/Utils/RequestLogger.cs +++ b/src/backend/NetAdmin.Host/Utils/RequestLogger.cs @@ -42,9 +42,9 @@ public sealed class RequestLogger( , ResponseBody = responseBody , ServerIp = context.GetLocalIpAddressToIPv4()?.IpV4ToInt32() , ApiId = context.Request.Path.Value?.TrimStart('/') - , RequestHeaders = context.Request.Headers.ToJson() + , RequestHeaders = context.Request.Headers.Json() , ResponseContentType = context.Response.ContentType - , ResponseHeaders = context.Response.Headers.ToJson() + , ResponseHeaders = context.Response.Headers.Json() , HttpStatusCode = context.Response.StatusCode , ErrorCode = errorCode , Exception = exception?.Error.ToString() diff --git a/src/backend/NetAdmin.Infrastructure/Constant/Numbers.cs b/src/backend/NetAdmin.Infrastructure/Constant/Numbers.cs index 02937ef2..084a9788 100644 --- a/src/backend/NetAdmin.Infrastructure/Constant/Numbers.cs +++ b/src/backend/NetAdmin.Infrastructure/Constant/Numbers.cs @@ -14,14 +14,13 @@ public static class Numbers public const int CONSOLE_LINE_LEN_LIMIT = 8192; // 控制台输出的最大长度 public const long DEF_SORT_VAL = 100; // 排序默认值 public const long DIC_CATALOG_ID_GEO_AREA = 379794295185413; // 字典目录编号-行政区划字典 - public const int HEART_TIMEOUT_SECS = 600; // 心跳超时时间 public const int HTTP_STATUS_BIZ_FAIL = 900; // Http状态码-业务异常 - public const int JOB_TIMEOUT_SECS = 600; // 作业超时时间 public const int QUERY_DEF_PAGE_SIZE = 20; // 分页查询默认的页容量 public const int QUERY_LIMIT = 100; // 非分页查询允许返回的最大条数 public const int QUERY_MAX_PAGE_NO = 1000; // 分页查询允许最大的页码 public const int QUERY_MAX_PAGE_SIZE = 100; // 分页查询允许最大的页容量 - public const int RED_LOCK_EXPIRY_TIME_SECS = 30; // red lock 锁锁定过期时间,锁区域内的逻辑执行如果超过过期时间,锁将被释放 - public const int RED_LOCK_RETRY_TIME_SECS = 1; // red lock 锁等待时间内,多久尝试获取一次 - public const int RED_LOCK_WAIT_TIME_SECS = 10; // red lock 锁等待时间,相同的 resource 如果当前的锁被其他线程占用,最多等待时间 + public const int RED_LOCK_EXPIRY_TIME_SECS = 30; // red lock: 锁锁定过期时间,锁区域内的逻辑执行如果超过过期时间,锁将被释放 + public const int RED_LOCK_RETRY_TIME_SECS = 1; // red lock: 锁等待时间内,多久尝试获取一次 + public const int RED_LOCK_WAIT_TIME_SECS = 10; // red lock: 锁等待时间,相同的 resource 如果当前的锁被其他线程占用,最多等待时间 + public const int TIMEOUT_SECS_JOB = 600; // 超时时间:作业 } \ No newline at end of file diff --git a/src/backend/NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj b/src/backend/NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj index 8de51faf..83989f8e 100644 --- a/src/backend/NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj +++ b/src/backend/NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/backend/NetAdmin.SysComponent.Application/Modules/Sys/IUserModule.cs b/src/backend/NetAdmin.SysComponent.Application/Modules/Sys/IUserModule.cs index c848034a..69cd70ce 100644 --- a/src/backend/NetAdmin.SysComponent.Application/Modules/Sys/IUserModule.cs +++ b/src/backend/NetAdmin.SysComponent.Application/Modules/Sys/IUserModule.cs @@ -59,6 +59,11 @@ public interface IUserModule : ICrudModule Task SetEmailAsync(SetEmailReq req); + /// + /// 启用/禁用用户 + /// + Task SetEnabledAsync(SetUserEnabledReq req); + /// /// 设置手机号 /// diff --git a/src/backend/NetAdmin.SysComponent.Application/Services/Sys/JobService.cs b/src/backend/NetAdmin.SysComponent.Application/Services/Sys/JobService.cs index 323c3489..cc5ebbf7 100644 --- a/src/backend/NetAdmin.SysComponent.Application/Services/Sys/JobService.cs +++ b/src/backend/NetAdmin.SysComponent.Application/Services/Sys/JobService.cs @@ -153,7 +153,7 @@ public sealed class JobService(DefaultRepository rpo, IJobRecordService { return Rpo.UpdateDiy.Set(a => a.Status == JobStatues.Idle) .Where(a => a.Status == JobStatues.Running && - a.LastExecTime < DateTime.Now.AddSeconds(-Numbers.JOB_TIMEOUT_SECS)) + a.LastExecTime < DateTime.Now.AddSeconds(-Numbers.TIMEOUT_SECS_JOB)) .ExecuteAffrowsAsync(); } diff --git a/src/backend/NetAdmin.SysComponent.Application/Services/Sys/UserService.cs b/src/backend/NetAdmin.SysComponent.Application/Services/Sys/UserService.cs index 7d331dad..c5423dcb 100644 --- a/src/backend/NetAdmin.SysComponent.Application/Services/Sys/UserService.cs +++ b/src/backend/NetAdmin.SysComponent.Application/Services/Sys/UserService.cs @@ -76,7 +76,8 @@ public sealed class UserService( await Rpo.SaveManyAsync(entity, nameof(entity.Roles)).ConfigureAwait(false); // 档案表 - _ = await userProfileService.CreateAsync(req.Profile with { Id = dbUser.Id }).ConfigureAwait(false); + _ = await userProfileService.CreateAsync((req.Profile ?? new CreateUserProfileReq()) with { Id = dbUser.Id }) + .ConfigureAwait(false); var ret = await QueryAsync(new QueryReq { Filter = new QueryUserReq { Id = dbUser.Id } }) .ConfigureAwait(false); return ret.First(); @@ -299,6 +300,13 @@ public sealed class UserService( return ret; } + /// + public Task SetEnabledAsync(SetUserEnabledReq req) + { + req.ThrowIfInvalid(); + return Rpo.UpdateDiy.Set(a => a.Enabled == req.Enabled).Where(a => a.Id == req.Id).ExecuteAffrowsAsync(); + } + /// public async Task SetMobileAsync(SetMobileReq req) { @@ -386,7 +394,9 @@ public sealed class UserService( .ConfigureAwait(false); // 档案表 - _ = await userProfileService.UpdateAsync(req.Profile).ConfigureAwait(false); + if (req.Profile != null) { + _ = await userProfileService.UpdateAsync(req.Profile).ConfigureAwait(false); + } // 分表 await Rpo.SaveManyAsync(entity, nameof(entity.Roles)).ConfigureAwait(false); diff --git a/src/backend/NetAdmin.SysComponent.Cache/Sys/UserCache.cs b/src/backend/NetAdmin.SysComponent.Cache/Sys/UserCache.cs index eac95a04..8b7bdede 100644 --- a/src/backend/NetAdmin.SysComponent.Cache/Sys/UserCache.cs +++ b/src/backend/NetAdmin.SysComponent.Cache/Sys/UserCache.cs @@ -158,6 +158,12 @@ public sealed class UserCache(IDistributedCache cache, IUserService service, IVe : await Service.SetEmailAsync(req).ConfigureAwait(false); } + /// + public Task SetEnabledAsync(SetUserEnabledReq req) + { + return Service.SetEnabledAsync(req); + } + /// public Task SetMobileAsync(SetMobileReq req) { diff --git a/src/backend/NetAdmin.SysComponent.Host/Controllers/Sys/UserController.cs b/src/backend/NetAdmin.SysComponent.Host/Controllers/Sys/UserController.cs index d2c3b8e7..b24fbafe 100644 --- a/src/backend/NetAdmin.SysComponent.Host/Controllers/Sys/UserController.cs +++ b/src/backend/NetAdmin.SysComponent.Host/Controllers/Sys/UserController.cs @@ -174,6 +174,15 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache) return Cache.SetEmailAsync(req); } + /// + /// 启用/禁用用户 + /// + [Transaction] + public Task SetEnabledAsync(SetUserEnabledReq req) + { + return Cache.SetEnabledAsync(req); + } + /// /// 设置手机号 /// diff --git a/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj b/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj index 7d121760..21b9e646 100644 --- a/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj +++ b/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj @@ -9,7 +9,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/frontend/admin/src/api/sys/user.js b/src/frontend/admin/src/api/sys/user.js index 17ed3f59..aa933e51 100644 --- a/src/frontend/admin/src/api/sys/user.js +++ b/src/frontend/admin/src/api/sys/user.js @@ -159,6 +159,17 @@ export default { }, }, + /** + * 启用/禁用用户 + */ + setEnabled: { + url: `${config.API_URL}/api/sys/user/set.enabled`, + name: `启用/禁用用户`, + post: async function (data = {}, config = {}) { + return await http.post(this.url, data, config) + }, + }, + /** * 设置手机号 */ diff --git a/src/frontend/admin/src/assets/icons/AccountReport.vue b/src/frontend/admin/src/assets/icons/AccountReport.vue new file mode 100644 index 00000000..5869dbf7 --- /dev/null +++ b/src/frontend/admin/src/assets/icons/AccountReport.vue @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/ApiDoc.vue b/src/frontend/admin/src/assets/icons/ApiDoc.vue new file mode 100644 index 00000000..75353b2e --- /dev/null +++ b/src/frontend/admin/src/assets/icons/ApiDoc.vue @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Device.vue b/src/frontend/admin/src/assets/icons/Device.vue index c9248496..8f786b53 100644 --- a/src/frontend/admin/src/assets/icons/Device.vue +++ b/src/frontend/admin/src/assets/icons/Device.vue @@ -1,25 +1,8 @@ \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Element.vue b/src/frontend/admin/src/assets/icons/Element.vue new file mode 100644 index 00000000..1740e5ec --- /dev/null +++ b/src/frontend/admin/src/assets/icons/Element.vue @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Exception.vue b/src/frontend/admin/src/assets/icons/Exception.vue new file mode 100644 index 00000000..78d76d72 --- /dev/null +++ b/src/frontend/admin/src/assets/icons/Exception.vue @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Help.vue b/src/frontend/admin/src/assets/icons/Help.vue new file mode 100644 index 00000000..b3beb896 --- /dev/null +++ b/src/frontend/admin/src/assets/icons/Help.vue @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Home.vue b/src/frontend/admin/src/assets/icons/Home.vue new file mode 100644 index 00000000..72b5cab6 --- /dev/null +++ b/src/frontend/admin/src/assets/icons/Home.vue @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Kibana.vue b/src/frontend/admin/src/assets/icons/Kibana.vue index a76ba4ec..1a5571b0 100644 --- a/src/frontend/admin/src/assets/icons/Kibana.vue +++ b/src/frontend/admin/src/assets/icons/Kibana.vue @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Robot.vue b/src/frontend/admin/src/assets/icons/Robot.vue index 2101d224..ae68ed4e 100644 --- a/src/frontend/admin/src/assets/icons/Robot.vue +++ b/src/frontend/admin/src/assets/icons/Robot.vue @@ -1,24 +1,21 @@ \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/SmsCode.vue b/src/frontend/admin/src/assets/icons/SmsCode.vue index 1deae458..7b423cf2 100644 --- a/src/frontend/admin/src/assets/icons/SmsCode.vue +++ b/src/frontend/admin/src/assets/icons/SmsCode.vue @@ -1,7 +1,15 @@ \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Task.vue b/src/frontend/admin/src/assets/icons/Task.vue index 5d69592f..079f1998 100644 --- a/src/frontend/admin/src/assets/icons/Task.vue +++ b/src/frontend/admin/src/assets/icons/Task.vue @@ -1,18 +1,10 @@ \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/Version.vue b/src/frontend/admin/src/assets/icons/Version.vue new file mode 100644 index 00000000..0e69dc0b --- /dev/null +++ b/src/frontend/admin/src/assets/icons/Version.vue @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/frontend/admin/src/assets/icons/index.js b/src/frontend/admin/src/assets/icons/index.js index d8b47c56..a6dd59fc 100644 --- a/src/frontend/admin/src/assets/icons/index.js +++ b/src/frontend/admin/src/assets/icons/index.js @@ -55,4 +55,11 @@ export { default as Vue } from './Vue.vue' export { default as Warning } from './Warning.vue' export { default as Wechat } from './Wechat.vue' export { default as Report } from './Report.vue' -export { default as Daily } from './Daily.vue' \ No newline at end of file +export { default as Daily } from './Daily.vue' +export { default as AccountReport } from './AccountReport.vue' +export { default as Element } from './Element.vue' +export { default as ApiDoc } from './ApiDoc.vue' +export { default as Help } from './Help.vue' +export { default as Version } from './Version.vue' +export { default as Home } from './Home.vue' +export { default as Exception } from './Exception.vue' \ No newline at end of file diff --git a/src/frontend/admin/src/components/scTableSelect/index.vue b/src/frontend/admin/src/components/scTableSelect/index.vue index 850a8895..f582b154 100644 --- a/src/frontend/admin/src/components/scTableSelect/index.vue +++ b/src/frontend/admin/src/components/scTableSelect/index.vue @@ -149,7 +149,7 @@ export default { this.total = parseData.total this.loading = false //表格默认赋值 - this.$nextTick(() => { + await this.$nextTick(() => { if (this.multiple) { this.defaultValue.forEach((row) => { const setrow = this.tableData.filter((item) => item[this.defaultProps.value] === row[this.defaultProps.value]) @@ -178,7 +178,7 @@ export default { autoCurrentLabel() { this.$nextTick(() => { if (this.multiple) { - this.$refs.select.selected.forEach((item) => { + this.$refs.select.states.selected.forEach((item) => { item.currentLabel = item.value[this.defaultProps.label] }) } else { diff --git a/src/frontend/admin/src/config/iconSelect.js b/src/frontend/admin/src/config/iconSelect.js index 24ac5bc9..0a256b13 100644 --- a/src/frontend/admin/src/config/iconSelect.js +++ b/src/frontend/admin/src/config/iconSelect.js @@ -1 +1 @@ -export default{"icons":[{"icons":["el-icon-add-location","el-icon-aim","el-icon-alarm-clock","el-icon-apple","el-icon-arrow-down","el-icon-arrow-down-bold","el-icon-arrow-left","el-icon-arrow-left-bold","el-icon-arrow-right","el-icon-arrow-right-bold","el-icon-arrow-up","el-icon-arrow-up-bold","el-icon-avatar","el-icon-back","el-icon-baseball","el-icon-basketball","el-icon-bell","el-icon-bell-filled","el-icon-bicycle","el-icon-bottom","el-icon-bottom-left","el-icon-bottom-right","el-icon-bowl","el-icon-box","el-icon-briefcase","el-icon-brush","el-icon-brush-filled","el-icon-burger","el-icon-calendar","el-icon-camera","el-icon-camera-filled","el-icon-caret-bottom","el-icon-caret-left","el-icon-caret-right","el-icon-caret-top","el-icon-cellphone","el-icon-chat-dot-round","el-icon-chat-dot-square","el-icon-chat-line-round","el-icon-chat-line-square","el-icon-chat-round","el-icon-chat-square","el-icon-check","el-icon-checked","el-icon-cherry","el-icon-chicken","el-icon-circle-check","el-icon-circle-check-filled","el-icon-circle-close","el-icon-circle-close-filled","el-icon-circle-plus","el-icon-circle-plus-filled","el-icon-clock","el-icon-close","el-icon-close-bold","el-icon-cloudy","el-icon-coffee","el-icon-coffee-cup","el-icon-coin","el-icon-cold-drink","el-icon-collection","el-icon-collection-tag","el-icon-comment","el-icon-compass","el-icon-connection","el-icon-coordinate","el-icon-copy-document","el-icon-cpu","el-icon-credit-card","el-icon-crop","el-icon-d-arrow-left","el-icon-d-arrow-right","el-icon-d-caret","el-icon-data-analysis","el-icon-data-board","el-icon-data-line","el-icon-delete","el-icon-delete-filled","el-icon-delete-location","el-icon-dessert","el-icon-discount","el-icon-dish","el-icon-dish-dot","el-icon-document","el-icon-document-add","el-icon-document-checked","el-icon-document-copy","el-icon-document-delete","el-icon-document-remove","el-icon-download","el-icon-drizzling","el-icon-edit","el-icon-edit-pen","el-icon-eleme","el-icon-eleme-filled","el-icon-element-plus","el-icon-expand","el-icon-failed","el-icon-female","el-icon-files","el-icon-film","el-icon-filter","el-icon-finished","el-icon-first-aid-kit","el-icon-flag","el-icon-fold","el-icon-folder","el-icon-folder-add","el-icon-folder-checked","el-icon-folder-delete","el-icon-folder-opened","el-icon-folder-remove","el-icon-food","el-icon-football","el-icon-fork-spoon","el-icon-fries","el-icon-full-screen","el-icon-goblet","el-icon-goblet-full","el-icon-goblet-square","el-icon-goblet-square-full","el-icon-goods","el-icon-goods-filled","el-icon-grape","el-icon-grid","el-icon-guide","el-icon-headset","el-icon-help","el-icon-help-filled","el-icon-hide","el-icon-histogram","el-icon-home-filled","el-icon-hot-water","el-icon-house","el-icon-ice-cream","el-icon-ice-cream-round","el-icon-ice-cream-square","el-icon-ice-drink","el-icon-ice-tea","el-icon-info-filled","el-icon-iphone","el-icon-key","el-icon-knife-fork","el-icon-lightning","el-icon-link","el-icon-list","el-icon-loading","el-icon-location","el-icon-location-filled","el-icon-location-information","el-icon-lock","el-icon-lollipop","el-icon-magic-stick","el-icon-magnet","el-icon-male","el-icon-management","el-icon-map-location","el-icon-medal","el-icon-menu","el-icon-message","el-icon-message-box","el-icon-mic","el-icon-microphone","el-icon-milk-tea","el-icon-minus","el-icon-money","el-icon-monitor","el-icon-moon","el-icon-moon-night","el-icon-more","el-icon-more-filled","el-icon-mostly-cloudy","el-icon-mouse","el-icon-mug","el-icon-mute","el-icon-mute-notification","el-icon-no-smoking","el-icon-notebook","el-icon-notification","el-icon-odometer","el-icon-office-building","el-icon-open","el-icon-operation","el-icon-opportunity","el-icon-orange","el-icon-paperclip","el-icon-partly-cloudy","el-icon-pear","el-icon-phone","el-icon-phone-filled","el-icon-picture","el-icon-picture-filled","el-icon-picture-rounded","el-icon-pie-chart","el-icon-place","el-icon-platform","el-icon-plus","el-icon-pointer","el-icon-position","el-icon-postcard","el-icon-pouring","el-icon-present","el-icon-price-tag","el-icon-printer","el-icon-promotion","el-icon-question-filled","el-icon-rank","el-icon-reading","el-icon-reading-lamp","el-icon-refresh","el-icon-refresh-left","el-icon-refresh-right","el-icon-refrigerator","el-icon-remove","el-icon-remove-filled","el-icon-right","el-icon-scale-to-original","el-icon-school","el-icon-scissor","el-icon-search","el-icon-select","el-icon-sell","el-icon-semi-select","el-icon-service","el-icon-set-up","el-icon-setting","el-icon-share","el-icon-ship","el-icon-shop","el-icon-shopping-bag","el-icon-shopping-cart","el-icon-shopping-cart-full","el-icon-smoking","el-icon-soccer","el-icon-sold-out","el-icon-sort","el-icon-sort-down","el-icon-sort-up","el-icon-stamp","el-icon-star","el-icon-star-filled","el-icon-stopwatch","el-icon-success-filled","el-icon-sugar","el-icon-suitcase","el-icon-sunny","el-icon-sunrise","el-icon-sunset","el-icon-switch","el-icon-switch-button","el-icon-takeaway-box","el-icon-ticket","el-icon-tickets","el-icon-timer","el-icon-toilet-paper","el-icon-tools","el-icon-top","el-icon-top-left","el-icon-top-right","el-icon-trend-charts","el-icon-trophy","el-icon-turn-off","el-icon-umbrella","el-icon-unlock","el-icon-upload","el-icon-upload-filled","el-icon-user","el-icon-user-filled","el-icon-van","el-icon-video-camera","el-icon-video-camera-filled","el-icon-video-pause","el-icon-video-play","el-icon-view","el-icon-wallet","el-icon-wallet-filled","el-icon-warning","el-icon-warning-filled","el-icon-watch","el-icon-watermelon","el-icon-wind-power","el-icon-zoom-in","el-icon-zoom-out"],"name":"默认"},{"icons":["sc-icon-Vue","sc-icon-Code","sc-icon-Wechat","sc-icon-BugFill","sc-icon-BugLine","sc-icon-FileWord","sc-icon-FileExcel","sc-icon-FilePpt","sc-icon-Organization","sc-icon-Upload","sc-icon-Download","sc-icon-Role","sc-icon-Dept","sc-icon-Js","sc-icon-Memory","sc-icon-Dashboard","sc-icon-Api","sc-icon-Code2","sc-icon-Csharp","sc-icon-Dic","sc-icon-Position","sc-icon-Tpl","sc-icon-Demo","sc-icon-Link","sc-icon-Unlink","sc-icon-Send","sc-icon-Smscode","sc-icon-Meter","sc-icon-Grafana","sc-icon-Elastic","sc-icon-Kibana","sc-icon-Kafka","sc-icon-Resource","sc-icon-Robot","sc-icon-Device","sc-icon-Business","sc-icon-App","sc-icon-App2","sc-icon-Sync","sc-icon-Drone","sc-icon-Gitea","sc-icon-Docker","sc-icon-Task","sc-icon-ProductCategory","sc-icon-Product","sc-icon-Error","sc-icon-Warning","sc-icon-Stats","sc-icon-Log","sc-icon-OperLog","sc-icon-LoginLog","sc-icon-ExLog","sc-icon-Key","sc-icon-OpenDoor","sc-icon-Alert","sc-icon-Device","sc-icon-Task","sc-icon-Resource","sc-icon-Report","sc-icon-Daily"],"name":"扩展"}]} \ No newline at end of file +export default{"icons":[{"icons":["el-icon-add-location","el-icon-aim","el-icon-alarm-clock","el-icon-apple","el-icon-arrow-down","el-icon-arrow-down-bold","el-icon-arrow-left","el-icon-arrow-left-bold","el-icon-arrow-right","el-icon-arrow-right-bold","el-icon-arrow-up","el-icon-arrow-up-bold","el-icon-avatar","el-icon-back","el-icon-baseball","el-icon-basketball","el-icon-bell","el-icon-bell-filled","el-icon-bicycle","el-icon-bottom","el-icon-bottom-left","el-icon-bottom-right","el-icon-bowl","el-icon-box","el-icon-briefcase","el-icon-brush","el-icon-brush-filled","el-icon-burger","el-icon-calendar","el-icon-camera","el-icon-camera-filled","el-icon-caret-bottom","el-icon-caret-left","el-icon-caret-right","el-icon-caret-top","el-icon-cellphone","el-icon-chat-dot-round","el-icon-chat-dot-square","el-icon-chat-line-round","el-icon-chat-line-square","el-icon-chat-round","el-icon-chat-square","el-icon-check","el-icon-checked","el-icon-cherry","el-icon-chicken","el-icon-circle-check","el-icon-circle-check-filled","el-icon-circle-close","el-icon-circle-close-filled","el-icon-circle-plus","el-icon-circle-plus-filled","el-icon-clock","el-icon-close","el-icon-close-bold","el-icon-cloudy","el-icon-coffee","el-icon-coffee-cup","el-icon-coin","el-icon-cold-drink","el-icon-collection","el-icon-collection-tag","el-icon-comment","el-icon-compass","el-icon-connection","el-icon-coordinate","el-icon-copy-document","el-icon-cpu","el-icon-credit-card","el-icon-crop","el-icon-d-arrow-left","el-icon-d-arrow-right","el-icon-d-caret","el-icon-data-analysis","el-icon-data-board","el-icon-data-line","el-icon-delete","el-icon-delete-filled","el-icon-delete-location","el-icon-dessert","el-icon-discount","el-icon-dish","el-icon-dish-dot","el-icon-document","el-icon-document-add","el-icon-document-checked","el-icon-document-copy","el-icon-document-delete","el-icon-document-remove","el-icon-download","el-icon-drizzling","el-icon-edit","el-icon-edit-pen","el-icon-eleme","el-icon-eleme-filled","el-icon-element-plus","el-icon-expand","el-icon-failed","el-icon-female","el-icon-files","el-icon-film","el-icon-filter","el-icon-finished","el-icon-first-aid-kit","el-icon-flag","el-icon-fold","el-icon-folder","el-icon-folder-add","el-icon-folder-checked","el-icon-folder-delete","el-icon-folder-opened","el-icon-folder-remove","el-icon-food","el-icon-football","el-icon-fork-spoon","el-icon-fries","el-icon-full-screen","el-icon-goblet","el-icon-goblet-full","el-icon-goblet-square","el-icon-goblet-square-full","el-icon-goods","el-icon-goods-filled","el-icon-grape","el-icon-grid","el-icon-guide","el-icon-headset","el-icon-help","el-icon-help-filled","el-icon-hide","el-icon-histogram","el-icon-home-filled","el-icon-hot-water","el-icon-house","el-icon-ice-cream","el-icon-ice-cream-round","el-icon-ice-cream-square","el-icon-ice-drink","el-icon-ice-tea","el-icon-info-filled","el-icon-iphone","el-icon-key","el-icon-knife-fork","el-icon-lightning","el-icon-link","el-icon-list","el-icon-loading","el-icon-location","el-icon-location-filled","el-icon-location-information","el-icon-lock","el-icon-lollipop","el-icon-magic-stick","el-icon-magnet","el-icon-male","el-icon-management","el-icon-map-location","el-icon-medal","el-icon-menu","el-icon-message","el-icon-message-box","el-icon-mic","el-icon-microphone","el-icon-milk-tea","el-icon-minus","el-icon-money","el-icon-monitor","el-icon-moon","el-icon-moon-night","el-icon-more","el-icon-more-filled","el-icon-mostly-cloudy","el-icon-mouse","el-icon-mug","el-icon-mute","el-icon-mute-notification","el-icon-no-smoking","el-icon-notebook","el-icon-notification","el-icon-odometer","el-icon-office-building","el-icon-open","el-icon-operation","el-icon-opportunity","el-icon-orange","el-icon-paperclip","el-icon-partly-cloudy","el-icon-pear","el-icon-phone","el-icon-phone-filled","el-icon-picture","el-icon-picture-filled","el-icon-picture-rounded","el-icon-pie-chart","el-icon-place","el-icon-platform","el-icon-plus","el-icon-pointer","el-icon-position","el-icon-postcard","el-icon-pouring","el-icon-present","el-icon-price-tag","el-icon-printer","el-icon-promotion","el-icon-question-filled","el-icon-rank","el-icon-reading","el-icon-reading-lamp","el-icon-refresh","el-icon-refresh-left","el-icon-refresh-right","el-icon-refrigerator","el-icon-remove","el-icon-remove-filled","el-icon-right","el-icon-scale-to-original","el-icon-school","el-icon-scissor","el-icon-search","el-icon-select","el-icon-sell","el-icon-semi-select","el-icon-service","el-icon-set-up","el-icon-setting","el-icon-share","el-icon-ship","el-icon-shop","el-icon-shopping-bag","el-icon-shopping-cart","el-icon-shopping-cart-full","el-icon-smoking","el-icon-soccer","el-icon-sold-out","el-icon-sort","el-icon-sort-down","el-icon-sort-up","el-icon-stamp","el-icon-star","el-icon-star-filled","el-icon-stopwatch","el-icon-success-filled","el-icon-sugar","el-icon-suitcase","el-icon-sunny","el-icon-sunrise","el-icon-sunset","el-icon-switch","el-icon-switch-button","el-icon-takeaway-box","el-icon-ticket","el-icon-tickets","el-icon-timer","el-icon-toilet-paper","el-icon-tools","el-icon-top","el-icon-top-left","el-icon-top-right","el-icon-trend-charts","el-icon-trophy","el-icon-turn-off","el-icon-umbrella","el-icon-unlock","el-icon-upload","el-icon-upload-filled","el-icon-user","el-icon-user-filled","el-icon-van","el-icon-video-camera","el-icon-video-camera-filled","el-icon-video-pause","el-icon-video-play","el-icon-view","el-icon-wallet","el-icon-wallet-filled","el-icon-warning","el-icon-warning-filled","el-icon-watch","el-icon-watermelon","el-icon-wind-power","el-icon-zoom-in","el-icon-zoom-out"],"name":"默认"},{"icons":["sc-icon-Vue","sc-icon-Code","sc-icon-Wechat","sc-icon-BugFill","sc-icon-BugLine","sc-icon-FileWord","sc-icon-FileExcel","sc-icon-FilePpt","sc-icon-Organization","sc-icon-Upload","sc-icon-Download","sc-icon-Role","sc-icon-Dept","sc-icon-Js","sc-icon-Memory","sc-icon-Dashboard","sc-icon-Api","sc-icon-Code2","sc-icon-Csharp","sc-icon-Dic","sc-icon-Position","sc-icon-Tpl","sc-icon-Demo","sc-icon-Link","sc-icon-Unlink","sc-icon-Send","sc-icon-SmsCode","sc-icon-Meter","sc-icon-Grafana","sc-icon-Elastic","sc-icon-Kibana","sc-icon-Kafka","sc-icon-Resource","sc-icon-Robot","sc-icon-Device","sc-icon-Business","sc-icon-App","sc-icon-App2","sc-icon-Sync","sc-icon-Drone","sc-icon-Gitea","sc-icon-Docker","sc-icon-Task","sc-icon-ProductCategory","sc-icon-Product","sc-icon-Error","sc-icon-Warning","sc-icon-Stats","sc-icon-Log","sc-icon-OperLog","sc-icon-LoginLog","sc-icon-ExLog","sc-icon-Key","sc-icon-OpenDoor","sc-icon-Alert","sc-icon-Device","sc-icon-Task","sc-icon-Resource","sc-icon-Report","sc-icon-Daily","sc-icon-AccountReport","sc-icon-Element","sc-icon-ApiDoc","sc-icon-Help","sc-icon-Version","sc-icon-Home","sc-icon-Exception"],"name":"扩展"}]} \ No newline at end of file diff --git a/src/frontend/admin/src/directives/auth.js b/src/frontend/admin/src/directives/auth.js index 7b415ac2..9b905c6d 100644 --- a/src/frontend/admin/src/directives/auth.js +++ b/src/frontend/admin/src/directives/auth.js @@ -1,5 +1,4 @@ import { permissionAll } from '@/utils/permission' -import tool from '@/utils/tool' /** * 用户权限指令 @@ -9,10 +8,11 @@ import tool from '@/utils/tool' */ export default { mounted(el, binding) { - if (permissionAll()) { + if (permissionAll(binding.instance.$GLOBAL.permissions)) { return } - let permissions = tool.data.get('PERMISSIONS') - if (!permissions.some((v) => v === binding.value)) el.parentNode.removeChild(el) + if (!binding.instance.$GLOBAL.permissions.some((v) => v === binding.value)) { + el.parentNode.removeChild(el) + } }, } \ No newline at end of file diff --git a/src/frontend/admin/src/directives/auths.js b/src/frontend/admin/src/directives/auths.js index 6f70e5ca..bf9e8772 100644 --- a/src/frontend/admin/src/directives/auths.js +++ b/src/frontend/admin/src/directives/auths.js @@ -1,5 +1,4 @@ import { permissionAll } from '@/utils/permission' -import tool from '@/utils/tool' /** * 用户权限指令 @@ -9,12 +8,11 @@ import tool from '@/utils/tool' */ export default { mounted(el, binding) { - if (permissionAll()) { + if (permissionAll(binding.instance.$GLOBAL.permissions)) { return } - let permissions = tool.data.get('PERMISSIONS') let flag = false - permissions.map((val) => { + binding.instance.$GLOBAL.permissions.map((val) => { binding.value.map((v) => { if (val === v) flag = true }) diff --git a/src/frontend/admin/src/directives/authsAll.js b/src/frontend/admin/src/directives/authsAll.js index cd641cb4..2125bfcf 100644 --- a/src/frontend/admin/src/directives/authsAll.js +++ b/src/frontend/admin/src/directives/authsAll.js @@ -1,5 +1,4 @@ import { judementSameArr, permissionAll } from '@/utils/permission' -import tool from '@/utils/tool' /** * 用户权限指令 @@ -9,11 +8,10 @@ import tool from '@/utils/tool' */ export default { mounted(el, binding) { - if (permissionAll()) { + if (permissionAll(binding.instance.$GLOBAL.permissions)) { return } - let permissions = tool.data.get('PERMISSIONS') - const flag = judementSameArr(binding.value, permissions) + const flag = judementSameArr(binding.value, binding.instance.$GLOBAL.permissions) if (!flag) el.parentNode.removeChild(el) }, } \ No newline at end of file diff --git a/src/frontend/admin/src/directives/role.js b/src/frontend/admin/src/directives/role.js index 80b3c8a3..ec724ffd 100644 --- a/src/frontend/admin/src/directives/role.js +++ b/src/frontend/admin/src/directives/role.js @@ -6,7 +6,7 @@ export default { if (Array.isArray(value)) { let ishas = false value.forEach((item) => { - if (rolePermission(item)) { + if (rolePermission(item, binding.instance.$GLOBAL.user)) { ishas = true } }) @@ -14,7 +14,7 @@ export default { el.parentNode.removeChild(el) } } else { - if (!rolePermission(value)) { + if (!rolePermission(value, binding.instance.$GLOBAL.user)) { el.parentNode.removeChild(el) } } diff --git a/src/frontend/admin/src/global.js b/src/frontend/admin/src/global.js index 45c9fa6d..3f3d9eec 100644 --- a/src/frontend/admin/src/global.js +++ b/src/frontend/admin/src/global.js @@ -38,7 +38,6 @@ import scUploadMultiple from '@/components/scUpload/multiple' import scWaterMark from '@/components/scWaterMark' import time from '@/directives/time' import tool from '@/utils/tool' -import { permission, rolePermission } from '@/utils/permission' import JsonViewer from 'vue3-json-viewer' import 'vue3-json-viewer/dist/index.css' import naColTime from '@/components/naColTime/index.vue' @@ -54,8 +53,6 @@ export default { app.config.globalProperties.$HTTP = http app.config.globalProperties.$API = api - app.config.globalProperties.$AUTH = permission - app.config.globalProperties.$ROLE = rolePermission app.config.globalProperties.$GLOBAL = { enums: null, menu: null, diff --git a/src/frontend/admin/src/layout/components/tasks.vue b/src/frontend/admin/src/layout/components/tasks.vue index 6b1f4d1e..a97cf223 100644 --- a/src/frontend/admin/src/layout/components/tasks.vue +++ b/src/frontend/admin/src/layout/components/tasks.vue @@ -3,13 +3,13 @@

- 在处理耗时过久的任务时为了不阻碍正在处理的工作,可在任务中心进行异步执行。 + 在处理耗时过久的作业时为了不阻碍正在处理的工作,可在作业中心进行异步执行。

- +
{{ job.lastStatusCode }} @@ -24,11 +24,15 @@
- 执行中 - 空闲 + 执行中 + 空闲
- +
@@ -63,7 +67,7 @@ export default { methods: { async getData() { this.loading = true - const res = await this.$API.sys_job.query.post({ prop: 'lastExecTime', order: 'descending' }) + const res = await this.$API.sys_job.query.post({ prop: 'lastStatusCode', order: 'descending' }) this.jobs = res.data this.loading = false }, @@ -83,11 +87,14 @@ export default { .user-bar-jobs-item { margin-bottom: 0.5rem; } - .user-bar-jobs-item:hover { border-color: var(--el-color-primary); } +.user-bar-jobs-item.alert:hover { + border-color: var(--el-color-danger); +} + .user-bar-jobs-item-body { display: flex; } @@ -103,7 +110,6 @@ export default { color: var(--el-color-primary); border-radius: 1.5rem; } - .user-bar-jobs-item-body .jobMain { flex: 1; } @@ -123,4 +129,9 @@ export default { justify-content: space-between; align-items: center; } + +.user-bar-jobs-item.alert .jobIcon { + background: var(--el-color-danger-light-9); + color: var(--el-color-danger); +} \ No newline at end of file diff --git a/src/frontend/admin/src/layout/components/userbar.vue b/src/frontend/admin/src/layout/components/userbar.vue index 5393b5fe..358b10c2 100644 --- a/src/frontend/admin/src/layout/components/userbar.vue +++ b/src/frontend/admin/src/layout/components/userbar.vue @@ -59,7 +59,7 @@ - + diff --git a/src/frontend/admin/src/utils/permission.js b/src/frontend/admin/src/utils/permission.js index a65a41c7..67392d23 100644 --- a/src/frontend/admin/src/utils/permission.js +++ b/src/frontend/admin/src/utils/permission.js @@ -1,12 +1,8 @@ -import tool from '@/utils/tool' - /** * 是否含有不限分类,有则表示全部允许通过 */ -export function permissionAll() { - const allPermissions = '*/*/*' - let permissions = tool.data.get('PERMISSIONS') - return permissions.includes(allPermissions) +export function permissionAll(permissions) { + return permissions.includes('*/*/*') } /** @@ -32,22 +28,9 @@ export function judementSameArr(news, old) { return count === len } -export function permission(data) { - let permissions = tool.data.get('PERMISSIONS') - if (!permissions) { +export function rolePermission(data, user) { + if (!user || !user.roles) { return false } - return permissions.includes(data) -} - -export function rolePermission(data) { - let userInfo = tool.data.get('USER_INFO') - if (!userInfo) { - return false - } - let role = userInfo.role - if (!role) { - return false - } - return role.includes(data) + return user.roles.some((x) => x.name === data) } \ No newline at end of file diff --git a/src/frontend/admin/src/utils/preload.js b/src/frontend/admin/src/utils/preload.js index 4b0d1ca7..b7b81c24 100644 --- a/src/frontend/admin/src/utils/preload.js +++ b/src/frontend/admin/src/utils/preload.js @@ -1,4 +1,5 @@ import Api from '@/api' +import tool from '@/utils/tool' export default { async install(app, global) { @@ -46,5 +47,6 @@ export default { global.enums = preloads[2]?.data global.numbers = preloads[3]?.data global.chars = preloads[4]?.data + global.permissions = tool.recursiveFindProperty(preloads[0]?.data, 'type', 'button').map((x) => x.tag) }, } \ No newline at end of file diff --git a/src/frontend/admin/src/utils/tool.js b/src/frontend/admin/src/utils/tool.js index 28a11646..e0e34050 100644 --- a/src/frontend/admin/src/utils/tool.js +++ b/src/frontend/admin/src/utils/tool.js @@ -225,6 +225,34 @@ tool.sortProperties = function (obj) { return sortedObject } +tool.recursiveFindProperty = function (obj, propName, propValue, result = [], visited = new Set()) { + if (visited.has(obj)) { + return result + } + + visited.add(obj) + + if (Array.isArray(obj)) { + // 遍历数组 + for (const item of obj) { + this.recursiveFindProperty(item, propName, propValue, result, visited) + } + } else if (typeof obj === 'object') { + // 遍历对象的属性 + for (const key in obj) { + if (key === propName && obj[key] === propValue) { + // 找到匹配的对象,将其添加到结果数组中 + result.push(obj) + } else { + // 继续递归遍历子对象或数组 + this.recursiveFindProperty(obj[key], propName, propValue, result, visited) + } + } + } + + return result +} + //TAB 刷新 tool.refreshTab = function (_this) { _this.$parent.keepAliveList = [] diff --git a/src/frontend/admin/src/views/guest/register.vue b/src/frontend/admin/src/views/guest/register.vue index 09c8a69d..c5bf4a42 100644 --- a/src/frontend/admin/src/views/guest/register.vue +++ b/src/frontend/admin/src/views/guest/register.vue @@ -43,7 +43,7 @@ form-name="stepForm_1">
- + diff --git a/src/frontend/admin/src/views/guest/resetPassword.vue b/src/frontend/admin/src/views/guest/resetPassword.vue index faed02d5..27524265 100644 --- a/src/frontend/admin/src/views/guest/resetPassword.vue +++ b/src/frontend/admin/src/views/guest/resetPassword.vue @@ -8,11 +8,11 @@ + form-name="form"> diff --git a/src/frontend/admin/src/views/sys/config/save.vue b/src/frontend/admin/src/views/sys/config/save.vue index 456c3235..6e71cff8 100644 --- a/src/frontend/admin/src/views/sys/config/save.vue +++ b/src/frontend/admin/src/views/sys/config/save.vue @@ -6,17 +6,18 @@ -
+
+ filterable + style="width: 15rem" /> - + diff --git a/src/frontend/admin/src/views/sys/menu/index.vue b/src/frontend/admin/src/views/sys/menu/index.vue index 7764d6bb..245570fe 100644 --- a/src/frontend/admin/src/views/sys/menu/index.vue +++ b/src/frontend/admin/src/views/sys/menu/index.vue @@ -14,7 +14,7 @@ :filter-node-method="treeFilterNode" :props="{ label: (data) => { - return data.meta.title + return data.meta.title + ' - ' + data.sort }, }" @node-click="treeClick" diff --git a/src/frontend/admin/src/views/sys/msg/save.vue b/src/frontend/admin/src/views/sys/msg/save.vue index 3670ca1e..dbb32fd9 100644 --- a/src/frontend/admin/src/views/sys/msg/save.vue +++ b/src/frontend/admin/src/views/sys/msg/save.vue @@ -22,7 +22,7 @@ - + diff --git a/src/frontend/admin/src/views/sys/role/index.vue b/src/frontend/admin/src/views/sys/role/index.vue index a563cb79..6921fde1 100644 --- a/src/frontend/admin/src/views/sys/role/index.vue +++ b/src/frontend/admin/src/views/sys/role/index.vue @@ -98,7 +98,6 @@ prop="displayDashboard"> - - + + + - @@ -128,6 +125,16 @@ export default { mounted() {}, created() {}, methods: { + //表格内开关事件 + async changeSwitch(event, row) { + try { + await this.$API.sys_user.setEnabled.post(row) + this.$message.success(`操作成功`) + } catch { + // + } + this.$refs.table.refresh() + }, async openDialog(api, id, dialog) { this.loading = true const res = await this.$API[api].query.post({ diff --git a/src/frontend/admin/src/views/sys/user/save.vue b/src/frontend/admin/src/views/sys/user/save.vue index a8f62b19..d62b2582 100644 --- a/src/frontend/admin/src/views/sys/user/save.vue +++ b/src/frontend/admin/src/views/sys/user/save.vue @@ -154,7 +154,7 @@ @@ -175,7 +175,7 @@ @@ -206,7 +206,7 @@ @@ -248,10 +248,10 @@ export default { //表单数据 form: { profile: { - nationArea: {}, - homeArea: {}, - companyArea: {}, - emergencyContactArea: {}, + nationArea: '', + homeArea: '', + companyArea: '', + emergencyContactArea: '', }, }, //验证规则 @@ -342,7 +342,7 @@ export default { this.visible = false this.$message.success('操作成功') } catch { - // + this.loading = false } }, },