-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
572 lines (503 loc) · 22.1 KB
/
Copy pathindex.html
File metadata and controls
572 lines (503 loc) · 22.1 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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>功夫之星武道馆 - 全员通讯录</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 10px;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
padding: 20px;
}
h1 {
text-align: center;
color: #667eea;
font-size: 1.8em;
margin-bottom: 5px;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.update-time {
text-align: center;
color: #666;
font-size: 0.85em;
margin-bottom: 15px;
}
.filter-section {
background: #f8f9fa;
padding: 15px;
border-radius: 10px;
margin-bottom: 20px;
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
.filter-section label {
font-weight: bold;
color: #667eea;
margin-right: 5px;
display: flex;
align-items: center;
}
.filter-section select {
padding: 8px 15px;
border: 2px solid #667eea;
border-radius: 8px;
font-size: 1em;
background: white;
color: #333;
cursor: pointer;
flex: 1;
min-width: 200px;
}
.filter-section select:focus {
outline: none;
border-color: #764ba2;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
h2 {
color: #764ba2;
border-bottom: 2px solid #667eea;
padding-bottom: 8px;
margin-top: 25px;
margin-bottom: 15px;
font-size: 1.3em;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
border-radius: 8px;
overflow: hidden;
display: table;
}
thead {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
th {
padding: 12px 8px;
text-align: left;
font-weight: bold;
font-size: 0.9em;
}
td {
padding: 10px 8px;
border-bottom: 1px solid #eee;
font-size: 0.9em;
}
tbody tr:hover {
background-color: #f5f5f5;
transition: background-color 0.3s;
}
tbody tr:nth-child(even) {
background-color: #f9f9f9;
}
.contact-table td a {
color: #667eea;
text-decoration: none;
font-weight: 500;
}
.contact-table td a:hover {
text-decoration: underline;
}
.summary {
text-align: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px;
border-radius: 10px;
margin-top: 20px;
font-size: 1em;
}
.no-results {
text-align: center;
padding: 30px;
color: #999;
font-size: 1.1em;
display: none;
}
/* 手机端卡片样式 */
@media (max-width: 768px) {
body {
padding: 5px;
}
.container {
padding: 15px;
}
h1 {
font-size: 1.5em;
}
.filter-section {
flex-direction: column;
}
.filter-section label {
margin-right: 0;
margin-bottom: 5px;
}
.filter-section select {
width: 100%;
min-width: auto;
}
table {
display: none;
}
.school-section {
display: block;
}
.person-card {
background: white;
border: 1px solid #e0e0e0;
border-radius: 10px;
padding: 15px;
margin-bottom: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.person-card:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
transform: translateY(-2px);
transition: all 0.3s;
}
.person-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.person-name {
font-size: 1.1em;
font-weight: bold;
color: #667eea;
}
.person-position {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 3px 10px;
border-radius: 15px;
font-size: 0.8em;
}
.person-info {
display: grid;
grid-template-columns: 1fr;
gap: 8px;
font-size: 0.9em;
}
.info-row {
display: flex;
align-items: center;
gap: 10px;
}
.info-label {
color: #999;
font-weight: bold;
min-width: 60px;
}
.info-value {
flex: 1;
}
.phone-link {
color: #667eea;
text-decoration: none;
font-weight: 500;
}
.phone-link:active {
opacity: 0.7;
}
h2 {
font-size: 1.2em;
margin-top: 20px;
}
.summary {
font-size: 0.95em;
padding: 12px;
}
}
@media (min-width: 769px) {
.school-section {
display: none;
}
}
</style>
</head>
<body>
<div class="container">
<h1>🥋 功夫之星武道馆通讯录</h1>
<p class="update-time" id="updateTime">最后更新:加载中...</p>
<div class="filter-section">
<label for="schoolFilter">🏢 校区:</label>
<select id="schoolFilter" onchange="filterBySchool()">
<option value="all">全部校区</option>
<option value="sx">惠山区省锡中店</option>
<option value="hs">惠山体育馆店</option>
<option value="xt">锡山区天一体育馆店</option>
<option value="hq">总部</option>
</select>
<label for="positionFilter">💼 职务:</label>
<select id="positionFilter" onchange="filterByPosition()">
<option value="all">全部职务</option>
<option value="校长">校长</option>
<option value="副校长">副校长</option>
<option value="教学主管">教学主管</option>
<option value="人事财务主管">人事财务主管</option>
<option value="教练">教练</option>
<option value="示范团团长">示范团团长</option>
</select>
</div>
<div id="noResults" class="no-results">没有找到匹配的联系人</div>
<!-- 表格视图(电脑端) -->
<div id="tableView">
<h2 id="sx-title">📍 惠山区省锡中店</h2>
<table id="sx-table">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>工作手机</th>
<th>私人手机</th>
<th>职务</th>
<th>入职时间</th>
<th>短号</th>
</tr>
</thead>
<tbody>
<tr><td>1</td><td>于玺</td><td>17312793472</td><td>13338770160</td><td>校长</td><td>2017</td><td>603</td></tr>
<tr><td>2</td><td>代梦瑞</td><td>1811570931</td><td>17702545722</td><td>教学主管</td><td>44470</td><td>607</td></tr>
<tr><td>3</td><td>王慈官</td><td>18115772053</td><td>18265090415</td><td>示范团团长</td><td>44256</td><td>606</td></tr>
<tr><td>4</td><td>程瑞胜</td><td>18012399159</td><td>17806118936</td><td>搏击教练</td><td>2023-10-10</td><td>无</td></tr>
<tr><td>5</td><td>慕冬艳</td><td>18068374379</td><td>15097270807</td><td>体适能教练</td><td>2025-08-01</td><td>无</td></tr>
<tr><td>6</td><td>李嘉炜</td><td>15370239109</td><td>18751567001</td><td>初级教练</td><td>2026.2</td><td>602</td></tr>
<tr><td>7</td><td>杜超</td><td>-</td><td>17351512128</td><td>搏击高级教练</td><td>-</td><td>无</td></tr>
</tbody>
</table>
<h2 id="hs-title">📍 惠山体育馆店</h2>
<table id="hs-table">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>工作手机</th>
<th>私人手机</th>
<th>职务</th>
<th>入职时间</th>
<th>短号</th>
</tr>
</thead>
<tbody>
<tr><td>1</td><td>杜兴国</td><td>17351489679</td><td>18803745291</td><td>校长</td><td>2019.1</td><td>604</td></tr>
<tr><td>2</td><td>程龙</td><td>18115773507</td><td>18012766661</td><td>人事财务主管</td><td>-</td><td>666</td></tr>
<tr><td>3</td><td>徐梦丽</td><td>18068271830</td><td>15061752503</td><td>副校长</td><td>2024.6.3</td><td>612</td></tr>
<tr><td>4</td><td>刘博</td><td>17715698701</td><td>18342857205</td><td>教学主管</td><td>2023.4</td><td>611</td></tr>
<tr><td>5</td><td>张翠波</td><td>-</td><td>18860903817</td><td>武术高级教练</td><td>-</td><td>-</td></tr>
</tbody>
</table>
<h2 id="xt-title">📍 锡山区天一体育馆店</h2>
<table id="xt-table">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>工作手机</th>
<th>私人手机</th>
<th>职务</th>
<th>入职时间</th>
<th>短号</th>
</tr>
</thead>
<tbody>
<tr><td>1</td><td>李华鹏</td><td>18014189679</td><td>18018319433</td><td>副校长</td><td>2021-01-16</td><td>605</td></tr>
<tr><td>2</td><td>邹思理</td><td>18115771657</td><td>15651513399</td><td>教学主管</td><td>2024-09-16</td><td>886</td></tr>
</tbody>
</table>
<h2 id="hq-title">📞 总部联系方式</h2>
<table id="hq-table" class="contact-table">
<thead>
<tr>
<th>项目</th>
<th>联系方式</th>
</tr>
</thead>
<tbody>
<tr><td>客服电话</td><td><a href="tel:18012766661">18012766661</a></td></tr>
<tr><td>微信号</td><td>39392376</td></tr>
<tr><td>咨询热线</td><td><a href="tel:0510-82405444">0510-82405444</a></td></tr>
</tbody>
</table>
</div>
<!-- 卡片视图(手机端) -->
<div id="cardView" class="school-section">
<h2 id="sx-card-title">📍 惠山区省锡中店</h2>
<div id="sx-cards">
<!-- 卡片将通过JS生成 -->
</div>
<h2 id="hs-card-title">📍 惠山体育馆店</h2>
<div id="hs-cards">
<!-- 卡片将通过JS生成 -->
</div>
<h2 id="xt-card-title">📍 锡山区天一体育馆店</h2>
<div id="xt-cards">
<!-- 卡片将通过JS生成 -->
</div>
<h2 id="hq-card-title">📞 总部联系方式</h2>
<div id="hq-cards">
<!-- 卡片将通过JS生成 -->
</div>
</div>
<div class="summary">
📊 统计:3个校区,14名员工
</div>
</div>
<script>
// 设置更新时间
document.getElementById('updateTime').textContent = '最后更新:' + new Date().toLocaleString('zh-CN');
// 人员数据
const staffData = {
sx: [
{name: '于玺', work: '17312793472', private: '13338770160', position: '校长', date: '2017', short: '603'},
{name: '代梦瑞', work: '1811570931', private: '17702545722', position: '教学主管', date: '44470', short: '607'},
{name: '王慈官', work: '18115772053', private: '18265090415', position: '示范团团长', date: '44256', short: '606'},
{name: '程瑞胜', work: '18012399159', private: '17806118936', position: '搏击教练', date: '2023-10-10', short: '无'},
{name: '慕冬艳', work: '18068374379', private: '15097270807', position: '体适能教练', date: '2025-08-01', short: '无'},
{name: '李嘉炜', work: '15370239109', private: '18751567001', position: '初级教练', date: '2026.2', short: '602'},
{name: '杜超', work: '-', private: '17351512128', position: '搏击高级教练', date: '-', short: '无'}
],
hs: [
{name: '杜兴国', work: '17351489679', private: '18803745291', position: '校长', date: '2019.1', short: '604'},
{name: '程龙', work: '18115773507', private: '18012766661', position: '人事财务主管', date: '-', short: '666'},
{name: '徐梦丽', work: '18068271830', private: '15061752503', position: '副校长', date: '2024.6.3', short: '612'},
{name: '刘博', work: '17715698701', private: '18342857205', position: '教学主管', date: '2023.4', short: '611'},
{name: '张翠波', work: '-', private: '18860903817', position: '武术高级教练', date: '-', short: '-'}
],
xt: [
{name: '李华鹏', work: '18014189679', private: '18018319433', position: '副校长', date: '2021-01-16', short: '605'},
{name: '邹思理', work: '18115771657', private: '15651513399', position: '教学主管', date: '2024-09-16', short: '886'}
],
hq: [
{name: '客服', work: '-', private: '18012766661', position: '客服', date: '-', short: '-'},
{name: '咨询热线', work: '-', private: '0510-82405444', position: '咨询热线', date: '-', short: '-'}
]
};
// 生成手机端卡片
function generateCards(schoolId) {
const cardsContainer = document.getElementById(schoolId + '-cards');
cardsContainer.innerHTML = '';
staffData[schoolId].forEach(person => {
const card = document.createElement('div');
card.className = 'person-card';
card.innerHTML = `
<div class="person-header">
<span class="person-name">${person.name}</span>
<span class="person-position">${person.position}</span>
</div>
<div class="person-info">
${person.work !== '-' ? `
<div class="info-row">
<span class="info-label">工作:</span>
<a href="tel:${person.work}" class="phone-link">${person.work}</a>
</div>` : ''}
<div class="info-row">
<span class="info-label">私人:</span>
<a href="tel:${person.private}" class="phone-link">${person.private}</a>
</div>
${person.short && person.short !== '-' && person.short !== '无' ? `
<div class="info-row">
<span class="info-label">短号:</span>
<span class="info-value">${person.short}</span>
</div>` : ''}
</div>
`;
cardsContainer.appendChild(card);
});
}
// 生成所有卡片
generateCards('sx');
generateCards('hs');
generateCards('xt');
generateCards('hq');
// 校区筛选
function filterBySchool() {
const schoolFilter = document.getElementById('schoolFilter').value;
const positionFilter = document.getElementById('positionFilter').value;
const elements = ['sx', 'hs', 'xt', 'hq'];
let hasVisible = false;
elements.forEach(schoolId => {
const title = document.getElementById(schoolId + (schoolId === 'hq' ? '-title' : (window.innerWidth <= 768 ? '-card-title' : '-title')));
const table = document.getElementById(schoolId + '-table');
const cardsContainer = document.getElementById(schoolId + '-cards');
const cardTitle = document.getElementById(schoolId + '-card-title');
let shouldShow = false;
if (schoolFilter === 'all' || schoolFilter === schoolId) {
shouldShow = true;
}
if (shouldShow && positionFilter !== 'all') {
// 进一步按职务筛选
const staff = staffData[schoolId];
const hasMatch = staff.some(person =>
positionFilter === '教练' ?
person.position.includes('教练') :
person.position === positionFilter
);
if (!hasMatch) {
shouldShow = false;
} else if (window.innerWidth > 768 && table) {
// 表格视图筛选行
const rows = table.querySelectorAll('tbody tr');
rows.forEach(row => {
const positionCell = row.cells[4].textContent;
const isCoach = positionCell.includes('教练');
const showRow = positionFilter === '教练' ? isCoach : positionCell === positionFilter;
row.style.display = showRow ? '' : 'none';
});
} else if (window.innerWidth <= 768 && cardsContainer) {
// 卡片视图筛选
const cards = cardsContainer.querySelectorAll('.person-card');
const staff = staffData[schoolId];
cards.forEach((card, index) => {
const isCoach = staff[index].position.includes('教练');
const showCard = positionFilter === '教练' ? isCoach : staff[index].position === positionFilter;
card.style.display = showCard ? '' : 'none';
});
}
} else if (shouldShow && window.innerWidth > 768 && table) {
// 重置表格行显示
const rows = table.querySelectorAll('tbody tr');
rows.forEach(row => row.style.display = '');
} else if (shouldShow && window.innerWidth <= 768 && cardsContainer) {
// 重置卡片显示
const cards = cardsContainer.querySelectorAll('.person-card');
cards.forEach(card => card.style.display = '');
}
// 显示/隐藏标题和表格
if (title) title.style.display = shouldShow ? '' : 'none';
if (cardTitle) cardTitle.style.display = shouldShow ? '' : 'none';
if (table) table.style.display = shouldShow ? '' : 'none';
if (cardsContainer) cardsContainer.style.display = shouldShow ? '' : 'none';
if (shouldShow) hasVisible = true;
});
// 显示/隐藏无结果提示
document.getElementById('noResults').style.display = hasVisible ? 'none' : 'block';
}
// 职务筛选
function filterByPosition() {
filterBySchool();
}
</script>
</body>
</html>