-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfive_test.html
More file actions
311 lines (283 loc) · 12 KB
/
Copy pathfive_test.html
File metadata and controls
311 lines (283 loc) · 12 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>财务部五维评价项目</title>
<!-- 引入Google Fonts字体 -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
<style>
/* ========== 根变量定义 (统一深色字体) ========== */
:root {
/* -- 背景色 -- */
--card-bg-color: rgba(255, 255, 255, 0.45); /* 增加不透明度以衬托深色文字 */
--card-border-color: rgba(255, 255, 255, 0.5);
/* -- 统一深色字体 -- */
--text-primary: #2c3e50; /* 主要深色 (用于标题, 激活项, 菜单项) */
--text-secondary: #5a6878; /* 次要深色 (用于非激活标签) */
/* -- 控件背景色 (均为浅色) -- */
--tab-active-bg: rgba(255, 255, 255, 0.7);
--tab-hover-bg: rgba(255, 255, 255, 0.25);
--menu-item-bg: rgba(255, 255, 255, 0.5);
--menu-item-hover-bg: rgba(255, 255, 255, 0.75);
}
/* ========== 基础与背景 ========== */
body {
font-family: 'Noto Sans SC', sans-serif;
color: var(--text-primary); /* 全局默认字体颜色设为深色 */
margin: 0;
padding: 2rem;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.animated-bg {
background: linear-gradient(-45deg,
rgba(255, 255, 224, 0.5),
rgba(173, 216, 230, 0.4),
rgba(195, 145, 251, 0.3),
rgba(144, 238, 144, 0.4)
);
background-size: 400% 400%;
animation: gradientBG 25s ease infinite;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* ========== 玻璃卡片布局 ========== */
.glass-card {
position: relative;
background: var(--card-bg-color);
border-radius: 1.25rem;
overflow: hidden;
border: 1px solid var(--card-border-color);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
width: 100%;
max-width: 52rem;
display: flex;
flex-direction: column;
}
/* 卡片头部 */
.card-header {
display: flex;
align-items: center;
padding: 1rem 1.75rem;
border-bottom: 1px solid var(--card-border-color);
flex-shrink: 0;
}
.card-header .logo {
height: 2.25rem;
width: auto;
margin-right: 1rem;
}
.card-header .title {
font-size: 1.25rem;
font-weight: 700; /* 加粗标题 */
margin: 0;
color: var(--text-primary); /* 标题使用主要深色 */
text-shadow: none; /* 移除阴影让文字更锐利 */
}
/* 卡片主体 */
.card-body {
display: flex;
flex-grow: 1;
}
.left-panel {
flex-basis: 33.33%;
flex-shrink: 0;
border-right: 1px solid var(--card-border-color);
padding: 1.75rem;
}
.right-panel {
flex-basis: 66.67%;
flex-grow: 1;
padding: 1.75rem;
}
/* ========== 控件样式 (统一深色字体) ========== */
/* 左侧角色按钮 */
.role-tab {
width: 100%;
text-align: left;
padding: 0.8rem 1.25rem;
margin-bottom: 0.5rem;
border-radius: 0.6rem;
font-weight: 500;
color: var(--text-secondary); /* 非激活状态文字 */
border: none;
background: transparent;
cursor: pointer;
transition: all 0.25s ease;
}
.role-tab:hover {
background: var(--tab-hover-bg);
color: var(--text-primary); /* 悬停时文字加深 */
}
.role-tab.active {
background: var(--tab-active-bg);
color: var(--text-primary); /* 激活状态文字为主要深色 */
font-weight: 700;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* 右侧菜单链接 */
.menu-link {
display: block;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 0.6rem;
text-decoration: none;
background: var(--menu-item-bg);
color: var(--text-primary); /* 使用主要深色字体 */
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
transition: all 0.25s ease;
}
.menu-link:hover {
background: var(--menu-item-hover-bg);
color: var(--text-primary); /* 悬停时字体颜色保持不变 */
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.menu-link:last-child {
margin-bottom: 0;
}
/* ========== 动画与响应式 ========== */
.tab-content-wrapper {
position: relative;
transition: height 0.35s ease-in-out;
}
.tab-content {
opacity: 0;
position: absolute;
width: 100%;
pointer-events: none;
transition: opacity 0.35s ease, transform 0.35s ease;
transform: translateY(8px);
}
.tab-content.active {
opacity: 1;
position: relative;
pointer-events: auto;
transform: translateY(0);
}
@media (max-width: 768px) {
body { padding: 1rem; }
.card-header {
flex-direction: column;
padding: 1.25rem;
text-align: center;
}
.card-header .logo {
margin-right: 0;
margin-bottom: 0.75rem;
}
.card-body {
flex-direction: column;
}
.left-panel {
border-right: none;
border-bottom: 1px solid var(--card-border-color);
}
}
</style>
</head>
<body>
<!-- 动态背景 -->
<div class="animated-bg"></div>
<!-- 优化后的玻璃卡片 -->
<div class="glass-card">
<!-- 卡片头部 -->
<div class="card-header">
<img src="https://images.weserv.nl/?url=https://i0.hdslb.com/bfs/openplatform/9f69738fe6b53732ec7ccb26c22d6ad51d84db0a.png" alt="Logo" class="logo">
<h1 class="title">财务部五维评价项目</h1>
</div>
<!-- 卡片主体 -->
<div class="card-body">
<!-- 左侧角色选择栏 -->
<div class="left-panel">
<nav id="role-tabs">
<button data-target="employee" class="role-tab active">员工</button>
<button data-target="specialist" class="role-tab">B级专员</button>
<button data-target="leader" class="role-tab">部领导</button>
<button data-target="group-leader" class="role-tab">专项小组长</button>
</nav>
</div>
<!-- 右侧菜单内容区 -->
<div class="right-panel">
<div id="menu-content" class="tab-content-wrapper">
<div id="employee" class="tab-content">
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0GgKa3RK4C2ev&" target="_blank" class="menu-link">员工-汇总表</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0hxNkpeb7kFsS&" target="_blank" class="menu-link">员工-基础得分</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0sYFQNQU5f3qr&" target="_blank" class="menu-link">员工-提升表</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0k3v7p537RfGp&" target="_blank" class="menu-link">员工-常规挑战表</a>
</div>
<div id="specialist" class="tab-content">
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0tVuWSPHBwAbQ&" target="_blank" class="menu-link">B级专员-填写表</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0xspA9pqTT9ew&" target="_blank" class="menu-link">B级专员-基础扣分</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G09z59qWHeZeFy&" target="_blank" class="menu-link">B级专员-提升打分</a>
</div>
<div id="leader" class="tab-content">
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0kdXqPqT3dw4g&" target="_blank" class="menu-link">部领导-填写表</a>
</div>
<div id="group-leader" class="tab-content">
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0WMGwSXa5mgsk&" target="_blank" class="menu-link">组长-专项挑战申报表</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0P4hSehxybDxG&" target="_blank" class="menu-link">组长-加分里程碑申报表</a>
<a href="http://10.150.153.153/weboffice/office/d/326588379955200?share_id=G0aWYH9PTzadaZ&" target="_blank" class="menu-link">组长-专项挑战表</a>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const tabs = document.querySelectorAll('.role-tab');
const contentWrapper = document.getElementById('menu-content');
const contents = document.querySelectorAll('.tab-content');
const setActiveTab = (tabToActivate) => {
const targetId = tabToActivate.dataset.target;
const targetContent = document.getElementById(targetId);
if (!targetContent) return;
tabs.forEach(tab => tab.classList.remove('active'));
tabToActivate.classList.add('active');
contents.forEach(content => content.classList.remove('active'));
contentWrapper.style.height = `${targetContent.scrollHeight}px`;
targetContent.classList.add('active');
};
tabs.forEach(tab => {
tab.addEventListener('click', () => {
if (!tab.classList.contains('active')) {
setActiveTab(tab);
}
});
});
const initialActiveTab = document.querySelector('.role-tab');
if (initialActiveTab) {
setTimeout(() => setActiveTab(initialActiveTab), 0);
}
const resizeObserver = new ResizeObserver(() => {
const activeContent = contentWrapper.querySelector('.tab-content.active');
if (activeContent) {
contentWrapper.style.height = `${activeContent.scrollHeight}px`;
}
});
const rightPanel = document.querySelector('.right-panel');
if(rightPanel) {
resizeObserver.observe(rightPanel);
}
});
</script>
</body>
</html>