😎1、调整前端适配深色模式 2、代码优化

This commit is contained in:
zuohuaijun 2025-01-13 19:33:52 +08:00
parent 30cf4929fb
commit be44f1806d
21 changed files with 63 additions and 45 deletions

View File

@ -19,7 +19,7 @@
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" /> <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" /> <PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" Aliases="BouncyCastleV2" /> <PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" Aliases="BouncyCastleV2" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.17.0" /> <PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.17.1" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.6.20" /> <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.6.20" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.6.20" /> <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.6.20" />
<PackageReference Include="Furion.Pure" Version="4.9.6.20" /> <PackageReference Include="Furion.Pure" Version="4.9.6.20" />

View File

@ -3,8 +3,10 @@
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
// //
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Extension;
public static class LogInformationExtension namespace Admin.NET.Core;
public static class LogInfoExtension
{ {
/// <summary> /// <summary>
/// 添加自定义日志 自动设置当前请求的Action和Controller名称 /// 添加自定义日志 自动设置当前请求的Action和Controller名称

View File

@ -330,7 +330,7 @@ public static class RepositoryExtension
} }
/// <summary> /// <summary>
/// 禁用过滤运行 适用于更新和删除 /// 禁用过滤运行适用于更新和删除
/// </summary> /// </summary>
/// <param name="repository">repository</param> /// <param name="repository">repository</param>
/// <param name="action"></param> /// <param name="action"></param>
@ -347,7 +347,7 @@ public static class RepositoryExtension
} }
/// <summary> /// <summary>
/// 禁用过滤运行 适用于更新和删除 /// 禁用过滤运行适用于更新和删除
/// </summary> /// </summary>
/// <param name="client">db</param> /// <param name="client">db</param>
/// <param name="action"></param> /// <param name="action"></param>

View File

