😎1、修复前端密匙可能空问题 2、隐藏代码生成时统计函数 3、应用层默认添加其他命名空间

This commit is contained in:
zuohuaijun 2025-03-28 00:06:50 +08:00
parent 378a41914c
commit 22359b7b94
10 changed files with 42 additions and 29 deletions

View File

@ -4,10 +4,13 @@
// //
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
global using Admin.NET.Application.Entity;
global using Admin.NET.Core; global using Admin.NET.Core;
global using Admin.NET.Core.Service;
global using Furion; global using Furion;
global using Furion.DependencyInjection; global using Furion.DependencyInjection;
global using Furion.DynamicApiController; global using Furion.DynamicApiController;
global using Furion.EventBus;
global using Furion.FriendlyException; global using Furion.FriendlyException;
global using Mapster; global using Mapster;
global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Authorization;

View File

@ -56,7 +56,7 @@
<PackageReference Include="SSH.NET" Version="2024.2.0" /> <PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" />
<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.1208" /> <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1209" />
<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

@ -203,7 +203,7 @@ if (@column.ColumnKey == "True"){
} }
.Select(it => new @(@Model.ClassName)Output .Select(it => new @(@Model.ClassName)Output
{ {
count = SqlFunc.AggregateCount(it.Id), // count = SqlFunc.AggregateCount(it.Id),
@foreach (var column in Model.TableField){ @foreach (var column in Model.TableField){
if (@column.IsGroupBy == "Y"){ if (@column.IsGroupBy == "Y"){
@: @(@column.PropertyName) = it.@(@column.PropertyName), @: @(@column.PropertyName) = it.@(@column.PropertyName),

View File

@ -77,7 +77,7 @@
"vue-signature-pad": "^3.0.2", "vue-signature-pad": "^3.0.2",
"vue3-flag-icons": "^0.0.3", "vue3-flag-icons": "^0.0.3",
"vue3-tree-org": "^4.2.2", "vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.5.2", "vxe-pc-ui": "^4.5.3",
"vxe-table": "^4.12.1", "vxe-table": "^4.12.1",
"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",
@ -96,7 +96,7 @@
"@vitejs/plugin-vue": "^5.2.3", "@vitejs/plugin-vue": "^5.2.3",
"@vitejs/plugin-vue-jsx": "^4.1.2", "@vitejs/plugin-vue-jsx": "^4.1.2",
"@vue/compiler-sfc": "^3.5.13", "@vue/compiler-sfc": "^3.5.13",
"code-inspector-plugin": "^0.20.6", "code-inspector-plugin": "^0.20.7",
"eslint": "^9.23.0", "eslint": "^9.23.0",
"eslint-plugin-vue": "^10.0.0", "eslint-plugin-vue": "^10.0.0",
"globals": "^16.0.0", "globals": "^16.0.0",

View File

@ -4,7 +4,7 @@
<i v-if="leftIcon" class="notice-bar-warp-left-icon" :class="leftIcon"></i> <i v-if="leftIcon" class="notice-bar-warp-left-icon" :class="leftIcon"></i>
<div class="notice-bar-warp-text-box"> <div class="notice-bar-warp-text-box">
<div class="notice-bar-warp-text" ref="noticeBarTextRef"> <div class="notice-bar-warp-text" ref="noticeBarTextRef">
<div v-html="state.noticeTitle" data-slate-editor /> <div v-html="props.text" data-slate-editor />
</div> </div>
</div> </div>
<!-- <SvgIcon :name="rightIcon" v-if="rightIcon" class="notice-bar-warp-right-icon" @click="onRightIconClick" /> --> <!-- <SvgIcon :name="rightIcon" v-if="rightIcon" class="notice-bar-warp-right-icon" @click="onRightIconClick" /> -->
@ -16,9 +16,6 @@
import { reactive, ref, onMounted, nextTick } from 'vue'; import { reactive, ref, onMounted, nextTick } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { getAPI } from '/@/utils/axios-utils';
import { SysNoticeApi } from '/@/api-services/api';
const i18n = useI18n(); const i18n = useI18n();
const props = defineProps({ const props = defineProps({
@ -34,7 +31,6 @@ const props = defineProps({
leftIcon: { type: String, default: 'iconfont icon-tongzhi2' }, // leftIcon: { type: String, default: 'iconfont icon-tongzhi2' }, //
rightIcon: { type: String, default: '' }, // rightIcon: { type: String, default: '' }, //
}); });
const displayText = ref(undefined);
const emit = defineEmits(['close', 'link']); const emit = defineEmits(['close', 'link']);
const noticeBarWarpRef = ref<HTMLDivElement | null>(null); const noticeBarWarpRef = ref<HTMLDivElement | null>(null);
@ -44,16 +40,11 @@ const state = reactive({
warpOWidth: 0, warpOWidth: 0,
textOWidth: 0, textOWidth: 0,
animationDuration: 0, animationDuration: 0,
noticeTitle: '',
}); });
// //
onMounted(async () => { onMounted(async () => {
if (!props.scrollable) initAnimation(); if (!props.scrollable) initAnimation();
//
var res = await getAPI(SysNoticeApi).apiSysNoticeNoticeTitleGet();
state.noticeTitle = res.data.result?.title ?? ''; // i18n.t(res.data.result?.title ?? '');
}); });
// //

View File

@ -75,17 +75,18 @@
<script setup lang="ts" name="layoutLockScreen"> <script setup lang="ts" name="layoutLockScreen">
import { nextTick, onMounted, reactive, ref, onUnmounted } from 'vue'; import { nextTick, onMounted, reactive, ref, onUnmounted } from 'vue';
import { formatDate } from '/@/utils/formatTime';
import { Local } from '/@/utils/storage';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import { useUserInfo } from '/@/stores/userInfo'; import { useUserInfo } from '/@/stores/userInfo';
import { sm2 } from 'sm-crypto-v2'; import { sm2 } from 'sm-crypto-v2';
import { feature, getAPI } from '/@/utils/axios-utils';
import { SysAuthApi } from '/@/api-services';
import { useRoute } from 'vue-router';
import { loadSysInfo } from '/@/utils/sysInfo'; import { loadSysInfo } from '/@/utils/sysInfo';
import { useI18n } from 'vue-i18n'; import { formatDate } from '/@/utils/formatTime';
import { Local } from '/@/utils/storage';
import { feature, getAPI } from '/@/utils/axios-utils';
import { SysAuthApi, SysConfigApi } from '/@/api-services';
const { t, locale } = useI18n(); const { t, locale } = useI18n();
@ -224,7 +225,11 @@ const onLockScreenSubmit = async () => {
return; return;
} }
// SM2 // SM2
const publicKey = window.__env__.VITE_SM_PUBLIC_KEY; var publicKey = window.__env__.VITE_SM_PUBLIC_KEY;
if (publicKey == '') {
var res1 = await getAPI(SysConfigApi).apiSysConfigSmPublicKeyGet();
publicKey = window.__env__.VITE_SM_PUBLIC_KEY = res1.data.result ?? '';
}
const password = sm2.doEncrypt(state.lockScreenPassword, publicKey, 1); const password = sm2.doEncrypt(state.lockScreenPassword, publicKey, 1);
const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthUnLockScreenPost(password)); const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthUnLockScreenPost(password));
if (err) { if (err) {

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="height: 100vh; overflow: hidden"> <div style="height: 100vh; overflow: hidden">
<div class="noticebar" style="display: flex"> <div class="noticebar" style="display: flex">
<NoticeBar /> <NoticeBar :text="noticeTitle" />
<div class="editlayout"> <div class="editlayout">
<el-tooltip content="编辑/保存布局" placement="bottom"> <el-tooltip content="编辑/保存布局" placement="bottom">
<el-button v-if="customizing" type="warning" icon="ele-Check" circle plain @click="save"></el-button> <el-button v-if="customizing" type="warning" icon="ele-Check" circle plain @click="save"></el-button>
@ -140,10 +140,14 @@
import { ref, computed, onMounted, nextTick } from 'vue'; import { ref, computed, onMounted, nextTick } from 'vue';
import { VueDraggable } from 'vue-draggable-plus'; import { VueDraggable } from 'vue-draggable-plus';
import { clone } from '/@/utils/arrayOperation'; import { clone } from '/@/utils/arrayOperation';
import allComps from './components/index';
import { Local } from '/@/utils/storage'; import { Local } from '/@/utils/storage';
import allComps from './components/index';
import NoticeBar from '/@/components/noticeBar/index.vue'; import NoticeBar from '/@/components/noticeBar/index.vue';
import { getAPI } from '/@/utils/axios-utils';
import { SysNoticeApi } from '/@/api-services';
interface Grid { interface Grid {
layout: number[]; layout: number[];
copmsList: string[][]; copmsList: string[][];
@ -161,12 +165,17 @@ const customizing = ref<boolean>(false);
const allCompsList = ref(allComps); const allCompsList = ref(allComps);
const widgetsRef = ref<HTMLElement | null>(null); const widgetsRef = ref<HTMLElement | null>(null);
const grid = ref<Grid>(clone(defaultGrid)); const grid = ref<Grid>(clone(defaultGrid));
const noticeTitle = ref<string>('');
onMounted(() => { onMounted(async () => {
const savedGrid = Local.get('grid'); const savedGrid = Local.get('grid');
if (savedGrid) { if (savedGrid) {
grid.value = savedGrid; grid.value = savedGrid;
} }
//
var res = await getAPI(SysNoticeApi).apiSysNoticeNoticeTitleGet();
noticeTitle.value = res.data.result?.title ?? ''; // i18n.t(res.data.result?.title ?? '');
}); });
const availableCompsList = computed(() => { const availableCompsList = computed(() => {

View File

@ -55,12 +55,13 @@
<script lang="ts" setup name="sysCache"> <script lang="ts" setup name="sysCache">
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue'; import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage, ElTree } from 'element-plus'; import { ElMessageBox, ElMessage, ElTree } from 'element-plus';
import NoticeBar from '/@/components/noticeBar/index.vue';
import VueJsonPretty from 'vue-json-pretty'; import VueJsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css'; import 'vue-json-pretty/lib/styles.css';
import { Splitpanes, Pane } from 'splitpanes'; import { Splitpanes, Pane } from 'splitpanes';
import 'splitpanes/dist/splitpanes.css'; import 'splitpanes/dist/splitpanes.css';
import NoticeBar from '/@/components/noticeBar/index.vue';
const scEcharts = defineAsyncComponent(() => import('/@/components/scEcharts/index.vue')); const scEcharts = defineAsyncComponent(() => import('/@/components/scEcharts/index.vue'));
import { getAPI } from '/@/utils/axios-utils'; import { getAPI } from '/@/utils/axios-utils';

View File

@ -113,7 +113,7 @@
<el-tag size="large" round style="border: 1 solid var(--el-border-color)"> <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: red; font-size: 9px; margin-left: 3px">v{{ d.version }}</div> <div style="color: red; font-size: 10px; margin-left: 3px">v{{ d.version }}</div>
</div> </div>
</el-tag> </el-tag>
</div> </div>

View File

@ -46,7 +46,7 @@ import { ElMessage } from 'element-plus';
import { sm2 } from 'sm-crypto-v2'; import { sm2 } from 'sm-crypto-v2';
import { clearAccessTokens, getAPI } from '/@/utils/axios-utils'; import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
import { SysUserApi } from '/@/api-services/api'; import { SysConfigApi, SysUserApi } from '/@/api-services/api';
import { ChangePwdInput } from '/@/api-services/models'; import { ChangePwdInput } from '/@/api-services/models';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
@ -76,8 +76,12 @@ const submit = () => {
if (!valid) return; if (!valid) return;
// SM2 // SM2
const cpwd: ChangePwdInput = { passwordOld: '', passwordNew: '' }; var cpwd: ChangePwdInput = { passwordOld: '', passwordNew: '' };
const publicKey = window.__env__.VITE_SM_PUBLIC_KEY; var publicKey = window.__env__.VITE_SM_PUBLIC_KEY;
if (publicKey == '') {
var res = await getAPI(SysConfigApi).apiSysConfigSmPublicKeyGet();
publicKey = window.__env__.VITE_SM_PUBLIC_KEY = res.data.result ?? '';
}
cpwd.passwordOld = sm2.doEncrypt(state.ruleForm.passwordOld, publicKey, 1); cpwd.passwordOld = sm2.doEncrypt(state.ruleForm.passwordOld, publicKey, 1);
cpwd.passwordNew = sm2.doEncrypt(state.ruleForm.passwordNew, publicKey, 1); cpwd.passwordNew = sm2.doEncrypt(state.ruleForm.passwordNew, publicKey, 1);
await getAPI(SysUserApi).apiSysUserChangePwdPost(cpwd); await getAPI(SysUserApi).apiSysUserChangePwdPost(cpwd);