Files
kefu/deploy/review-picker-20260918/source-console-app.js.diff
T
2026-09-21 10:34:06 +08:00

29 lines
3.0 KiB
Diff

--- C:\kefu\deploy\review-picker-20260918\frontend-before\source\console-app.js
+++ C:\kefu\wechat_rpa\assets\ui\console-app.js
@@ -475,10 +475,21 @@
const busy = Boolean(r.busy);
const canChoose = r.ready && !busy;
const canToggle = canChoose && (recipient.id || r.enabled);
+ const recipientId = String(recipient.id || "").trim();
+ const recipientName = String(recipient.displayName || "").trim() || String(recipient.name || "").trim();
+ const nameKnown = recipient.nameKnown !== false && Boolean(recipientName) && recipientName !== "微信联系人";
+ const recipientTitle = !recipientId ? "尚未选择助理私人微信" : nameKnown ? recipientName : "昵称未读取,请核对联系编号";
+
return `<section class="panel panel-pad" style="margin:16px 0"><div class="panel-title"><h2>医疗助理审核提醒</h2><span class="badge ${r.enabled ? "green" : ""}">${r.enabled ? "当前账号已开启" : "当前账号未开启"}</span></div>
<p>客户会话进入待审核时,由当前托管企业微信账号向指定助理的私人微信发送客户咨询、待发送回复和审核原因。</p>
<div class="setting-line"><span>托管企微账号(最近核验)</span><strong>${esc(r.accountName || "尚未核验")}</strong>${r.accountId ? `<small>${esc(r.accountId)}</small>` : ""}</div>
- <div class="setting-line"><span>助理私人微信</span><div style="flex:1;text-align:right"><strong>${esc(recipient.name || "尚未选择")}</strong>${recipient.label ? `<div class="tiny">${esc(recipient.label)}</div>` : ""}</div></div>
+ <div class="assistant-recipient-card ${recipientId ? "" : "is-empty"}" role="group" aria-label="${recipientId ? "已配置收件人" : "未配置收件人"}">
+ <div class="assistant-recipient-icon" aria-hidden="true">${icon("user")}</div>
+ <div class="assistant-recipient-copy"><div class="assistant-recipient-heading"><span class="assistant-recipient-tag">${recipientId ? "已配置收件人" : "未配置收件人"}</span><span class="assistant-recipient-kind">助理私人微信</span></div>
+ <strong class="assistant-recipient-name ${recipientId && !nameKnown ? "is-unknown" : ""}">${esc(recipientTitle)}</strong>
+ ${recipientId ? `<div class="assistant-recipient-identity"><span>联系编号</span><span class="assistant-recipient-id">${esc(recipientId)}</span></div>` : ""}
+ </div>
+ </div>
<div class="toolbar" style="margin:12px 0;flex-wrap:wrap"><button class="btn small" data-action="review-assistant-refresh" ${!r.supported || busy ? "disabled" : ""}>${icon("refresh")}${busy ? "正在核验…" : "读取当前账号"}</button>
<button class="btn small blue" data-action="review-assistant-choose" ${canChoose ? "" : "disabled"}>${recipient.id ? "更换助理联系人" : "选择助理联系人"}</button>
<span style="margin-left:auto">开启审核提醒</span><button class="switch ${r.enabled ? "on" : ""}" role="switch" aria-label="开启医疗助理审核提醒" aria-checked="${Boolean(r.enabled)}" data-action="review-assistant-toggle" ${canToggle ? "" : "disabled"}></button></div>