😎1、优化web打包 2、升级依赖及删除无效的npm包

This commit is contained in:
zuohuaijun 2025-08-05 18:37:56 +08:00
parent 552bb47c42
commit a0c5711650
5 changed files with 18 additions and 446 deletions

View File

@ -27,10 +27,10 @@
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" Aliases="BouncyCastleV2" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.7" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.106" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.106" />
<PackageReference Include="Furion.Pure" Version="4.9.7.106" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.1.0" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.107" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.107" />
<PackageReference Include="Furion.Pure" Version="4.9.7.107" />
<PackageReference Include="Hardware.Info" Version="101.0.1.1" />
<PackageReference Include="Hashids.net" Version="1.7.0" />
<PackageReference Include="IPTools.China" Version="1.6.0" />
@ -43,7 +43,7 @@
<PackageReference Include="MiniExcel" Version="1.41.3" />
<PackageReference Include="MiniWord" Version="0.9.2" />
<PackageReference Include="MQTTnet.Server" Version="5.0.1.1416" />
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.6.4" />
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.6.5" />
<PackageReference Include="NewLife.Redis" Version="6.3.2025.801" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="4.0.0" />
<PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.2.0" />
@ -52,7 +52,7 @@
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.2.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.11.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.13.0" />
<PackageReference Include="SqlSugar.MongoDbCore" Version="5.1.4.238" />
<PackageReference Include="SqlSugar.MongoDbCore" Version="5.1.4.243" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.199" />
<PackageReference Include="SSH.NET" Version="2025.0.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.7" />
@ -85,9 +85,9 @@
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="9.4.0" />
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="9.4.0" />
<PackageReference Include="Lazy.Captcha.Core" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.7" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.7" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.7" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.8" />
<PackageReference Include="My.Extensions.Localization.Json" Version="3.4.0" />
</ItemGroup>

View File

@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.16" />
<PackageReference Include="MQTTnet.AspNetCore" Version="5.0.1.1416" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.7" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.8" />
</ItemGroup>
<ItemGroup>

View File

@ -2,7 +2,7 @@
"name": "admin.net.pro",
"type": "module",
"version": "2.4.33",
"lastBuildTime": "2025.08.01",
"lastBuildTime": "2025.08.05",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun",
"license": "MIT",
@ -17,7 +17,7 @@
"build-goView-api": "cd api_build/ && build.bat goView"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@element-plus/icons-vue": "^2.3.2",
"@logicflow/core": "^2.0.16",
"@logicflow/extension": "^2.0.21",
"@microsoft/signalr": "^9.0.6",
@ -36,16 +36,12 @@
"cropperjs": "^1.6.2",
"crypto-js": "^4.2.0",
"echarts": "^6.0.0",
"echarts-gl": "^2.0.9",
"echarts-wordcloud": "^2.1.0",
"element-plus": "^2.10.5",
"exceljs": "^4.4.0",
"ezuikit-js": "^8.1.12",
"flag-icons": "^7.5.0",
"franc": "^6.2.0",
"gcoord": "^1.0.7",
"js-cookie": "^3.0.5",
"js-table2excel": "^1.1.2",
"json-editor-vue": "^0.18.1",
"jsplumb": "^2.15.6",
"lodash-es": "^4.17.21",
@ -74,7 +70,7 @@
"vue-clipboard3": "^2.0.0",
"vue-demi": "0.14.10",
"vue-draggable-plus": "^0.6.0",
"vue-element-plus-x": "^1.3.1",
"vue-element-plus-x": "^1.3.2",
"vue-grid-layout": "3.0.0-beta1",
"vue-i18n": "^11.1.11",
"vue-json-pretty": "^2.5.0",
@ -82,8 +78,8 @@
"vue-router": "^4.5.1",
"vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.8.4",
"vxe-table": "^4.15.0",
"vxe-pc-ui": "^4.8.6",
"vxe-table": "^4.15.2",
"xe-utils": "^3.7.8",
"xlsx-js-style": "^1.2.0"
},
@ -94,8 +90,8 @@
"@types/node": "^22.17.0",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.38.0",
"@typescript-eslint/parser": "^8.38.0",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"@vitejs/plugin-vue": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.0.1",
"@vue/compiler-sfc": "^3.5.18",

View File

