diff --git a/src/web/blueprints/tenants.py b/src/web/blueprints/tenants.py index e056630..c71c8ae 100644 --- a/src/web/blueprints/tenants.py +++ b/src/web/blueprints/tenants.py @@ -155,6 +155,7 @@ def resolve_tenant_by_chat_id(chat_id: str) -> str: return t.tenant_id except Exception as e: logger.error(f"解析飞书群租户映射失败: {e}") + logger.warning(f"⚠️ 飞书群 {chat_id} 未绑定任何租户,使用默认租户。请在租户管理页面将此 chat_id 绑定到对应租户。") return DEFAULT_TENANT diff --git a/src/web/static/js/modules/workorders.js b/src/web/static/js/modules/workorders.js index aa50d0b..1a315b8 100644 --- a/src/web/static/js/modules/workorders.js +++ b/src/web/static/js/modules/workorders.js @@ -41,21 +41,21 @@ Object.assign(TSPDashboard.prototype, { const approveBtn = document.getElementById(`approveBtn_${workorderId}`); const percent = Math.round((data.similarity || 0) * 100); if (simEl) { - simEl.innerHTML = `语义相似度: ${percent}%`; - simEl.className = percent >= 90 ? 'similarity-badge high' : percent >= 80 ? 'similarity-badge medium' : 'similarity-badge low'; + simEl.innerHTML = `相似度: ${percent}%`; + simEl.className = percent >= 90 ? 'badge bg-success' : percent >= 80 ? 'badge bg-warning text-dark' : 'badge bg-danger'; simEl.title = this.getSimilarityExplanation(percent); } if (apprEl) { - if (data.use_human_resolution) { apprEl.textContent = '将使用人工描述入库'; apprEl.className = 'status-badge human-resolution'; } - else if (data.approved) { apprEl.textContent = '已自动审批'; apprEl.className = 'status-badge approved'; } - else { apprEl.textContent = '未审批'; apprEl.className = 'status-badge pending'; } + if (data.use_human_resolution) { apprEl.textContent = '使用人工描述'; apprEl.className = 'badge bg-info'; } + else if (data.approved) { apprEl.textContent = '已自动审批'; apprEl.className = 'badge bg-success'; } + else { apprEl.textContent = '未审批'; apprEl.className = 'badge bg-secondary'; } } if (approveBtn) { const canApprove = data.approved || data.use_human_resolution; approveBtn.disabled = !canApprove; - if (data.use_human_resolution) { approveBtn.textContent = '使用人工描述入库'; approveBtn.className = 'approve-btn'; } - else if (data.approved) { approveBtn.textContent = '已自动审批'; approveBtn.className = 'approve-btn approved'; } - else { approveBtn.textContent = '审批入库'; approveBtn.className = 'approve-btn'; } + if (data.use_human_resolution) { approveBtn.innerHTML = '使用人工描述入库'; approveBtn.className = 'btn btn-info btn-sm'; } + else if (data.approved) { approveBtn.innerHTML = '已自动审批'; approveBtn.className = 'btn btn-success btn-sm'; } + else { approveBtn.innerHTML = '审批入库'; approveBtn.className = 'btn btn-warning btn-sm'; } } const message = this.getSimilarityMessage(percent, data.approved, data.use_human_resolution); this.showNotification(message, data.approved ? 'success' : data.use_human_resolution ? 'warning' : 'info'); @@ -279,26 +279,26 @@ Object.assign(TSPDashboard.prototype, {