style: 成果详情三步操作按钮按当前步骤高亮主色
Made-with: Cursor
This commit is contained in:
parent
aca472aa54
commit
eed14d87c8
@ -56,15 +56,34 @@
|
||||
<!-- 操作步骤(未发布时显示) -->
|
||||
<div v-if="!isSuperAdmin && contestInfo?.resultState !== 'published'" class="action-bar">
|
||||
<a-space>
|
||||
<a-button @click="handleCalculateScores" :loading="calcScoreLoading">
|
||||
<a-button
|
||||
:type="activeWorkflowStep === 1 ? 'primary' : 'default'"
|
||||
class="action-step-btn"
|
||||
:class="{ 'action-step-btn--current': activeWorkflowStep === 1 }"
|
||||
@click="handleCalculateScores"
|
||||
:loading="calcScoreLoading"
|
||||
>
|
||||
<template #icon><calculator-outlined /></template>
|
||||
第一步:计算得分
|
||||
</a-button>
|
||||
<a-button @click="handleCalculateRankings" :loading="calcRankLoading" :disabled="summary.scoredWorks === 0">
|
||||
<a-button
|
||||
:type="activeWorkflowStep === 2 ? 'primary' : 'default'"
|
||||
class="action-step-btn"
|
||||
:class="{ 'action-step-btn--current': activeWorkflowStep === 2 }"
|
||||
@click="handleCalculateRankings"
|
||||
:loading="calcRankLoading"
|
||||
:disabled="summary.scoredWorks === 0"
|
||||
>
|
||||
<template #icon><ordered-list-outlined /></template>
|
||||
第二步:计算排名
|
||||
</a-button>
|
||||
<a-button @click="autoAwardVisible = true" :disabled="summary.rankedWorks === 0">
|
||||
<a-button
|
||||
:type="activeWorkflowStep === 3 ? 'primary' : 'default'"
|
||||
class="action-step-btn"
|
||||
:class="{ 'action-step-btn--current': activeWorkflowStep === 3 }"
|
||||
@click="autoAwardVisible = true"
|
||||
:disabled="summary.rankedWorks === 0"
|
||||
>
|
||||
<template #icon><trophy-outlined /></template>
|
||||
第三步:设置奖项
|
||||
</a-button>
|
||||
@ -251,6 +270,15 @@ const showResultsList = computed(() => {
|
||||
return summary.value.scoredWorks > 0
|
||||
})
|
||||
|
||||
/** 成果流程当前步骤:1 计算得分 → 2 计算排名 → 3 设置奖项;0 表示前三步已齐(可发布或维护) */
|
||||
const activeWorkflowStep = computed(() => {
|
||||
const { scoredWorks, rankedWorks, awardedWorks } = summary.value
|
||||
if (scoredWorks === 0) return 1
|
||||
if (rankedWorks === 0) return 2
|
||||
if (awardedWorks < rankedWorks) return 3
|
||||
return 0
|
||||
})
|
||||
|
||||
// 奖项筛选选项(从已有数据中动态提取)
|
||||
const awardFilterOptions = computed(() => {
|
||||
const names = new Set<string>()
|
||||
@ -526,6 +554,11 @@ $primary: #6366f1;
|
||||
border: 1px dashed rgba($primary, 0.15);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
:deep(.action-step-btn--current.ant-btn-primary:not(:disabled)) {
|
||||
font-weight: 600;
|
||||
box-shadow: 0 2px 10px rgba($primary, 0.42);
|
||||
}
|
||||
}
|
||||
|
||||
.step-guide-card {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user