feat: 仪表盘+催办在休息日跳过填报检查

- 新增 is_working_day() 工具函数,自动跳过周末 + 可配置法定假日
- 仪表盘填报进度新增 is_rest_day 字段,休息日显示灰「休」印章
- 催办调度改用 is_working_day() 替代原始 weekday 检查
- 系统设置新增「法定节假日」配置卡片,支局长可管理假日日期

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 14:13:32 +08:00
parent dcb0b826de
commit a63bd6874c
6 changed files with 129 additions and 14 deletions
+16 -6
View File
@@ -76,7 +76,8 @@ async function handleExport() {
} catch (e: any) { ElMessage.error('导出失败') }
}
function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' {
function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' | 'rest_day' {
if (p.is_rest_day) return 'rest_day'
if (p.on_leave) return 'on_leave'
if (p.has_reported_today && p.completed) return 'full'
if (p.has_reported_today && !p.completed) return 'catching'
@@ -206,26 +207,27 @@ function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' {
>
<!-- Chinese Seal Watermark -->
<div class="seal-stamp" :class="`seal-stamp--${rowState(p)}`" aria-hidden="true">
<span class="seal-char">{{ { full: '满', catching: '追', missing: '未', on_leave: '假' }[rowState(p)] }}</span>
<span class="seal-char">{{ { full: '', catching: '', missing: '填', on_leave: '' }[rowState(p)] }}</span>
<span class="seal-char">{{ { full: '满', catching: '追', missing: '未', on_leave: '假', rest_day: '休' }[rowState(p)] }}</span>
<span class="seal-char">{{ { full: '', catching: '', missing: '填', on_leave: '', rest_day: '' }[rowState(p)] }}</span>
</div>
<div class="progress-info">
<span class="progress-name">
<el-link type="primary" :underline="false" @click="goWeeklyReport(p.manager_id)">{{ p.manager_name }}</el-link>
<span class="progress-status" :class="`progress-status--${rowState(p)}`">
{{ { full: '本周已满', catching: '今日已填', missing: '今日未填', on_leave: '请假中' }[rowState(p)] }}
{{ { full: '本周已满', catching: '今日已填', missing: '今日未填', on_leave: '请假中', rest_day: '休息日' }[rowState(p)] }}
</span>
</span>
<span class="progress-count" v-if="!p.on_leave">{{ p.visit_count }} / {{ p.expected }} </span>
</div>
<el-progress
v-if="!p.on_leave"
v-if="!p.on_leave && !p.is_rest_day"
:percentage="Math.min(100, Math.round((p.visit_count / Math.max(p.expected, 1)) * 100))"
:color="rowState(p) === 'full' ? '#4A6741' : rowState(p) === 'catching' ? '#C4934A' : '#B8472E'"
:stroke-width="12"
/>
<span v-else class="leave-text">请假中</span>
<span v-else-if="p.on_leave" class="leave-text">请假中</span>
<span v-else-if="p.is_rest_day" class="rest-text">休息日</span>
</div>
</div>
</el-card>
@@ -325,6 +327,7 @@ function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' {
.progress-row--catching { border-left-color: var(--gold); background: rgba(196,147,74,0.03); }
.progress-row--full { border-left-color: var(--sage); background: rgba(74,103,65,0.02); }
.progress-row--on_leave { border-left-color: #5B7FA5; }
.progress-row--rest_day { border-left-color: #9CA3AF; background: rgba(156,163,175,0.02); }
/* ═══ Chinese Seal Stamp Watermark ═══ */
.seal-stamp {
@@ -381,6 +384,12 @@ function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' {
color: #5B7FA5;
}
.seal-stamp--rest_day {
border-color: #9CA3AF;
outline-color: #9CA3AF;
color: #9CA3AF;
}
.seal-char {
font-family: var(--font-heading);
font-size: 20px;
@@ -415,5 +424,6 @@ function rowState(p: any): 'full' | 'catching' | 'missing' | 'on_leave' {
}
.leave-text { font-size: 13px; color: #5B7FA5; font-family: var(--font-body); }
.rest-text { font-size: 13px; color: #9CA3AF; font-family: var(--font-body); }
.empty { text-align: center; color: var(--c-text-muted); padding: 40px 0; font-family: var(--font-body); }
</style>