mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-01-13 06:04:18 +08:00
v3.20.0 【新增】优化登录使用spring cache;【新增】优化部门cache;【新增】代码生成枚举;【优化】三级等保Label显示宽度
This commit is contained in:
BIN
smart-admin-web-javascript/src/assets/images/login/login-min.gif
Normal file
BIN
smart-admin-web-javascript/src/assets/images/login/login-min.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@@ -8,7 +8,7 @@
|
||||
|
||||
const props = defineProps({
|
||||
dictCode: String,
|
||||
dataValue: String,
|
||||
dataValue: [String, Number],
|
||||
});
|
||||
const dataLabels = computed(() => {
|
||||
return useDictStore().getDataLabels(props.dictCode, props.dataValue);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
||||
import _ from 'lodash';
|
||||
|
||||
@@ -23,14 +21,21 @@ export const useDictStore = defineStore({
|
||||
|
||||
// 获取字典的值名称
|
||||
getDataLabels(dictCode, dataValue) {
|
||||
if (!dataValue) {
|
||||
if (_.isNil(dataValue) || _.isNaN(dataValue)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let dict = this.getDictData(dictCode);
|
||||
if (dict.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// 是数字的话,需要特殊处理
|
||||
if(_.isNumber(dataValue)){
|
||||
let target = _.find(dict, { dataValue: dataValue });
|
||||
return target ? target.dataLabel : '';
|
||||
}
|
||||
|
||||
let valueArray = dataValue.split(DICT_SPLIT);
|
||||
let result = [];
|
||||
for (let item of valueArray) {
|
||||
@@ -42,7 +47,7 @@ export const useDictStore = defineStore({
|
||||
return result.join(DICT_SPLIT);
|
||||
},
|
||||
// 初始化字典
|
||||
initData(dictDataList){
|
||||
initData(dictDataList) {
|
||||
this.dictMap.clear();
|
||||
for (let data of dictDataList) {
|
||||
let dataArray = this.dictMap.get(data.dictCode);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<a-table
|
||||
size="small"
|
||||
:scroll="{ y: 800 }"
|
||||
:scroll="{ x: 1000 }"
|
||||
:loading="tableLoading"
|
||||
bordered
|
||||
:dataSource="tableData"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
style="width: 800px"
|
||||
style="width: 100%"
|
||||
:label-col="{ span: 6 }"
|
||||
:wrapper-col="{ span: 18 }"
|
||||
autocomplete="off"
|
||||
|
||||
@@ -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 '/src/lib/smart-sentry';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
// ---------------查询条件----------------
|
||||
const queryParamState = {
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import { smartSentry } from '/src/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import MessageReceiverModal from './message-receiver-modal.vue';
|
||||
import { USER_TYPE_ENUM } from '/src/constants/common-const.js';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
import { USER_TYPE_ENUM } from '/@/constants/common-const';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
// ------------------------ 事件 ------------------------
|
||||
|
||||
const emits = defineEmits(['reloadList']);
|
||||
|
||||
@@ -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