v3.7.0 (2024-09-28) Java17+SpringBoot3重磅更新,【新增】支持Java17;【新增】支持SpringBoot3;【优化】优化AES和SM4加密;【优化】优化三级等保文档;

This commit is contained in:
zhuoda
2024-09-28 21:54:38 +08:00
parent 4362e8df8b
commit 0f719aee10
659 changed files with 42717 additions and 82 deletions

View File

@@ -20,10 +20,11 @@
"@ant-design/icons-vue": "^6.1.0",
"@wangeditor/editor": "5.1.14",
"@wangeditor/editor-for-vue": "5.1.12",
"ant-design-vue": "4.2.1",
"ant-design-vue": "4.2.5",
"axios": "1.6.8",
"clipboard": "2.0.11",
"crypto-js": "4.1.1",
"dayjs": "1.10.5",
"decimal.js": "10.3.1",
"diff": "5.2.0",
"diff2html": "3.4.47",

View File

@@ -1,20 +1,21 @@
<!--
* 目录 树形选择组件
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-12 21:01:52
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-12 21:01:52
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
-->
<template>
<a-tree-select
v-model:value="selectValue"
:style="`width:${width}`"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
:dropdown-style="{ maxHeight: '400px', overflowX: 'auto' }"
:tree-data="categoryTreeData"
:placeholder="placeholder"
:allowClear="true"
tree-default-expand-all
@change="onChange"
/>

View File

@@ -1,11 +1,11 @@
<!--
* 布尔 树形选择组件
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-12 21:01:52
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-12 21:01:52
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
-->
<template>
@@ -17,7 +17,6 @@
:allowClear="true"
:size="size"
@change="handleChange"
@deselect="handleChange"
>
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList('FLAG_NUMBER_ENUM')" :key="item.value" :value="item.value">
{{ item.desc }}

View File

@@ -1,11 +1,11 @@
<!--
* 枚举 下拉框
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-08 20:32:30
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-08-08 20:32:30
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
-->
<template>
@@ -17,7 +17,6 @@
:allowClear="true"
:size="size"
@change="handleChange"
@deselect="handleChange"
:disabled="disabled"
>
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList(props.enumName)" :key="item.value" :value="item.value">

View File

@@ -14,6 +14,8 @@ export const PAGE_SIZE_OPTIONS = ['5', '10', '15', '20', '30', '40', '50', '75',
//登录页面名字
export const PAGE_PATH_LOGIN = '/login';
//首页页面名字
export const HOME_PAGE_PATH = '/home';
//404页面名字
export const PAGE_PATH_404 = '/404';
@@ -53,7 +55,7 @@ export const USER_TYPE_ENUM = {
value: 1,
desc: '员工',
},
};
export const DATA_TYPE_ENUM = {
@@ -65,6 +67,6 @@ export const DATA_TYPE_ENUM = {
value: 10,
desc: '加密',
},
};

View File

@@ -9,8 +9,7 @@
-->
<template>
<div class="version">
<a target="_blank" class="smart-copyright" href="https://www.1024lab.net"> ©2012-{{ currentYear }} 河南·洛阳1024创新实验室 SmartAdmin </a>
<a target="_blank" class="smart-version" href="https://smartadmin.vip/views/other/change-log.html"> V3.4.0 </a>
<a target="_blank" class="smart-copyright" href="https://www.1024lab.net"> ©2012-{{ currentYear }} SmartAdmin | 1024创新实验室 </a>
</div>
</template>
<script setup>

View File

@@ -131,7 +131,7 @@
height: 48px;
line-height: 48px;
width: 100%;
z-index: 100;
z-index: 1051;
right: 0px;
position: fixed;
background-color: v-bind('color.background');
@@ -154,7 +154,7 @@
width: v-bind(pageWidth);
height: 40px;
line-height: 40px;
z-index: 11;
z-index: 1051;
}
}
}

View File

