fix: 修复扣分明细表格UI样式和数据不一致问题
1. 修复表格UI样式,严格对比用户管理页面,添加滚动条,防止闪白 2. 修复扣分数据不一致:sumMonthlyDeduction只统计主任务扣分,与明细保持一致
This commit is contained in:
parent
b22a7817a1
commit
78aac4dc9a
@ -15,12 +15,13 @@ import java.math.BigDecimal;
|
||||
public interface ProgressDeductionLogMapper extends BaseMapper<ProgressDeductionLog> {
|
||||
|
||||
/**
|
||||
* 查询用户指定月份的扣分总额
|
||||
* 查询用户指定月份的扣分总额(仅主任务)
|
||||
*/
|
||||
@Select("SELECT COALESCE(SUM(deduction_score), 0) FROM progress_deduction_log " +
|
||||
"WHERE user_id = #{userId} " +
|
||||
"AND YEAR(deduction_date) = #{year} " +
|
||||
"AND MONTH(deduction_date) = #{month}")
|
||||
"AND MONTH(deduction_date) = #{month} " +
|
||||
"AND task_item_id IS NULL")
|
||||
BigDecimal sumMonthlyDeduction(@Param("userId") Long userId,
|
||||
@Param("year") int year,
|
||||
@Param("month") int month);
|
||||
|
||||
@ -448,12 +448,14 @@
|
||||
<!-- 延误扣分明细 -->
|
||||
<div v-if="deductionDetail.delayDeductions && deductionDetail.delayDeductions.length > 0" class="deduction-section">
|
||||
<h5>延误扣分明细</h5>
|
||||
<a-table
|
||||
:columns="delayDeductionColumns"
|
||||
:data-source="deductionDetail.delayDeductions"
|
||||
:pagination="false"
|
||||
row-key="taskId"
|
||||
>
|
||||
<div class="deduction-table-wrapper">
|
||||
<a-table
|
||||
:columns="delayDeductionColumns"
|
||||
:data-source="deductionDetail.delayDeductions"
|
||||
:pagination="false"
|
||||
:scroll="{ y: 300 }"
|
||||
row-key="taskId"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'deductionScore'">
|
||||
<span class="text-danger">{{ record.deductionScore }} 分</span>
|
||||
@ -465,18 +467,21 @@
|
||||
{{ formatDateTime(record[column.key]) }}
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 进度未更新扣分明细 -->
|
||||
<div v-if="deductionDetail.progressDeductions && deductionDetail.progressDeductions.length > 0" class="deduction-section">
|
||||
<h5>进度未更新扣分明细</h5>
|
||||
<a-table
|
||||
:columns="progressDeductionColumns"
|
||||
:data-source="deductionDetail.progressDeductions"
|
||||
:pagination="false"
|
||||
row-key="taskId"
|
||||
>
|
||||
<div class="deduction-table-wrapper">
|
||||
<a-table
|
||||
:columns="progressDeductionColumns"
|
||||
:data-source="deductionDetail.progressDeductions"
|
||||
:pagination="false"
|
||||
:scroll="{ y: 300 }"
|
||||
row-key="taskId"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'deductionScore'">
|
||||
<span class="text-danger">{{ record.deductionScore }} 分</span>
|
||||
@ -485,7 +490,8 @@
|
||||
{{ formatDateOnly(record.deductionDate) }}
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 无扣分记录 -->
|
||||
@ -1853,46 +1859,78 @@ onMounted(() => {
|
||||
// 扣分明细弹窗样式
|
||||
.deduction-detail-modal {
|
||||
:deep(.ant-modal-content) {
|
||||
background: #1f1f1f;
|
||||
border: 1px solid #303030;
|
||||
background: $bg-card;
|
||||
border: 1px solid $border-primary;
|
||||
}
|
||||
|
||||
:deep(.ant-modal-header) {
|
||||
background: #1f1f1f;
|
||||
border-bottom: 1px solid #303030;
|
||||
background: $bg-card;
|
||||
border-bottom: 1px solid $border-color;
|
||||
|
||||
.ant-modal-title {
|
||||
color: #ffffff;
|
||||
color: $text-primary;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-modal-body) {
|
||||
background: #1f1f1f;
|
||||
background: $bg-card;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
// 表格样式 - 与用户管理页面严格一致
|
||||
:deep(.ant-table) {
|
||||
background: transparent;
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
background: $bg-tertiary;
|
||||
color: $text-secondary;
|
||||
font-weight: $font-weight-semibold;
|
||||
border-bottom: 1px solid $border-color;
|
||||
padding: 12px 16px;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-table-tbody > tr {
|
||||
background: transparent;
|
||||
|
||||
&:hover > td {
|
||||
background: rgba($brand-primary, 0.03);
|
||||
}
|
||||
|
||||
> td {
|
||||
background: transparent;
|
||||
border-bottom: 1px solid $border-color;
|
||||
padding: 16px;
|
||||
color: $text-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.deduction-detail-content {
|
||||
.designer-info {
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid #303030;
|
||||
border-bottom: 1px solid $border-color;
|
||||
|
||||
h4 {
|
||||
color: #ffffff;
|
||||
color: $text-primary;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.designer-dept {
|
||||
color: rgba(255, 255, 255, 0.65);
|
||||
color: $text-secondary;
|
||||
font-size: 14px;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.total-deduction {
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
color: $text-primary;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
|
||||
@ -1908,18 +1946,24 @@ onMounted(() => {
|
||||
margin-bottom: 24px;
|
||||
|
||||
h5 {
|
||||
color: #ffffff;
|
||||
color: $text-primary;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.deduction-table-wrapper {
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $radius-md;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.no-data {
|
||||
text-align: center;
|
||||
padding: 40px 0;
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
color: $text-tertiary;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user