wuzhen update

This commit is contained in:
wuzhen committed 2025-08-24 10:59:38 +08:00
1 parent dee854ab07
commit d257e70a00
9 files changed
+1725 -1469

No files matched your search

@@ -25,7 +25,6 @@ import org.dromara.zsjy.service.IZsjyRecruitmentPosterService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.UUID;
/**
* 招聘海报Service业务层处理
@@ -138,14 +137,23 @@ public class ZsjyRecruitmentPosterServiceImpl implements IZsjyRecruitmentPosterS
throw new ServiceException("企业信息不存在");
}
// 生成海报路径
String posterPath = generatePosterPath("enterprise");
// 检查是否已存在企业海报
LambdaQueryWrapper<ZsjyRecruitmentPoster> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(ZsjyRecruitmentPoster::getEnterpriseId, enterpriseId)
.eq(ZsjyRecruitmentPoster::getPosterType, "1")
.isNull(ZsjyRecruitmentPoster::getPositionId);
ZsjyRecruitmentPoster existingPoster = baseMapper.selectOne(queryWrapper);
// 创建海报记录
if (existingPoster != null) {
// 如果已存在,直接返回现有记录
return baseMapper.selectVoById(existingPoster.getId());
}
// 创建海报记录(不设置posterPath,等待用户上传)
ZsjyRecruitmentPosterBo bo = new ZsjyRecruitmentPosterBo();
bo.setEnterpriseId(enterpriseId);
bo.setPosterPath(posterPath);
bo.setPosterType("1"); // 企业海报
// 注意:不设置posterPath,让用户后续上传图片
// 保存海报记录
insertByBo(bo);
@@ -169,15 +177,23 @@ public class ZsjyRecruitmentPosterServiceImpl implements IZsjyRecruitmentPosterS
throw new ServiceException("岗位信息不存在");
}
// 生成海报路径
String posterPath = generatePosterPath("position");
// 检查是否已存在岗位海报
LambdaQueryWrapper<ZsjyRecruitmentPoster> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(ZsjyRecruitmentPoster::getPositionId, positionId)
.eq(ZsjyRecruitmentPoster::getPosterType, "2");
ZsjyRecruitmentPoster existingPoster = baseMapper.selectOne(queryWrapper);
// 创建海报记录
if (existingPoster != null) {
// 如果已存在,直接返回现有记录
return baseMapper.selectVoById(existingPoster.getId());
}
// 创建海报记录(不设置posterPath,等待用户上传)
ZsjyRecruitmentPosterBo bo = new ZsjyRecruitmentPosterBo();
bo.setEnterpriseId(position.getEnterpriseId());
bo.setPositionId(positionId);
bo.setPosterPath(posterPath);
bo.setPosterType("2"); // 岗位海报
// 注意:不设置posterPath,让用户后续上传图片
// 保存海报记录
insertByBo(bo);
@@ -187,16 +203,5 @@ public class ZsjyRecruitmentPosterServiceImpl implements IZsjyRecruitmentPosterS
return vo;
}
/**
* 生成海报路径
*
* @param type 类型
* @return 海报路径
*/
private String generatePosterPath(String type) {
// 基于类型和UUID生成唯一的海报文件名
String fileName = type + "_" + UUID.randomUUID().toString().replace("-", "") + ".png";
// 海报存储路径
return "/profile/upload/poster/" + fileName;
}
}
+217 -159
View File
@@ -1,5 +1,5 @@
<template>
<div class="p-2 page-container">
<div class="page-container">
<!-- 统计卡片区域 -->
<div class="mb-10px">
<el-row :gutter="16">
@@ -146,9 +146,9 @@
</el-row>
<!-- 操作按钮行 -->
<el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24" class="search-btn-container">
<el-form-item>
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
@@ -159,37 +159,40 @@
</div>
</transition>
<!-- 工具栏 -->
<el-card class="button-card mb-10px" shadow="never">
<div class="card-header-vertical">
<span class="toolbar-title">我的助学金申请</span>
<div class="button-group">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:povertyApplication:add']"> 新增申请 </el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate" v-hasPermi="['jcbt:povertyApplication:edit']">
修改
</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['jcbt:povertyApplication:remove']">
删除
</el-button>
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:povertyApplication:export']"> 导出 </el-button>
<!-- 表格数据 -->
<el-card shadow="never" class="button-card table-card">
<template #header>
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:povertyApplication:add']">新增申请</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate" v-hasPermi="['jcbt:povertyApplication:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['jcbt:povertyApplication:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:povertyApplication:export']">导出</el-button>
</el-col>
<right-toolbar :show-search="showSearch" @show-search="showSearch = $event" @query-table="getList"></right-toolbar>
</div>
</div>
</el-card>
<!-- 表格区域 -->
<el-card class="table-card" shadow="never">
</el-row>
</template>
<div class="table-container">
<el-table
v-loading="loading"
border
:data="applicationList"
row-key="id"
class="scroll-table"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
class="scroll-table"
max-height="650"
style="width: 100%"
:scroll-x="true"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="申请编号" align="center" prop="applicationNo" min-width="140" />
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="申请编号" align="center" prop="applicationNo" min-width="140" fixed="left" />
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
<el-table-column label="班级" align="center" prop="className" min-width="120" />
@@ -217,7 +220,7 @@
<span>{{ parseTime(scope.row.submitTime || scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280" fixed="right">
<template #default="scope">
<el-tooltip content="查看详情" placement="top">
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
@@ -274,13 +277,13 @@
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page="queryParams.pageNum" :limit="queryParams.pageSize" @pagination="getList" />
</div>
</el-card>
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page="queryParams.pageNum" :limit="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 添加或修改贫困生认定申请对话框 -->
<el-dialog :title="title" v-model="open" width="800px" append-to-body>
<el-form ref="applicationFormRef" :model="form" :rules="rules" label-width="120px">
@@ -1299,10 +1302,10 @@ onMounted(() => {
});
</script>
<style scoped lang="scss">
/* 继承后勤管理的样式 */
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 20px;
padding: 8px;
}
.mb-10px {
@@ -1311,125 +1314,180 @@ onMounted(() => {
/* 统计卡片样式 */
.stat-card {
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
border: none;
border-radius: 8px;
height: 90px;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.stat-content {
display: flex;
align-items: center;
padding: 5px 12px;
height: 100%;
box-sizing: border-box;
.stat-icon {
font-size: 24px;
margin-right: 12px;
opacity: 0.8;
}
.stat-info {
flex: 1;
.stat-value {
font-size: 20px;
font-weight: bold;
line-height: 1;
margin-bottom: 3px;
}
.stat-label {
font-size: 13px;
opacity: 0.7;
line-height: 1;
}
}
}
&.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
&.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
&.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
&.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
color: #333;
}
}
/* 搜索卡片样式 */
.search-card {
.search-form {
margin-bottom: 0;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
/* 按钮卡片样式 */
.button-card {
.card-header-vertical {
display: flex;
justify-content: space-between;
align-items: center;
}
.toolbar-title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
.button-group {
display: flex;
align-items: center;
gap: 10px;
}
.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}
/* 表格卡片样式 */
.stat-card-success {
background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}
.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}
.stat-content {
display: flex;
align-items: center;
padding: 8px 0;
height: 100%;
box-sizing: border-box;
}
.stat-icon {
margin-right: 16px;
font-size: 24px;
color: rgba(255, 255, 255, 0.9);
}
.stat-info {
flex: 1;
}
.stat-value {
font-size: 24px;
font-weight: 700;
color: #fff;
line-height: 1.2;
margin-bottom: 4px;
}
.stat-label {
font-size: 14px;
color: rgba(255, 255, 255, 0.9);
line-height: 1.2;
}
/* 表格卡片布局 */
.table-card {
.table-container {
overflow-x: auto;
}
.scroll-table {
width: 100%;
:deep(.el-table__header-wrapper) {
.el-table__header {
th {
background-color: #f8f9fa;
color: #333;
font-weight: 600;
}
}
}
:deep(.el-table__body-wrapper) {
.el-table__row {
&:hover {
background-color: #f5f7fa;
}
}
}
}
margin-top: 0;
}
/* 操作按钮样式 */
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 搜索按钮容器样式 */
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.search-btn-container .el-form-item {
margin-bottom: 0 !important;
}
/* 操作按钮样式 - 参考后勤管理模块 */
.action-buttons {
display: flex;
gap: 8px;
@@ -1439,15 +1497,6 @@ onMounted(() => {
flex-wrap: wrap;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0;
background-color: #fff;
margin-top: 0px;
}
/* 对话框样式 */
.dialog-footer-right {
display: flex;
@@ -1463,15 +1512,24 @@ onMounted(() => {
}
/* 描述列表样式 */
:deep(.el-descriptions) {
.el-descriptions__label {
font-weight: 600;
color: #606266;
background-color: #fafafa;
:deep(.el-descriptions .el-descriptions__label) {
font-weight: 600;
color: #606266;
background-color: #fafafa;
}
:deep(.el-descriptions .el-descriptions__content) {
color: #303133;
}
/* 响应式设计 */
@media (max-width: 768px) {
.page-container {
padding: 10px;
}
.el-descriptions__content {
color: #303133;
.stat-card {
margin-bottom: 10px;
}
}
</style>
+213 -162
View File
@@ -1,5 +1,5 @@
<template>
<div class="p-2 page-container">
<div class="page-container">
<!-- 统计卡片区域 -->
<div class="mb-10px">
<el-row :gutter="16">
@@ -147,46 +147,52 @@
</div>
</transition>
<!-- 工具栏 -->
<el-card class="button-card mb-10px" shadow="never">
<div class="card-header-vertical">
<span class="toolbar-title">助学金申请审核管理</span>
<div class="button-group">
<el-button
type="success"
plain
icon="Check"
:disabled="multiple"
@click="handleBatchApprove"
v-hasPermi="['jcbt:povertyApplication:approve']"
>
批量通过
</el-button>
<el-button type="danger" plain icon="Close" :disabled="multiple" @click="handleBatchReject" v-hasPermi="['jcbt:povertyApplication:reject']">
批量驳回
</el-button>
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:povertyApplication:export']"> 导出 </el-button>
<el-button type="info" plain icon="Download" @click="handleExportPending" v-hasPermi="['jcbt:povertyApplication:export']">
导出待审核
</el-button>
<right-toolbar :show-search="showSearch" @show-search="showSearch = $event" @query-table="getList"></right-toolbar>
</div>
</div>
</el-card>
<!-- 表格区域 -->
<el-card class="table-card" shadow="never">
<template #header>
<el-row class="mb-[10px]">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Check"
:disabled="multiple"
@click="handleBatchApprove"
v-hasPermi="['jcbt:povertyApplication:approve']"
>
批量通过
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Close" :disabled="multiple" @click="handleBatchReject" v-hasPermi="['jcbt:povertyApplication:reject']">
批量驳回
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:povertyApplication:export']">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="Download" @click="handleExportPending" v-hasPermi="['jcbt:povertyApplication:export']">
导出待审核
</el-button>
</el-col>
<right-toolbar :show-search="showSearch" @show-search="showSearch = $event" @query-table="getList"></right-toolbar>
</el-row>
</template>
<div class="table-container">
<el-table
v-loading="loading"
border
:data="reviewList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
class="scroll-table"
max-height="650"
:scroll-x="true"
style="width: 100%"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="申请编号" align="center" prop="applicationNo" min-width="140" />
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="申请编号" align="center" prop="applicationNo" min-width="140" fixed="left" />
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
<el-table-column label="班级" align="center" prop="className" min-width="120" />
@@ -224,7 +230,7 @@
<span>{{ scope.row.auditTime ? parseTime(scope.row.auditTime, '{y}-{m}-{d} {h}:{i}') : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280" fixed="right">
<template #default="scope">
<el-tooltip content="查看详情" placement="top">
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
@@ -865,10 +871,10 @@ onMounted(() => {
});
</script>
<style scoped lang="scss">
/* 继承后勤管理的样式 */
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 20px;
padding: 8px;
}
.mb-10px {
@@ -880,121 +886,170 @@ onMounted(() => {
border-radius: 8px;
transition: all 0.3s ease;
height: 90px;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.stat-content {
display: flex;
align-items: center;
padding: 5px 12px;
height: 100%;
box-sizing: border-box;
.stat-icon {
font-size: 24px;
margin-right: 12px;
opacity: 0.8;
}
.stat-info {
flex: 1;
.stat-value {
font-size: 20px;
font-weight: bold;
line-height: 1;
margin-bottom: 3px;
}
.stat-label {
font-size: 13px;
opacity: 0.7;
line-height: 1;
}
}
}
&.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
&.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
&.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
&.stat-card-danger {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
color: white;
}
}
/* 按钮卡片样式 */
.button-card {
.card-header-vertical {
display: flex;
justify-content: space-between;
align-items: center;
}
.toolbar-title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
.button-group {
display: flex;
align-items: center;
gap: 10px;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
/* 表格卡片样式 */
.stat-card .stat-content {
display: flex;
align-items: center;
padding: 5px 12px;
height: 100%;
box-sizing: border-box;
}
.stat-card .stat-content .stat-icon {
font-size: 24px;
margin-right: 12px;
opacity: 0.8;
}
.stat-card .stat-content .stat-info {
flex: 1;
}
.stat-card .stat-content .stat-info .stat-value {
font-size: 20px;
font-weight: bold;
line-height: 1;
margin-bottom: 3px;
}
.stat-card .stat-content .stat-info .stat-label {
font-size: 13px;
opacity: 0.7;
line-height: 1;
}
.stat-card.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.stat-card.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
.stat-card.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
.stat-card.stat-card-danger {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
color: white;
}
/* 表格卡片布局 */
.table-card {
.table-container {
overflow-x: auto;
}
margin-top: 0;
}
.scroll-table {
width: 100%;
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
:deep(.el-table__header-wrapper) {
.el-table__header {
th {
background-color: #f8f9fa;
color: #333;
font-weight: 600;
}
}
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
:deep(.el-table__body-wrapper) {
.el-table__row {
&:hover {
background-color: #f5f7fa;
}
}
}
}
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px;
margin-top: 0px !important;
}
/* 搜索按钮容器样式 */
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.search-btn-container .el-form-item {
margin-bottom: 0 !important;
}
/* 对话框样式 */
@@ -1012,35 +1067,31 @@ onMounted(() => {
}
/* 附件预览样式 */
.attachment-preview {
.attachment-item {
text-align: center;
padding: 20px;
border: 1px solid #e4e7ed;
border-radius: 4px;
h4 {
margin-bottom: 15px;
color: #303133;
}
.no-attachment {
padding: 20px;
color: #909399;
}
}
.attachment-preview .attachment-item {
text-align: center;
padding: 20px;
border: 1px solid #e4e7ed;
border-radius: 4px;
}
/* 描述列表样式 */
:deep(.el-descriptions) {
.el-descriptions__label {
font-weight: 600;
color: #606266;
background-color: #fafafa;
}
.attachment-preview .attachment-item h4 {
margin-bottom: 15px;
color: #303133;
}
.el-descriptions__content {
color: #303133;
}
.attachment-preview .attachment-item .no-attachment {
padding: 20px;
color: #909399;
}
/* 描述列表样式优化 */
:deep(.el-descriptions .el-descriptions__label) {
font-weight: 600;
color: #606266;
width: 120px;
}
:deep(.el-descriptions .el-descriptions__content) {
color: #303133;
}
</style>
@@ -1,40 +1,102 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!-- 查询面板 -->
<el-col :span="24" class="search-container">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="学生姓名" prop="studentName">
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="学号" prop="studentNo">
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="申请状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择申请状态" clearable>
<el-option label="草稿" value="draft" />
<el-option label="待审核" value="waiting" />
<el-option label="已完成" value="complete" />
<el-option label="已拒绝" value="rejected" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-col>
<div class="page-container">
<!-- 搜索区域 -->
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" label-width="100px">
<!-- 第一行:4个搜索条件 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="学生姓名" prop="studentName">
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="学号" prop="studentNo">
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申请状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择申请状态" clearable style="width: 100%">
<el-option label="草稿" value="draft" />
<el-option label="待审核" value="waiting" />
<el-option label="已完成" value="complete" />
<el-option label="已拒绝" value="rejected" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申请类型" prop="applicationType">
<el-select v-model="queryParams.applicationType" placeholder="请选择申请类型" clearable style="width: 100%">
<el-option label="教师推荐" value="RECOMMEND" />
<el-option label="学生申请" value="STUDENT" />
<el-option label="自动评定" value="AUTO" />
<el-option label="直接指定" value="DIRECT" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- 工具栏 -->
<el-col :span="24">
<el-row :gutter="10" class="mb8">
<!-- 第二行:2个搜索条件 + 操作按钮 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="奖学金类型" prop="scholarshipTypeId">
<el-select v-model="queryParams.scholarshipTypeId" placeholder="请选择奖学金类型" clearable style="width: 100%">
<el-option
v-for="type in scholarshipTypeList"
:key="type.id"
:label="type.typeName"
:value="type.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申请时间">
<el-date-picker
v-model="daterangeCreateTime"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleQuery"
style="width: 100%"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8" >
<el-col :span="24" class="search-btn-container">
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
</div>
</transition>
<!-- 表格数据 -->
<el-card shadow="never" class="button-card table-card">
<template #header>
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:scholarshipApplication:add']">班主任批量申请</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['jcbt:scholarshipApplication:edit']"
>修改</el-button
>
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate()"
v-hasPermi="['jcbt:scholarshipApplication:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -44,17 +106,25 @@
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['jcbt:scholarshipApplication:remove']"
>删除</el-button
>
>删除</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</el-col>
<!-- 数据表格 -->
<el-col :span="24">
<el-table v-loading="loading" :data="applicationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
</template>
<div class="table-container">
<el-table
ref="scholarshipApplicationTableRef"
v-loading="loading"
border
:data="applicationList"
row-key="id"
class="scroll-table"
@selection-change="handleSelectionChange"
style="width: 100%"
:scroll-x="true"
>
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
<el-table-column label="学院" align="center" prop="deptName" min-width="120" />
@@ -86,7 +156,7 @@
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" fixed="right">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button
@@ -109,10 +179,13 @@
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-col>
</el-row>
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" :page="queryParams.pageNum" :limit="queryParams.pageSize" :total="total" @pagination="getList" />
</div>
<!-- 班主任批量申请奖学金对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="1000px" append-to-body>
@@ -1079,6 +1152,124 @@ onMounted(() => {
</script>
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 8px;
}
/* 表格卡片布局 */
.table-card {
margin-top: 0;
}
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 搜索按钮容器样式 */
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.search-btn-container .el-form-item {
margin-bottom: 0 !important;
}
.search-container {
background: #fff;
padding: 20px;
+317 -123
View File
@@ -1,5 +1,5 @@
<template>
<div class="p-2 page-container">
<div class="page-container">
<!-- 搜索区域 -->
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
@@ -38,7 +38,7 @@
</el-col>
</el-row>
<!-- 第二行:3个搜索条件 + 操作按钮 -->
<!-- 第二行:3个搜索条件 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="批次类型" prop="batchType">
@@ -73,8 +73,10 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24" class="search-btn-container">
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
@@ -146,131 +148,158 @@
<!-- 表格区域 -->
<el-card shadow="never" class="button-card table-card">
<template #header>
<el-row :gutter="10" class="mb8">
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:scholarshipBatch:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['jcbt:scholarshipBatch:edit']">修改</el-button>
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate()"
v-hasPermi="['jcbt:scholarshipBatch:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['jcbt:scholarshipBatch:remove']">删除</el-button>
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['jcbt:scholarshipBatch:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button icon="Download" @click="handleExport" v-hasPermi="['jcbt:scholarshipBatch:export']">导出</el-button>
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['jcbt:scholarshipBatch:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="batchList" @selection-change="handleSelectionChange" @row-dblclick="handleView">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="批次编码" align="center" prop="batchCode" min-width="120" />
<el-table-column label="批次名称" align="center" prop="batchName" min-width="150" show-overflow-tooltip />
<el-table-column label="学年" align="center" prop="academicYear" width="120" />
<el-table-column label="学期" align="center" prop="semester" width="80">
<template #default="scope">
<span v-if="scope.row.semester === 1">第一学期</span>
<span v-else-if="scope.row.semester === 2">第二学期</span>
<span v-else-if="scope.row.semester === 3">全年</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="批次类型" align="center" prop="batchType" width="100">
<template #default="scope">
<el-tag v-if="scope.row.batchType === 'REGULAR'" type="primary">常规批次</el-tag>
<el-tag v-else-if="scope.row.batchType === 'SPECIAL'" type="warning">专项批次</el-tag>
<el-tag v-else-if="scope.row.batchType === 'SUPPLEMENTARY'" type="info">补充批次</el-tag>
<el-tag v-else type="info">未知</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="scope">
<el-tag v-if="scope.row.status === 'DRAFT'" type="info">草稿</el-tag>
<el-tag v-else-if="scope.row.status === 'ACTIVE'" type="success">进行中</el-tag>
<el-tag v-else-if="scope.row.status === 'COMPLETED'" type="primary">已完成</el-tag>
<el-tag v-else-if="scope.row.status === 'CANCELLED'" type="danger">已取消</el-tag>
<el-tag v-else type="info">未知</el-tag>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" width="200">
<template #default="scope">
<div v-if="scope.row.applyStartTime && scope.row.applyEndTime">
<div>{{ parseTime(scope.row.applyStartTime, '{y}-{m}-{d}') }}</div>
<div style="color: #909399; font-size: 12px">至 {{ parseTime(scope.row.applyEndTime, '{y}-{m}-{d}') }}</div>
</div>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" width="200">
<template #default="scope">
<div v-if="scope.row.reviewStartTime && scope.row.reviewEndTime">
<div>{{ parseTime(scope.row.reviewStartTime, '{y}-{m}-{d}') }}</div>
<div style="color: #909399; font-size: 12px">至 {{ parseTime(scope.row.reviewEndTime, '{y}-{m}-{d}') }}</div>
</div>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
<template #default="scope">
<el-tooltip content="查看" placement="top">
<el-button
link
type="primary"
icon="View"
size="default"
style="font-size: 16px; margin-right: 8px; color: blue"
@click="handleView(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:query']"
></el-button>
</el-tooltip>
<el-tooltip content="修改" placement="top">
<el-button
link
type="primary"
icon="Edit"
size="default"
style="font-size: 16px; margin-right: 8px"
@click="handleUpdate(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="状态变更" placement="top">
<el-button
link
type="warning"
icon="Switch"
size="default"
style="font-size: 16px; margin-right: 8px"
@click="handleStatusChange(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="danger"
icon="Delete"
size="default"
style="font-size: 16px"
@click="handleDelete(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:remove']"
></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<div class="table-container">
<el-table
ref="batchTableRef"
v-loading="loading"
border
:data="batchList"
row-key="id"
class="scroll-table"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
style="width: 100%"
:scroll-x="true"
>
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="批次编码" align="center" prop="batchCode" min-width="120" />
<el-table-column label="批次名称" align="center" prop="batchName" min-width="150" show-overflow-tooltip />
<el-table-column label="学年" align="center" prop="academicYear" width="120" />
<el-table-column label="学期" align="center" prop="semester" width="80">
<template #default="scope">
<span v-if="scope.row.semester === 1">第一学期</span>
<span v-else-if="scope.row.semester === 2">第二学期</span>
<span v-else-if="scope.row.semester === 3">全年</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="批次类型" align="center" prop="batchType" width="100">
<template #default="scope">
<el-tag v-if="scope.row.batchType === 'REGULAR'" type="primary">常规批次</el-tag>
<el-tag v-else-if="scope.row.batchType === 'SPECIAL'" type="warning">专项批次</el-tag>
<el-tag v-else-if="scope.row.batchType === 'SUPPLEMENTARY'" type="info">补充批次</el-tag>
<el-tag v-else type="info">未知</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="scope">
<el-tag v-if="scope.row.status === 'DRAFT'" type="info">草稿</el-tag>
<el-tag v-else-if="scope.row.status === 'ACTIVE'" type="success">进行中</el-tag>
<el-tag v-else-if="scope.row.status === 'COMPLETED'" type="primary">已完成</el-tag>
<el-tag v-else-if="scope.row.status === 'CANCELLED'" type="danger">已取消</el-tag>
<el-tag v-else type="info">未知</el-tag>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" width="200">
<template #default="scope">
<div v-if="scope.row.applyStartTime && scope.row.applyEndTime">
<div>{{ parseTime(scope.row.applyStartTime, '{y}-{m}-{d}') }}</div>
<div style="color: #909399; font-size: 12px">至 {{ parseTime(scope.row.applyEndTime, '{y}-{m}-{d}') }}</div>
</div>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" width="200">
<template #default="scope">
<div v-if="scope.row.reviewStartTime && scope.row.reviewEndTime">
<div>{{ parseTime(scope.row.reviewStartTime, '{y}-{m}-{d}') }}</div>
<div style="color: #909399; font-size: 12px">至 {{ parseTime(scope.row.reviewEndTime, '{y}-{m}-{d}') }}</div>
</div>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280" fixed="right">
<template #default="scope">
<el-tooltip content="查看" placement="top">
<el-button
link
type="info"
icon="View"
@click="handleView(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:query']"
></el-button>
</el-tooltip>
<el-tooltip content="修改" placement="top">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="状态变更" placement="top">
<el-button
link
type="warning"
icon="Switch"
@click="handleStatusChange(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="danger"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['jcbt:scholarshipBatch:remove']"
></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" :page="queryParams.pageNum" :limit="queryParams.pageSize" :total="total" @pagination="getList" />
</div>
<!-- 添加或修改批次对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="1200px" append-to-body>
<el-form ref="batchFormRef" :model="form" :rules="rules" label-width="120px">
@@ -518,6 +547,10 @@
</template>
<script setup name="ScholarshipBatch" lang="ts">
import { reactive, ref, onMounted, getCurrentInstance, toRefs } from 'vue';
import type { ComponentInternalInstance } from 'vue';
import type { FormInstance, TableInstance } from 'element-plus';
import { parseTime } from '@/utils/ruoyi';
import {
listScholarshipBatch,
getScholarshipBatch,
@@ -533,8 +566,19 @@ import {
} from '@/api/jcbt/scholarshipBatch';
import { listScholarshipType, type ScholarshipTypeVO } from '@/api/jcbt/scholarshipType';
const { proxy } = getCurrentInstance()!;
const { sys_normal_disable } = toRefs<any>(proxy?.useDict('sys_normal_disable'));
// 类型定义
interface DialogOption {
visible: boolean;
title: string;
}
interface PageData<T, U> {
form: T;
queryParams: U;
rules: any;
}
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const batchList = ref<ScholarshipBatchVO[]>([]);
const loading = ref(true);
@@ -545,8 +589,10 @@ const multiple = ref(true);
const total = ref(0);
const buttonLoading = ref(false);
const queryFormRef = ref<ElFormInstance>();
const batchFormRef = ref<ElFormInstance>();
const queryFormRef = ref<FormInstance>();
const batchFormRef = ref<FormInstance>();
const toolbarRef = ref<HTMLElement>();
const batchTableRef = ref<TableInstance>();
const dialog = reactive<DialogOption>({
visible: false,
@@ -612,7 +658,7 @@ const data = reactive<PageData<ScholarshipBatchForm, ScholarshipBatchQuery>>({
const { queryParams, form, rules } = toRefs(data);
// 时间范围
const daterangeCreateTime = ref<[DateModelType, DateModelType]>(['', '']);
const daterangeCreateTime = ref<[string, string]>(['', '']);
// 状态变更表单
const statusForm = ref({
@@ -867,12 +913,165 @@ onMounted(() => {
</script>
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 8px;
}
/* 表格卡片布局 */
.table-card {
margin-top: 0;
}
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 对话框样式 */
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
}
.dialog-form {
.el-form-item {
margin-bottom: 18px;
}
.form-tip {
font-size: 12px;
color: #909399;
margin-top: 4px;
line-height: 1.4;
}
}
/* 描述列表样式优化 */
:deep(.el-descriptions) {
.el-descriptions__label {
font-weight: 600;
color: #606266;
width: 120px;
}
.el-descriptions__content {
color: #303133;
}
}
/* 搜索按钮容器样式 */
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
.el-form-item {
margin-bottom: 0 !important;
}
}
/* 统计卡片样式 */
.form-help-text {
font-size: 12px;
color: #909399;
margin-top: 4px;
line-height: 1.4;
}
.stats-row {
margin-bottom: 16px;
}
@@ -958,11 +1157,6 @@ onMounted(() => {
color: #909399;
}
.pagination-container {
margin-top: 16px;
text-align: center;
}
.description-cell {
max-width: 200px;
overflow: hidden;
+269 -369
View File
@@ -1,252 +1,206 @@
<template>
<div class="page-container">
<!-- 统计卡片区域 -->
<el-row :gutter="20" class="stats-row">
<el-col :span="6">
<div class="stat-card stat-card-primary">
<div class="stat-content">
<div class="stat-icon">
<el-icon><TrendCharts /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ totalQuota }}</div>
<div class="stat-label">总名额</div>
</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card stat-card-success">
<div class="stat-content">
<div class="stat-icon">
<el-icon><Check /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ usedQuota }}</div>
<div class="stat-label">已使用</div>
</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card stat-card-warning">
<div class="stat-content">
<div class="stat-icon">
<el-icon><Opportunity /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ availableQuota }}</div>
<div class="stat-label">可用名额</div>
</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card stat-card-info">
<div class="stat-content">
<div class="stat-icon">
<el-icon><DataBoard /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ usageRate }}%</div>
<div class="stat-label">使用率</div>
</div>
</div>
</div>
</el-col>
</el-row>
<!-- 搜索区域 -->
<el-card class="button-card" v-show="showSearch">
<template #header>
<div class="card-header">
<span class="toolbar-title">名额分配查询</span>
</div>
</template>
<el-form :model="queryParams" ref="queryRef" label-width="100px">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="奖学金批次" prop="batchId">
<el-select v-model="queryParams.batchId" placeholder="请选择奖学金批次" clearable style="width: 100%" @change="handleBatchChange">
<el-option v-for="batch in batchList" :key="batch.id" :label="batch.batchName" :value="batch.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="奖学金类型" prop="scholarshipTypeId">
<el-select v-model="queryParams.scholarshipTypeId" placeholder="请选择奖学金类型" clearable style="width: 100%">
<el-option v-for="type in scholarshipTypeList" :key="type.id" :label="type.name" :value="type.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="分配级别" prop="allocationLevel">
<el-select v-model="queryParams.allocationLevel" placeholder="请选择分配级别" clearable style="width: 100%">
<el-option label="全校" value="UNIVERSITY" />
<el-option label="学院" value="COLLEGE" />
<el-option label="专业" value="MAJOR" />
<el-option label="班级" value="CLASS" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable style="width: 100%">
<el-option label="激活" value="ACTIVE" />
<el-option label="停用" value="INACTIVE" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="目标部门" prop="targetDeptId">
<el-tree-select
v-model="queryParams.targetDeptId"
:data="deptOptions"
:props="{ value: 'id', label: 'label', children: 'children' }"
value-key="id"
placeholder="请选择目标部门"
check-strictly
clearable
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="锁定状态" prop="isLocked">
<el-select v-model="queryParams.isLocked" placeholder="请选择锁定状态" clearable style="width: 100%">
<el-option label="未锁定" :value="0" />
<el-option label="已锁定" :value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryRef" :model="queryParams" label-width="100px">
<!-- 第一行:4个搜索条件 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="奖学金批次" prop="batchId">
<el-select v-model="queryParams.batchId" placeholder="请选择奖学金批次" clearable style="width: 100%" @change="handleBatchChange">
<el-option v-for="batch in batchList" :key="batch.id" :label="batch.batchName" :value="batch.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="奖学金类型" prop="scholarshipTypeId">
<el-select v-model="queryParams.scholarshipTypeId" placeholder="请选择奖学金类型" clearable style="width: 100%">
<el-option v-for="type in scholarshipTypeList" :key="type.id" :label="type.name" :value="type.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="分配级别" prop="allocationLevel">
<el-select v-model="queryParams.allocationLevel" placeholder="请选择分配级别" clearable style="width: 100%">
<el-option label="全校" value="UNIVERSITY" />
<el-option label="学院" value="COLLEGE" />
<el-option label="专业" value="MAJOR" />
<el-option label="班级" value="CLASS" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable style="width: 100%">
<el-option label="激活" value="ACTIVE" />
<el-option label="停用" value="INACTIVE" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- 操作按钮区域 -->
<el-card class="button-card">
<!-- 第二行:2个搜索条件 + 操作按钮 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="目标部门" prop="targetDeptId">
<el-tree-select
v-model="queryParams.targetDeptId"
:data="deptOptions"
:props="{ value: 'id', label: 'label', children: 'children' }"
value-key="id"
placeholder="请选择目标部门"
check-strictly
clearable
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="锁定状态" prop="isLocked">
<el-select v-model="queryParams.isLocked" placeholder="请选择锁定状态" clearable style="width: 100%">
<el-option label="未锁定" :value="0" />
<el-option label="已锁定" :value="1" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24" class="search-btn-container">
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
</div>
</transition>
<!-- 表格数据 -->
<el-card shadow="never" class="button-card table-card">
<template #header>
<div class="card-header">
<span class="toolbar-title">名额分配管理</span>
<div class="toolbar-actions">
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:scholarshipQuota:add']">新增</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['jcbt:scholarshipQuota:edit']"
>修改</el-button
>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['jcbt:scholarshipQuota:remove']"
>删除</el-button
>
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:scholarshipQuota:export']">导出</el-button>
<el-button type="info" plain icon="Operation" @click="handleBatchAllocate" v-hasPermi="['jcbt:scholarshipQuota:add']">批量分配</el-button>
<el-button type="primary" plain icon="Refresh" @click="handleAutoAllocate" v-hasPermi="['jcbt:scholarshipQuota:edit']" v-if="false"
>自动分配</el-button
>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</div>
</div>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate()"
v-hasPermi="['jcbt:scholarshipQuota:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['jcbt:scholarshipQuota:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['jcbt:scholarshipQuota:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="Operation"
@click="handleBatchAllocate"
v-hasPermi="['jcbt:scholarshipQuota:add']"
>批量分配</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
</el-card>
<!-- 数据表格 -->
<el-card class="table-card">
<div class="table-container">
<el-table
ref="scholarshipQuotaTableRef"
v-loading="loading"
border
:data="scholarshipQuotaList"
@selection-change="handleSelectionChange"
class="scroll-table"
row-key="id"
class="scroll-table"
@selection-change="handleSelectionChange"
style="width: 100%"
:scroll-x="true"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column label="奖学金批次" align="center" prop="batchName" width="150" />
<el-table-column label="奖学金类型" align="center" prop="scholarshipTypeName" width="150" />
<el-table-column label="分配级别" align="center" prop="allocationLevelName" width="100" />
<el-table-column label="目标部门" align="center" prop="targetDeptName" width="150" />
<el-table-column label="总名额" align="center" prop="totalQuota" width="80" />
<el-table-column label="已使用" align="center" prop="usedQuota" width="80">
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="奖学金批次" prop="batchName" min-width="150" show-overflow-tooltip />
<el-table-column label="奖学金类型" prop="scholarshipTypeName" min-width="150" show-overflow-tooltip />
<el-table-column label="分配级别" prop="allocationLevelName" width="100" align="center" />
<el-table-column label="目标部门" prop="targetDeptName" min-width="150" show-overflow-tooltip />
<el-table-column label="总名额" prop="totalQuota" width="80" align="center" />
<el-table-column label="已使用" prop="usedQuota" width="80" align="center">
<template #default="scope">
<span :class="{ 'text-danger': scope.row.usedQuota > scope.row.totalQuota }">
{{ scope.row.usedQuota || 0 }}
</span>
</template>
</el-table-column>
<el-table-column label="可用名额" align="center" prop="availableQuota" width="80">
<el-table-column label="可用名额" prop="availableQuota" width="90" align="center">
<template #default="scope">
<span :class="{ 'text-success': scope.row.availableQuota > 0, 'text-danger': scope.row.availableQuota <= 0 }">
{{ scope.row.availableQuota || 0 }}
</span>
</template>
</el-table-column>
<el-table-column label="预留名额" align="center" prop="reservedQuota" width="80" />
<el-table-column label="分配依据" align="center" prop="allocationBasis" min-width="150" show-overflow-tooltip />
<el-table-column label="状态" align="center" prop="statusName" width="80" />
<el-table-column label="锁定状态" align="center" prop="isLocked" width="100">
<el-table-column label="预留名额" prop="reservedQuota" width="90" align="center" />
<el-table-column label="分配依据" prop="allocationBasis" min-width="150" show-overflow-tooltip />
<el-table-column label="状态" prop="statusName" width="80" align="center" />
<el-table-column label="锁定状态" prop="isLocked" width="100" align="center">
<template #default="scope">
<el-tag :type="scope.row.isLocked === 1 ? 'danger' : 'success'">
{{ scope.row.isLocked === 1 ? '已锁定' : '未锁定' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<el-table-column label="创建时间" prop="createTime" width="180" align="center">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['jcbt:scholarshipQuota:edit']"
:disabled="scope.row.isLocked === 1"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="danger"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['jcbt:scholarshipQuota:remove']"
:disabled="scope.row.isLocked === 1"
></el-button>
</el-tooltip>
<el-tooltip content="锁定/解锁" placement="top">
<el-button
link
:type="scope.row.isLocked === 1 ? 'warning' : 'info'"
:icon="scope.row.isLocked === 1 ? 'Unlock' : 'Lock'"
@click="handleLock(scope.row)"
v-hasPermi="['jcbt:scholarshipQuota:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="调整名额" placement="top">
<el-button
link
type="success"
icon="Switch"
@click="handleAdjust(scope.row)"
v-hasPermi="['jcbt:scholarshipQuota:edit']"
:disabled="scope.row.isLocked === 1"
></el-button>
</el-tooltip>
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="280" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['jcbt:scholarshipQuota:edit']" :disabled="scope.row.isLocked === 1"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['jcbt:scholarshipQuota:remove']" :disabled="scope.row.isLocked === 1"></el-button>
</el-tooltip>
<el-tooltip content="锁定/解锁" placement="top">
<el-button link :type="scope.row.isLocked === 1 ? 'warning' : 'info'" :icon="scope.row.isLocked === 1 ? 'Unlock' : 'Lock'" @click="handleLock(scope.row)" v-hasPermi="['jcbt:scholarshipQuota:edit']"></el-button>
</el-tooltip>
<el-tooltip content="调整名额" placement="top">
<el-button link type="success" icon="Switch" @click="handleAdjust(scope.row)" v-hasPermi="['jcbt:scholarshipQuota:edit']" :disabled="scope.row.isLocked === 1"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" :page="queryParams.pageNum" :limit="queryParams.pageSize" :total="total" @pagination="getList" />
</div>
<!-- 添加或修改名额分配对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="600px" append-to-body>
<el-form ref="scholarshipQuotaFormRef" :model="form" :rules="rules" label-width="120px">
@@ -475,7 +429,10 @@
</template>
<script setup name="ScholarshipQuota" lang="ts">
import { ref, reactive, onMounted, computed } from 'vue';
import { ref, reactive, onMounted, computed, getCurrentInstance, toRefs } from 'vue';
import type { ComponentInternalInstance } from 'vue';
import type { FormRules, FormInstance, TableInstance } from 'element-plus';
import { parseTime } from '@/utils/ruoyi';
import {
listScholarshipQuota,
getScholarshipQuota,
@@ -495,16 +452,22 @@ import { getScholarshipTypesByBatch } from '@/api/jcbt/scholarshipApplication';
import { deptTreeSelect } from '@/api/system/user';
import type { ScholarshipQuotaVO, ScholarshipQuotaForm, ScholarshipQuotaQuery, BatchAllocateQuota } from '@/api/jcbt/scholarshipQuota';
const { proxy } = getCurrentInstance() as any;
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
interface DialogOption {
visible: boolean;
title: string;
}
// 表单ref定义
const queryRef = ref();
const scholarshipQuotaFormRef = ref();
const batchAllocateFormRef = ref();
const adjustFormRef = ref();
const queryRef = ref<FormInstance>();
const scholarshipQuotaFormRef = ref<FormInstance>();
const batchAllocateFormRef = ref<FormInstance>();
const adjustFormRef = ref<FormInstance>();
const scholarshipQuotaTableRef = ref<TableInstance>();
// 字典数据
const { allocation_level, quota_status } = toRefs<any>(proxy.useDict('allocation_level', 'quota_status'));
// const { allocation_level, quota_status } = toRefs<any>(proxy.useDict('allocation_level', 'quota_status'));
// 遮罩层
const loading = ref(true);
@@ -1007,80 +970,13 @@ onMounted(() => {
});
</script>
<style scoped lang="scss">
/* 继承后勤管理模块的样式风格 */
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 8px;
}
/* 统计卡片样式 */
.stats-row {
margin-bottom: 20px;
}
.stat-card {
border-radius: 12px;
transition: all 0.3s ease;
height: 90px;
cursor: pointer;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.stat-content {
display: flex;
align-items: center;
padding: 5px 16px;
height: 100%;
box-sizing: border-box;
.stat-icon {
font-size: 28px;
margin-right: 15px;
opacity: 0.9;
}
.stat-info {
flex: 1;
.stat-value {
font-size: 24px;
font-weight: bold;
line-height: 1;
margin-bottom: 4px;
}
.stat-label {
font-size: 14px;
opacity: 0.8;
line-height: 1;
}
}
}
&.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
&.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
&.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
&.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
color: #333;
}
}
/* 表格卡片布局 - 参考后勤管理功能 */
/* 表格卡片布局 */
.table-card {
margin-top: 0;
}
@@ -1089,105 +985,100 @@ onMounted(() => {
padding: 0px 20px 20px 20px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
.toolbar-title {
font-size: 18px;
font-weight: 600;
color: #1e293b;
display: flex;
align-items: center;
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
&::before {
content: '';
width: 4px;
height: 20px;
background: linear-gradient(135deg, rgb(93, 135, 255), rgb(73, 190, 255));
border-radius: 2px;
margin-right: 12px;
}
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
.toolbar-actions {
display: flex;
gap: 12px;
align-items: center;
}
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* 表格主体 */
.table-container {
width: 100%;
margin-bottom: 0;
}
/* 表格样式 - 参考后勤管理功能 */
.scroll-table {
width: 100%;
:deep(.el-table__header-wrapper) {
.el-table__header {
th {
background-color: #f8f9fa;
color: #333;
font-weight: 600;
}
}
}
:deep(.el-table__body-wrapper) {
.el-table__row {
&:hover {
background-color: #f5f7fa;
}
}
}
}
/* 表格横向滚动条样式优化 - 参考后勤管理功能 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #409eff #f0f0f0;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
/* Webkit 浏览器的横向滚动条样式 */
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important;
width: 12px !important;
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important;
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important;
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important;
min-height: 20px !important;
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important;
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 文本颜色样式 */
.text-danger {
color: #f56c6c;
}
@@ -1195,4 +1086,13 @@ onMounted(() => {
.text-success {
color: #67c23a;
}
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
.el-form-item {
margin-bottom: 0 !important;
}
}
</style>
+220 -268
View File
@@ -1,5 +1,5 @@
<template>
<div class="p-2 page-container">
<div class="page-container">
<!-- 审核统计 -->
<div class="mb-[10px]">
<el-row :gutter="16" class="stats-row">
@@ -94,7 +94,7 @@
</el-col>
</el-row>
<!-- 第二行:4个搜索条件 + 操作按钮 -->
<!-- 第二行:4个搜索条件 -->
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="奖学金类型" prop="scholarshipTypeId">
@@ -137,9 +137,9 @@
</el-row>
<!-- 操作按钮行 -->
<el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24" class="search-btn-container">
<el-form-item>
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
@@ -151,21 +151,22 @@
</transition>
<!-- 操作按钮 -->
<el-card shadow="never" class="button-card">
<div class="card-header">
<div class="toolbar-title">审核记录管理</div>
<div class="toolbar-actions">
<el-button type="success" plain icon="Check" :disabled="multiple" @click="handleBatchApprove" v-hasPermi="['jcbt:review:batchApprove']">
批量通过
</el-button>
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:review:export']"> 导出 </el-button>
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
</div>
</div>
</el-card>
<el-card shadow="never" class="button-card table-card">
<template #header>
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="success" plain icon="Check" :disabled="multiple" @click="handleBatchApprove" v-hasPermi="['jcbt:review:batchApprove']">
批量通过
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['jcbt:review:export']"> 导出 </el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<!-- 表格数据 -->
<el-card shadow="never" class="table-card">
<!-- 表格数据 -->
<div class="table-container">
<el-table
ref="reviewRef"
@@ -173,21 +174,23 @@
:data="reviewList"
@selection-change="handleSelectionChange"
class="scroll-table"
:scroll="{ x: 'max-content' }"
border
:scroll-x="true"
>
<el-table-column type="selection" width="50" align="center" fixed="left" />
<el-table-column label="申请编号" align="center" prop="applicationNo" width="180" fixed="left">
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="申请编号" align="center" prop="applicationNo" min-width="180" fixed="left">
<template #default="scope">
<el-button link type="primary" @click="handleView(scope.row)">
{{ scope.row.applicationNo }}
</el-button>
</template>
</el-table-column>
<el-table-column label="学号" align="center" prop="studentNo" width="120" />
<el-table-column label="学生姓名" align="center" prop="studentName" width="120" />
<el-table-column label="班级" align="center" prop="className" width="120" />
<el-table-column label="奖学金类型" align="center" prop="scholarshipTypeName" width="150" />
<el-table-column label="申请类型" align="center" prop="applicationType" width="120">
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="120" />
<el-table-column label="班级" align="center" prop="className" min-width="120" />
<el-table-column label="奖学金类型" align="center" prop="scholarshipTypeName" min-width="150" />
<el-table-column label="申请类型" align="center" prop="applicationType" min-width="120">
<template #default="scope">
<el-tag v-if="scope.row.applicationType === 'RECOMMEND'" type="primary">教师推荐</el-tag>
<el-tag v-else-if="scope.row.applicationType === 'STUDENT'" type="success">学生申请</el-tag>
@@ -196,7 +199,7 @@
<el-tag v-else type="info">{{ scope.row.applicationType }}</el-tag>
</template>
</el-table-column>
<el-table-column label="申请状态" align="center" prop="status" width="120">
<el-table-column label="申请状态" align="center" prop="status" min-width="120">
<template #default="scope">
<el-tag v-if="scope.row.status === 'DRAFT'" type="info">草稿</el-tag>
<el-tag v-else-if="scope.row.status === 'SUBMITTED'" type="primary">已提交</el-tag>
@@ -208,17 +211,17 @@
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" prop="submitTime" width="160">
<el-table-column label="提交时间" align="center" prop="submitTime" min-width="160">
<template #default="scope">
<span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
<el-table-column label="创建时间" align="center" prop="createTime" min-width="160">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220" fixed="right">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="220" fixed="right">
<template #default="scope">
<!-- 查看按钮,所有记录都可以查看 -->
<el-tooltip content="查看" placement="top">
@@ -227,7 +230,6 @@
type="info"
icon="View"
size="default"
style="font-size: 16px; margin-right: 8px"
@click="handleView(scope.row)"
v-hasPermi="['jcbt:scholarshipApplication:query']"
></el-button>
@@ -241,7 +243,6 @@
type="success"
icon="Check"
size="default"
style="font-size: 16px; margin-right: 8px"
@click="handleApprove(scope.row)"
v-hasPermi="['jcbt:scholarshipApplication:audit']"
></el-button>
@@ -252,7 +253,6 @@
type="danger"
icon="Close"
size="default"
style="font-size: 16px; margin-right: 8px"
@click="handleReject(scope.row)"
v-hasPermi="['jcbt:scholarshipApplication:audit']"
></el-button>
@@ -263,7 +263,6 @@
type="warning"
icon="Document"
size="default"
style="font-size: 16px"
@click="handleReview(scope.row)"
v-hasPermi="['jcbt:scholarshipApplication:audit']"
></el-button>
@@ -278,7 +277,6 @@
type="primary"
icon="Edit"
size="default"
style="font-size: 16px"
@click="handleUpdate(scope.row)"
v-hasPermi="['jcbt:scholarshipApplication:edit']"
></el-button>
@@ -288,20 +286,21 @@
</el-table-column>
</el-table>
</div>
<div class="pagination-container">
<pagination
v-show="total > 0"
:total="total"
:page="queryParams.pageNum"
:limit="queryParams.pageSize"
@update:page="queryParams.pageNum = $event"
@update:limit="queryParams.pageSize = $event"
@pagination="getList"
/>
</div>
</el-card>
<!-- 分页 -->
<div class="pagination-container">
<pagination
v-show="total > 0"
:total="total"
:page="queryParams.pageNum"
:limit="queryParams.pageSize"
@update:page="queryParams.pageNum = $event"
@update:limit="queryParams.pageSize = $event"
@pagination="getList"
/>
</div>
<!-- 审核对话框 -->
<el-drawer ref="drawerRef" v-model="reviewOpen" title="奖学金申请审核" direction="rtl" size="50%" :before-close="handleReviewClose">
<template #default>
@@ -407,7 +406,7 @@
</div>
</template>
<script setup name="ScholarshipReview">
<script setup name="ScholarshipReview" lang="ts">
import { listScholarshipApplication, getScholarshipApplication, updateScholarshipApplication } from '@/api/jcbt/scholarshipApplication';
import { listScholarshipType } from '@/api/jcbt/scholarshipType';
import { listScholarshipBatch } from '@/api/jcbt/scholarshipBatch';
@@ -783,274 +782,227 @@ onMounted(() => {
});
</script>
<style scoped lang="scss">
/* 继承后勤管理模块的样式风格 */
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 8px;
}
/* 统计卡片样式 */
.stats-row {
margin-bottom: 20px;
}
/* 表格卡片布局 */
.table-card {
margin-top: 0;
}
.stat-card {
border-radius: 12px;
transition: all 0.3s ease;
height: 90px;
cursor: pointer;
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
.stat-content {
display: flex;
align-items: center;
padding: 5px 16px;
height: 100%;
box-sizing: border-box;
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
.stat-icon {
font-size: 28px;
margin-right: 15px;
opacity: 0.9;
}
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.stat-info {
flex: 1;
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
.stat-value {
font-size: 24px;
font-weight: bold;
line-height: 1;
margin-bottom: 4px;
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
.stat-label {
font-size: 14px;
opacity: 0.8;
line-height: 1;
}
}
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
&.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
&.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
&.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
&.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
color: #333;
}
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 搜索区域样式 */
.search-btn-container {
text-align: right;
}
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
/* 表格卡片布局 - 参考后勤管理功能 */
.button-card {
margin-bottom: 10px;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
.table-card {
margin-top: 0;
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
.table-card :deep(.el-card__body) {
padding: 0px 20px 20px 20px !important;
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
.toolbar-title {
font-size: 18px;
font-weight: 600;
color: #1e293b;
display: flex;
align-items: center;
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
&::before {
content: '';
width: 4px;
height: 20px;
background: linear-gradient(135deg, rgb(93, 135, 255), rgb(73, 190, 255));
border-radius: 2px;
margin-right: 12px;
}
}
/* 搜索按钮容器样式 */
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.toolbar-actions {
display: flex;
gap: 12px;
align-items: center;
}
}
.search-btn-container .el-form-item {
margin-bottom: 0 !important;
}
/* 表格主体 */
.table-container {
width: 100%;
margin-bottom: 0;
}
/* 统计卡片样式 */
.stats-row {
margin-bottom: 16px;
}
/* 表格样式 - 参考后勤管理功能 */
.scroll-table {
width: 100%;
.stat-card {
cursor: pointer;
transition: all 0.3s ease;
border: none;
border-radius: 8px;
}
:deep(.el-table__header-wrapper) {
.el-table__header {
th {
background-color: #f8f9fa;
color: #333;
font-weight: 600;
}
}
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
:deep(.el-table__body-wrapper) {
.el-table__row {
&:hover {
background-color: #f5f7fa;
}
}
}
}
.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}
/* 表格横向滚动条样式优化 - 参考后勤管理功能 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #409eff #f0f0f0;
}
.stat-card-success {
background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 12px !important;
width: 12px !important;
}
.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important;
}
.stat-content {
display: flex;
align-items: center;
padding: 8px 0;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #409eff !important;
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important;
min-height: 20px !important;
}
.stat-icon {
margin-right: 16px;
font-size: 24px;
color: rgba(255, 255, 255, 0.9);
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important;
}
.stat-info {
flex: 1;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important;
}
.stat-value {
font-size: 24px;
font-weight: 700;
color: #fff;
line-height: 1.2;
margin-bottom: 4px;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
.stat-label {
font-size: 14px;
color: rgba(255, 255, 255, 0.9);
line-height: 1.2;
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 操作按钮样式 - 参考后勤管理模块 */
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 金额文本样式 */
.amount-text {
font-weight: 600;
color: #e74c3c;
}
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 对话框样式 */
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 操作按钮样式 - 参考后勤管理模块 */
/* 金额文本样式 */
.amount-text {
font-weight: 600;
color: #e74c3c;
}
/* 分页容器样式 - 参考后勤管理功能 */
.pagination-container {
display: flex;
justify-content: flex-end;
padding: 16px 20px 0 0 !important;
background-color: #fff;
margin-top: 0px !important;
}
/* 对话框样式 */
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
}
/* 抽屉内容样式 */
.drawer-content {
padding: 20px;
}
/* 抽屉内容样式 */
.drawer-content {
padding: 20px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.page-container {
padding: 10px;
}
.stats-row {
.el-col {
margin-bottom: 10px;
}
}
.stats-row .el-col {
margin-bottom: 10px;
}
.card-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
.card-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.toolbar-actions {
width: 100%;
justify-content: flex-start;
}
}
.card-header .toolbar-actions {
width: 100%;
justify-content: flex-start;
}
}
</style>
+144 -292
View File
@@ -1,5 +1,5 @@
<template>
<div class="p-2 page-container">
<div class="page-container">
<!-- 搜索区域 -->
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
@@ -68,8 +68,10 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
</el-row>
<el-row :gutter="10" class="mb8" >
<el-col :span="24" class="search-btn-container">
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
@@ -80,100 +82,61 @@
</div>
</transition>
<!-- 统计卡片区域 -->
<div class="mb-[10px]">
<el-row :gutter="16" class="stats-row">
<el-col :span="6">
<el-card shadow="hover" class="stat-card stat-card-primary">
<div class="stat-content">
<div class="stat-icon">
<el-icon><Trophy /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ statistics.totalTypes }}</div>
<div class="stat-label">奖学金类型总数</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="stat-card stat-card-success">
<div class="stat-content">
<div class="stat-icon">
<el-icon><CircleCheck /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ statistics.activeTypes }}</div>
<div class="stat-label">启用状态</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="stat-card stat-card-warning">
<div class="stat-content">
<div class="stat-icon">
<el-icon><Money /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ statistics.totalAmount }}</div>
<div class="stat-label">总奖励金额(万元)</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="stat-card stat-card-info">
<div class="stat-content">
<div class="stat-icon">
<el-icon><Star /></el-icon>
</div>
<div class="stat-info">
<div class="stat-value">{{ statistics.avgAmount }}</div>
<div class="stat-label">平均奖励金额(元)</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
<!-- 操作工具栏 -->
<el-card class="button-card">
<div class="card-header">
<div class="toolbar-title">
<el-icon><Trophy /></el-icon>
奖学金类型管理
</div>
<div class="button-group">
<el-button v-hasPermi="['jcbt:scholarshipType:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
<el-button v-hasPermi="['jcbt:scholarshipType:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
>修改</el-button
>
<el-button v-hasPermi="['jcbt:scholarshipType:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
>删除</el-button
>
<el-button v-hasPermi="['jcbt:scholarshipType:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</div>
</div>
</el-card>
<!-- 表格数据 -->
<el-card class="table-card">
<el-card shadow="never" class="button-card table-card">
<template #header>
<el-row ref="toolbarRef" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['jcbt:scholarshipType:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate()"
v-hasPermi="['jcbt:scholarshipType:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['jcbt:scholarshipType:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['jcbt:scholarshipType:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<div class="table-container">
<el-table
ref="scholarshipTypeTableRef"
v-loading="loading"
border
:data="scholarshipTypeList"
row-key="id"
class="scroll-table"
@selection-change="handleSelectionChange"
style="width: 100%"
:scroll-x="true"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="奖学金名称" prop="typeName" min-width="150" show-overflow-tooltip />
<el-table-column label="类别" prop="typeCategory" width="120" align="center">
<el-table-column label="奖学金名称" prop="typeName" min-width="200" show-overflow-tooltip />
<el-table-column label="类别" prop="typeCategory" width="140" align="center">
<template #default="scope">
<el-tag :type="getCategoryTagType(scope.row.typeCategory)">
{{ getCategoryText(scope.row.typeCategory) }}
@@ -187,7 +150,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="奖励金额" prop="awardAmount" width="120" align="center">
<el-table-column label="奖励金额" prop="awardAmount" width="130" align="center">
<template #default="scope">
<span class="amount-text">¥{{ parseFloat(scope.row.awardAmount || '0').toLocaleString() }}</span>
</template>
@@ -200,25 +163,27 @@
</template>
</el-table-column>
<el-table-column label="排序" prop="sortOrder" width="80" align="center" />
<el-table-column label="状态" prop="status" width="80" align="center">
<el-table-column label="状态" prop="status" width="100" align="center">
<template #default="scope">
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="160" align="center" />
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
<el-table-column label="创建时间" prop="createTime" width="180" align="center">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="280" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<div class="action-buttons">
<el-tooltip content="查看" placement="top">
<el-button v-hasPermi="['jcbt:scholarshipType:query']" type="primary" icon="View" @click="handleView(scope.row)" />
<el-button link type="info" icon="View" @click="handleView(scope.row)" v-hasPermi="['jcbt:scholarshipType:query']"></el-button>
</el-tooltip>
<el-tooltip content="修改" placement="top">
<el-button v-hasPermi="['jcbt:scholarshipType:edit']" type="success" icon="Edit" @click="handleUpdate(scope.row)" />
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['jcbt:scholarshipType:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button v-hasPermi="['jcbt:scholarshipType:remove']" type="danger" icon="Delete" @click="handleDelete(scope.row)" />
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['jcbt:scholarshipType:remove']"></el-button>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
@@ -227,7 +192,7 @@
<!-- 分页 -->
<div class="pagination-container">
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
<pagination v-show="total > 0" :page="queryParams.pageNum" :limit="queryParams.pageSize" :total="total" @pagination="getList" />
</div>
<!-- 添加或修改奖学金类型对话框 -->
@@ -496,6 +461,7 @@
import { reactive, ref, onMounted, getCurrentInstance } from 'vue';
import type { ComponentInternalInstance } from 'vue';
import type { FormRules, FormInstance, TableInstance } from 'element-plus';
import { parseTime } from '@/utils/ruoyi';
import {
listScholarshipType,
getScholarshipType,
@@ -936,80 +902,13 @@ onMounted(() => {
});
</script>
<style scoped lang="scss">
/* 继承后勤管理模块的样式风格 */
<style scoped>
/* 页面容器样式 */
.page-container {
padding: 8px;
}
/* 统计卡片样式 */
.stats-row {
margin-bottom: 20px;
}
.stat-card {
border-radius: 12px;
transition: all 0.3s ease;
height: 90px;
cursor: pointer;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.stat-content {
display: flex;
align-items: center;
padding: 5px 16px;
height: 100%;
box-sizing: border-box;
.stat-icon {
font-size: 28px;
margin-right: 15px;
opacity: 0.9;
}
.stat-info {
flex: 1;
.stat-value {
font-size: 24px;
font-weight: bold;
line-height: 1;
margin-bottom: 4px;
}
.stat-label {
font-size: 14px;
opacity: 0.8;
line-height: 1;
}
}
}
&.stat-card-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
&.stat-card-success {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
}
&.stat-card-warning {
background: linear-gradient(135deg, #ff9a56 0%, #ffad56 100%);
color: white;
}
&.stat-card-info {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
color: #333;
}
}
/* 表格卡片布局 - 参考后勤管理功能 */
/* 表格卡片布局 */
.table-card {
margin-top: 0;
}
@@ -1018,100 +917,86 @@ onMounted(() => {
padding: 0px 20px 20px 20px !important;
}
/* 操作工具栏样式 */
.button-card {
margin-bottom: 20px;
/* 表格容器 - 支持横向滚动 */
.table-container {
width: 100%;
margin-bottom: 0;
}
:deep(.el-card__body) {
padding: 20px;
}
}
/* 横向滚动表格样式 */
.scroll-table {
width: 100%;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
/* 表格横向滚动条样式优化 */
.scroll-table :deep(.el-table__body-wrapper) {
overflow-x: auto !important; /* 自动显示横向滚动条 */
overflow-y: auto;
}
.toolbar-title {
font-size: 18px;
font-weight: bold;
color: #303133;
display: flex;
align-items: center;
gap: 8px;
}
.scroll-table :deep(.el-table__header-wrapper) {
overflow-x: hidden;
}
.button-group {
display: flex;
align-items: center;
gap: 10px;
}
}
/* 强制显示表格横向滚动条 - 适用于所有浏览器 */
.scroll-table :deep(.el-table__body-wrapper) {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #409eff #f0f0f0; /* Firefox - thumb track */
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 滚动表格样式 */
.table-container {
overflow-x: auto;
}
.scroll-table {
width: 100%;
min-width: 1200px;
}
/* 表格滚动条美化 */
/* Webkit 浏览器的横向滚动条样式 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar {
height: 8px;
height: 12px !important; /* 增加滚动条高度 */
width: 12px !important;
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
background: #f0f0f0 !important;
border-radius: 6px !important;
border: 1px solid #e4e7ed !important; /* 添加边框使其更明显 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 4px;
transition: background 0.3s ease;
background: #409eff !important; /* 使用主题色,更明显 */
border-radius: 6px !important;
border: 2px solid #f0f0f0 !important; /* 添加白色边框 */
min-height: 20px !important; /* 确保最小高度 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:hover {
background: #337ecc !important;
background: #337ecc !important; /* 悬停时更深的蓝色 */
}
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-thumb:active {
background: #2b6cb0 !important;
}
background: #2b6cb0 !important; /* 点击时的颜色 */
}
/* 操作按钮样式 */
.action-buttons {
display: flex;
gap: 8px;
justify-content: center;
align-items: center;
white-space: nowrap;
/* 确保滚动条始终可见的额外设置 */
.scroll-table :deep(.el-table__body-wrapper)::-webkit-scrollbar-corner {
background: #f0f0f0;
}
.el-button {
width: 27px !important;
height: 27px !important;
padding: 0 !important;
display: flex;
align-items: center;
justify-content: center;
}
}
/* 固定列样式优化 */
.scroll-table :deep(.el-table__fixed-right) {
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 金额文本样式 */
.amount-text {
font-weight: 600;
color: #e74c3c;
}
.scroll-table :deep(.el-table__fixed-left) {
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}
/* 分页容器样式 - 参考后勤管理功能 */
/* 确保固定列在滚动时有正确的背景色 */
.scroll-table :deep(.el-table__fixed-right .el-table__cell),
.scroll-table :deep(.el-table__fixed-left .el-table__cell) {
background-color: #fff;
}
/* 表格行悬停效果在固定列上的同步 */
.scroll-table :deep(.el-table__row:hover .el-table__cell) {
background-color: #f5f7fa !important;
}
/* 分页容器样式 */
.pagination-container {
display: flex;
justify-content: flex-end;
@@ -1120,6 +1005,17 @@ onMounted(() => {
margin-top: 0px !important;
}
/* 移除按钮栏底部边框 */
.button-card :deep(.el-card__header) {
border-bottom: none !important;
}
/* 金额文本样式 */
.amount-text {
font-weight: 600;
color: #e74c3c;
}
/* 对话框样式 */
.dialog-footer {
display: flex;
@@ -1137,59 +1033,6 @@ onMounted(() => {
color: #909399;
margin-top: 4px;
line-height: 1.4;
}
}
}
/* 响应式设计 */
@media (max-width: 768px) {
.page-container {
padding: 10px;
.stats-row {
.el-col {
margin-bottom: 10px;
}
}
.stat-card {
height: 80px;
.stat-content {
padding: 5px 12px;
.stat-icon {
font-size: 24px;
margin-right: 10px;
}
.stat-info {
.stat-value {
font-size: 20px;
}
.stat-label {
font-size: 12px;
}
}
}
}
.card-header {
flex-direction: column;
gap: 15px;
align-items: flex-start;
.button-group {
width: 100%;
justify-content: flex-end;
flex-wrap: wrap;
}
}
.scroll-table {
min-width: 800px;
}
}
}
@@ -1205,4 +1048,13 @@ onMounted(() => {
color: #303133;
}
}
.search-btn-container {
display: flex;
justify-content: flex-end;
margin-top: 10px;
.el-form-item {
margin-bottom: 0 !important;
}
}
</style>
+85 -32
View File
@@ -92,32 +92,27 @@
</el-table-column>
<el-table-column label="海报预览" align="center" width="120">
<template #default="scope">
<el-image
<!-- 使用 ImagePreview 组件,支持 OSS ID 格式 -->
<image-preview
v-if="scope.row.posterPath"
:src="scope.row.posterPath"
:preview-src-list="[scope.row.posterPath]"
:preview-teleported="true"
fit="cover"
style="width: 80px; height: 80px; cursor: pointer"
>
<template #error>
<div
style="
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
background: #f5f7fa;
color: #909399;
font-size: 12px;
"
>
加载失败
</div>
</template>
</el-image>
<span v-else>-</span>
:width="80"
:height="80"
:preview="true"
style="cursor: pointer"
/>
<div v-else style="width: 80px; height: 80px; background: #fafafa; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #ccc; border: 1px dashed #d9d9d9; border-radius: 4px;">
<div style="text-align: center;">
<el-icon><Picture /></el-icon>
<div>未上传</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="海报状态" align="center" width="100">
<template #default="scope">
<el-tag v-if="scope.row.posterPath" type="success" size="small">已上传</el-tag>
<el-tag v-else type="warning" size="small">待上传</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
@@ -209,12 +204,44 @@
<!-- 预览对话框 -->
<el-dialog title="海报预览" v-model="previewOpen" width="900px" append-to-body>
<PosterPreview
v-if="previewOpen && previewData.posterPath"
:poster-data="previewData"
:enterprise-detail="enterpriseDetail"
:position-detail="positionDetail"
/>
<div v-if="previewOpen && previewData.posterPath" class="poster-preview-container">
<!-- 海报图片预览 -->
<div class="poster-image-section">
<image-preview
:src="previewData.posterPath"
:width="400"
:height="600"
:preview="true"
style="margin: 0 auto;"
/>
</div>
<!-- 海报详情信息 -->
<div class="poster-info-section">
<el-descriptions title="海报详情" :column="2" border>
<el-descriptions-item label="海报类型">
<dict-tag :options="zsjy_poster_type" :value="previewData.posterType" />
</el-descriptions-item>
<el-descriptions-item label="所属企业">
{{ enterpriseDetail.enterpriseName || '-' }}
</el-descriptions-item>
<el-descriptions-item label="关联岗位" v-if="previewData.posterType === '2'">
{{ positionDetail.positionName || '-' }}
</el-descriptions-item>
<el-descriptions-item label="创建时间">
{{ previewData.createTime || '-' }}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 无海报图片提示 -->
<div v-else-if="previewOpen && !previewData.posterPath" class="no-poster-tip">
<el-empty description="暂无海报图片,请先上传海报模板">
<el-button type="primary" @click="handleUpdate(previewData)">立即上传</el-button>
</el-empty>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="previewOpen = false">关 闭</el-button>
@@ -225,8 +252,9 @@
</template>
<script setup name="RecruitmentPoster" lang="ts">
import { getCurrentInstance, ComponentInternalInstance, ref, reactive, toRefs } from 'vue';
import { getCurrentInstance, ComponentInternalInstance, ref, reactive, toRefs, onMounted } from 'vue';
import { FormInstance } from 'element-plus';
import { Picture } from '@element-plus/icons-vue';
import {
listRecruitmentPoster,
getRecruitmentPoster,
@@ -240,7 +268,6 @@ import { listEnterpriseOptions } from '@/api/zsjy/jobPosition';
import { getEnterprise } from '@/api/zsjy/enterprise';
import { getJobPosition } from '@/api/zsjy/jobPosition';
import { RecruitmentPosterVO, RecruitmentPosterForm, RecruitmentPosterQuery } from '@/api/zsjy/types';
import PosterPreview from '@/components/PosterPreview/index.vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -604,4 +631,30 @@ onMounted(() => {
color: #303133;
}
}
// 海报预览样式
.poster-preview-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
.poster-image-section {
display: flex;
justify-content: center;
padding: 20px;
background: #f5f7fa;
border-radius: 8px;
}
.poster-info-section {
width: 100%;
max-width: 600px;
}
}
.no-poster-tip {
padding: 40px;
text-align: center;
}
</style>