diff --git a/lesingle-creation-frontend/src/views/contests/results/Index.vue b/lesingle-creation-frontend/src/views/contests/results/Index.vue
index 4db7265..12e5021 100644
--- a/lesingle-creation-frontend/src/views/contests/results/Index.vue
+++ b/lesingle-creation-frontend/src/views/contests/results/Index.vue
@@ -8,12 +8,8 @@
-
+
@@ -28,46 +24,31 @@
-
+
-
+
已发布
未发布
-
+
-
+
+
+
搜索
-
+
+
+
重置
@@ -76,26 +57,15 @@
-
+
{{ (superPagination.current - 1) * superPagination.pageSize + index + 1 }}
-
+
{{ record.contestName }}
@@ -137,7 +107,8 @@
-
+
@@ -155,25 +126,33 @@
-
+
个人参与
团队参与
-
+
已发布
未发布
- 搜索
- 重置
+
+
+ 搜索
+
+
+
+ 重置
-
+
{{ (pagination.current - 1) * pagination.pageSize + index + 1 }}
@@ -182,7 +161,8 @@
{{ record.contestName }}
- {{ record.contestType === 'individual' ? '个人' : '团队' }}
+ {{ record.contestType ===
+ 'individual' ? '个人' : '团队' }}
{{ record._count?.registrations || 0 }}
@@ -195,8 +175,17 @@
未发布
- 查看成果
- 发布成果
+ 查看成果
+
+ 发布成果
+
+
+
+ 发布成果
+
+
@@ -232,6 +221,16 @@ const isSuperAdmin = computed(() => authStore.hasAnyRole(['super_admin']))
const formatDate = (d?: string) => d ? dayjs(d).format("YYYY-MM-DD HH:mm") : "-"
+/**
+ * 是否允许进入成果发布详情(发布成果入口)。
+ * 与活动列表接口的 reviewedCount / totalWorksCount 一致:有作品且已完成评审的作品数 ≥ 作品总数。
+ */
+function canPublishResults(record: Contest): boolean {
+ const totalWorks = Number(record.totalWorksCount ?? record._count?.works ?? 0)
+ const reviewed = Number(record.reviewedCount ?? 0)
+ return totalWorks > 0 && reviewed >= totalWorks
+}
+
// =============================================
// 超管端逻辑
// =============================================
@@ -455,11 +454,26 @@ $primary: #6366f1;
border: none;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
- :deep(.ant-card-head) { border-bottom: none; .ant-card-head-title { font-size: 18px; font-weight: 600; } }
- :deep(.ant-card-body) { padding: 0; }
+
+ :deep(.ant-card-head) {
+ border-bottom: none;
+
+ .ant-card-head-title {
+ font-size: 18px;
+ font-weight: 600;
+ }
+ }
+
+ :deep(.ant-card-body) {
+ padding: 0;
+ }
}
-.stats-row { display: flex; gap: 12px; margin-bottom: 16px; }
+.stats-row {
+ display: flex;
+ gap: 12px;
+ margin-bottom: 16px;
+}
.stat-card {
flex: 1;
@@ -473,10 +487,43 @@ $primary: #6366f1;
cursor: pointer;
border: 2px solid transparent;
transition: all 0.2s;
- &:hover { box-shadow: 0 4px 16px rgba($primary, 0.12); }
- &.active { border-color: $primary; background: rgba($primary, 0.02); }
- .stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
- .stat-info { display: flex; flex-direction: column; .stat-count { font-size: 18px; font-weight: 700; color: #1e1b4b; line-height: 1.2; } .stat-label { font-size: 12px; color: #9ca3af; } }
+
+ &:hover {
+ box-shadow: 0 4px 16px rgba($primary, 0.12);
+ }
+
+ &.active {
+ border-color: $primary;
+ background: rgba($primary, 0.02);
+ }
+
+ .stat-icon {
+ width: 36px;
+ height: 36px;
+ border-radius: 8px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ flex-shrink: 0;
+ }
+
+ .stat-info {
+ display: flex;
+ flex-direction: column;
+
+ .stat-count {
+ font-size: 18px;
+ font-weight: 700;
+ color: #1e1b4b;
+ line-height: 1.2;
+ }
+
+ .stat-label {
+ font-size: 12px;
+ color: #9ca3af;
+ }
+ }
}
.filter-bar {
@@ -493,13 +540,35 @@ $primary: #6366f1;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
overflow: hidden;
- .ant-table-thead > tr > th { background: #fafafa; font-weight: 600; }
- .ant-table-tbody > tr:hover > td { background: rgba($primary, 0.03); }
- .ant-table-pagination { padding: 16px; margin: 0; }
+
+ .ant-table-thead>tr>th {
+ background: #fafafa;
+ font-weight: 600;
+ }
+
+ .ant-table-tbody>tr:hover>td {
+ background: rgba($primary, 0.03);
+ }
+
+ .ant-table-pagination {
+ padding: 16px;
+ margin: 0;
+ }
}
}
-.contest-link { padding: 0; text-align: left; }
-.text-muted { color: #d1d5db; }
+.contest-link {
+ padding: 0;
+ text-align: left;
+}
+.text-muted {
+ color: #d1d5db;
+}
+
+/* 包裹禁用链接按钮,便于 Tooltip 触发且布局不塌缩 */
+.publish-results-btn-wrap {
+ display: inline-block;
+ cursor: not-allowed;
+}