mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2026-02-06 17:54:25 +08:00
v3.20.0 【新增】优化登录使用spring cache;【新增】优化部门cache;【新增】代码生成枚举;【优化】三级等保Label显示宽度
This commit is contained in:
@@ -495,40 +495,32 @@
|
||||
function camelToUnderscore(str) {
|
||||
return str.replace(/([A-Z])/g, '_$1').toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
// 动态设置表格高度
|
||||
const yHeight = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
resetGetHeight();
|
||||
});
|
||||
function resetGetHeight() {
|
||||
// 搜索部分高度
|
||||
let doc = document.querySelector('.ant-form');
|
||||
// 按钮部分高度
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
// 表格头高度
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
// 分页高度
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
// 内容区总高度
|
||||
let box = document.querySelector('.admin-content');
|
||||
setTimeout(() => {
|
||||
// 搜索部分高度
|
||||
let doc = document.querySelector('.ant-form');
|
||||
// 按钮部分高度
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
// 表格头高度
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
// 分页高度
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
// 内容区总高度
|
||||
let box = document.querySelector('.admin-content');
|
||||
setTimeout(() => {
|
||||
let dueHeight = doc.offsetHeight + 10 + 24 + btn.offsetHeight + 15 + tableCell.offsetHeight + page.offsetHeight + 20;
|
||||
yHeight.value = box.offsetHeight - dueHeight;
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// 定义一个变量来存储节流后的回调函数
|
||||
let throttledResizeHandler;
|
||||
onMounted(() => {
|
||||
resetGetHeight();
|
||||
throttledResizeHandler = _.throttle(() => {
|
||||
resetGetHeight();
|
||||
}, 1000);
|
||||
|
||||
window.addEventListener('resize', throttledResizeHandler);
|
||||
});
|
||||
|
||||
// 在组件销毁时移除 resize 事件监听器
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('resize', throttledResizeHandler);
|
||||
});
|
||||
window.addEventListener(
|
||||
'resize',
|
||||
_.throttle(() => {
|
||||
resetGetHeight();
|
||||
}, 1000)
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<a-table
|
||||
size="small"
|
||||
:scroll="{ y: 800 }"
|
||||
:scroll="{ x: 1000 }"
|
||||
:loading="tableLoading"
|
||||
bordered
|
||||
:dataSource="tableData"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-modal v-model:open="visible" title="推送人" width="1100px" ok-text="确定" cancel-text="取消" @ok="onSubmit" @cancel="onClose" :zIndex="9999">
|
||||
<a-modal v-model:open="visible" title="推送人" width="1100px" ok-text="确定" cancel-text="取消" @ok="onSubmit" @cancel="onClose" :zIndex="9999">
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键词搜索" class="smart-query-form-item">
|
||||
@@ -56,11 +56,9 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
// ---------------查询条件----------------
|
||||
const queryParamState = {
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
</a-col>
|
||||
<!--待办、已办-->
|
||||
<a-col :span="24">
|
||||
<ToBeDoneCard />
|
||||
<ChangelogCard />
|
||||
</a-col>
|
||||
<!--更新日志-->
|
||||
<a-col :span="24">
|
||||
<ChangelogCard />
|
||||
<ToBeDoneCard />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
||||
@@ -80,8 +80,7 @@
|
||||
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import loginQR from '/@/assets/images/login/login-qr.png';
|
||||
import leftBg2 from '/@/assets/images/login/left-bg2.png';
|
||||
import loginGif from '/@/assets/images/login/login.gif';
|
||||
import loginGif from '/@/assets/images/login/login-min.gif';
|
||||
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
|
||||
import aliIcon from '/@/assets/images/login/ali-icon.png';
|
||||
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
<li v-for="module in props.tree" :key="module.menuId">
|
||||
<div class="menu" :style="{ marginLeft: `${props.index * 4}%` }">
|
||||
<a-checkbox @change="selectCheckbox(module)" class="checked-box-label" :value="module.menuId">{{ module.menuName }} </a-checkbox>
|
||||
<div v-if="module.children && module.children.some((e) => e.menuType == MENU_TYPE_ENUM.POINTS.value)">
|
||||
<div v-if="module.children && module.children.some((e) => e.menuType === MENU_TYPE_ENUM.POINTS.value)">
|
||||
<RoleTreePoint :tree="module.children" @selectCheckbox="selectCheckbox" />
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="module.children && !module.children.some((e) => e.menuType == MENU_TYPE_ENUM.POINTS.value)">
|
||||
<template v-if="module.children && !module.children.some((e) => e.menuType === MENU_TYPE_ENUM.POINTS.value)">
|
||||
<RoleTreeMenu :tree="module.children" :index="props.index + 1" />
|
||||
</template>
|
||||
</li>
|
||||
@@ -47,7 +47,7 @@
|
||||
let checkedData = roleStore.checkedData;
|
||||
let findIndex = checkedData.indexOf(module.menuId);
|
||||
// 选中
|
||||
if (findIndex == -1) {
|
||||
if (findIndex === -1) {
|
||||
// 选中本级以及子级
|
||||
roleStore.addCheckedDataAndChildren(module);
|
||||
// 选中上级
|
||||
|
||||
Reference in New Issue
Block a user