mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56:39 +08:00
commit
71521d1d41
@ -108,7 +108,7 @@ public class LoginService implements StpInterface {
|
|||||||
private ProtectLoginService protectLoginService;
|
private ProtectLoginService protectLoginService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ProtectPasswordService profectPasswordService;
|
private ProtectPasswordService protectPasswordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取验证码
|
* 获取验证码
|
||||||
@ -148,7 +148,7 @@ public class LoginService implements StpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 解密前端加密的密码
|
// 解密前端加密的密码
|
||||||
String requestPassword = profectPasswordService.decryptPassword(loginForm.getPassword());
|
String requestPassword = protectPasswordService.decryptPassword(loginForm.getPassword());
|
||||||
|
|
||||||
// 验证密码 是否为万能密码
|
// 验证密码 是否为万能密码
|
||||||
String superPassword = configService.getConfigValue(ConfigKeyEnum.SUPER_PASSWORD);
|
String superPassword = configService.getConfigValue(ConfigKeyEnum.SUPER_PASSWORD);
|
||||||
|
@ -155,22 +155,24 @@
|
|||||||
left join t_notice_type on t_notice.notice_type_id = t_notice_type.notice_type_id
|
left join t_notice_type on t_notice.notice_type_id = t_notice_type.notice_type_id
|
||||||
<where>
|
<where>
|
||||||
<if test="!administratorFlag">
|
<if test="!administratorFlag">
|
||||||
t_notice.notice_id in
|
(
|
||||||
(select t_notice_visible_range.notice_id
|
t_notice.notice_id in
|
||||||
from t_notice_visible_range
|
(select t_notice_visible_range.notice_id
|
||||||
where
|
from t_notice_visible_range
|
||||||
(t_notice_visible_range.data_type = #{departmentDataType}
|
where
|
||||||
<if test="requestEmployeeDepartmentIdList != null and requestEmployeeDepartmentIdList.size > 0">
|
( t_notice_visible_range.data_type = #{departmentDataType}
|
||||||
and
|
<if test="requestEmployeeDepartmentIdList != null and requestEmployeeDepartmentIdList.size > 0">
|
||||||
t_notice_visible_range.data_id
|
and
|
||||||
in
|
t_notice_visible_range.data_id
|
||||||
<foreach collection="requestEmployeeDepartmentIdList" open="(" close=")" separator="," item="item">
|
in
|
||||||
#{item}
|
<foreach collection="requestEmployeeDepartmentIdList" open="(" close=")" separator="," item="item">
|
||||||
</foreach>
|
#{item}
|
||||||
</if>
|
</foreach>
|
||||||
)
|
</if>
|
||||||
or ( t_notice_visible_range.data_type = #{employeeDataType} and t_notice_visible_range.data_id =
|
)
|
||||||
#{requestEmployeeId} )
|
or ( t_notice_visible_range.data_type = #{employeeDataType} and t_notice_visible_range.data_id = #{requestEmployeeId} )
|
||||||
|
)
|
||||||
|
or t_notice.all_visible_flag = true
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
and t_notice.all_visible_flag = true
|
and t_notice.all_visible_flag = true
|
||||||
@ -182,7 +184,7 @@
|
|||||||
<if test="query.keywords != null and query.keywords !=''">
|
<if test="query.keywords != null and query.keywords !=''">
|
||||||
AND ( INSTR(t_notice.title,#{query.keywords})
|
AND ( INSTR(t_notice.title,#{query.keywords})
|
||||||
OR INSTR(t_notice.author,#{query.keywords})
|
OR INSTR(t_notice.author,#{query.keywords})
|
||||||
OR INSTR(t_notice.documentNumber,#{query.keywords})
|
OR INSTR(t_notice.document_number,#{query.keywords})
|
||||||
OR INSTR(t_notice.source,#{query.keywords})
|
OR INSTR(t_notice.source,#{query.keywords})
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
@ -32,7 +32,7 @@ export const fileApi = {
|
|||||||
/**
|
/**
|
||||||
* 下载文件流(根据fileKey) @author 胡克
|
* 下载文件流(根据fileKey) @author 胡克
|
||||||
*/
|
*/
|
||||||
downLoadFile: (fileName, fileKey) => {
|
downLoadFile: (fileKey) => {
|
||||||
return getDownload('/support/file/downLoad', { fileKey });
|
return getDownload('/support/file/downLoad', { fileKey });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<a-upload
|
<a-upload
|
||||||
|
multiple
|
||||||
:accept="props.accept"
|
:accept="props.accept"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:customRequest="customRequest"
|
:customRequest="customRequest"
|
||||||
@ -43,12 +44,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { Modal } from 'ant-design-vue';
|
||||||
import { fileApi } from '/src/api/support/file-api';
|
import { fileApi } from '/src/api/support/file-api';
|
||||||
import { useUserStore } from '/@/store/modules/system/user';
|
import { useUserStore } from '/@/store/modules/system/user';
|
||||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||||
import { getDownload } from '/@/lib/axios';
|
|
||||||
import { smartSentry } from '/@/lib/smart-sentry';
|
import { smartSentry } from '/@/lib/smart-sentry';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
@ -162,14 +162,44 @@
|
|||||||
console.log(fileList.value);
|
console.log(fileList.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function beforeUpload(file) {
|
function beforeUpload(file, files) {
|
||||||
|
if (fileList.value.length + files.length > props.maxUploadSize) {
|
||||||
|
showErrorMsgOnce(`最多支持上传 ${props.maxUploadSize} 个文件哦!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.accept) {
|
||||||
|
const suffixIndex = file.name.lastIndexOf('.');
|
||||||
|
const fileSuffix = file.name.substring(suffixIndex <= -1 ? 0 : suffixIndex);
|
||||||
|
if (props.accept.indexOf(fileSuffix) === -1) {
|
||||||
|
showErrorMsgOnce(`只支持上传 ${props.accept.replaceAll(',', ' ')} 格式的文件`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const isLimitSize = file.size / 1024 / 1024 < props.maxSize;
|
const isLimitSize = file.size / 1024 / 1024 < props.maxSize;
|
||||||
if (!isLimitSize) {
|
if (!isLimitSize) {
|
||||||
return message.error(`上传的文件必须小于${props.maxSize}Mb`);
|
showErrorMsgOnce(`单个文件大小必须小于 ${props.maxSize} Mb`);
|
||||||
}
|
}
|
||||||
return isLimitSize;
|
return isLimitSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showErrorModalFlag = ref(true);
|
||||||
|
const showErrorMsgOnce = (content) => {
|
||||||
|
if (showErrorModalFlag.value) {
|
||||||
|
Modal.error({
|
||||||
|
title: '提示',
|
||||||
|
content: content,
|
||||||
|
okType: 'danger',
|
||||||
|
centered: true,
|
||||||
|
onOk() {
|
||||||
|
showErrorModalFlag.value = true;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
showErrorModalFlag.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function handleCancel() {
|
function handleCancel() {
|
||||||
previewVisible.value = false;
|
previewVisible.value = false;
|
||||||
}
|
}
|
||||||
@ -179,7 +209,7 @@
|
|||||||
previewUrl.value = file.url || file.preview;
|
previewUrl.value = file.url || file.preview;
|
||||||
previewVisible.value = true;
|
previewVisible.value = true;
|
||||||
} else {
|
} else {
|
||||||
getDownload(file.fileName, file.fileUrl);
|
fileApi.downLoadFile(file.fileKey);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user