feat: 2026-07-11 全量更新 - 代办集成+会议室预定+知识迭代修复+UI统一+Bug修复
== 已部署上线 (9项) == - 代办事项真实数据源集成 (企微审批API 8bug修复链) - H5/坐席端 Logo样式统一+绿色背景 - 视频引导页修复 (localStorage key v2) - 坐席端 v9 Vue版本修复 (ElMessage._context) - 截图按钮 v10 修复 (getDisplayMedia user gesture) - 扫码样式恢复+H5扫码登录跳转修复 - H5截图快捷键提示 == 代码完成待部署 (3项) == - 知识迭代3Bug修复 (#8 POST端点/#7 MERGE幂等/#6 过期检查) - 会议室预定-小鱼易联终端 (40文件, 40/40测试通过) - IT资产升级审批推送 (asset_service.py) == 需求文档 (2项) == - 坐席端AI辅助消息框-PRD (4项新功能确认) - 坐席端布局优化建议 v2.0 (7天计划) == 新增文档 == - 日报-2026-07-11.md - 知识迭代Bug修复报告-20260711.md - 会议室预定-部署指南.md - CHANGELOG.md 更新 == 测试 == - test_todo_integration.py: 40/40 - test_meetingroom.py: 40/40 - test_bugfix_ki_suggestions.py: 21/21
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.agent-preview[data-v-bf7e750f]{display:flex;flex-direction:column;height:100dvh;background:#f5f7fa;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,sans-serif}.agent-preview__topbar[data-v-bf7e750f]{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:#fff;border-bottom:1px solid #e4e7ed;box-shadow:0 1px 4px #0000000a;z-index:10}.topbar-left[data-v-bf7e750f]{display:flex;align-items:center;gap:12px}.logo[data-v-bf7e750f]{font-size:28px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#fde68a);border-radius:10px}.title-block[data-v-bf7e750f]{display:flex;flex-direction:column}.title[data-v-bf7e750f]{font-size:16px;font-weight:600;color:#303133;margin:0}.subtitle[data-v-bf7e750f]{font-size:12px;color:#909399;margin:0}.userid-tag[data-v-bf7e750f]{font-size:12px;color:#909399;padding:4px 10px;background:#f5f7fa;border-radius:4px}.agent-preview__content[data-v-bf7e750f]{flex:1;overflow:hidden;display:flex;max-width:1200px;margin:0 auto;width:100%;background:#fff}.agent-preview__drawer-header[data-v-bf7e750f]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e4e7ed;background:#fafafa}.drawer-title[data-v-bf7e750f]{font-size:15px;font-weight:600;color:#303133}.agent-preview__drawer-body[data-v-bf7e750f]{height:calc(100% - 45px);overflow-y:auto;background:#fff}.agent-preview__mobile-hint[data-v-bf7e750f]{padding:12px 20px;background:#fdf6ec;color:#e6a23c;font-size:12px;text-align:center;line-height:1.6;border-top:1px solid #faecd8}.agent-preview__mobile-hint p[data-v-bf7e750f]{margin:0}
|
||||
@@ -0,0 +1 @@
|
||||
import{d as g,E as y,b as s,c as n,f as t,Q as k,n as _,w as i,t as V,g as a,e as d,r as A,x as f,i as u,u as x,R as C,h as I,q as N,m as B}from"./index-B1u3nieA.js";import{A as c}from"./AiAssistantPanel-31-Ys6Rc.js";import"./conversation-C4tqOoff.js";import"./index-ChNUjLLo.js";const h={class:"agent-preview"},z={class:"agent-preview__topbar"},E={class:"topbar-right"},P={key:1,class:"userid-tag"},q={key:0,class:"agent-preview__content"},M={class:"agent-preview__drawer-header"},R={class:"agent-preview__drawer-body"},S={key:2,class:"agent-preview__mobile-hint"},T=g({__name:"AgentPreviewView",setup($){const m=N(),o=A(!1),p=f(()=>m.query.userid||""),l=f(()=>window.innerWidth<500);return p.value&&y({message:"坐席模式",type:"success",duration:1500}),(D,e)=>{const w=u("el-icon"),v=u("el-button"),b=u("el-drawer");return s(),n("div",h,[t("div",z,[e[4]||(e[4]=k('<div class="topbar-left" data-v-bf7e750f><span class="logo" data-v-bf7e750f>🎧</span><div class="title-block" data-v-bf7e750f><h1 class="title" data-v-bf7e750f>坐席助手</h1><p class="subtitle" data-v-bf7e750f>IT 智能服务台 · 应急模式</p></div></div>',1)),t("div",E,[l.value?(s(),_(v,{key:0,type:"primary",size:"small",onClick:e[0]||(e[0]=r=>o.value=!0)},{default:i(()=>[a(w,null,{default:i(()=>[a(x(C))]),_:1}),e[3]||(e[3]=t("span",null,"AI 助手",-1))]),_:1})):(s(),n("div",P," userid: "+V(p.value||"anonymous"),1))])]),l.value?d("",!0):(s(),n("div",q,[a(c)])),l.value?(s(),_(b,{key:1,modelValue:o.value,"onUpdate:modelValue":e[2]||(e[2]=r=>o.value=r),direction:"rtl",size:"90%","with-header":!1},{default:i(()=>[t("div",M,[e[6]||(e[6]=t("span",{class:"drawer-title"},"🤖 AI 助手",-1)),a(v,{type:"text",size:"small",onClick:e[1]||(e[1]=r=>o.value=!1)},{default:i(()=>[...e[5]||(e[5]=[I(" 关闭 ",-1)])]),_:1})]),t("div",R,[a(c)])]),_:1},8,["modelValue"])):d("",!0),l.value?(s(),n("div",S,[...e[7]||(e[7]=[t("p",null,"💡 电脑端访问可获得完整体验(AI 助手常驻右侧)",-1),t("p",null,'移动端请点上方"AI 助手"按钮打开',-1)])])):d("",!0)])}}}),F=B(T,[["__scopeId","data-v-bf7e750f"]]);export{F as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.approval-queue-page[data-v-7767270c]{padding:20px;max-width:1000px;margin:0 auto}.approval-queue-page__header[data-v-7767270c]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.approval-queue-page__header h2[data-v-7767270c]{margin:0;font-size:20px;font-weight:600;color:#303133}.approval-queue-page__stats[data-v-7767270c]{display:flex;gap:8px}.approval-queue-page__filters[data-v-7767270c]{display:flex;gap:10px;margin-bottom:12px;align-items:center}.approval-queue-page__stat-cards[data-v-7767270c]{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}.approval-queue-page__stat-card[data-v-7767270c]{display:flex;flex-direction:column;align-items:center;padding:8px 16px;background:#f5f7fa;border-radius:6px;min-width:100px}.approval-queue-page__stat-label[data-v-7767270c]{font-size:11px;color:#909399}.approval-queue-page__stat-count[data-v-7767270c]{font-size:20px;font-weight:700;color:#303133}.approval-queue-page__list[data-v-7767270c]{min-height:200px}.approval-queue-page__empty[data-v-7767270c]{padding:40px 0}.approval-queue-page__item[data-v-7767270c]{padding:14px;margin-bottom:10px;background:#fff;border:1px solid #e4e7ed;border-radius:8px;transition:box-shadow .2s}.approval-queue-page__item[data-v-7767270c]:hover{box-shadow:0 2px 8px #0000000f}.approval-queue-page__item--overdue[data-v-7767270c]{border-color:#fde2e2;background:#fef0f0}.approval-queue-page__item-header[data-v-7767270c]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.approval-queue-page__item-type[data-v-7767270c]{display:flex;align-items:center;gap:4px;font-size:14px;font-weight:600;color:#303133}.approval-queue-page__item-badges[data-v-7767270c]{display:flex;gap:6px}.approval-queue-page__item-content[data-v-7767270c]{font-size:13px;color:#606266;margin-bottom:8px;line-height:1.5}.approval-queue-page__item-meta[data-v-7767270c]{display:flex;gap:16px;font-size:12px;color:#909399;margin-bottom:10px}.approval-queue-page__item-actions[data-v-7767270c]{display:flex;gap:8px;justify-content:flex-end}.approval-queue-page__pagination[data-v-7767270c]{display:flex;justify-content:center;margin-top:20px}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.bind-page[data-v-42b4cccf]{display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#667eea,#764ba2);padding:24px}.bind-card[data-v-42b4cccf]{width:100%;max-width:400px;background:var(--bg-secondary, #ffffff);border-radius:16px;padding:40px 32px;box-shadow:0 8px 32px #00000026}.bind-header[data-v-42b4cccf]{text-align:center;margin-bottom:32px}.bind-icon[data-v-42b4cccf]{font-size:48px;margin-bottom:12px}.bind-title[data-v-42b4cccf]{font-size:24px;font-weight:700;color:var(--text-primary, #303133);margin:0 0 8px}.bind-subtitle[data-v-42b4cccf]{font-size:14px;color:var(--text-tertiary, #909399);margin:0}.wecom-user-info[data-v-42b4cccf]{margin-bottom:24px}.bind-options[data-v-42b4cccf]{display:flex;flex-direction:column;gap:16px}.bind-options[data-v-42b4cccf] .el-radio-group{display:flex;flex-direction:column;gap:12px}.bind-options[data-v-42b4cccf] .el-radio{padding:12px;background:var(--bg-tertiary, #f5f5f5);border-radius:8px}.next-btn[data-v-42b4cccf]{width:100%;margin-top:24px}.bind-form[data-v-42b4cccf]{margin-top:16px}.form-actions[data-v-42b4cccf]{display:flex;gap:12px;margin-top:24px}.form-actions[data-v-42b4cccf] .el-button{flex:1}
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/auth-DmITJcle.js","assets/index-ChNUjLLo.js","assets/index-B1u3nieA.js","assets/index-Do7r--Ys.css"])))=>i.map(i=>d[i]);
|
||||
import{d as R,o as V,a as B,b as s,c as o,u as h,e as w,f as a,g as l,w as y,h as C,t as I,r as c,E as i,_ as N,i as E,j as D,l as O,k as M,m as Q}from"./index-B1u3nieA.js";import{getQrcode as W,handleOAuthCallback as j,getScanStatus as F}from"./auth-DmITJcle.js";import{u as G}from"./agent-WRYR5BAs.js";import"./index-ChNUjLLo.js";import"./conversation-C4tqOoff.js";const H={class:"login-page"},J={key:0,class:"test-env-badge"},K={class:"login-card"},X={key:0,class:"qr-login"},Y={class:"qr-container"},Z={key:0,class:"qr-loading"},$={key:1,class:"qr-code"},ee=["src"],te={key:2,class:"qr-error"},ne={key:0,class:"scan-tip"},ae={key:1,class:"loading-container"},se=R({__name:"Login",setup(oe){const g=D(),u=G(),T=window.location.hostname.includes("localhost"),k=c(!0),S=c(""),q=c(!1),v=c(""),r=c(!1),m=c("请稍候...");let p=null,A="";function U(){return typeof navigator>"u"?!1:/wxwork/i.test(navigator.userAgent)}async function d(){q.value=!0,v.value="waiting";try{const t=await W();S.value=t.qrcode_url,A=t.ticket,x()}catch(t){console.error("获取二维码失败:",t),i.error("获取二维码失败,请重试")}finally{q.value=!1}}async function b(){if(A)try{const t=await F(A);t.status==="scanned"?v.value="scanned":t.status==="confirmed"&&t.token?(_(),await P(t.token,t.user_info)):t.status==="expired"?(_(),i.warning("二维码已过期,请重新扫码"),d()):t.status==="cancelled"&&(_(),i.info("扫码已取消"),v.value="waiting",d())}catch(t){console.warn("轮询扫码状态失败:",t)}}function x(){_(),p=setInterval(b,2e3)}function _(){p&&(clearInterval(p),p=null)}async function P(t,e){r.value=!0,m.value="登录中...";try{if(e!=null&&e.is_new_user){g.push({name:"Bind",query:{userid:e.userid,name:e.name}});return}localStorage.setItem("agent_token",t),u.token=t,e&&(localStorage.setItem("agent_user_id",e.userid),u.agentUserId=e.userid,u.agentInfo={user_id:e.userid,name:e.name,status:"online"}),i.success("登录成功"),g.push("/workspace")}catch(n){console.error("登录失败:",n),i.error("登录失败,请重试")}finally{r.value=!1}}async function L(t,e){r.value=!0,m.value="授权中...";try{const n=await j(t,e);if(n.is_new_user){g.push({name:"Bind",query:{userid:n.user_info.userid,name:n.user_info.name}});return}localStorage.setItem("agent_token",n.token),u.token=n.token,localStorage.setItem("agent_user_id",n.user_info.userid),u.agentUserId=n.user_info.userid,u.agentInfo={user_id:n.user_info.userid,name:n.user_info.name,status:"online"},i.success("登录成功"),g.push("/workspace")}catch(n){console.error("OAuth回调处理失败:",n),i.error("授权失败,请重试")}finally{r.value=!1}}async function z(){const t=window.location.origin+"/itagent/";try{const{getOAuthAuthorizeUrl:e}=await N(async()=>{const{getOAuthAuthorizeUrl:f}=await import("./auth-DmITJcle.js");return{getOAuthAuthorizeUrl:f}},__vite__mapDeps([0,1,2,3])),n=await e(t);if(n.authorize_url){window.location.href=n.authorize_url;return}}catch(e){console.warn("从后端获取授权URL失败,尝试本地构造:",e)}{console.warn("未配置 VITE_WECOM_CORP_ID,无法跳转授权");return}}return V(async()=>{const t=new URLSearchParams(window.location.search),e=t.get("code"),n=t.get("state");if(e){await L(e,n||void 0);return}if(U()){r.value=!0,m.value="正在跳转企微授权...";try{await z()}catch(f){console.error("跳转授权失败:",f),k.value=!0,d()}finally{r.value=!1}}else k.value=!0,d()}),B(()=>{_()}),(t,e)=>{const n=E("el-icon"),f=E("el-button");return s(),o("div",H,[h(T)?(s(),o("div",J," 🔧 测试环境 ")):w("",!0),a("div",K,[e[5]||(e[5]=a("div",{class:"login-title"},[a("h1",null,"🛠️ IT智能服务台"),a("p",null,"坐席工作台")],-1)),k.value?(s(),o("div",X,[a("div",Y,[q.value?(s(),o("div",Z,[l(n,{class:"is-loading"},{default:y(()=>[l(h(O))]),_:1}),e[0]||(e[0]=a("p",null,"加载中...",-1))])):S.value?(s(),o("div",$,[a("img",{src:S.value,alt:"企微扫码登录"},null,8,ee)])):(s(),o("div",te,[e[2]||(e[2]=a("p",null,"获取二维码失败",-1)),l(f,{size:"small",onClick:d},{default:y(()=>[...e[1]||(e[1]=[C("重试",-1)])]),_:1})]))]),e[4]||(e[4]=a("p",{class:"qr-hint"},"请使用企业微信扫码登录",-1)),v.value==="scanned"?(s(),o("p",ne,[l(n,null,{default:y(()=>[l(h(M))]),_:1}),e[3]||(e[3]=C(" 已扫码,请在手机确认 ",-1))])):w("",!0)])):w("",!0),r.value?(s(),o("div",ae,[l(n,{class:"is-loading",size:"32"},{default:y(()=>[l(h(O))]),_:1}),a("p",null,I(m.value),1)])):w("",!0)])])}}}),de=Q(se,[["__scopeId","data-v-bb0a303d"]]);export{de as default};
|
||||
@@ -0,0 +1 @@
|
||||
.test-env-badge[data-v-bb0a303d]{position:absolute;top:16px;left:16px;z-index:100;background:linear-gradient(135deg,#ff6b6b,orange);color:#fff;padding:4px 12px;border-radius:4px;font-size:12px;font-weight:600;box-shadow:0 2px 8px #0003}.login-page[data-v-bb0a303d]{position:relative;display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#667eea,#764ba2);padding:24px}.login-card[data-v-bb0a303d]{width:100%;max-width:400px;background:var(--bg-secondary, #ffffff);border-radius:16px;padding:40px 32px;box-shadow:0 8px 32px #00000026}.login-title[data-v-bb0a303d]{text-align:center;margin-bottom:32px}.login-title h1[data-v-bb0a303d]{font-size:24px;font-weight:700;color:var(--text-primary, #303133);margin:0 0 8px}.login-title p[data-v-bb0a303d]{font-size:14px;color:var(--text-tertiary, #909399);margin:0}.qr-login[data-v-bb0a303d]{display:flex;flex-direction:column;align-items:center}.qr-container[data-v-bb0a303d]{width:200px;height:200px;display:flex;align-items:center;justify-content:center;background:var(--bg-tertiary, #f5f5f5);border-radius:12px;margin-bottom:16px}.qr-loading[data-v-bb0a303d]{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--text-tertiary, #909399)}.qr-code img[data-v-bb0a303d]{width:180px;height:180px}.qr-error[data-v-bb0a303d]{text-align:center;color:var(--error-color, #f56c6c)}.qr-hint[data-v-bb0a303d]{font-size:14px;color:var(--text-tertiary, #909399);margin:0}.scan-tip[data-v-bb0a303d]{display:flex;align-items:center;gap:4px;color:var(--success-color, #07c160);font-size:14px;margin-top:12px}.loading-container[data-v-bb0a303d]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:40px 0;color:var(--text-secondary, #606266)}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.mfa-bind-page[data-v-4bc12407]{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f5f7fa,#c3cfe2);padding:20px}.mfa-card[data-v-4bc12407]{max-width:520px;width:100%}.card-header[data-v-4bc12407]{display:flex;align-items:center;gap:8px}.header-icon[data-v-4bc12407]{color:#409eff;font-size:20px}.header-title[data-v-4bc12407]{font-size:18px;font-weight:600}.state-loading[data-v-4bc12407]{display:flex;align-items:center;justify-content:center;padding:40px 0;gap:8px;color:#606266}.steps[data-v-4bc12407]{margin-bottom:32px}.step-tip[data-v-4bc12407]{display:flex;align-items:center;gap:6px;color:#606266;font-size:14px;margin-bottom:16px;justify-content:center}.intro-alert[data-v-4bc12407]{margin-bottom:24px}.intro-content[data-v-4bc12407]{font-size:13px;line-height:1.6;color:#606266;margin-top:4px}.intro-steps[data-v-4bc12407]{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}.intro-step[data-v-4bc12407]{display:flex;align-items:center;gap:12px}.intro-num[data-v-4bc12407]{width:28px;height:28px;border-radius:50%;background:#409eff;color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;flex-shrink:0}.intro-text[data-v-4bc12407]{font-size:14px;color:#303133;line-height:1.5}.start-btn[data-v-4bc12407]{width:100%}.qrcode-container[data-v-4bc12407]{display:flex;align-items:center;justify-content:center;min-height:220px;margin-bottom:16px}.qrcode-image[data-v-4bc12407]{width:200px;height:200px;border-radius:8px;box-shadow:0 2px 12px #00000014}.qrcode-placeholder[data-v-4bc12407]{display:flex;align-items:center;justify-content:center;gap:8px;color:#909399}.manual-collapse[data-v-4bc12407]{margin-bottom:16px}.manual-hint[data-v-4bc12407]{font-size:13px;color:#606266;margin:0 0 8px}.secret-input[data-v-4bc12407]{margin-bottom:8px}.secret-input[data-v-4bc12407] .el-input__inner{font-family:monospace;font-size:12px;letter-spacing:1px}.manual-tip[data-v-4bc12407]{font-size:12px;color:#909399;margin:0}.qrcode-actions[data-v-4bc12407]{display:flex;gap:12px}.qrcode-actions .el-button[data-v-4bc12407]{flex:1}.code-input[data-v-4bc12407]{margin-bottom:16px}.code-input[data-v-4bc12407] .el-input__inner{font-size:24px;letter-spacing:8px;text-align:center;font-family:monospace}.verify-actions[data-v-4bc12407]{display:flex;gap:12px}.verify-actions .el-button[data-v-4bc12407]{flex:1}.error-alert[data-v-4bc12407]{margin-bottom:16px}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.action-approval-card[data-v-f998ce57]{margin-bottom:12px;border-left:3px solid var(--el-color-warning)}.title-row[data-v-f998ce57]{display:flex;align-items:center;justify-content:space-between;gap:8px}.action-title[data-v-f998ce57]{font-weight:600;font-size:14px}.action-desc[data-v-f998ce57]{color:var(--el-text-color-secondary);font-size:13px;margin-top:4px}.action-type[data-v-f998ce57]{color:var(--el-text-color-secondary);font-size:12px;margin-top:2px}.payload-block[data-v-f998ce57]{margin-top:8px}.block-label[data-v-f998ce57]{font-size:12px;color:var(--el-text-color-secondary);margin-bottom:4px}.payload-pre[data-v-f998ce57]{background:var(--el-fill-color-light);border-radius:6px;padding:8px;font-size:12px;max-height:160px;overflow:auto;white-space:pre-wrap;word-break:break-all}.ticket-block[data-v-f998ce57]{margin-top:8px;display:flex;align-items:center;gap:8px}.ticket-status[data-v-f998ce57]{font-size:12px;color:var(--el-text-color-secondary)}.action-buttons[data-v-f998ce57]{margin-top:12px;display:flex;gap:8px}.note-input[data-v-f998ce57]{margin-top:8px}.takeover-panel[data-v-1bdb699a]{margin-top:12px}.panel-title[data-v-1bdb699a]{font-weight:600;margin-bottom:10px}.actions[data-v-1bdb699a]{display:flex;justify-content:flex-end}.session-workbench[data-v-de7dae2d]{padding:16px;max-width:960px;margin:0 auto}.wb-header[data-v-de7dae2d]{display:flex;align-items:center;gap:12px;margin-bottom:12px}.wb-title[data-v-de7dae2d]{flex:1;display:flex;align-items:center;gap:8px}.wb-title-text[data-v-de7dae2d]{font-weight:600;font-size:16px}.wb-ws[data-v-de7dae2d]{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--el-text-color-secondary)}.wb-ws .dot[data-v-de7dae2d]{width:8px;height:8px;border-radius:50%;background:var(--el-color-info)}.wb-ws.connected .dot[data-v-de7dae2d]{background:var(--el-color-success)}.wb-alert[data-v-de7dae2d],.wb-card[data-v-de7dae2d]{margin-bottom:12px}.overview[data-v-de7dae2d]{display:flex;flex-wrap:wrap;gap:16px}.ov-item[data-v-de7dae2d]{display:flex;flex-direction:column;font-size:14px}.ov-label[data-v-de7dae2d]{font-size:12px;color:var(--el-text-color-secondary);margin-bottom:2px}.intent[data-v-de7dae2d]{margin-top:10px;font-size:13px;color:var(--el-text-color-secondary);white-space:pre-wrap}.tl-title[data-v-de7dae2d]{display:flex;align-items:center;gap:8px;font-weight:600}.tl-desc[data-v-de7dae2d]{font-size:13px;color:var(--el-text-color-secondary);margin-top:2px}.tl-status[data-v-de7dae2d]{font-size:12px;color:var(--el-text-color-secondary);margin-top:2px}.tl-result[data-v-de7dae2d]{margin-top:6px;background:var(--el-fill-color-light);border-radius:6px;padding:8px;font-size:12px;max-height:160px;overflow:auto;white-space:pre-wrap;word-break:break-all}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.otp-bind-panel[data-v-44baea43]{padding:8px 0}.bind-title[data-v-44baea43]{text-align:center;margin-bottom:24px}.bind-title h2[data-v-44baea43]{font-size:18px;font-weight:600;color:var(--text-primary, #303133);margin:0 0 8px;line-height:1.4}.bind-subtitle[data-v-44baea43]{font-size:14px;color:var(--text-secondary, #606266);margin:0}.bind-loading[data-v-44baea43]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:40px 0;color:var(--text-tertiary, #909399)}.bind-loading .el-icon[data-v-44baea43]{font-size:32px}.bind-loading p[data-v-44baea43]{margin:0;font-size:14px}.qr-section[data-v-44baea43]{display:flex;flex-direction:column;align-items:center;margin-bottom:20px}.qr-wrapper[data-v-44baea43]{width:200px;height:200px;display:flex;align-items:center;justify-content:center;background:#f5f7fa;border-radius:12px;border:2px solid #e4e7ed;overflow:hidden;margin-bottom:12px}.qr-image[data-v-44baea43]{width:180px;height:180px;display:block}.qr-placeholder[data-v-44baea43]{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--text-placeholder, #c0c4cc)}.qr-placeholder p[data-v-44baea43]{margin:0;font-size:13px}.qr-hint[data-v-44baea43]{font-size:13px;color:var(--text-tertiary, #909399);margin:0;text-align:center;line-height:1.5}.divider-line[data-v-44baea43]{display:flex;align-items:center;width:100%;margin:0 0 20px;color:var(--text-placeholder, #c0c4cc);font-size:13px}.divider-line[data-v-44baea43]:before,.divider-line[data-v-44baea43]:after{content:"";flex:1;height:1px;background:#e4e7ed}.divider-line span[data-v-44baea43]{padding:0 12px;white-space:nowrap}.secret-section[data-v-44baea43]{margin-bottom:20px}.secret-display[data-v-44baea43]{display:flex;align-items:center;gap:8px;background:#f5f7fa;border-radius:8px;padding:10px 12px;border:1px solid #e4e7ed}.secret-text[data-v-44baea43]{flex:1;font-family:Courier New,Consolas,monospace;font-size:14px;font-weight:600;color:var(--text-primary, #303133);letter-spacing:1px;word-break:break-all;-webkit-user-select:all;user-select:all}.copy-btn[data-v-44baea43]{flex-shrink:0}.verify-section[data-v-44baea43]{margin-bottom:20px}[data-v-44baea43] .verify-section .el-form-item__label{font-weight:500;color:var(--text-secondary, #606266)}.bind-actions[data-v-44baea43]{display:flex;flex-direction:column;gap:12px}.verify-btn[data-v-44baea43]{width:100%;background-color:#07c160;border-color:#07c160}.verify-btn[data-v-44baea43]:hover,.verify-btn[data-v-44baea43]:focus{background-color:#06ad56;border-color:#06ad56}.verify-btn[data-v-44baea43]:active{background-color:#059a4d;border-color:#059a4d}.bind-error[data-v-44baea43]{margin-top:16px}.settings-page[data-v-e0297981]{max-width:720px;margin:0 auto;padding:24px 20px 48px}.page-title[data-v-e0297981]{font-size:22px;font-weight:600;color:var(--text-primary, #303133);margin:0 0 24px;line-height:1.4}.settings-card[data-v-e0297981]{border-radius:12px;border:1px solid #e4e7ed}.settings-card[data-v-e0297981] .el-card__header{padding:16px 20px;border-bottom:1px solid #ebeef5}.settings-card[data-v-e0297981] .el-card__body{padding:20px}.card-header[data-v-e0297981]{display:flex;align-items:center;justify-content:space-between}.card-title[data-v-e0297981]{font-size:16px;font-weight:600;color:var(--text-primary, #303133)}.status-loading[data-v-e0297981]{display:flex;align-items:center;gap:8px;padding:24px 0;justify-content:center;color:var(--text-tertiary, #909399);font-size:14px}.status-loading .el-icon[data-v-e0297981]{font-size:18px}.otp-info[data-v-e0297981]{display:flex;flex-direction:column;gap:12px}.info-row[data-v-e0297981]{display:flex;align-items:center;gap:12px}.info-label[data-v-e0297981]{min-width:72px;font-size:14px;color:var(--text-secondary, #606266);flex-shrink:0}.info-value[data-v-e0297981]{font-size:14px;color:var(--text-primary, #303133);display:flex;align-items:center;gap:6px}.check-icon[data-v-e0297981]{color:#07c160;font-size:16px}.info-time[data-v-e0297981]{color:var(--text-tertiary, #909399);font-size:13px}.otp-warning[data-v-e0297981]{display:flex;align-items:flex-start;gap:12px;padding:16px;background:#fdf6ec;border-radius:8px;border:1px solid #faecd8}.warning-icon[data-v-e0297981]{color:#e6a23c;font-size:20px;flex-shrink:0;margin-top:2px}.warning-text[data-v-e0297981]{flex:1}.warning-title[data-v-e0297981]{font-size:14px;font-weight:600;color:var(--text-primary, #303133);margin:0 0 4px}.warning-desc[data-v-e0297981]{font-size:13px;color:var(--text-secondary, #606266);margin:0;line-height:1.5}.otp-actions[data-v-e0297981]{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.action-hint[data-v-e0297981]{font-size:13px;color:var(--text-tertiary, #909399);margin:0;line-height:1.5}.bind-btn[data-v-e0297981]{background-color:#07c160;border-color:#07c160}.bind-btn[data-v-e0297981]:hover,.bind-btn[data-v-e0297981]:focus{background-color:#06ad56;border-color:#06ad56}.bind-btn[data-v-e0297981]:active{background-color:#059a4d;border-color:#059a4d}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B1u3nieA.js","assets/index-Do7r--Ys.css"])))=>i.map(i=>d[i]);
|
||||
import{_ as $,v as R,r as b,x as w,a0 as O}from"./index-B1u3nieA.js";import{a as g}from"./index-ChNUjLLo.js";import{u as N}from"./conversation-C4tqOoff.js";async function q(t,r,s){return await g.post("/agents/login",{user_id:t,name:t,password:r,otp_code:s||void 0})}async function x(){return await g.get("/agents/me")}async function P(t){return await g.put("/agents/me/status",{status:t})}async function D(t){const r={};return r.status=t,await g.get("/agents",{params:r})}async function j(){return await g.post("/agents/otp-bind")}async function J(t,r){return await g.post("/agents/otp-verify",{user_id:t,otp_code:r})}async function K(){return await g.post("/agents/otp-unbind")}const L=3e4,M=3e4,V=1e3;function H(){let t=null,r=null,s=null,c=0,d=!1;function m(){const e=h();let o=e.userId,n=e.token;if(o||(o=localStorage.getItem("agent_user_id")||""),n||(n=localStorage.getItem("agent_token")||""),console.log("[WebSocket] 连接参数:",{userId:o,token:n?n.substring(0,20)+"...":null,localStorage_agent_token:localStorage.getItem("agent_token"),localStorage_agent_user_id:localStorage.getItem("agent_user_id")}),!o){console.warn("[WebSocket] 未登录,跳过连接 - agentId为空");return}t&&y(),d=!1;const l=window.location.protocol==="https:"?"wss:":"ws:",u=window.location.host,W=`${l}//${u}/ws/${o}`;console.log(`[WebSocket] 正在连接: ${W}`),t=new WebSocket(W,[`bearer.${n}`]),t.onopen=()=>{console.log("[WebSocket] 连接成功"),c=0,I(),N().stopAllPolling()},t.onmessage=S=>{try{const C=JSON.parse(S.data);v(C)}catch(C){console.error("[WebSocket] 消息解析失败:",C)}},t.onclose=()=>{console.log("[WebSocket] 连接关闭"),_(),t=null,d||(N().startAllPolling(),T())},t.onerror=S=>{console.error("[WebSocket] 连接错误:",S)}}function y(){d=!0,s&&(clearTimeout(s),s=null),_(),t&&(t.close(),t=null),c=0,console.log("[WebSocket] 已主动断开连接")}function I(){_(),r=setInterval(()=>{t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"ping"}))},L)}function _(){r&&(clearInterval(r),r=null)}function T(){if(d)return;const e=Math.min(V*Math.pow(2,c),M);c++,console.log(`[WebSocket] 将在 ${e/1e3} 秒后重连(第 ${c} 次)`),s&&clearTimeout(s),s=setTimeout(()=>{console.log("[WebSocket] 正在重连..."),m()},e)}function v(e){const o=N();switch(e.type){case"new_message":e.data&&(o.handleNewMessage(e.data),A());break;case"conversation_updated":e.data&&o.handleConversationUpdated(e.data);break;case"collaborator_invited":if(e.data){o.handleCollaboratorInvited(e.data);const n=h();e.data.invitee_agent_id===n.userId&&$(async()=>{const{ElNotification:l}=await import("./index-B1u3nieA.js").then(u=>u.a2);return{ElNotification:l}},__vite__mapDeps([0,1])).then(({ElNotification:l})=>{l({title:"🔔 摇人邀请",message:`坐席 ${e.data.inviter_agent_id} 邀请你协助处理会话「${e.data.employee_name||"未知"}」
|
||||
${e.data.last_message_summary||""}`,type:"info",duration:0,position:"top-right",onClick:()=>{o.selectConversation(e.data.conversation_id)}})})}break;case"collaborator_joined":case"collaborator_left":o.handleCollaboratorChanged();break;case"participant_invited":o.handleCollaboratorChanged();break;case"participant_joined":o.handleCollaboratorChanged();break;case"participant_removed":case"participant_left":o.handleCollaboratorChanged();break;case"pong":break;case"typing":if(e.data){const n=h();e.data.sender_id!==n.userId&&o.handleTypingEvent(e.data)}break;default:console.warn(`[WebSocket] 未知消息类型: ${e.type}`)}}let i=null;function A(){try{i||(i=new AudioContext);const e=i.currentTime,o=i.createOscillator(),n=i.createGain();o.type="sine",o.frequency.value=880,n.gain.setValueAtTime(.3,e),n.gain.exponentialRampToValueAtTime(.001,e+.15),o.connect(n),n.connect(i.destination),o.start(e),o.stop(e+.15);const l=i.createOscillator(),u=i.createGain();l.type="sine",l.frequency.value=660,u.gain.setValueAtTime(.3,e+.1),u.gain.exponentialRampToValueAtTime(.001,e+.3),l.connect(u),u.connect(i.destination),l.start(e+.1),l.stop(e+.3)}catch{}}let k=0;const E=3e3;function a(e){if(!t||t.readyState!==WebSocket.OPEN)return;const o=Date.now();if(o-k<E)return;k=o;const n=h();t.send(JSON.stringify({type:"typing",conversation_id:e,sender_name:n.agentName||"坐席"}))}return{connect:m,disconnect:y,sendTyping:a}}const p="agent_token",f="agent_user_id",h=R("agent",()=>{const t=b(null),r=b(localStorage.getItem(p)),s=b(localStorage.getItem(f)),c=b(!1),d=b([]),m=w(()=>!!r.value&&!!t.value),y=w(()=>{var a;return((a=t.value)==null?void 0:a.status)||"offline"}),I=w(()=>{var a;return((a=t.value)==null?void 0:a.name)||""}),_=w(()=>{var a;return((a=t.value)==null?void 0:a.user_id)||s.value||""});async function T(a,e,o){try{c.value=!0,localStorage.removeItem(p),localStorage.removeItem(f),r.value=null,s.value=null,t.value=null;const n=await q(a,e,o);if("require_otp_bind"in n&&n.require_otp_bind)return n.token&&(r.value=n.token,s.value=n.user_id,localStorage.setItem(p,n.token),localStorage.setItem(f,n.user_id)),c.value=!1,{require_otp_bind:!0,user_id:n.user_id,name:n.name,role:n.role};if("require_otp"in n&&n.require_otp)throw c.value=!1,new Error("require_otp");r.value=n.token,s.value=n.user_id,localStorage.setItem(p,n.token),localStorage.setItem(f,n.user_id);const{token:l,...u}=n;t.value=u,O.push("/workspace")}catch(n){throw console.error("登录失败:",n),n instanceof Error&&n.message==="require_otp",n}finally{c.value=!1}}function v(){const{disconnect:a}=H();a(),r.value=null,s.value=null,t.value=null,localStorage.removeItem(p),localStorage.removeItem(f),O.push("/login")}async function i(){var a;try{if(!r.value)return;const e=await x();t.value=e}catch(e){console.error("获取坐席信息失败:",e),e&&typeof e=="object"&&"response"in e&&((a=e.response)==null?void 0:a.status)===401&&v()}}async function A(a){try{const e=await P(a);t.value=e}catch(e){console.error("更新坐席状态失败:",e)}}async function k(){try{const a=await D("online");d.value=a.items.filter(e=>{var o;return e.user_id!==((o=t.value)==null?void 0:o.user_id)})}catch(a){console.error("获取坐席列表失败:",a)}}async function E(){const a=localStorage.getItem(p);if(a){r.value=a,s.value=localStorage.getItem(f);try{await i()}catch{v()}}}return{agentInfo:t,token:r,agentUserId:s,logging:c,availableAgents:d,isLoggedIn:m,agentStatus:y,agentName:I,userId:_,login:T,logout:v,refreshAgentInfo:i,changeStatus:A,loadAvailableAgents:k,initAuth:E}});export{H as a,j as b,K as c,h as u,J as v};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as n}from"./index-ChNUjLLo.js";import"./index-B1u3nieA.js";async function e(){return n.get("/auth/qrcode")}async function o(t){return n.get("/auth/scan/status",{params:{ticket:t}})}async function c(t,a){return n.get("/auth/oauth2/callback",{params:{code:t,state:a}})}async function s(t){return n.post("/auth/bind",t)}async function i(t){return n.post("/auth/verify",{token:t})}async function h(){return n.post("/auth/logout")}async function f(){return n.get("/auth/me")}async function g(t){return n.get("/auth/oauth2/url",{params:{redirect_uri:t}})}export{s as bindAccount,f as getCurrentUser,g as getOAuthAuthorizeUrl,e as getQrcode,o as getScanStatus,c as handleOAuthCallback,h as logout,i as verifyToken};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user