提交代码

This commit is contained in:
zlwu committed 2025-08-01 17:27:33 +08:00
1 parent 81d8559da2
commit a6b8eb06dd
2 files changed
+109 -1

No files matched your search

@@ -35,6 +35,7 @@ import org.dromara.common.excel.service.BaseExportService;
import org.dromara.common.excel.convert.ExcelDictPreloadConvert;
import org.dromara.common.excel.service.SqlCacheConfigService;
import org.dromara.common.core.utils.SpringUtils;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.xg.domain.vo.XgStudentMsgVo;
import org.dromara.xg.domain.bo.XgStudentMsgBo;
import org.dromara.xg.domain.bo.XgStudentMsgAdvancedSearchBo;
@@ -123,6 +124,32 @@ public class XgStudentMsgController extends BaseController {
return xgStudentMsgService.queryPageListByDeptId(bo, deptParams, pageQuery);
}
/**
* 高级检索学生信息的导出
*
* @param bo 高级检索条件
* @return 学生信息分页列表
*/
@SaCheckPermission("studentMsg:studentMsg:export")
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
@PostMapping("/advancedSearchExport")
public void advancedSearchExport(@RequestBody XgStudentMsgAdvancedSearchBo bo, HttpServletResponse response) {
log.info("接收到高级检索请求,检索条件: {}", bo);
// 预加载导出所需的字典数据
preloadExportDicts();
TableDataInfo<XgStudentMsgVo> tableDataInfo = xgStudentMsgService.advancedSearch(bo);
List<XgStudentMsgVo> list = tableDataInfo.getRows();
// 将XgStudentMsgVo转换为XgStudentMsgExportVo
List<XgStudentMsgExportVo> exportList = MapstructUtils.convert(list, XgStudentMsgExportVo.class);
ExcelUtil.exportExcel(exportList, "学生信息", XgStudentMsgExportVo.class, response);
// 导出完成后记录缓存统计
logCacheStats();
// return xgStudentMsgService.advancedSearch(bo);
}
/**
* 导出学生信息列表
*/
@@ -1,5 +1,5 @@
<template>
<el-dialog v-model="dialogVisible" title="高级检索" width="1200px" append-to-body @close="handleClose">
<el-dialog v-model="dialogVisible" title="高级检索" width="1200px" append-to-body @close="handleClose" class="advanced-search-dialog">
<el-form ref="advancedFormRef" :model="formData" label-width="120px">
<!-- 基础信息 -->
<el-divider content-position="left">基础信息</el-divider>
@@ -1072,4 +1072,85 @@ defineOptions({
font-weight: bold;
color: #409eff;
}
/* 使用:deep()确保样式穿透到子组件 */
:deep(.advanced-search-dialog .el-select .el-select__tags .el-tag) {
margin-right: 6px !important;
margin-bottom: 4px !important;
min-width: 20px !important;
max-width: 60px !important;
width: auto !important;
}
/* 确保标签内容可见 - 使用更高优先级 */
:deep(.advanced-search-dialog .el-select--multiple .el-select__tags .el-tag .el-tag__content) {
overflow: visible !important;
text-overflow: unset !important;
white-space: nowrap !important;
display: inline-block !important;
width: auto !important;
max-width: 60px !important;
}
/* 确保下拉框容器有足够空间 */
:deep(.advanced-search-dialog .el-select--multiple .el-select__tags) {
display: flex !important;
flex-wrap: wrap !important;
align-items: center !important;
min-height: 32px !important;
}
/* 针对树形选择器的标签样式 */
:deep(.advanced-search-dialog .el-tree-select .el-select__tags .el-tag) {
min-width: 20px !important;
max-width: 60px !important;
width: auto !important;
}
/* 移除所有强制性的宽度限制 - 使用更高优先级 */
:deep(.advanced-search-dialog .el-select--multiple .el-select__tags .el-tag:first-child) {
min-width: 20px !important;
max-width: 60px !important;
width: auto !important;
flex-shrink: 0 !important;
}
/* 确保标签文字完整显示 - 使用更高优先级 */
:deep(.advanced-search-dialog .el-select--multiple .el-select__tags .el-tag .el-select__tags-text) {
overflow: visible !important;
text-overflow: unset !important;
white-space: nowrap !important;
width: auto !important;
max-width: 60px !important;
}
/* 直接针对Element Plus的标签样式进行覆盖 */
:deep(.el-tag.el-tag--info.el-tag--default.el-tag--light) {
min-width: 20px !important;
max-width: 60px !important;
width: auto !important;
}
:deep(.el-tag.el-tag--info.el-tag--default.el-tag--light .el-tag__content) {
overflow: visible !important;
text-overflow: unset !important;
white-space: nowrap !important;
width: auto !important;
max-width: 60px !important;
}
/* 针对所有el-tag的强制覆盖 */
:deep(.el-tag) {
min-width: 20px !important;
max-width: 60px !important;
width: auto !important;
}
:deep(.el-tag .el-tag__content) {
overflow: visible !important;
text-overflow: unset !important;
white-space: nowrap !important;
width: auto !important;
max-width: 60px !important;
}
</style>