diff --git a/__pycache__/main.cpython-312.pyc b/__pycache__/main.cpython-312.pyc index 2c29b3f..2c8740b 100644 Binary files a/__pycache__/main.cpython-312.pyc and b/__pycache__/main.cpython-312.pyc differ diff --git a/config.json b/config.json index 9607e1c..cb0343d 100644 --- a/config.json +++ b/config.json @@ -75,6 +75,7 @@ "show_title": true, "learn_more_url": "", "show_qrcode": true, + "show_seating": true, "show_fields": { "name": false, "phone": false, diff --git a/main.py b/main.py index 1c459e8..d6420ae 100644 --- a/main.py +++ b/main.py @@ -1346,7 +1346,7 @@ def get_wall_data(): # 获取最新的签到数据(按时间倒序) query = """ - SELECT gsdh_id, name, company_name, position, business_scope, vision_2026, social_point + SELECT gsdh_id, name, company_name, position, business_scope, vision_2026, social_point, location FROM checkin_info ORDER BY created_at DESC """ diff --git a/templates/admin.html b/templates/admin.html index 2929f8a..869df54 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -779,6 +779,9 @@
+
+ +

勾选要在签到大屏上显示的字段,字段名称与签到字段设置同步

@@ -1053,6 +1056,7 @@ document.getElementById('wall_show_title').checked = wc.show_title !== false; document.getElementById('wall_learn_more_url').value = wc.learn_more_url || ''; document.getElementById('wall_show_qrcode').checked = wc.show_qrcode === true; + document.getElementById('wall_show_seating').checked = wc.show_seating === true; }); function renderFieldConfig(tbodyId, fieldConfig, orderedKeys) { @@ -1601,6 +1605,7 @@ show_title: document.getElementById('wall_show_title').checked, learn_more_url: document.getElementById('wall_learn_more_url').value, show_qrcode: document.getElementById('wall_show_qrcode').checked, + show_seating: document.getElementById('wall_show_seating').checked, show_fields: getWallDisplayFieldsFromUI() }, diff --git a/templates/wall.html b/templates/wall.html index c9f97e9..003d30a 100644 --- a/templates/wall.html +++ b/templates/wall.html @@ -152,6 +152,22 @@ border-radius: 10px; } + /* 座位标签样式 */ + .bubble-seat { + position: absolute; + top: -8px; + right: -8px; + background: linear-gradient(135deg, #ff6b6b, #ff4757); + color: white; + font-size: 0.65rem; + font-weight: bold; + padding: 2px 6px; + border-radius: 10px; + box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4); + white-space: nowrap; + border: 2px solid rgba(255, 255, 255, 0.8); + } + /* Central Spotlight Card */ .spotlight-container { position: absolute; @@ -530,6 +546,14 @@
${bubbleContent}
`; + // 显示座位信息(如果启用且用户有座位号) + if (WALL_CONFIG.show_seating === true && user.location) { + const seatElement = document.createElement('div'); + seatElement.className = 'bubble-seat'; + seatElement.textContent = user.location; + this.element.appendChild(seatElement); + } + // Interaction: Click to show in spotlight this.element.style.cursor = 'pointer'; this.element.addEventListener('click', (e) => {