AppHeader.vue
4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<script setup lang="ts">
import type { SystemStatus } from '@/types'
defineProps<{
systemStatus: SystemStatus
busy: boolean
}>()
defineEmits<{
startSystem: []
refreshAll: []
openSettings: []
shutdownSystem: []
}>()
</script>
<template>
<header class="hero">
<div class="hero-copy">
<p class="hero-kicker">Venue Operations Research Platform</p>
<h1 class="hero-title">场馆运营反馈调研平台</h1>
<p class="hero-description">
把场馆研究任务、平台采集、三引擎分析和管理层报告放进同一张工作台。
界面保持克制,但每一步都更直接、更可追踪。
</p>
<div class="hero-status-row">
<span class="hero-pill" :data-tone="systemStatus.started ? 'success' : 'neutral'">
{{ systemStatus.started ? '系统已启动' : '等待启动' }}
</span>
<span class="hero-pill" :data-tone="systemStatus.starting ? 'running' : 'neutral'">
{{ systemStatus.starting ? '组件拉起中' : '组件稳定' }}
</span>
</div>
</div>
<div class="hero-actions">
<button class="action-button subtle" type="button" @click="$emit('openSettings')">配置中心</button>
<button class="action-button subtle" type="button" @click="$emit('refreshAll')">刷新状态</button>
<button
class="action-button primary"
type="button"
:disabled="busy || systemStatus.starting"
@click="$emit('startSystem')"
>
{{ systemStatus.started ? '重新校验系统' : '启动系统' }}
</button>
<button class="action-button danger" type="button" :disabled="busy" @click="$emit('shutdownSystem')">
关闭系统
</button>
</div>
</header>
</template>
<style scoped>
.hero {
display: flex;
justify-content: space-between;
gap: 32px;
padding: 28px 32px;
border: 1px solid var(--border-strong);
border-radius: 32px;
background:
radial-gradient(circle at top left, rgba(46, 92, 76, 0.12), transparent 34%),
linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(250, 245, 237, 0.94));
box-shadow: var(--panel-shadow);
}
.hero-copy {
max-width: 760px;
}
.hero-kicker {
margin: 0 0 12px;
font-family: var(--font-mono);
font-size: 12px;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--text-muted);
}
.hero-title {
margin: 0;
font-family: var(--font-display);
font-size: clamp(34px, 4vw, 58px);
line-height: 1.02;
letter-spacing: 0.02em;
color: var(--text-strong);
}
.hero-description {
margin: 18px 0 0;
max-width: 680px;
font-size: 15px;
line-height: 1.8;
color: var(--text-muted);
}
.hero-status-row {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 22px;
}
.hero-pill {
padding: 9px 14px;
border-radius: 999px;
font-family: var(--font-mono);
font-size: 12px;
letter-spacing: 0.04em;
background: rgba(23, 27, 24, 0.06);
color: var(--text-muted);
}
.hero-pill[data-tone='success'] {
background: rgba(31, 92, 76, 0.14);
color: var(--accent-strong);
}
.hero-pill[data-tone='running'] {
background: rgba(157, 116, 69, 0.16);
color: var(--accent-warm);
}
.hero-actions {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: flex-end;
gap: 12px;
min-width: 280px;
}
.action-button {
min-width: 126px;
padding: 12px 18px;
border-radius: 16px;
border: 1px solid var(--border-strong);
background: rgba(255, 255, 255, 0.72);
color: var(--text-strong);
font: inherit;
cursor: pointer;
transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.action-button:hover:not(:disabled) {
transform: translateY(-1px);
border-color: rgba(23, 27, 24, 0.48);
}
.action-button:disabled {
cursor: not-allowed;
opacity: 0.6;
}
.action-button.primary {
background: var(--accent-strong);
color: white;
border-color: var(--accent-strong);
}
.action-button.subtle {
background: rgba(255, 252, 246, 0.9);
}
.action-button.danger {
color: #7a2821;
border-color: rgba(122, 40, 33, 0.25);
background: rgba(122, 40, 33, 0.06);
}
@media (max-width: 1080px) {
.hero {
flex-direction: column;
}
.hero-actions {
min-width: 0;
justify-content: flex-start;
}
}
</style>