@@ -2,7 +2,7 @@ import CryptoJS from 'crypto-js';
import CryptoSM from 'sm-crypto';
function object2string(data) {
if (typeof data === 'Object') {
if (typeof data === 'object') {
return JSON.stringify(data);
}
@@ -16,8 +16,29 @@ function object2string(data) {
return str;
}
// ----------------------- AES 加密、解密 -----------------------
const AES_KEY = '1024abcd1024abcd1024abcd1024abcd';
/**
* 字符串转为数字
*/
function stringToHex(str) {
let hex = '';
for(let i = 0; i < str.length; i++) {
hex += str.charCodeAt(i).toString(16).padStart(2, '0');
}
return hex;
}
/*
* -------------------- ※ AES 加密、解密 begin ※ --------------------
*
* 1、AES加密算法支持三种密钥长度128位、192位和256位这里选择128位
* 2、AES 要求秘钥为 128bit转化字节为 16个字节
* 3、js前端使用 UCS-2 或者 UTF-16 编码,字母、数字、特殊符号等 占用1个字节
* 4、所以秘钥Key 组成为:字母、数字、特殊符号 一共16个即可
*
* -------------------- ※ AES 加密、解密 end ※ --------------------
*/
const AES_KEY = '1024lab__1024lab';
const AES = {
encryptData: function (data) {
@@ -28,8 +49,7 @@ const AES = {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
});
return encrypted.toString();
return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
},
decryptData: function (data) {
@@ -45,13 +65,24 @@ const AES = {
},
};
// ----------------------- 国密SM4算法 加密、解密 -----------------------
const SM4_KEY = '1024abcd1024abcd1024abcd1024abcd';
/*
* -------------------- ※ 国密SM4算法 加密、解密 begin ※ --------------------
*
* 1、国密SM4 要求秘钥为 128bit转化字节为 16个字节
* 2、js前端使用 UCS-2 或者 UTF-16 编码,字母、数字、特殊符号等 占用1个字节
* 3、java中 每个 字母数字 也是占用1个字节
* 4、所以前端和后端的 秘钥Key 组成为:字母、数字、特殊符号 一共16个即可
*
* -------------------- ※ 国密SM4算法 加密、解密 end ※ --------------------
*/
// 秘钥Key 组成为:字母、数字、特殊符号 一共16个即可
const SM4_KEY = '1024lab__1024lab';
const SM4 = {
encryptData: function (data) {
// 第一步SM4 加密
let encryptData = CryptoSM.sm4.encrypt(object2string(data), SM4_KEY);
let encryptData = CryptoSM.sm4.encrypt(object2string(data), stringToHex(SM4_KEY));
// 第二步: Base64 编码
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(encryptData));
},
@@ -62,10 +93,12 @@ const SM4 = {
let decode64Str = CryptoJS.enc.Utf8.stringify(words);
// 第二步SM4 解密
return CryptoSM.sm4.decrypt(decode64Str, SM4_KEY);
return CryptoSM.sm4.decrypt(decode64Str, stringToHex(SM4_KEY));
},
};
// ----------------------- 对外暴露: 加密、解密 -----------------------
// 默认使用SM4算法

View File

@@ -12,7 +12,7 @@ import 'nprogress/nprogress.css';
import { nextTick } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import { routerArray } from './routers';
import { PAGE_PATH_404, PAGE_PATH_LOGIN } from '/@/constants/common-const';
import { PAGE_PATH_404, PAGE_PATH_LOGIN, HOME_PAGE_PATH } from '/@/constants/common-const';
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
import SmartLayout from '../layout/index.vue';
import { useUserStore } from '/@/store/modules/system/user';

View File

@@ -12,7 +12,7 @@ export const loginRouters = [
{
path: '/login',
name: 'Login',
component: () => import('/@/views/system/login3/login.vue'),
component: () => import('/@/views/system/login/login.vue'),
meta: {
title: '登录',
hideInMenu: true,

View File

@@ -24,7 +24,7 @@
</a-alert>
<br />
<a-alert
message="当前加密算法为SM2,若想改为 AES前端请修改 'lib/encrypt.js'文件中的EncryptObject后端请修改 ApiEncryptService 的实现类"
message="当前加密算法为SM4,若想改为 AES前端请修改 'lib/encrypt.js'文件中的EncryptObject后端请修改 ApiEncryptService 的实现类"
type="error"
/>
<br />

View File

@@ -14,7 +14,7 @@
<pre>
1.三级等保是中国国家等级保护认证中的最高级别认证该认证包含了五个等级保护安全技术要求和五个安全管理要求共涉及测评分类73类要求非常严格
2.三级等保是地市级以上国家机关重要企事业单位需要达成的认证在金融行业中可以看作是除了银行机构以外最高级别的信息安全等级保护
3.具体三级等保要求请查看1024创新实验室写的相关文档 <a href="https://smartadmin.vip/asd">三级等保文档</a></pre>
3.具体三级等保要求请查看1024创新实验室写的相关文档 <a href="https://smartadmin.vip/views/level3protect/basic.html" target="_blank">三级等保文档</a></pre>
</template>
</a-alert>
<br />

View File

@@ -35,7 +35,7 @@ defineExpose({
show,
});
const visible = ref(false);
const visible = ref(true);
function show() {
visible.value = true;
}

View File

@@ -20,7 +20,7 @@
<a-row class="content">
<span class="left-content">
<p class="last-login-info"><AlertOutlined />{{ lastLoginInfo }}</p>
<a class="sentence" href="https://zhuoda.vip/soup" target="_blank"> <smile-outlined spin /> {{ heartSentence }} </a>
<a class="sentence" href="#" target="_blank"> <smile-outlined spin /> {{ heartSentence }} </a>
</span>
<div class="weather">
<iframe
@@ -112,7 +112,7 @@
let next = lunar.getNextJieQi();
let nextJieqi = next.getName() + ' ' + next.getSolar().toYmd();
return `${day} 星期${week},农历${lunarMonth}${lunarDay}(当前${jieqi}${nextJieqi} `;
return `${day} 星期${week},农历${lunarMonth}${lunarDay}(当前${jieqi}${nextJieqi} `;
});
// 毒鸡汤

View File

@@ -62,6 +62,7 @@
</a-col>
</a-row>
</a-col>
<!-- <AdModal/>-->
</a-row>
</template>
<script setup>
@@ -74,6 +75,7 @@
import Category from './components/echarts/category.vue';
import Pie from './components/echarts/pie.vue';
import Gradient from './components/echarts/gradient.vue';
// import AdModal from './ad-modal.vue';
// 业绩完成百分比
const saleTargetPercent = computed(() => {