@ -61,14 +61,14 @@ public class DatabaseLoggingWriter : IDatabaseLoggingWriter, IDisposable
var jsonStr = logMsg.Context?.Get("loggingMonitor")?.ToString(); var jsonStr = logMsg.Context?.Get("loggingMonitor")?.ToString();
if (string.IsNullOrWhiteSpace(jsonStr)) if (string.IsNullOrWhiteSpace(jsonStr))
{ {
var title = logMsg.Context.Get("Title")?.ToString() ?? "自定义操作日志"; //从上下文获取 通过LogInformationExtension赋值 var title = logMsg.Context.Get("Title")?.ToString() ?? "自定义操作日志";
var actionName = logMsg.Context.Get("Action")?.ToString() ?? ""; //从上下文获取 由LogInformationExtension自动赋值 var actionName = logMsg.Context.Get("Action")?.ToString() ?? "";
var controllerName = logMsg.Context.Get("Controller")?.ToString() ?? ""; //从上下文获取 由LogInformationExtension自动赋值 var controllerName = logMsg.Context.Get("Controller")?.ToString() ?? "";
var url = logMsg.Context.Get("Url")?.ToString() ?? ""; //从上下文获取 由LogInformationExtension自动赋值 var url = logMsg.Context.Get("Url")?.ToString() ?? "";
var method = logMsg.Context.Get("Method")?.ToString() ?? ""; //从上下文获取 由LogInformationExtension自动赋值 var method = logMsg.Context.Get("Method")?.ToString() ?? "";
if (string.IsNullOrWhiteSpace(actionName) && string.IsNullOrWhiteSpace(controllerName)) if (string.IsNullOrWhiteSpace(actionName) && string.IsNullOrWhiteSpace(controllerName))
{ {
//非LogInformationExtension调用,则从日志内容中获取控制器名称和函数名称 // 从日志内容中获取控制器名称和函数名称
var (action, controller) = ExtractActionAndController(logMsg.Message); var (action, controller) = ExtractActionAndController(logMsg.Message);
actionName = action; actionName = action;
controllerName = controller; controllerName = controller;

View File

@ -2,7 +2,7 @@
"name": "admin.net.pro", "name": "admin.net.pro",
"type": "module", "type": "module",
"version": "2.4.33", "version": "2.4.33",
"lastBuildTime": "2025.01.12", "lastBuildTime": "2025.01.13",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun", "author": "zuohuaijun",
"license": "MIT", "license": "MIT",
@ -74,8 +74,8 @@
"vue-router": "^4.5.0", "vue-router": "^4.5.0",
"vue-signature-pad": "^3.0.2", "vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2", "vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.3.70", "vxe-pc-ui": "^4.3.71",
"vxe-table": "^4.10.5", "vxe-table": "^4.10.0",
"vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.7", "vxe-table-plugin-export-xlsx": "^4.0.7",
"xe-utils": "^3.7.0", "xe-utils": "^3.7.0",

View File

@ -255,16 +255,16 @@ const allToLeft = () => {
max-height: 100%; max-height: 100%;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
border: 1px solid #ebeef5; box-shadow: 0 0 0 1px var(--el-border-color, var(--el-border-color)) inset;
&__header { &__header {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: nowrap; flex-wrap: nowrap;
background: #f5f7fa; // background: #f5f7fa;
padding: 3px 6px; padding: 3px 6px;
border-bottom: 1px solid #ebeef5; box-shadow: 0 0 0 1px var(--el-border-color, var(--el-border-color)) inset;
} }
&__body { &__body {
height: 400px; height: 400px;

View File

@ -89,7 +89,7 @@
// 默认样式修改 // 默认样式修改
.el-menu { .el-menu {
border-right: none !important; border-right: none !important;
width: 220px; width: auto;
} }
.el-menu-item, .el-menu-item,

View File

@ -4,7 +4,7 @@
<NoticeBar text="系统缓存数据管理,请慎重操作!!!" style="margin: 4px" /> <NoticeBar text="系统缓存数据管理,请慎重操作!!!" style="margin: 4px" />
</div> </div>
<splitpanes class="default-theme"> <splitpanes>
<pane size="20"> <pane size="20">
<el-card shadow="hover" header="缓存列表" v-loading="state.loading" style="height: 100%" body-style="height:100%; overflow:auto"> <el-card shadow="hover" header="缓存列表" v-loading="state.loading" style="height: 100%" body-style="height:100%; overflow:auto">
<template #header> <template #header>

View File

@ -150,15 +150,19 @@ const onLineClick = (lineObject: RGLine, linkObject: RGLink, $event: RGUserEvent
overflow: hidden; overflow: hidden;
} }
} }
::v-deep(.rel-easy-view) {
background-color: var(--el-color-white) !important;
}
.c-data-table { .c-data-table {
background-color: #ffffff; background-color: var(--el-color-white) !important;
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
} }
.c-data-table td, .c-data-table td,
.c-data-table th { .c-data-table th {
border: 1px solid #f39930; border: 1px solid #f39930;
color: #333333; color: var(--el-text-color-primary) !important;
padding: 5px; padding: 5px;
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
@ -166,7 +170,7 @@ const onLineClick = (lineObject: RGLine, linkObject: RGLink, $event: RGUserEvent
.c-data-table td div, .c-data-table td div,
.c-data-table th div { .c-data-table th div {
background-color: var(--el-color-primary-light-3); background-color: var(--el-color-primary-light-3);
color: #ffffff; // color: #ffffff;
border-radius: 5px; border-radius: 5px;
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="sys-file-container"> <div class="sys-file-container">
<splitpanes class="default-theme"> <splitpanes>
<pane size="15" style="display: flex"> <pane size="15" style="display: flex">
<FileTree ref="fileTreeRef" @node-click="handleNodeChange" /> <FileTree ref="fileTreeRef" @node-click="handleNodeChange" />
</pane> </pane>

View File

@ -17,5 +17,15 @@ body {
.form-designer { .form-designer {
overflow: unset !important; overflow: unset !important;
background-color: var(--el-color-white) !important;
} }
// ::v-deep(.form-widget-container) {
// background-color: var(--el-color-white) !important;
// }
// ::v-deep(.field-widget-item) {
// background-color: var(--el-color-white) !important;
// }
// ::v-deep(.container-widget-item) {
// background-color: var(--el-color-white) !important;
// }
</style> </style>

View File

@ -12,11 +12,11 @@
<ul> <ul>
<li> <li>
在需要使用 Signature 身份验证的 Api 中贴上 在需要使用 Signature 身份验证的 Api 中贴上
<p><el-tag>[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)]</el-tag></p> <p><el-tag style="border: 1 solid var(--el-border-color)">[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)]</el-tag></p>
</li> </li>
<li> <li>
如果 Api 需要保留 Jwt 方式的身份验证可贴上 如果 Api 需要保留 Jwt 方式的身份验证可贴上
<p><el-tag>[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)]</el-tag></p> <p><el-tag style="border: 1 solid var(--el-border-color)">[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)]</el-tag></p>
</li> </li>
<li> <li>
通过对请求的签名可以达到以下目的 通过对请求的签名可以达到以下目的
@ -41,7 +41,7 @@
<ul> <ul>
<li> <li>
按照如下顺序对请求中的参数进行排序各个参数通过&进行拼接中间不含空格 按照如下顺序对请求中的参数进行排序各个参数通过&进行拼接中间不含空格
<p><el-tag>method & url & accessKey & timestamp & nonce</el-tag></p> <p><el-tag style="border: 1 solid var(--el-border-color)">method & url & accessKey & timestamp & nonce</el-tag></p>
<ul> <ul>
<li><el-tag effect="plain">method</el-tag> GET</li> <li><el-tag effect="plain">method</el-tag> GET</li>
<li><el-tag effect="plain">url</el-tag> 去除协议、域名、参数,以 / 开头/api/demo/helloWord</li> <li><el-tag effect="plain">url</el-tag> 去除协议、域名、参数,以 / 开头/api/demo/helloWord</li>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="sys-org-container"> <div class="sys-org-container">
<splitpanes class="default-theme"> <splitpanes>
<pane size="15" style="display: flex"> <pane size="15" style="display: flex">
<OrgTree ref="orgTreeRef" @node-click="handleNodeChange" /> <OrgTree ref="orgTreeRef" @node-click="handleNodeChange" />
</pane> </pane>

View File

@ -420,7 +420,8 @@ defineExpose({ hiprintTemplate, printDataDemo, setPrintDataDemo, initPaper, mode
text-overflow: ellipsis; text-overflow: ellipsis;
color: var(--el-color-primary); color: var(--el-color-primary);
box-shadow: none !important; box-shadow: none !important;
// border: 1px dashed var(--el-color-primary); border: 1px solid var(--el-border-color);
background-color: var(--el-color-white);
} }
// //

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="sys-region-container"> <div class="sys-region-container">
<splitpanes class="default-theme"> <splitpanes>
<pane size="20" style="display: flex"> <pane size="20" style="display: flex">
<RegionTree ref="regionTreeRef" @node-click="handleNodeChange" /> <RegionTree ref="regionTreeRef" @node-click="handleNodeChange" />
</pane> </pane>

View File

@ -110,10 +110,10 @@
<el-col :md="24" :sm="24"> <el-col :md="24" :sm="24">
<el-card shadow="hover" header="程序集信息" style="margin-top: 5px; --el-card-padding: 10px"> <el-card shadow="hover" header="程序集信息" style="margin-top: 5px; --el-card-padding: 10px">
<div v-for="d in state.assemblyInfo" :key="d.name" style="display: inline-block; margin: 4px; text-align: left"> <div v-for="d in state.assemblyInfo" :key="d.name" style="display: inline-block; margin: 4px; text-align: left">
<el-tag round> <el-tag size="large" round style="border: 1 solid var(--el-border-color)">
<div style="display: inline-flex"> <div style="display: inline-flex">
<div>{{ d.name }}</div> <div>{{ d.name }}</div>
<div style="color: black; font-size: 9px; margin-left: 3px">v{{ d.version }}</div> <div style="color: red; font-size: 9px; margin-left: 3px">v{{ d.version }}</div>
</div> </div>
</el-tag> </el-tag>
</div> </div>
@ -224,7 +224,7 @@ onDeactivated(() => {
} }
.sysInfo_td { .sysInfo_td {
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid var(--el-border-color);
min-width: 100px; min-width: 100px;
} }
</style> </style>

View File

@ -4,7 +4,7 @@
<NoticeBar text="接口压测会占用服务器大量的系统资源(内存、带宽),请慎重操作!!!" style="margin: 4px" /> <NoticeBar text="接口压测会占用服务器大量的系统资源(内存、带宽),请慎重操作!!!" style="margin: 4px" />
</div> </div>
<splitpanes class="default-theme overlay-hidden"> <splitpanes>
<pane size="20" class="vh100"> <pane size="20" class="vh100">
<el-card class="vh80" shadow="hover" header="" v-loading="state.loading"> <el-card class="vh80" shadow="hover" header="" v-loading="state.loading">
<el-row :gutter="35"> <el-row :gutter="35">
@ -37,7 +37,7 @@
<el-icon v-else size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Link /></el-icon> <el-icon v-else size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Link /></el-icon>
{{ node.label }} {{ node.label }}
<span class="node-button" v-if="!node.data.children"> <span class="node-button" v-if="!node.data.children">
<el-button type="warning" plain icon="ele-Position" @click="treeNodeTest(node.data)" /> <el-button type="warning" icon="ele-Position" @click="treeNodeTest(node.data)" />
</span> </span>
</template> </template>
</el-tree> </el-tree>

View File

@ -32,7 +32,7 @@
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents"> <vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
<template #toolbar_buttons> <template #toolbar_buttons>
<el-button icon="ele-Plus" type="primary" @click="handleAdd" v-auth="'sysTenant/add'"> 新增 </el-button> <el-button icon="ele-Plus" type="primary" @click="handleAdd" v-auth="'sysTenant/add'"> 新增 </el-button>
<el-button type="danger" icon="ele-Refresh" @click="syncTenantDb" plain> 同步所有租户数据库 </el-button> <el-button type="danger" icon="ele-Refresh" @click="syncTenantDb"> 同步所有租户数据库 </el-button>
</template> </template>
<template #toolbar_tools> </template> <template #toolbar_tools> </template>
<template #empty> <template #empty>

View File

@ -8,7 +8,7 @@
</div> </div>
</template> </template>
<el-tabs v-loading="state.loading" v-model="state.selectedTabName"> <el-tabs v-loading="state.loading" v-model="state.selectedTabName">
<el-tab-pane label="基础信息" style="height: 550px; overflow-y: auto; overflow-x: hidden"> <el-tab-pane label="基础信息" style="height: 650px; overflow-y: auto; overflow-x: hidden">
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto"> <el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">

View File

@ -144,7 +144,7 @@
</div> </div>
</template> </template>
<div style="border: 1px dashed gray; width: 100%; height: 250px"> <div style="border: 1px dashed gray; width: 100%; height: 250px">
<VueSignaturePad ref="signaturePadRef" :options="state.signOptions" style="background-color: #fff" /> <VueSignaturePad ref="signaturePadRef" :options="state.signOptions" />
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div style="display: inline">画笔粗细<el-input-number v-model="state.signOptions.minWidth" :min="0.5" :max="2.5" :step="0.1" size="small" /></div> <div style="display: inline">画笔粗细<el-input-number v-model="state.signOptions.minWidth" :min="0.5" :max="2.5" :step="0.1" size="small" /></div>
@ -397,7 +397,7 @@ defineExpose({ handleChangeSignFile });
margin-bottom: 10px; margin-bottom: 10px;
width: 100%; width: 100%;
height: 150px; height: 150px;
background-color: #fff; // background-color: #fff;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
border: solid 1px var(--el-border-color); border: solid 1px var(--el-border-color);

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="sys-user-container"> <div class="sys-user-container">
<splitpanes class="default-theme"> <splitpanes>
<pane size="15" style="display: flex"> <pane size="15" style="display: flex">
<OrgTree ref="orgTreeRef" @node-click="handleNodeChange" /> <OrgTree ref="orgTreeRef" @node-click="handleNodeChange" />
</pane> </pane>
@ -162,6 +162,7 @@ const options = useVxeTable<UserOutput>(
}, },
// vxeGrid()vxe-table // vxeGrid()vxe-table
{ {
// height:'400',
// //
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } }, proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
// //