@ -1,424 +0,0 @@
<template>
<div class="sys-video-container">
<el-container>
<el-header>视频监控萤石云云直播</el-header>
<el-container>
<el-aside width="200px">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" />
</el-aside>
<el-main>
<div class="updateToken" props="ezviz_video">
<ul>
<li>
<el-span>密匙串</el-span>
<el-input
placeholder="密匙"
show-word-limit
type="text"
id="txt_token"
title="每周更新(开放平台,云直播,轻应用,代码示例)"
v-model="ezviz_video.ezvizToken"
@keyup.enter="update_Token"
class="token_input"
/>
</li>
<li>
<el-span>视频流</el-span>
<el-input
placeholder="萤石云视频流地址"
show-word-limit
type="text"
id="txt_url"
title="密匙对应的视频流地址(高清后缀.h.live)"
v-model="ezviz_video.ezvizUrl"
@keyup.enter="update_Token"
class="token_input"
/>
</li>
</ul>
</div>
<div class="video">
<div class="video-item">
<div class="item">
<div class="home" ref="viewtoolOne">
<div id="video-container">等待加载...</div>
</div>
</div>
</div>
</div>
</el-main>
</el-container>
</el-container>
</div>
</template>
<!--
https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm
安装npm install ezuikit-js pnpm add ezuikit-js
-->
<script lang="ts" setup name="video">
import { reactive, ref, onMounted, nextTick, beforeDestroy } from 'vue';
import EZUIKit from 'ezuikit-js'; //
//import { ElNotification } from 'element-plus';
//import { Search,ChatDotSquare,TopRight,Star,Operation,Setting,Connection,Discount,Open,Delete,Position,View,CopyDocument,DocumentChecked,VideoCamera} from '@element-plus/icons-vue';
import mittBus from '/@/utils/mitt'; //线mitt Uncaught (in promise) ReferenceError: Cannot access 'oe' before initialization
let ezvizPlayOne = ref(null);
let ezvizPlayTwo = ref(null);
let ezvizPlayThree = ref(null);
let ezvizPlayFour = ref(null);
let viewtoolOne = ref();
let viewtoolTwo = ref();
let viewtoolThree = ref();
let viewtoolFour = ref();
interface Tree {
label: string;
children?: Tree[];
}
const defaultProps = {
children: 'children',
label: 'label',
};
const handleNodeClick = (data: Tree) => {
console.log(data);
};
// token
function update_Token(e) {
//ezviz_video.ezvizToken=e.target.value;
console.log(e.target.value);
autoVideoOne('video-container');
}
onMounted(async () => {
autoVideoOne('video-container');
//console.log('https://open.ys7.com/console/ezuikit/template/detail.html?themeId=pcLive&editing=false');
});
// ezopen://open.ys7.com/G39444019/1.live at.3bvmj4ycamlgdwgw1ig1jruma0wpohl6-48zifyb39c-13t5am6-yukyi86mz
// ezopen://open.ys7.com/AA2615287/1.live ra.5k88qgc34vgr9yva7rlub985blo9ph7k-92q0bl2r4r-0aygaog-5cofhebpm
const ezviz_video = reactive({
ezvizToken: 'ra.5k88qgc34vgr9yva7rlub985blo9ph7k-92q0bl2r4r-0aygaog-5cofhebpm', //
ezvizUrl: 'ezopen://open.ys7.com/AA2615287/1.live', // cosnt url = `ezopen://${item.identifyingCode}@open.ys7.com/${item.imei}/${item.channelNo}.hd.live`
// ezopen://open.ys7.com/AA2615287/1.rec
});
// beforeDestroy(()=>{
// ezvizPlayOne.value && ezvizPlayOne.value.stop() //
// console.log('beforeDestroy');
// });
// 1https://blog.csdn.net/weixin_53791978/article/details/126489296
function autoVideoOne(params) {
//
let divW = viewtoolOne.value.clientWidth;
let divH = viewtoolOne.value.clientHeight;
if (ezvizPlayOne.value != null) {
return;
}
// token
ezvizPlayOne.value = new EZUIKit.EZUIKitPlayer({
autoplay: true, //
//
id: 'video-container', //DIV
// tokenhttps://open.ys7.com/console/ezuikit/template/detail.html?themeId=pcLive&editing=false
accessToken: ezviz_video.ezvizToken, //"ra.bl9n4hmb3c7w4fk6bbuumtmdcbbo66w0-3k7nal0q6y-0lp00m5-fi61isesz",
// ezopen://open.ys7.com/${}/{}.live
url: ezviz_video.ezvizUrl, //"ezopen://open.ys7.com/AA2615287/1.live", //
template: 'standard', // pcLivesimple - ;standard-;security - ();voice-theme-
useHardDev: true, // 7.7.x 2023.11.7 7.7.6
// header: ['capturePicture', 'zoom'], // templetesimple,
//plugin: ['talk'], // talk-
//
//footer: ["talk", "broadcast", "hd", "fullScreen"], // templatesimple,
footer: ['talk', 'hd', 'fullScreen'], // templatesimple,
//audio: 0, // 0 - 1 -
// openSoundCallBack: data => console.log("", data),
// closeSoundCallBack: data => console.log("", data),
// startSaveCallBack: data => console.log("", data),
// stopSaveCallBack: data => console.log("", data),
// capturePictureCallBack: data => console.log("", data),
// fullScreenCallBack: data => console.log("", data),
// getOSDTimeCallBack: data => console.log("OSDTime", data),
width: divW,
height: divH,
handleError: (err: any) => {
if (err.type === 'handleRunTimeInfoError' && err.data.nErrorCode === 5) {
console.log('加密设备密码错误');
}
},
});
}
const data: Tree[] = [
{
label: '节点A',
children: [
{
label: '菜单A-1',
children: [
{
label: '菜单A-1-1',
},
],
},
],
},
{
label: '节点B',
children: [
{
label: '菜单B-1',
children: [
{
label: '菜单B-1-1',
},
],
},
{
label: '菜单B-2',
children: [
{
label: '菜单B-2-1',
},
],
},
],
},
{
label: '节点C',
children: [
{
label: '菜单C-1',
children: [
{
label: '菜单C-1-1',
},
],
},
{
label: '菜单C-2',
children: [
{
label: '菜单C-2-1',
},
],
},
],
},
];
</script>
<style lang="scss" scoped>
.sys-video-container {
overflow: hidden;
height: 100vh;
}
.common-layout {
background-color: #ecf5ff;
}
.el-header {
text-align: center;
height: 45px;
line-height: 45px;
font-size: 22px;
background-color: #eee;
padding: 5px auto;
}
.el-aside {
text-align: center;
padding: 4px auto;
overflow: hidden;
}
.el-aside .el-form {
text-align: center;
padding: 2px auto;
margin: 4px;
}
.el-aside .el-button {
margin: 2px;
}
.el-aside .el-input {
font-size: 14px;
padding: 2px;
}
.el-aside .el-card {
margin: 10px 0 10px auto;
}
.el-aside .el-card .el-button {
width: 90px;
}
.el-form-item {
font-weight: bold;
}
.el-main {
background-color: #111;
padding: 4px;
width: 100%;
overflow: hidden;
color: #fff;
}
.recvs {
overflow-y: auto;
overflow-x: hidden;
width: 100%;
height: 800px;
}
.rev_title {
width: 100%;
display: block;
font-style: italic;
color: #999;
font-size: 14px;
background-color: #fafafa;
padding: 2px 4px;
line-height: 25px;
}
.rev_conts {
width: 100%;
word-wrap: break-word;
line-height: 1.5em;
padding: 4px;
line-height: 30px;
} /*缩进text-indent:2em;*/
.recvfontsize {
text-align: center;
display: block;
padding-top: 4px;
}
.el-color-picker {
margin-left: 4px;
}
.recv_count {
text-align: left;
}
.recv_count p {
line-height: 30px;
}
.header {
font-size: 24px;
font-weight: bold;
margin: -10px auto 10px auto;
}
h1 {
font-size: 16px;
margin-top: 10px auto 20px auto;
padding: 5px 0px 5px 0;
}
.el-col {
padding: 4px;
}
.el-input {
font-size: 13px;
}
.el-card {
margin-bottom: 12px;
}
.el-card__body {
padding: 24px;
}
.el-select {
width: 100%;
}
.text-right {
text-align: right;
}
.sub-btn {
margin-top: 30px;
}
.updateToken {
display: block;
line-height: 30px;
align: left;
background: rgb(250, 250, 250, 0.2);
padding: 5px;
}
.token_input {
width: 90%;
}
.hidden {
display: none;
}
.w80 {
width: 80px;
}
.w100 {
width: 100px;
}
.log {
font-size: 14px;
color: #fff;
background-color: black;
}
.center {
text-align: center;
}
#ch1,
#ch2,
#ch3,
#ch4,
#ch5 {
width: 120px;
}
.el-tag {
padding: auto 4px;
margin: 5px;
min-width: 60px;
}
el-tree span {
line-height: 50px;
}
.video {
width: 100%;
height: 100%;
overflow: hidden;
.video-item {
display: flex;
padding: 5px;
overflow: hidden;
.item {
flex: 1;
min-height: 40%;
width: 100%;
margin: 0 5px;
background-color: #000000;
color: #fff;
border-radius: 2px;
.home {
width: 100%;
height: 70vh;
overflow: hidden;
padding: 0;
marigin: 0;
aspect-ratio: 16/9; /* 设置任意宽高任意一项即可 然后使用aspect-ratio元素 动态设置比例 */
text-align: center;
justify-content: center;
}
}
}
}
</style>

View File

@ -131,7 +131,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
entryFileNames: 'assets/js/[name]-[hash].js', // 包的入口文件名称
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]', // 资源文件像 字体,图片等
manualChunks(id) {
if (id.includes('node_modules')) {
if (id.includes('node_modules') && !id.includes('monaco-editor') && !id.includes('vue-element-plus-x')) {
return id.toString().match(/\/node_modules\/(?!.pnpm)(?<moduleName>[^\/]*)\//)?.groups!.moduleName ?? 'vender';
}
},