😎1、优化登录速度 2、代码清理及升级依赖

This commit is contained in:
zuohuaijun 2024-12-13 23:27:45 +08:00
parent 765b4f55ef
commit 3d3fa618ab
6 changed files with 525 additions and 519 deletions

View File

@ -31,8 +31,8 @@
<PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" /> <PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" />
<PackageReference Include="MailKit" Version="4.9.0" /> <PackageReference Include="MailKit" Version="4.9.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" /> <PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" />
<PackageReference Include="MiniExcel" Version="1.35.0" /> <PackageReference Include="MiniExcel" Version="1.36.0" />
<PackageReference Include="MiniWord" Version="0.8.0" /> <PackageReference Include="MiniWord" Version="0.9.0" />
<PackageReference Include="MQTTnet" Version="4.3.7.1207" /> <PackageReference Include="MQTTnet" Version="4.3.7.1207" />
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" /> <PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
<PackageReference Include="NewLife.Redis" Version="6.0.2024.1205" /> <PackageReference Include="NewLife.Redis" Version="6.0.2024.1205" />
@ -44,9 +44,9 @@
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.9.0" /> <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.9.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.171" /> <PackageReference Include="SqlSugarCore" Version="5.1.4.171" />
<PackageReference Include="SSH.NET" Version="2024.2.0" /> <PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.0" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" /> <PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1140" /> <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1141" />
<PackageReference Include="UAParser" Version="3.1.47" /> <PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" /> <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup> </ItemGroup>

View File

@ -49,7 +49,7 @@ public partial class SysPos : EntityTenant
public StatusEnum Status { get; set; } = StatusEnum.Enable; public StatusEnum Status { get; set; } = StatusEnum.Enable;
/// <summary> /// <summary>
/// 在职人 /// 在职人
/// </summary> /// </summary>
[SugarColumn(IsIgnore = true)] [SugarColumn(IsIgnore = true)]
public List<SysUser> UserList { get; set; } public List<SysUser> UserList { get; set; }

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": "2024.12.12", "lastBuildTime": "2024.12.13",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun", "author": "zuohuaijun",
"license": "MIT", "license": "MIT",
@ -18,8 +18,8 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@logicflow/core": "^2.0.9", "@logicflow/core": "^2.0.10",
"@logicflow/extension": "^2.0.13", "@logicflow/extension": "^2.0.14",
"@microsoft/signalr": "^8.0.7", "@microsoft/signalr": "^8.0.7",
"@vue-office/docx": "^1.6.2", "@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11", "@vue-office/excel": "^1.7.11",
@ -36,7 +36,7 @@
"echarts": "^5.5.1", "echarts": "^5.5.1",
"echarts-gl": "^2.0.9", "echarts-gl": "^2.0.9",
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "^2.9.0", "element-plus": "^2.9.1",
"exceljs": "^4.4.0", "exceljs": "^4.4.0",
"ezuikit-js": "^8.1.1", "ezuikit-js": "^8.1.1",
"gcoord": "^1.0.6", "gcoord": "^1.0.6",
@ -45,7 +45,7 @@
"jsplumb": "^2.15.6", "jsplumb": "^2.15.6",
"jwchat": "^2.0.3", "jwchat": "^2.0.3",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"md-editor-v3": "^5.0.2", "md-editor-v3": "^5.1.0",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"monaco-editor": "^0.52.2", "monaco-editor": "^0.52.2",
"mqtt": "^5.10.3", "mqtt": "^5.10.3",
@ -74,7 +74,7 @@
"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.28", "vxe-pc-ui": "^4.3.30",
"vxe-table": "^4.8.10", "vxe-table": "^4.8.10",
"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",
@ -100,7 +100,7 @@
"less": "^4.2.1", "less": "^4.2.1",
"prettier": "^3.4.2", "prettier": "^3.4.2",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.82.0", "sass": "^1.83.0",
"terser": "^5.37.0", "terser": "^5.37.0",
"typescript": "^5.7.2", "typescript": "^5.7.2",
"vite": "^6.0.3", "vite": "^6.0.3",

View File

@ -35,16 +35,23 @@ export const useUserInfo = defineStore('userInfo', {
// 存储字典信息到浏览器缓存 // 存储字典信息到浏览器缓存
async setDictList() { async setDictList() {
this.dictList = await getAPI(SysDictTypeApi) var dictList = await getAPI(SysDictTypeApi)
.apiSysDictTypeAllDictListGet() .apiSysDictTypeAllDictListGet()
.then((res) => res.data.result ?? {}); .then((res) => res.data.result ?? {});
for (const key in this.dictList) { var dictListTemp = JSON.parse(JSON.stringify(dictList));
// 处理字典国际化
this.dictList[key].forEach((e: any) => setDictLangMessage(e)); await Promise.all(
Object.keys(dictList).map(async (key) => {
dictList[key].forEach((da: any, index: any) => {
setDictLangMessageAsync(dictListTemp[key][index]);
});
// 如果 key 以 "Enum" 结尾,则转换 value 为数字
if (key.endsWith('Enum')) { if (key.endsWith('Enum')) {
this.dictList[key].forEach((e: any) => (e.value = Number(e.value))); dictListTemp[key].forEach((e: any) => (e.value = Number(e.value)));
}
} }
})
);
this.dictList = dictListTemp;
}, },
// 存储用户表格列到浏览器缓存 // 存储用户表格列到浏览器缓存
@ -172,7 +179,7 @@ export const useUserInfo = defineStore('userInfo', {
}); });
// 处理字典国际化, 默认显示字典中的value值 // 处理字典国际化, 默认显示字典中的value值
const setDictLangMessage = (dict: any) => { const setDictLangMessageAsync = async (dict: any) => {
dict.langMessage = `message.system.dictType.${dict.typeCode}.${dict.code}`; dict.langMessage = `message.system.dictType.${dict.typeCode}.${dict.code}`;
const value = t(dict.langMessage); const value = t(dict.langMessage);
dict.value = value !== dict.langMessage ? value : dict.value; dict.value = value !== dict.langMessage ? value : dict.value;

View File

@ -20,7 +20,6 @@
<span class="dialog-footer"> <span class="dialog-footer">
<div> <div>
<a href="https://dmfw.mca.gov.cn/9095/xzqh/getList?code=&maxLevel=4" target="_blank" style="float: left">国家地名信息库数据</a> <a href="https://dmfw.mca.gov.cn/9095/xzqh/getList?code=&maxLevel=4" target="_blank" style="float: left">国家地名信息库数据</a>
<a href="https://dmfw.mca.gov.cn/interface.html" target="_blank" style="float: left; margin-left: 15px">接口说明</a> <a href="https://dmfw.mca.gov.cn/interface.html" target="_blank" style="float: left; margin-left: 15px">接口说明</a>
</div> </div>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>