官方纰漏bug修复和安全能力提升

This commit is contained in:
Weiming committed 2026-12-02 14:12:35 +08:00
1 parent 459339719d
commit ce00640ea4
148 files changed
+9444 -1621

No files matched your search

+7 -1
View File
@@ -1,15 +1,18 @@
# dependencies # dependencies
node_modules/ node_modules/
# build output (dist is intentionally versioned for deployment) # generated build output (dist is intentionally versioned for deployment)
build/ build/
.next/ .next/
out/ out/
!dist/
!dist/**
# local env files # local env files
.env .env
.env.local .env.local
.env.*.local .env.*.local
!.env.example
# logs # logs
npm-debug.log* npm-debug.log*
@@ -38,3 +41,6 @@ Thumbs.db
*.tmp *.tmp
*.temp *.temp
*.swp *.swp
*.swo
*.bak
*~
+1
View File
@@ -0,0 +1 @@
.access-denied[data-v-0b42e8f0]{max-width:680px;margin:64px auto;padding:32px;text-align:center}.access-denied h1[data-v-0b42e8f0]{margin-bottom:12px}
+1
View File
@@ -0,0 +1 @@
import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{j as o,c as t,b as s}from"./index-DU2fjqYh.js";const n={},r={class:"access-denied"};function a(_,e){return o(),t("section",r,[...e[0]||(e[0]=[s("h1",null,"暂无可访问页面",-1),s("p",null,"账号已登录,但当前尚未分配可访问的业务权限。请联系管理员完成授权。",-1)])])}const f=c(n,[["render",a],["__scopeId","data-v-0b42e8f0"]]);export{f as default};
@@ -0,0 +1 @@
import{d,c,b as m,t as z,p as S,B as n,D as b,j as v}from"./index-DU2fjqYh.js";const f=["aria-label"],y={class:"app-list-pagination__summary","aria-live":"polite"},P=d({__name:"AppListPagination",props:{page:{},pageSize:{},total:{},disabled:{type:Boolean,default:!1},ariaLabel:{default:"列表分页"},pageSizes:{default:()=>[10,20,50]}},emits:["update:page","update:pageSize"],setup(s,{emit:r}){const e=s,p=r,o=n({get:()=>e.page,set:a=>p("update:page",a)}),l=n({get:()=>e.pageSize,set:a=>p("update:pageSize",a)}),g=n(()=>{if(!e.total)return"共 0 条";const a=(e.page-1)*e.pageSize+1,t=Math.min(e.total,e.page*e.pageSize);return`第 ${a}–${t} 条,共 ${e.total} 条`});return(a,t)=>{const u=b("el-pagination");return v(),c("nav",{class:"app-list-pagination","aria-label":s.ariaLabel},[m("p",y,z(g.value),1),S(u,{"current-page":o.value,"onUpdate:currentPage":t[0]||(t[0]=i=>o.value=i),"page-size":l.value,"onUpdate:pageSize":t[1]||(t[1]=i=>l.value=i),"page-sizes":s.pageSizes,total:s.total,disabled:s.disabled,"pager-count":5,layout:"sizes, prev, pager, next, jumper",size:"small",background:""},null,8,["current-page","page-size","page-sizes","total","disabled"])],8,f)}}});export{P as _};
-1
View File
@@ -1 +0,0 @@
.snapshot-fields[data-v-6378499a]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--line)}.snapshot-field[data-v-6378499a]{min-width:0;padding:12px 14px;background:#fff}.snapshot-field.full[data-v-6378499a]{grid-column:1 / -1}.snapshot-field dt[data-v-6378499a]{margin-bottom:5px;color:var(--quiet);font-size:11px;font-weight:700}.snapshot-field dd[data-v-6378499a]{margin:0;overflow-wrap:anywhere}.snapshot-field .preserve-lines[data-v-6378499a]{white-space:pre-wrap}.expense-snapshot dd[data-v-6378499a]{margin-top:9px}.snapshot-warning[data-v-6378499a]{margin-bottom:9px;padding:8px 10px;border:1px solid #f1cf8d;border-radius:6px;background:#fff9e9;color:#805a16;font-size:11px}.finance-facts .source-grid[data-v-6378499a]{margin-top:0}@media (max-width: 680px){.snapshot-fields[data-v-6378499a]{grid-template-columns:1fr}.snapshot-field.full[data-v-6378499a]{grid-column:1}}
-1
View File
@@ -1 +0,0 @@
import{d as at,a as et,u as ot,o as ut,c as u,b as t,t as e,m as E,e as A,p as V,l as D,k as H,F as m,f as T,n as S,x as g,h as it,g as rt,r as L,y as f,B as dt,j as o}from"./index-CXCTlxVW.js";import{_ as pt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const vt={class:"page-head"},ct={class:"head-actions"},mt={key:0,class:"load-wrap",role:"status"},yt={key:1,class:"card empty-state",role:"alert"},bt={key:2,class:"card empty-state"},Et={key:0,class:"inline-alert danger",role:"alert"},St={class:"detail-layout"},gt={class:"status-strip","aria-label":"报销流程独立状态"},Nt={class:"workflow","aria-label":"报销流程"},At={key:0,class:"section-card","aria-labelledby":"feishu-snapshot-title"},_t={class:"section-title"},Tt={class:"snapshot-fields"},ft={key:1,class:"snapshot-field full expense-snapshot"},kt={key:0,class:"snapshot-warning",role:"note"},ht={key:1,class:"table-wrap"},Pt={class:"data-table responsive-table"},Ct=["data-label"],It={key:2},Dt={key:1,class:"section-card"},Mt={class:"section-title"},Ot={class:"form-grid"},wt={class:"field"},Lt=["value"],Rt={class:"field"},$t=["value"],Xt={class:"field"},jt=["value"],Ut={class:"field"},Bt=["value"],Kt={class:"field"},Vt=["value"],Ht={class:"field full"},Yt=["value"],xt={key:2,class:"section-card finance-facts"},Ft={class:"source-grid"},Gt={class:"source-card"},qt={class:"source-card-head"},zt={class:"source-grid"},Wt={key:3,class:"section-card"},Jt={class:"section-title"},Qt={key:0,class:"table-wrap"},Zt={class:"data-table responsive-table"},tl={"data-label":"日期"},ll={"data-label":"类别"},sl={"data-label":"说明"},nl={"data-label":"附件"},al={"data-label":"金额",class:"amount"},el={class:"section-card"},ol={class:"section-title"},ul={key:0,class:"table-wrap"},il={class:"data-table responsive-table"},rl={"data-label":"发票号码"},dl={"data-label":"发票金额",class:"amount"},pl={"data-label":"校验状态"},vl={key:1,class:"empty-state"},cl={class:"section-card"},ml={class:"section-title"},yl={key:0,class:"attachment-grid"},bl={key:1,class:"empty-state"},El={class:"section-card"},Sl={class:"timeline"},gl={class:"card side-panel"},Nl={class:"summary-block"},Al={class:"amount-highlight"},_l={class:"summary-row"},Tl={class:"summary-row"},fl={class:"summary-total"},kl={class:"summary-block"},hl={key:0},Pl={key:1,class:"muted-copy"},Cl=at({__name:"ApplicationDetail",setup(Il){const P=it(),Y=rt(),_=et(),k=ot(),M=L(!0),C=L(""),O=L(!1),n=f(()=>O.value?_.getById(String(P.params.id)):null),x=f(()=>{var s;return!!n.value&&n.value.applicantName===((s=k.userInfo)==null?void 0:s.realName)&&(n.value.applicationStatus==="草稿"||n.value.approvalStatus==="退回")}),F=f(()=>n.value?`/applications/${n.value.id}/edit`:"/applications"),w=f(()=>{var s,l;return((l=(s=n.value)==null?void 0:s.formSnapshot)==null?void 0:l.mode)==="FEISHU"}),G=f(()=>{var s,l;return w.value&&((l=(s=n.value)==null?void 0:s.formSnapshot)==null?void 0:l.fields.some(i=>i.binding==="EXPENSE_ITEMS"||i.type==="EXPENSE_ITEMS"))}),y=s=>`¥ ${Number(s||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,N=s=>({草稿:"draft",已提交:"info",审批中:"pending",审批通过:"success",退回:"danger",待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success",未触发:"neutral"})[s]||"neutral",q=()=>window.print(),z=f(()=>n.value?[{name:"申请",value:n.value.applicationStatus,tone:N(n.value.applicationStatus)},{name:"审批",value:n.value.approvalStatus,tone:N(n.value.approvalStatus)},{name:"收单",value:n.value.receiptStatus,tone:N(n.value.receiptStatus)},{name:"付款",value:n.value.paymentStatus,tone:N(n.value.paymentStatus)}]:[]),W=f(()=>{const s=n.value;return s?[{name:"申请提交",copy:s.applicationStatus==="草稿"?"尚未提交申请":`${s.applicantName} 已提交报销申请`,done:s.applicationStatus!=="草稿",time:s.submitTime||s.createdAt||"待触发"},{name:"飞书审批",copy:s.approvalStatus==="退回"?`退回:${s.returnReason||"需补充信息"}`:s.approvalStatus==="审批通过"?"审批通过,结果已同步":`当前节点:${s.currentApprovalNode}`,done:s.approvalStatus!=="未触发",time:s.updatedAt||"待触发"},{name:"财务收单",copy:s.receiptStatus==="已收单"?"财务已完成收单":s.receiptStatus==="待收单"?"等待财务办理收单":"审批通过后激活",done:s.receiptStatus==="已收单",time:s.updatedAt||"待触发"},{name:"付款登记",copy:s.paymentStatus==="未付款"?"等待外部支付并登记凭据":`累计已付 ${y(_.paidAmount(s))}`,done:s.paymentStatus==="已付款",time:s.updatedAt||"待办理"}]:[]}),J=s=>{var p;const l=n.value;if(!l)return;const i=(p=l.formSnapshot)==null?void 0:p.values;return i&&Object.prototype.hasOwnProperty.call(i,s.valueKey)?i[s.valueKey]:{APPLICATION_NO:l.applicationNo,TITLE:l.title,APPLICANT_NAME:l.applicantName,APPLICANT_CONTACT:l.applicantName,APPLICANT_DEPARTMENT:l.departmentName,DEPARTMENT:l.departmentName,EXPENSE_TYPE:l.expenseTypeName||l.category,TOTLine truncated
+1
View File
@@ -0,0 +1 @@
.snapshot-fields[data-v-56bf492f]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--line)}.snapshot-field[data-v-56bf492f]{min-width:0;padding:12px 14px;background:#fff}.snapshot-field.full[data-v-56bf492f]{grid-column:1 / -1}.snapshot-field dt[data-v-56bf492f]{margin-bottom:5px;color:var(--quiet);font-size:11px;font-weight:700}.snapshot-field dd[data-v-56bf492f]{margin:0;overflow-wrap:anywhere}.snapshot-field .preserve-lines[data-v-56bf492f]{white-space:pre-wrap}.expense-snapshot dd[data-v-56bf492f]{margin-top:9px}.snapshot-warning[data-v-56bf492f]{margin-bottom:9px;padding:8px 10px;border:1px solid #f1cf8d;border-radius:6px;background:#fff9e9;color:#805a16;font-size:11px}.finance-facts .source-grid[data-v-56bf492f]{margin-top:0}
+1
View File
@@ -0,0 +1 @@
import{d as it,a as rt,k as dt,u as pt,o as vt,c as o,b as t,t as u,s as p,e as i,G as F,q as O,p as G,F as b,O as c,f as k,n as g,v as A,h as ct,g as mt,r as j,B as T,D as yt,j as n}from"./index-DU2fjqYh.js";import{_ as bt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Et={class:"page-head"},St={class:"head-actions"},Nt={key:0,class:"load-wrap",role:"status"},_t={key:1,class:"card empty-state",role:"alert"},gt={key:2,class:"card empty-state"},At={key:0,class:"inline-alert danger",role:"alert"},kt={class:"detail-layout"},ft={class:"status-strip","aria-label":"报销流程独立状态"},ht={class:"workflow","aria-label":"报销流程"},Tt={key:1,class:"section-card","aria-labelledby":"feishu-snapshot-title"},Pt={class:"section-title"},Ct={class:"snapshot-fields"},It={key:1,class:"snapshot-field full expense-snapshot"},Mt={key:0,class:"snapshot-warning",role:"note"},Dt={key:1,class:"table-wrap"},Ot={class:"data-table responsive-table"},wt=["data-label"],Lt={key:2},Rt={key:2,class:"section-card"},jt={class:"section-title"},Xt={class:"form-grid"},$t={key:0,class:"field"},Bt=["value"],Ut={class:"field"},Kt=["value"],Vt={key:1,class:"field"},Ht=["value"],Yt={class:"field"},xt=["value"],Ft={key:2,class:"field"},Gt=["value"],zt={key:3,class:"field full"},qt=["value"],Wt={key:3,class:"section-card finance-facts"},Jt={class:"source-grid"},Qt={key:0},Zt={key:1},te={key:2},ee={key:4,class:"source-card"},ae={class:"source-card-head"},le={class:"source-grid"},se={key:0},ne={key:1},oe={key:2},ue={key:5,class:"section-card"},ie={class:"section-title"},re={key:0,class:"table-wrap"},de={class:"data-table responsive-table"},pe={"data-label":"日期"},ve={"data-label":"类别"},ce={"data-label":"说明"},me={"data-label":"附件"},ye={"data-label":"金额",class:"amount"},be={key:6,class:"section-card"},Ee={class:"section-title"},Se={key:0,class:"table-wrap"},Ne={class:"data-table responsive-table"},_e={"data-label":"发票号码"},ge={"data-label":"发票金额",class:"amount"},Ae={"data-label":"校验状态"},ke={key:1,class:"empty-state"},fe={key:7,class:"section-card"},he={class:"section-title"},Te={key:0,class:"attachment-grid"},Pe={key:1,class:"empty-state"},Ce={key:8,class:"section-card"},Ie={class:"timeline"},Me={key:0,class:"card side-panel"},De={key:0,class:"summary-block"},Oe={class:"amount-highlight"},we={class:"summary-row"},Le={class:"summary-row"},Re={class:"summary-total"},je={key:1,class:"summary-block"},Xe={key:0},$e={key:1,class:"muted-copy"},Be=it({__name:"ApplicationDetail",setup(Ue){const C=ct(),z=mt(),h=rt(),q=dt(),X=pt(),w=j(!0),I=j(""),L=j(!1),l=T(()=>L.value?h.getById(String(C.params.id)):null),S=a=>X.canRead(a),R=a=>X.canEdit(a),$=T(()=>!!l.value&&R("ui.application-detail.edit")&&q.can("reimbursement.application:edit")&&(l.value.applicationStatus==="草稿"||l.value.approvalStatus==="退回")),W=T(()=>l.value?`/applications/${l.value.id}/edit`:"/applications"),M=T(()=>{var a,e;return((e=(a=l.value)==null?void 0:a.formSnapshot)==null?void 0:e.mode)==="FEISHU"}),J=T(()=>{var a,e;return M.value&&((e=(a=l.value)==null?void 0:a.formSnapshot)==null?void 0:e.fields.some(r=>r.binding==="EXPENSE_ITEMS"||r.type==="EXPENSE_ITEMS"))}),N=a=>`¥ ${Number(a||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,f=a=>({草稿:"draft",已提交:"info",审批中:"pending",审批通过:"success",退回:"danger",待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success",未触发:"neutral"})[a]||"neutral",Q=()=>window.print(),Z=T(()=>l.value?[{name:"申请",value:l.value.applicationStatus,tone:f(l.value.applicationStatus)},{name:"审批",value:l.value.approvalStatus,tone:f(l.value.approvalStatus)},{name:"收单",value:l.value.receiptStatus,tone:f(l.value.receiptStatus)},{name:"付款",value:l.value.paymentStatus,tone:f(l.value.paymentStatus)}]:[]),tt=T(()=>{const a=l.value;return a?[{name:"申请提交",copy:a.applicationStatus==="草稿"?"尚未提交申请":`${a.applicantName} 已提交报销申请`,done:a.applicationStatus!=="草稿",time:a.submitTime||a.createdAt||"待触发"},{name:"飞书审批",copy:a.approvalStatus==="退回"?`退回:${a.returnReason||"需补充信息"}`:a.approvalStatus==="审批通过"?"审批通过,结果已同步":`当前节点:${a.currentApprovalNode}`,done:a.approvalStatus!=="未触发",time:a.updatedAt||"待触发"},{name:"财务收单",copy:a.receiptStatus==="已收单"?"财务已完成收单":a.receiptStatus==="待收单"?"等待财务办理收单":"审批通过后激活",done:a.receiptStatus==="已收单",time:a.updatedAt||"待触发"},{name:"付款登记",copy:a.paymentStatus==="未付款"?"等待外部支付并登记凭据":`累计已付 ${N(h.paidAmount(a))}`,done:a.paymentStatus==="已付款",time:a.updatedAt||"待办理"}]:[]}),et=a=>{var m;const e=l.value;if(!e)return;const r=(m=e.formSnapshot)==null?void 0:m.values;return r&&Object.prototype.hasOwnProperty.call(r,a.valueKey)?r[a.valueKey]:{APPLICATION_NO:e.applicationNo,TITLELine truncated
+4
View File
@@ -0,0 +1,4 @@
import{L as et,d as tt,a as at,k as lt,u as st,r as y,w as Ae,o as nt,c as n,b as t,e as i,G as B,t as o,n as _,F as m,v as h,f as g,s as f,x as N,y as Te,M as V,q,N as Z,h as ot,B as c,E as $,D as it,j as s,O as ee,C as xe}from"./index-DU2fjqYh.js";import{_ as Re}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{m as ut}from"./searchProjection-BPQZhrH5.js";import{u as Be}from"./useListPagination-j0ff6aFk.js";import{_ as rt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const pt={mine:()=>et.get("/v1/travel-applications/mine")},ct={class:"page-content route-list-page"},dt={class:"page-head"},vt={class:"head-actions"},bt=["disabled"],yt=["disabled"],mt={key:0,class:"load-wrap",role:"status","aria-live":"polite"},gt={key:1,class:"card empty-state",role:"alert"},ft={key:2,class:"page-content"},kt={key:0,class:"inline-alert",role:"status","aria-live":"polite"},St={class:"card application-kind-tabs"},_t={class:"tabs",role:"tablist","aria-label":"申请类型"},ht=["aria-selected"],wt=["aria-selected"],Ct={key:1,class:"metrics application-metrics"},Nt={class:"metric neutral"},Et={class:"metric warn"},At={class:"metric success"},Tt={class:"metric neutral"},xt={key:2,class:"card fill-list-card primary-list-card"},Rt={class:"tabs",role:"tablist","aria-label":"付款申请列表筛选"},Bt=["id","aria-selected","onClick"],$t=["aria-labelledby"],Dt={class:"field-filter-panel application-filter-panel","aria-label":"付款申请筛选条件"},Lt={class:"application-filter-head"},Ut={class:"application-filter-actions"},It={class:"application-filter-result","aria-live":"polite"},Ft=["disabled"],Vt={class:"field-filter-grid application-filter-grid"},zt={class:"filter-keyword"},Pt={key:0},Ot=["value"],jt={key:1},qt=["value"],Mt={key:2},Gt=["value"],Yt={key:3},Qt=["value"],Wt={key:4},Jt=["value"],Kt={class:"table-wrap application-table-wrap"},Ht={class:"data-table responsive-table","aria-label":"付款申请列表"},Xt={key:0,scope:"col"},Zt={key:1,scope:"col"},ea={key:2,scope:"col"},ta={key:3,scope:"col"},aa={key:4,scope:"col",class:"amount"},la={key:0,"data-label":"申请单号"},sa={key:1},na={key:1,"data-label":"申请日期"},oa={key:2,"data-label":"申请事项"},ia={key:0},ua={key:3,"data-label":"收款对象"},ra={key:4,"data-label":"申请金额",class:"amount"},pa={key:5,"data-label":"申请金额",class:"amount muted-copy"},ca={"data-label":"申请状态"},da={"data-label":"审批状态"},va={"data-label":"收单状态"},ba={"data-label":"付款状态"},ya={"data-label":"当前审批节点"},ma={"data-label":"操作"},ga={class:"application-row-actions"},fa=["disabled","onClick"],ka=["disabled","onClick"],Sa={key:4,class:"muted-copy"},_a={key:0,class:"empty-state"},ha={key:1,class:"empty-state"},wa={key:3,class:"card primary-list-card travel-readonly-panel"},Ca={class:"filter-bar list-toolbar"},Na={class:"list-toolbar__filters"},Ea={class:"filter-search"},Aa=["value"],Ta={class:"list-toolbar__meta"},xa={class:"tag info"},Ra={key:0,class:"table-wrap application-table-wrap",tabindex:"0",role:"region","aria-label":"本人出差申请列表"},Ba={class:"data-table responsive-table"},$a={"data-label":"申请单号"},Da={"data-label":"行程"},La={"data-label":"出差事由"},Ua={"data-label":"预计金额",class:"amount"},Ia={"data-label":"状态"},Fa={"data-label":"同步时间"},Va={key:1,class:"empty-state"},$e="applications-list-panel",za=tt({__name:"Applications",setup(Pa){const p=at(),z=lt(),k=st(),te=ot(),w=y(String(te.query.q||"")),v=y(String(te.query.tab||"").toLowerCase()==="travel"?"travel":"payment"),M=y([]),ae=y(!1),G=y(!1),le=y(""),Y=y(""),P=y(""),D=y("all"),C=y(""),E=y(""),A=y(""),T=y(""),x=y(""),se=y(new Set),L=y(!!p.reimbursements.length),r=a=>k.canRead(a),ge=c(()=>k.canEdit("reimbursement.application.create")&&z.can("reimbursement.application:create")),fe=c(()=>k.canEdit("ui.applications.export")),Q=c(()=>k.canRead("page.travel-applications")),De=c(()=>k.canRead("page.application-detail")&&z.can("reimbursement.application:read")),ke=c(()=>r("ui.applications.column.title")||r("ui.applications.column.applicant")),b=c(()=>r("ui.applications.column.status")),U=c(()=>b.value&&r("ui.dashboard.metric.pending")),Se=c(()=>r("ui.applications.column.amount")&&r("ui.dashboard.metric.amount")),Le=c(()=>[...new Set(p.reimbursements.map(a=>a.expenseTypeName).filter(Boolean))]),Ue=c(()=>[...new Set(p.reimbursements.flatMap(a=>[a.applicationStatus,a.approvalStatus]).filter(Boolean))]),Ie=c(()=>[...new Set(p.reimbursements.map(a=>a.receiptStatus).filter(Boolean))]),Fe=c(()=>[...new Set(p.reimbursements.map(a=>a.paymentStatus).filter(Boolean))]),Ve=c(()=>[...new Set(p.reimbursements.map(a=>me(a.sourceStatus)).filter(Boolean))]),I=c(()=>{const a=p.reimbursements.filter(e=>(e.submitTime||e.createdAt||"").slice(0,7)===new Date().toISOString().slice(0,7));return{drafts:p.reimbursements.filter(e=>e.applicationStatus==="草稿").length,returned:p.reimbursements.filter(e=>e.approvalStatus==="退Line truncated
`),d=URL.createObjectURL(new Blob([`\uFEFF${e}`],{type:"text/csv;charset=utf-8"})),l=document.createElement("a"),R=new Date;l.href=d,l.download=`付款申请列表_${R.toISOString().slice(0,10)}.csv`,document.body.appendChild(l),l.click(),l.remove(),URL.revokeObjectURL(d),$.success(`已导出 ${S.value.length} 条付款申请`)},K=(a,e)=>!Array.isArray(a.availableActions)||a.availableActions.includes(e),de=a=>De.value&&K(a,"VIEW"),Ne=a=>k.canEdit("reimbursement.application.edit")&&z.can("reimbursement.application:edit")&&K(a,"EDIT")&&(a.applicationStatus==="草稿"||a.approvalStatus==="退回"),ve=a=>k.canEdit("reimbursement.application.submit")&&z.can("reimbursement.application:submit")&&K(a,"SUBMIT")&&(a.applicationStatus==="草稿"||a.approvalStatus==="退回"),be=a=>k.canEdit("reimbursement.application.delete")&&z.can("reimbursement.application:delete")&&K(a,"DELETE")&&a.applicationStatus==="草稿",We=a=>de(a)||Ne(a)||ve(a)||be(a),F=a=>se.value.has(String(a.id)),H=(a,e)=>{const d=new Set(se.value);e?d.add(String(a.id)):d.delete(String(a.id)),se.value=d},Ee=a=>a==="cancel"||a==="close",Je=async a=>{if(!(!ve(a)||F(a))){H(a,!0);try{const e=await p.previewRoute(a.id),d=e.nodes.map(l=>l.nodeName).filter(Boolean).join(" → ")||"系统审批流程";await xe.confirm(`预计流转:${d}${e.warning?`
${e.warning}`:""}
确认提交申请「${a.applicationNo}」?`,"确认提交申请",{type:"warning",confirmButtonText:"确认提交",cancelButtonText:"取消"}),await p.submit(a.id,e.previewToken),$.success("申请已提交,列表状态已更新")}catch(e){Ee(e)||$.error(e instanceof Error?e.message:"提交申请失败,请重试")}finally{H(a,!1)}}},Ke=async a=>{if(!(!be(a)||F(a))){try{await xe.confirm(`删除后无法恢复,确认删除草稿「${a.applicationNo}」?`,"删除草稿",{type:"warning",confirmButtonText:"确认删除",cancelButtonText:"取消"})}catch(e){Ee(e)||$.error("无法打开删除确认,请重试");return}H(a,!0);try{await p.removeApplication(a.id),$.success("草稿已删除")}catch(e){$.error(e instanceof Error?e.message:"删除草稿失败,请重试")}finally{H(a,!1)}}},ye=a=>`¥ ${Number(a||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,me=a=>({NOT_CONFIGURED:"未同步",PENDING:"待同步",SYNCING:"待同步",SYNCED:"已同步",SUCCESS:"已同步",FAILED:"同步异常",ERROR:"同步异常"})[String(a||"").toUpperCase()]||a||"未同步",X=a=>({PENDING:"审批中",APPROVED:"审批通过",REJECTED:"退回",CANCELED:"已撤销",CANCELLED:"已撤销",TERMINATED:"已终止"})[String(a||"").toUpperCase()]||a||"未知",He=a=>[a.startDate,a.endDate].filter(Boolean).join(" 至 ")||"未填写日期",Xe=a=>a?a.replace("T"," ").slice(0,16):"—",j=a=>({草稿:"draft",已提交:"info",审批中:"pending",审批通过:"success",退回:"danger",待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success",未触发:"neutral"})[a]||"neutral";return nt(async()=>{v.value==="travel"&&!Q.value&&(v.value="payment");try{p.reimbursements.length||await p.load()}finally{L.value=!0}v.value==="travel"&&await ce()}),Ae(v,async a=>{a==="travel"&&!G.value&&Q.value&&await ce()}),(a,e)=>{const d=it("router-link");return s(),n("div",ct,[t("div",dt,[e[15]||(e[15]=t("div",null,[t("span",{class:"eyebrow"},"APPLICATION CENTER"),t("h1",null,"申请中心"),t("p",null,"集中查看付款申请,以及从飞书同步的出差申请。")],-1)),t("div",vt,[t("button",{class:"btn",type:"button",disabled:he.value,onClick:pe},"刷新",8,bt),v.value==="payment"&&fe.value?(s(),n("button",{key:0,class:"btn",type:"button",disabled:!S.value.length,onClick:Qe},"导出",8,yt)):i("",!0),v.value==="payment"&&ge.value?(s(),B(d,{key:1,class:"btn primary",to:"/applications/new"},{default:q(()=>[...e[14]||(e[14]=[g("+ 发起付款申请",-1)])]),_:1})):i("",!0)])]),he.value?(s(),n("div",mt,[e[16]||(e[16]=t("span",{class:"loader","aria-hidden":"true"},null,-1)),t("p",null,"正在加载"+o(v.value==="travel"?"出差申请":"付款申请")+"…",1)])):Me.value?(s(),n("div",gt,[t("strong",null,o(v.value==="travel"?"出差申请":"付款申请")+"暂时无法加载",1),e[17]||(e[17]=t("span",null,"请检查网络连接后重试,系统不会以空列表代替异常数据。",-1)),t("button",{class:"btn",type:"button",onClick:pe},"重新加载")])):(s(),n("div",ft,[v.value==="payment"&&Ge.value?(s(),n("div",kt,[e[18]||(e[18]=t("b",{"aria-hidden":"true"},"i",-1)),e[19]||(e[19]=t("span",null,"数据服务暂时不可用,当前记录可能不完整。",-1)),t("button",{class:"btn small",type:"button",onClick:pe},"重试")])):i("",!0),t("div",St,[t("div",_t,[t("button",{class:_(["tab",{active:v.value==="payment"}]),type:"button",role:"tab","aria-selected":v.value==="payment",onClick:e[0]||(e[0]=l=>v.value="payment")},"付款申请",10,ht),Q.value?(s(),n("button",{key:0,class:_(["tab",{active:v.value==="travel"}]),type:"button",role:"tab","aria-selected":v.value==="travel",onClick:e[1]||(e[1]=l=>v.value="travel")},"出差申请(飞书)",10,wt)):i("",!0)])]),v.value==="payment"?(s(),n("div",Ct,[t("div",Nt,[e[20]||(e[20]=t("small",null,"待申请人处理",-1)),t("strong",null,o(U.value?I.value.drafts+I.value.returned:"—"),1),t("span",null,o(U.value?`${I.value.drafts} 张草稿 · ${I.value.returned} 张退回`:"指标不可见"),1)]),t("div",Et,[e[21]||(e[21]=t("small",null,"审批中",-1)),t("strong",null,o(U.value?ne.value.approval:"—"),1),t("span",null,o(U.value?"同步当前审批节点":"指标不可见"),1)]),t("div",At,[e[22]||(e[22]=t("small",null,"收单状态",-1)),t("strong",null,o(U.value?ne.value.received:"—"),1),t("span",null,o(U.value?"已收单申请":"指标不可见"),1)]),t("div",Tt,[e[23]||(e[23]=t("small",null,"本月申请金额 · CNY",-1)),t("strong",null,o(Se.value?ye(I.value.monthlyAmount):"—"),1),t("span",null,o(Se.value?`${I.value.monthlyCount} 张申请 · 当前可见范围`:"指标不可见"),1)])])):i("",!0),v.value==="payment"?(s(),n("div",xt,[t("div",Rt,[(s(),n(m,null,h(ze,l=>t("button",{id:`application-tab-${l.key}`,key:l.key,class:_(["tab",{active:D.value===l.key}]),type:"button",role:"tab","aria-selected":D.value===l.key,"aria-controls":$e,onClick:R=>D.value=l.key},[g(o(l.label)+" ",1),t("small",null,"("+o(ne.value[l.key])+")",1)],10,Bt)),64))]),t("div",{ Line truncated
+1
View File
@@ -0,0 +1 @@
.application-kind-tabs[data-v-b46c874b]{margin-bottom:12px}.application-kind-tabs .tabs[data-v-b46c874b]{border-bottom:0}.application-metrics[data-v-b46c874b]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.application-filter-panel[data-v-b46c874b]{display:grid;gap:14px;padding:16px var(--component-inset);border-bottom:1px solid var(--line);background:var(--surface-raised)}.application-filter-head[data-v-b46c874b]{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:16px}.application-filter-head>strong[data-v-b46c874b]{color:var(--navy);font-size:13px}.application-filter-actions[data-v-b46c874b]{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:10px;color:var(--quiet);font-size:11px}.application-filter-result strong[data-v-b46c874b]{color:var(--blue-dark)}.filter-count[data-v-b46c874b]{padding:3px 8px;border-radius:999px;background:var(--surface-2);color:var(--quiet);white-space:nowrap}.filter-count.active[data-v-b46c874b]{background:var(--blue-soft);color:var(--blue-dark)}.application-filter-grid[data-v-b46c874b]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.application-filter-grid label[data-v-b46c874b]{display:grid;min-width:0;gap:6px;color:var(--muted);font-size:11px}.application-filter-grid input[data-v-b46c874b],.application-filter-grid select[data-v-b46c874b]{width:100%;min-width:0;height:var(--control-height);box-sizing:border-box;padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius);background:#fff;color:var(--text);font:inherit}.application-filter-grid input[data-v-b46c874b]:focus,.application-filter-grid select[data-v-b46c874b]:focus{border-color:var(--blue);outline:0;box-shadow:0 0 0 3px #0057d91f}.application-list-panel[data-v-b46c874b]{display:flex;min-width:0;min-height:0;flex:1 1 auto;flex-direction:column}.application-table-wrap[data-v-b46c874b]{min-height:180px;flex:1 1 auto}.application-table-wrap[data-v-b46c874b] :is(th,td),.application-table-wrap .amount[data-v-b46c874b]{text-align:center!important}.application-row-actions[data-v-b46c874b]{display:flex;min-width:-moz-max-content;min-width:max-content;align-items:center;justify-content:center;gap:2px}.application-row-actions .table-action[data-v-b46c874b]{border:0;background:transparent;cursor:pointer}.application-row-actions .table-action[data-v-b46c874b]:disabled{cursor:wait;opacity:.55}@media (max-width: 1280px){.application-filter-grid[data-v-b46c874b]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (max-width: 900px){.application-metrics[data-v-b46c874b],.application-filter-grid[data-v-b46c874b]{grid-template-columns:repeat(2,minmax(0,1fr))}.application-filter-head[data-v-b46c874b]{align-items:flex-start;flex-direction:column}.application-filter-actions[data-v-b46c874b]{width:100%;justify-content:flex-start;flex-wrap:wrap}}@media (max-width: 700px){.application-list-panel[data-v-b46c874b],.application-table-wrap[data-v-b46c874b]{min-height:0;flex:0 0 auto}}@media (max-width: 600px){.application-metrics[data-v-b46c874b],.application-filter-grid[data-v-b46c874b]{grid-template-columns:1fr}}.travel-readonly-panel .empty-state[data-v-b46c874b]{min-height:260px}.travel-readonly-panel small[data-v-b46c874b]{max-width:560px;color:var(--quiet);line-height:1.6;text-align:center}
-1
View File
@@ -1 +0,0 @@
import{d as J,a as K,u as O,r as S,w as Z,o as aa,c as i,b as t,p as w,l as _,e as y,F as T,x as D,q as E,v as ta,G as R,t as o,m as h,H as A,h as ea,y as v,B as la,j as n,f as g,n as C,k as I}from"./index-CXCTlxVW.js";import{u as sa,_ as na}from"./useListPagination-BTBVezsP.js";const oa={class:"page-content route-list-page"},ia={class:"page-head"},ra={class:"head-actions"},ua=["disabled"],pa={key:0,class:"load-wrap",role:"status","aria-live":"polite"},da={key:1,class:"card empty-state",role:"alert"},ca={key:2,class:"page-content"},va={key:0,class:"inline-alert",role:"status","aria-live":"polite"},ba={class:"card fill-list-card primary-list-card"},ya={class:"tabs",role:"tablist","aria-label":"报销列表筛选"},ga=["id","aria-selected","onClick"],ma=["aria-labelledby"],ka={class:"filter-bar"},fa={class:"filter-search"},Sa={class:"tag info","aria-live":"polite"},_a={key:0,class:"table-wrap"},ha={class:"data-table responsive-table","aria-label":"报销申请列表"},Ca={"data-label":"报销单号"},Na={"data-label":"报销事项"},wa={"data-label":"报销金额",class:"amount"},$a={"data-label":"申请状态"},Ba={"data-label":"审批状态"},xa={"data-label":"收单状态"},za={"data-label":"付款状态"},Ea={"data-label":"操作"},Fa={key:1,class:"empty-state"},Va={key:2,class:"empty-state"},P="applications-list-panel",Ma=J({__name:"Applications",setup(qa){const s=K(),m=O(),F=ea(),r=S(String(F.query.q||"")),u=S("all"),d=S(""),c=S(""),b=S(!!s.reimbursements.length),V=v(()=>m.canEdit("reimbursement.application.create")&&m.canRead("page.application-create")),Q=[{key:"all",label:"全部"},{key:"mine",label:"我发起的"},{key:"approval",label:"审批中"},{key:"returned",label:"退回补充"},{key:"paid",label:"已付款"}],q=l=>{var a,p;return l.applicantName===(((a=m.userInfo)==null?void 0:a.realName)||((p=s.user)==null?void 0:p.realName))},k=(l,a)=>a==="all"||a==="mine"&&q(l)||a==="approval"&&l.approvalStatus==="审批中"||a==="returned"&&l.approvalStatus==="退回"||a==="paid"&&l.paymentStatus==="已付款",j=v(()=>({all:s.reimbursements.length,mine:s.reimbursements.filter(l=>k(l,"mine")).length,approval:s.reimbursements.filter(l=>k(l,"approval")).length,returned:s.reimbursements.filter(l=>k(l,"returned")).length,paid:s.reimbursements.filter(l=>k(l,"paid")).length})),f=v(()=>{const l=r.value.trim().toLowerCase();return s.reimbursements.filter(a=>(!l||`${a.applicationNo} ${a.title} ${a.applicantName} ${a.payeeName}`.toLowerCase().includes(l))&&(!d.value||a.applicationStatus===d.value)&&(!c.value||a.approvalStatus===c.value)&&k(a,u.value))}),{page:$,pageSize:B,paginatedItems:G}=sa(f,{resetSources:[r,u,d,c]});Z(()=>F.query.q,l=>{const a=String(l||"");r.value!==a&&(r.value=a)},{flush:"sync"});const L=v(()=>s.loading||!b.value),U=v(()=>b.value&&s.source==="error"),H=v(()=>b.value&&!!s.error&&!U.value),W=v(()=>!!(r.value.trim()||d.value||c.value||u.value!=="all")),x=async()=>{b.value=!1,await s.load(),b.value=!0},M=()=>{r.value="",d.value="",c.value="",u.value="all"},X=l=>m.canEdit("reimbursement.application.edit")&&m.canRead("page.application-edit")&&q(l)&&(l.applicationStatus==="草稿"||l.approvalStatus==="退回"),Y=l=>`¥ ${Number(l||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,N=l=>({草稿:"draft",已提交:"info",审批中:"pending",审批通过:"success",退回:"danger",待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success",未触发:"neutral"})[l]||"neutral";return aa(async()=>{s.reimbursements.length||await s.load(),b.value=!0}),(l,a)=>{const p=la("router-link");return n(),i("div",oa,[t("div",ia,[a[6]||(a[6]=t("div",null,[t("span",{class:"eyebrow"},"MY EXPENSES"),t("h1",null,"我的报销"),t("p",null,"集中查看报销申请及审批、收单、付款进度。")],-1)),t("div",ra,[t("button",{class:"btn",type:"button",disabled:L.value,onClick:x},"刷新",8,ua),V.value?(n(),w(p,{key:0,class:"btn primary",to:"/applications/new"},{default:_(()=>[...a[5]||(a[5]=[g("+ 发起报销",-1)])]),_:1})):y("",!0)])]),L.value?(n(),i("div",pa,[...a[7]||(a[7]=[t("span",{class:"loader","aria-hidden":"true"},null,-1),t("p",null,"正在加载报销记录…",-1)])])):U.value?(n(),i("div",da,[a[8]||(a[8]=t("strong",null,"报销记录暂时无法加载",-1)),a[9]||(a[9]=t("span",null,"请检查网络连接后重试,系统不会以空列表代替异常数据。",-1)),t("button",{class:"btn",type:"button",onClick:x},"重新加载")])):(n(),i("div",ca,[H.value?(n(),i("div",va,[a[10]||(a[10]=t("b",{"aria-hidden":"true"},"i",-1)),a[11]||(a[11]=t("span",null,"数据服务暂时不可用,当前记录可能不完整。",-1)),t("button",{class:"btn small",type:"button",onClick:x},"重试")])):y("",!0),t("div",ba,[t("div",ya,[(n(),i(T,null,D(Q,e=>t("button",{id:`application-tab-${e.key}`,key:e.key,class:C(["tab",{active:u.value===e.key}]),type:"button",role:"tab","aria-selected":u.value===e.key,"aria-controls":P,onClick:z=>u.value=e.key},[g(o(e.label)+" ",1),t("smalLine truncated
+1
View File
@@ -0,0 +1 @@
import{d as pe,u as Te,R as ue,w as be,o as De,c as a,p as Y,q as Ue,b as e,n as N,F as y,x as i,y as S,M as I,t as n,s as de,v as C,e as v,f as k,P as J,a0 as x,r,B as m,j as o,a1 as xe,A as ye,E as K,C as he,J as Ye}from"./index-DU2fjqYh.js";import{_ as $e,b as $,a as Be}from"./business-config-CDFDGnOE.js";import{_ as Re}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Me={class:"page-content route-list-page prototype-config-page budget-page"},qe={class:"tabs budget-main-tabs",role:"tablist"},Fe={class:"card fill-list-card primary-list-card prototype-config-card"},Pe={class:"prototype-filter-bar"},Oe={class:"prototype-result-count"},Ge={key:0,class:"table-wrap"},we={class:"data-table prototype-table"},ze={class:"prototype-cell-stack"},Je=["disabled","onClick"],Ke={key:1},He={key:1,class:"prototype-empty"},Qe={class:"budget-summary"},We={class:"budget-summary-label"},Xe={class:"available"},Ze={key:0,class:"prototype-governance-note"},et={class:"tabs budget-ledger-tabs"},tt={key:0,class:"card fill-list-card primary-list-card prototype-config-card"},lt={class:"prototype-filter-bar"},st=["value"],nt=["value"],at={class:"prototype-result-count"},ot={key:0,class:"table-wrap"},ut={class:"data-table prototype-table budget-ledger-table"},dt={key:0},it={key:1,class:"amount"},rt={key:2,class:"amount"},ct={key:3,class:"amount"},vt={key:0},pt={class:"prototype-cell-stack"},bt={class:"prototype-cell-stack"},yt={key:1,class:"amount"},mt={key:2,class:"amount"},gt={key:3,class:"amount"},Ct={class:"budget-usage"},ft=["onClick"],Et={key:1},It={key:1,class:"prototype-empty"},At={key:1,class:"card fill-list-card primary-list-card prototype-config-card"},kt={class:"prototype-filter-bar"},_t=["value"],jt={class:"prototype-result-count"},Lt={key:0,class:"table-wrap"},Nt={class:"data-table prototype-table"},St={class:"prototype-cell-stack"},Vt={class:"prototype-cell-stack"},Tt={class:"prototype-cell-stack"},Dt={class:"amount"},Ut={class:"prototype-cell-stack"},xt={key:1,class:"prototype-empty"},ht={class:"modal-head","data-dialog-drag-handle":""},Yt=["disabled"],$t={class:"modal-body"},Bt={key:0,class:"prototype-form-error"},Rt={class:"prototype-form-grid"},Mt={class:"field full"},qt=["disabled"],Ft=["value"],Pt={class:"field full"},Ot=["disabled"],Gt={class:"field full"},wt=["disabled"],zt={class:"modal-actions"},Jt=["disabled"],Kt=["disabled"],Ht={class:"modal-head","data-dialog-drag-handle":""},Qt=["disabled"],Wt={class:"modal-body"},Xt={key:0,class:"prototype-form-error"},Zt={class:"budget-adjust-layout"},el={class:"prototype-form-grid"},tl={class:"field"},ll=["readonly","disabled"],sl={class:"field"},nl=["disabled"],al=["value"],ol={class:"field full"},ul=["disabled"],dl=["value"],il={class:"field"},rl=["disabled"],cl=["value"],vl={class:"field"},pl=["disabled"],bl=["value"],yl={class:"field full"},ml=["disabled"],gl=["value"],Cl={class:"field"},fl=["disabled"],El={class:"field"},Il=["disabled"],Al={class:"field full"},kl=["disabled"],_l={class:"budget-adjust-preview"},jl={class:"result"},Ll={class:"modal-actions"},Nl=["disabled"],Sl=["disabled"],Vl=pe({__name:"BudgetManagement",setup(Tl){const H=pe({props:{loading:Boolean,error:{type:String,default:""}},emits:["retry"],setup(s,{emit:t}){return()=>s.loading?x("div",{class:"prototype-loading"},[x("span",{class:"loader"}),x("span","正在加载预算配置…")]):s.error?x("div",{class:"prototype-error"},[x("span",s.error),x("button",{class:"btn small",onClick:()=>t("retry")},"重试")]):null}}),me=()=>({fiscalYear:new Date().getFullYear(),subjects:[],ledgers:[],adjustments:[],summary:[]}),T=Te(),p=ue(me()),ie=r([]),Q=r([]),B=r([]),j=r("subjects"),D=r("limits"),f=r(!1),A=r(""),d=r(!1),g=r(""),W=r(null),X=r(""),R=r("ALL"),Z=r(""),M=r("ALL"),q=r("ALL"),ee=r(""),F=r("ALL"),P=r("ALL"),O=r(null),G=r(null),_=r(!1),E=ue({parentId:null,name:"",description:""}),u=ue({fiscalYear:new Date().getFullYear(),legalEntityId:null,costCenterId:null,subjectId:null,currencyCode:"CNY",direction:"INCREASE",amount:0,reason:""}),U=r(null),re=m(()=>T.canEdit("ui.budgets.subject-create")&&["parentId","name","description"].every(s=>T.canEdit(`dialog.budgets.subject.${s}`))),ge=m(()=>T.canEdit("ui.budgets.subject-status")),te=m(()=>T.canEdit("ui.budgets.adjust")&&["fiscalYear","legalEntityId","costCenterId","subjectId","currencyCode","direction","amount","reason"].every(s=>T.canEdit(`dialog.budgets.adjust.${s}`))),L=s=>T.canRead(`ui.budgets.column.${s}`),Ce=m(()=>p.subjects.filter(s=>s.level===1)),ce=m(()=>Ce.value.filter(s=>s.status==="ACTIVE")),fe=m(()=>ie.value.filter(s=>s.status==="ACTIVE")),Ee=m(()=>B.value.filter(s=>s.status==="ACTIVE")),Ie=m(()=>Q.value.filter(s=>s.status==="ACTIVE"&&s.legalEntityId===u.legalEntityId)),Ae=m(()=>p.subjects.filter(s=>s.level===2&&s.status==="ACTIVE"&&s.parentId===U.value)),w=(s,t)=>s instanceof Error&&s.message?s.message:t,le=m(()=>{const s=X.value.toLocaleLowerCase();return p.subjects.filter(t=>(R.value==="ALL"||t.status===R.value)&&(!s||[t.code,t.name,t.parentNLine truncated
+1
View File
@@ -0,0 +1 @@
.budget-main-tabs[data-v-82ae16c7],.budget-ledger-tabs[data-v-82ae16c7]{flex:0 0 auto;margin:0 0 16px}.budget-summary[data-v-82ae16c7]{display:grid;width:100%;min-width:0;flex:0 0 auto;gap:10px;margin-bottom:16px}.budget-summary>.prototype-governance-note[data-v-82ae16c7]{margin-bottom:0}.budget-summary-currency[data-v-82ae16c7]{display:grid;grid-template-columns:minmax(120px,.7fr) repeat(4,minmax(120px,1fr));gap:1px;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--line)}.budget-summary-currency>div[data-v-82ae16c7]{padding:14px;background:#fff}.budget-summary-currency span[data-v-82ae16c7],.budget-summary-currency strong[data-v-82ae16c7]{display:block}.budget-summary-currency span[data-v-82ae16c7]{color:var(--muted);font-size:12px}.budget-summary-currency strong[data-v-82ae16c7]{margin-top:5px}.budget-summary-label[data-v-82ae16c7]{background:#f1f6fd!important}.budget-summary-label strong[data-v-82ae16c7]{font-size:18px;color:var(--blue)}.budget-summary-currency .available strong[data-v-82ae16c7]{color:#137a4a}.budget-record-note[data-v-82ae16c7]{display:flex;align-items:center;gap:16px;padding:12px 15px;border-bottom:1px solid var(--line);background:#fffbeb}.budget-record-note span[data-v-82ae16c7]{font-weight:700}.budget-record-note p[data-v-82ae16c7]{margin:0;color:var(--muted)}.budget-usage[data-v-82ae16c7]{margin:0 auto;width:76px;height:6px;overflow:hidden;border-radius:999px;background:#e5e7eb}.budget-usage span[data-v-82ae16c7]{display:block;height:100%;background:var(--blue)}.amount-danger[data-v-82ae16c7]{color:#b42318!important}.budget-adjust-dialog[data-v-82ae16c7]{width:min(1040px,calc(100vw - 32px))}.budget-adjust-layout[data-v-82ae16c7]{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.budget-adjust-preview[data-v-82ae16c7]{display:grid;align-content:start;gap:0;border:1px solid var(--line);border-radius:var(--radius);background:#f8fafc}.budget-adjust-preview h3[data-v-82ae16c7]{margin:0;padding:15px;border-bottom:1px solid var(--line)}.budget-adjust-preview>div[data-v-82ae16c7]{display:flex;justify-content:space-between;gap:10px;padding:12px 15px}.budget-adjust-preview .result[data-v-82ae16c7]{border-block:1px solid var(--line);background:#fff}.budget-adjust-preview p[data-v-82ae16c7]{margin:0;padding:14px;color:var(--muted);font-size:12px}@media (max-width: 900px){.budget-summary-currency[data-v-82ae16c7]{grid-template-columns:repeat(2,minmax(0,1fr))}.budget-summary-label[data-v-82ae16c7]{grid-column:1/-1}.budget-adjust-layout[data-v-82ae16c7]{grid-template-columns:1fr}}@media (max-width: 560px){.budget-summary-currency[data-v-82ae16c7]{grid-template-columns:1fr}.budget-summary-label[data-v-82ae16c7]{grid-column:auto}.budget-record-note[data-v-82ae16c7]{align-items:flex-start;flex-direction:column;gap:4px}}
+1
View File
@@ -0,0 +1 @@
import{d as X,u as Y,o as Z,c as a,p as j,q as ee,b as t,x as y,y as z,M as A,F as T,v as V,t as o,e as i,P as U,f as R,r as d,R as te,B as h,j as n,n as le,A as P,E as q,C as se,J as ae}from"./index-DU2fjqYh.js";import{_ as ne,b as N,a as oe}from"./business-config-CDFDGnOE.js";const ie={class:"page-content route-list-page prototype-config-page"},de={class:"card fill-list-card primary-list-card prototype-config-card"},ue={class:"prototype-filter-bar"},re=["value"],ce={class:"prototype-result-count"},ve={key:0,class:"prototype-loading"},pe={key:1,class:"prototype-error"},ye={key:2,class:"table-wrap",tabindex:"0"},ge={class:"data-table prototype-table"},me={key:0},be={key:1},_e={key:2},Ce={key:3},fe={key:4},Ee={key:0},ke={key:1},Ie={key:2},Ae={key:3},Te={key:4},Ve={class:"prototype-row-actions"},he=["onClick"],Ne=["disabled","onClick"],Le={key:3,class:"prototype-empty"},Se={class:"modal-head","data-dialog-drag-handle":""},xe=["disabled"],$e={class:"modal-body"},De={key:0,class:"prototype-form-error"},Me={class:"prototype-form-grid"},Oe={class:"field full"},Ue=["disabled"],Re={class:"field"},qe=["disabled"],Be=["value"],Fe={class:"field"},we=["disabled"],je=["value"],ze={class:"modal-actions"},Pe=["disabled"],Je=["disabled"],Ge={class:"app-dialog__panel"},He={class:"modal-head","data-dialog-drag-handle":""},Ke={class:"modal-body"},Qe={key:0,class:"prototype-spec-grid"},We={class:"modal-actions"},et=X({__name:"CostCenters",setup(Xe){const C=Y(),b=d([]),L=d([]),B=d([]),S=d(""),f=d("ALL"),E=d("ALL"),x=d(!1),k=d(""),r=d(!1),m=d(""),$=d(null),I=d(null),_=d(null),g=d(null),u=te({name:"",legalEntityId:null,managerOpenId:""}),F=h(()=>C.canEdit("ui.cost-centers.create")&&["name","legalEntityId","managerName"].every(s=>C.canEdit(`dialog.cost-centers.create.${s}`))),J=h(()=>C.canEdit("ui.cost-centers.deactivate")),c=s=>C.canRead(`ui.cost-centers.column.${s}`),G=h(()=>L.value.filter(s=>s.status==="ACTIVE")),D=(s,e)=>s instanceof Error&&s.message?s.message:e,M=h(()=>{const s=S.value.toLocaleLowerCase();return b.value.filter(e=>(E.value==="ALL"||e.status===E.value)&&(f.value==="ALL"||String(e.legalEntityId)===f.value)&&(!s||[e.code,e.name,e.managerName,e.legalEntityName].some(v=>String(v||"").toLocaleLowerCase().includes(s)))).sort((e,v)=>e.code.localeCompare(v.code,"zh-CN"))}),w=async()=>{x.value=!0,k.value="";try{const[s,e]=await Promise.all([N.costCenters(),N.references()]);b.value=s,L.value=e.legalEntities||[],B.value=e.employees||[]}catch(s){k.value=D(s,"成本中心加载失败")}finally{x.value=!1}},H=async()=>{var s;Object.assign(u,{name:"",legalEntityId:null,managerOpenId:""}),m.value="",await P(),(s=I.value)==null||s.showModal()},O=()=>{var s;r.value||(s=I.value)==null||s.close()},K=async()=>{var s;if(m.value="",!u.name||!u.legalEntityId||!u.managerOpenId)return void(m.value="请完整填写成本中心名称、法人主体和负责人");r.value=!0;try{const e=await N.create("cost-centers",{...u});b.value.push(e),(s=I.value)==null||s.close(),q.success("成本中心已创建")}catch(e){m.value=D(e,"保存失败,请稍后重试")}finally{r.value=!1}},Q=async s=>{var e;g.value=s,await P(),(e=_.value)==null||e.showModal()},W=async s=>{const e=s.status==="ACTIVE"?"INACTIVE":"ACTIVE";try{await se.confirm(`确认${e==="ACTIVE"?"启用":"停用"}“${s.name}”?`,"状态确认",{type:"warning"})}catch{return}$.value=s.id;try{const v=await N.changeStatus("cost-centers",s.id,e);b.value.splice(b.value.findIndex(l=>l.id===s.id),1,v),q.success(`成本中心已${e==="ACTIVE"?"启用":"停用"}`)}catch(v){q.error(D(v,"状态更新失败"))}finally{$.value=null}};return Z(()=>{w()}),(s,e)=>{const v=ae("dialog-drag");return n(),a("div",ie,[j(ne,{eyebrow:"FINANCIAL MASTER DATA",title:"成本中心",description:"按法人主体维护费用承担组织和负责人,供申请、预算与财务处理统一引用。"},{default:ee(()=>[F.value?(n(),a("button",{key:0,class:"btn primary",type:"button",onClick:H}," + 新增成本中心 ")):i("",!0)]),_:1}),e[27]||(e[27]=t("div",{class:"prototype-governance-note"},[t("strong",null,"归属约束"),t("span",null,"每个成本中心必须归属于一个启用中的法人主体;存在有效预算台账时不能停用。")],-1)),t("section",de,[t("div",ue,[y(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>S.value=l),type:"search",placeholder:"搜索编码、名称或负责人"},null,512),[[z,S.value,void 0,{trim:!0}]]),y(t("select",{"onUpdate:modelValue":e[1]||(e[1]=l=>f.value=l)},[e[9]||(e[9]=t("option",{value:"ALL"},"全部法人主体",-1)),(n(!0),a(T,null,V(L.value,l=>(n(),a("option",{key:l.id,value:String(l.id)},o(l.name),9,re))),128))],512),[[A,f.value]]),y(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>E.value=l)},[...e[10]||(e[10]=[t("option",{value:"ALL"},"全部状态",-1),t("option",{value:"ACTIVE"},"启用",-1),t("option",{value:"INACTIVE"},"停用",-1)])],512),[[A,E.value]]),e[11]||(e[11]=t("span",{class:"prototype-filter-spacer"},null,-1)),t("span",ce,"共 "+o(M.value.leLine truncated
+1
View File
@@ -0,0 +1 @@
import{d as C,u as L,o as V,c as o,p as b,b as e,x as _,y as E,M as g,t as i,e as n,F as A,v as P,r as u,B as S,j as a}from"./index-DU2fjqYh.js";import{b as w,a as x,_ as N}from"./business-config-CDFDGnOE.js";const B={class:"page-content route-list-page prototype-config-page"},I={class:"card fill-list-card primary-list-card prototype-config-card"},U={class:"prototype-filter-bar"},M={class:"prototype-result-count"},R={key:0,class:"prototype-loading"},T={key:1,class:"prototype-error"},$={key:2,class:"table-wrap",tabindex:"0"},j={class:"data-table prototype-table"},D={key:0},F={key:1},q={key:2},z={key:3},G={key:4},H={key:0},J={key:1},K={key:2},O={key:3},Q={key:4},W={key:3,class:"prototype-empty"},ee=C({__name:"Currencies",setup(X){const k=L(),f=u([]),v=u(""),d=u("ALL"),c=u("code"),m=u(!1),p=u(""),l=r=>k.canRead(`ui.currencies.column.${r}`),y=S(()=>{const r=v.value.toLocaleLowerCase();return f.value.filter(t=>(d.value==="ALL"||t.status===d.value)&&(!r||[t.code,t.name].some(s=>s.toLocaleLowerCase().includes(r)))).sort((t,s)=>c.value==="decimalPlaces"?t.decimalPlaces-s.decimalPlaces:String(t[c.value]).localeCompare(String(s[c.value]),"zh-CN"))}),h=async()=>{m.value=!0,p.value="";try{f.value=await w.currencies()}catch(r){p.value=r instanceof Error&&r.message?r.message:"币种加载失败"}finally{m.value=!1}};return V(()=>{h()}),(r,t)=>(a(),o("div",B,[b(N,{eyebrow:"CURRENCIES",title:"币种",description:"系统只保存原币标识和显示信息;预算、申请及导出按币种分组。"}),t[7]||(t[7]=e("div",{class:"prototype-exchange-card"},[e("div",null,[e("strong",null,"汇率"),e("span",null,"平台保留原币,不内置汇率;需要换算时以实际业务规则和外部牌价为准。")]),e("a",{class:"btn",href:"https://www.boc.cn/sourcedb/whpj/",target:"_blank",rel:"noreferrer"},"查看中国银行牌价 ↗")],-1)),e("section",I,[e("div",U,[_(e("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>v.value=s),type:"search",placeholder:"搜索币种代码或中文名称"},null,512),[[E,v.value,void 0,{trim:!0}]]),_(e("select",{"onUpdate:modelValue":t[1]||(t[1]=s=>d.value=s)},[...t[3]||(t[3]=[e("option",{value:"ALL"},"全部状态",-1),e("option",{value:"ACTIVE"},"启用",-1),e("option",{value:"INACTIVE"},"停用",-1)])],512),[[g,d.value]]),_(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>c.value=s)},[...t[4]||(t[4]=[e("option",{value:"code"},"币种代码升序",-1),e("option",{value:"name"},"中文名称升序",-1),e("option",{value:"decimalPlaces"},"小数位升序",-1)])],512),[[g,c.value]]),t[5]||(t[5]=e("span",{class:"prototype-filter-spacer"},null,-1)),e("span",M,"共 "+i(y.value.length)+" 种币种",1)]),m.value?(a(),o("div",R,[...t[6]||(t[6]=[e("span",{class:"loader"},null,-1),e("span",null,"正在加载币种…",-1)])])):p.value?(a(),o("div",T,[e("span",null,i(p.value),1),e("button",{class:"btn small",onClick:h},"重试")])):y.value.length?(a(),o("div",$,[e("table",j,[e("thead",null,[e("tr",null,[l("code")?(a(),o("th",D,"币种代码")):n("",!0),l("name")?(a(),o("th",F,"中文名称")):n("",!0),l("symbol")?(a(),o("th",q,"货币符号")):n("",!0),l("decimalPlaces")?(a(),o("th",z,"小数位")):n("",!0),l("status")?(a(),o("th",G,"状态")):n("",!0)])]),e("tbody",null,[(a(!0),o(A,null,P(y.value,s=>(a(),o("tr",{key:s.id},[l("code")?(a(),o("td",H,[e("strong",null,i(s.code),1)])):n("",!0),l("name")?(a(),o("td",J,i(s.name),1)):n("",!0),l("symbol")?(a(),o("td",K,i(s.symbol),1)):n("",!0),l("decimalPlaces")?(a(),o("td",O,i(s.decimalPlaces),1)):n("",!0),l("status")?(a(),o("td",Q,[b(x,{active:s.status==="ACTIVE","active-label":"预置启用"},null,8,["active"])])):n("",!0)]))),128))])])])):(a(),o("div",W,"没有符合当前筛选条件的币种。"))])]))}});export{ee as default};
-1
View File
@@ -1 +0,0 @@
import{d as Z,u as tt,a as lt,o as st,w as nt,c as o,b as t,t as s,F as y,m as v,p as D,e as b,l as p,k as u,f as d,n as w,x as C,r as I,y as r,B as m,j as e}from"./index-CXCTlxVW.js";const at={class:"dashboard-page"},et={class:"page-head"},ot={class:"eyebrow"},it={key:0},ut={key:1},dt={class:"head-actions"},rt=["disabled"],ct={key:0,class:"load-wrap",role:"status","aria-live":"polite"},pt={key:1,class:"card dashboard-error",role:"alert"},vt={class:"welcome-panel"},gt={key:0},bt={key:1},_t={key:0,class:"metrics"},yt={class:"metric warn"},mt={class:"metric"},ft={class:"metric"},ht={class:"metric success"},kt={key:1,class:"metrics finance-dashboard-metrics"},wt={class:"metric warn"},St={class:"metric"},At={class:"metric success"},Nt={class:"metric"},Ct={key:2,class:"grid two"},Ft={class:"card fill-list-card"},Et={class:"card-head"},Qt={class:"tag danger"},Rt={class:"card-body task-list fill-card-body"},Dt={class:"task-icon danger-icon","aria-hidden":"true"},$t={key:0,class:"empty-state"},xt={class:"card fill-list-card"},Bt={class:"card-body task-list fill-card-body"},Tt={class:"finance-line"},Wt={class:"flow-badge","aria-hidden":"true"},Pt={class:"finance-line"},Vt={class:"flow-badge payment-badge","aria-hidden":"true"},Lt={key:0,class:"empty-state compact-empty"},Mt={key:3,class:"grid two"},jt={class:"card fill-list-card"},zt={class:"card-head"},qt={class:"tag pending"},It={class:"card-body task-list fill-card-body"},Ut={class:"flow-badge receipt-badge","aria-hidden":"true"},Yt={key:0,class:"empty-state"},Gt={class:"card fill-list-card"},Ht={class:"card-head"},Jt={class:"tag info"},Kt={class:"card-body task-list fill-card-body"},Ot={class:"flow-badge payment-badge","aria-hidden":"true"},Xt={key:0,class:"empty-state"},Zt={key:4,class:"card section-gap"},tl={class:"card-head"},ll={class:"card-body"},sl={class:"table-wrap"},nl={key:0,class:"data-table responsive-table"},al={"data-label":"报销单号"},el={"data-label":"报销人 / 事项"},ol={"data-label":"申请金额",class:"amount"},il={"data-label":"收单状态"},ul={class:"tag success"},dl={"data-label":"付款状态"},rl={"data-label":"未付余额",class:"amount"},cl={"data-label":"操作"},pl={key:0,class:"empty-state"},vl={key:5,class:"card section-gap"},gl={class:"card-head"},bl={class:"card-body"},_l={class:"table-wrap"},yl={key:0,class:"data-table responsive-table"},ml={"data-label":"报销单号"},fl={"data-label":"报销事项"},hl={"data-label":"报销金额",class:"amount"},kl={"data-label":"申请状态"},wl={"data-label":"审批状态"},Sl={"data-label":"收单状态"},Al={"data-label":"付款状态"},Nl={"data-label":"操作"},Cl={key:0,class:"empty-state"},Ql=Z({__name:"Dashboard",setup(Fl){const f=tt(),i=lt(),F=I(!1),E=I(""),$=r(()=>{var a,l;return((a=f.userInfo)==null?void 0:a.realName)||((l=i.user)==null?void 0:l.realName)||"用户"}),g=r(()=>f.canAny(["page.finance-receipt","page.source-documents","page.payments","page.operation-log"])),h=r(()=>g.value?i.reimbursements:i.reimbursements.filter(a=>a.applicantName===$.value)),S=r(()=>h.value.filter(a=>a.approvalStatus==="退回")),x=r(()=>h.value.filter(a=>a.approvalStatus==="审批中")),Q=r(()=>i.reimbursements.filter(a=>a.approvalStatus==="审批通过"&&a.receiptStatus==="待收单")),k=r(()=>i.reimbursements.filter(a=>a.receiptStatus==="已收单")),A=r(()=>k.value.filter(a=>i.balance(a)>0)),R=r(()=>h.value.filter(a=>a.receiptStatus==="已收单"&&i.balance(a)>0)),P=r(()=>R.value.reduce((a,l)=>a+i.balance(l),0)),U=r(()=>A.value.reduce((a,l)=>a+i.balance(l),0)),Y=r(()=>k.value.reduce((a,l)=>a+l.totalAmount,0)),G=r(()=>{const a=new Date;return`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`}),V=r(()=>h.value.filter(a=>String(a.createdAt||a.submitTime).slice(0,7)===G.value)),H=r(()=>V.value.reduce((a,l)=>a+l.totalAmount,0)),J=r(()=>V.value.length),K=r(()=>i.source==="fallback"?"服务暂不可用,当前展示缓存数据":i.error?"同步需要关注,请稍后重试":i.source==="api"?"业务数据已更新":"正在同步业务数据"),_=a=>`¥ ${Number(a||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,L=a=>(a==null?void 0:a.slice(0,16))||"-",N=a=>({草稿:"draft",已提交:"info",审批中:"pending",审批通过:"success",退回:"danger",待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success",未触发:"neutral",已取消:"neutral"})[a]||"neutral",B=async()=>{if(E.value="",!g.value){(!i.reimbursements.length||i.source==="error")&&await i.load();return}F.value=!0,i.financeQueueError="";try{const a=[];await i.loadFinanceQueue("receipt"),i.financeQueueError&&a.push(i.financeQueueError),await i.loadFinanceQueue("payment"),i.financeQueueError&&!a.includes(i.financeQueueError)&&a.push(i.financeQueueError),E.value=a.join(";")}finally{F.value=!1}},M=()=>{B()};return st(async()=>{await B()}),nt(g,()=>{B()}),(a,l)=>{const c=m("router-link"),O=m("Plus"),T=m("Refresh"),j=m("WarningFilled"),W=m("CircleCheckFilled"),z=m("Wallet"Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as f,u as x,o as E,c as s,b as e,e as n,F as S,v as C,s as _,t as p,G as z,N as k,r as m,L as w,j as t,n as B}from"./index-DU2fjqYh.js";import{_ as N}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{u as L}from"./useListPagination-j0ff6aFk.js";const P={class:"page-content route-list-page"},R={class:"card fill-list-card primary-list-card"},T={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"费用类型列表"},U={class:"data-table responsive-table"},V={key:0},F={key:1},I={key:2},j={key:3},A={key:0,"data-label":"编码"},D={key:1,"data-label":"名称"},G={key:2,"data-label":"分类"},M={class:"tag"},X={key:3,"data-label":"状态"},Y={key:1,class:"empty-state",role:"alert"},$={key:2,class:"empty-state"},q={key:3,class:"load-wrap",role:"status"},Q=f({__name:"ExpenseTypes",setup(H){const g=x(),o=u=>g.canRead(u),b=u=>g.canEdit(u),i=m([]),d=m(!1),r=m(""),{page:c,pageSize:y,paginatedItems:h}=L(i),v=async()=>{d.value=!1,r.value="";try{i.value=await w.get("/metadata/expense-types")||[]}catch(u){r.value=u instanceof Error?u.message:"请求失败,请稍后重试。"}finally{d.value=!0}};return E(v),(u,a)=>(t(),s("div",P,[a[5]||(a[5]=e("div",{class:"page-head"},[e("div",null,[e("span",{class:"eyebrow"},"EXPENSE TYPES"),e("h1",null,"费用类型"),e("p",null,"管理费用类型分类。")])],-1)),e("div",R,[d.value&&!r.value&&i.value.length>0?(t(),s("div",T,[e("table",U,[e("thead",null,[e("tr",null,[o("ui.expense-types.column.code")?(t(),s("th",V,"编码")):n("",!0),o("ui.expense-types.column.name")?(t(),s("th",F,"名称")):n("",!0),o("ui.expense-types.column.category")?(t(),s("th",I,"分类")):n("",!0),o("ui.expense-types.column.status")?(t(),s("th",j,"状态")):n("",!0)])]),e("tbody",null,[(t(!0),s(S,null,C(_(h),l=>(t(),s("tr",{key:l.id},[o("ui.expense-types.column.code")?(t(),s("td",A,[e("small",null,p(l.code),1)])):n("",!0),o("ui.expense-types.column.name")?(t(),s("td",D,[e("strong",null,p(l.name),1)])):n("",!0),o("ui.expense-types.column.category")?(t(),s("td",G,[e("span",M,p(l.category),1)])):n("",!0),o("ui.expense-types.column.status")?(t(),s("td",X,[e("span",{class:B(["tag",l.status==="ACTIVE"?"success":"draft"])},p(l.status),3)])):n("",!0)]))),128))])])])):r.value?(t(),s("div",Y,[a[2]||(a[2]=e("strong",null,"费用类型加载失败",-1)),e("span",null,p(r.value),1),b("ui.expense-types.reload")?(t(),s("button",{key:0,class:"btn small",type:"button",onClick:v},"重试")):n("",!0)])):d.value?(t(),s("div",$,[...a[3]||(a[3]=[e("strong",null,"暂无费用类型",-1)])])):(t(),s("div",q,[...a[4]||(a[4]=[e("span",{class:"loader","aria-hidden":"true"},null,-1),e("span",null,"正在加载费用类型…",-1)])])),d.value&&!r.value&&i.value.length?(t(),z(N,{key:4,page:_(c),"onUpdate:page":a[0]||(a[0]=l=>k(c)?c.value=l:null),"page-size":_(y),"onUpdate:pageSize":a[1]||(a[1]=l=>k(y)?y.value=l:null),total:i.value.length,"aria-label":"费用类型列表分页"},null,8,["page","page-size","total"])):n("",!0)])]))}});export{Q as default};
-1
View File
@@ -1 +0,0 @@
import{d as y,o as b,c as l,b as a,F as f,x as h,m as c,t as u,p as k,H as _,e as E,r as g,M as x,j as t,n as C}from"./index-CXCTlxVW.js";import{u as z,_ as S}from"./useListPagination-BTBVezsP.js";const w={class:"page-content route-list-page"},B={class:"card fill-list-card primary-list-card"},N={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"费用类型列表"},P={class:"data-table responsive-table"},T={"data-label":"编码"},V={"data-label":"名称"},F={"data-label":"分类"},I={class:"tag"},L={"data-label":"状态"},M={key:1,class:"empty-state",role:"alert"},U={key:2,class:"empty-state"},j={key:3,class:"load-wrap",role:"status"},R=y({__name:"ExpenseTypes",setup(A){const o=g([]),r=g(!1),n=g(""),{page:d,pageSize:i,paginatedItems:m}=z(o),v=async()=>{r.value=!1,n.value="";try{o.value=await x.get("/metadata/expense-types")||[]}catch(p){n.value=p instanceof Error?p.message:"请求失败,请稍后重试。"}finally{r.value=!0}};return b(v),(p,e)=>(t(),l("div",w,[e[6]||(e[6]=a("div",{class:"page-head"},[a("div",null,[a("span",{class:"eyebrow"},"EXPENSE TYPES"),a("h1",null,"费用类型"),a("p",null,"管理费用类型分类。")])],-1)),a("div",B,[r.value&&!n.value&&o.value.length>0?(t(),l("div",N,[a("table",P,[e[2]||(e[2]=a("thead",null,[a("tr",null,[a("th",null,"编码"),a("th",null,"名称"),a("th",null,"分类"),a("th",null,"状态")])],-1)),a("tbody",null,[(t(!0),l(f,null,h(c(m),s=>(t(),l("tr",{key:s.id},[a("td",T,[a("small",null,u(s.code),1)]),a("td",V,[a("strong",null,u(s.name),1)]),a("td",F,[a("span",I,u(s.category),1)]),a("td",L,[a("span",{class:C(["tag",s.status==="ACTIVE"?"success":"draft"])},u(s.status),3)])]))),128))])])])):n.value?(t(),l("div",M,[e[3]||(e[3]=a("strong",null,"费用类型加载失败",-1)),a("span",null,u(n.value),1),a("button",{class:"btn small",type:"button",onClick:v},"重试")])):r.value?(t(),l("div",U,[...e[4]||(e[4]=[a("strong",null,"暂无费用类型",-1)])])):(t(),l("div",j,[...e[5]||(e[5]=[a("span",{class:"loader","aria-hidden":"true"},null,-1),a("span",null,"正在加载费用类型…",-1)])])),r.value&&!n.value&&o.value.length?(t(),k(S,{key:4,page:c(d),"onUpdate:page":e[0]||(e[0]=s=>_(d)?d.value=s:null),"page-size":c(i),"onUpdate:pageSize":e[1]||(e[1]=s=>_(i)?i.value=s:null),total:o.value.length,"aria-label":"费用类型列表分页"},null,8,["page","page-size","total"])):E("",!0)])]))}});export{R as default};
+1
View File
@@ -0,0 +1 @@
import{d as Ne,a as Ce,k as Ee,u as Pe,o as Be,D as Re,J as Fe,j as l,c as n,b as e,p as ge,q as se,f as I,s as p,t as s,e as d,F as E,x as ee,y as oe,v as ve,O as P,n as Z,T as be,G as X,N as te,P as Se,B as v,r as f,U as we,A as De,V as fe,E as ie,C as Ve,w as qe,h as Ue,g as Le}from"./index-DU2fjqYh.js";import{_ as _e}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{u as ke}from"./useListPagination-j0ff6aFk.js";import{_ as xe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ie={class:"page-content route-list-page finance-queue-page"},Qe={class:"page-head"},Me={class:"head-actions"},je=["disabled"],Oe={key:0,class:"inline-alert danger",role:"alert"},Ge={key:1,class:"inline-alert",role:"status"},Ke={key:2,class:"load-wrap",role:"status","aria-live":"polite"},We={key:3,class:"card empty-state",role:"alert"},Ye={key:0,class:"inline-alert",role:"status","aria-live":"polite"},He={class:"finance-kpis finance-queue-kpis"},Je={class:"card fill-list-card primary-list-card"},Ze={class:"filter-bar finance-queue-filter"},Xe={class:"filter-search finance-queue-search"},et={class:"tag info finance-result-count","aria-live":"polite"},tt={key:0,class:"table-wrap finance-table-wrap"},at={class:"data-table responsive-table","aria-label":"付款登记队列"},lt={key:0,scope:"col"},nt={"data-label":"报销单号"},st={key:0,"data-label":"报销人 / 收款人"},ot={key:0},it={key:1},ut={key:0,"data-label":"申请金额",class:"amount"},rt={key:1,"data-label":"申请金额",class:"amount muted-copy"},dt={"data-label":"累计已付",class:"amount"},ct={"data-label":"未付余额",class:"amount"},pt={"data-label":"收单状态"},vt={class:"tag success"},yt={"data-label":"付款状态"},mt={"data-label":"操作"},bt={class:"finance-row-actions"},gt=["disabled","aria-busy","onClick"],ft={key:1,class:"muted-copy"},_t={key:2,class:"muted-copy"},kt={key:3,class:"muted-copy"},ht={key:1,class:"empty-state"},$t={key:2,class:"empty-state"},St={class:"card fill-list-card section-gap"},wt={class:"card-head"},Nt={class:"tag pending"},Ct={key:0,class:"table-wrap finance-table-wrap"},Et={class:"data-table responsive-table","aria-label":"付款复核队列"},Pt={"data-label":"付款单号"},Rt={key:0},xt={"data-label":"付款金额",class:"amount"},At={"data-label":"登记人"},zt={key:0},Tt={key:1,class:"muted-copy"},Bt={"data-label":"状态"},Ft={class:"tag pending"},Dt={"data-label":"操作"},Vt={class:"finance-row-actions"},qt=["disabled","onClick"],Ut=["disabled","onClick"],Lt={key:2,class:"muted-copy"},It={key:1,class:"empty-state"},Qt={class:"modal-head","data-dialog-drag-handle":""},Mt={id:"payment-dialog-description"},jt=["disabled"],Ot={class:"modal-body payment-dialog-body"},Gt={class:"payment-summary"},Kt={class:"form-grid payment-fields"},Wt={key:0,class:"field"},Yt=["max","aria-invalid","disabled"],Ht={id:"pay-amount-help",class:"form-help"},Jt={key:1,class:"field full"},Zt=["disabled"],Xt={key:0,id:"payment-form-error",class:"amount-error",role:"alert"},ea={class:"modal-actions"},ta=["disabled"],aa=["disabled","aria-busy"],la=Ne({__name:"Payments",setup(Ae){const c=Ce(),h=Ee(),T=Pe(),y=o=>T.canRead(o),Q=o=>T.canEdit(o),R=v(()=>y("dialog.payment.register")&&Q("dialog.payment.register.submit")&&h.can("finance.payment:register")),B=v(()=>R.value&&Q("dialog.payment.register.amount")),x=v(()=>T.canEdit("finance.payment.verify")&&h.can("finance.payment:review")),g=v(()=>T.canEdit("finance.payment.reject")&&h.can("finance.payment:reject")),F=f(""),S=f(!1),m=f(null),_=f(null),D=f(0),V=f(""),ue=f(""),b=f(!1),w=f(new Set),$=f("");let q=null;const N=v(()=>c.reimbursements.filter(o=>o.receiptStatus==="已收单")),A=v(()=>N.value.filter(o=>c.balance(o)>0)),U=v(()=>N.value.filter(o=>c.balance(o)<=0)),W=v(()=>c.payments.filter(o=>o.paymentStatus==="待复核"||o.paymentStatus==="PENDING_REVIEW")),ye=v(()=>A.value.reduce((o,t)=>o+c.balance(t),0)),M=v(()=>{const o=F.value.trim().toLowerCase();return N.value.filter(t=>`${t.applicationNo} ${t.applicantName} ${t.title} ${t.payeeName}`.toLowerCase().includes(o))}),{page:z,pageSize:j,paginatedItems:ae}=ke(M,{resetSources:[F]}),re=v(()=>c.loading||!S.value),Y=v(()=>S.value&&(c.source==="error"||!!c.financeQueueError)),le=v(()=>S.value&&!!c.error&&!Y.value),k=o=>`¥ ${Number(o||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,ne=o=>({未付款:"neutral",部分付款:"info",已付款:"success"})[o]||"neutral",H=o=>we(o,"verify",x.value),J=o=>we(o,"reject",g.value),L=async()=>{S.value=!1,c.error="",c.financeQueueError="",await c.loadFinanceQueue("payment"),S.value=!0},O=async o=>{var t;!be(o,R.value)||b.value||(q=document.activeElement instanceof HTMLElement?document.activeElement:null,m.value=o,D.value=Number(c.balance(o).toFixed(2)),V.value="",ue.value=`reim-${o.id}-${Number(c.balance(o).toFixed(2)).toFixed(2)}`,$.value="",_.value&&(_.value.open||_.value.showModal(),await De(),(t=document.getElementById("pay-amount"))==null||t.focus()))},de=()=>{const o=q;q=Line truncated
+1
View File
@@ -0,0 +1 @@
.payment-dialog-body[data-v-563bf878]{background:#fff;container-name:payment-dialog-body;container-type:inline-size}.payment-summary[data-v-563bf878]{overflow:hidden;border-color:#d7e0e8;border-radius:6px}.payment-summary>div[data-v-563bf878]{padding:12px 14px;background:var(--surface-raised)}.payment-summary>div[data-v-563bf878]:last-child{background:var(--blue-soft)}.payment-summary strong[data-v-563bf878]{color:var(--navy);font-size:15px}.payment-summary>div:last-child strong[data-v-563bf878]{color:var(--blue-dark)}.payment-fields[data-v-563bf878]{grid-template-columns:1fr;gap:14px;padding:15px 0 0}.payment-fields .field>label[data-v-563bf878]{display:flex;min-height:2.8em;align-items:flex-end;line-height:1.4}.payment-fields[data-v-563bf878] :is(input,textarea){width:100%;min-width:0;box-sizing:border-box}.payment-fields textarea[data-v-563bf878]{min-height:78px}.amount-error[data-v-563bf878]{margin:12px 0 0;padding:9px 11px;border-left:3px solid var(--danger);background:var(--danger-soft)}@container payment-dialog-body (max-width: 480px){.payment-fields .field>label[data-v-563bf878]{min-height:0}}@media (max-width: 560px){.payment-dialog .modal-actions[data-v-563bf878]{flex-direction:column-reverse}.payment-dialog .modal-actions .btn[data-v-563bf878]{width:100%;min-height:44px}}.finance-operations-tabs[data-v-7e8f73a7]{flex-wrap:wrap}.finance-payment-panel[data-v-7e8f73a7] .page-content{padding:0;min-height:0}.finance-payment-panel[data-v-7e8f73a7] .page-head,.finance-payment-panel[data-v-7e8f73a7] .head-actions .router-link-active,.finance-payment-panel[data-v-7e8f73a7] .head-actions a{display:none}
-1
View File
@@ -1 +0,0 @@
import{d as P,a as j,u as H,o as K,c as n,b as t,k as $,l as x,F as z,e as F,t as o,q as W,v as G,x as J,m as k,p as O,H as L,r as _,y as r,B as X,j as a,f as Q,n as V,E as A}from"./index-CXCTlxVW.js";import{u as Y,_ as Z}from"./useListPagination-BTBVezsP.js";const tt={class:"page-content route-list-page"},st={class:"page-head"},et={class:"head-actions"},lt=["disabled"],at={key:0,class:"load-wrap",role:"status","aria-live":"polite"},nt={key:1,class:"card empty-state",role:"alert"},ot={key:0,class:"inline-alert",role:"status","aria-live":"polite"},it={class:"finance-kpis"},rt={class:"card fill-list-card primary-list-card"},ut={class:"filter-bar"},dt={class:"filter-search"},pt={class:"tag info","aria-live":"polite"},ct={key:0,class:"table-wrap"},vt={class:"data-table responsive-table","aria-label":"财务收单队列"},gt={"data-label":"报销单号"},yt={"data-label":"报销人 / 事项"},bt={"data-label":"申请金额",class:"amount"},ft={"data-label":"审批状态"},mt={class:"tag success"},kt={"data-label":"收单状态"},_t={"data-label":"付款状态"},St={"data-label":"操作"},ht=["disabled","aria-busy","onClick"],Ct={key:1,class:"muted-copy"},Nt={key:2,class:"muted-copy"},wt={key:3,class:"muted-copy"},Et={key:1,class:"empty-state"},Bt={key:2,class:"empty-state"},Lt=P({__name:"FinanceReceipt",setup($t){const i=j(),D=H(),S=r(()=>D.canEdit("finance.receipt.confirm")),g=_(""),p=_(!1),d=_(new Set),c=r(()=>i.reimbursements.filter(l=>l.approvalStatus==="审批通过")),R=r(()=>c.value.filter(l=>l.receiptStatus==="待收单")),U=r(()=>c.value.filter(l=>l.receiptStatus==="已收单")),I=r(()=>c.value.reduce((l,s)=>l+s.totalAmount,0)),v=r(()=>{const l=g.value.trim().toLowerCase();return c.value.filter(s=>`${s.applicationNo} ${s.applicantName} ${s.title}`.toLowerCase().includes(l))}),{page:b,pageSize:f,paginatedItems:M}=Y(v,{resetSources:[g]}),h=r(()=>i.loading||!p.value),C=r(()=>p.value&&(i.source==="error"||!!i.financeQueueError)),T=r(()=>p.value&&!!i.error&&!C.value),N=l=>`¥ ${Number(l||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,w=l=>({待收单:"pending",已收单:"success",未付款:"neutral",部分付款:"info",已付款:"success"})[l]||"neutral",E=l=>String(l),m=l=>d.value.has(E(l)),y=async()=>{p.value=!1,i.error="",i.financeQueueError="",await i.loadFinanceQueue("receipt"),p.value=!0},q=async l=>{if(!S.value)return;const s=E(l.id);if(!d.value.has(s)){d.value=new Set(d.value).add(s);try{await i.receive(l.id),A.success(`${l.applicationNo} 已完成财务收单`)}catch(u){A.error(u instanceof Error?u.message:"收单失败,请重试")}finally{const u=new Set(d.value);u.delete(s),d.value=u}}};return K(()=>{y()}),(l,s)=>{const u=X("router-link");return a(),n("div",tt,[t("div",st,[s[4]||(s[4]=t("div",null,[t("span",{class:"eyebrow"},"FINANCE RECEIPT"),t("h1",null,"财务待收单"),t("p",null,"审批通过的报销进入收单队列,财务处理结果独立记录。")],-1)),t("div",et,[t("button",{class:"btn",type:"button",disabled:h.value,onClick:y},"刷新",8,lt),$(u,{class:"btn primary",to:"/payments"},{default:x(()=>[...s[3]||(s[3]=[Q("查看待付款",-1)])]),_:1})])]),h.value?(a(),n("div",at,[...s[5]||(s[5]=[t("span",{class:"loader","aria-hidden":"true"},null,-1),t("p",null,"正在读取收单队列…",-1)])])):C.value?(a(),n("div",nt,[s[6]||(s[6]=t("strong",null,"收单队列暂时无法加载",-1)),s[7]||(s[7]=t("span",null,"请检查网络连接后重试,系统不会以空列表代替异常数据。",-1)),t("button",{class:"btn",type:"button",onClick:y},"重新加载")])):(a(),n(z,{key:2},[T.value?(a(),n("div",ot,[s[8]||(s[8]=t("b",{"aria-hidden":"true"},"i",-1)),s[9]||(s[9]=t("span",null,"数据服务暂时不可用,当前队列可能不完整。",-1)),t("button",{class:"btn small",type:"button",onClick:y},"重试")])):F("",!0),t("div",it,[t("div",null,[s[10]||(s[10]=t("span",null,"待收单",-1)),t("strong",null,o(R.value.length),1),s[11]||(s[11]=t("small",null,"审批已完成",-1))]),t("div",null,[s[12]||(s[12]=t("span",null,"已收单",-1)),t("strong",null,o(U.value.length),1),s[13]||(s[13]=t("small",null,"等待付款执行",-1))]),t("div",null,[s[14]||(s[14]=t("span",null,"收单金额",-1)),t("strong",null,o(N(I.value)),1),s[15]||(s[15]=t("small",null,"不等同于已付款",-1))])]),t("div",rt,[s[22]||(s[22]=t("div",{class:"card-head"},[t("div",null,[t("h2",null,"收单队列"),t("p",null,"确认收单后,报销单进入付款处理环节。")]),t("span",{class:"tag info"},"财务处理")],-1)),t("div",ut,[t("label",dt,[s[16]||(s[16]=t("span",{"aria-hidden":"true"},"⌕",-1)),W(t("input",{"onUpdate:modelValue":s[0]||(s[0]=e=>g.value=e),type:"search","aria-label":"搜索待收单",placeholder:"搜索报销单号、报销人或事项"},null,512),[[G,g.value]])]),s[17]||(s[17]=t("span",{class:"filter-spacer"},null,-1)),t("span",pt,o(v.value.length)+" 笔结果",1)]),v.value.length?(a(),n("div",ct,[t("table",vt,[s[18]||(s[18]=t("caption",{class:"sr-only"},"财务收单队Line truncated
-1
View File
@@ -1 +0,0 @@
.kingdee-bind-panel.embedded .panel-card[data-v-bf209813]{box-shadow:none;border:1px solid var(--line)}.filter-hint[data-v-bf209813]{color:var(--muted);font-size:12px}.self-mark[data-v-bf209813]{margin-left:6px;color:var(--muted);font-size:11px}.check-option.full[data-v-bf209813]{grid-column:1 / -1;display:flex;align-items:center;gap:8px;margin-top:4px}.scheduled-page[data-v-3008b096]{min-width:0}.scheduled-page.scheduled-embedded[data-v-3008b096]{height:100%;min-height:0;flex:1 1 0;overflow:hidden}.task-card[data-v-3008b096],.history-card[data-v-3008b096]{min-width:0}.scheduled-embedded .task-card[data-v-3008b096]{flex:0 0 auto}.scheduled-embedded .history-card[data-v-3008b096]{min-height:0;flex:1 1 0;overflow:hidden}.scheduled-embedded .history-card>.history-table-wrap[data-v-3008b096]{min-height:0;max-height:none;flex:1 1 auto;overflow:auto}.task-head[data-v-3008b096],.history-head[data-v-3008b096],.detail-title-row[data-v-3008b096]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px}.task-head>div[data-v-3008b096],.history-head>div[data-v-3008b096],.detail-title-row>div[data-v-3008b096]:first-child{min-width:0;flex:1 1 280px}.task-head p[data-v-3008b096],.detail-title-row p[data-v-3008b096],.history-head p[data-v-3008b096]{overflow-wrap:anywhere}.page-state[data-v-3008b096]{min-height:180px;padding:30px 18px}.page-state .btn[data-v-3008b096],.detail-state .btn[data-v-3008b096],.history-state .btn[data-v-3008b096]{margin-top:12px}.task-layout[data-v-3008b096]{display:grid;grid-template-columns:minmax(210px,.34fr) minmax(0,1fr);gap:18px;padding:0 22px 22px}.task-list-warning[data-v-3008b096]{grid-column:1 / -1}.task-selector[data-v-3008b096]{display:grid;align-content:start;gap:7px}.task-option[data-v-3008b096]{width:100%;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;color:var(--body);text-align:left}.task-option[data-v-3008b096]:hover,.task-option.active[data-v-3008b096]{border-color:#a8c4df;background:var(--blue-soft)}.task-option-title[data-v-3008b096]{display:flex;align-items:center;justify-content:space-between;gap:8px}.task-option strong[data-v-3008b096]{color:var(--text);font-size:12px;overflow-wrap:anywhere}.task-option small[data-v-3008b096]{display:block;margin-top:4px;color:var(--muted);font-size:10px}.status-dot-small[data-v-3008b096]{width:8px;height:8px;flex:none;border-radius:50%;background:var(--quiet)}.status-dot-small.success[data-v-3008b096]{background:var(--success)}.status-dot-small.running[data-v-3008b096]{background:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}.task-detail[data-v-3008b096]{min-width:0;padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-raised)}.detail-state[data-v-3008b096]{min-height:160px}.detail-title-row h3[data-v-3008b096]{font-size:16px}.detail-actions[data-v-3008b096]{display:flex;flex-wrap:wrap;gap:8px}.inline-note[data-v-3008b096]{margin:12px 0 0;padding:9px 11px;border-left:3px solid var(--blue);background:var(--blue-soft);color:var(--body);font-size:11px}.task-summary[data-v-3008b096]{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr));gap:1px;margin-top:16px;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--line)}.task-summary>div[data-v-3008b096]{min-width:0;padding:11px 12px;background:#fff}.task-summary dt[data-v-3008b096]{color:var(--muted);font-size:10px}.task-summary dt span[data-v-3008b096]{color:var(--quiet);font-weight:400}.task-summary dd[data-v-3008b096]{margin-top:3px;overflow-wrap:anywhere;color:var(--body);font-size:12px}.state-badge[data-v-3008b096]{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:99px;background:#eef1f4;color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}.state-badge.success[data-v-3008b096]{background:var(--success-soft);color:var(--success)}.state-badge.danger[data-v-3008b096]{background:var(--danger-soft);color:var(--danger)}.state-badge.running[data-v-3008b096],.state-badge.queued[data-v-3008b096]{background:var(--blue-soft);color:var(--blue-dark)}.history-card[data-v-3008b096]{display:flex;margin-top:16px;flex-direction:column}.history-state[data-v-3008b096]{min-height:180px;padding:30px 18px}.history-table-wrap[data-v-3008b096]{margin:0 18px}.history-table[data-v-3008b096]{min-width:920px}.history-table td[data-v-3008b096]{vertical-align:top}.history-table td>small[data-v-3008b096],.history-table td>span[data-v-3008b096]:not(.state-badge){display:block}.history-table td>small[data-v-3008b096]{margin-top:3px;color:var(--quiet);font-size:10px}.counts-summary[data-v-3008b096]{max-width:300px;color:var(--body);line-height:1.65}.error-detail[data-v-3008b096]{margin-top:5px;max-width:260px;color:var(--danger)}.error-detail summary[data-v-3008b096]{cursor:pointer;font-size:10px}.error-detail p[data-v-3008b096]{margin-top:4px;overflow-wrap:anywhere;white-space:pre-wrap}.schedule-dialog[data-v-3008b096]{widtLine truncated
+1
View File
@@ -0,0 +1 @@
import{L as ae,d as ke,u as _e,k as he,o as we,J as Se,j as t,c as s,n as F,b as e,t as v,e as u,x as R,y as ne,F as q,v as ve,s as Q,G as xe,N as pe,P as be,f as le,M as Be,$ as Xe,B as r,r as g,R as Re,A as ye,E as w,C as Ve,w as fe,Y as me,p as Te,h as Me,g as Ne}from"./index-DU2fjqYh.js";import{a as ce}from"./admin-kNzfHot2.js";import{_ as Pe}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{m as Le}from"./searchProjection-BPQZhrH5.js";import{u as De}from"./useListPagination-j0ff6aFk.js";import{_ as Ce}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ie={list:()=>ae.get("/kingdee/account-bindings"),me:()=>ae.get("/kingdee/account-bindings/me"),bind:(V,b)=>ae.put(`/kingdee/account-bindings/${encodeURIComponent(V)}`,b),unbind:V=>ae.delete(`/kingdee/account-bindings/${encodeURIComponent(V)}`),test:V=>ae.post(`/kingdee/account-bindings/${encodeURIComponent(V)}/test`)},ze={key:0,class:"inline-alert danger",role:"alert"},qe={class:"filter-bar list-toolbar"},Fe={class:"list-toolbar__filters"},Ke={key:0,class:"filter-search"},Ge={key:1,class:"filter-hint"},He={class:"list-toolbar__meta"},je=["disabled","title"],Ye={class:"tag info"},Je={key:0,class:"load-wrap",role:"status"},Qe={key:1,class:"table-wrap",tabindex:"0",role:"region","aria-label":"金蝶账号绑定列表"},We={class:"data-table responsive-table"},Ze={key:0},ea={key:1},aa={key:2},na={key:0,"data-label":"财务人员"},la={key:0,class:"self-mark"},ta={key:1,"data-label":"金蝶账号"},sa={key:2,"data-label":"绑定状态"},oa={"data-label":"操作",class:"actions-cell"},ia=["onClick"],da=["disabled","onClick"],ua=["onClick"],ra={key:2,class:"empty-state"},ca={class:"modal-head","data-dialog-drag-handle":""},va={id:"kingdee-bind-title"},ga=["disabled"],pa={class:"modal-body"},ba={class:"form-grid"},ya={key:0,class:"field full"},fa=["disabled"],ma=["value"],ka={key:1,class:"field"},_a=["disabled"],ha={key:2,class:"field"},wa=["disabled","placeholder"],Ca={class:"check-option full"},Ia=["disabled"],$a={class:"modal-actions"},Ea=["disabled"],Oa=["disabled"],Aa=ke({__name:"KingdeeAccountBindingPanel",props:{embedded:{type:Boolean}},setup(V,{expose:b}){const f=_e(),S=he(),m=l=>f.canRead(l),E=l=>f.canEdit(l),O=r(()=>{var l;return((l=f.userInfo)==null?void 0:l.feishuOpenId)||null}),y=r(()=>f.canRead("finance.kingdee.account.view-all")&&S.can("integration.kingdee.account:read-all")),I=r(()=>f.canRead("finance.kingdee.account.view-own")&&S.can("integration.kingdee.account:read-own")),A=r(()=>y.value||I.value),x=r(()=>f.canEdit("finance.kingdee.account.bind")&&S.can("integration.kingdee.account:manage-all")),K=r(()=>f.canEdit("finance.kingdee.account.bind-own")&&S.can("integration.kingdee.account:manage-own")),W=r(()=>f.canEdit("finance.kingdee.account.unbind")&&S.can("integration.kingdee.account:manage-all")),T=r(()=>f.canEdit("finance.kingdee.account.unbind-own")&&S.can("integration.kingdee.account:manage-own")),B=r(()=>m("dialog.kingdee.account")),k=r(()=>E("dialog.kingdee.account.username")&&E("dialog.kingdee.account.password")),ee=r(()=>B.value&&k.value&&(x.value||K.value)),C=l=>B.value&&(x.value||K.value&&l.employeeOpenId===O.value),G=l=>W.value||T.value&&l.employeeOpenId===O.value,te=l=>(l.employeeOpenId===O.value?E("dialog.kingdee.account.test-own"):E("dialog.kingdee.account.test-all"))&&C(l),h=g([]),M=g(!1),U=g(""),N=g(""),_=g(!1),P=g(null),H=g(null),j=g(null),D=g(!1),L=g(null),p=Re({kingdeeUsername:"",kingdeePassword:"",verifyLogin:!0}),Z=l=>{var $,z;const n=(z=($=l==null?void 0:l.response)==null?void 0:$.data)==null?void 0:z.message;return typeof n=="string"&&n.trim()?n:l instanceof Error&&l.message?l.message:"请求失败,请稍后重试。"},Y=r(()=>h.value.filter(l=>Le(N.value,[{readable:m("ui.kingdee.binding.column.employee"),values:[l.realName]},{readable:m("ui.kingdee.binding.column.username"),values:[l.kingdeeUsername]}]))),o=r(()=>h.value.filter(l=>l.bound).length),a=r(()=>m("ui.kingdee.binding.column.employee")),i=r(()=>h.value.filter(l=>!l.bound&&C(l)&&(l.employeeOpenId===O.value||a.value))),c=r(()=>D.value?i.value.find(l=>l.employeeOpenId===L.value)||null:j.value),X=r(()=>i.value.length?"为未绑定人员新增金蝶账号绑定":x.value&&!a.value&&!K.value?"需要“财务人员”字段查看权限才能选择绑定人员":"当前没有可新增绑定的人员"),J=l=>l.realName,{page:de,pageSize:ue,paginatedItems:Ie}=De(Y,{resetSources:[N]}),re=async()=>{if(!A.value){h.value=[],U.value="当前账号没有金蝶账号绑定查看权限。";return}M.value=!0,U.value="";try{await f.loadPermissions(),h.value=await ie.list()||[]}catch(l){U.value=Z(l)}finally{M.value=!1}},$e=async l=>{var n;C(l)&&(D.value=!1,L.value=l.employeeOpenId,j.value=l,p.kingdeeUsername=l.kingdeeUsername||"",p.kingdeePassword="",p.verifyLogin=!0,await ye(),(n=H.value)==null||n.showModal())},Ee=async()=>{var l;!ee.value||!i.value.length||(D.value=!0,j.value=null,L.value=i.value[0].employeeOpenId,p.kingdeeUsername="",p.kingdeePasswoLine truncated
-1
View File
@@ -1 +0,0 @@
import{M as ee,d as Te,u as xe,o as Re,D as Fe,j as u,c as o,n as R,b as e,t as i,e as k,q as J,v as he,F as j,x as pe,m as Ae,p as Le,H as He,I as Pe,f as de,Q as ca,y as _,r as c,K as va,A as pa,E as L,z as Oe,w as _e,N as ba,B as fa,k as ze,R as ga,S as Ie,h as ya,g as ma}from"./index-CXCTlxVW.js";import{a as De}from"./admin-C9Owgj_V.js";import{u as ka,_ as Ge}from"./useListPagination-BTBVezsP.js";import{_ as Be}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ye={list:()=>ee.get("/kingdee/account-bindings"),me:()=>ee.get("/kingdee/account-bindings/me"),bind:(w,U)=>ee.put(`/kingdee/account-bindings/${w}`,U),unbind:w=>ee.delete(`/kingdee/account-bindings/${w}`),test:w=>ee.post(`/kingdee/account-bindings/${w}/test`)},ha={key:0,class:"inline-alert danger",role:"alert"},_a={class:"filter-bar"},$a={key:0,class:"filter-search"},wa={key:1,class:"filter-hint"},Ea={class:"tag info"},Ca={key:0,class:"load-wrap",role:"status"},Sa={key:1,class:"table-wrap",tabindex:"0",role:"region","aria-label":"金蝶账号绑定列表"},Ua={class:"data-table responsive-table"},Na={"data-label":"财务人员"},Aa={key:0,class:"self-mark"},Ia={"data-label":"工号"},Da={"data-label":"金蝶账号"},Ta={"data-label":"绑定状态"},xa={"data-label":"操作",class:"actions-cell"},Ra=["onClick"],La=["disabled","onClick"],Ba=["onClick"],Ma={key:2,class:"empty-state"},Xa={class:"modal-head","data-dialog-drag-handle":""},Va={id:"kingdee-bind-title"},qa=["disabled"],Ha={class:"modal-body"},Pa={class:"form-grid"},Fa={class:"field"},Oa=["disabled"],za={class:"field"},Ga=["disabled","placeholder"],Ka={class:"check-option full"},Qa=["disabled"],Ya={class:"modal-actions"},Za=["disabled"],ja=["disabled"],Ja=Te({__name:"KingdeeAccountBindingPanel",props:{embedded:{type:Boolean}},setup(w,{expose:U}){const I=xe(),ae=_(()=>{var n;return Number(((n=I.userInfo)==null?void 0:n.id)||0)||null}),F=_(()=>I.canRead("finance.kingdee.account.view-all")),Y=_(()=>I.canEdit("finance.kingdee.account.bind")),B=_(()=>I.canEdit("finance.kingdee.account.bind-own")),E=_(()=>I.canEdit("finance.kingdee.account.unbind")),N=_(()=>I.canEdit("finance.kingdee.account.unbind-own")),b=n=>Y.value||B.value&&n.userId===ae.value,q=n=>E.value||N.value&&n.userId===ae.value,m=c([]),C=c(!1),y=c(""),O=c(""),g=c(!1),A=c(null),M=c(null),x=c(null),$=va({kingdeeUsername:"",kingdeePassword:"",verifyLogin:!0}),X=n=>{var T,W;const s=(W=(T=n==null?void 0:n.response)==null?void 0:T.data)==null?void 0:W.message;return typeof s=="string"&&s.trim()?s:n instanceof Error&&n.message?n.message:"请求失败,请稍后重试。"},H=_(()=>{const n=O.value.trim().toLowerCase();return n?m.value.filter(s=>[s.realName,s.employeeNo,s.kingdeeUsername].some(T=>String(T||"").toLowerCase().includes(n))):m.value}),P=_(()=>m.value.filter(n=>n.bound).length),{page:D,pageSize:V,paginatedItems:te}=ka(H,{resetSources:[O]}),S=async()=>{C.value=!0,y.value="";try{await I.loadPermissions(),m.value=await ye.list()||[]}catch(n){y.value=X(n)}finally{C.value=!1}},Z=async n=>{var s;b(n)&&(x.value=n,$.kingdeeUsername=n.kingdeeUsername||"",$.kingdeePassword="",$.verifyLogin=!0,await pa(),(s=M.value)==null||s.showModal())},z=()=>{var n;g.value||((n=M.value)==null||n.close(),x.value=null)},d=async()=>{if(!(!x.value||!b(x.value)||g.value)){g.value=!0;try{const n=await ye.bind(x.value.userId,{kingdeeUsername:$.kingdeeUsername,kingdeePassword:$.kingdeePassword,verifyLogin:$.verifyLogin}),s=m.value.findIndex(T=>T.userId===n.userId);s>=0?m.value[s]=n:m.value.push(n),L.success("金蝶账号已绑定"),z()}catch(n){L.error(`绑定失败:${X(n)}`)}finally{g.value=!1}}},t=async n=>{if(!(!b(n)||A.value!=null)){A.value=n.userId;try{const s=await ye.test(n.userId);s!=null&&s.success?L.success(s.message||"验证成功"):L.error((s==null?void 0:s.message)||"验证失败")}catch(s){L.error(`验证失败:${X(s)}`)}finally{A.value=null}}},v=async n=>{if(q(n)){try{await Oe.confirm(`确认解绑 ${n.realName} 的金蝶账号?解绑后该员工将无法变更金蝶财务单据。`,"解绑确认",{type:"warning",confirmButtonText:"解绑",cancelButtonText:"取消"})}catch{return}try{await ye.unbind(n.userId);const s=m.value.findIndex(T=>T.userId===n.userId);s>=0&&(m.value[s]={...m.value[s],bound:!1,kingdeeUsername:null,boundAt:null,updatedAt:null,boundBy:null}),L.success("已解绑")}catch(s){L.error(`解绑失败:${X(s)}`)}}};return Re(()=>{S()}),U({reload:S}),(n,s)=>{var W,ve;const T=Fe("dialog-drag");return u(),o("div",{class:R(["kingdee-bind-panel",{embedded:w.embedded}])},[y.value?(u(),o("div",ha,[s[6]||(s[6]=e("b",null,"!",-1)),e("span",null,i(y.value),1),e("button",{class:"btn small",type:"button",onClick:S},"重试")])):k("",!0),e("div",{class:R(["card fill-list-card primary-list-card",{"panel-card":w.embedded}])},[e("div",_a,[F.value?(u(),o("label",$a,[s[7]||(s[7]=e("span",{"aria-hidden":"true"},"🔍",-1)),J(e("input",{"onUpdate:modelValue":s[0]||(s[0]=p=>O.value=p),type:"search",placeholder:"搜索姓名、工号或金蝶账Line truncated
+1
View File
@@ -0,0 +1 @@
.kingdee-bind-panel.embedded .panel-card[data-v-c4436992]{box-shadow:none;border:1px solid var(--line)}.filter-hint[data-v-c4436992]{color:var(--muted);font-size:12px}.self-mark[data-v-c4436992]{margin-left:6px;color:var(--muted);font-size:11px}.check-option.full[data-v-c4436992]{grid-column:1 / -1;display:flex;align-items:center;gap:8px;margin-top:4px}.integration-page[data-v-51c4df60]{display:flex;min-height:0;flex:1 1 auto;flex-direction:column}.integration-tabs[data-v-51c4df60]{margin-bottom:14px}.integration-page>[role=tabpanel][data-v-51c4df60]{min-width:0}.integration-note[data-v-51c4df60]{margin-top:0;margin-bottom:14px}.integration-card[data-v-51c4df60]{display:flex;flex-direction:column;min-width:0;container-name:integration-card;container-type:inline-size}.integration-body[data-v-51c4df60]{display:flex;flex:1;flex-direction:column;min-width:0;padding:0 22px}.integration-form[data-v-51c4df60]{padding:17px 0 20px;grid-template-columns:minmax(0,1fr);gap:13px}.integration-tool[data-v-51c4df60]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0 16px;border-top:1px solid var(--line)}.integration-tool>div[data-v-51c4df60]{min-width:0}.integration-tool strong[data-v-51c4df60],.integration-tool small[data-v-51c4df60],.sync-status[data-v-51c4df60]{display:block;overflow-wrap:anywhere}.integration-tool strong[data-v-51c4df60]{font-size:12px}.integration-tool small[data-v-51c4df60]{margin-top:2px;color:var(--muted);font-size:11px}.sync-status[data-v-51c4df60]{margin-top:5px;font-size:11px}.field-hint[data-v-51c4df60]{margin-top:3px;color:var(--text);font-size:12px;line-height:1.55;overflow-wrap:anywhere}.integration-actions[data-v-51c4df60]{align-items:center;min-height:59px;flex-wrap:wrap;margin-top:auto}.test-result[data-v-51c4df60]{min-width:0;max-width:100%;margin-right:auto;font-size:11px}.success-copy[data-v-51c4df60]{color:var(--success)}.danger-copy[data-v-51c4df60]{color:var(--danger)}@container integration-card (max-width: 760px){.integration-actions[data-v-51c4df60]{justify-content:flex-end}.test-result[data-v-51c4df60]{width:100%;margin-right:0}.integration-tool[data-v-51c4df60]{align-items:stretch;flex-direction:column}.integration-tool .btn[data-v-51c4df60]{width:100%}}
+1
View File
@@ -0,0 +1 @@
import{d as nt,u as at,k as ot,a as st,o as it,l as lt,m as rt,w as ce,c as f,b as t,n as T,p as g,q as G,s as S,e as R,F as H,v as z,t as b,x as ue,y as ct,z as ut,f as P,h as dt,g as pt,r as N,A as Y,B as u,C as vt,i as ft,D as p,j as l,G as A,H as ht,I as bt,J as mt,K as yt,E as gt}from"./index-DU2fjqYh.js";import{_ as _t}from"./_plugin-vue_export-helper-DlAUqK2U.js";const kt=["a[href]","button","input","select","textarea","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable="true"]',"[tabindex]"].join(","),Ct=o=>o.tabIndex>=0&&!o.hidden&&!o.disabled&&!o.ariaHidden&&!o.ariaDisabled&&o.display!=="none"&&o.visibility!=="hidden"&&o.rendered,Et=(o,s,d)=>s<=0?-1:o<0?d?s-1:0:d?(o-1+s)%s:(o+1)%s,St=o=>{const s=o.ownerDocument.defaultView,d=s==null?void 0:s.getComputedStyle(o);return Ct({tabIndex:o.tabIndex,hidden:o.hidden,disabled:o.hasAttribute("disabled"),ariaHidden:o.getAttribute("aria-hidden")==="true",ariaDisabled:o.getAttribute("aria-disabled")==="true",display:(d==null?void 0:d.display)||"",visibility:(d==null?void 0:d.visibility)||"",rendered:o.getClientRects().length>0})},de=o=>Array.from(o.querySelectorAll(kt)).filter(St),wt=o=>{(de(o)[0]||o).focus()},Tt=(o,s)=>{var i;if(s.key!=="Tab")return!1;const d=de(o);if(s.preventDefault(),!d.length)return o.focus(),!0;const m=o.ownerDocument.activeElement,$=m instanceof HTMLElement&&o.contains(m)?d.indexOf(m):-1;return(i=d[Et($,d.length,s.shiftKey)])==null||i.focus(),!0},Nt={class:"app-shell"},At=["aria-hidden","inert"],Rt=["role","aria-modal","aria-hidden","inert"],Dt={class:"main-nav","aria-label":"主导航"},xt={key:0,class:"nav-group"},Mt={"aria-hidden":"true"},Bt={key:0,class:"nav-count"},It={key:1,class:"nav-group"},$t={"aria-hidden":"true"},Lt={class:"nav-count warning"},Ft=["open"],Ut={class:"settings-category-toggle"},Pt={class:"settings-category-children"},Ot={"aria-hidden":"true"},Wt={class:"sidebar-foot"},qt=["aria-hidden","inert"],Vt={class:"topbar"},Ht={class:"topbar-left"},zt=["aria-expanded","aria-label"],Kt={class:"breadcrumb"},jt={class:"topbar-tools"},Qt={class:"search-box"},Gt=["aria-label"],Yt={key:0,class:"notification-count","aria-hidden":"true"},Jt={class:"avatar","aria-hidden":"true"},Zt={key:0,class:"data-sync-banner",role:"status"},Xt={id:"main-content",class:"page-stage","aria-live":"polite"},en={class:"app-dialog__panel notification-dialog-panel","aria-describedby":"notification-dialog-description"},tn={class:"notification-modal-head","data-dialog-drag-handle":"",title:"拖动通知面板"},nn={id:"notification-dialog-description"},an={key:0,class:"notification-modal-body"},on={class:"notification-list","aria-label":"通知列表"},sn=["aria-label","onClick"],ln={class:"notification-item-copy"},rn={key:0,class:"notification-item-link","aria-hidden":"true"},cn={key:1,class:"notification-empty empty-state"},un={class:"notification-empty-icon","aria-hidden":"true"},dn=nt({__name:"Layout",setup(o){const s=dt(),d=pt(),m=at(),$=ot(),i=st(),h=N(!1),_=N(!1),L=N(null),J=N(null),O=N(""),pe=N(null),D=N(null),x=N([]);let M=null;const K=window.matchMedia("(max-width: 1080px)"),F=(e=!0)=>{h.value&&(h.value=!1,e&&Y(()=>{var n;return(n=J.value)==null?void 0:n.focus()}))},ve=async()=>{if(h.value){F();return}h.value=!0,await Y(),L.value&&wt(L.value)},j=()=>F(),Z=(e=K.matches)=>{_.value=e,e||F(!1)},X=e=>{if(!(!_.value||!h.value)){if(e.key==="Escape"){e.preventDefault(),F();return}L.value&&Tt(L.value,e)}},ee=e=>Z(e.matches);it(async()=>{var v,y,a;Z(),K.addEventListener("change",ee),window.addEventListener("keydown",X);const e=(v=m.userInfo)==null?void 0:v.userType;let n=!1;if(m.token)try{const C=await m.refreshToken();n=!!(e&&e!==((y=C.user)==null?void 0:y.userType))}catch{try{await m.fetchUserInfo(),n=!!(e&&e!==((a=m.userInfo)==null?void 0:a.userType))}catch{}}n&&i.reset();try{await Promise.all([m.loadPermissions(),$.loadCapabilities(m.token)])}catch{}n&&await d.replace(lt(ne,ae)),le()}),rt(()=>{K.removeEventListener("change",ee),window.removeEventListener("keydown",X)});const Q=u(()=>{var e;return((e=m.userInfo)==null?void 0:e.realName)||"用户"}),fe=e=>{const n={SUPER_ADMIN:"超级管理员",ADMIN:"系统管理员",FINANCE:"财务人员",EMPLOYEE:"员工"};if(typeof(e==null?void 0:e.isSuperAdmin)=="boolean"||Array.isArray(e==null?void 0:e.roleCodes)){const a=((e==null?void 0:e.roleCodes)||[]).map(U=>String(U).trim().toUpperCase());if((e==null?void 0:e.isSuperAdmin)===!0||a.includes("SUPER_ADMIN"))return n.SUPER_ADMIN;const C=["ADMIN","FINANCE","EMPLOYEE"].find(U=>a.includes(U));return C?n[C]:"普通用户"}const y=String((e==null?void 0:e.userType)||"").trim().toUpperCase();return n[y]||(e==null?void 0:e.userType)||"普通用户"},te=u(()=>fe(m.userInfo)),he=u(()=>{var n;return((n=s.meta)==null?void 0:n.title)||"申请中心"}),ne=e=>m.canRead(e),ae=e=>$.can(e),r=e=>bt(e,ne,ae),oe=u(()=>r("applications")?"/applications":r("applicationCreate")?"/applications/new":""),be=u(()=>r("financeReceipt")?"/finance-receiLine truncated
+1
View File
@@ -0,0 +1 @@
:root{--sans: Inter, "SF Pro Text", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif}body,.app-shell[data-v-b1f7f15e]{font-family:var(--sans)}.sidebar[data-v-b1f7f15e]{border-right:1px solid #0B467A;background:linear-gradient(180deg,#0b579b,#0a477f 58%,#083b6b);color:#fff;box-shadow:7px 0 26px #07305621}.sidebar[data-v-b1f7f15e] .brand strong,.sidebar[data-v-b1f7f15e] .product-name strong{color:#fff}.sidebar[data-v-b1f7f15e] .brand small{color:#b7d2ea}.sidebar[data-v-b1f7f15e] .product-name{border-color:#ffffff29}.sidebar[data-v-b1f7f15e] .product-name span{color:#9ec1de}.sidebar[data-v-b1f7f15e] .nav-group>span{color:#8fb5d3;font-family:var(--sans)}.sidebar[data-v-b1f7f15e] .main-nav a{color:#d2e1ed}.sidebar[data-v-b1f7f15e] .main-nav a b{color:#a9c8df}.sidebar[data-v-b1f7f15e] .main-nav a:hover{background:#ffffff1a;color:#fff}.sidebar[data-v-b1f7f15e] .main-nav a.active{background:#ffffff2b;color:#fff;box-shadow:inset 3px 0 #b9ddff}.sidebar[data-v-b1f7f15e] .main-nav a.active b{color:#d6ecff}.mobile-menu[data-v-b1f7f15e]{display:none}@media (max-width: 1080px){.mobile-menu[data-v-b1f7f15e]{display:grid}}.admin-nav[data-v-b1f7f15e],.settings-category[data-v-b1f7f15e],.settings-category-children[data-v-b1f7f15e]{min-width:0}.settings-category[data-v-b1f7f15e]{margin:2px 0}.settings-category-toggle[data-v-b1f7f15e]{display:flex;width:100%;min-height:36px;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border:0;border-radius:5px;background:transparent;color:#bfd0dc;font:inherit;font-size:12.5px;text-align:left;cursor:pointer;list-style:none}.settings-category-toggle[data-v-b1f7f15e]::-webkit-details-marker{display:none}.settings-category-toggle[data-v-b1f7f15e]:after{content:"⌄";color:#bbd2e4;transition:transform .16s ease}.settings-category-toggle[data-v-b1f7f15e]:hover,.settings-category-toggle[data-v-b1f7f15e]:focus-visible,.settings-category[open]>.settings-category-toggle[data-v-b1f7f15e]{background:#ffffff0f;color:#fff}.settings-category-toggle[data-v-b1f7f15e]:focus-visible{outline:2px solid #83B5FF;outline-offset:-2px}.settings-category[open]>.settings-category-toggle[data-v-b1f7f15e]:after{transform:rotate(180deg)}.settings-category-children[data-v-b1f7f15e]{margin:2px 0 5px 10px;padding-left:7px;border-left:1px solid rgba(131,181,255,.34)}.settings-category-children[data-v-b1f7f15e] a{min-height:34px;margin:1px 0;padding-block:7px;padding-inline:9px 7px}.notification-glyph[data-v-b1f7f15e]{width:18px;height:18px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.notification-count[data-v-b1f7f15e]{position:absolute;top:1px;right:-3px;min-width:16px;height:16px;padding:0 4px;border:2px solid #fff;border-radius:99px;background:var(--danger);color:#fff;font-size:9px;font-weight:800;line-height:12px;text-align:center}.notification-dialog[data-v-b1f7f15e]{width:min(450px,calc(100vw - 24px))}.notification-dialog-panel[data-v-b1f7f15e]{animation:notification-pop-b1f7f15e .16s ease-out}@keyframes notification-pop-b1f7f15e{0%{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.notification-modal-head[data-v-b1f7f15e]{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 21px 15px;border-bottom:1px solid var(--line);background:#f8fafc;cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}.notification-modal-head[data-v-b1f7f15e]:active{cursor:grabbing}.notification-modal-head h2[data-v-b1f7f15e]{margin-top:4px;font-size:19px}.notification-modal-head p[data-v-b1f7f15e]{margin-top:3px;color:var(--muted);font-size:11px}.notification-modal-body[data-v-b1f7f15e]{max-height:min(480px,calc(100vh - 190px));max-height:min(480px,calc(100dvh - 190px));padding:10px 12px;overflow-y:auto;background:#f6f8fa}.notification-list[data-v-b1f7f15e]{display:grid;gap:7px;list-style:none}.notification-item[data-v-b1f7f15e]{display:grid;width:100%;grid-template-columns:34px minmax(0,1fr) auto;align-items:start;gap:11px;min-height:76px;padding:12px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--text);text-align:left}.notification-item.actionable[data-v-b1f7f15e]{cursor:pointer}.notification-item.actionable[data-v-b1f7f15e]:hover{border-color:#b8cee4;background:#f7faff}.notification-item[data-v-b1f7f15e]:focus-visible{position:relative;z-index:1;outline:3px solid #72adff;outline-offset:-3px}.notification-item-icon[data-v-b1f7f15e]{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--blue-soft);color:var(--blue);font-size:14px;font-weight:800}.notification-item-icon.danger[data-v-b1f7f15e]{background:var(--danger-soft);color:var(--danger)}.notification-item-icon.pending[data-v-b1f7f15e]{background:var(--warning-soft);color:var(--warning)}.notification-item-icon.success[data-v-b1f7f15e]{background:var(--success-soft);color:var(--success)}.notification-item-copy[data-v-b1f7f15Line truncated
-1
View File
@@ -1 +0,0 @@
.mobile-menu[data-v-35559d08]{display:none}@media (max-width: 900px){.mobile-menu[data-v-35559d08]{display:grid}}.notification-glyph[data-v-35559d08]{width:18px;height:18px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.notification-count[data-v-35559d08]{position:absolute;top:1px;right:-3px;min-width:16px;height:16px;padding:0 4px;border:2px solid #fff;border-radius:99px;background:var(--danger);color:#fff;font-size:9px;font-weight:800;line-height:12px;text-align:center}.notification-dialog[data-v-35559d08]{width:min(450px,calc(100vw - 24px))}.notification-dialog-panel[data-v-35559d08]{animation:notification-pop-35559d08 .16s ease-out}@keyframes notification-pop-35559d08{0%{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.notification-modal-head[data-v-35559d08]{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 21px 15px;border-bottom:1px solid var(--line);background:#f8fafc;cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}.notification-modal-head[data-v-35559d08]:active{cursor:grabbing}.notification-modal-head h2[data-v-35559d08]{margin-top:4px;font-size:19px}.notification-modal-head p[data-v-35559d08]{margin-top:3px;color:var(--muted);font-size:11px}.notification-modal-body[data-v-35559d08]{max-height:min(480px,calc(100vh - 190px));padding:10px 12px;overflow-y:auto;background:#f6f8fa}.notification-list[data-v-35559d08]{display:grid;gap:7px;list-style:none}.notification-item[data-v-35559d08]{display:grid;width:100%;grid-template-columns:34px minmax(0,1fr) auto;align-items:start;gap:11px;min-height:76px;padding:12px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--text);text-align:left}.notification-item.actionable[data-v-35559d08]{cursor:pointer}.notification-item.actionable[data-v-35559d08]:hover{border-color:#b8cee4;background:#f7faff}.notification-item[data-v-35559d08]:focus-visible{position:relative;z-index:1;outline:3px solid #72adff;outline-offset:-3px}.notification-item-icon[data-v-35559d08]{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--blue-soft);color:var(--blue);font-size:14px;font-weight:800}.notification-item-icon.danger[data-v-35559d08]{background:var(--danger-soft);color:var(--danger)}.notification-item-icon.pending[data-v-35559d08]{background:var(--warning-soft);color:var(--warning)}.notification-item-icon.success[data-v-35559d08]{background:var(--success-soft);color:var(--success)}.notification-item-copy[data-v-35559d08]{display:block;min-width:0}.notification-item-copy strong[data-v-35559d08],.notification-item-copy span[data-v-35559d08],.notification-item-copy small[data-v-35559d08]{display:block}.notification-item-copy strong[data-v-35559d08]{font-size:12px}.notification-item-copy span[data-v-35559d08]{margin-top:2px;color:var(--body);font-size:11px;line-height:1.55}.notification-item-copy small[data-v-35559d08]{margin-top:5px;color:var(--quiet);font-size:10px}.notification-item-link[data-v-35559d08]{padding-top:8px;color:var(--blue);font-size:11px;white-space:nowrap}.notification-item-link svg[data-v-35559d08]{width:14px;height:14px;vertical-align:-3px}.notification-empty[data-v-35559d08]{padding:38px 20px}.notification-empty-icon[data-v-35559d08]{display:grid;place-items:center;width:34px;height:34px;margin:0 auto 7px;border-radius:50%;background:var(--success-soft);color:var(--success);font-weight:800}.notification-empty strong[data-v-35559d08],.notification-empty span[data-v-35559d08]:not(.notification-empty-icon){display:block;text-align:center}.notification-empty strong[data-v-35559d08]{color:var(--body);font-size:13px}.notification-empty span[data-v-35559d08]:not(.notification-empty-icon){margin-top:3px;color:var(--muted);font-size:11px}.notification-modal-actions[data-v-35559d08]{display:flex;justify-content:flex-end;padding:13px 21px;border-top:1px solid var(--line);background:var(--surface-raised)}@media (max-width: 680px){.notification-modal-head[data-v-35559d08]{padding:16px 17px 13px}.notification-modal-body[data-v-35559d08]{padding:8px}.notification-item[data-v-35559d08]{grid-template-columns:34px minmax(0,1fr);padding:11px}.notification-item-link[data-v-35559d08]{grid-column:2;padding-top:0}.notification-modal-actions[data-v-35559d08]{padding:12px 17px}}@media (prefers-reduced-motion: reduce){.notification-dialog-panel[data-v-35559d08]{animation:none}}
-1
View File
@@ -1 +0,0 @@
import{d as Bt,u as It,a as Mt,o as Ft,w as z,c as y,b as e,n as f,k as c,l as C,m as r,e as g,p as N,t as m,q as K,v as Ut,s as Pt,f as _,F as Lt,x as Ot,h as qt,g as Vt,r as x,y as k,z as Ht,A as zt,i as Kt,B as d,j as l,C as Qt,D as Yt,E as jt}from"./index-CXCTlxVW.js";import{_ as Zt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Gt={class:"app-shell"},Jt={class:"main-nav","aria-label":"主导航"},Xt={key:0,class:"nav-group"},te={"aria-hidden":"true"},ee={key:1,class:"nav-group"},ae={"aria-hidden":"true"},ne={class:"nav-count"},se={"aria-hidden":"true"},oe={"aria-hidden":"true"},ie={key:2,class:"nav-group"},re={"aria-hidden":"true"},le={class:"nav-count warning"},ue={"aria-hidden":"true"},ce={class:"nav-count"},de={key:3,class:"nav-group admin-nav"},pe={"aria-hidden":"true"},ge={"aria-hidden":"true"},ve={"aria-hidden":"true"},fe={"aria-hidden":"true"},me={"aria-hidden":"true"},he={class:"sidebar-foot"},be={class:"main-area"},ye={class:"topbar"},ke={class:"topbar-left"},_e=["aria-expanded"],Ce={class:"breadcrumb"},Ne={class:"topbar-tools"},$e={class:"search-box"},Se=["aria-label"],Ee={key:0,class:"notification-count","aria-hidden":"true"},we={class:"avatar","aria-hidden":"true"},Ae={key:0,class:"data-sync-banner",role:"status"},Te={id:"main-content",class:"page-stage","aria-live":"polite"},We={class:"app-dialog__panel notification-dialog-panel","aria-describedby":"notification-dialog-description"},Re={class:"notification-modal-head","data-dialog-drag-handle":"",title:"拖动通知面板"},De={id:"notification-dialog-description"},xe={key:0,class:"notification-modal-body"},Be={class:"notification-list","aria-label":"通知列表"},Ie=["aria-label","onClick"],Me={class:"notification-item-copy"},Fe={key:0,class:"notification-item-link","aria-hidden":"true"},Ue={key:1,class:"notification-empty empty-state"},Pe={class:"notification-empty-icon","aria-hidden":"true"},Le=Bt({__name:"Layout",setup(Oe){const o=qt(),B=Vt(),h=It(),i=Mt(),v=x(!1),I=x(""),Q=x(null),w=x(null),A=x([]);let T=null;Ft(async()=>{var p,u,n;const a=(p=h.userInfo)==null?void 0:p.userType;let t=!1;if(h.token&&h.token!=="demo-local-session")try{const S=await h.refreshToken();t=!!(a&&a!==((u=S.user)==null?void 0:u.userType))}catch{try{await h.fetchUserInfo(),t=!!(a&&a!==((n=h.userInfo)==null?void 0:n.userType))}catch{}}t&&(i.reset(),o.path!=="/dashboard"&&await B.replace("/dashboard"));try{await h.loadPermissions()}catch{}V()});const P=k(()=>{var a;return((a=h.userInfo)==null?void 0:a.realName)||"用户"}),Y=a=>{const t={SUPER_ADMIN:"超级管理员",ADMIN:"系统管理员",FINANCE:"财务人员",EMPLOYEE:"员工"};if(typeof(a==null?void 0:a.isSuperAdmin)=="boolean"||Array.isArray(a==null?void 0:a.roleCodes)){const n=((a==null?void 0:a.roleCodes)||[]).map(D=>String(D).trim().toUpperCase());if((a==null?void 0:a.isSuperAdmin)===!0||n.includes("SUPER_ADMIN"))return t.SUPER_ADMIN;const S=["ADMIN","FINANCE","EMPLOYEE"].find(D=>n.includes(D));return S?t[S]:"普通用户"}const u=String((a==null?void 0:a.userType)||"").trim().toUpperCase();return t[u]||(a==null?void 0:a.userType)||"普通用户"},L=k(()=>Y(h.userInfo)),j=k(()=>{var t;return((t=o.meta)==null?void 0:t.title)||"工作台"}),b=a=>h.canRead(a),R=a=>h.canAny(a),Z=k(()=>b("page.integration-config")?"/integration-config":b("page.kingdee-account-binding")?{path:"/integration-config",query:{tab:"kingdee"}}:{path:"/integration-config",query:{tab:"scheduled-tasks"}}),G={Dashboard:"page.dashboard",Applications:"page.applications",ApplicationNew:"page.application-create",ApplicationDetail:"page.applications",ApplicationEdit:"page.application-edit"},O=k(()=>G[String(o.name||"")]||""),q=k(()=>!!O.value&&b(O.value)),V=async()=>{!q.value||i.reimbursements.length||i.loading||await i.load()};z(()=>o.name,()=>{V()});const J=k(()=>i.reimbursements.filter(a=>a.applicantName===P.value).length),X=k(()=>i.reimbursements.filter(a=>a.receiptStatus==="待收单").length),tt=k(()=>i.reimbursements.filter(a=>i.balance(a)>0&&a.receiptStatus==="已收单").length),et=k(()=>i.error&&i.source!=="fallback"?"同步异常":{api:"已同步",fallback:"使用缓存",error:"同步异常",connecting:"同步中"}[i.source]),at=k(()=>i.error&&i.source!=="fallback"?"error":i.source),nt=k(()=>i.source==="fallback"?"数据服务暂不可用,当前展示缓存数据。":i.source==="error"?"暂时无法同步业务数据,当前未展示业务记录。":i.error?"数据同步需要关注,请稍后重试。":i.source==="api"?"业务数据已更新。":"正在同步业务数据…"),W=k(()=>Math.max(0,Math.floor(Number(i.notifications)||0))),st=k(()=>W.value?`打开通知(${W.value}条未读)`:"打开通知(暂无未读)"),ot=()=>{I.value.trim()&&B.push({path:"/applications",query:{q:I.value.trim()}})},it=()=>Ht.alert("申请、审批、收单和付款是四个独立状态;金蝶来源单据只读,付款登记支持分次付款并保留幂等键。","工作台帮助",{confirmButtonText:"知道了"}),$=(a,t)=>{const Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as O,u as P,o as Z,c as s,p as B,q as H,b as e,x as m,y as x,M as q,t as d,e as i,F as K,v as Q,P as N,f as R,r,R as W,B as S,j as o,n as X,A as F,E as D,C as ee,J as te}from"./index-DU2fjqYh.js";import{_ as le,b as M,a as ae}from"./business-config-CDFDGnOE.js";const se={class:"page-content route-list-page prototype-config-page"},oe={class:"card fill-list-card primary-list-card prototype-config-card"},ne={class:"prototype-filter-bar"},ie={class:"prototype-result-count"},de={key:0,class:"prototype-loading"},re={key:1,class:"prototype-error"},ue={key:2,class:"table-wrap",tabindex:"0"},ce={class:"data-table prototype-table"},ve={key:0},pe={key:1},ye={key:2},me={key:3},ge={key:0,"data-label":"主体编码"},be={key:1,"data-label":"主体名称"},_e={key:2,"data-label":"统一社会信用代码"},fe={class:"mono"},Ce={key:3,"data-label":"状态"},ke={"data-label":"操作"},Ee={class:"prototype-row-actions"},he=["onClick"],Ae=["disabled","onClick"],Te={key:3,class:"prototype-empty"},Ve={class:"modal-head","data-dialog-drag-handle":""},Ie=["disabled"],Le={class:"modal-body"},$e={key:0,class:"prototype-form-error",role:"alert"},xe={class:"prototype-form-grid"},Ne={class:"field full"},Se=["disabled"],De={class:"field full"},Me=["disabled"],Ue={class:"modal-actions"},we=["disabled"],Be=["disabled"],qe={class:"app-dialog__panel"},Re={class:"modal-head","data-dialog-drag-handle":""},Fe={class:"modal-body"},je={key:0,class:"prototype-spec-grid"},ze={class:"modal-actions"},Oe=O({__name:"LegalEntities",setup(Ge){const f=P(),b=r([]),A=r(""),C=r("ALL"),k=r("code"),T=r(!1),E=r(""),c=r(!1),V=r(null),y=r(""),h=r(null),_=r(null),g=r(null),v=W({name:"",creditCode:""}),U=S(()=>f.canEdit("ui.legal-entities.create")&&["name","creditCode"].every(l=>f.canEdit(`dialog.legal-entities.create.${l}`))),j=S(()=>f.canEdit("ui.legal-entities.deactivate")),p=l=>f.canRead(`ui.legal-entities.column.${l}`),I=(l,t)=>l instanceof Error&&l.message?l.message:t,L=S(()=>{const l=A.value.toLocaleLowerCase();return b.value.filter(t=>(C.value==="ALL"||t.status===C.value)&&(!l||[t.code,t.name,t.creditCode].some(n=>String(n||"").toLocaleLowerCase().includes(l)))).sort((t,n)=>String(t[k.value]).localeCompare(String(n[k.value]),"zh-CN"))}),w=async()=>{T.value=!0,E.value="";try{b.value=await M.legalEntities()}catch(l){E.value=I(l,"法人主体加载失败")}finally{T.value=!1}},z=async()=>{var l;Object.assign(v,{name:"",creditCode:""}),y.value="",await F(),(l=h.value)==null||l.showModal()},$=()=>{var l;c.value||(l=h.value)==null||l.close()},G=async()=>{var t;y.value="";const l=v.creditCode.replace(/\s+/g,"").toUpperCase();if(!v.name)return void(y.value="请填写主体名称");if(!/^[0-9A-Z]{18}$/.test(l))return void(y.value="统一社会信用代码应为 18 位数字或大写字母");c.value=!0;try{const n=await M.create("legal-entities",{name:v.name,creditCode:l});b.value.push(n),(t=h.value)==null||t.close(),D.success("法人主体已创建")}catch(n){y.value=I(n,"保存失败,请稍后重试")}finally{c.value=!1}},Y=async l=>{var t;g.value=l,await F(),(t=_.value)==null||t.showModal()},J=async l=>{const t=l.status==="ACTIVE"?"INACTIVE":"ACTIVE";try{await ee.confirm(`确认${t==="ACTIVE"?"启用":"停用"}“${l.name}”?`,`${t==="ACTIVE"?"启用":"停用"}法人主体`,{type:"warning"})}catch{return}V.value=l.id;try{const n=await M.changeStatus("legal-entities",l.id,t);b.value.splice(b.value.findIndex(a=>a.id===l.id),1,n),D.success(`法人主体已${t==="ACTIVE"?"启用":"停用"}`)}catch(n){D.error(I(n,"状态更新失败"))}finally{V.value=null}};return Z(()=>{w()}),(l,t)=>{const n=te("dialog-drag");return o(),s("div",se,[B(le,{eyebrow:"FINANCIAL MASTER DATA",title:"法人主体",description:"统一维护可用于费用归属、预算控制和付款账户的公司主体。"},{default:H(()=>[U.value?(o(),s("button",{key:0,class:"btn primary",type:"button",onClick:z}," + 新增法人主体 ")):i("",!0)]),_:1}),t[22]||(t[22]=e("div",{class:"prototype-governance-note"},[e("strong",null,"主数据治理"),e("span",null,"主体编码由系统自动生成;已被成本中心引用的主体不能直接停用,历史业务数据始终保留。")],-1)),e("section",oe,[e("div",ne,[m(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>A.value=a),type:"search",placeholder:"搜索主体编码、名称或统一社会信用代码","aria-label":"搜索法人主体"},null,512),[[x,A.value,void 0,{trim:!0}]]),m(e("select",{"onUpdate:modelValue":t[1]||(t[1]=a=>C.value=a),"aria-label":"筛选状态"},[...t[8]||(t[8]=[e("option",{value:"ALL"},"全部状态",-1),e("option",{value:"ACTIVE"},"启用",-1),e("option",{value:"INACTIVE"},"停用",-1)])],512),[[q,C.value]]),m(e("select",{"onUpdate:modelValue":t[2]||(t[2]=a=>k.value=a),"aria-label":"排序方式"},[...t[9]||(t[9]=[e("option",{value:"code"},"按编码排序",-1),e("option",{value:"name"},"按名称排序",-1)])],512),[[q,k.value]]),t[10]||(t[10]=e("span",{class:"prototype-filter-spacer"},null,-1)),e("spanLine truncated
-1
View File
@@ -1 +0,0 @@
import{d as _,u as L,a as C,o as E,E as c,c as n,b as s,t as y,e as b,f as R,g as F,h as S,r as p,i as A,j as i}from"./index-CXCTlxVW.js";const T="/assets/feishu-logo-BpH7Hif1.png",q={class:"login-screen","aria-labelledby":"loginTitle"},B={class:"login-panel"},I={class:"login-layout"},O={class:"login-card","aria-labelledby":"loginCardTitle","aria-describedby":"loginCardDescription"},U={key:0,class:"login-loading",role:"status","aria-live":"polite"},x={key:0},D={key:1,class:"login-action"},M={key:0,class:"inline-alert danger",role:"alert"},N=["disabled","aria-busy"],V={key:0,class:"login-button-spinner","aria-hidden":"true"},H={key:1,src:T,alt:""},W=_({__name:"Login",setup(Z){const k=F(),r=S(),t=L(),m=C(),l=p(!1),u=p(!0),h=p(""),o=p(""),w=async()=>{const d=t.beginFeishuLogin();l.value=!0,o.value="";try{const e=await A.getAuthUrl();if(!e.authUrl)throw new Error("获取飞书授权地址失败");window.location.assign(e.authUrl)}catch(e){const g=(e==null?void 0:e.message)==="获取飞书授权地址失败"?e.message:"暂时无法连接认证服务,请稍后重试";o.value=g,(e==null?void 0:e.message)==="获取飞书授权地址失败"&&c.error(e.message),t.clearFeishuLogin(d)}finally{l.value=!1}};return E(async()=>{const d=r.query.token,e=r.query.code,g=r.query.state,f=r.query.error;if((d||e||f||g)&&window.history.replaceState({},document.title,window.location.pathname),f){const a=sessionStorage.getItem("feishuOAuthAttempt");(!a||t.isCurrentFeishuLogin(a))&&(t.logout(),t.clearFeishuLogin(a)),m.reset(),u.value=!1,o.value="飞书授权未完成,请重新登录",c.error(o.value);return}if(e){const a=sessionStorage.getItem("feishuOAuthAttempt");h.value="正在交换授权码…";try{m.reset(),await t.feishuLogin(e,g,a||void 0),c.success("登录成功"),await k.replace("/dashboard")}catch(v){(!a||t.isCurrentFeishuLogin(a))&&(t.logout(),t.clearFeishuLogin(a)),m.reset(),u.value=!1,o.value=(v==null?void 0:v.message)||"登录失败,请重试",c.error(o.value)}return}u.value=!1}),(d,e)=>(i(),n("main",q,[s("div",B,[e[7]||(e[7]=s("header",{class:"login-brand"},[s("span",{class:"brand-mark","aria-hidden":"true"},[s("i"),s("i")]),s("span",null,[s("strong",null,"零差云控"),s("small",null,"ZEROERR · 统一费用付款平台")])],-1)),s("div",I,[e[6]||(e[6]=s("section",{class:"login-copy","aria-describedby":"loginIntro"},[s("span",{class:"eyebrow login-eyebrow"},"企业登录"),s("h1",{id:"loginTitle"},"统一费用付款平台"),s("p",{id:"loginIntro"},"使用飞书账号登录,连接付款申请、审批、收单与付款办理。")],-1)),s("section",O,[e[3]||(e[3]=s("h2",{id:"loginCardTitle"},"飞书登录",-1)),e[4]||(e[4]=s("p",{id:"loginCardDescription"},"使用企业飞书账号完成安全身份验证。",-1)),u.value?(i(),n("div",U,[e[1]||(e[1]=s("span",{class:"login-spinner","aria-hidden":"true"},null,-1)),s("span",null,[e[0]||(e[0]=s("strong",null,"正在验证身份…",-1)),h.value?(i(),n("small",x,y(h.value),1)):b("",!0)])])):(i(),n("div",D,[o.value?(i(),n("div",M,[e[2]||(e[2]=s("b",{"aria-hidden":"true"},"!",-1)),s("span",null,y(o.value),1)])):b("",!0),s("button",{class:"btn primary login-submit",type:"button",disabled:l.value,"aria-busy":l.value,onClick:w},[l.value?(i(),n("span",V)):(i(),n("img",H)),R(" "+y(l.value?"正在前往飞书…":"使用飞书登录"),1)],8,N)])),e[5]||(e[5]=s("div",{class:"login-card-foot"}," 身份授权由飞书提供,本平台不存储飞书密码。通讯录同步用于员工资料与业务管理,不作为登录条件。 ",-1))])]),e[8]||(e[8]=s("footer",{class:"login-foot"},"零差云控 · ZEROERR · 统一费用付款平台",-1))])]))}});export{W as default};
+1
View File
@@ -0,0 +1 @@
import{d as L,u as E,a as C,o as R,E as f,c as l,b as s,t as v,e as w,f as F,g as S,h as A,r as y,i as M,j as r}from"./index-DU2fjqYh.js";const T="/assets/feishu-logo-BpH7Hif1.png",q=i=>{var t,u;const g=(u=(t=i==null?void 0:i.response)==null?void 0:t.data)==null?void 0:u.message;if(typeof g=="string"&&g.trim())return g.trim();const o=i==null?void 0:i.message;return typeof o=="string"&&o.trim()?o.trim():"登录失败,请重试"},B={class:"login-screen","aria-labelledby":"loginTitle"},I={class:"login-panel"},O={class:"login-layout"},U={class:"login-card","aria-labelledby":"loginCardTitle","aria-describedby":"loginCardDescription"},x={key:0,class:"login-loading",role:"status","aria-live":"polite"},D={key:0},N={key:1,class:"login-action"},V={key:0,class:"inline-alert danger",role:"alert"},H=["disabled","aria-busy"],Z={key:0,class:"login-button-spinner","aria-hidden":"true"},j={key:1,src:T,alt:""},z=L({__name:"Login",setup(i){const g=S(),o=A(),t=E(),u=C(),d=y(!1),c=y(!0),h=y(""),n=y(""),k=async()=>{const p=t.beginFeishuLogin();d.value=!0,n.value="";try{const e=await M.getAuthUrl(window.location.origin);if(!e.authUrl)throw new Error("获取飞书授权地址失败");window.location.assign(e.authUrl)}catch(e){const m=(e==null?void 0:e.message)==="获取飞书授权地址失败"?e.message:"暂时无法连接认证服务,请稍后重试";n.value=m,(e==null?void 0:e.message)==="获取飞书授权地址失败"&&f.error(e.message),t.clearFeishuLogin(p)}finally{d.value=!1}};return R(async()=>{const p=o.query.token,e=o.query.code,m=o.query.state,b=o.query.error;if((p||e||b||m)&&window.history.replaceState({},document.title,window.location.pathname),b){const a=sessionStorage.getItem("feishuOAuthAttempt");(!a||t.isCurrentFeishuLogin(a))&&(t.logout(),t.clearFeishuLogin(a)),u.reset(),c.value=!1,n.value="飞书授权未完成,请重新登录",f.error(n.value);return}if(e){const a=sessionStorage.getItem("feishuOAuthAttempt");h.value="正在交换授权码…";try{u.reset(),await t.feishuLogin(e,m,a||void 0),f.success("登录成功"),await g.replace("/applications")}catch(_){(!a||t.isCurrentFeishuLogin(a))&&(t.logout(),t.clearFeishuLogin(a)),u.reset(),c.value=!1,n.value=q(_),f.error(n.value)}return}c.value=!1}),(p,e)=>(r(),l("main",B,[s("div",I,[e[7]||(e[7]=s("header",{class:"login-brand"},[s("span",{class:"brand-mark","aria-hidden":"true"},[s("i"),s("i")]),s("span",null,[s("strong",null,"零差云控"),s("small",null,"ZEROERR · 统一费用付款平台")])],-1)),s("div",O,[e[6]||(e[6]=s("section",{class:"login-copy","aria-describedby":"loginIntro"},[s("span",{class:"eyebrow login-eyebrow"},"企业登录"),s("h1",{id:"loginTitle"},"统一费用付款平台"),s("p",{id:"loginIntro"},"使用飞书账号登录,连接付款申请、审批、收单与付款办理。")],-1)),s("section",U,[e[3]||(e[3]=s("h2",{id:"loginCardTitle"},"飞书登录",-1)),e[4]||(e[4]=s("p",{id:"loginCardDescription"},"使用企业飞书账号完成安全身份验证。",-1)),c.value?(r(),l("div",x,[e[1]||(e[1]=s("span",{class:"login-spinner","aria-hidden":"true"},null,-1)),s("span",null,[e[0]||(e[0]=s("strong",null,"正在验证身份…",-1)),h.value?(r(),l("small",D,v(h.value),1)):w("",!0)])])):(r(),l("div",N,[n.value?(r(),l("div",V,[e[2]||(e[2]=s("b",{"aria-hidden":"true"},"!",-1)),s("span",null,v(n.value),1)])):w("",!0),s("button",{class:"btn primary login-submit",type:"button",disabled:d.value,"aria-busy":d.value,onClick:k},[d.value?(r(),l("span",Z)):(r(),l("img",j)),F(" "+v(d.value?"正在前往飞书…":"使用飞书登录"),1)],8,H)])),e[5]||(e[5]=s("div",{class:"login-card-foot"}," 身份授权由飞书提供,本平台不存储飞书密码。通讯录同步用于员工资料与业务管理,不作为登录条件。 ",-1))])]),e[8]||(e[8]=s("footer",{class:"login-foot"},"零差云控 · ZEROERR · 统一费用付款平台",-1))])]))}});export{z as default};
-1
View File
@@ -1 +0,0 @@
.filter-card[data-v-9172a3a4]{margin-bottom:16px;padding:16px 22px}.log-filters[data-v-9172a3a4]{display:flex;flex-wrap:wrap;align-items:end;gap:16px}.log-filters .field[data-v-9172a3a4]{min-width:180px;flex:1 1 180px;gap:6px}.log-filters .btn[data-v-9172a3a4]{flex:0 0 auto}.log-method[data-v-9172a3a4]{display:inline-block;min-width:3.2em;margin-right:6px;font:700 11px var(--mono)}.log-method.is-get[data-v-9172a3a4]{color:var(--blue)}.log-method.is-post[data-v-9172a3a4]{color:var(--success)}.log-method.is-put[data-v-9172a3a4]{color:#b7791f}.log-method.is-delete[data-v-9172a3a4]{color:var(--danger)}.mono[data-v-9172a3a4]{font:600 12px var(--mono)}.log-detail[data-v-9172a3a4]{display:block;max-width:420px;color:var(--muted);overflow-wrap:anywhere}@media (max-width: 720px){.log-filters[data-v-9172a3a4]{flex-direction:column;align-items:stretch}.log-filters .btn[data-v-9172a3a4]{width:100%}.log-detail[data-v-9172a3a4]{max-width:none}}
+1
View File
@@ -0,0 +1 @@
.filter-card[data-v-b6ef6c1b]{margin-bottom:16px;padding:16px 22px;container-name:log-filter-card;container-type:inline-size}.log-filters[data-v-b6ef6c1b]{display:grid;min-width:0;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));align-items:end;gap:16px}.log-filters .field[data-v-b6ef6c1b]{min-width:0;gap:6px}.log-filters .btn[data-v-b6ef6c1b]{width:-moz-max-content;width:max-content;max-width:100%;justify-self:start}.scope-note[data-v-b6ef6c1b]{grid-column:1 / -1;color:var(--muted);font-size:11px}.log-method[data-v-b6ef6c1b]{display:inline-block;min-width:3.2em;margin-right:6px;font:700 11px var(--mono)}.log-operation[data-v-b6ef6c1b]{display:block;margin-bottom:4px;color:var(--navy)}.log-route[data-v-b6ef6c1b]{display:flex;min-width:0;align-items:center;gap:4px}.log-route small[data-v-b6ef6c1b]{min-width:0;overflow-wrap:anywhere}.log-method.is-get[data-v-b6ef6c1b]{color:var(--blue)}.log-method.is-post[data-v-b6ef6c1b]{color:var(--success)}.log-method.is-put[data-v-b6ef6c1b]{color:#b7791f}.log-method.is-delete[data-v-b6ef6c1b]{color:var(--danger)}.mono[data-v-b6ef6c1b]{font:600 12px var(--mono)}.log-detail[data-v-b6ef6c1b]{display:block;max-width:420px;color:var(--muted);overflow-wrap:anywhere}.trace-id[data-v-b6ef6c1b]{display:block;max-width:220px;color:var(--muted);font:600 10px var(--mono);overflow-wrap:anywhere}.load-more[data-v-b6ef6c1b]{display:flex;justify-content:center;padding:16px;border-top:1px solid var(--line)}.lane-empty[data-v-b6ef6c1b]{display:grid;justify-items:start;gap:10px;min-height:260px;align-content:center;padding:36px}.lane-empty strong[data-v-b6ef6c1b]{color:var(--navy);font-size:18px}.lane-empty p[data-v-b6ef6c1b]{max-width:680px;color:var(--muted);line-height:1.7}@container log-filter-card (max-width: 720px){.log-filters[data-v-b6ef6c1b]{grid-template-columns:minmax(0,1fr);align-items:stretch}.log-filters .btn[data-v-b6ef6c1b]{width:100%}.log-detail[data-v-b6ef6c1b]{max-width:none}}
-1
View File
@@ -1 +0,0 @@
import{d as L,o as M,c as o,b as t,q as f,G as U,F as b,x as m,v as z,s as O,t as e,m as h,p as P,H as y,e as A,r as p,M as B,j as n,n as k}from"./index-CXCTlxVW.js";import{u as F,_ as V}from"./useListPagination-BTBVezsP.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";const G={class:"page-content route-list-page"},I={class:"page-head"},N={class:"head-actions"},j=["disabled"],H={class:"card filter-card"},K={class:"log-filters"},R={class:"field"},$=["value"],q={class:"field"},J={class:"card fill-list-card primary-list-card"},Q={class:"card-head"},W={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"操作日志列表"},X={class:"data-table responsive-table"},Y={"data-label":"时间"},Z={"data-label":"操作人"},tt={"data-label":"分类"},st={class:"tag neutral"},lt={"data-label":"接口"},at={"data-label":"状态"},et={"data-label":"耗时"},nt={class:"mono"},ot={"data-label":"详情"},rt={class:"log-detail"},ut={key:1,class:"empty-state",role:"alert"},it={key:2,class:"empty-state"},dt={key:3,class:"load-wrap",role:"status"},pt=L({__name:"Logs",setup(ct){const r=p([]),u=p(!1),i=p(""),c=p(""),v=p(""),C=["接口访问","认证登录","报销申请","付款操作","收单操作","飞书通讯录","飞书集成","配置管理","人员权限","主数据","自动任务","系统日志"],{page:g,pageSize:_,paginatedItems:S}=F(r),T=a=>String(a||"").split(/\s+/)[0]||"—",x=a=>{const s=String(a||"").split(/\s+/);return s.length>1?s.slice(1).join(" "):"—"},E=a=>{const s=String(a||"").toUpperCase();return s==="GET"?"is-get":s==="POST"?"is-post":s==="PUT"||s==="PATCH"?"is-put":s==="DELETE"?"is-delete":""},w=a=>a==null?"neutral":a>=400?"danger":a>=200&&a<300?"success":"neutral",d=async()=>{u.value=!1,i.value="";try{const a={limit:200};c.value&&(a.category=c.value),v.value&&(a.operator=v.value),r.value=await B.get("/logs",{params:a})||[]}catch(a){i.value=a instanceof Error?a.message:"请求失败,请稍后重试。"}finally{u.value=!0}};return M(d),(a,s)=>(n(),o("div",G,[t("div",I,[s[4]||(s[4]=t("div",null,[t("span",{class:"eyebrow"},"OPERATION LOGS"),t("h1",null,"操作日志"),t("p",null,"记录变更类接口访问(不含查看),按时间倒序排列。")],-1)),t("div",N,[t("button",{class:"btn",type:"button",disabled:!u.value,onClick:d},"刷新",8,j)])]),t("div",H,[t("div",K,[t("label",R,[s[6]||(s[6]=t("span",null,"分类",-1)),f(t("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>c.value=l),class:"select",onChange:d},[s[5]||(s[5]=t("option",{value:""},"全部",-1)),(n(),o(b,null,m(C,l=>t("option",{key:l,value:l},e(l),9,$)),64))],544),[[U,c.value]])]),t("label",q,[s[7]||(s[7]=t("span",null,"操作人",-1)),f(t("input",{"onUpdate:modelValue":s[1]||(s[1]=l=>v.value=l),type:"search",placeholder:"姓名",autocomplete:"off",onKeyup:O(d,["enter"])},null,544),[[z,v.value,void 0,{trim:!0}]])]),t("button",{class:"btn primary",type:"button",onClick:d},"查询")])]),t("div",J,[t("div",Q,[s[8]||(s[8]=t("div",null,[t("h2",null,"接口访问记录"),t("p",null,"包含方法、路径、状态码与耗时。")],-1)),t("span",null,e(r.value.length)+" 条",1)]),u.value&&!i.value&&r.value.length?(n(),o("div",W,[t("table",X,[s[9]||(s[9]=t("thead",null,[t("tr",null,[t("th",null,"时间"),t("th",null,"操作人"),t("th",null,"分类"),t("th",null,"接口"),t("th",null,"状态"),t("th",null,"耗时"),t("th",null,"详情")])],-1)),t("tbody",null,[(n(!0),o(b,null,m(h(S),l=>(n(),o("tr",{key:l.id},[t("td",Y,[t("small",null,e(l.time||"—"),1)]),t("td",Z,[t("strong",null,e(l.operator||"匿名"),1)]),t("td",tt,[t("span",st,e(l.category||"接口访问"),1)]),t("td",lt,[t("strong",{class:k(["log-method",E(l.method)])},e(l.method||T(l.action)),3),t("small",null,e(l.path||x(l.action)),1)]),t("td",at,[t("span",{class:k(["tag",w(l.statusCode)])},e(l.statusCode??"—"),3)]),t("td",et,[t("span",nt,e(l.durationMs!=null?`${l.durationMs} ms`:"—"),1)]),t("td",ot,[t("small",rt,e(l.detail||"—"),1)])]))),128))])])])):i.value?(n(),o("div",ut,[s[10]||(s[10]=t("strong",null,"操作日志加载失败",-1)),t("span",null,e(i.value),1),t("button",{class:"btn small",type:"button",onClick:d},"重试")])):u.value?(n(),o("div",it,[...s[11]||(s[11]=[t("strong",null,"暂无操作日志",-1),t("span",null,"访问任意接口后会自动出现在这里。",-1)])])):(n(),o("div",dt,[...s[12]||(s[12]=[t("span",{class:"loader","aria-hidden":"true"},null,-1),t("span",null,"正在加载操作日志…",-1)])])),u.value&&!i.value&&r.value.length?(n(),P(V,{key:4,page:h(g),"onUpdate:page":s[2]||(s[2]=l=>y(g)?g.value=l:null),"page-size":h(_),"onUpdate:pageSize":s[3]||(s[3]=l=>y(_)?_.value=l:null),total:r.value.length,"aria-label":"操作日志分页"},null,8,["page","page-size","total"])):A("",!0)])]))}}),ht=D(pt,[["__scopeId","data-v-9172a3a4"]]);export{ht as default};
+1
View File
@@ -0,0 +1 @@
import{L as H,W as vt,X as pt,d as bt,k as yt,u as _t,o as mt,c as l,b as e,t as r,F as P,v as R,x as f,Y as J,M as kt,e as n,z as X,y as E,B as $,r as b,Z,_ as ft,j as o,n as z}from"./index-DU2fjqYh.js";import{_ as ht}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Q=u=>{if(u!=="OWN"&&u!=="ALL")throw new Error("审计读取范围无效")},q=u=>({...u.cursorTime?{cursorTime:u.cursorTime}:{},...u.cursorId!=null?{cursorId:u.cursorId}:{},...u.limit!=null?{limit:u.limit}:{}}),tt=u=>{if(u.cursorTime==null!=(u.cursorId==null))throw new Error("审计游标必须成对提供")},et=(u,d,p)=>{if(!u||typeof u!="object"||Array.isArray(u))throw new Error(`${p}响应格式无效`);const v=u;if(!Array.isArray(v.items)||typeof v.hasMore!="boolean")throw new Error(`${p}响应格式无效`);const k=v.items.map(d).filter(L=>L.id!=null),T=typeof v.nextEventTime=="string"?v.nextEventTime:void 0,c=typeof v.nextId=="number"||typeof v.nextId=="string"?v.nextId:void 0;if(v.hasMore&&(!T||c==null))throw new Error(`${p}游标缺失`);return{items:k,hasMore:v.hasMore,nextEventTime:T,nextId:c}},st={listAccess:async(u,d)=>{Q(d),tt(u);const p={...q(u),...d==="ALL"&&u.category?{category:u.category}:{},...d==="ALL"&&u.actorId!=null?{actorId:u.actorId}:{},...d==="ALL"&&u.operator?{operator:u.operator}:{},...d==="ALL"&&u.outcome?{outcome:u.outcome}:{}},v=await H.get("/logs/cursor",{params:p});return et(v,pt,"访问日志")},listAuditEvents:async(u,d,p)=>{if(Q(p),tt(d),!["security","business","integration"].includes(u))throw new Error("审计类别无效");const v={...q(d),...p==="ALL"&&d.actorId!=null?{actorId:d.actorId}:{},...p==="ALL"&&d.action?{action:d.action}:{},...p==="ALL"&&d.outcome?{outcome:d.outcome}:{},...p==="ALL"&&d.resourceType?{resourceType:d.resourceType}:{},...p==="ALL"&&d.resourceId?{resourceId:d.resourceId}:{}},k=await H.get(`/audit/events/${u}`,{params:v});return et(k,vt,"审计事件")}},gt={class:"page-content route-list-page"},Lt={class:"page-head"},It={class:"head-actions"},At={class:"tag info"},Et=["disabled"],Tt={class:"tabs",role:"tablist","aria-label":"日志类型"},wt=["id","aria-selected","onClick"],Ct={class:"card filter-card"},xt={class:"log-filters"},$t={key:0,class:"field"},St=["value"],Dt={key:1,class:"field"},Ut={key:2,class:"field"},Mt={key:3,class:"scope-note"},Vt={class:"card fill-list-card primary-list-card"},Ot={class:"card-head"},Pt={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"操作日志列表"},Rt={class:"data-table responsive-table"},zt={key:0},Bt={key:1},Ft={key:2},Nt={key:3},Wt={key:4},jt={key:5},Kt={key:6},Gt={key:0,"data-label":"时间"},Yt={key:1,"data-label":"操作人"},Ht={key:2,"data-label":"分类"},Jt={class:"tag neutral"},Xt={key:3,"data-label":"接口"},Zt={class:"log-operation"},Qt={class:"log-route"},qt={key:4,"data-label":"状态"},te={key:5,"data-label":"耗时"},ee={class:"mono"},se={key:6,"data-label":"追踪"},le={class:"trace-id"},oe={class:"trace-id"},ae={key:1,class:"empty-state",role:"alert"},ne={key:2,class:"empty-state"},re={key:3,class:"load-wrap",role:"status"},ue={key:4,class:"load-more"},ie=["disabled"],de={key:0,class:"card filter-card"},ce={key:0,class:"log-filters"},ve={class:"field"},pe={class:"field"},be={class:"field"},ye={class:"field"},_e={class:"field"},me={key:1,class:"scope-note"},ke={key:1,class:"card fill-list-card primary-list-card"},fe={class:"card-head"},he=["aria-label"],ge={class:"data-table responsive-table"},Le={key:0},Ie={key:1},Ae={key:2},Ee={key:3},Te={key:4},we={key:5},Ce={key:0,"data-label":"时间"},xe={key:1,"data-label":"操作者"},$e={key:2,"data-label":"动作"},Se={key:3,"data-label":"资源"},De={key:4,"data-label":"结果"},Ue={key:5,"data-label":"追踪"},Me={class:"trace-id"},Ve={class:"trace-id"},Oe={key:1,class:"empty-state",role:"alert"},Pe={key:2,class:"empty-state"},Re={key:3,class:"load-wrap",role:"status"},ze={key:4,class:"load-more"},Be=["disabled"],Fe={key:2,class:"card lane-empty",role:"alert"},Ne=bt({__name:"Logs",setup(u){const d=[{key:"access",label:"访问遥测"},{key:"security",label:"安全事件"},{key:"business",label:"业务审计"},{key:"integration",label:"集成审计"}],p=yt(),v=_t(),k=a=>ft(a,v.canRead,p.can),T=$(()=>d.filter(a=>k(a.key))),c=b(null),L=b([]),w=b([]),h=b(!1),I=b(!1),y=b(""),C=b(!1),D=b(),U=b(),B=b(""),F=b(""),A=b(""),N=b(""),M=b(""),W=b(""),j=b(""),lt=["接口访问","认证登录","报销申请","付款操作","收单操作","飞书通讯录","飞书集成","配置管理","人员权限","主数据","自动任务","系统日志"],x=$(()=>c.value!=null&&p.can(Z[c.value])),ot=$(()=>c.value!=null&&k(c.value)),at=$(()=>x.value?"全部操作人":ot.value?"仅本人":"无访问权限"),V=$(()=>{var a;return((a=d.find(t=>t.key===c.value))==null?void 0:a.label)||"审计事件"}),i=a=>v.canRead(`${c.value==="access"?"ui.logs":"ui.audit"}.column.${a}`),nt=$(()=>L.value);let S=0;const rt=a=>String(a||"").split(/\s+/)[0]||"—",ut=a=>{const t=String(a||"").split(/\s+/);return tLine truncated
+1
View File
@@ -0,0 +1 @@
import{d as qe,u as ze,w as pe,o as Ge,c as o,b as a,e as u,F as B,v as ne,x as y,y as C,t as d,s as ve,G as Ke,N as Ie,P as L,f as I,M as ye,z as Qe,$ as Xe,B as V,r as p,R as me,A as R,j as s,n as be,E as P,C as Ae,J as Je}from"./index-DU2fjqYh.js";import{_ as Ze}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{u as He}from"./useListPagination-j0ff6aFk.js";import{m as We}from"./searchProjection-BPQZhrH5.js";import{p as S}from"./payees-B0cC8O_i.js";import{_ as ea}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ie=b=>b.trim().replace(/[\s-]+/g,"").toUpperCase(),aa=(b,$,f=!0)=>{if(f&&(!Number.isInteger(b.userId)||Number(b.userId)<=0))return"请选择所属员工";if(!b.bankName.trim())return"请填写银行名称";const E=ie(b.accountNo||"");return!$&&!E?"请填写银行账号":E&&!/^[A-Z0-9]{6,100}$/.test(E)?"银行账号仅支持6至100位字母或数字":["ACTIVE","INACTIVE"].includes(b.status)?"":"请选择有效账户状态"},U=(b,$="请求失败,请稍后重试。")=>{var E,X;const f=(X=(E=b==null?void 0:b.response)==null?void 0:E.data)==null?void 0:X.message;return typeof f=="string"&&f.trim()?f:b instanceof Error&&b.message?b.message:$},ta={class:"page-content route-list-page"},la={class:"page-head"},sa=["disabled"],oa={class:"card fill-list-card primary-list-card"},na={class:"tabs",role:"tablist","aria-label":"付款对象类型"},ia=["aria-selected","onClick"],ua={class:"filter-bar list-toolbar"},da={class:"list-toolbar__filters"},ra={class:"filter-search"},ca=["placeholder"],pa={class:"list-toolbar__meta"},va={class:"tag info"},ya={key:0,class:"load-wrap",role:"status"},ma={key:1,class:"empty-state",role:"alert"},ba={key:2,class:"table-wrap",tabindex:"0",role:"region","aria-label":"付款对象列表"},fa={class:"data-table responsive-table payee-subject-table"},ga={key:0},_a={key:1},Ea={key:2},ka={key:3},ha={key:0,"data-label":"付款对象"},Na={"data-label":"类型"},Ca={class:"tag info"},Ia=["data-label"],Aa={key:1,"data-label":"收款账户"},Ta=["disabled","onClick"],wa={key:2,"data-label":"状态"},Pa={key:3,"data-label":"操作",class:"actions-cell"},Sa=["onClick"],Ma=["onClick"],Oa=["disabled","onClick"],xa={key:1},La={key:3,class:"empty-state"},Va={class:"modal-head","data-dialog-drag-handle":""},Ua={id:"subject-editor-title"},$a=["disabled"],Da={class:"modal-body"},Ya={key:0,class:"inline-alert danger",role:"alert"},Ba={class:"form-grid payee-subject-grid"},Ra={class:"field"},ja=["disabled"],Fa={key:0,class:"field"},qa=["disabled"],za={key:1,class:"field"},Ga=["aria-expanded","disabled"],Ka={key:0,id:"payee-employee-options",class:"employee-picker-menu",role:"listbox"},Qa=["aria-selected","disabled","onMousedown"],Xa={key:0},Ja={key:0,class:"employee-picker-empty"},Za={key:2,class:"field"},Ha=["disabled"],Wa={key:3,class:"field"},et=["disabled"],at={key:4,class:"field"},tt=["disabled"],lt={class:"field"},st=["disabled"],ot={class:"field"},nt=["disabled"],it={class:"field"},ut=["disabled"],dt={class:"modal-actions"},rt=["disabled"],ct=["disabled"],pt={class:"modal-head","data-dialog-drag-handle":""},vt=["disabled"],yt={class:"modal-body"},mt={key:0,class:"load-wrap compact"},bt={key:1,class:"account-grid"},ft={class:"account-summary"},gt={key:0,class:"account-branch"},_t={key:1,class:"tag success"},Et={key:0,class:"account-actions"},kt=["disabled","onClick"],ht=["disabled","onClick"],Nt=["disabled","onClick"],Ct={key:2,class:"empty-inline"},It={class:"modal-actions"},At=["disabled"],Tt=["disabled"],wt={class:"modal-head","data-dialog-drag-handle":""},Pt={id:"account-editor-title"},St=["disabled"],Mt={class:"modal-body"},Ot={key:0,class:"inline-alert danger",role:"alert"},xt={class:"form-grid"},Lt={class:"field"},Vt=["disabled"],Ut={class:"field"},$t=["disabled"],Dt={class:"field"},Yt={for:"account-number"},Bt={key:0},Rt=["required","placeholder","disabled"],jt={class:"field"},Ft=["disabled"],qt={class:"check-option"},zt=["disabled"],Gt={class:"modal-actions"},Kt=["disabled"],Qt=["disabled"],Xt=qe({__name:"Payees",setup(b){const $=ze(),f=t=>$.canRead(t),E=t=>$.canEdit(t),X=V(()=>E("dialog.payee.editor.save-finance")||E("dialog.payee.editor.save-admin")),J=V(()=>E("dialog.payee.editor.deactivate-finance")||E("dialog.payee.editor.deactivate-admin")),j=V(()=>f("dialog.payee.editor")&&X.value),Te=[{key:"EMPLOYEE",label:"员工"},{key:"SUPPLIER",label:"供应商"}],A=p([]),fe=p([]),k=p("EMPLOYEE"),Z=p(""),F=p(!1),q=p(""),i=p(!1),m=p(""),H=p(null),D=p([]),h=p(null),Y=p(""),z=p(null),W=p(null),ue=p(null),v=p(null),T=p(null),M=p(null),ee=p(null),ge=t=>({payeeType:t,employeeOpenId:null,identityNumber:"",displayName:"",supplierCreditCode:"",status:"ACTIVE"}),_e=()=>({bankName:"",branchName:"",accountNo:""}),Ee=()=>({bankName:"",branchName:"",accountNo:"",isDefault:!1,status:"ACTIVE"}),n=me(ge("EMPLOYEE")),g=me(_e()),r=me(Ee()),we=V(()=>({EMPLOYEE:A.value.filter(t=>t.payeeType==="EMPLOYEE").length,SUPPLIER:A.value.filter(t=>t.payeeType==="SUPPLIER").length})),GLine truncated
+1
View File
@@ -0,0 +1 @@
.actions-cell[data-v-b5556792],.account-actions[data-v-b5556792]{white-space:nowrap}.field.full[data-v-b5556792]{grid-column:1 / -1}.check-option[data-v-b5556792]{display:flex;align-items:center;gap:8px;align-self:end;min-height:42px}.account-grid[data-v-b5556792]{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.account-card[data-v-b5556792]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;min-width:0;padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.account-summary[data-v-b5556792]{display:flex;align-items:center;gap:10px;min-width:0}.account-summary strong[data-v-b5556792],.account-summary .account-branch[data-v-b5556792],.account-summary small[data-v-b5556792]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-summary strong[data-v-b5556792]{flex:0 1 180px}.account-summary .account-branch[data-v-b5556792]{flex:1 1 220px;color:var(--text)}.account-summary small[data-v-b5556792]{flex:0 1 150px;color:var(--muted)}.account-summary .tag[data-v-b5556792]{flex:0 0 auto}.account-actions[data-v-b5556792]{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0}.payee-accounts-dialog[data-v-b5556792]{width:min(920px,calc(100vw - 32px))}.empty-inline[data-v-b5556792]{padding:8px;color:var(--muted);text-align:center}.load-wrap.compact[data-v-b5556792]{min-height:80px}.payee-subject-grid[data-v-b5556792]{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.payee-subject-grid .field[data-v-b5556792]{width:100%;min-width:0}.payee-subject-grid input[data-v-b5556792],.payee-subject-grid select[data-v-b5556792]{width:100%;min-height:42px;box-sizing:border-box}.employee-picker[data-v-b5556792]{position:relative;width:100%;min-width:0}.employee-picker-menu[data-v-b5556792]{position:absolute;z-index:20;top:calc(100% + 4px);right:0;left:0;max-height:min(280px,38vh);margin:0;padding:5px;overflow:auto;list-style:none;border:1px solid var(--line-strong);border-radius:7px;background:#fff;box-shadow:0 12px 30px #102a432e}.employee-picker-menu button[data-v-b5556792]{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:36px;padding:7px 10px;border:0;border-radius:5px;background:transparent;color:var(--body);text-align:left}.employee-picker-menu button small[data-v-b5556792]{flex:0 0 auto;color:var(--muted);font-size:12px}.employee-picker-menu button[data-v-b5556792]:disabled{cursor:not-allowed;opacity:.68}.employee-picker-menu button[data-v-b5556792]:hover,.employee-picker-menu button[aria-selected=true][data-v-b5556792]{background:var(--blue-soft);color:var(--blue)}.employee-picker-empty[data-v-b5556792]{padding:9px 10px;color:var(--muted);font-size:12px}.section-divider[data-v-b5556792]{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;margin-top:4px;padding-top:14px;border-top:1px solid var(--line)}.section-divider span[data-v-b5556792]{font-weight:700;color:var(--text)}@media (max-width: 760px){.payee-subject-grid[data-v-b5556792]{grid-template-columns:minmax(0,1fr)}.account-card[data-v-b5556792]{grid-template-columns:minmax(0,1fr);gap:10px}.account-summary[data-v-b5556792]{flex-wrap:wrap}.account-summary strong[data-v-b5556792],.account-summary .account-branch[data-v-b5556792],.account-summary small[data-v-b5556792]{flex:1 1 140px}.account-actions[data-v-b5556792]{justify-content:flex-start;flex-wrap:wrap}}
-1
View File
@@ -1 +0,0 @@
import{d as f,o as y,c as e,b as a,F as k,x as h,m as c,t as o,p as C,H as _,e as x,r as g,M as z,j as t,n as b}from"./index-CXCTlxVW.js";import{u as E,_ as w}from"./useListPagination-BTBVezsP.js";const B={class:"page-content route-list-page"},S={class:"card fill-list-card primary-list-card"},A={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"付款对象列表"},D={class:"data-table responsive-table"},M={"data-label":"账户名称"},N={"data-label":"银行"},P={"data-label":"账号"},V={"data-label":"默认"},F={"data-label":"状态"},I={key:1,class:"empty-state",role:"alert"},L={key:2,class:"empty-state"},U={key:3,class:"load-wrap",role:"status"},T=f({__name:"Payees",setup(j){const u=g([]),r=g(!1),n=g(""),{page:d,pageSize:i,paginatedItems:m}=E(u),v=async()=>{r.value=!1,n.value="";try{u.value=await z.get("/metadata/payees")||[]}catch(p){n.value=p instanceof Error?p.message:"请求失败,请稍后重试。"}finally{r.value=!0}};return y(v),(p,l)=>(t(),e("div",B,[l[6]||(l[6]=a("div",{class:"page-head"},[a("div",null,[a("span",{class:"eyebrow"},"PAYEES"),a("h1",null,"付款对象"),a("p",null,"管理收款方账户信息。")])],-1)),a("div",S,[r.value&&!n.value&&u.value.length>0?(t(),e("div",A,[a("table",D,[l[2]||(l[2]=a("thead",null,[a("tr",null,[a("th",null,"账户名称"),a("th",null,"银行"),a("th",null,"账号"),a("th",null,"默认"),a("th",null,"状态")])],-1)),a("tbody",null,[(t(!0),e(k,null,h(c(m),s=>(t(),e("tr",{key:s.id},[a("td",M,[a("strong",null,o(s.name),1)]),a("td",N,[a("small",null,o(s.bankName),1)]),a("td",P,[a("small",null,o(s.bankAccountMask||"已脱敏"),1)]),a("td",V,[a("span",{class:b(["tag",s.isDefault?"success":"draft"])},o(s.isDefault?"默认":"否"),3)]),a("td",F,[a("span",{class:b(["tag",s.status==="ACTIVE"?"success":"draft"])},o(s.status),3)])]))),128))])])])):n.value?(t(),e("div",I,[l[3]||(l[3]=a("strong",null,"付款对象加载失败",-1)),a("span",null,o(n.value),1),a("button",{class:"btn small",type:"button",onClick:v},"重试")])):r.value?(t(),e("div",L,[...l[4]||(l[4]=[a("strong",null,"暂无付款对象",-1)])])):(t(),e("div",U,[...l[5]||(l[5]=[a("span",{class:"loader","aria-hidden":"true"},null,-1),a("span",null,"正在加载付款对象…",-1)])])),r.value&&!n.value&&u.value.length?(t(),C(w,{key:4,page:c(d),"onUpdate:page":l[0]||(l[0]=s=>_(d)?d.value=s:null),"page-size":c(i),"onUpdate:pageSize":l[1]||(l[1]=s=>_(i)?i.value=s:null),total:u.value.length,"aria-label":"付款对象列表分页"},null,8,["page","page-size","total"])):x("",!0)])]))}});export{T as default};
+1
View File
@@ -0,0 +1 @@
import{d as te,u as ae,o as se,c as l,p as O,q as le,b as t,x as v,y as A,M,F as g,v as h,t as u,e as d,P as J,n as Z,f as k,r as p,R as oe,B as b,j as o,$ as ne,A as de,E as B,C as ie,J as ue}from"./index-DU2fjqYh.js";import{_ as ce,b as V,a as re}from"./business-config-CDFDGnOE.js";const pe={class:"page-content route-list-page prototype-config-page"},ve={class:"card fill-list-card primary-list-card prototype-config-card"},me={class:"prototype-filter-bar"},ye=["value"],be={class:"prototype-result-count"},_e={key:0,class:"prototype-loading"},ge={key:1,class:"prototype-error"},he={key:2,class:"table-wrap"},ke={class:"data-table prototype-table"},fe={key:0},Ce={key:1},Ne={key:2},Ee={key:3},Ie={key:4},Ae={key:5},Me={key:6},Ve={key:0},Te={key:1},Le={key:2},xe={key:3},Ue={class:"prototype-cell-stack"},$e={key:0},Se={key:1},qe={key:4},Be={key:5},Fe={key:0},Pe={key:1},Re={key:6},De=["disabled","onClick"],Ye={key:1},je={key:3,class:"prototype-empty"},ze={class:"modal-head","data-dialog-drag-handle":""},Oe=["disabled"],Je={class:"modal-body"},Ze={key:0,class:"prototype-form-error"},Ge={class:"prototype-form-grid"},He=["disabled"],Ke=["value"],Qe={key:0,class:"field"},We=["disabled"],Xe={class:"field"},we=["disabled"],et={class:"field"},tt=["disabled"],at={class:"field"},st=["disabled"],lt=["value"],ot={class:"field full"},nt={class:"prototype-check-grid"},dt=["value","disabled"],it={class:"modal-actions"},ut=["disabled"],ct=["disabled"],mt=te({__name:"PaymentAccounts",setup(rt){const y=ae(),_=p([]),T=p([]),F=p([]),P=p([]),L=p(""),f=p("ALL"),C=p("ALL"),x=p(!1),N=p(""),r=p(!1),m=p(""),U=p(null),E=p(null),n=oe({legalEntityId:null,branchName:"",bankName:"",accountNo:"",currencyCode:"CNY",paymentMethodIds:[]}),R=b(()=>y.canEdit("ui.payment-accounts.create")&&["legalEntityId","bankName","accountNo","currencyCode","paymentMethodIds"].every(s=>y.canEdit(`dialog.payment-accounts.create.${s}`))),G=b(()=>y.canEdit("ui.payment-accounts.deactivate")),i=s=>y.canRead(`ui.payment-accounts.column.${s}`),D=s=>y.canRead(`dialog.payment-accounts.create.${s}`),H=s=>y.canEdit(`dialog.payment-accounts.create.${s}`),K=b(()=>T.value.filter(s=>s.status==="ACTIVE")),Q=b(()=>F.value.filter(s=>s.status==="ACTIVE")),W=b(()=>P.value.filter(s=>s.status==="ACTIVE")),$=(s,e)=>s instanceof Error&&s.message?s.message:e,S=b(()=>{const s=L.value.toLocaleLowerCase();return _.value.filter(e=>(C.value==="ALL"||e.status===C.value)&&(f.value==="ALL"||String(e.legalEntityId)===f.value)&&(!s||[e.code,e.legalEntityName,e.branchName,e.bankName,e.accountNoMask,e.currencyCode,...(e.paymentMethods||[]).map(c=>c.name)].some(c=>String(c||"").toLocaleLowerCase().includes(s)))).sort((e,c)=>e.code.localeCompare(c.code,"zh-CN"))}),Y=async()=>{x.value=!0,N.value="";try{const[s,e]=await Promise.all([V.paymentAccounts(),V.references()]);_.value=s,T.value=e.legalEntities||[],F.value=e.currencies||[],P.value=e.paymentMethods||[]}catch(s){N.value=$(s,"付款账户加载失败")}finally{x.value=!1}},X=async()=>{var s;Object.assign(n,{legalEntityId:null,branchName:"",bankName:"",accountNo:"",currencyCode:"CNY",paymentMethodIds:[]}),m.value="",await de(),(s=E.value)==null||s.showModal()},q=()=>{var s;r.value||(s=E.value)==null||s.close()},w=async()=>{var c;const s=n.accountNo.replace(/[\s-]+/g,""),e=n.branchName.trim();if(!n.legalEntityId||!n.bankName||!s||!n.currencyCode||!n.paymentMethodIds.length)return void(m.value="请完整填写付款账户,并至少选择一种付款方式");if(!/^[0-9A-Za-z]{6,64}$/.test(s))return void(m.value="银行账号格式不正确");r.value=!0,m.value="";try{const a=await V.create("payment-accounts",{legalEntityId:n.legalEntityId,branchName:e||null,bankName:n.bankName,accountNo:s,currencyCode:n.currencyCode,paymentMethodIds:[...n.paymentMethodIds]});_.value.push(a),(c=E.value)==null||c.close(),B.success("付款账户已新增")}catch(a){m.value=$(a,"保存失败,请稍后重试")}finally{r.value=!1}},ee=async s=>{const e=s.status==="ACTIVE"?"INACTIVE":"ACTIVE";try{await ie.confirm(`确认${e==="ACTIVE"?"启用":"停用"}“${s.code}”?`,"状态确认",{type:"warning"})}catch{return}U.value=s.id;try{const c=await V.changeStatus("payment-accounts",s.id,e);_.value.splice(_.value.findIndex(a=>a.id===s.id),1,c),B.success(`付款账户已${e==="ACTIVE"?"启用":"停用"}`)}catch(c){B.error($(c,"状态更新失败"))}finally{U.value=null}};return se(()=>{Y()}),(s,e)=>{const c=ue("dialog-drag");return o(),l("div",pe,[O(ce,{eyebrow:"PAYMENT ACCOUNTS",title:"公司付款账户",description:"维护本公司各法人及分公司用于实际付款的银行账户;与付款对象的收款账户分开管理。"},{default:le(()=>[R.value?(o(),l("button",{key:0,class:"btn primary",onClick:X}," + 新增付款账户 ")):d("",!0)]),_:1}),e[23]||(e[23]=t("div",{class:"prototype-governance-note"},[t("strong",null,"安全与适用范围"),t("span",null,"账号加密保存、列表仅显示脱敏值;每个账户必须指定法人、币种和至少一种允Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as w,u as O,o as R,c as a,p as S,q as j,b as e,x as y,y as A,M as z,t as p,e as n,F,v as H,P as $,f as D,r,R as Y,B as M,j as o,n as J,A as G,E as I,C as K,J as Q}from"./index-DU2fjqYh.js";import{_ as W,b as x,a as X}from"./business-config-CDFDGnOE.js";const Z={class:"page-content route-list-page prototype-config-page"},ee={class:"card fill-list-card primary-list-card prototype-config-card"},te={class:"prototype-filter-bar"},se={class:"prototype-result-count"},ae={key:0,class:"prototype-loading"},oe={key:1,class:"prototype-error"},le={key:2,class:"table-wrap"},ne={class:"data-table prototype-table"},ie={key:0},de={key:1},re={key:2},ue={key:3},ce={key:0},pe={key:1},ve={key:2},me={key:3},ye=["disabled","onClick"],_e={key:1},ge={key:3,class:"prototype-empty"},be={class:"modal-head","data-dialog-drag-handle":""},fe=["disabled"],he={class:"modal-body"},ke={key:0,class:"prototype-form-error"},Ce={class:"prototype-form-grid"},Ee={class:"field full"},Te=["disabled"],Ve={class:"field full"},Ae=["disabled"],Me={class:"modal-actions"},Ie=["disabled"],xe=["disabled"],De=w({__name:"PaymentMethods",setup(Le){const _=O(),m=r([]),h=r(""),g=r("ALL"),k=r(!1),b=r(""),i=r(!1),v=r(""),C=r(null),f=r(null),u=Y({name:"",description:""}),L=M(()=>_.canEdit("ui.payment-methods.create")&&["name","description"].every(s=>_.canEdit(`dialog.payment-methods.create.${s}`))),B=M(()=>_.canEdit("ui.payment-methods.deactivate")),c=s=>_.canRead(`ui.payment-methods.column.${s}`),E=(s,t)=>s instanceof Error&&s.message?s.message:t,T=M(()=>{const s=h.value.toLocaleLowerCase();return m.value.filter(t=>(g.value==="ALL"||t.status===g.value)&&(!s||[t.code,t.name,t.description].some(d=>String(d||"").toLocaleLowerCase().includes(s)))).sort((t,d)=>t.code.localeCompare(d.code,"zh-CN"))}),N=async()=>{k.value=!0,b.value="";try{m.value=await x.paymentMethods()}catch(s){b.value=E(s,"付款方式加载失败")}finally{k.value=!1}},P=async()=>{var s;Object.assign(u,{name:"",description:""}),v.value="",await G(),(s=f.value)==null||s.showModal()},V=()=>{var s;i.value||(s=f.value)==null||s.close()},U=async()=>{var s;if(!u.name||!u.description)return void(v.value="请完整填写付款方式和适用说明");i.value=!0,v.value="";try{const t=await x.create("payment-methods",{...u});m.value.push(t),(s=f.value)==null||s.close(),I.success("付款方式已新增")}catch(t){v.value=E(t,"保存失败,请稍后重试")}finally{i.value=!1}},q=async s=>{const t=s.status==="ACTIVE"?"INACTIVE":"ACTIVE";try{await K.confirm(`确认${t==="ACTIVE"?"启用":"停用"}“${s.name}”?`,"状态确认",{type:"warning"})}catch{return}C.value=s.id;try{const d=await x.changeStatus("payment-methods",s.id,t);m.value.splice(m.value.findIndex(l=>l.id===s.id),1,d),I.success(`付款方式已${t==="ACTIVE"?"启用":"停用"}`)}catch(d){I.error(E(d,"状态更新失败"))}finally{C.value=null}};return R(()=>{N()}),(s,t)=>{const d=Q("dialog-drag");return o(),a("div",Z,[S(W,{eyebrow:"PAYMENT METHODS",title:"付款方式",description:"维护登记付款时允许选择的方式;停用后不再出现在登记付款表单中。"},{default:j(()=>[L.value?(o(),a("button",{key:0,class:"btn primary",onClick:P}," + 新增付款方式 ")):n("",!0)]),_:1}),t[12]||(t[12]=e("div",{class:"prototype-governance-note"},[e("strong",null,"编码规则"),e("span",null,"付款方式编码由系统在保存时统一生成,无需手工填写。")],-1)),e("section",ee,[e("div",te,[y(e("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>h.value=l),type:"search",placeholder:"搜索付款方式或适用说明"},null,512),[[A,h.value,void 0,{trim:!0}]]),y(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>g.value=l)},[...t[4]||(t[4]=[e("option",{value:"ALL"},"全部状态",-1),e("option",{value:"ACTIVE"},"启用",-1),e("option",{value:"INACTIVE"},"停用",-1)])],512),[[z,g.value]]),t[5]||(t[5]=e("span",{class:"prototype-filter-spacer"},null,-1)),e("span",se,"共 "+p(T.value.length)+" 种",1)]),k.value?(o(),a("div",ae,[...t[6]||(t[6]=[e("span",{class:"loader"},null,-1),e("span",null,"正在加载付款方式…",-1)])])):b.value?(o(),a("div",oe,[e("span",null,p(b.value),1),e("button",{class:"btn small",onClick:N},"重试")])):T.value.length?(o(),a("div",le,[e("table",ne,[e("thead",null,[e("tr",null,[c("code")?(o(),a("th",ie,"方式编码")):n("",!0),c("name")?(o(),a("th",de,"付款方式")):n("",!0),c("description")?(o(),a("th",re,"适用说明")):n("",!0),c("status")?(o(),a("th",ue,"状态")):n("",!0),t[7]||(t[7]=e("th",null,"操作",-1))])]),e("tbody",null,[(o(!0),a(F,null,H(T.value,l=>(o(),a("tr",{key:l.id},[c("code")?(o(),a("td",ce,[e("strong",null,p(l.code),1)])):n("",!0),c("name")?(o(),a("td",pe,p(l.name),1)):n("",!0),c("description")?(o(),a("td",ve,p(l.description),1)):n("",!0),c("status")?(o(),a("td",me,[S(X,{active:l.status==="ACTIVE"},null,8,["active"])])):n("",!0),e("td",null,[B.value?(o(),a("button",{key:0,class:J(["prototype-table-action",{danger:l.status==="ACTIVE"}]),disabled:C.value===l.id,onClick:Ne=Line truncated
-1
View File
@@ -1 +0,0 @@
import{d as se,a as ne,u as oe,o as ie,c as i,b as e,k as R,l as q,F as H,e as w,t as n,q as S,v as P,x as ue,m as d,p as re,H as Y,I as j,f as A,r as c,y as v,B as de,j as o,n as pe,A as ce,E as ve,D as me}from"./index-CXCTlxVW.js";import{u as be,_ as ye}from"./useListPagination-BTBVezsP.js";import{_ as fe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ge={class:"page-content route-list-page"},_e={class:"page-head"},ke={class:"head-actions"},he=["disabled"],Ce={key:0,class:"load-wrap",role:"status","aria-live":"polite"},Ne={key:1,class:"card empty-state",role:"alert"},Ee={key:0,class:"inline-alert",role:"status","aria-live":"polite"},xe={class:"finance-kpis"},we={class:"card fill-list-card primary-list-card"},Se={class:"filter-bar"},Be={class:"filter-search"},De={class:"tag info","aria-live":"polite"},$e={key:0,class:"table-wrap"},Fe={class:"data-table responsive-table","aria-label":"付款登记队列"},Pe={"data-label":"报销单号"},Ae={"data-label":"报销人 / 收款人"},Me={"data-label":"申请金额",class:"amount"},Ue={"data-label":"累计已付",class:"amount"},ze={"data-label":"未付余额",class:"amount"},Le={"data-label":"收单状态"},Ve={class:"tag success"},Qe={"data-label":"付款状态"},Te={"data-label":"操作"},Ie=["disabled","aria-busy","onClick"],Re={key:1,class:"muted-copy"},qe={key:2,class:"muted-copy"},He={key:1,class:"empty-state"},Ye={key:2,class:"empty-state"},je={class:"modal-head","data-dialog-drag-handle":""},Ke={id:"payment-dialog-description"},Oe=["disabled"],We={class:"modal-body payment-dialog-body"},Ge={class:"payment-summary"},Je={class:"form-grid payment-fields"},Xe={class:"field"},Ze=["max","aria-invalid"],ea={id:"pay-amount-help",class:"form-help"},aa={class:"field full"},la={key:0,id:"payment-form-error",class:"amount-error",role:"alert"},ta={class:"modal-actions"},sa=["disabled"],na=["disabled","aria-busy"],oa=se({__name:"Payments",setup(ia){const s=ne(),K=oe(),B=v(()=>K.canEdit("finance.payment.register")),k=c(""),y=c(!1),u=c(null),b=c(null),h=c(0),C=c(""),M=c(""),r=c(!1),m=c("");let D=null;const N=v(()=>s.reimbursements.filter(l=>l.receiptStatus==="已收单")),U=v(()=>N.value.filter(l=>s.balance(l)>0)),O=v(()=>N.value.filter(l=>s.balance(l)<=0)),W=v(()=>U.value.reduce((l,a)=>l+s.balance(a),0)),f=v(()=>{const l=k.value.trim().toLowerCase();return N.value.filter(a=>`${a.applicationNo} ${a.applicantName} ${a.title} ${a.payeeName}`.toLowerCase().includes(l))}),{page:$,pageSize:F,paginatedItems:G}=be(f,{resetSources:[k]}),z=v(()=>s.loading||!y.value),L=v(()=>y.value&&(s.source==="error"||!!s.financeQueueError)),J=v(()=>y.value&&!!s.error&&!L.value),p=l=>`¥ ${Number(l||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,X=l=>({未付款:"neutral",部分付款:"info",已付款:"success"})[l]||"neutral",E=async()=>{y.value=!1,s.error="",s.financeQueueError="",await s.loadFinanceQueue("payment"),y.value=!0},Z=async l=>{var a;!B.value||r.value||(D=document.activeElement instanceof HTMLElement?document.activeElement:null,u.value=l,h.value=Number(s.balance(l).toFixed(2)),C.value="",M.value=`reim-${l.id}-${Number(s.balance(l).toFixed(2)).toFixed(2)}`,m.value="",b.value&&(b.value.open||b.value.showModal(),await ce(),(a=document.getElementById("pay-amount"))==null||a.focus()))},V=()=>{const l=D;D=null,u.value=null,l!=null&&l.isConnected&&l.focus()},g=()=>{var l;r.value||((l=b.value)!=null&&l.open&&b.value.close(),V())},ee=()=>V(),ae=l=>{l.preventDefault(),r.value||g()},le=l=>{if(r.value){l.preventDefault();return}g()},te=async()=>{if(!B.value||!u.value||r.value)return;const l=s.balance(u.value),a=Number(h.value);if(!Number.isFinite(a)||!(a>0)||a>l+.005){m.value=`付款金额须大于 0 且不超过未付余额 ${p(l)}`;return}r.value=!0,m.value="";let _=!1;try{await s.pay(u.value.id,Number(a.toFixed(2)),C.value.trim(),M.value),_=!0}catch(x){m.value=x instanceof Error?x.message:"付款失败,请检查后重试"}finally{r.value=!1}_&&(g(),ve.success("付款记录已登记"))};return ie(()=>{E()}),(l,a)=>{const _=de("router-link"),x=me("dialog-drag");return o(),i("div",ge,[e("div",_e,[a[6]||(a[6]=e("div",null,[e("span",{class:"eyebrow"},"PAYMENT QUEUE"),e("h1",null,"待付款"),e("p",null,"收单完成后进入付款队列,支持分次付款并保留付款凭据。")],-1)),e("div",ke,[e("button",{class:"btn",type:"button",disabled:z.value,onClick:E},"刷新",8,he),R(_,{class:"btn primary",to:"/finance-receipt"},{default:q(()=>[...a[5]||(a[5]=[A("返回待收单",-1)])]),_:1})])]),z.value?(o(),i("div",Ce,[...a[7]||(a[7]=[e("span",{class:"loader","aria-hidden":"true"},null,-1),e("p",null,"正在读取付款队列…",-1)])])):L.value?(o(),i("div",Ne,[a[8]||(a[8]=e("strong",null,"付款队列暂时无法加载",-1)),a[9]||(a[9]=e("span",null,"请检查网络连接后重试,系统不会以空列表代替异常数据。",-1)),e("button",{class:"btn",type:"button",onClick:E},"重新加载")])):(o(),i(H,{key:2},[J.value?(o(),i("div",Ee,[a[10]||(a[10]=e("b",{"aria-hidLine truncated
-1
View File
@@ -1 +0,0 @@
.payment-dialog-body[data-v-2bb72ae8]{background:#fff}.payment-summary[data-v-2bb72ae8]{overflow:hidden;border-color:#d7e0e8;border-radius:6px}.payment-summary>div[data-v-2bb72ae8]{padding:12px 14px;background:var(--surface-raised)}.payment-summary>div[data-v-2bb72ae8]:last-child{background:var(--blue-soft)}.payment-summary strong[data-v-2bb72ae8]{color:var(--navy);font-size:15px}.payment-summary>div:last-child strong[data-v-2bb72ae8]{color:var(--blue-dark)}.payment-fields[data-v-2bb72ae8]{grid-template-columns:1fr;gap:14px;padding:15px 0 0}.payment-fields .field[data-v-2bb72ae8]:first-child{max-width:310px}.payment-fields textarea[data-v-2bb72ae8]{min-height:78px}.amount-error[data-v-2bb72ae8]{margin:12px 0 0;padding:9px 11px;border-left:3px solid var(--danger);background:var(--danger-soft)}@media (max-width: 560px){.payment-summary[data-v-2bb72ae8]{grid-template-columns:1fr}.payment-fields .field[data-v-2bb72ae8]:first-child{max-width:none}.payment-dialog .modal-actions[data-v-2bb72ae8]{flex-direction:column-reverse}.payment-dialog .modal-actions .btn[data-v-2bb72ae8]{width:100%;min-height:44px}}
-1
View File
@@ -1 +0,0 @@
.feishu-fields[data-v-f631eabb]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;padding:20px 22px 22px}.dynamic-field[data-v-f631eabb]{min-width:0}.expense-field[data-v-f631eabb],.display-field[data-v-f631eabb],.unsupported-field[data-v-f631eabb]{grid-column:1 / -1}.expense-field[data-v-f631eabb]{display:flex;flex-direction:column;gap:16px;margin:8px 0 0;padding:20px 0 0;border-top:1px solid var(--line)}.expense-field .expense-items[data-v-f631eabb]{padding:0}.expense-field .expense-item[data-v-f631eabb]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 20px;align-items:start;padding:16px}.expense-field .expense-item>.field[data-v-f631eabb]{min-width:0}.expense-field .expense-item>.attachment-field[data-v-f631eabb]{grid-column:1 / -1}.expense-field .remove-item[data-v-f631eabb]{grid-column:1 / -1;justify-self:end;margin-top:0}.expense-field .amount-summary[data-v-f631eabb]{margin:4px 0 0}.amount-control-wrap[data-v-f631eabb]{display:flex;flex-direction:column;gap:6px;min-width:0}.amount-control[data-v-f631eabb]{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:8px;align-items:center}.amount-control select[data-v-f631eabb]{min-height:var(--control-height)}.amount-mismatch-tip[data-v-f631eabb]{display:block;margin-top:6px}.department-picker[data-v-f631eabb]{position:relative}.department-menu[data-v-f631eabb]{position:absolute;z-index:5;top:calc(100% + 4px);right:0;left:0;max-height:240px;margin:0;padding:6px;overflow:auto;list-style:none;border:1px solid var(--line);border-radius:6px;background:#fff;box-shadow:var(--card-shadow)}.department-menu button[data-v-f631eabb]{width:100%;padding:8px 10px;border:0;border-radius:4px;background:transparent;text-align:left}.department-menu button[data-v-f631eabb]:hover{background:var(--blue-soft);color:var(--blue)}.department-empty[data-v-f631eabb]{padding:8px 10px;color:var(--muted)}.compact-title[data-v-f631eabb]{margin:0;padding:0;border-bottom:0}.compact-title h3[data-v-f631eabb]{margin:0;font-size:15px}.compact-title em[data-v-f631eabb]{color:var(--danger);font-style:normal}.display-field[data-v-f631eabb],.unsupported-field[data-v-f631eabb]{padding:16px 18px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.display-field p[data-v-f631eabb]{margin:8px 0 0;color:var(--muted);white-space:pre-wrap;line-height:1.65}.unsupported-field[data-v-f631eabb]{display:flex;flex-direction:column;gap:6px;border-color:#e5bfbc;background:var(--danger-soft);color:var(--danger)}.expense-child-warning[data-v-f631eabb]{margin:0}.field-error[data-v-f631eabb]{color:var(--danger)}.field [aria-invalid=true][data-v-f631eabb]{border-color:var(--danger)}.attachment-field[data-v-f631eabb]{grid-column:1 / -1}.attachment-input[data-v-f631eabb]{padding:10px}.attachment-list[data-v-f631eabb]{display:flex;margin:10px 0 0;padding:0;flex-direction:column;gap:8px;list-style:none}.attachment-list li[data-v-f631eabb]{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.attachment-list li>div[data-v-f631eabb]{min-width:0}.attachment-list strong[data-v-f631eabb],.attachment-list small[data-v-f631eabb]{display:block;overflow-wrap:anywhere}.attachment-list small[data-v-f631eabb]{margin-top:3px;color:var(--quiet)}.attachment-list .is-failed[data-v-f631eabb]{border-color:#e5bfbc;background:var(--danger-soft)}.attachment-list .is-failed small[data-v-f631eabb]{color:var(--danger)}.attachment-remove[data-v-f631eabb]{border:0;background:transparent;color:var(--danger);cursor:pointer;font:inherit}.attachment-remove[data-v-f631eabb]:disabled{cursor:wait;opacity:.6}select[multiple][data-v-f631eabb]{min-height:104px}.sr-only[data-v-f631eabb]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (max-width: 680px){.feishu-fields[data-v-f631eabb]{grid-template-columns:1fr;gap:18px;padding:16px}.dynamic-field[data-v-f631eabb]{grid-column:1}.expense-field .expense-item[data-v-f631eabb],.amount-control[data-v-f631eabb]{grid-template-columns:1fr}}.application-form[data-v-b41a0b46]{display:flex;flex-direction:column;gap:18px}.application-form[data-v-b41a0b46] .page-head{margin-bottom:0}.application-form[data-v-b41a0b46] .step-rail,.application-form[data-v-b41a0b46] .inline-alert{margin:0}.form-page[data-v-b41a0b46]{display:flex;flex-direction:column;gap:16px}.form-page .section-card[data-v-b41a0b46]{margin:0}.form-page .section-gap[data-v-b41a0b46]{margin-top:0}.form-page[data-v-b41a0b46] .form-grid{gap:16px 20px;padding:20px 22px 22px}.form-page[data-v-b41a0b46] .field{gap:8px}.definition-bar[data-v-b41a0b46]{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;margin:0;padding:14px 18px;border:1px solid #bfd3e8;border-radius:8px;background:var(--blue-soft);color:var(--blue);font-size:12px}.definition-state[data-v-b41a0b46]{display:flex;min-heightLine truncated
-1
View File
@@ -1 +0,0 @@
import{d as lt,o as ut,c as i,F as x,x as R,r as I,j as l,b as s,f as O,t as E,e as T,n as Ie,m as It,q as z,v as ie,I as dt,y as N,J as Te,K as qe,u as Nt,a as kt,w as Je,k as Ze,l as it,L as Ct,G as $t,A as Qe,E as et,B as Pt,g as Lt,h as Mt,D as Dt}from"./index-CXCTlxVW.js";import{f as Ot}from"./feishuDirectory-BmPyCMe4.js";import{_ as ct}from"./_plugin-vue_export-helper-DlAUqK2U.js";const xt=50*1024*1024,wt=".pdf,.png,.jpg,.jpeg,.doc,.docx,.xls,.xlsx,application/pdf,image/png,image/jpeg,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",Ft=new Set(["pdf","png","jpg","jpeg","doc","docx","xls","xlsx"]),qt=p=>(p==null?void 0:p.id)==null||!p.fileName?null:{id:p.id,fileName:p.fileName,contentType:p.contentType||p.fileType||"",fileSize:Number(p.fileSize||0)},Rt=(p,A=[])=>{const m=p==null?void 0:p.id,P=m==null?[]:A.filter(F=>(F==null?void 0:F.expenseItemId)!=null&&String(F.expenseItemId)===String(m)),$=[...(p==null?void 0:p.attachments)||[],...(p==null?void 0:p.attachmentMetadata)||[],...P],L=new Map;return $.forEach(F=>{const H=qt(F);H&&!L.has(String(H.id))&&L.set(String(H.id),H)}),[...L.values()]},Xt=(p,A)=>{const m=new Map;return[...(p==null?void 0:p.attachmentIds)||[],...A.map($=>$.id)].forEach($=>m.set(String($),$)),[...m.values()]},pt=(p,A)=>{const m=new Set(A.filter(P=>P.id!=null).map(P=>String(P.id)));return p.filter(P=>!m.has(String(P)))},Ut=p=>{var m;const A=((m=p.name.split(".").pop())==null?void 0:m.toLowerCase())||"";return Ft.has(A)?p.size>xt?"文件超过 50MB,无法上传":"":"不支持该文件类型,请选择 PDF、PNG/JPEG、DOC/DOCX 或 XLS/XLSX 文件"},Re=9999999999e-2,Bt=/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/,Vt={empty:"请填写金额",invalid:"金额须为有效数字,例如 128.50",non_positive:"金额须大于 0",too_many_decimals:"金额最多保留两位小数",too_large:`单笔金额不能超过 ${Re.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})} 元`},Le=(p,A="金额")=>p==="empty"?`请填写${A}`:p==="invalid"?`${A}须为有效数字,例如 128.50`:p==="non_positive"?`${A}须大于 0`:p==="too_many_decimals"?`${A}最多保留两位小数`:p==="too_large"?`${A}不能超过 ${Re.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})} 元`:Vt[p],G=p=>{if(p==null||p==="")return"empty";if(typeof p=="number")return Number.isFinite(p)?p<=0?"non_positive":Math.round(p*100)/100!==p?"too_many_decimals":p>Re?"too_large":null:"invalid";const A=String(p).trim();if(!A)return"empty";if(/[eE]/.test(A)||!/^-?\d/.test(A))return"invalid";if(A.startsWith("-"))return"non_positive";if(!/^\d+(\.\d+)?$/.test(A))return"invalid";if(A.includes(".")&&A.split(".")[1].length>2)return"too_many_decimals";if(!Bt.test(A))return"invalid";const m=Number(A);return Number.isFinite(m)?m<=0?"non_positive":m>Re?"too_large":null:"invalid"},Me=p=>{if(G(p))return 0;const m=typeof p=="number"?p:Number(String(p).trim());return Math.round(m*100)/100},Kt={class:"feishu-fields"},Ht=["aria-labelledby"],Yt={class:"section-title compact-title"},jt=["id"],zt={key:0},Gt={key:0,class:"unsupported-field expense-child-warning",role:"alert"},Wt={class:"expense-items"},Jt={class:"sr-only"},Zt=["for"],Qt={key:0},en=["id","accept","disabled","aria-required","aria-invalid","aria-describedby","onChange"],tn=["id"],nn=["aria-label"],an=["disabled","aria-label","onClick"],sn=["id"],rn=["id","value","required","disabled","onChange"],on=["value"],ln=["id","value","maxlength","required","readonly","onInput"],un={key:3,class:"amount-control-wrap"},dn={class:"amount-control"},cn=["id","value","required","readonly","aria-invalid","aria-describedby","onInput","onBlur"],pn=["aria-label","value","disabled","onChange"],yn=["value"],vn=["id"],mn=["id"],En=["id","value","type","maxlength","required","readonly","onInput"],gn=["disabled","aria-label","onClick"],bn={key:1,class:"field-error amount-mismatch-tip",role:"status"},Tn={key:1,class:"dynamic-field display-field",role:"note"},hn={key:2,class:"field dynamic-field applicant-contact"},_n=["for"],An={key:0},fn=["id","value","aria-describedby"],Sn=["id"],In={key:3,class:"field dynamic-field applicant-department"},Nn=["for"],kn={key:0},Cn=["id","placeholder","aria-describedby"],$n={key:0,class:"department-menu",role:"listbox"},Pn=["onMousedown"],Ln={key:0,class:"department-empty"},Mn=["id"],Dn={key:4,class:"dynamic-field unsupported-field",role:"alert"},On=["for"],xn={key:0},wn=["id","value","aria-describedby"],Fn=["id","value","aria-describedby"],qn=["id"],Rn=["id","value","maxlength","required","aria-required","aria-invalid","aria-describedby","onInput"],Xn=["id","value","required","aria-required","aria-invalid","aria-describedby","onChange"],Un=["value"],Bn=["id","value","required","aria-required","aria-invalid","aria-describedby","onChange"],Vn=["value"],Kn={key:4,class:"amount-control"},Hn=["id","value","maxlength","requiLine truncated
+1
View File
@@ -0,0 +1 @@
import{d as gt,o as bt,c as o,F as D,v as V,r as N,j as i,b as s,f as O,t as E,e as b,n as he,s as tt,x as ee,y as Ae,P as Tt,B as S,Q as Ne,R as Ke,u as Ut,k as Bt,a as Vt,w as nt,p as at,q as yt,S as Kt,M as vt,A as st,E as rt,D as Ht,g as jt,O as ce,h as Yt,J as zt}from"./index-DU2fjqYh.js";import{p as Gt}from"./payees-B0cC8O_i.js";import{f as Wt}from"./feishuDirectory-CE_j-cw-.js";import{_ as At}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Jt=50*1024*1024,Zt=".pdf,.png,.jpg,.jpeg,.doc,.docx,.xls,.xlsx,application/pdf,image/png,image/jpeg,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",Qt=new Set(["pdf","png","jpg","jpeg","doc","docx","xls","xlsx"]),en=u=>(u==null?void 0:u.id)==null||!u.fileName?null:{id:u.id,fileName:u.fileName,contentType:u.contentType||u.fileType||"",fileSize:Number(u.fileSize||0)},tn=(u,T=[])=>{const c=u==null?void 0:u.id,_=c==null?[]:T.filter(I=>(I==null?void 0:I.expenseItemId)!=null&&String(I.expenseItemId)===String(c)),U=[...(u==null?void 0:u.attachments)||[],...(u==null?void 0:u.attachmentMetadata)||[],..._],w=new Map;return U.forEach(I=>{const R=en(I);R&&!w.has(String(R.id))&&w.set(String(R.id),R)}),[...w.values()]},nn=(u,T)=>{const c=new Map;return[...(u==null?void 0:u.attachmentIds)||[],...T.map(U=>U.id)].forEach(U=>c.set(String(U),U)),[...c.values()]},ht=(u,T)=>{const c=new Set(T.filter(_=>_.id!=null).map(_=>String(_.id)));return u.filter(_=>!c.has(String(_)))},an=u=>{var c;const T=((c=u.name.split(".").pop())==null?void 0:c.toLowerCase())||"";return Qt.has(T)?u.size>Jt?"文件超过 50MB,无法上传":"":"不支持该文件类型,请选择 PDF、PNG/JPEG、DOC/DOCX 或 XLS/XLSX 文件"},He=9999999999e-2,sn=/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/,rn={empty:"请填写金额",invalid:"金额须为有效数字,例如 128.50",non_positive:"金额须大于 0",too_many_decimals:"金额最多保留两位小数",too_large:`单笔金额不能超过 ${He.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})} 元`},Xe=(u,T="金额")=>u==="empty"?`请填写${T}`:u==="invalid"?`${T}须为有效数字,例如 128.50`:u==="non_positive"?`${T}须大于 0`:u==="too_many_decimals"?`${T}最多保留两位小数`:u==="too_large"?`${T}不能超过 ${He.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})} 元`:rn[u],te=u=>{if(u==null||u==="")return"empty";if(typeof u=="number")return Number.isFinite(u)?u<=0?"non_positive":Math.round(u*100)/100!==u?"too_many_decimals":u>He?"too_large":null:"invalid";const T=String(u).trim();if(!T)return"empty";if(/[eE]/.test(T)||!/^-?\d/.test(T))return"invalid";if(T.startsWith("-"))return"non_positive";if(!/^\d+(\.\d+)?$/.test(T))return"invalid";if(T.includes(".")&&T.split(".")[1].length>2)return"too_many_decimals";if(!sn.test(T))return"invalid";const c=Number(T);return Number.isFinite(c)?c<=0?"non_positive":c>He?"too_large":null:"invalid"},Ue=u=>{if(te(u))return 0;const c=typeof u=="number"?u:Number(String(u).trim());return Math.round(c*100)/100},on=new Set(["DATE","DECIMAL","SINGLE_SELECT","FORMULA"]),ln=new Set(["TEXTAREA","DISPLAY","EXPENSE_ITEMS","ATTACHMENT"]),un=new Set(["TEXT","CONTACT","DEPARTMENT","MULTI_SELECT"]),dn=u=>{const T=String(u.type||"").trim().toUpperCase(),c=String(u.binding||"").trim().toUpperCase();return ln.has(T)||["DESCRIPTION","EXPENSE_ITEMS","EXPENSE_ATTACHMENT"].includes(c)?"full":on.has(T)||["EXPENSE_TYPE","TOTAL_AMOUNT","EXPENSE_DATE","EXPENSE_AMOUNT"].includes(c)?"compact":un.has(T)?"wide":"full"},cn=u=>`semantic-${dn(u)}`,Et=new Set(["expenseDate","category","description","amount","attachmentIds"]),pn=u=>{const T=typeof u=="string"?u:String(u.key||""),c=typeof u=="string"?"":String(u.type||"").trim().toUpperCase(),_=`expense-column-${Et.has(T)?T:"other"}`,U=T==="attachmentIds"||c==="TEXTAREA"||c==="ATTACHMENT"?"full":Et.has(T)?"standard":"full";return`${_} expense-column-${U}`},mn={class:"feishu-fields"},yn=["aria-labelledby"],vn={class:"section-title compact-title"},En=["id"],gn={key:0},bn={key:0,class:"unsupported-field expense-child-warning",role:"alert"},Tn={class:"expense-items"},An={class:"sr-only"},hn={class:"expense-item-heading"},_n=["disabled","aria-label","onClick"],fn=["for"],Sn={key:0},In=["id","accept","disabled","aria-required","aria-invalid","aria-describedby","onChange"],Nn=["id"],kn=["aria-label"],Cn=["disabled","aria-label","onClick"],$n=["id"],Pn=["id","value","required","disabled","onChange"],Mn=["value"],xn=["id","value","maxlength","required","readonly","onInput"],Ln={key:3,class:"amount-control-wrap"},On=["id","value","required","readonly","aria-invalid","aria-describedby","onInput","onBlur"],Dn=["aria-label","value","disabled","onChange"],wn=["value"],Fn=["id"],qn=["id"],Rn=["id","value","type","maxlength","required","readonly","onInput"],Xn={key:1,class:"field-error amount-mismatch-tip",role:"status"},Un={key:1,class:"dynamiLine truncated
+1
View File
@@ -0,0 +1 @@
.feishu-fields[data-v-f22090ad]{display:grid;grid-template-columns:minmax(0,1fr);gap:22px 24px;padding:24px 26px 28px}.dynamic-field[data-v-f22090ad]{min-width:0}.dynamic-field.full[data-v-f22090ad],.dynamic-field.semantic-full[data-v-f22090ad],.expense-field[data-v-f22090ad],.display-field[data-v-f22090ad],.unsupported-field[data-v-f22090ad]{grid-column:1 / -1}.dynamic-field[data-v-f22090ad] :is(input,select,textarea),.department-picker[data-v-f22090ad],.amount-control[data-v-f22090ad]{width:100%;min-width:0;max-inline-size:none;box-sizing:border-box}.dynamic-field.semantic-compact[data-v-f22090ad]>:is(input,select),.dynamic-field.semantic-compact>.amount-control[data-v-f22090ad],.dynamic-field.semantic-wide[data-v-f22090ad]>:is(input,select),.dynamic-field.semantic-wide>.department-picker[data-v-f22090ad],.dynamic-field.semantic-full[data-v-f22090ad]>:is(input,select,textarea){width:100%;max-inline-size:none}.dynamic-field label[data-v-f22090ad],.form-help[data-v-f22090ad],.field-error[data-v-f22090ad],.display-field[data-v-f22090ad],.unsupported-field[data-v-f22090ad]{overflow-wrap:anywhere}.dynamic-field>label[data-v-f22090ad],.expense-field .expense-item>.field>label[data-v-f22090ad]{display:flex;min-height:2.8em;align-items:flex-end;line-height:1.4}.expense-field[data-v-f22090ad]{display:flex;flex-direction:column;gap:16px;margin:8px 0 0;padding:20px 0 0;border-top:1px solid var(--line)}.expense-field .expense-items[data-v-f22090ad]{padding:0}.expense-field .expense-item[data-v-f22090ad]{display:grid;grid-template-columns:minmax(0,1fr);gap:18px 20px;align-items:start;padding:0 18px 20px;overflow:hidden;border-color:#dbe4ec;border-radius:10px;background:#fff}.expense-field .expense-item>.field[data-v-f22090ad]{min-width:0}.expense-field .expense-item[data-v-f22090ad] :is(input,select,textarea),.expense-field .expense-item .amount-control[data-v-f22090ad]{width:100%;min-width:0;max-inline-size:none;box-sizing:border-box}.expense-field .expense-item>.attachment-field[data-v-f22090ad]{grid-column:1 / -1}.expense-item-heading[data-v-f22090ad]{display:flex;grid-column:1 / -1;align-items:center;justify-content:space-between;gap:12px;margin:0 -18px;padding:12px 16px;border-bottom:1px solid #e4eaf0;background:#f7f9fb}.expense-item-heading>div[data-v-f22090ad]{display:flex;align-items:baseline;gap:8px}.expense-item-heading span[data-v-f22090ad]{color:var(--quiet);font-size:10px;letter-spacing:.06em}.expense-item-heading strong[data-v-f22090ad]{color:var(--navy);font-size:12px}.expense-item-heading .remove-item[data-v-f22090ad]{position:static;width:auto;margin:0;padding:5px 8px;border-radius:5px;background:var(--danger-soft)}.expense-field .amount-summary[data-v-f22090ad]{margin:6px 0 0;padding:14px 16px;border:1px solid #d8e5f1;border-radius:9px;background:#f4f9fe}.amount-control-wrap[data-v-f22090ad]{display:flex;flex-direction:column;gap:6px;min-width:0}.amount-control[data-v-f22090ad]{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:center}.amount-control.has-currency[data-v-f22090ad]{grid-template-columns:minmax(0,1fr) 96px;gap:0;overflow:hidden;border:1px solid var(--line-strong);border-radius:6px;background:#fff}.amount-control.has-currency[data-v-f22090ad]:focus-within{border-color:var(--blue);box-shadow:0 0 0 2px #2b77b51a}.amount-control.has-currency>input[data-v-f22090ad],.amount-control.has-currency>select[data-v-f22090ad]{min-height:40px;border:0;border-radius:0;box-shadow:none}.amount-control.has-currency>select[data-v-f22090ad]{border-left:1px solid var(--line);background:var(--surface)}.amount-control select[data-v-f22090ad]{min-height:var(--control-height)}.amount-mismatch-tip[data-v-f22090ad]{display:block;margin-top:6px}.department-picker[data-v-f22090ad]{position:relative}.department-menu[data-v-f22090ad]{position:absolute;z-index:5;top:calc(100% + 4px);right:0;left:0;max-height:240px;margin:0;padding:6px;overflow:auto;list-style:none;border:1px solid var(--line);border-radius:6px;background:#fff;box-shadow:var(--card-shadow)}.department-menu button[data-v-f22090ad]{width:100%;padding:8px 10px;border:0;border-radius:4px;background:transparent;text-align:left}.department-menu button[data-v-f22090ad]:hover{background:var(--blue-soft);color:var(--blue)}.department-empty[data-v-f22090ad]{padding:8px 10px;color:var(--muted)}.compact-title[data-v-f22090ad]{margin:0;padding:0;border-bottom:0}.compact-title h3[data-v-f22090ad]{margin:0;font-size:15px}.compact-title em[data-v-f22090ad]{color:var(--danger);font-style:normal}.display-field[data-v-f22090ad],.unsupported-field[data-v-f22090ad]{padding:16px 18px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.display-field p[data-v-f22090ad]{margin:8px 0 0;color:var(--muted);white-space:pre-wrap;line-height:1.65}.unsupported-field[data-v-f22090ad]{display:flex;flex-direction:column;gap:6px;border-color:#e5bfbc;background:var(--danger-soft);color:var(--danger)}.expense-child-warning[data-v-f22090ad]{margin:0}.Line truncated
+1
View File
@@ -0,0 +1 @@
.scheduled-page[data-v-35564944]{min-width:0;min-inline-size:0;min-block-size:0}.scheduled-page[data-v-35564944]:not(.scheduled-embedded){min-height:clamp(520px,70vh,900px)}@supports (height: 100dvh){.scheduled-page[data-v-35564944]:not(.scheduled-embedded){min-height:clamp(520px,70dvh,900px)}}.scheduled-page.scheduled-embedded[data-v-35564944]{height:100%;max-height:100%;min-height:0;flex:1 1 0;overflow:hidden}.task-card[data-v-35564944],.history-card[data-v-35564944]{min-width:0;min-height:0}.task-card[data-v-35564944]{container-name:scheduled-task;container-type:inline-size}.scheduled-embedded .task-card[data-v-35564944]{flex:0 0 auto}.scheduled-embedded .history-card[data-v-35564944]{min-height:0;flex:1 1 0;overflow:hidden}.scheduled-embedded .history-card>.history-table-wrap[data-v-35564944]{min-height:0;max-height:none;flex:1 1 auto;overflow:auto}.task-head[data-v-35564944],.history-head[data-v-35564944],.detail-title-row[data-v-35564944]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px}.task-head>div[data-v-35564944],.history-head>div[data-v-35564944],.detail-title-row>div[data-v-35564944]:first-child{min-width:0;flex:1 1 280px}.task-head p[data-v-35564944],.detail-title-row p[data-v-35564944],.history-head p[data-v-35564944]{overflow-wrap:anywhere}.page-state[data-v-35564944]{min-height:180px;padding:30px 18px}.page-state .btn[data-v-35564944],.detail-state .btn[data-v-35564944],.history-state .btn[data-v-35564944]{margin-top:12px}.task-layout[data-v-35564944]{display:grid;grid-template-columns:minmax(210px,.34fr) minmax(0,1fr);gap:18px;padding:0 22px 22px}.task-list-warning[data-v-35564944]{grid-column:1 / -1}.task-selector[data-v-35564944]{display:grid;align-content:start;gap:7px}.task-option[data-v-35564944]{width:100%;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;color:var(--body);text-align:left}.task-option[data-v-35564944]:hover,.task-option.active[data-v-35564944]{border-color:#a8c4df;background:var(--blue-soft)}.task-option-title[data-v-35564944]{display:flex;align-items:center;justify-content:space-between;gap:8px}.task-option strong[data-v-35564944]{color:var(--text);font-size:12px;overflow-wrap:anywhere}.task-option small[data-v-35564944]{display:block;margin-top:4px;color:var(--muted);font-size:10px}.status-dot-small[data-v-35564944]{width:8px;height:8px;flex:none;border-radius:50%;background:var(--quiet)}.status-dot-small.success[data-v-35564944]{background:var(--success)}.status-dot-small.running[data-v-35564944]{background:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}.task-detail[data-v-35564944]{min-width:0;padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-raised)}.detail-state[data-v-35564944]{min-height:160px}.detail-title-row h3[data-v-35564944]{font-size:16px}.detail-actions[data-v-35564944]{display:flex;flex-wrap:wrap;gap:8px}.inline-note[data-v-35564944]{margin:12px 0 0;padding:9px 11px;border-left:3px solid var(--blue);background:var(--blue-soft);color:var(--body);font-size:11px}.task-summary[data-v-35564944]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));gap:1px;margin-top:16px;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--line)}.task-summary>div[data-v-35564944]{min-width:0;padding:11px 12px;background:#fff}.task-summary dt[data-v-35564944]{color:var(--muted);font-size:10px}.task-summary dt span[data-v-35564944]{color:var(--quiet);font-weight:400}.task-summary dd[data-v-35564944]{margin-top:3px;overflow-wrap:anywhere;color:var(--body);font-size:12px}.state-badge[data-v-35564944]{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:99px;background:#eef1f4;color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}.state-badge.success[data-v-35564944]{background:var(--success-soft);color:var(--success)}.state-badge.danger[data-v-35564944]{background:var(--danger-soft);color:var(--danger)}.state-badge.running[data-v-35564944],.state-badge.queued[data-v-35564944]{background:var(--blue-soft);color:var(--blue-dark)}.history-card[data-v-35564944]{display:flex;margin-top:16px;flex-direction:column}.history-state[data-v-35564944]{min-height:180px;padding:30px 18px}.history-table-wrap[data-v-35564944]{max-width:calc(100% - 36px);margin:0 18px;overflow-x:auto;overscroll-behavior-inline:contain}.history-table[data-v-35564944]{min-width:920px}.history-table td[data-v-35564944]{vertical-align:top}.history-table td>small[data-v-35564944],.history-table td>span[data-v-35564944]:not(.state-badge){display:block}.history-table td>small[data-v-35564944]{margin-top:3px;color:var(--quiet);font-size:10px}.counts-summary[data-v-35564944]{max-width:300px;color:var(--body);line-height:1.65}.error-detail[data-v-35564944]{margin-top:5px;max-width:260px;color:var(--danger)}.error-detail summary[data-v-35564944]{cursor:pointer;font-size:10px}.error-detail p[data-v-35Line truncated
+1
View File
@@ -0,0 +1 @@
import{L as W,d as tt,u as at,k as lt,w as $e,o as st,m as ut,c as u,b as t,t as n,e as i,F as ie,v as Se,n as M,f as Re,G as nt,x as Ie,p as ot,B as y,r as c,E as it,C as dt,D as rt,j as s,a4 as ct,J as vt}from"./index-DU2fjqYh.js";import{_ as ft}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{_ as pt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const de=15e3,bt=2e4,re=b=>`/scheduled-tasks/${encodeURIComponent(b)}`,B={list:b=>W.get("/scheduled-tasks",{signal:b,timeout:de}),detail:(b,S)=>W.get(re(b),{signal:S,timeout:de}),updateSchedule:(b,S,F)=>W.put(`${re(b)}/schedule`,S,{signal:F,timeout:de,suppressErrorNotification:!0}),execute:(b,S)=>W.post(`${re(b)}/execute`,void 0,{signal:S,timeout:bt,suppressErrorNotification:!0}),runs:(b,S=0,F=20,ce)=>W.get(`${re(b)}/runs`,{params:{page:S,size:F},signal:ce,timeout:de})},gt=["aria-busy"],yt={class:"card task-card","aria-labelledby":"scheduled-task-title"},mt={class:"card-head task-head"},kt=["disabled"],ht={key:0,class:"load-wrap page-state",role:"status","aria-live":"polite"},_t={key:1,class:"empty-state page-state",role:"alert"},Et={key:2,class:"empty-state page-state"},Nt={key:3,class:"task-layout"},St={key:0,class:"inline-alert danger task-list-warning",role:"alert"},Dt={class:"task-selector","aria-label":"自动任务列表"},Ut=["aria-current","onClick"],At={class:"task-option-title"},Ct={key:0},Tt={class:"task-detail"},wt={key:0,class:"empty-state detail-state",role:"alert"},xt={class:"detail-title-row"},$t={key:0,class:"muted-copy"},Rt={class:"detail-actions"},It=["disabled"],Lt=["disabled","aria-busy"],qt={key:0,class:"inline-alert danger",role:"alert"},Ht={key:1,class:"inline-note",role:"status"},Mt={key:2,class:"task-summary","aria-label":"任务状态摘要"},Bt={key:0,class:"card history-card primary-list-card","aria-labelledby":"run-history-title"},Ft={class:"card-head history-head"},Gt={class:"muted-copy","aria-live":"polite"},Vt={key:0,class:"load-wrap history-state",role:"status","aria-live":"polite"},Ot={key:1,class:"empty-state history-state",role:"alert"},zt={key:2,class:"empty-state history-state"},Qt={key:3,class:"table-wrap history-table-wrap",tabindex:"0",role:"region","aria-label":"自动任务运行记录"},Pt={class:"data-table history-table"},Kt={key:0},Zt={key:1},Yt={key:2},jt={key:3},Jt={key:4},Xt={key:5},Wt={key:0,"data-label":"状态"},ea={key:0},ta={key:1,"data-label":"触发方式"},aa={key:2,"data-label":"入队时间"},la=["datetime"],sa={key:3,"data-label":"执行时间"},ua={key:4,"data-label":"结果统计"},na={class:"counts-summary"},oa={key:5,"data-label":"结果"},ia={key:0,class:"error-detail"},da={class:"sr-status","aria-live":"polite","aria-atomic":"true"},ra={class:"app-dialog__panel"},ca={class:"modal-head","data-dialog-drag-handle":""},va=["disabled"],fa={class:"modal-body schedule-form"},pa={key:0,class:"inline-alert danger",role:"alert"},ba={key:1,class:"switch-row"},ga=["disabled"],ya={class:"interval-grid"},ma=["value"],ka={class:"modal-actions"},ha=["disabled"],_a=["disabled","aria-busy"],Ea="FEISHU_DIRECTORY_SYNC",Na=tt({__name:"ScheduledTasks",props:{embedded:{type:Boolean,default:!1}},setup(b){const S=[1,2,3,6,12,24],F={QUEUED:"排队中",RUNNING:"运行中",SUCCEEDED:"成功",FAILED:"失败"},ce={MANUAL:"手动",STARTUP:"启动时",SCHEDULED:"自动计划"},ve=at(),fe=lt(),v=a=>ve.canRead(a),Z=a=>ve.canEdit(a),G=y(()=>v("page.scheduled-tasks")&&fe.can("integration.schedule:read")),De=y(()=>G.value&&v("dialog.task.config")),Le=["state","trigger","queued-at","execution","counts","result"].map(a=>`ui.tasks.run.${a}`),qe=y(()=>G.value&&Le.some(v)),pe=y(()=>De.value&&Z("dialog.task.config.save")&&(Z("dialog.task.config.enabled")||Z("dialog.task.config.interval"))&&fe.can("integration.schedule:manage")),Ue=y(()=>ve.canEdit("system.scheduled-task.execute")&&fe.can("integration.schedule:execute")),N=c([]),D=c(""),d=c(null),Y=c([]),x=c([]),U=c(1),j=c(20),ee=c(0),A=c(!0),C=c(!1),J=c(!1),V=c(""),$=c(""),O=c(""),be=c(""),R=c(!1),m=c(!1),T=c(""),te=c(null),f=c(!1),I=c(""),X=c(!1),z=c(24),ge=c(0);let g=!1,p=null,E=null,ae,le=0,Ae=0,Q=!1,se=0,L=0;const ye=y(()=>[...x.value].sort((a,e)=>ue(e.queuedAt)-ue(a.queuedAt))),me=y(()=>ye.value[0]||null),He=y(()=>ye.value.find(a=>a.state==="SUCCEEDED")||null),Me=y(()=>ye.value.some(a=>a.state==="QUEUED"||a.state==="RUNNING")),q=y(()=>{var a;return((a=d.value)==null?void 0:a.status)==="RUNNING"||Me.value}),Ce=y(()=>!Ue.value||R.value||m.value||C.value||q.value),Be=y(()=>R.value?"提交中…":m.value?"正在确认结果…":q.value?"任务运行中":"立即运行"),Fe=y(()=>document.visibilityState==="hidden"?"页面不可见,已暂停更新":q.value||m.value?"运行期间自动更新":"每 30 秒自动更新"),ue=a=>{const e=new Date(typeof a=="string"||typeof a=="number"?a:"").getTime();return Number.isFinite(e)?e:0},P=(a,e="—")=>{const o=a instanceof Date?a:new Date(typeof a=="string"||typeof a=="number"?a:"");if(!Number.isFinite(o.getTime()))Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as D,u as E,o as w,c as a,b as e,x as N,y as x,t as r,e as o,F as L,v as R,s as g,G as U,N as f,r as _,L as z,B,j as s}from"./index-DU2fjqYh.js";import{_ as F}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{u as M}from"./useListPagination-j0ff6aFk.js";const P={class:"page-content route-list-page"},T={class:"card fill-list-card primary-list-card"},V={class:"filter-bar list-toolbar"},O={class:"list-toolbar__filters"},$={class:"filter-search"},j={class:"list-toolbar__meta"},q={class:"tag info"},G={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"业务单据列表"},I={class:"data-table responsive-table"},A={key:0},H={key:1},J={key:2,class:"amount"},K={key:3},Q={key:4},W={key:0,"data-label":"单据编号"},X={key:1,"data-label":"类型"},Y={class:"tag"},Z={key:2,"data-label":"金额",class:"amount"},ee={key:3,"data-label":"日期"},se={key:4,"data-label":"来源"},te={key:1,class:"empty-state",role:"alert"},ae={key:2,class:"empty-state"},le={key:3,class:"load-wrap",role:"status"},ie=D({__name:"Sources",setup(oe){const h=E(),u=n=>h.canRead(n),k=n=>h.canEdit(n),c=_(""),m=_([]),d=_(!1),i=_(""),b=async()=>{d.value=!1,i.value="";try{m.value=await z.get("/sources")||[]}catch(n){i.value=n instanceof Error?n.message:"请求失败,请稍后重试。"}finally{d.value=!0}};w(b);const p=B(()=>{if(!c.value)return m.value;const n=c.value.toLowerCase();return m.value.filter(t=>(t.sourceDocNo||"").toLowerCase().includes(n))}),{page:v,pageSize:y,paginatedItems:S}=M(p,{resetSources:[c]}),C=n=>`¥ ${(n||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`;return(n,t)=>(s(),a("div",P,[t[7]||(t[7]=e("div",{class:"page-head"},[e("div",null,[e("span",{class:"eyebrow"},"SOURCE DOCUMENTS"),e("h1",null,"业务单据"),e("p",null,"来自金蝶 ERP 的源单据,只读展示。")])],-1)),e("div",T,[e("div",V,[e("div",O,[e("label",$,[t[3]||(t[3]=e("span",{"aria-hidden":"true"},"🔍",-1)),N(e("input",{type:"search","onUpdate:modelValue":t[0]||(t[0]=l=>c.value=l),placeholder:"搜索单据编号","aria-label":"搜索"},null,512),[[x,c.value]])])]),e("div",j,[e("span",q,r(p.value.length)+" 笔",1)])]),d.value&&!i.value&&p.value.length>0?(s(),a("div",G,[e("table",I,[e("thead",null,[e("tr",null,[u("ui.sources.column.number")?(s(),a("th",A,"单据编号")):o("",!0),u("ui.sources.column.type")?(s(),a("th",H,"类型")):o("",!0),u("ui.sources.column.amount")?(s(),a("th",J,"金额")):o("",!0),u("ui.sources.column.date")?(s(),a("th",K,"日期")):o("",!0),u("ui.sources.column.origin")?(s(),a("th",Q,"来源")):o("",!0)])]),e("tbody",null,[(s(!0),a(L,null,R(g(S),l=>(s(),a("tr",{key:l.id},[u("ui.sources.column.number")?(s(),a("td",W,[e("strong",null,r(l.sourceDocNo),1)])):o("",!0),u("ui.sources.column.type")?(s(),a("td",X,[e("span",Y,r(l.sourceDocType),1)])):o("",!0),u("ui.sources.column.amount")?(s(),a("td",Z,r(C(l.amount)),1)):o("",!0),u("ui.sources.column.date")?(s(),a("td",ee,[e("small",null,r(l.sourceDate),1)])):o("",!0),u("ui.sources.column.origin")?(s(),a("td",se,[e("small",null,r(l.sourceSystem),1)])):o("",!0)]))),128))])])])):i.value?(s(),a("div",te,[t[4]||(t[4]=e("strong",null,"业务单据加载失败",-1)),e("span",null,r(i.value),1),k("ui.sources.reload")?(s(),a("button",{key:0,class:"btn small",type:"button",onClick:b},"重试")):o("",!0)])):d.value?(s(),a("div",ae,[...t[5]||(t[5]=[e("strong",null,"暂无业务单据",-1),e("span",null,"金蝶 ERP 数据同步后会自动显示",-1)])])):(s(),a("div",le,[...t[6]||(t[6]=[e("span",{class:"loader","aria-hidden":"true"},null,-1),e("span",null,"正在加载业务单据…",-1)])])),d.value&&!i.value&&p.value.length?(s(),U(F,{key:4,page:g(v),"onUpdate:page":t[1]||(t[1]=l=>f(v)?v.value=l:null),"page-size":g(y),"onUpdate:pageSize":t[2]||(t[2]=l=>f(y)?y.value=l:null),total:p.value.length,"aria-label":"业务单据列表分页"},null,8,["page","page-size","total"])):o("",!0)])]))}});export{ie as default};
-1
View File
@@ -1 +0,0 @@
import{d as h,o as k,c as n,b as e,q as C,v as S,t as o,F as D,x as w,m,p as x,H as f,e as E,r as p,M as N,y as z,j as s}from"./index-CXCTlxVW.js";import{u as L,_ as U}from"./useListPagination-BTBVezsP.js";const B={class:"page-content route-list-page"},M={class:"card fill-list-card primary-list-card"},R={class:"filter-bar"},F={class:"filter-search"},P={class:"tag info"},T={key:0,class:"table-wrap",tabindex:"0",role:"region","aria-label":"业务单据列表"},V={class:"data-table responsive-table"},q={"data-label":"单据编号"},O={"data-label":"类型"},$={class:"tag"},j={"data-label":"金额",class:"amount"},H={"data-label":"日期"},I={"data-label":"来源"},A={key:1,class:"empty-state",role:"alert"},G={key:2,class:"empty-state"},J={key:3,class:"load-wrap",role:"status"},X=h({__name:"Sources",setup(K){const u=p(""),c=p([]),i=p(!1),r=p(""),_=async()=>{i.value=!1,r.value="";try{c.value=await N.get("/sources")||[]}catch(t){r.value=t instanceof Error?t.message:"请求失败,请稍后重试。"}finally{i.value=!0}};k(_);const d=z(()=>{if(!u.value)return c.value;const t=u.value.toLowerCase();return c.value.filter(a=>(a.sourceDocNo||"").toLowerCase().includes(t))}),{page:v,pageSize:g,paginatedItems:b}=L(d,{resetSources:[u]}),y=t=>`¥ ${(t||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`;return(t,a)=>(s(),n("div",B,[a[9]||(a[9]=e("div",{class:"page-head"},[e("div",null,[e("span",{class:"eyebrow"},"SOURCE DOCUMENTS"),e("h1",null,"业务单据"),e("p",null,"来自金蝶 ERP 的源单据,只读展示。")])],-1)),e("div",M,[e("div",R,[e("label",F,[a[3]||(a[3]=e("span",{"aria-hidden":"true"},"🔍",-1)),C(e("input",{type:"search","onUpdate:modelValue":a[0]||(a[0]=l=>u.value=l),placeholder:"搜索单据编号","aria-label":"搜索"},null,512),[[S,u.value]])]),a[4]||(a[4]=e("span",{class:"filter-spacer"},null,-1)),e("span",P,o(d.value.length)+" 笔",1)]),i.value&&!r.value&&d.value.length>0?(s(),n("div",T,[e("table",V,[a[5]||(a[5]=e("thead",null,[e("tr",null,[e("th",null,"单据编号"),e("th",null,"类型"),e("th",{class:"amount"},"金额"),e("th",null,"日期"),e("th",null,"来源")])],-1)),e("tbody",null,[(s(!0),n(D,null,w(m(b),l=>(s(),n("tr",{key:l.id},[e("td",q,[e("strong",null,o(l.sourceDocNo),1)]),e("td",O,[e("span",$,o(l.sourceDocType),1)]),e("td",j,o(y(l.amount)),1),e("td",H,[e("small",null,o(l.sourceDate),1)]),e("td",I,[e("small",null,o(l.sourceSystem),1)])]))),128))])])])):r.value?(s(),n("div",A,[a[6]||(a[6]=e("strong",null,"业务单据加载失败",-1)),e("span",null,o(r.value),1),e("button",{class:"btn small",type:"button",onClick:_},"重试")])):i.value?(s(),n("div",G,[...a[7]||(a[7]=[e("strong",null,"暂无业务单据",-1),e("span",null,"金蝶 ERP 数据同步后会自动显示",-1)])])):(s(),n("div",J,[...a[8]||(a[8]=[e("span",{class:"loader","aria-hidden":"true"},null,-1),e("span",null,"正在加载业务单据…",-1)])])),i.value&&!r.value&&d.value.length?(s(),x(U,{key:4,page:m(v),"onUpdate:page":a[1]||(a[1]=l=>f(v)?v.value=l:null),"page-size":m(g),"onUpdate:pageSize":a[2]||(a[2]=l=>f(g)?g.value=l:null),total:d.value.length,"aria-label":"业务单据列表分页"},null,8,["page","page-size","total"])):E("",!0)])]))}});export{X as default};
-1
View File
@@ -1 +0,0 @@
.permission-editor[data-v-b877440e]{display:grid;gap:14px}.editor-head[data-v-b877440e]{display:flex;align-items:end;justify-content:space-between;gap:16px}.editor-head h3[data-v-b877440e],.column-head h3[data-v-b877440e]{font-size:15px}.editor-head p[data-v-b877440e],.column-head p[data-v-b877440e],.permission-rules[data-v-b877440e],.compatibility-card p[data-v-b877440e]{color:var(--muted);font-size:11px}.permission-search[data-v-b877440e]{width:min(320px,100%)}.permission-search input[data-v-b877440e]{width:100%}.permission-summary[data-v-b877440e],.permission-rules[data-v-b877440e]{display:flex;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.permission-columns[data-v-b877440e]{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);align-items:start;gap:14px}.permission-column[data-v-b877440e]{display:grid;min-width:0;gap:10px}.column-head[data-v-b877440e]{display:flex;align-items:end;justify-content:space-between;gap:10px;padding:0 2px}.column-head>span[data-v-b877440e]{color:var(--muted);font-size:11px;white-space:nowrap}.module-card[data-v-b877440e],.field-module[data-v-b877440e]{border:1px solid var(--line);border-radius:9px;background:#fff;overflow:hidden}.branch-title[data-v-b877440e]{display:flex;align-items:center;gap:9px;padding:12px 14px;cursor:pointer}.branch-title>span[data-v-b877440e],.action-list label>span[data-v-b877440e],.field-list label>span[data-v-b877440e]{display:grid;min-width:0;gap:2px}.branch-title code[data-v-b877440e],.action-list code[data-v-b877440e],.field-list code[data-v-b877440e],.field-module code[data-v-b877440e],.compatibility-card code[data-v-b877440e]{color:var(--quiet);font:10px var(--mono);overflow-wrap:anywhere}.page-grid[data-v-b877440e]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 12px 12px}.page-card[data-v-b877440e]{min-width:0;border:1px solid var(--line);border-radius:7px;background:var(--surface-raised)}.page-title[data-v-b877440e]{border-bottom:1px solid var(--line)}.action-list[data-v-b877440e],.field-list[data-v-b877440e]{display:grid;gap:1px;padding:8px}.action-list label[data-v-b877440e],.field-list label[data-v-b877440e]{display:flex;align-items:center;gap:8px;padding:7px;border-radius:5px;font-size:11px}.action-list label[data-v-b877440e]:hover,.field-list label[data-v-b877440e]:hover{background:var(--blue-soft)}.page-empty[data-v-b877440e]{padding:9px 12px;color:var(--quiet);font-size:10px}.field-module>header[data-v-b877440e]{display:grid;gap:2px;padding:11px 12px;border-bottom:1px solid var(--line);background:var(--surface)}.field-page+.field-page[data-v-b877440e]{border-top:1px solid var(--line)}.field-page-title[data-v-b877440e]{display:grid;gap:2px;padding:9px 12px 3px}.field-list label[data-v-b877440e]{justify-content:space-between}.field-list select[data-v-b877440e],.compatibility-card select[data-v-b877440e]{min-width:84px;padding:6px}.compatibility-card[data-v-b877440e]{padding:13px;border:1px dashed var(--warning);border-radius:8px;background:var(--warning-soft)}.compatibility-card ul[data-v-b877440e]{display:grid;gap:6px;margin-top:8px;padding:0;list-style:none}.compatibility-card li[data-v-b877440e]{display:flex;align-items:center;justify-content:space-between;gap:10px}@media (max-width:900px){.permission-columns[data-v-b877440e]{grid-template-columns:1fr}.editor-head[data-v-b877440e]{align-items:stretch;flex-direction:column}.permission-search[data-v-b877440e]{width:100%}.page-grid[data-v-b877440e]{grid-template-columns:1fr}.permission-summary[data-v-b877440e],.permission-rules[data-v-b877440e]{flex-direction:column}}@media (max-width:560px){.field-list label[data-v-b877440e]{align-items:stretch;flex-direction:column}.field-list select[data-v-b877440e]{width:100%;min-height:44px;font-size:16px}}.permission-editor[data-v-b877440e]{gap:12px;padding:14px 16px 16px}.editor-head[data-v-b877440e]{align-items:center}.editor-head h3[data-v-b877440e]{color:var(--navy);font-size:14px}.permission-search input[data-v-b877440e]{min-height:38px;padding:7px 10px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:var(--text)}.permission-summary[data-v-b877440e],.permission-rules[data-v-b877440e]{align-items:baseline;border:0;border-radius:5px}.permission-summary[data-v-b877440e]{border-left:3px solid var(--blue);background:var(--blue-soft);color:var(--body)}.permission-readonly[data-v-b877440e]{padding:9px 12px;border-left:3px solid var(--warning);background:#fff8e8;color:var(--muted);font-size:11px}.permission-summary strong[data-v-b877440e],.permission-rules strong[data-v-b877440e]{flex:none;color:var(--navy);font-size:11px}.permission-rules[data-v-b877440e]{padding-top:8px;padding-bottom:8px;background:#f7f9fb}.permission-columns[data-v-b877440e]{grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);gap:16px}.permission-column[data-v-b877440e]{align-content:start}.column-head[data-v-b877440e]{min-height:42px;align-items:centeLine truncated
-1
View File
@@ -1 +0,0 @@
import{d as It,u as Gt,c as n,b as e,q as me,v as Fe,t as i,e as f,F as W,x as ye,y as I,r as p,j as s,f as le,o as Qt,N as Jt,B as za,p as Et,l as Ha,w as _t,n as Ke,k as it,O as Fa,I as kt,m as k,H as rt,E as oe,G as Ka,P as gt,A as Tt,K as ua,h as ja,z as Lt,Q as da,g as qa,D as Wa}from"./index-CXCTlxVW.js";import{a as ie}from"./admin-C9Owgj_V.js";import{_ as Vt}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{f as xt,d as pa}from"./feishuDirectory-BmPyCMe4.js";import{u as Yt,_ as Xt}from"./useListPagination-BTBVezsP.js";const Ze=c=>{const L=String(c.type||"").trim().toUpperCase();return L==="FIELD"?"field":L==="ACTION"||L==="BUTTON"?"action":L==="MODULE"?"module":L==="PAGE"?"page":L==="MENU"?c.code.startsWith("module.")||!c.parentCode?"module":"page":c.code.startsWith("application:")?"field":!c.code.startsWith("module.")&&!c.code.startsWith("page.")?"action":c.code.startsWith("module.")?"module":"page"},Ya=c=>{const L=new Map(c.map(m=>[m.code,{...m,children:[]}])),A=[];L.forEach(m=>{const N=m.parentCode?L.get(m.parentCode):void 0;N?N.children.push(m):A.push(m)});const E=m=>m.sort((N,P)=>N.code.localeCompare(P.code,"zh-CN")).forEach(N=>E(N.children));return E(A),A},Ot=c=>[c,...c.children.flatMap(Ot)],Xa=(c,L)=>{const A=Ot(c).filter(m=>Ze(m)!=="field"),E=A.filter(m=>(L[m.code]||"HIDDEN")!=="HIDDEN").length;return{checked:!!A.length&&E===A.length,indeterminate:E>0&&E<A.length}},Qa=(c,L,A)=>{const E={...A};return Ot(c).forEach(m=>{const N=Ze(m);N!=="field"&&(E[m.code]=L?N==="action"?"EDIT":"READ":"HIDDEN")}),E},Ja=c=>{const L={...(c==null?void 0:c.permissionAccess)||{}};return c!=null&&c.permissionAccess||((c==null?void 0:c.permissionCodes)||[]).forEach(A=>{L[A]="EDIT"}),Object.entries((c==null?void 0:c.fieldPermissions)||{}).forEach(([A,E])=>{L[A]=E}),L},Za=(c,L)=>{const A=new Set(L.filter(N=>Ze(N)==="field").map(N=>N.code)),E={...c},m=Object.fromEntries(Object.entries(c).filter(([N])=>A.has(N)));return{permissionAccess:E,permissionCodes:Object.entries(E).filter(([N,P])=>!A.has(N)&&P!=="HIDDEN").map(([N])=>N),fieldPermissions:m}},Q=c=>!!(c&&(c.groupCode==="DEFAULT_EMPLOYEE"||c.membershipMode==="DYNAMIC")),Ut=c=>(c==null?void 0:c.groupCode)==="SUPER_ADMIN_GROUP",ca=c=>[...c].sort((L,A)=>{const E=m=>Q(m)?0:Ut(m)?1:2;return E(L)-E(A)}),el=c=>c===null?"无法确认":String(c),tl=(c,L)=>!c.selectable||c.assignedGroupId!==null,ht=c=>`local:${c}`,va=c=>`directory:${JSON.stringify([c.generationId,c.openId])}`,al=c=>({generationId:c.generationId,openId:c.openId,...c.userId==null?{}:{userId:c.userId}}),ll={class:"permission-editor","aria-labelledby":"permission-editor-title"},sl={class:"editor-head"},nl={class:"permission-search"},ol={class:"permission-summary",role:"status"},il={key:0,class:"permission-readonly",role:"note"},rl={class:"permission-columns"},ul={class:"permission-column menu-column","aria-labelledby":"menu-permission-title"},dl={class:"column-head"},cl={key:0,class:"empty-state compact-empty"},vl={class:"branch-title"},pl=["checked",".indeterminate","disabled","onChange"],ml={class:"page-grid"},yl={class:"branch-title page-title"},bl=["checked",".indeterminate","disabled","onChange"],fl={key:0,class:"action-list","aria-label":"关键动作"},gl=["checked","disabled","onChange"],hl={key:1,class:"page-empty"},_l={class:"permission-column field-column","aria-labelledby":"field-permission-title"},kl={class:"column-head"},El={key:0,class:"empty-state compact-empty"},Il={class:"field-page-title"},Cl={class:"field-list"},Sl=["value","aria-label","disabled","onChange"],Al={key:1,class:"compatibility-card","aria-labelledby":"compat-title"},wl=["value","aria-label","disabled","onChange"],$l=It({__name:"RolePermissionEditor",props:{catalog:{},modelValue:{}},emits:["update:modelValue"],setup(c,{emit:L}){const A=c,E=L,m=Gt(),N=I(()=>m.canEdit("system.role.permission.configure")),P=p(""),U=I(()=>Ya(A.catalog)),j=I(()=>new Set(A.catalog.map(y=>y.code))),V=I(()=>Object.entries(A.modelValue).filter(([y])=>!j.value.has(y)).map(([y,v])=>({code:y,level:v}))),T=I(()=>P.value.trim().toLocaleLowerCase()),se=y=>!T.value||`${y.name} ${y.code}`.toLocaleLowerCase().includes(T.value),te=y=>Ot(y).slice(1),H=y=>Ze(y)!=="field"&&se(y)||y.children.some(H),F=I(()=>U.value.filter(H)),q=y=>y.children.filter(v=>Ze(v)!=="field"&&(se(y)||H(v))),J=(y,v)=>te(y).filter($=>Ze($)==="action"&&(se(v)||se(y)||se($))),ve=I(()=>U.value.map(y=>({code:y.code,name:y.name,pages:y.children.map(v=>({code:v.code,name:v.name,fields:te(v).filter($=>Ze($)==="field")})).filter(v=>v.fields.length)})).filter(y=>y.pages.length)),x=I(()=>ve.value.map(y=>{const v=se(y),$=y.pages.map(d=>{const w=v||se(d);return{...d,fields:w?d.fields:d.fields.filter(se)}}).filter(d=>d.fields.length);return{...y,pages:$}}).filter(y=>y.pages.length)),re=y=>A.modelValue[y]||"HIDDEN",Se=(y,v)=>{N.value&&E("update:modelValue",{...A.modelValue,[y]:v})},ke=y=>Xa(y,A.modelValue),Ge=(y,v)=>{N.value&&E("update:modelValue",Qa(y,v.target.checked,A.modelValue))},we=I(()=>F.value.reduce((yLine truncated
+1
View File
@@ -0,0 +1 @@
.permission-editor[data-v-46d1bb84]{display:grid;min-width:0;gap:12px;padding:14px 16px 16px;container-name:permission-editor;container-type:inline-size}.editor-head[data-v-46d1bb84]{display:flex;align-items:center;justify-content:space-between;gap:16px}.editor-head h3[data-v-46d1bb84]{color:var(--navy);font-size:14px}.editor-head p[data-v-46d1bb84]{margin-top:3px;color:var(--muted);font-size:11px}.permission-search[data-v-46d1bb84]{width:min(320px,100%)}.permission-search input[data-v-46d1bb84]{width:100%;min-height:38px;padding:7px 10px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:var(--text)}.tree-toolbar[data-v-46d1bb84]{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--line)}.linkage-toggle[data-v-46d1bb84]{display:flex;align-items:center;gap:5px;margin-left:3px;font-size:11px}.linkage-toggle input[data-v-46d1bb84]{width:15px;height:15px;accent-color:var(--blue)}.authorization-summary[data-v-46d1bb84]{margin-left:auto;color:var(--muted);font-size:11px}.permission-readonly[data-v-46d1bb84]{padding:9px 12px;border-left:3px solid var(--warning);background:#fff8e8;color:var(--muted);font-size:11px}.permission-workspace[data-v-46d1bb84]{display:grid;grid-template-columns:minmax(250px,30%) minmax(0,1fr);height:clamp(480px,58vh,640px);min-height:0;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#fff}.navigation-pane[data-v-46d1bb84]{display:flex;min-width:0;min-height:0;flex-direction:column;border-right:1px solid var(--line);background:#f7f9fb}.pane-title[data-v-46d1bb84]{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 14px;border-bottom:1px solid var(--line);background:#fff}.pane-title strong[data-v-46d1bb84]{color:var(--navy);font-size:12px}.pane-title span[data-v-46d1bb84]{color:var(--quiet);font-size:10px}.navigation-tree[data-v-46d1bb84]{min-height:0;padding:8px 6px 12px;overflow:auto}.navigation-row[data-v-46d1bb84]{display:grid;grid-template-columns:22px 22px minmax(0,1fr);align-items:center;min-height:42px;padding-left:calc(var(--tree-depth)*14px);border-radius:5px;color:var(--body)}.navigation-row[data-v-46d1bb84]:hover{background:#edf3f9}.navigation-row.selected[data-v-46d1bb84]{background:#dfeefe;color:var(--navy)}.tree-expander[data-v-46d1bb84],.tree-check[data-v-46d1bb84],.navigation-label[data-v-46d1bb84]{border:0;background:transparent;color:inherit}.tree-expander[data-v-46d1bb84]{width:22px;height:30px;padding:0;color:var(--muted);cursor:pointer}.tree-expander-spacer[data-v-46d1bb84]{width:22px}.tree-check[data-v-46d1bb84]{display:grid;width:17px;height:17px;padding:0;place-items:center;border:1px solid #aab8c6;border-radius:3px;background:#fff;font-size:12px;line-height:1;cursor:pointer}.tree-check.checked[data-v-46d1bb84],.tree-check.indeterminate[data-v-46d1bb84]{border-color:var(--blue);background:var(--blue);color:#fff}.tree-check[data-v-46d1bb84]:disabled{cursor:not-allowed;opacity:.55}.navigation-label[data-v-46d1bb84]{display:flex;min-width:0;align-items:center;gap:7px;padding:5px 6px;text-align:left;cursor:pointer}.navigation-icon[data-v-46d1bb84]{width:13px;flex:none;color:var(--blue);font-weight:700;text-align:center}.navigation-label>span[data-v-46d1bb84]:last-child,.compatibility-navigation>span[data-v-46d1bb84]:last-child{display:grid;min-width:0;gap:1px}.navigation-label strong[data-v-46d1bb84],.compatibility-navigation strong[data-v-46d1bb84]{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.navigation-label small[data-v-46d1bb84],.compatibility-navigation small[data-v-46d1bb84]{overflow:hidden;color:var(--quiet);font:9px var(--mono);text-overflow:ellipsis;white-space:nowrap}.compatibility-navigation[data-v-46d1bb84]{display:flex;width:calc(100% - 8px);align-items:center;gap:9px;margin:8px 4px 0;padding:10px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--body);text-align:left;cursor:pointer}.compatibility-navigation.selected[data-v-46d1bb84]{background:#dfeefe;color:var(--navy)}.navigation-empty[data-v-46d1bb84]{padding:24px 12px;color:var(--muted);font-size:11px;text-align:center}.permission-detail[data-v-46d1bb84]{min-width:0;min-height:0;overflow:auto}.detail-head[data-v-46d1bb84]{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:82px;padding:13px 18px;border-bottom:1px solid var(--line);background:#fffffff5}.detail-head>div[data-v-46d1bb84]:first-child{display:grid;min-width:0;gap:2px}.detail-type[data-v-46d1bb84]{color:var(--blue);font:700 9px var(--mono);letter-spacing:.08em}.detail-head h4[data-v-46d1bb84]{color:var(--navy);font-size:16px}.detail-head code[data-v-46d1bb84]{color:var(--quiet);font:10px var(--mono);overflow-wrap:anywhere}.access-switch[data-v-46d1bb84]{display:inline-flex;flex:none;padding:2px;border:1px solid var(--line);border-radius:6px;background:#f4f6f8}.access-option[data-v-46d1bb84]Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as St,u as fa,k as ha,w as ct,c as s,b as e,x as Z,y as $e,$ as va,f as q,t as c,e as v,F as le,v as Re,n as Ve,s as x,p as dt,B as C,r as b,a0 as Ne,j as l,a1 as nl,G as Ct,o as Va,m as Oa,D as Vl,J as il,q as Ol,E as se,P as Vt,Y as xl,M as rl,R as Ma,N as Ot,I as Fl,A as da,C as Jt,a3 as ll,h as Bl,g as zl}from"./index-DU2fjqYh.js";import{a as ue}from"./admin-kNzfHot2.js";import{_ as ea}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as ya}from"./AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js";import{f as Zt,d as Pl}from"./feishuDirectory-CE_j-cw-.js";import{u as La}from"./useListPagination-j0ff6aFk.js";const jl=(o,E,_,g)=>JSON.stringify(o)!==_||JSON.stringify(E)!==g,Ua=o=>{if(!Array.isArray(o)||o.length===0)return"权限目录为空,无法安全编辑角色权限。";const E=new Set;for(const g of o){if(!g||typeof g.code!="string"||!g.code.trim()||g.code.trim()!==g.code)return"权限目录存在空编码或无效空格,已禁止保存。";if(typeof g.name!="string"||!g.name.trim())return`权限「${g.code}」缺少名称,已禁止保存。`;if(g.parentCode!==void 0&&g.parentCode!==null&&typeof g.parentCode!="string")return`权限「${g.code}」的父级编码格式无效,已禁止保存。`;if(E.has(g.code))return`权限目录存在重复编码「${g.code}」,已禁止保存。`;E.add(g.code)}const _=new Map(o.map(g=>[g.code,g.parentCode]));for(const g of o)if(g.parentCode===g.code)return`权限「${g.code}」不能以自身为父级,已禁止保存。`;for(const g of o){const p=new Set([g.code]);let L=g.parentCode;for(;L&&_.has(L);){if(p.has(L))return`权限「${g.code}」的父级关系存在循环(涉及「${L}」),已禁止保存。`;p.add(L),L=_.get(L)}}return null},Ce=o=>{const E=String(o.layer||"").trim().toUpperCase();if(E==="MENU")return"menu";if(E==="PAGE")return"page";if(E==="LIST_FIELD")return"listField";if(E==="FORM_FIELD")return"formField";if(E==="BUTTON"||E==="DIALOG_ACTION")return"action";if(E==="DIALOG")return"dialog";if(E==="DIALOG_FIELD")return"dialogField";if(E==="COMPAT")return"compat";const _=String(o.type||"").trim().toUpperCase();return _==="FIELD"?"formField":_==="ACTION"||_==="BUTTON"?"action":_==="MODULE"?"menu":_==="PAGE"?"page":_==="MENU"?o.code.startsWith("module.")||!o.parentCode?"menu":"page":o.code.startsWith("application:")?"formField":!o.code.startsWith("module.")&&!o.code.startsWith("page.")?"action":o.code.startsWith("module.")?"menu":"page"},Hl=o=>{const E=new Map(o.map(p=>[p.code,{...p,children:[]}])),_=[];E.forEach(p=>{const L=p.parentCode?E.get(p.parentCode):void 0;L?L.children.push(p):_.push(p)});const g=p=>p.sort((L,f)=>(L.sortOrder??0)-(f.sortOrder??0)||L.code.localeCompare(f.code,"zh-CN")).forEach(L=>g(L.children));return g(_),_},ma=o=>[o,...o.children.flatMap(ma)],ql=(o,E)=>o==="action"?E==="HIDDEN"||E==="READ"||E==="EDIT":o==="formField"||o==="dialogField"||o==="compat"?!0:E==="HIDDEN"||E==="READ",ca=(o,E,_,g,p=new Set)=>{const L=new Map(g.map(U=>[U.code,U])),f=L.get(o);if(!f||p.has(o)||!ql(Ce(f),E))return _;const h={..._,[o]:E};if(E==="HIDDEN"){const U=new Map;g.forEach($=>{if(!$.parentCode)return;const Y=U.get($.parentCode)||[];Y.push($.code),U.set($.parentCode,Y)});const I=$=>{for(const Y of U.get($)||[])p.has(Y)||(h[Y]="HIDDEN"),I(Y)};return I(o),h}const V=new Set([o]);let R=f.parentCode;for(;R;){if(V.has(R))return _;V.add(R);const U=L.get(R);if(!U)break;!p.has(R)&&(h[R]||"HIDDEN")==="HIDDEN"&&(h[R]="READ"),R=U.parentCode}return h},ie=o=>!!(o&&(o.groupCode==="DEFAULT_EMPLOYEE"||o.membershipMode==="DYNAMIC")),pa=o=>(o==null?void 0:o.groupCode)==="SUPER_ADMIN_GROUP",Ra=o=>[...o].sort((E,_)=>{const g=p=>ie(p)?0:pa(p)?1:2;return g(E)-g(_)}),sl=o=>o===null?"无法确认":String(o),Yl=(o,E)=>!o.selectable||o.assignedGroupId!==null,Xt=o=>`local:${o}`,ol=o=>`directory:${JSON.stringify([o.revision,o.openId])}`,Kl=o=>({revision:o.revision,openId:o.openId,...o.userId==null?{}:{userId:o.userId}}),Wl={class:"permission-editor","aria-labelledby":"permission-editor-title"},Jl={class:"editor-head"},Xl={class:"permission-search"},Ql={class:"tree-toolbar"},Zl=["disabled"],es=["disabled"],ts={class:"linkage-toggle"},as=["disabled"],ls={class:"authorization-summary"},ss={key:0,class:"permission-readonly"},os={key:1,class:"inline-alert danger",role:"alert"},ns={class:"permission-workspace"},is={class:"navigation-pane","aria-label":"系统导航目录"},rs={class:"pane-title"},us={class:"navigation-tree",role:"tree"},ds=["aria-level","aria-selected"],cs=["aria-expanded","onClick"],vs={key:1,class:"tree-expander-spacer"},ms=["aria-checked","disabled","onClick"],ps=["onClick"],ys={class:"navigation-icon"},gs={key:1,class:"navigation-empty"},bs={class:"permission-detail","aria-live":"polite"},fs={class:"detail-head"},hs={class:"detail-type"},ks={key:0,class:"menu-overview"},_s=["onClick"],Is={key:0,class:"detail-empty"},Ss={key:1,class:"feature-editor"},Cs={class:"permission-list"},Es={key:0,class:"detail-empty"},ws={key:0,cLine truncated
-1
View File
@@ -1 +0,0 @@
import{M as s}from"./index-CXCTlxVW.js";const r={listRoles:()=>s.get("/roles"),createRole:e=>s.post("/roles",e),updateRole:(e,i)=>s.put(`/roles/${e}`,i),deleteRole:e=>s.delete(`/roles/${e}`),listPermissions:()=>s.get("/roles/permissions"),getRolePermissions:e=>s.get(`/roles/${e}/permissions`),updateRolePermissions:(e,i)=>s.put(`/roles/${e}/permissions`,i),listGroups:()=>s.get("/user-groups"),createGroup:e=>s.post("/user-groups",e),updateGroup:(e,i)=>s.put(`/user-groups/${e}`,i),deleteGroup:e=>s.delete(`/user-groups/${e}`),getGroupRoles:e=>s.get(`/user-groups/${e}/roles`),updateGroupRoles:(e,i)=>s.put(`/user-groups/${e}/roles`,i,{suppressErrorNotification:!0}),getGroupMembers:e=>s.get(`/user-groups/${e}/members`),updateGroupMembers:(e,i)=>s.put(`/user-groups/${e}/members`,i,{suppressErrorNotification:!0}),listCandidates:(e,i)=>{const n=i==null?void 0:i.trim(),t={...e===void 0?{}:{groupId:e},...n?{q:n}:{}};return s.get("/user-groups/candidates",Object.keys(t).length?{params:t}:void 0)},searchGroupMemberCandidates:(e,i="")=>s.get(`/user-groups/${e}/member-candidates`,{params:{q:i.trim()}}),getIntegrationConfig:()=>s.get("/integrations/config"),updateIntegrationConfig:(e,i,n)=>s.put("/integrations/config",{provider:e,enabled:i,values:n}),testIntegration:e=>s.post("/integrations/config/test",{provider:e}),syncFeishuApprovalDefinition:()=>s.post("/feishu/approval/definition/sync",void 0,{suppressErrorNotification:!0}),listKingdeeSyncConfigs:()=>s.get("/integrations/kingdee/sync-configs"),createKingdeeSyncConfig:e=>s.post("/integrations/kingdee/sync-configs",e),getKingdeeSyncConfig:e=>s.get(`/integrations/kingdee/sync-configs/${e}`),updateKingdeeSyncConfig:(e,i)=>s.put(`/integrations/kingdee/sync-configs/${e}`,i),deleteKingdeeSyncConfig:e=>s.delete(`/integrations/kingdee/sync-configs/${e}`),previewKingdeeSyncConfig:e=>s.post(`/integrations/kingdee/sync-configs/${e}/preview`),prepareKingdeeSyncTable:e=>s.post(`/integrations/kingdee/sync-configs/${e}/prepare-table`),syncKingdeeConfig:e=>s.post(`/integrations/kingdee/sync-configs/${e}/sync`),listKingdeeSyncRuns:e=>s.get(`/integrations/kingdee/sync-configs/${e}/runs`)};export{r as a};
+1
View File
@@ -0,0 +1 @@
import{L as s}from"./index-DU2fjqYh.js";const n={listUsers:()=>s.get("/users"),updateUserStatus:(e,t)=>s.put(`/users/${e}/status`,{status:t}),listRoles:()=>s.get("/roles"),createRole:e=>s.post("/roles",e),updateRole:(e,t)=>s.put(`/roles/${e}`,t),deleteRole:e=>s.delete(`/roles/${e}`),listPermissions:()=>s.get("/roles/permissions"),getRolePermissions:e=>s.get(`/roles/${e}/permissions`),updateRolePermissions:(e,t)=>s.put(`/roles/${e}/permissions`,t),getRoleAuthorizationProfile:e=>s.get(`/roles/${e}/authorization-profile`),updateRoleAuthorizationProfile:(e,t)=>s.put(`/roles/${e}/authorization-profile`,t,{suppressErrorNotification:!0}),listGroups:()=>s.get("/user-groups"),getRoleGroups:e=>s.get(`/roles/${e}/groups`),updateRoleGroups:(e,t)=>s.put(`/roles/${e}/groups`,t,{suppressErrorNotification:!0}),createGroup:e=>s.post("/user-groups",e),updateGroup:(e,t)=>s.put(`/user-groups/${e}`,t),deleteGroup:e=>s.delete(`/user-groups/${e}`),getGroupRoles:e=>s.get(`/user-groups/${e}/roles`),updateGroupRoles:(e,t)=>s.put(`/user-groups/${e}/roles`,t,{suppressErrorNotification:!0}),getGroupMembers:e=>s.get(`/user-groups/${e}/members`),updateGroupMembers:(e,t)=>s.put(`/user-groups/${e}/members`,t,{suppressErrorNotification:!0}),listCandidates:(e,t)=>{const o=t==null?void 0:t.trim(),i={...e===void 0?{}:{groupId:e},...o?{q:o}:{}};return s.get("/user-groups/candidates",Object.keys(i).length?{params:i}:void 0)},searchGroupMemberCandidates:(e,t="")=>s.get(`/user-groups/${e}/member-candidates`,{params:{q:t.trim()}}),getIntegrationConfig:()=>s.get("/integrations/config"),updateIntegrationConfig:(e,t,o)=>s.put("/integrations/config",{provider:e,enabled:t,values:o}),testIntegration:e=>s.post("/integrations/config/test",{provider:e}),syncFeishuApprovalDefinition:()=>s.post("/feishu/approval/definition/sync",void 0,{suppressErrorNotification:!0}),listKingdeeSyncConfigs:()=>s.get("/integrations/kingdee/sync-configs"),createKingdeeSyncConfig:e=>s.post("/integrations/kingdee/sync-configs",e),getKingdeeSyncConfig:e=>s.get(`/integrations/kingdee/sync-configs/${e}`),updateKingdeeSyncConfig:(e,t)=>s.put(`/integrations/kingdee/sync-configs/${e}`,t),deleteKingdeeSyncConfig:e=>s.delete(`/integrations/kingdee/sync-configs/${e}`),previewKingdeeSyncConfig:e=>s.post(`/integrations/kingdee/sync-configs/${e}/preview`),prepareKingdeeSyncTable:e=>s.post(`/integrations/kingdee/sync-configs/${e}/prepare-table`),syncKingdeeConfig:e=>s.post(`/integrations/kingdee/sync-configs/${e}/sync`),listKingdeeSyncRuns:e=>s.get(`/integrations/kingdee/sync-configs/${e}/runs`)};export{n as a};
+1
View File
@@ -0,0 +1 @@
.prototype-config-page{display:flex;width:100%;min-width:0;min-height:0;flex:1 1 auto;flex-direction:column}.prototype-page-head{flex:0 0 auto}.prototype-head-actions{display:flex;min-width:0;gap:8px;flex-wrap:wrap;justify-content:flex-end}.prototype-governance-note{display:flex;width:100%;min-width:0;flex:0 0 auto;align-items:center;gap:14px;margin-bottom:16px;padding:14px 16px;border:1px solid #c9daf3;border-radius:var(--radius);background:linear-gradient(110deg,#f1f6fd,#fff);color:var(--muted);font-size:12px;line-height:1.6}.prototype-governance-note strong{color:var(--blue);white-space:nowrap}.prototype-config-card{display:flex;width:100%;min-width:0;min-height:0;flex:1 1 auto;flex-direction:column;overflow:hidden}.prototype-filter-bar{display:flex;width:100%;min-width:0;flex:0 0 auto;align-items:center;gap:10px;flex-wrap:wrap;padding:16px var(--component-inset);border-bottom:1px solid var(--line);background:var(--surface-raised, #fff)}.prototype-filter-bar input,.prototype-filter-bar select{width:auto;min-width:0;height:var(--control-height);min-height:var(--control-height);box-sizing:border-box;padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius);background:#fff;color:var(--text);font:inherit}.prototype-filter-bar input:focus,.prototype-filter-bar select:focus{border-color:var(--blue);outline:0;box-shadow:0 0 0 3px #0057d91f}.prototype-filter-bar input{flex:2 1 320px}.prototype-filter-bar select{flex:1 1 170px;max-width:240px}.prototype-filter-spacer{min-width:0;flex:1 1 20px}.prototype-result-count{flex:0 0 auto;padding:4px 10px;border-radius:999px;background:var(--surface-2, #eef2f7);color:var(--quiet);font-size:11px;white-space:nowrap}.prototype-config-card>.table-wrap{min-height:180px;flex:1 1 auto}.prototype-table td,.prototype-table th{text-align:center!important;vertical-align:middle}.prototype-table .amount{text-align:center!important}.prototype-cell-stack{display:grid;justify-items:center;gap:3px}.prototype-cell-stack small{color:var(--muted)}.prototype-row-actions{display:flex;align-items:center;justify-content:center;gap:12px;white-space:nowrap}.prototype-table-action{padding:0;border:0;background:transparent;color:var(--blue);font-weight:700;cursor:pointer}.prototype-table-action.danger{color:#b42318}.prototype-table-action:disabled{color:var(--muted);cursor:not-allowed}.business-status{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:700}.business-status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.business-status.is-active{background:#ecf8f2;color:#137a4a}.business-status.is-inactive{background:#f2f4f7;color:#667085}.prototype-empty{display:grid;width:100%;place-items:center;min-height:220px;flex:1 1 auto;padding:28px;color:var(--muted);text-align:center}.prototype-dialog{width:min(760px,calc(100vw - 32px))}.prototype-dialog form{margin:0}.prototype-dialog .modal-body{display:grid;gap:16px}.prototype-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.prototype-form-grid .field{display:grid;gap:7px;min-width:0}.prototype-form-grid .field.full{grid-column:1/-1}.prototype-form-grid label{font-size:13px;font-weight:700}.prototype-form-grid input,.prototype-form-grid select,.prototype-form-grid textarea{width:100%;min-width:0;box-sizing:border-box;border-color:var(--line-strong);border-radius:var(--radius)}.prototype-form-grid input,.prototype-form-grid select{min-height:var(--control-height)}.prototype-form-grid textarea{min-height:92px;resize:vertical}.prototype-form-grid em{color:#b42318;font-style:normal}.prototype-code-note{padding:12px 14px;border-radius:var(--radius);background:var(--surface-muted, #f5f7fa);color:var(--muted);font-size:12px}.prototype-form-error{margin:0;color:#b42318}.prototype-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--line)}.prototype-spec-grid>div{min-height:78px;padding:14px;background:#fff}.prototype-spec-grid span,.prototype-spec-grid strong{display:block}.prototype-spec-grid span{color:var(--muted);font-size:12px}.prototype-spec-grid strong{margin-top:7px;word-break:break-word}.prototype-exchange-card{display:flex;width:100%;min-width:0;flex:0 0 auto;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;padding:15px 17px;border:1px solid #c9daf3;border-radius:var(--radius);background:linear-gradient(110deg,#f1f6fd,#fff)}.prototype-exchange-card strong,.prototype-exchange-card span{display:block}.prototype-exchange-card span{margin-top:4px;color:var(--muted);font-size:12px}.prototype-exchange-card a{text-decoration:none;white-space:nowrap}.prototype-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.prototype-check-row{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:var(--radius)}.prototype-chLine truncated
+1
View File
@@ -0,0 +1 @@
import{L as s,d as u,c as o,b as a,t as i,e as d,a2 as l,j as r,n as g}from"./index-DU2fjqYh.js";const n=e=>s.get(`/business-config/${e}`,{suppressErrorNotification:!0}),v={references:()=>s.get("/business-config/references",{suppressErrorNotification:!0}),legalEntities:()=>n("legal-entities"),costCenters:()=>n("cost-centers"),currencies:()=>n("currencies"),paymentMethods:()=>n("payment-methods"),paymentAccounts:()=>n("payment-accounts"),create(e,t){return s.post(`/business-config/${e}`,t)},changeStatus(e,t,c){return s.patch(`/business-config/${e}/${t}/status`,{status:c})},budgetOverview:()=>s.get("/business-config/budgets/overview",{suppressErrorNotification:!0}),createBudgetSubject:e=>s.post("/business-config/budget-subjects",e),changeBudgetSubjectStatus:(e,t)=>s.patch(`/business-config/budget-subjects/${e}/status`,{status:t}),requestBudgetAdjustment:e=>s.post("/business-config/budget-adjustments",e)},b={class:"page-head prototype-page-head"},p={class:"eyebrow"},f={key:0},m={class:"prototype-head-actions"},y=u({__name:"BusinessConfigHeader",props:{eyebrow:{},title:{},description:{}},setup(e){return(t,c)=>(r(),o("div",b,[a("div",null,[a("span",p,i(e.eyebrow),1),a("h1",null,i(e.title),1),e.description?(r(),o("p",f,i(e.description),1)):d("",!0)]),a("div",m,[l(t.$slots,"default")])]))}}),B=u({__name:"StatusBadge",props:{active:{type:Boolean},activeLabel:{default:"启用"},inactiveLabel:{default:"停用"}},setup(e){return(t,c)=>(r(),o("span",{class:g(["business-status",e.active?"is-active":"is-inactive"])},i(e.active?e.activeLabel:e.inactiveLabel),3))}});export{y as _,B as a,v as b};
-1
View File
@@ -1 +0,0 @@
import{M as i}from"./index-CXCTlxVW.js";const o=t=>t.availabilityState==="AVAILABLE"||t.availabilityState==="NEVER_SYNCED"||t.availabilityState==="UNAVAILABLE"?t.availabilityState:t.snapshotState==="FRESH"?"AVAILABLE":t.snapshotState==="NEVER_SYNCED"?"NEVER_SYNCED":"UNAVAILABLE",s=36e4,n={sync:t=>i.post("/feishu/directory/sync",void 0,{timeout:s,signal:t}),status:t=>i.get("/feishu/directory/status",{signal:t}),organization:(t,a=!1)=>i.get("/feishu/directory/organization",{signal:t,params:{includeUsers:a}}),organizationMembers:(t,a,r=!0)=>i.get("/feishu/directory/organization/members",{signal:a,params:{departmentId:t,includeDescendants:r}})};export{o as d,n as f};
+1
View File
@@ -0,0 +1 @@
import{L as a}from"./index-DU2fjqYh.js";const o=t=>t.availabilityState==="AVAILABLE"||t.availabilityState==="NEVER_SYNCED"||t.availabilityState==="UNAVAILABLE"?t.availabilityState:t.snapshotState==="FRESH"?"AVAILABLE":t.snapshotState==="NEVER_SYNCED"?"NEVER_SYNCED":"UNAVAILABLE",s=36e4,n={sync:t=>a.post("/feishu/directory/sync",void 0,{timeout:s,signal:t}),status:t=>a.get("/feishu/directory/status",{signal:t}),runs:(t=0,i=20,r)=>a.get("/feishu/directory/runs",{signal:r,params:{page:t,size:i},timeout:15e3,suppressErrorNotification:!0}),organization:(t,i=!1)=>a.get("/feishu/directory/organization",{signal:t,params:{includeUsers:i}}),organizationMembers:(t,i,r=!0)=>a.get("/feishu/directory/organization/members",{signal:i,params:{departmentId:t,includeDescendants:r}})};export{o as d,n as f};
-101
View File
@@ -1,101 +0,0 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Layout-DdioVC-1.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Layout-CJcHDlfg.css","assets/Applications-DGthee3d.js","assets/useListPagination-BTBVezsP.js","assets/ReimbursementForm-CbZhelW2.js","assets/feishuDirectory-BmPyCMe4.js","assets/ReimbursementForm-5SgtrqLX.css","assets/ApplicationDetail-rMAybPuv.js","assets/ApplicationDetail-BF_Dd4fL.css","assets/FinanceReceipt-KvOQKX8l.js","assets/Sources-wU15iXEo.js","assets/Payments-CKaVaFZj.js","assets/Payments-CuwJVGQD.css","assets/Logs-DnbqcxT8.js","assets/Logs-BZtnCaMO.css","assets/ExpenseTypes-D9imPj3p.js","assets/Payees-Dvbc8Wvp.js","assets/Users-KkxvzObE.js","assets/admin-C9Owgj_V.js","assets/Users-DnaquuV_.css","assets/IntegrationConfig-CzZwjqVQ.js","assets/IntegrationConfig-BA1PArOj.css"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
* @vue/shared v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function th(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const wn={},$s=[],ht=()=>{},G3=()=>!1,lf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sf=e=>e.startsWith("onUpdate:"),jn=Object.assign,nh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},dC=Object.prototype.hasOwnProperty,Dt=(e,t)=>dC.call(e,t),we=Array.isArray,al=e=>Ku(e)==="[object Map]",Sr=e=>Ku(e)==="[object Set]",ll=e=>Ku(e)==="[object Date]",Ue=e=>typeof e=="function",Be=e=>typeof e=="string",qa=e=>typeof e=="symbol",it=e=>e!==null&&typeof e=="object",sl=e=>(it(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),X3=Object.prototype.toString,Ku=e=>X3.call(e),fC=e=>Ku(e).slice(8,-1),du=e=>Ku(e)==="[object Object]",uf=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ji=th(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cf=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},pC=/-\w/g,ta=cf(e=>e.replace(pC,t=>t.slice(1).toUpperCase())),hC=/\B([A-Z])/g,Or=cf(e=>e.replace(hC,"-$1").toLowerCase()),ju=cf(e=>e.charAt(0).toUpperCase()+e.slice(1)),Bl=cf(e=>e?`on${ju(e)}`:""),Fo=(e,t)=>!Object.is(e,t),Gc=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},J3=(e,t,n,a=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:a,value:n})},df=e=>{const t=parseFloat(e);return isNaN(t)?e:t},vC=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Cm;const ff=()=>Cm||(Cm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ye(e){if(we(e)){const t={};for(let n=0;n<e.length;n++){const a=e[n],o=Be(a)?bC(a):Ye(a);if(o)for(const r in o)t[r]=o[r]}return t}else if(Be(e)||it(e))return e}const mC=/;(?![^(]*\))/g,gC=/:([^]+)/,yC=/\/\*[^]*?\*\//g;function bC(e){const t={};return e.replace(yC,"").split(mC).forEach(n=>{if(n){const a=n.split(gC);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function I(e){let t="";if(Be(e))t=e;else if(we(e))for(let n=0;n<e.length;n++){const a=I(e[n]);a&&(t+=a+" ")}else if(it(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function mr(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Be(t)&&(e.class=I(t)),n&&(e.style=Ye(n)),e}const wC="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_C=th(wC);function Z3(e){return!!e||e===""}function CC(e,t){if(e.length!==t.length)return!1;let n=!0;for(let a=0;n&&a<e.length;a++)n=wo(e[a],t[a]);return n}function Sm(e,t){if(e.size!==t.size)return!1;const n=Array.from(t),a=new Uint8Array(n.length);for(const o of e){let r=-1;for(let l=0;l<n.length;l++)if(!a[l]&&wo(o,n[l])){r=l;break}if(r<0)return!1;a[r]=1}return!0}function wo(e,t){if(e===t)return!0;let n=ll(e),a=ll(t);if(n||a)return n&&a?e.getTime()===t.getTime():!1;if(n=qa(e),a=qa(t),n||a)return e===t;if(n=we(e),a=we(t),n||a)return n&&a?CC(e,t):!1;if(n=it(e),a=it(t),n||a){if(!n||!a)return!1;if(n=al(e),a=al(t),n||a||(n=Sr(e),a=Sr(t),n||a))return n&&a?Sm(e,t):!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const s=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(s&&!u||!s&&u||!wo(e[l],t[l]))return!1}}return String(e)===String(t)}function ah(e,t){return e.findIndex(n=>wo(n,t))}const Q3=e=>!!(e&&e.__v_isRef===!0),Ee=e=>Be(e)?e:e==null?"":we(e)||it(e)&&(e.toString===X3||!Ue(e.toString))?Q3(e)?Ee(e.value):JSON.stringify(e,e6,2):String(e),e6=(e,t)=>Q3(t)?e6(e,t.value):al(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,o],r)=>(n[v0(a,r)+" =>"]=o,n),{})}:Sr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>v0(n))}:qa(t)?v0(t):it(t)&&!we(t)&&!du(t)?String(t):t,v0=(e,t="")=>{var n;return qa(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Yn;class t6{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Yn&&(Yn.active?(this.parent=Yn,this.index=(Yn.scopes||(Yn.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const a=this.scopes.slice();for(t=0,n=a.length;t<n;t++)a[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const a=this.effects.slice();for(t=0,n=a.length;t<n;t++)a[t].resume()}}run(t){if(this._active){const n=Yn;try{return Yn=this,t()}finally{Yn=n}}}on(){++this._on===1&&(this.prevScope=Yn,Yn=this)}off(){if(this._on>0&&--this._on===0){if(Yn===this)Yn=this.prevScope;else{let t=Yn;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,a;for(n=0,a=this.effects.length;n<a;n++)this.effects[n].stop();for(this.effects.length=0,n=0,a=this.cleanups.length;n<a;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,a=o.length;n<a;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function oh(e){return new t6(e)}function pf(){return Yn}function rh(e,t=!1){Yn&&Yn.cleanups.push(e)}let xn;const m0=new WeakSet;class n6{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Yn&&(Yn.active?Yn.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,m0.has(this)&&(m0.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||o6(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,xm(this),r6(this);const t=xn,n=mo;xn=this,mo=!0;try{return this.fn()}finally{l6(this),xn=t,mo=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ih(t);this.deps=this.depsTail=void 0,xm(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?m0.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Tp(this)&&this.run()}get dirty(){return Tp(this)}}let a6=0,Zi,Qi;function o6(e,t=!1){if(e.flags|=8,t){e.next=Qi,Qi=e;return}e.next=Zi,Zi=e}function lh(){a6++}function sh(){if(--a6>0)return;if(Qi){let t=Qi;for(Qi=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Zi;){let t=Zi;for(Zi=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(a){e||(e=a)}t=n}}if(e)throw e}function r6(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function l6(e){let t,n=e.depsTail,a=n;for(;a;){const o=a.prevDep;a.version===-1?(a===n&&(n=o),ih(a),SC(a)):t=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=o}e.deps=t,e.depsTail=n}function Tp(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(s6(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function s6(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fu)||(e.globalVersion=fu,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Tp(e))))return;e.flags|=2;const t=e.dep,n=xn,a=mo;xn=e,mo=!0;try{r6(e);const o=e.fn(e._value);(t.version===0||Fo(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{xn=n,mo=a,l6(e),e.flags&=-3}}function ih(e,t=!1){const{dep:n,prevSub:a,nextSub:o}=e;if(a&&(a.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=a,e.nextSub=void 0),n.subs===e&&(n.subs=a,!a&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)ih(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function SC(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let mo=!0;const i6=[];function xr(){i6.push(mo),mo=!1}function kr(){const e=i6.pop();mo=e===void 0?!0:e}function xm(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xn;xn=void 0;try{t()}finally{xn=n}}}let fu=0;class xC{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class uh{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xn||!mo||xn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xn)n=this.activeLink=new xC(xn,this),xn.deps?(n.prevDep=xn.depsTail,xn.depsTail.nextDep=n,xn.depsTail=n):xn.deps=xn.depsTail=n,u6(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const a=n.nextDep;a.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=a),n.prevDep=xn.depsTailLine truncated
* @vue/runtime-core v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Wu(e,t,n,a){try{return a?e(...a):e()}catch(o){wf(o,t,n)}}function ro(e,t,n,a){if(Ue(e)){const o=Wu(e,t,n,a);return o&&sl(o)&&o.catch(r=>{wf(r,t,n)}),o}if(we(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ro(e[r],t,n,a));return o}}function wf(e,t,n,a=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||wn;if(t){let s=t.parent;const u=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const d=s.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](e,u,c)===!1)return}s=s.parent}if(r){xr(),Wu(r,null,10,[e,u,c]),kr();return}}GC(e,n,o,a,l)}function GC(e,t,n,a=!0,o=!1){if(o)throw e;console.error(e)}const xa=[];let Do=-1;const Ps=[];let Jr=null,Ts=0;const _6=Promise.resolve();let wd=null;function Ie(e){const t=wd||_6;return e?t.then(this?e.bind(this):e):t}function XC(e){let t=Do+1,n=xa.length;for(;t<n;){const a=t+n>>>1,o=xa[a],r=hu(o);r<e||r===e&&o.flags&2?t=a+1:n=a}return t}function ch(e){if(!(e.flags&1)){const t=hu(e),n=xa[xa.length-1];!n||!(e.flags&2)&&t>=hu(n)?xa.push(e):xa.splice(XC(t),0,e),e.flags|=1,C6()}}function C6(){wd||(wd=_6.then(x6))}function JC(e){if(!we(e))Jr&&e.id===-1?Jr.splice(Ts+1,0,e):e.flags&1||(Ps.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Ps.push(e[t]);C6()}function Em(e,t,n=Do+1){for(;n<xa.length;n++){const a=xa[n];if(a&&a.flags&2){if(e&&a.id!==e.uid)continue;xa.splice(n,1),n--,a.flags&4&&(a.flags&=-2),a(),a.flags&4||(a.flags&=-2)}}}function S6(e){if(Ps.length){const t=[...new Set(Ps)].sort((n,a)=>hu(n)-hu(a));if(Ps.length=0,Jr){for(let n=0;n<t.length;n++)Jr.push(t[n]);return}for(Jr=t,Ts=0;Ts<Jr.length;Ts++){const n=Jr[Ts];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Jr=null,Ts=0}}const hu=e=>e.id==null?e.flags&2?-1:1/0:e.id;function x6(e){try{for(Do=0;Do<xa.length;Do++){const t=xa[Do];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Wu(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Do<xa.length;Do++){const t=xa[Do];t&&(t.flags&=-2)}Do=-1,xa.length=0,S6(),wd=null,(xa.length||Ps.length)&&x6()}}let aa=null,k6=null;function _d(e){const t=aa;return aa=e,k6=e&&e.type.__scopeId||null,t}function re(e,t=aa,n){if(!t||e._n)return e;const a=(...o)=>{a._d&&kd(-1);const r=_d(t),l=yr.length;let s;try{s=e(...o)}finally{for(let u=yr.length;u>l;u--)_h();_d(r),a._d&&kd(1)}return s};return a._n=!0,a._c=!0,a._d=!0,a}function vt(e,t){if(aa===null)return e;const n=Ef(aa),a=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,s,u=wn]=t[o];r&&(Ue(r)&&(r={mounted:r,updated:r}),r.deep&&pr(l),a.push({dir:r,instance:n,value:l,oldValue:void 0,arg:s,modifiers:u}))}return e}function yl(e,t,n,a){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const s=o[l];r&&(s.oldValue=r[l].value);let u=s.dir[a];u&&(xr(),ro(u,n,8,[e.el,s,e,t]),kr())}}function Tt(e,t){if(pa){let n=pa.provides;const a=pa.parent&&pa.parent.provides;a===n&&(n=pa.provides=Object.create(a)),n[e]=t}}function Le(e,t,n=!1){const a=gt();if(a||zl){let o=zl?zl._context.provides:a?a.parent==null||a.ce?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Ue(t)?t.call(a&&a.proxy):t}}function dh(){return!!(gt()||zl)}const ZC=Symbol.for("v-scx"),QC=()=>Le(ZC);function ma(e,t){return fh(e,null,t)}function fe(e,t,n){return fh(e,t,n)}function fh(e,t,n=wn){const{immediate:a,deep:o,flush:r,once:l}=n,s=jn({},n),u=t&&a||!t&&r!=="post";let c;if(yu){if(r==="sync"){const m=QC();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!u){const m=()=>{};return m.stop=ht,m.resume=ht,m.pause=ht,m}}const d=pa;s.call=(m,v,h)=>ro(m,d,v,h);let f=!1;r==="post"?s.scheduler=m=>{Ca(m,d&&d.suspense)}:r!=="sync"&&(f=!0,s.scheduler=(m,v)=>{v?m():ch(m)}),s.augmentJob=m=>{t&&(m.flags|=4),f&&(m.flags|=2,d&&(m.id=d.uid,m.i=d))};const p=YC(e,t,s);return yu&&(c?c.push(p):u&&p()),p}function eS(e,t,n){const a=this.proxy,o=Be(e)?e.includes(".")?E6(a,e):()=>a[e]:e.bind(a,a);let r;Ue(t)?r=t:(r=t.handler,n=t);const l=Uu(this),s=fh(o,r.bind(a),n);return l(),s}function E6(e,t){const n=t.split(".");return()=>{let a=e;for(let o=0;o<n.length&&a;o++)a=a[n[o]];return a}}const jr=new WeakMap,T6=Symbol("_vte"),_f=e=>e.__isTeleport,Tl=e=>e&&(e.disabled||e.disabled===""),tS=e=>e&&(e.defer||e.defer===""),Tm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Mm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ap=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},nS={name:"Teleport",__isTeleport:!0,process(e,t,n,a,o,r,l,s,u,c){const{mc:d,pc:f,pbc:p,o:{insert:m,querySelector:v,createText:h,createComment:g,parentNode:y}}=c,b=Tl(t.props);let{dynamicChildren:C}=t;const w=(M,E,T)=>{M.shapeFlag&16&&d(M.children,E,T,o,r,l,s,u)},S=(M=t)=>{const E=Tl(M.props),T=M.target=Ap(M.props,v),N=Rp(T,M,h,m);T&&(l!=="svg"&&Tm(T)?l="svg":l!=="mathml"&&Mm(T)&&(l="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(T),E||(w(M,T,N),Hi(M,!1)))},k=M=>{const E=()=>{if(jr.get(M)===E){if(jr.delete(M),Tl(M.props)){const T=y(M.el)||n;w Line truncated
* @vue/runtime-dom v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Lp;const Fm=typeof window<"u"&&window.trustedTypes;if(Fm)try{Lp=Fm.createPolicy("vue",{createHTML:e=>e})}catch{}const ly=Lp?e=>Lp.createHTML(e):e=>e,XS="http://www.w3.org/2000/svg",JS="http://www.w3.org/1998/Math/MathML",ur=typeof document<"u"?document:null,Km=ur&&ur.createElement("template"),ZS={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const o=t==="svg"?ur.createElementNS(XS,e):t==="mathml"?ur.createElementNS(JS,e):n?ur.createElement(e,{is:n}):ur.createElement(e);return e==="select"&&a&&a.multiple!=null&&o.setAttribute("multiple",a.multiple),o},createText:e=>ur.createTextNode(e),createComment:e=>ur.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ur.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,o,r){const l=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Km.innerHTML=ly(a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e);const s=Km.content;if(a==="svg"||a==="mathml"){const u=s.firstChild;for(;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Hr="transition",Mi="animation",js=Symbol("_vtc"),sy={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},iy=jn({},O6,sy),QS=e=>(e.displayName="Transition",e.props=iy,e),Gn=QS((e,{slots:t})=>Je(rS,uy(e),t)),wl=(e,t=[])=>{we(e)?e.forEach(n=>n(...t)):e&&e(...t)},jm=e=>e?we(e)?e.some(t=>t.length>1):e.length>1:!1;function uy(e){const t={};for(const $ in e)$ in sy||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:a,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:u=r,appearActiveClass:c=l,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,v=ex(o),h=v&&v[0],g=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:w,onLeaveCancelled:S,onBeforeAppear:k=y,onAppear:M=b,onAppearCancelled:E=C}=t,T=($,V,U,D)=>{$._enterCancelled=D,Wr($,V?d:s),Wr($,V?c:l),U&&U()},N=($,V)=>{$._isLeaving=!1,Wr($,f),Wr($,m),Wr($,p),V&&V()},P=$=>(V,U)=>{const D=$?M:b,F=()=>T(V,$,U);wl(D,[V,F]),Wm(()=>{Wr(V,$?u:r),Bo(V,$?d:s),jm(D)||qm(V,a,h,F)})};return jn(t,{onBeforeEnter($){wl(y,[$]),Bo($,r),Bo($,l)},onBeforeAppear($){wl(k,[$]),Bo($,u),Bo($,c)},onEnter:P(!1),onAppear:P(!0),onLeave($,V){$._isLeaving=!0;const U=()=>N($,V);Bo($,f),$._enterCancelled?(Bo($,p),Vp($)):(Vp($),Bo($,p)),Wm(()=>{$._isLeaving&&(Wr($,f),Bo($,m),jm(w)||qm($,a,g,U))}),wl(w,[$,U])},onEnterCancelled($){T($,!1,void 0,!0),wl(C,[$])},onAppearCancelled($){T($,!0,void 0,!0),wl(E,[$])},onLeaveCancelled($){N($),wl(S,[$])}})}function ex(e){if(e==null)return null;if(it(e))return[C0(e.enter),C0(e.leave)];{const t=C0(e);return[t,t]}}function C0(e){return vC(e)}function Bo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[js]||(e[js]=new Set)).add(t)}function Wr(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[js];n&&(n.delete(t),n.size||(e[js]=void 0))}function Wm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let tx=0;function qm(e,t,n,a){const o=e._endId=++tx,r=()=>{o===e._endId&&a()};if(n!=null)return setTimeout(r,n);const{type:l,timeout:s,propCount:u}=cy(e,t);if(!l)return a();const c=l+"end";let d=0;const f=()=>{e.removeEventListener(c,p),r()},p=m=>{m.target===e&&++d>=u&&f()};setTimeout(()=>{d<u&&f()},s+1),e.addEventListener(c,p)}function cy(e,t){const n=window.getComputedStyle(e),a=v=>(n[v]||"").split(", "),o=a(`${Hr}Delay`),r=a(`${Hr}Duration`),l=Um(o,r),s=a(`${Mi}Delay`),u=a(`${Mi}Duration`),c=Um(s,u);let d=null,f=0,p=0;t===Hr?l>0&&(d=Hr,f=l,p=r.length):t===Mi?c>0&&(d=Mi,f=c,p=u.length):(f=Math.max(l,c),d=f>0?l>c?Hr:Mi:null,p=d?d===Hr?r.length:u.length:0);const m=d===Hr&&/\b(?:transform|all)(?:,|$)/.test(a(`${Hr}Property`).toString());return{type:d,timeout:f,propCount:p,hasTransform:m}}function Um(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,a)=>Ym(n)+Ym(e[a])))}function Ym(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Vp(e){return(e?e.ownerDocument:document).body.offsetHeight}function nx(e,t,n){const a=e[js];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Md=Symbol("_vod"),Ch=Symbol("_vsh"),Bt={name:"show",beforeMount(e,{value:t},{transition:n}){e[Md]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Oi(e,t)},mounted(e,{value:t},{tra Line truncated
`))),e[Ha]=il(o);const r=a||o.props&&o.props.type==="number";hr(e,t?"change":"input",l=>{l.target.composing||e[Ha](k0(e.value,n,r))}),(n||r)&&hr(e,"change",()=>{e.value=k0(e.value,n,r)}),t||(hr(e,"compositionstart",kx),hr(e,"compositionend",n1),hr(e,"change",n1))},mounted(e,{value:t,modifiers:{trim:n,number:a}}){const o=t??"",r=e[Tc];delete e[Tc],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Ha](k0(e.value,n,a)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:a,trim:o,number:r}},l){if(e[Ha]=il(l),e.composing)return;const s=(r||e.type==="number")&&!/^0\d/.test(e.value)?df(e.value):e.value,u=t??"";if(s===u)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(a&&t===n||o&&e.value.trim()===u)||(e.value=u)}},my={deep:!0,created(e,t,n){e[Ha]=il(n),hr(e,"change",()=>{const a=e._modelValue,o=Ws(e),r=e.checked,l=e[Ha];if(we(a)){const s=ah(a,o),u=s!==-1;if(r&&!u)l(a.concat(o));else if(!r&&u){const c=[...a];c.splice(s,1),l(c)}}else if(Sr(a)){const s=new Set(a);r?s.add(o):s.delete(o),l(s)}else l(yy(e,r))})},mounted:a1,beforeUpdate(e,t,n){e[Ha]=il(n),a1(e,t,n)}};function a1(e,{value:t,oldValue:n},a){e._modelValue=t;let o;if(we(t))o=ah(t,a.props.value)>-1;else if(Sr(t))o=t.has(a.props.value);else{if(t===n)return;o=wo(t,yy(e,!0))}e.checked!==o&&(e.checked=o)}const gy={created(e,{value:t},n){e.checked=wo(t,n.props.value),e[Ha]=il(n),hr(e,"change",()=>{e[Ha](Ws(e))})},beforeUpdate(e,{value:t,oldValue:n},a){e[Ha]=il(a),t!==n&&(e.checked=wo(t,a.props.value))}},ape={deep:!0,created(e,{value:t,modifiers:{number:n}},a){e._modelValue=t,hr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>n?df(Ws(u)):Ws(u)),r=e.multiple,l=r?Sr(e._modelValue)?new Set(o):o:o[0],s=e._pendingValue=[r,r?we(l)?o.slice():o:l];try{e[Ha](l)}finally{Ie(()=>{e._pendingValue===s&&(e._pendingValue=void 0)})}}),e[Ha]=il(a)},mounted(e,{value:t}){o1(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ha]=il(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Ex(t,n[1],n[0]))&&o1(e,t)}};function Ex(e,t,n){if(!n||we(e))return wo(e,t);if(Sr(e)){if(e.size!==t.length)return!1;for(const a of t)if(!e.has(a))return!1;return!0}return!1}function o1(e,t){const n=e.multiple,a=we(t);if(!(n&&!a&&!Sr(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],s=Ws(l);if(n)if(a){const u=typeof s;u==="string"||u==="number"?l.selected=t.some(c=>String(c)===String(s)):l.selected=ah(t,s)>-1}else l.selected=t.has(s);else if(wo(Ws(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ws(e){return"_value"in e?e._value:e.value}function yy(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Tx=["ctrl","shift","alt","meta"],Mx={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Tx.some(n=>e[`${n}Key`]&&!t.includes(n))},Ze=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=(o,...r)=>{for(let l=0;l<t.length;l++){const s=Mx[t[l]];if(s&&s(o,t))return}return e(o,...r)})},Ox={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},cn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=o=>{if(!("key"in o))return;const r=Or(o.key);if(t.some(l=>l===r||Ox[l]===r))return e(o)})},Ax=jn({patchProp:mx},ZS);let r1;function by(){return r1||(r1=PS(Ax))}const ul=(...e)=>{by().render(...e)},wy=(...e)=>{const t=by().createApp(...e),{mount:n}=t;return t.mount=a=>{const o=Nx(a);if(!o)return;const r=t._component;!Ue(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,Rx(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t};function Rx(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Nx(e){return Be(e)?document.querySelector(e):e}/*!
* pinia v2.3.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let _y;const Tf=e=>_y=e,Cy=Symbol();function Bp(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var nu;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(nu||(nu={}));function $x(){const e=oh(!0),t=e.run(()=>B({}));let n=[],a=[];const o=no({install(r){Tf(o),o._a=r,r.provide(Cy,o),r.config.globalProperties.$pinia=o,a.forEach(l=>n.push(l)),a=[]},use(r){return this._a?n.push(r):a.push(r),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Sy=()=>{};function l1(e,t,n,a=Sy){e.push(t);const o=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),a())};return!n&&pf()&&rh(o),o}function ys(e,...t){e.slice().forEach(n=>{n(...t)})}const Px=e=>e(),s1=Symbol(),E0=Symbol();function Dp(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,a)=>e.set(a,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const a=t[n],o=e[n];Bp(o)&&Bp(a)&&e.hasOwnProperty(n)&&!Jt(a)&&!gr(a)?e[n]=Dp(o,a):e[n]=a}return e}const Ix=Symbol();function Lx(e){return!Bp(e)||!e.hasOwnProperty(Ix)}const{assign:qr}=Object;function Vx(e){return!!(Jt(e)&&e.effect)}function Bx(e,t,n,a){const{state:o,actions:r,getters:l}=t,s=n.state.value[e];let u;function c(){s||(n.state.value[e]=o?o():{});const d=Vn(n.state.value[e]);return qr(d,r,Object.keys(l||{}).reduce((f,p)=>(f[p]=no(x(()=>{Tf(n);const m=n._s.get(e);return l[p].call(m,m)})),f),{}))}return u=xy(e,c,t,n,a,!0),u}function xy(e,t,n={},a,o,r){let l;const s=qr({actions:{}},n),u={deep:!0};let c,d,f=[],p=[],m;const v=a.state.value[e];!r&&!v&&(a.state.value[e]={});let h;function g(E){let T;c=d=!1,typeof E=="function"?(E(a.state.value[e]),T={type:nu.patchFunction,storeId:e,events:m}):(Dp(a.state.value[e],E),T={type:nu.patchObject,payload:E,storeId:e,events:m});const N=h=Symbol();Ie().then(()=>{h===N&&(c=!0)}),d=!0,ys(f,T,a.state.value[e])}const y=r?function(){const{state:T}=n,N=T?T():{};this.$patch(P=>{qr(P,N)})}:Sy;function b(){l.stop(),f=[],p=[],a._s.delete(e)}const C=(E,T="")=>{if(s1 in E)return E[E0]=T,E;const N=function(){Tf(a);const P=Array.from(arguments),$=[],V=[];function U(O){$.push(O)}function D(O){V.push(O)}ys(p,{args:P,name:N[E0],store:S,after:U,onError:D});let F;try{F=E.apply(this&&this.$id===e?this:S,P)}catch(O){throw ys(V,O),O}return F instanceof Promise?F.then(O=>(ys($,O),O)).catch(O=>(ys(V,O),Promise.reject(O))):(ys($,F),F)};return N[s1]=!0,N[E0]=T,N},w={_p:a,$id:e,$onAction:l1.bind(null,p),$patch:g,$reset:y,$subscribe(E,T={}){const N=l1(f,E,T.detached,()=>P()),P=l.run(()=>fe(()=>a.state.value[e],$=>{(T.flush==="sync"?d:c)&&E({storeId:e,type:nu.direct,events:m},$)},qr({},u,T)));return N},$dispose:b},S=zt(w);a._s.set(e,S);const M=(a._a&&a._a.runWithContext||Px)(()=>a._e.run(()=>(l=oh()).run(()=>t({action:C}))));for(const E in M){const T=M[E];if(Jt(T)&&!Vx(T)||gr(T))r||(v&&Lx(T)&&(Jt(T)?T.value=v[E]:Dp(T,v[E])),a.state.value[e][E]=T);else if(typeof T=="function"){const N=C(T,E);M[E]=N,s.actions[E]=T}}return qr(S,M),qr(Qt(S),M),Object.defineProperty(S,"$state",{get:()=>a.state.value[e],set:E=>{g(T=>{qr(T,E)})}}),a._p.forEach(E=>{qr(S,l.run(()=>E({store:S,app:a._a,pinia:a,options:s})))}),v&&r&&n.hydrate&&n.hydrate(S.$state,v),c=!0,d=!0,S}/*! #__NO_SIDE_EFFECTS__ */function ky(e,t,n){let a,o;const r=typeof t=="function";typeof e=="string"?(a=e,o=r?n:t):(o=e,a=e.id);function l(s,u){const c=dh();return s=s||(c?Le(Cy,null):null),s&&Tf(s),s=_y,s._s.has(a)||(r?xy(a,t,o,s):Bx(a,o,s)),s._s.get(a)}return l.$id=a,l}const Se={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},i1=["left","center","right"],Dx=["year","years","month","months","date","dates","week","quarter","quarters","datetime","datetimerange","daterange","monthrange","yearrange","quarterrange"],T0=["sun","mon","tue","wed","thu","fri","sat"],st="update:modelValue",wt="change",Rn="input",u1=Symbol("INSTALLED_KEY"),Oo=["","default","small","large"];function Ey(e,t){var n;const a=Mt();return ma(()=>{a.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),Fs(a)}function cl(e,t){return pf()?(rh(e,t),!0):!1}const M0=new WeakMap,zx=(...e)=>{var t;const n=e[0],a=(t=gt())===null||t===void 0?void 0:t.proxy,o=a??pf();if(o==null&&!dh())throw new Error("injectLocal must be called in setup");return o&&M0.has(o)&&n in M0.get(o)?M0.get(o)[n]:Le(...e)},Vt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Hx=e=>typeof e<"u",Ty=e=>e!=null,Fx=Object.prototype.toString,Kx=e=>Fx.call(e)==="[object Object]",Mf=(e,t,n)=>Math.min(n,Math.max(t,e)),Zn=()=>{},qs=jx();function jx(){var e,t,n;return Vt&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigatoLine truncated
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/const t2="_Mousewheel",J1=function(e,t){if(e&&e.addEventListener){Mb(e);const n=function(a){const o=jO(a);t&&Reflect.apply(t,this,[a,o])};e[t2]={wheelHandler:n},e.addEventListener("wheel",n,{passive:!0})}},Mb=e=>{var t;(t=e._Mousewheel)!=null&&t.wheelHandler&&(e.removeEventListener("wheel",e[t2].wheelHandler),e[t2]=null)},Z1={beforeMount(e,t){J1(e,t.value)},unmounted(e){Mb(e)},updated(e,t){t.value!==t.oldValue&&J1(e,t.value)}},xu=e=>Object.keys(e),Ob=e=>Object.entries(e),ol=(e,t,n)=>({get value(){return kn(e,t,n)},set value(a){OO(e,t,a)}}),WO="__epPropKey",J=e=>e,qO=e=>it(e)&&!!e.__epPropKey,Ro=(e,t)=>{if(!it(e)||qO(e))return e;const{values:n,required:a,default:o,type:r,validator:l}=e,s={type:r,required:!!a,validator:n||l?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Dt(e,"default")&&d.push(o),c||(c=d.includes(u))),l&&(c||(c=l(u))),!c&&d.length>0){const f=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");GS(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[WO]:!0};return Dt(e,"default")&&(s.default=o),s},Te=e=>Gs(Object.entries(e).map(([t,n])=>[t,Ro(n,t)])),UO=Te({zIndex:{type:J([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"},teleported:Boolean,appendTo:{type:J([String,Object]),default:"body"}}),YO={scroll:({scrollTop:e,fixed:t})=>Ke(e)&&Yt(t),[wt]:e=>Yt(e)};var Ab=class extends Error{constructor(e){super(e),this.name="ElementPlusError"}};function pn(e,t){throw new Ab(`[${e}] ${t}`)}function qt(e,t){{const n=Be(e)?new Ab(`[${e}] ${t}`):e;console.warn(n)}}const GO=["class","style"],XO=/^on[A-Z]/,zf=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,a=x(()=>((n==null?void 0:n.value)||[]).concat(GO)),o=gt();return o?x(()=>{var r;return Gs(Object.entries((r=o.proxy)==null?void 0:r.$attrs).filter(([l])=>!a.value.includes(l)&&!(t&&XO.test(l))))}):(qt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),x(()=>({})))};function Hh(){const e=Mt(),t=B(0),n=x(()=>({minWidth:`${Math.max(t.value,11)}px`}));return rn(e,()=>{var o;t.value=((o=e.value)==null?void 0:o.getBoundingClientRect().width)??0}),{calculatorRef:e,calculatorWidth:t,inputStyle:n}}const Wo=({from:e,replacement:t,scope:n,version:a,ref:o,type:r="API"},l)=>{fe(()=>i(l),s=>{s&&qt(n,`[${r}] ${e} is about to be deprecated in version ${a}, please use ${t} instead.
For more detail, please visit: ${o}
`)},{immediate:!0})},Fh=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),P0=e=>ju(e),JO="utils/dom/style",Rb=(e="")=>e.split(" ").filter(t=>!!t.trim()),ao=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},eo=(e,t)=>{!e||!t.trim()||e.classList.add(...Rb(t))},ha=(e,t)=>{!e||!t.trim()||e.classList.remove(...Rb(t))},vr=(e,t)=>{var a;if(!Vt||!e||!t||gb(e))return"";let n=ta(t);n==="float"&&(n="cssFloat");try{const o=e.style[n];if(o)return o;const r=(a=document.defaultView)==null?void 0:a.getComputedStyle(e,"");return r?r[n]:""}catch{return e.style[n]}},Nb=(e,t,n)=>{if(!(!e||!t))if(it(t))Ob(t).forEach(([a,o])=>Nb(e,a,o));else{const a=ta(t);e.style[a]=n}};function gn(e,t="px"){if(!e&&e!==0)return"";if(Ke(e)||IO(e))return`${e}${t}`;if(Be(e))return e;qt(JO,"binding value must be a string or number")}const $b=(e,t,n,a)=>{const o={offsetX:0,offsetY:0},r=B(!1),l=(p,m)=>{if(e.value){const{offsetX:v,offsetY:h}=o,g=e.value.getBoundingClientRect(),y=Math.max(g.left,0),b=Math.max(g.top,0),C=g.width,w=g.height,S=document.documentElement.clientWidth,k=document.documentElement.clientHeight,M=-y+v,E=-b+h,T=S-y-C+v,N=k-b-(w<k?w:0)+h;a!=null&&a.value||(p=Ra(p,M,T),m=Ra(m,E,N)),o.offsetX=p,o.offsetY=m,e.value.style.transform=`translate(${gn(p)}, ${gn(m)})`}},s=p=>{const m=p.clientX,v=p.clientY,{offsetX:h,offsetY:g}=o,y=C=>{r.value||(r.value=!0),l(h+C.clientX-m,g+C.clientY-v)},b=()=>{r.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b)},u=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",s),window.addEventListener("resize",f))},c=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",s),window.removeEventListener("resize",f))},d=()=>{o.offsetX=0,o.offsetY=0,e.value&&(e.value.style.transform="")},f=()=>{const{offsetX:p,offsetY:m}=o;l(p,m)};return yt(()=>{ma(()=>{n.value?u():c()})}),Ht(()=>{c()}),{isDragging:r,resetPosition:d,updatePosition:f}};var ZO={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",quarterTablePrompt:"Use the arrow keys and enter to select the quarter",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},input:{characters:"{count} / {max} characters"},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"R Line truncated
usage: app.provide(ID_INJECTION_KEY, {
prefix: number,
current: number,
})`);const n=Kh();return Ey(()=>i(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Ms=[];const dg=e=>{Xt(e)===Se.esc&&Ms.forEach(t=>t(e))},vR=e=>{yt(()=>{Ms.length===0&&document.addEventListener("keydown",dg),Vt&&Ms.push(e)}),Ht(()=>{Ms=Ms.filter(t=>t!==e),Ms.length===0&&Vt&&document.removeEventListener("keydown",dg)})},Xb=()=>{const e=Kh(),t=tv(),n=x(()=>`${e.value}-popper-container-${t.prefix}`);return{id:n,selector:x(()=>`#${n.value}`)}},mR=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},gR=()=>{const{id:e,selector:t}=Xb();return xf(()=>{Vt&&(document.body.querySelector(t.value)||mR(e.value))}),{id:e,selector:t}},yR=Te({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),bR={showAfter:0,hideAfter:200,autoClose:0},wR=({showAfter:e,hideAfter:t,autoClose:n,open:a,close:o})=>{const{registerTimeout:r}=cg(),{registerTimeout:l,cancelTimeout:s}=cg();return{onOpen:(d,f=i(e))=>{r(()=>{a(d);const p=i(n);Ke(p)&&p>0&&l(()=>{o(d)},p)},f)},onClose:(d,f=i(t))=>{s(),r(()=>{o(d)},f)}}},Jb=Symbol("elForwardRef"),_R=e=>{Tt(Jb,{setForwardRef:n=>{e.value=n}})},CR=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),fg={current:0},pg=B(0),Zb=2e3,hg=Symbol("elZIndexContextKey"),Qb=Symbol("zIndexContextKey"),oc=e=>{const t=gt()?Le(hg,fg):fg,n=e||(gt()?Le(Qb,void 0):void 0),a=x(()=>{const l=i(n);return Ke(l)?l:Zb}),o=x(()=>a.value+pg.value),r=()=>(t.current++,pg.value=t.current,o.value);return!Vt&&!Le(hg)&&qt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,currentZIndex:o,nextZIndex:r}},ei=Math.min,Fl=Math.max,Ld=Math.round,Nc=Math.floor,wr=e=>({x:e,y:e}),SR={left:"right",right:"left",bottom:"top",top:"bottom"};function e8(e,t,n){return Fl(e,ei(t,n))}function rc(e,t){return typeof e=="function"?e(t):e}function ti(e){return e.split("-")[0]}function lc(e){return e.split("-")[1]}function t8(e){return e==="x"?"y":"x"}function nv(e){return e==="y"?"height":"width"}function el(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function av(e){return t8(el(e))}function xR(e,t,n){n===void 0&&(n=!1);const a=lc(e),o=av(e),r=nv(o);let l=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=Vd(l)),[l,Vd(l)]}function kR(e){const t=Vd(e);return[r2(e),t,r2(t)]}function r2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vg=["left","right"],mg=["right","left"],ER=["top","bottom"],TR=["bottom","top"];function MR(e,t,n){switch(e){case"top":case"bottom":return n?t?mg:vg:t?vg:mg;case"left":case"right":return t?ER:TR;default:return[]}}function OR(e,t,n,a){const o=lc(e);let r=MR(ti(e),n==="start",a);return o&&(r=r.map(l=>l+"-"+o),t&&(r=r.concat(r.map(r2)))),r}function Vd(e){const t=ti(e);return SR[t]+e.slice(t.length)}function AR(e){var t,n,a,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(a=e.bottom)!=null?a:0,left:(o=e.left)!=null?o:0}}function n8(e){return typeof e!="number"?AR(e):{top:e,right:e,bottom:e,left:e}}function Bd(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function gg(e,t,n){let{reference:a,floating:o}=e;const r=el(t),l=av(t),s=nv(l),u=ti(t),c=r==="y",d=a.x+a.width/2-o.width/2,f=a.y+a.height/2-o.height/2,p=a[s]/2-o[s]/2;let m;switch(u){case"top":m={x:d,y:a.y-o.height};break;case"bottom":m={x:d,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:f};break;case"left":m={x:a.x-o.width,y:f};break;default:m={x:a.x,y:a.y}}const v=lc(t);return v&&(m[l]+=p*(v==="end"?1:-1)*(n&&c?-1:1)),m}async function a8(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:r,rects:l,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=rc(t,e),v=n8(m),g=s[p?f==="floating"?"reference":"floating":f],y=Bd(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),b=f==="floating"?{x:a,y:o,width:l.floating.width,height:l.floating.height}:l.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),w=await(r.isElement==null?void 0:r.isElement(C))&&await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1},S=Bd(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:C,strategy:u}):b);return{top:(y.top-S.top+v.top)/w.y,bottom:(S.bottom-y.bottom+v.bottom)/w.y,left:(y.left-S.left+v.left)/w.x,right:(S.right-y.right+v.right)/w.x}}const RR=50,NR=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:r=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:a8},u=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=gg(c,a,u),p=a,m=0;const v={};for(let h=0;h<r.length;h++){const g=r[h];if(!g)continue;const{name:y,fn:b}=g,{x:C,y:w,data:S,reset:k}=await b({x:d,y:f,initialPlacement:a,placement:p,strategy:o,middlewareData:v,rects:c,platform:s,elements:{reference:e,floating:t}});d=C??d,f=w??f,v[y]={...v[y],...S},k&&m<RR&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:f}=gg(c,p,u)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:v}},$R=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:r,platform:l,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=rc(e,t)||{};if(c==null)return{};const f=n8(d),p={x:n,y:a},m=av(o),v=nv(m),h=await l.getDimensions(c),g=m==="y",y=g?"top":"left",b=g?"bottom":"right",C=g?"clientHeight":"clientWidth",w=r.reference[v]+r.reference[m]-p[m]-r.floating[v],S=p[m]-r.reference[m],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let M=k?k[C]:0;(!M||!await(l.isElement==null?void 0:l.isElement(k)))&&(M=s.floating[C]||r.floating[v]);const E=w/2-S/2,T=M/2-h[v]/2-1,N=ei(f[y],T),P=ei(f[b],T),$=M-h[v]-P,V=M/2-h[v]/2+E,U=e8(N,V,$),D=!u.arrow&&lc(o)!=null&&V!==U&&r.reference[v]/2-(V<N?N:P)-h[v]/2<0,F=D?V<N?V-N:V-$:0;return{[m]:p[m]+F,data:{[m]:U,centerOffset:V-U-F,...D&&{alignmentOffset:F}},reset:D}}}),PR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:r,rects:l,initialPlacement:s,platform:u,el Line truncated
(?:
(?:`+a+":){7}(?:"+a+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+a+":){6}(?:"+n+"|:"+a+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+a+":){5}(?::"+n+"|(?::"+a+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+a+":){4}(?:(?::"+a+"){0,1}:"+n+"|(?::"+a+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+a+":){3}(?:(?::"+a+"){0,2}:"+n+"|(?::"+a+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+a+":){2}(?:(?::"+a+"){0,3}:"+n+"|(?::"+a+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+a+":){1}(?:(?::"+a+"){0,4}:"+n+"|(?::"+a+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+a+"){0,5}:"+n+"|(?::"+a+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+n+"$)|(?:^"+o+"$)"),l=new RegExp("^"+n+"$"),s=new RegExp("^"+o+"$"),u=function(w){return w&&w.exact?r:new RegExp("(?:"+t(w)+n+t(w)+")|(?:"+t(w)+o+t(w)+")","g")};u.v4=function(C){return C&&C.exact?l:new RegExp(""+t(C)+n+t(C),"g")},u.v6=function(C){return C&&C.exact?s:new RegExp(""+t(C)+o+t(C),"g")};var c="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",f=u.v4().source,p=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',b="(?:"+c+"|www\\.)"+d+"(?:localhost|"+f+"|"+p+"|"+m+v+h+")"+g+y;return Pc=new RegExp("(?:^"+b+"$)","i"),Pc},Og={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Wi={integer:function(t){return Wi.number(t)&&parseInt(t,10)===t},float:function(t){return Wi.number(t)&&!Wi.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Wi.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Og.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(vK())},hex:function(t){return typeof t=="string"&&!!t.match(Og.hex)}},mK=function(t,n,a,o,r){if(t.required&&n===void 0){U8(t,n,a,o,r);return}var l=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;l.indexOf(s)>-1?Wi[s](n)||o.push(ja(r.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&o.push(ja(r.messages.types[s],t.fullField,t.type))},gK=function(t,n,a,o,r){var l=typeof t.len=="number",s=typeof t.min=="number",u=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,f=null,p=typeof n=="number",m=typeof n=="string",v=Array.isArray(n);if(p?f="number":m?f="string":v&&(f="array"),!f)return!1;v&&(d=n.length),m&&(d=n.replace(c,"_").length),l?d!==t.len&&o.push(ja(r.messages[f].len,t.fullField,t.len)):s&&!u&&d<t.min?o.push(ja(r.messages[f].min,t.fullField,t.min)):u&&!s&&d>t.max?o.push(ja(r.messages[f].max,t.fullField,t.max)):s&&u&&(d<t.min||d>t.max)&&o.push(ja(r.messages[f].range,t.fullField,t.min,t.max))},ws="enum",yK=function(t,n,a,o,r){t[ws]=Array.isArray(t[ws])?t[ws]:[],t[ws].indexOf(n)===-1&&o.push(ja(r.messages[ws],t.fullField,t[ws].join(", ")))},bK=function(t,n,a,o,r){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(ja(r.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var l=new RegExp(t.pattern);l.test(n)||o.push(ja(r.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},tn={required:U8,whitespace:hK,type:mK,range:gK,enum:yK,pattern:bK},wK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n,"string")&&!t.required)return a();tn.required(t,n,o,l,r,"string"),Xn(n,"string")||(tn.type(t,n,o,l,r),tn.range(t,n,o,l,r),tn.pattern(t,n,o,l,r),t.whitespace===!0&&tn.whitespace(t,n,o,l,r))}a(l)},_K=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),n!==void 0&&tn.type(t,n,o,l,r)}a(l)},CK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),n!==void 0&&(tn.type(t,n,o,l,r),tn.range(t,n,o,l,r))}a(l)},SK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),n!==void 0&&tn.type(t,n,o,l,r)}a(l)},xK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),Xn(n)||tn.type(t,n,o,l,r)}a(l)},kK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),n!==void 0&&(tn.type(t,n,o,l,r),tn.range(t,n,o,l,r))}a(l)},EK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Xn(n)&&!t.required)return a();tn.required(t,n,o,l,r),n!==void 0&&(tn.type(t,n,o,l,r),tn.range(t,n,o,l,r))}a(l)},TK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return a();tn.required(t,n,o,l,r,"array"),n!=null&&(tn.type(t,n,o,l,r),tn.range(t,n,o,l,r))}a(l)},MK=function(t,n,a,o,r){var Line truncated
You should set
width/height
to number when your layout is
horizontal/vertical
`);const c=Math.max(0,t*n-u),d=Math.min(c,r*n),f=Math.max(0,(r+1)*n-u);switch(l==="smart"&&(s>=f-u&&s<=d+u?l=to:l=jo),l){case Nu:return d;case"end":return f;case jo:{const p=Math.round(f+(d-f)/2);return p<Math.ceil(u/2)?0:p>c+Math.floor(u/2)?c:p}case to:default:return s>=f&&s<=d?s:s<f?f:d}},getStartIndexForOffset:({total:e,itemSize:t},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:a,width:o},r,l)=>{const s=r*n,u=Pu(a)?o:e,c=Math.ceil((u+l-s)/n);return Math.max(0,Math.min(t-1,r+c-1))},initCache(){},clearCache:!0,validateProps(){}}),HU="ElDynamicSizeList",Rs=(e,t,n)=>{const{itemSize:a}=e,{items:o,lastVisitedIndex:r}=n;if(t>r){let l=0;if(r>=0){const s=o[r];l=s.offset+s.size}for(let s=r+1;s<=t;s++){const u=a(s);o[s]={offset:l,size:u},l+=u}n.lastVisitedIndex=t}return o[t]},FU=(e,t,n)=>{const{items:a,lastVisitedIndex:o}=t;return(o>0?a[o].offset:0)>=n?zw(e,t,0,o,n):KU(e,t,Math.max(0,o),n)},zw=(e,t,n,a,o)=>{for(;n<=a;){const r=n+Math.floor((a-n)/2),l=Rs(e,r,t).offset;if(l===o)return r;l<o?n=r+1:l>o&&(a=r-1)}return Math.max(0,n-1)},KU=(e,t,n,a)=>{const{total:o}=e;let r=1;for(;n<o&&Rs(e,n,t).offset<a;)n+=r,r*=2;return zw(e,t,Math.floor(n/2),Math.min(n,o-1),a)},s4=({total:e},{items:t,estimatedItemSize:n,lastVisitedIndex:a})=>{let o=0;if(a>=e&&(a=e-1),a>=0){const l=t[a];o=l.offset+l.size}const r=(e-a-1)*n;return o+r},jU=Dw({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>Rs(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:s4,getOffset:(e,t,n,a,o)=>{const{height:r,layout:l,width:s}=e,u=Pu(l)?s:r,c=Rs(e,t,o),d=s4(e,o),f=Math.max(0,Math.min(d-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch(n==="smart"&&(a>=p-u&&a<=f+u?n=to:n=jo),n){case Nu:return f;case"end":return p;case jo:return Math.round(p+(f-p)/2);case to:default:return a>=p&&a<=f?a:a<p?p:f}},getStartIndexForOffset:(e,t,n)=>FU(e,n,t),getStopIndexForStartIndex:(e,t,n,a)=>{const{height:o,total:r,layout:l,width:s}=e,u=Pu(l)?s:o,c=Rs(e,t,a),d=n+u;let f=c.offset+c.size,p=t;for(;p<r-1&&f<d;)p++,f+=Rs(e,p,a).size;return p},initCache({estimatedItemSize:e=50},t){const n={items:{},estimatedItemSize:e,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(a,o=!0)=>{var r,l;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,a-1),(r=t.exposed)==null||r.getItemStyleCache(-1),o&&((l=t.proxy)==null||l.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{typeof e!="function"&&pn(HU,`
itemSize is required as function, but the given value was ${typeof e}
`)}}),WU=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:a},o)=>{let r=null,l=0,s=0;const u=(d,f)=>{const p=d<0&&t.value||d>0&&e.value,m=f<0&&a.value||f>0&&n.value;return p||m};return{hasReachedEdge:u,onWheel:d=>{So(r);let f=d.deltaX,p=d.deltaY;if(Math.abs(f)>Math.abs(p)?p=0:f=0,d.shiftKey&&p!==0&&(f=p,p=0),u(f,p)){d.deltaX!==0&&f===0&&d.preventDefault();return}l+=f,s+=p,d.preventDefault(),r=ga(()=>{o(l,s),l=0,s=0})}}},qU=(e,t,n,a,o,r,l)=>{const s=B(0),u=B(0);let c,d=0,f=0;const p=v=>{So(c),s.value=v.touches[0].clientX,u.value=v.touches[0].clientY,d=0,f=0},m=v=>{v.preventDefault(),So(c),d+=s.value-v.touches[0].clientX,f+=u.value-v.touches[0].clientY,s.value=v.touches[0].clientX,u.value=v.touches[0].clientY,c=ga(()=>{const h=a.value-i(r),g=o.value-i(l);n({scrollLeft:Math.min(t.value.scrollLeft+d,h),scrollTop:Math.min(t.value.scrollTop+f,g)}),d=0,f=0})};return Kt(e,"touchstart",p,{passive:!0}),Kt(e,"touchmove",m,{passive:!1}),{touchStartX:s,touchStartY:u,handleTouchStart:p,handleTouchMove:m}},Hw=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:a,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:r,getEstimatedTotalWidth:l,getColumnOffset:s,getRowOffset:u,getRowPosition:c,getRowStartIndexForOffset:d,getRowStopIndexForStartIndex:f,initCache:p,injectToInstance:m,validateProps:v})=>j({name:e??"ElVirtualList",props:jl,emits:[jd,Wd],setup(h,{emit:g,expose:y,slots:b}){const C=be("vl");v(h);const w=gt(),S=B(p(h,w));m==null||m(w,S);const k=B(),M=B(),E=B(),T=B(),N=B({isScrolling:!1,scrollLeft:Ke(h.initScrollLeft)?h.initScrollLeft:0,scrollTop:Ke(h.initScrollTop)?h.initScrollTop:0,updateRequested:!1,xAxisScrollDir:qd,yAxisScrollDir:qd}),P=Vw(),$=x(()=>Number.parseInt(`${h.height}`,10)),V=x(()=>Number.parseInt(`${h.width}`,10)),U=x(()=>{const{totalColumn:ge,totalRow:Oe,columnCache:_e}=h,{isScrolling:$e,xAxisScrollDir:ze,scrollLeft:Qe}=i(N);if(ge===0||Oe===0)return[0,0,0,0];const et=a(h,Qe,i(S)),Xe=o(h,et,Qe,i(S)),_t=!$e||ze==="backward"?Math.max(1,_e):1,Rt=!$e||ze==="forward"?Math.max(1,_e):1;return[Math.max(0,et-_t),Math.max(0,Math.min(ge-1,Xe+Rt)),et,Xe]}),D=x(()=>{const{totalColumn:ge,totalRow:Oe,rowCache:_e}=h,{isScrolling:$e,yAxisScrollDir:ze,scrollTop:Qe}=i(N);if(ge===0||Oe===0)return[0,0,0,0];const et=d(h,Qe,i(S)),Xe=f(h,et,Qe,i(S)),_t=!$e||ze==="backward"?Math.max(1,_e):1,Rt=!$e||ze==="forward"?Math.max(1,_e):1;return[Math.max(0,et-_t),Math.max(0,Math.min(Oe-1,Xe+Rt)),et,Xe]}),F=x(()=>r(h,i(S))),O=x(()=>l(h,i(S))),L=x(()=>[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:h.direction,height:Ke(h.height)?`${h.height}px`:h.height,width:Ke(h.width)?`${h.width}px`:h.width},h.style??{}]),H=x(()=>{const ge=`${i(O)}px`;return{height:`${i(F)}px`,pointerEvents:i(N).isScrolling?"none":void 0,width:ge,margin:0,boxSizing:"border-box"}}),z=()=>{const{totalColumn:ge,totalRow:Oe}=h;if(ge>0&&Oe>0){const[Xe,_t,Rt,Ut]=i(U),[$t,jt,an,ke]=i(D);g(jd,{columnCacheStart:Xe,columnCacheEnd:_t,rowCacheStart:$t,rowCacheEnd:jt,columnVisibleStart:Rt,columnVisibleEnd:Ut,rowVisibleStart:an,rowVisibleEnd:ke})}const{scrollLeft:_e,scrollTop:$e,updateRequested:ze,xAxisScrollDir:Qe,yAxisScrollDir:et}=i(N);g(Wd,{xAxisScrollDir:Qe,scrollLeft:_e,yAxisScrollDir:et,scrollTop:$e,updateRequested:ze})},W=ge=>{const{clientHeight:Oe,clientWidth:_e,scrollHeight:$e,scrollLeft:ze,scrollTop:Qe,scrollWidth:et}=ge.currentTarget,Xe=i(N);if(Xe.scrollTop===Qe&&Xe.scrollLeft===ze)return;let _t=ze;if(r4(h.direction))switch(Yd()){case $u:_t=-ze;break;case Tv:_t=et-_e-ze;break}N.value={...Xe,isScrolling:!0,scrollLeft:_t,scrollTop:Math.max(0,Math.min(Qe,$e-Oe)),updateRequested:!0,xAxisScrollDir:Ui(Xe.scrollLeft,_t),yAxisScrollDir:Ui(Xe.scrollTop,Qe)},Ie(()=>K()),Y(),z()},q=(ge,Oe)=>{const _e=i($),$e=(F.value-_e)/Oe*ge;ee({scrollTop:Math.min(F.value-_e,$e)})},Q=(ge,Oe)=>{const _e=i(V),$e=(O.value-_e)/Oe*ge;ee({scrollLeft:Math.min(O.value-_e,$e)})},{onWheel:ne}=WU({atXStartEdge:x(()=>N.value.scrollLeft<=0),atXEndEdge:x(()=>N.value.scrollLeft>=O.value-i(V)),atYStartEdge:x(()=>N.value.scrollTop<=0),atYEndEdge:x(()=>N.value.scrollTop>=F.value-i($))},(ge,Oe)=>{var ze,Qe,et,Xe;(Qe=(ze=M.value)==null?void 0:ze.onMouseUp)==null||Qe.call(ze),(Xe=(et=E.value)==null?void 0:et.onMouseUp)==null||Xe.call(et);const _e=i(V),$e=i($);ee({scrollLeft:Math.min(N.value.scrollLeft+ge,O.value-_e),scrollTop:Math.min(N.value.scrollTop+Oe,F.value-$e)})});Kt(k,"wheel",ne,{passive:!1});const ee=({scrollLeft:ge=N.value.scrollLeft,scrollTop:Oe=N.value.scrollTop})=>{ge=Math.max(ge,0),Oe=Math.max(Oe,0);const _e=i(N);Oe===_e.scrollTop&&ge===_e.scrollLeft||(N.value={..._e,xAxisScrollDir:Ui(_e.scrollLeft,ge),yAxisScrollDir:Ui(_e.scrollTop,Oe),scrollLeft:ge,scrollTop:Oe,updateRequested:!0},Ie(()=>K()),Y(),z())},{touchStartX:oe,touchStartY:X,handleTouchStart:ie,handleTouchMove:ue}=qU(k,N,ee,O,F,V,$),G=(ge=0,Oe=0,_e=to)=>{const $e=i(N);Oe=Math.max(0,Math.min(Oe,h.totalColumn-1)),ge=Math.max(0,Math.min(ge,h.totalR Line truncated
"columnWidth" must be passed as number,
instead ${typeof e} was given.
`),Ke(t)||pn(i4,`
"columnWidth" must be passed as number,
instead ${typeof t} was given.
`)}}),{max:Gd,min:Fw,floor:Kw}=Math,u4="ElDynamicSizeGrid",YU={column:"columnWidth",row:"rowHeight"},E2={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},dr=(e,t,n,a)=>{const[o,r,l]=[n[a],e[YU[a]],n[E2[a]]];if(t>l){let s=0;if(l>=0){const u=o[l];s=u.offset+u.size}for(let u=l+1;u<=t;u++){const c=r(u);o[u]={offset:s,size:c},s+=c}n[E2[a]]=t}return o[t]},jw=(e,t,n,a,o,r)=>{for(;n<=a;){const l=n+Kw((a-n)/2),s=dr(e,l,t,r).offset;if(s===o)return l;s<o?n=l+1:a=l-1}return Gd(0,n-1)},GU=(e,t,n,a,o)=>{const r=o==="column"?e.totalColumn:e.totalRow;let l=1;for(;n<r&&dr(e,n,t,o).offset<a;)n+=l,l*=2;return jw(e,t,Kw(n/2),Fw(n,r-1),a,o)},c4=(e,t,n,a)=>{const[o,r]=[t[a],t[E2[a]]];return(r>0?o[r].offset:0)>=n?jw(e,t,0,r,n,a):GU(e,t,Gd(0,r),n,a)},Ww=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:a})=>{let o=0;if(n>=e&&(n=e-1),n>=0){const l=a[n];o=l.offset+l.size}const r=(e-n-1)*t;return o+r},qw=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:a})=>{let o=0;if(a>e&&(a=e-1),a>=0){const l=t[a];o=l.offset+l.size}const r=(e-a-1)*n;return o+r},XU={column:qw,row:Ww},d4=(e,t,n,a,o,r,l)=>{const[s,u]=[r==="row"?e.height:e.width,XU[r]],c=dr(e,t,o,r),d=Gd(0,Fw(u(e,o)-s,c.offset)),f=Gd(0,c.offset-s+l+c.size);switch(n==="smart"&&(a>=f-s&&a<=d+s?n=to:n=jo),n){case Nu:return d;case"end":return f;case jo:return Math.round(f+(d-f)/2);case to:default:return a>=f&&a<=d?a:f>d||a<f?f:d}},JU=Hw({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,n)=>{const a=dr(e,t,n,"column");return[a.size,a.offset]},getRowPosition:(e,t,n)=>{const a=dr(e,t,n,"row");return[a.size,a.offset]},getColumnOffset:(e,t,n,a,o,r)=>d4(e,t,n,a,o,"column",r),getRowOffset:(e,t,n,a,o,r)=>d4(e,t,n,a,o,"row",r),getColumnStartIndexForOffset:(e,t,n)=>c4(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,a)=>{const o=dr(e,t,a,"column"),r=n+e.width;let l=o.offset+o.size,s=t;for(;s<e.totalColumn-1&&l<r;)s++,l+=dr(e,t,a,"column").size;return s},getEstimatedTotalHeight:Ww,getEstimatedTotalWidth:qw,getRowStartIndexForOffset:(e,t,n)=>c4(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,a)=>{const{totalRow:o,height:r}=e,l=dr(e,t,a,"row"),s=n+r;let u=l.size+l.offset,c=t;for(;c<o-1&&u<s;)c++,u+=dr(e,c,a,"row").size;return c},injectToInstance:(e,t)=>{const n=({columnIndex:r,rowIndex:l},s)=>{var u,c;s=Ot(s)?!0:s,Ke(r)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,r-1)),Ke(l)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,l-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),s&&((c=e.proxy)==null||c.$forceUpdate())},a=(r,l)=>{n({columnIndex:r},l)},o=(r,l)=>{n({rowIndex:r},l)};Object.assign(e.proxy,{resetAfterColumnIndex:a,resetAfterRowIndex:o,resetAfter:n})},initCache:({estimatedColumnWidth:e=50,estimatedRowHeight:t=50})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{Ue(e)||pn(u4,`
"columnWidth" must be passed as function,
instead ${typeof e} was given.
`),Ue(t)||pn(u4,`
"rowHeight" must be passed as function,
instead ${typeof t} was given.
`)}}),Uw={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Ln,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...ya(["ariaControls"])},Yw={[st]:e=>Be(e)||Ke(e)||Yt(e),change:e=>Be(e)||Ke(e)||Yt(e)},yi=Symbol("checkboxGroupContextKey"),ZU=Te({modelValue:{type:J(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Ln,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:J(Array)},props:{type:J(Object),default:()=>Gw},type:{type:String,values:["checkbox","button"],default:"checkbox"},...ya(["ariaLabel"])}),QU={[st]:e=>we(e),change:e=>we(e)},Gw={label:"label",value:"value",disabled:"disabled"},eY=({model:e,isChecked:t})=>{const n=Le(yi,void 0),a=Le(hs,void 0),o=x(()=>{var s,u;const r=(s=n==null?void 0:n.max)==null?void 0:s.value,l=(u=n==null?void 0:n.min)==null?void 0:u.value;return!Ot(r)&&e.value.length>=r&&!t.value||!Ot(l)&&e.value.length<=l&&t.value});return{isDisabled:dn(x(()=>{var r;return n===void 0?(a==null?void 0:a.disabled)??o.value:((r=n.disabled)==null?void 0:r.value)||o.value})),isLimitDisabled:o}},tY=(e,{model:t,isLimitExceeded:n,hasOwnLabel:a,isDisabled:o,isLabeledByFormItem:r})=>{const l=Le(yi,void 0),{formItem:s}=qn(),{emit:u}=gt();function c(v){return[!0,e.trueValue,e.trueLabel].includes(v)?e.trueValue??e.trueLabel??!0:e.falseValue??e.falseLabel??!1}function d(v,h){u(wt,c(v),h)}function f(v){if(n.value)return;const h=v.target;u(wt,c(h.checked),v)}async function p(v){n.value||!a.value&&!o.value&&r.value&&(v.composedPath().some(h=>h.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await Ie(),d(t.value,v)))}const m=x(()=>(l==null?void 0:l.validateEvent)||e.validateEvent);return fe(()=>e.modelValue,()=>{m.value&&(s==null||s.validate("change").catch(ht))}),{handleChange:f,onClickRoot:p}},nY=e=>{const t=B(!1),{emit:n,vnode:a}=gt(),o=Le(yi,void 0),r=x(()=>Ot(o)===!1),l=B(!1),s=x(()=>{const c=a.props??{};return"modelValue"in c||"model-value"in c}),u=x({get(){var c;return r.value?(c=o==null?void 0:o.modelValue)==null?void 0:c.value:s.value?e.modelValue:t.value},set(c){var d,f;r.value&&we(c)?(l.value=((d=o==null?void 0:o.max)==null?void 0:d.value)!==void 0&&c.length>(o==null?void 0:o.max.value)&&c.length>u.value.length,l.value===!1&&((f=o==null?void 0:o.changeEvent)==null||f.call(o,c))):(n(st,c),t.value=c)}});return{model:u,isGroup:r,isLimitExceeded:l}},aY=(e,t,{model:n})=>{const a=Le(yi,void 0),o=B(!1),r=x(()=>Fa(e.value)?e.label:e.value),l=x(()=>{const s=n.value;return Yt(s)?s:we(s)?it(r.value)?s.map(Qt).some(u=>vn(u,r.value)):s.map(Qt).includes(r.value):s!=null?s===e.trueValue||s===e.trueLabel:!!s});return{checkboxButtonSize:Nn(x(()=>{var s;return(s=a==null?void 0:a.size)==null?void 0:s.value}),{prop:!0}),isChecked:l,isFocused:o,checkboxSize:Nn(x(()=>{var s;return(s=a==null?void 0:a.size)==null?void 0:s.value})),hasOwnLabel:x(()=>!!t.default||!Fa(r.value)),actualValue:r}},Xw=(e,t)=>{const{formItem:n}=qn(),{model:a,isGroup:o,isLimitExceeded:r}=nY(e),{isFocused:l,isChecked:s,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=aY(e,t,{model:a}),{isDisabled:p}=eY({model:a,isChecked:s}),{inputId:m,isLabeledByFormItem:v}=Va(e,{formItemContext:n,disableIdGeneration:d,disableIdManagement:o}),{handleChange:h,onClickRoot:g}=tY(e,{model:a,isLimitExceeded:r,hasOwnLabel:d,isDisabled:p,isLabeledByFormItem:v});return(()=>{function b(){we(a.value)&&!a.value.includes(f.value)?a.value.push(f.value):a.value=e.trueValue??e.trueLabel??!0}e.checked&&b()})(),Wo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>o.value&&Fa(e.value))),Wo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.trueLabel)),Wo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.falseLabel)),{inputId:m,isLabeledByFormItem:v,isChecked:s,isDisabled:p,isFocused:l,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:a,actualValue:f,handleChange:h,onClickRoot:g}},oY=["id","indeterminate","name","tabindex","disabled"];var rY=j({name:"ElCheckbox",__name:"checkbox",props:Uw,emits:Yw,setup(e){const t=e,{inputId:n,isLabeledByFormItem:a,isChecked:o,isDisabled:r,isFocused:l,checkboxSize:s,hasOwnLabel:u,mode Line truncated
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),N[2]||(N[2]=A("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):p.value&&e.node.checked?(_(),de(i(De),{key:2,class:I(i(r).e("prefix"))},{default:re(()=>[te(i(es))]),_:1},8,["class"])):se("v-if",!0),se(" content "),te(i(SY),{node:e.node},null,8,["node"]),se(" postfix "),p.value?se("v-if",!0):(_(),R(je,{key:3},[e.node.loading?(_(),de(i(De),{key:0,class:I([i(r).is("loading"),i(r).e("postfix")])},{default:re(()=>[te(i(uo))]),_:1},8,["class"])):(_(),de(i(De),{key:1,class:I(["arrow-right",i(r).e("postfix")])},{default:re(()=>[te(i(oa))]),_:1},8,["class"]))],64))],42,xY))}}),f4=kY,EY=j({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0},virtualScroll:{type:Boolean,required:!1,default:!1},itemSize:{type:Number,required:!1,default:34},height:{type:Number,required:!1,default:204}},setup(e,{expose:t}){const n=e,a=gt(),o=be("cascader-menu"),{t:r}=kt(),l=na();let s,u;const c=Le(e0),d=B(),f=B(),p=x(()=>!n.nodes.length),m=x(()=>!c.initialLoaded),v=x(()=>`${l.value}-${n.index}`),h=()=>{var E,T,N,P;let M;if(c.expandingNode){const{level:$,pathNodes:V}=c.expandingNode;n.index<$?M=(E=V[n.index])==null?void 0:E.uid:n.index===$&&c.checkedNodes.length>0&&(M=(N=(T=c.checkedNodes[0])==null?void 0:T.pathNodes[n.index])==null?void 0:N.uid)}else c.checkedNodes.length>0&&n.index<c.checkedNodes[0].pathNodes.length&&(M=(P=c.checkedNodes[0].pathNodes[n.index])==null?void 0:P.uid);return M!==void 0?n.nodes.findIndex($=>$.uid===M):-1},g=M=>M?n.nodes.findIndex(E=>`${v.value}-${E.uid}`===M):-1,y=M=>{var T;const E=Ra(M,0,n.nodes.length-1);(T=f.value)==null||T.scrollToItem(E)},b=M=>{if(!n.nodes.length)return;const E=Ra(M,0,n.nodes.length-1);y(E),Ie(()=>{var N;const T=(N=a.vnode.el)==null?void 0:N.querySelector(`#${v.value}-${n.nodes[E].uid}`);T&&Bs(T)})},C=M=>{s=M.target},w=M=>{var E,T,N;if(!(!c.isHoverMenu||!s||!d.value))if(s.contains(M.target)){S();const P=a.vnode.el,{left:$}=P.getBoundingClientRect(),{offsetWidth:V,offsetHeight:U}=P,D=M.clientX-$,F=s.offsetTop,O=F+s.offsetHeight,L=n.virtualScroll?((T=(E=f.value)==null?void 0:E.states)==null?void 0:T.scrollOffset)||0:((N=P.querySelector(`.${o.e("wrap")}`))==null?void 0:N.scrollTop)||0;d.value.innerHTML=`
<path style="pointer-events: auto;" fill="transparent" d="M${D} ${F} L${V} ${L} V${F} Z" />
<path style="pointer-events: auto;" fill="transparent" d="M${D} ${O} L${V} ${U+L} V${O} Z" />
`}else u||(u=window.setTimeout(k,c.config.hoverThreshold))},S=()=>{u&&(clearTimeout(u),u=void 0)},k=()=>{d.value&&(d.value.innerHTML="",S())};return t({getActiveNodeIndex:h,getNodeIndexById:g,scrollToItem:y,focusNodeAt:b,virtualListRef:f,get $el(){return a.vnode.el}}),(M,E)=>{var T;return e.virtualScroll?(_(),R("div",{key:v.value,class:I(i(o).b()),onMousemove:w,onMouseleave:k},[te(i(hc),{ref_key:"virtualListRef",ref:f,height:e.height,"item-size":e.itemSize,data:e.nodes,total:e.nodes.length,"class-name":i(o).e("list"),"inner-element":"ul","inner-props":{role:"menu",class:i(o).is("empty",p.value)}},{default:re(({data:N,index:P,style:$})=>[(_(),de(f4,{key:N[P].uid,node:N[P],"menu-id":v.value,style:Ye($),onExpand:C},null,8,["node","menu-id","style"]))]),_:1},8,["height","item-size","data","total","class-name","inner-props"]),m.value?(_(),R("div",{key:0,class:I(i(o).e("empty-text"))},[te(i(De),{size:14,class:I(i(o).is("loading"))},{default:re(()=>[te(i(uo))]),_:1},8,["class"]),xt(" "+Ee(i(r)("el.cascader.loading")),1)],2)):p.value?(_(),R("div",{key:1,class:I(i(o).e("empty-text"))},[le(M.$slots,"empty",{},()=>[xt(Ee(i(r)("el.cascader.noData")),1)])],2)):(T=i(c))!=null&&T.isHoverMenu?(_(),R(je,{key:2},[se(" eslint-disable vue/html-self-closing "),(_(),R("svg",{ref_key:"hoverZone",ref:d,class:I(i(o).e("hover-zone"))},null,2))],2112)):se("v-if",!0),se(" eslint-enable vue/html-self-closing ")],34)):(_(),de(i(Eo),{key:v.value,tag:"ul",role:"menu",class:I(i(o).b()),"wrap-class":i(o).e("wrap"),"view-class":[i(o).e("list"),i(o).is("empty",p.value)],onMousemove:w,onMouseleave:k},{default:re(()=>{var N;return[(_(!0),R(je,null,St(e.nodes,P=>(_(),de(f4,{key:P.uid,node:P,"menu-id":v.value,onExpand:C},null,8,["node","menu-id"]))),128)),m.value?(_(),R("div",{key:0,class:I(i(o).e("empty-text"))},[te(i(De),{size:14,class:I(i(o).is("loading"))},{default:re(()=>[te(i(uo))]),_:1},8,["class"]),xt(" "+Ee(i(r)("el.cascader.loading")),1)],2)):p.value?(_(),R("div",{key:1,class:I(i(o).e("empty-text"))},[le(M.$slots,"empty",{},()=>[xt(Ee(i(r)("el.cascader.noData")),1)])],2)):(N=i(c))!=null&&N.isHoverMenu?(_(),R(je,{key:2},[se(" eslint-disable vue/html-self-closing "),(_(),R("svg",{ref_key:"hoverZone",ref:d,class:I(i(o).e("hover-zone"))},null,2))],2112)):se("v-if",!0),se(" eslint-enable vue/html-self-closing ")]}),_:3},8,["class","wrap-class","view-class"]))}}}),TY=EY;let MY=0;const OY=e=>{const t=[e];let{parent:n}=e;for(;n;)t.unshift(n),n=n.parent;return t};var T2=class M2{constructor(t,n,a,o=!1){this.data=t,this.config=n,this.parent=a,this.root=o,this.uid=MY++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:r,label:l,children:s}=n,u=t[s],c=OY(this);this.level=o?0:a?a.level+1:1,this.value=t[r],this.label=t[l],this.pathNodes=c,this.pathValues=c.map(d=>d.value),this.pathLabels=c.map(d=>d.label),this.childrenData=u,this.children=(u||[]).map(d=>new M2(d,n,this)),this.loaded=!n.lazy||this.isLeaf||!ka(u),this.text=""}get isDisabled(){const{data:t,parent:n,config:a}=this,{disabled:o,checkStrictly:r}=a;return(Ue(o)?o(t,this):!!t[o])||!r&&!!(n!=null&&n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:a,loaded:o}=this,{lazy:r,leaf:l}=n,s=Ue(l)?l(t,this):t[l];return Ot(s)?r&&!o?!1:!(we(a)&&a.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:a}=this,o=new M2(t,this.config,this);return we(n)?n.push(t):this.childrenData=[t],a.push(o),o}calcText(t,n){const a=t?this.pathLabels.join(n):this.label;return this.text=a,a}broadcast(t){this.children.forEach(n=>{var a;n&&(n.broadcast(t),(a=n.onParentCheck)==null||a.call(n,t))})}emit(){var n;const{parent:t}=this;t&&((n=t.onChildCheck)==null||n.call(t),t.emit())}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(o=>!o.isDisabled),a=n.length?n.every(o=>o.checked):!1;this.setCheckState(a)}setCheckState(t){const n=this.children.length,a=this.children.reduce((o,r)=>o+(r.checked?1:r.indeterminate?.5:0),0);this.checked=this.loaded&&this.children.filter(o=>!o.isDisabled).every(o=>o.loaded&&o.checked)&&t,this.indeterminate=this.loaded&&a!==n&&a>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:a}=this.config;n||!a?this.checked=t:(this.broadcast(t),this.setCheckState(t),this.emit())}};const O2=(e,t)=>e.reduce((n,a)=>(a.isLeaf?n.push(a):(!t&&n.push(a),n=n.concat(O2(a.children,t))),n),[]);var p4=class{constructor(e,t){this.config=t;const n=(e||[]).map(a=>new T2(a,this.config));this.nodes=n,this.allNodes=O2(n,!1),this.leafNodes=O2(n,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,t){const n=t?t.appendChild(e):new T2(e,this.config);t||this.nodes.push(n),this.appendAllNodesAndLeafNodes(n)}appendNodes(e,t){e.length>0?e.forEach(n=>this.appendNode(n,t)):t&&t.isLeaf&&this.leafNodes.push(t)}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e. Line truncated
M 50 50
m 0 ${w?"":"-"}${C}
a ${C} ${C} 0 1 1 0 ${w?"-":""}${C*2}
a ${C} ${C} 0 1 1 0 ${w?"":"-"}${C*2}
`}),u=x(()=>2*Math.PI*l.value),c=x(()=>n.type==="dashboard"?.75:1),d=x(()=>`${-1*u.value*(1-c.value)/2}px`),f=x(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),p=x(()=>({strokeDasharray:`${u.value*c.value*(n.percentage/100)}px, ${u.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=x(()=>{let C;return n.color?C=b(n.percentage):C=t[n.status]||t.default,C}),v=x(()=>n.status==="warning"?cc:n.type==="line"?n.status==="success"?Gf:$o:n.status==="success"?es:Ya),h=x(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),g=x(()=>n.format(n.percentage));function y(C){const w=100/C.length;return C.map((S,k)=>Be(S)?{color:S,percentage:(k+1)*w}:S).sort((S,k)=>S.percentage-k.percentage)}const b=C=>{var S;const{color:w}=n;if(Ue(w))return w(C);if(Be(w))return w;{const k=y(w);for(const M of k)if(M.percentage>C)return M.color;return(S=k[k.length-1])==null?void 0:S.color}};return(C,w)=>(_(),R("div",{class:I([i(a).b(),i(a).m(e.type),i(a).is(e.status),{[i(a).m("without-text")]:!e.showText,[i(a).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(_(),R("div",{key:0,class:I(i(a).b("bar"))},[A("div",{class:I(i(a).be("bar","outer")),style:Ye({height:`${e.strokeWidth}px`})},[A("div",{class:I([i(a).be("bar","inner"),{[i(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[i(a).bem("bar","inner","striped")]:e.striped},{[i(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:Ye(o.value)},[(e.showText||C.$slots.default)&&e.textInside?(_(),R("div",{key:0,class:I(i(a).be("bar","innerText"))},[le(C.$slots,"default",{percentage:e.percentage},()=>[A("span",null,Ee(g.value),1)])],2)):se("v-if",!0)],6)],6)],2)):(_(),R("div",{key:1,class:I(i(a).b("circle")),style:Ye({height:`${e.width}px`,width:`${e.width}px`})},[(_(),R("svg",une,[A("path",{class:I(i(a).be("circle","track")),d:s.value,stroke:`var(${i(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":r.value,fill:"none",style:Ye(f.value)},null,14,cne),A("path",{class:I(i(a).be("circle","path")),d:s.value,stroke:m.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":r.value,style:Ye(p.value)},null,14,dne)]))],6)),(e.showText||C.$slots.default)&&!e.textInside?(_(),R("div",{key:2,class:I(i(a).e("text")),style:Ye({fontSize:`${h.value}px`})},[le(C.$slots,"default",{percentage:e.percentage},()=>[e.status?(_(),de(i(De),{key:1},{default:re(()=>[(_(),de(dt(v.value)))]),_:1})):(_(),R("span",fne,Ee(g.value),1))])],6)):se("v-if",!0)],10,ine))}}),hne=pne;const zv=ut(hne),vne=Te({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:J([Array,Object]),default:()=>mn(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:J([Array,Object]),default:()=>[ji,ji,ji]},voidIcon:{type:Gt,default:()=>I8},disabledVoidIcon:{type:Gt,default:()=>ji},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:J(Array),default:()=>mn(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Ln,clearable:Boolean,...ya(["ariaLabel"])}),mne={[wt]:e=>Ke(e),[st]:e=>Ke(e)},gne=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax","tabindex","aria-disabled"],yne=["onMousemove","onClick"];var bne=j({name:"ElRate",__name:"rate",props:vne,emits:mne,setup(e,{expose:t,emit:n}){function a(L,H){const z=q=>it(q),W=H[Object.keys(H).map(q=>+q).filter(q=>{const Q=H[q];return z(Q)&&Q.excluded?L<q:L<=q}).sort((q,Q)=>q-Q)[0]];return z(W)&&W.value||W}const o=e,r=n,l=Le(tr,void 0),s=Nn(),u=be("rate"),{inputId:c,isLabeledByFormItem:d}=Va(o,{formItemContext:l}),f=B(Ra(o.modelValue,0,o.max)),p=B(-1),m=B(!0),v=B([]),h=x(()=>v.value.map(L=>L.$el.clientWidth)),g=x(()=>[u.b(),u.m(s.value)]),y=dn(),b=x(()=>u.cssVarBlock({"void-color":o.voidColor,"disabled-void-color":o.disabledVoidColor,"fill-color":k.value})),C=x(()=>{let L="";return o.showScore?L=o.scoreTemplate.replace(/\{\s*value\s*\}/,y.value?`${o.modelValue}`:`${f.value}`):o.showText&&(L=o.texts[Math.ceil(f.value)-1]),L}),w=x(()=>o.modelValue*100-Math.floor(o.modelValue)*100),S=x(()=>we(o.colors)?{[o.lowThreshold]:o.colors[0],[o.highThreshold]:{value:o.colors[1],excluded:!0},[o.max]:o.colors[2]}:o.colors),k=x(()=>{const L=a(f.value,S.value);return it(L)?"":L}),M=x(()=>{let L="";return y.value?L=`${w.value}%`:o.allowHalf&&(L="50%"),{color:k.value,width:L}}),E=x(()=>{let L=we(o.icons)?[...o.icons]:{...o.icons};return L=no(L),we(L)?{[o.lowThreshold]:L[0],[o.highThreshold]:{value:L[1],excluded:!0},[o.max]:L[2]}:L}),T=x(()=>a(o.modelValue,E.value)),N=x(()=>y.va Line truncated
`||c==="\r")){l=u;continue}if(r.includes(c)){const d=l===-1?a:l;s={pattern:o.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:l,selectionEnd:a};break}}return s},Wie=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,o=t.useSelectionEnd?a:n,r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);const s=l.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";s.whiteSpace=c?"nowrap":"pre-wrap",c||(s.wordWrap="break-word"),s.position="absolute",t.debug||(s.visibility="hidden"),r.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const m=Number.parseInt(u.height),v=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),h=v+Number.parseInt(u.lineHeight);m>h?s.lineHeight=`${m-v}px`:m===h?s.lineHeight=u.lineHeight:s.lineHeight="0"}else s.lineHeight=u.height;else s[p]=u[p]}),Af()?e.scrollHeight>Number.parseInt(u.height)&&(s.overflowY="scroll"):s.overflow="hidden",l.textContent=e.value.slice(0,Math.max(0,o)),c&&l.textContent&&(l.textContent=l.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,o))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,l.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(l),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},qie=Te({...gv,options:{type:J(Array),default:()=>[]},prefix:{type:J([String,Array]),default:"@",validator:e=>Be(e)?e.length===1:e.every(t=>Be(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:J([Boolean,Function]),default:()=>Kie,validator:e=>e===!1?!0:Ue(e)},placement:{type:J(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:J(Function)},modelValue:String,loading:Boolean,popperClass:nn.popperClass,popperStyle:nn.popperStyle,popperOptions:{type:J(Object),default:()=>({})},props:{type:J(Object),default:()=>r_}}),Uie={[st]:e=>Be(e),"whole-remove":(e,t)=>Be(e)&&Be(t),input:e=>Be(e),search:(e,t)=>Be(e)&&Be(t),select:(e,t)=>it(e)&&Be(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},r_={value:"value",label:"label",disabled:"disabled"},Yie=Te({options:{type:J(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),Gie={select:e=>Be(e.value)},Xie=["id","aria-disabled","aria-selected","onMousemove","onClick"];var Jie=j({name:"ElMentionDropdown",__name:"mention-dropdown",props:Yie,emits:Gie,setup(e,{expose:t,emit:n}){const a=e,o=n,r=be("mention"),{t:l}=kt(),s=B(-1),u=B(),c=B(),d=B(),f=(w,S)=>[r.be("dropdown","item"),r.is("hovering",s.value===S),r.is("disabled",w.disabled||a.disabled)],p=w=>{w.disabled||a.disabled||o("select",w)},m=w=>{s.value=w},v=x(()=>a.disabled||a.options.every(w=>w.disabled)),h=x(()=>a.options[s.value]),g=()=>{!h.value||h.value.disabled||a.disabled||o("select",h.value)},y=w=>{const{options:S}=a;if(S.length===0||v.value)return;w==="next"?(s.value++,s.value===S.length&&(s.value=0)):w==="prev"&&(s.value--,s.value<0&&(s.value=S.length-1));const k=S[s.value];if(k.disabled){y(w);return}Ie(()=>b(k))},b=w=>{var E,T,N,P;const{options:S}=a,k=S.findIndex($=>$.value===w.value),M=(E=c.value)==null?void 0:E[k];if(M){const $=(N=(T=d.value)==null?void 0:T.querySelector)==null?void 0:N.call(T,`.${r.be("dropdown","wrap")}`);$&&Wh($,M)}(P=u.value)==null||P.handleScroll()};return fe(()=>a.options,()=>{v.value||a.options.length===0?s.value=-1:s.value=a.options.findIndex(w=>!w.disabled)},{immediate:!0}),t({hoveringIndex:s,navigateOptions:y,selectHoverOption:g,hoverOption:h}),(w,S)=>(_(),R("div",{ref_key:"dropdownRef",ref:d,class:I(i(r).b("dropdown"))},[w.$slots.header?(_(),R("div",{key:0,class:I(i(r).be("dropdown","header"))},[le(w.$slots,"header")],2)):se("v-if",!0),vt(te(i(Eo),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(r).be("dropdown","wrap"),"view-class":i(r).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:re(()=>[(_(!0),R(je,null,St(e.options,( Line truncated
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const As=typeof document<"u";function h_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Cce(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&h_(e.default)}const fn=Object.assign;function up(e,t){const n={};for(const a in t){const o=t[a];n[a]=To(o)?o.map(e):e(o)}return n}const cu=()=>{},To=Array.isArray;function r3(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}const v_=/#/g,Sce=/&/g,xce=/\//g,kce=/=/g,Ece=/\?/g,m_=/\+/g,Tce=/%5B/g,Mce=/%5D/g,g_=/%5E/g,Oce=/%60/g,y_=/%7B/g,Ace=/%7C/g,b_=/%7D/g,Rce=/%20/g;function fm(e){return e==null?"":encodeURI(""+e).replace(Ace,"|").replace(Tce,"[").replace(Mce,"]")}function Nce(e){return fm(e).replace(y_,"{").replace(b_,"}").replace(g_,"^")}function Y2(e){return fm(e).replace(m_,"%2B").replace(Rce,"+").replace(v_,"%23").replace(Sce,"%26").replace(Oce,"`").replace(y_,"{").replace(b_,"}").replace(g_,"^")}function $ce(e){return Y2(e).replace(kce,"%3D")}function Pce(e){return fm(e).replace(v_,"%23").replace(Ece,"%3F")}function Ice(e){return Pce(e).replace(xce,"%2F")}function zu(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Lce=/\/$/,Vce=e=>e.replace(Lce,"");function cp(e,t,n="/"){let a,o={},r="",l="";const s=t.indexOf("#");let u=t.indexOf("?");return u=s>=0&&u>s?-1:u,u>=0&&(a=t.slice(0,u),r=t.slice(u,s>0?s:t.length),o=e(r.slice(1))),s>=0&&(a=a||t.slice(0,s),l=t.slice(s,t.length)),a=Hce(a??t,n),{fullPath:a+r+l,path:a,query:o,hash:zu(l)}}function Bce(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function l3(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Dce(e,t,n){const a=t.matched.length-1,o=n.matched.length-1;return a>-1&&a===o&&si(t.matched[a],n.matched[o])&&w_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function si(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function w_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!zce(e[n],t[n]))return!1;return!0}function zce(e,t){return To(e)?s3(e,t):To(t)?s3(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function s3(e,t){return To(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function Hce(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),o=a[a.length-1];(o===".."||o===".")&&a.push("");let r=n.length-1,l,s;for(l=0;l<a.length;l++)if(s=a[l],s!==".")if(s==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+a.slice(l).join("/")}const Fr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let G2=function(e){return e.pop="pop",e.push="push",e}({}),dp=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Fce(e){if(!e)if(As){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Vce(e)}const Kce=/^[^#]+#/;function jce(e,t){return e.replace(Kce,"#")+t}function Wce(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const c0=()=>({left:window.scrollX,top:window.scrollY});function qce(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Wce(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function i3(e,t){return(history.state?history.state.position-t:-1)+e}const X2=new Map;function Uce(e,t){X2.set(e,t)}function Yce(e){const t=X2.get(e);return X2.delete(e),t}function Gce(e){return typeof e=="string"||e&&typeof e=="object"}function __(e){return typeof e=="string"||typeof e=="symbol"}let In=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const C_=Symbol("");In.MATCHER_NOT_FOUND+"",In.NAVIGATION_GUARD_REDIRECT+"",In.NAVIGATION_ABORTED+"",In.NAVIGATION_CANCELLED+"",In.NAVIGATION_DUPLICATED+"";function ii(e,t){return fn(new Error,{type:e,[C_]:!0},t)}function ir(e,t){return e instanceof Error&&C_ in e&&(t==null||!!(e.type&t))}const Xce=["params","query","hash"];function Jce(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Xce)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Zce(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;a<n.length;++a){const o=n[a].replace(m_," "),r=o.indexOf("="),l=zu(r<0?o:o.slice(0,r)),s=r<0?null:zu(o.slice(r+1));if(l in t){let uLine truncated
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let nde=()=>location.protocol+"//"+location.host;function S_(e,t){const{pathname:n,search:a,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,s=o.slice(l);return s[0]!=="/"&&(s="/"+s),l3(s,"")}return l3(n,e)+a+o}function ade(e,t,n,a){let o=[],r=[],l=null;const s=({state:p})=>{const m=S_(e,location),v=n.value,h=t.value;let g=0;if(p){if(n.value=m,t.value=p,l&&l===v){l=null;return}g=h?p.position-h.position:0}else a(m);o.forEach(y=>{y(n.value,v,{delta:g,type:G2.pop,direction:g?g>0?dp.forward:dp.back:dp.unknown})})};function u(){l=n.value}function c(p){o.push(p);const m=()=>{const v=o.indexOf(p);v>-1&&o.splice(v,1)};return r.push(m),m}function d(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(fn({},p.state,{scroll:c0()}),"")}}function f(){for(const p of r)p();r=[],window.removeEventListener("popstate",s),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",s),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:f}}function d3(e,t,n,a=!1,o=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:o?c0():null}}function ode(e){const{history:t,location:n}=window,a={value:S_(e,n)},o={value:t.state};o.value||r(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,c,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:nde()+e+u;try{t[d?"replaceState":"pushState"](c,"",p),o.value=c}catch(m){console.error(m),n[d?"replace":"assign"](p)}}function l(u,c){r(u,fn({},t.state,d3(o.value.back,u,o.value.forward,!0),c,{position:o.value.position}),!0),a.value=u}function s(u,c){const d=fn({},o.value,t.state,{forward:u,scroll:c0()});r(d.current,d,!0),r(u,fn({},d3(a.value,u,null),{position:d.position+1},c),!1),a.value=u}return{location:a,state:o,push:s,replace:l}}function rde(e){e=Fce(e);const t=ode(e),n=ade(e,t.state,t.location,t.replace);function a(r,l=!0){l||n.pauseListeners(),history.go(r)}const o=fn({location:"",base:e,go:a,createHref:jce.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Ll=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Un=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Un||{});const lde={type:Ll.Static,value:""},sde=/[a-zA-Z0-9_]/;function ide(e){if(!e)return[[]];if(e==="/")return[[lde]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${c}": ${m}`)}let n=Un.Static,a=n;const o=[];let r;function l(){r&&o.push(r),r=[]}let s=0,u,c="",d="";function f(){c&&(n===Un.Static?r.push({type:Ll.Static,value:c}):n===Un.Param||n===Un.ParamRegExp||n===Un.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Ll.Param,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=u}for(;s<e.length;){if(u=e[s++],u==="\\"&&n!==Un.ParamRegExp){a=n,n=Un.EscapeNext;continue}switch(n){case Un.Static:u==="/"?(c&&f(),l()):u===":"?(f(),n=Un.Param):p();break;case Un.EscapeNext:p(),n=a;break;case Un.Param:u==="("?n=Un.ParamRegExp:sde.test(u)?p():(f(),n=Un.Static,u!=="*"&&u!=="?"&&u!=="+"&&s--);break;case Un.ParamRegExp:u===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+u:n=Un.ParamRegExpEnd:d+=u;break;case Un.ParamRegExpEnd:f(),n=Un.Static,u!=="*"&&u!=="?"&&u!=="+"&&s--,d="";break;default:t("Unknown state");break}}return n===Un.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),l(),o}const f3="[^/]+?",ude={sensitive:!1,strict:!1,start:!0,end:!0};var Sa=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Sa||{});const cde=/[.+*?^${}()[\]/\\]/g;function dde(e,t){const n=fn({},ude,t),a=[];let o=n.start?"^":"";const r=[];for(const c of e){const d=c.length?[]:[Sa.Root];n.strict&&!c.length&&(o+="/");for(let f=0;f<c.length;f++){const p=c[f];let m=Sa.Segment+(n.sensitive?Sa.BonusCaseSensitive:0);if(p.type===Ll.Static)f||(o+="/"),o+=p.value.replace(cde,"\\$&"),m+=Sa.Static;else if(p.type===Ll.Param){const{value:v,repeatable:h,optional:g,regexp:y}=p;r.push({name:v,repeatable:h,optional:g});const b=y||f3;if(Line truncated
`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),a=l.substring(o+1).trim();const s=me.hasOwnProp(t,n);!n||s&&me.hasOwnProp(Cfe,n)||(n==="set-cookie"?s?t[n].push(a):t[n]=[a]:t[n]=s?t[n]+", "+a:a)}),t};function xfe(e){let t=0,n=e.length;for(;t<n;){const a=e.charCodeAt(t);if(a!==9&&a!==32)break;t+=1}for(;n>t;){const a=e.charCodeAt(n-1);if(a!==9&&a!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const kfe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Efe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vm(e,t){return me.isArray(e)?e.map(n=>vm(n,t)):xfe(String(e).replace(t,""))}const Tfe=e=>vm(e,kfe),Mfe=e=>vm(e,Efe);function V_(e){const t=Object.create(null);return me.forEach(e.toJSON(),(n,a)=>{t[a]=Mfe(n)}),t}const S3=Symbol("internals");function Vi(e){return e&&String(e).trim().toLowerCase()}function vd(e){return e===!1||e==null?e:me.isArray(e)?e.map(vd):Tfe(String(e))}function Ofe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const Afe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function pp(e){let t=0,n=e.length;for(;t<n;){const a=e.charCodeAt(t);if(a!==9&&a!==32)break;t+=1}for(;n>t;){const a=e.charCodeAt(n-1);if(a!==9&&a!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Rfe(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let a=1;a<t;a++){const o=e.charCodeAt(a);if(o===34||o===92&&(a+=1,a>=t))return e;n+=e[a]}return n}function Nfe(e){const t=Object.create(null),n=String(e);let a=0,o=!1,r=!1;function l(s){const u=pp(n.slice(a,s)),c=u.indexOf("=");if(c<1)return;const d=pp(u.slice(0,c));if(!Afe.test(d))return;const f=d.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=pp(u.slice(c+1));t[f]=Rfe(p)}for(let s=0;s<n.length;s++){const u=n.charCodeAt(s);o?r?r=!1:u===92?r=!0:u===34&&(o=!1):u===34?o=!0:(u===44||u===59)&&(l(s),a=s+1)}return l(n.length),t}const $fe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hp(e,t,n,a,o){if(me.isFunction(a))return a.call(this,t,n);if(o&&(t=n),!!me.isString(t)){if(me.isString(a))return t.indexOf(a)!==-1;if(me.isRegExp(a))return a.test(t)}}function Pfe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function Ife(e,t){const n=me.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{__proto__:null,value:function(o,r,l){return this[a].call(this,t,o,r,l)},configurable:!0})})}let va=class{constructor(t){t&&this.set(t)}set(t,n,a){const o=this;function r(s,u,c){const d=Vi(u);if(!d)return;const f=me.findKey(o,d);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||u]=vd(s))}const l=(s,u)=>me.forEach(s,(c,d)=>r(c,d,u));if(me.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(me.isString(t)&&(t=t.trim())&&!$fe(t))l(Sfe(t),n);else if(me.isObject(t)&&me.isSafeIterable(t)){let s=Object.create(null),u,c;for(const d of t){if(!me.isArray(d))throw new TypeError("Object iterator must return a key-value pair");c=d[0],me.hasOwnProp(s,c)?(u=s[c],s[c]=me.isArray(u)?[...u,d[1]]:[u,d[1]]):s[c]=d[1]}l(s,n)}else t!=null&&r(n,t,a);return this}get(t,n){if(t=Vi(t),t){const a=me.findKey(this,t);if(a){const o=this[a];if(!n)return o;if(n===!0)return Ofe(o);if(me.isFunction(n))return n.call(this,o,a);if(me.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vi(t),t){const a=me.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||hp(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let o=!1;function r(l){if(l=Vi(l),l){const s=me.findKey(a,l);s&&(!n||hp(a,a[s],s,n))&&(delete a[s],o=!0)}}return me.isArray(t)?t.forEach(r):r(t),o}clear(t){const n=Object.keys(this);let a=n.length,o=!1;for(;a--;){const r=n[a];(!t||hp(this,this[r],r,t,!0))&&(delete this[r],o=!0)}return o}normalize(t){const n=this,a={};return me.forEach(this,(o,r)=>{const l=me.findKey(a,r);if(l){n[l]=vd(o),delete n[r];return}const s=t?Pfe(r):String(r).trim();s!==r&&delete n[r],n[s]=vd(o),a[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return me.forEach(this,(a,o)=>{a!=null&&a!==!1&&(n[o]=t&&me.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){const t=this.get("set-cookie");return me.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Nfe(t)}static concat(t,...n){const a=new this(t);return n.forEach(o=>a.set(o)),a}static accessor(t){const a=(this[S3]=this[S3]={accessors:{}}).accessors,o=this.prototype;function r(l){const s=Vi(l);a[s]||(Ife(o,l),a[s]=!0)}return me.isArray(t)?t.forEach(r):r(t),this}};va.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(va.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});me.freezeMethods(va);const af="[REDACTED ****]";function Lfe(e){if(me.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(me.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Vfe(e,t){const n=new Set(t.map(r=>String(r).toLowerCase())),a=[],o=r=>{if(r===null||typeof r!="object"||me.isBuffer(r))return r;if(a.indexOf(r)!==-1)return;r instanceof va&&(r=r.toJSON()),a.push(r);let l;if(me.isArray(r))l=[],r.forEach((s,u)=>{const c=o(s);me.isUndefined(c)||(l[u]=c)});else{if(!me.isPlainObject(r)&&Lfe(r))return a.pop(),r;l=Object.create(null);for(const[s,u]of Object.entries(r)){const c=n.has(s.toLowerCase())?af:o(u);me.isUndefined(c)||(l[s]=c)}}return a.pop(),l};return o(e)}function x3(e){try{return String(e)}catch{return""}}function Bfe(e){return e.errors.map(n=>{try{return n&&n.message?x3(n.message):x3(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let pt=class B_ extends Error{static from(t,n,a,o,r,l){let s=t.message;!s&&me.isArray(t.errors)&&t.errors.length&&(s=Bfe(t));const u=new B_(s,n||t.code,a,o,r);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),l&&Object.assign(u,l),u}constructor(t,n,a,o,r){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),a&&(this.config=a),o&&(this.request=o),r&&(this.response=r,this.status=r.status)}toJSON(){const t=this.config,n=t&&me.hasOwnProp(t,"redact")?t.redact:void 0,a=me.isArray(n)&&n.length>0?Vfe(t,n):me.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a,code:this.code,status:this.status}}};pt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pt.ERR_BAD_OPTION="ERR_BAD_OPTION";pt.ECONNABORTED="ECONNABORTED";pt.ETIMEDOUT="ETIMEDOUT";pt.ECONNREFUSED="ECONNREFUSED";pt.ERR_NETWORK="ERR_NETWORK";pt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pt.ERR_DEPRECATED="ERR_DEPRECATED";pt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pt.ERR_CANCELED="ERR_CANCELED";pt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pt.ERR_INVALID_URL="ERR_INVALID_URL";pt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Dfe=null,D_=100;function Q2(e){return me.isPlainObject(e)||me.isArray(e)}function z_(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function vp(e,t,n){return e?e.concat(t).map(function(o,r){return o=z_(o),!n&&r?"["+o+"]":o}).join(n?".":""):t}function zfe(e){return me.isArray(e)&&!e.some(Q2)}const Hfe=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function p0(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const a=(b,C)=>{const w=me.getSafeProp(n,b);return me.isUndefined(w)?C:w},o=a("metaTokens",!0),r=a("visitor")||h,l=a("dots",!1),s=a("indexes",!1),u=a("Blob")||typeof Blob<"u"&&Blob,c=a("maxDepth",D_),d=u&&me.isSpecCompliantForm(t),f=[];if(!me.isFunction(r))throw new TypeError("visitor must be a function");function p(b){if(b===null)return"";if(me.isDate(b))return b.toISOString();if(me.isBoolean(b))return b.toString();if(!d&&me.isBlob(b))throw new pt("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(b)||me.isTypedArray(b)){if(d&&typeof u=="function")return new u([b]);throw new pt("Blob is not supported. Use a Buffer instead.",pt.ERR_NOT_SUPPORT)}return b}function m(b){if(b>c)throw new pt("Object is too deeply nested ("+b+" levels). Max depth: "+c,pt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function v(b,C){if(c===1/0)return JSON.stringify(b);const w=[];return JSON.stringify(b,function(k,M){if(!me.isObject(M))return M;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(M),m(C+w.length-1),M})}function h(b,C,w){let S=b;if(me.isReactNative(t)&&me.isReactNativeBlob(b))return t.append(vp(w,C,l),p(b)),!1;if(b&&!w&&typeof b=="object"){if(me.endsWith(C,"{}"))C=o?C:C.slice(0,-2),b=v(b,1);else if(me.isArray(b)&&zfe(b)||(me.isFileList(b)||me.endsWith(C,"[]"))&&(S=me.toArray(b)))return C=z_( Line truncated
`+l.map(D3).join(`
`):" "+D3(l[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+s,pt.ERR_NOT_SUPPORT)}return o}const eC={getAdapter:P0e,adapters:wm};function yp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _c(null,e)}function bp(e){const t=me.toSafeFlatObject(e);return yp(t),t.headers=va.from(me.getSafeProp(t,"headers")),t.data=mp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),eC.getAdapter(t.adapter||wc.adapter,t)(t).then(function(o){yp(t),t.response=o;try{o.data=mp.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=va.from(o.headers),o},function(o){if(!U_(o)&&(yp(t),o&&o.response)){t.response=o.response;try{o.response.data=mp.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=va.from(o.response.headers)}return Promise.reject(o)})}const h0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{h0[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const z3={};h0.transitional=function(t,n,a){function o(r,l){return"[Axios v"+bm+"] Transitional option '"+r+"'"+l+(a?". "+a:"")}return(r,l,s)=>{if(t===!1)throw new pt(o(l," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!z3[l]&&(z3[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(r,l,s):!0}};h0.spelling=function(t){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function I0e(e,t,n){if(typeof e!="object"||e===null)throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const r=a[o],l=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(l){const s=e[r],u=s===void 0||l(s,r,e);if(u!==!0)throw new pt("option "+r+" must be "+u,pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pt("Unknown option "+r,pt.ERR_BAD_OPTION)}}const md={assertOptions:I0e,validators:h0},ia=md.validators;let ql=class{constructor(t){this.defaults=t||{},this.interceptors={request:new T3,response:new T3}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const r=o.stack;let l="";if(typeof r=="string"){const s=r.indexOf(`
`);l=s===-1?"":r.slice(s+1)}if(!a.stack)a.stack=l;else if(l){const s=l.indexOf(`
`),u=s===-1?-1:l.indexOf(`
`,s+1),c=u===-1?"":l.slice(u+1);String(a.stack).endsWith(c)||(a.stack+=`
`+l)}}catch{}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=is(this.defaults,n);const{transitional:a,paramsSerializer:o,headers:r}=n;a!==void 0&&md.assertOptions(a,{silentJSONParsing:ia.transitional(ia.boolean),forcedJSONParsing:ia.transitional(ia.boolean),clarifyTimeoutError:ia.transitional(ia.boolean),legacyInterceptorReqResOrdering:ia.transitional(ia.boolean),advertiseZstdAcceptEncoding:ia.transitional(ia.boolean),validateStatusUndefinedResolves:ia.transitional(ia.boolean)},!1),o!=null&&(me.isFunction(o)?n.paramsSerializer={serialize:o}:md.assertOptions(o,{encode:ia.function,serialize:ia.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),md.assertOptions(n,{baseUrl:ia.spelling("baseURL"),withXsrfToken:ia.spelling("withXSRFToken")},!0),n.method=(me.getSafeProp(n,"method")||me.getSafeProp(this.defaults,"method")||"get").toLowerCase();let l=r&&me.merge(r.common,r[n.method]);r&&me.forEach(q_.concat("common"),v=>{delete r[v]}),n.headers=va.concat(l,r);const s=[];let u=!0;this.interceptors.request.forEach(function(h){if(typeof h.runWhen=="function"&&h.runWhen(n)===!1)return;u=u&&h.synchronous;const g=n.transitional||gm;g&&g.legacyInterceptorReqResOrdering?s.unshift(h.fulfilled,h.rejected):s.push(h.fulfilled,h.rejected)});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,f=0,p;if(!u){const v=[bp.bind(this),void 0];for(v.unshift(...s),v.push(...c),p=v.length,d=Promise.resolve(n);f<p;)d=d.then(v[f++],v[f++]);return d}p=s.length;let m=n;for(;f<p;){const v=s[f++],h=s[f++];try{m=v?v(m):m}catch(g){if(!h){d=Promise.reject(g);break}try{const y=h.call(this,g);me.isThenable(y)&&(d=Promise.resolve(y).then(()=>bp.call(this,m)))}catch(y){d=Promise.reject(y)}break}}if(!d)try{d=bp.call(this,m)}catch(v){d=Promise.reject(v)}for(f=0,p=c.length;f<p;)d=d.then(c[f++],c[f++]);return d}getUri(t){t=is(this.defaults,t);const n=X_(t.baseURL,t.url,t.allowAbsoluteUrls,t);return F_(n,t.params,t.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(t){ql.prototype[t]=function(n,a){return this.request(is(a||{},{method:t,url:n,data:a&&me.hasOwnProp(a,"data")?a.data:void 0}))}});me.forEach(["post","put","patch","query"],function(t){function n(a){return function(r,l,s){return this.request(is(s||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}ql.prototype[t]=n(),t!=="query"&&(ql.prototype[t+"Form"]=n(!0))});let L0e=class tC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const a=this;this.promise.then(o=>{if(!a._listeners)return;let r=a._listeners.length;for(;r-- >0;)a._listeners[r](o);a._listeners=null}),this.promise.then=o=>{let r;const l=new Promise(s=>{a.subscribe(s),r=s}).then(o);return l.cancel=function(){a.unsubscribe(r)},l},t(function(r,l,s){a.reason||(a.reason=new _c(r,l,s),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=a=>{t.abort(a)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new tC(function(o){t=o}),cancel:t}}};function V0e(e){return function(n){return e.apply(null,n)}}function B0e(e){return me.isObject(e)&&e.isAxiosError===!0}const gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,Timeou Line truncated
+101
View File
@@ -0,0 +1,101 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Layout-BMYa5Pan.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Layout-BnWoJV0v.css","assets/AccessDenied-CrVtsOUJ.js","assets/AccessDenied-C-5rZa66.css","assets/Applications-BkFcS8Z8.js","assets/AppListPagination.vue_vue_type_script_setup_true_lang-DuGWvoc_.js","assets/searchProjection-BPQZhrH5.js","assets/useListPagination-j0ff6aFk.js","assets/Applications-CR1Mi8jP.css","assets/ReimbursementForm-CdSh2-z7.js","assets/payees-B0cC8O_i.js","assets/feishuDirectory-CE_j-cw-.js","assets/ReimbursementForm-Dwg6SbT6.css","assets/ApplicationDetail-tfYAp2gH.js","assets/ApplicationDetail-sss7C5Fe.css","assets/FinanceReceipt-CYHgzhY0.js","assets/FinanceReceipt-D-ekvRFX.css","assets/Sources-EABqna8l.js","assets/Logs-DrltJZEr.js","assets/Logs-DhOt8NOH.css","assets/ExpenseTypes-CC-Nm9Ev.js","assets/Payees-B6idZ-4Z.js","assets/Payees-Drs3bapy.css","assets/LegalEntities-l2As0eJ2.js","assets/business-config-CDFDGnOE.js","assets/business-config-C9Q4YaoR.css","assets/CostCenters-3SgG1SS5.js","assets/Currencies-DaA9ktx3.js","assets/BudgetManagement-4zzydz8X.js","assets/BudgetManagement-7jSknzqq.css","assets/PaymentMethods-qWcROH8o.js","assets/PaymentAccounts-DqXHi65k.js","assets/Users-Xxy9sHlG.js","assets/admin-kNzfHot2.js","assets/Users-XFDlMNAz.css","assets/ScheduledTasks-CtRo0-HG.js","assets/ScheduledTasks-ClgW7uRI.css","assets/IntegrationConfig-C1aq4B2r.js","assets/IntegrationConfig-Ut6O9I-X.css"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
* @vue/shared v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function lh(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const wn={},Ls=[],ht=()=>{},h6=()=>!1,pf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),hf=e=>e.startsWith("onUpdate:"),qn=Object.assign,sh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},NC=Object.prototype.hasOwnProperty,Dt=(e,t)=>NC.call(e,t),we=Array.isArray,ll=e=>Wu(e)==="[object Map]",kr=e=>Wu(e)==="[object Set]",ul=e=>Wu(e)==="[object Date]",Ue=e=>typeof e=="function",Be=e=>typeof e=="string",Ua=e=>typeof e=="symbol",it=e=>e!==null&&typeof e=="object",cl=e=>(it(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),v6=Object.prototype.toString,Wu=e=>v6.call(e),$C=e=>Wu(e).slice(8,-1),pu=e=>Wu(e)==="[object Object]",vf=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qi=lh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mf=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},IC=/-\w/g,aa=mf(e=>e.replace(IC,t=>t.slice(1).toUpperCase())),LC=/\B([A-Z])/g,Rr=mf(e=>e.replace(LC,"-$1").toLowerCase()),qu=mf(e=>e.charAt(0).toUpperCase()+e.slice(1)),zl=mf(e=>e?`on${qu(e)}`:""),jo=(e,t)=>!Object.is(e,t),ed=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},m6=(e,t,n,a=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:a,value:n})},gf=e=>{const t=parseFloat(e);return isNaN(t)?e:t},VC=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Am;const yf=()=>Am||(Am=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ye(e){if(we(e)){const t={};for(let n=0;n<e.length;n++){const a=e[n],o=Be(a)?HC(a):Ye(a);if(o)for(const r in o)t[r]=o[r]}return t}else if(Be(e)||it(e))return e}const BC=/;(?![^(]*\))/g,DC=/:([^]+)/,zC=/\/\*[^]*?\*\//g;function HC(e){const t={};return e.replace(zC,"").split(BC).forEach(n=>{if(n){const a=n.split(DC);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function $(e){let t="";if(Be(e))t=e;else if(we(e))for(let n=0;n<e.length;n++){const a=$(e[n]);a&&(t+=a+" ")}else if(it(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function yr(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Be(t)&&(e.class=$(t)),n&&(e.style=Ye(n)),e}const FC="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",KC=lh(FC);function g6(e){return!!e||e===""}function jC(e,t){if(e.length!==t.length)return!1;let n=!0;for(let a=0;n&&a<e.length;a++)n=Co(e[a],t[a]);return n}function Rm(e,t){if(e.size!==t.size)return!1;const n=Array.from(t),a=new Uint8Array(n.length);for(const o of e){let r=-1;for(let l=0;l<n.length;l++)if(!a[l]&&Co(o,n[l])){r=l;break}if(r<0)return!1;a[r]=1}return!0}function Co(e,t){if(e===t)return!0;let n=ul(e),a=ul(t);if(n||a)return n&&a?e.getTime()===t.getTime():!1;if(n=Ua(e),a=Ua(t),n||a)return e===t;if(n=we(e),a=we(t),n||a)return n&&a?jC(e,t):!1;if(n=it(e),a=it(t),n||a){if(!n||!a)return!1;if(n=ll(e),a=ll(t),n||a||(n=kr(e),a=kr(t),n||a))return n&&a?Rm(e,t):!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const s=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(s&&!u||!s&&u||!Co(e[l],t[l]))return!1}}return String(e)===String(t)}function ih(e,t){return e.findIndex(n=>Co(n,t))}const y6=e=>!!(e&&e.__v_isRef===!0),Ee=e=>Be(e)?e:e==null?"":we(e)||it(e)&&(e.toString===v6||!Ue(e.toString))?y6(e)?Ee(e.value):JSON.stringify(e,b6,2):String(e),b6=(e,t)=>y6(t)?b6(e,t.value):ll(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,o],r)=>(n[C0(a,r)+" =>"]=o,n),{})}:kr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>C0(n))}:Ua(t)?C0(t):it(t)&&!we(t)&&!pu(t)?String(t):t,C0=(e,t="")=>{var n;return Ua(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Xn;class w6{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Xn&&(Xn.active?(this.parent=Xn,this.index=(Xn.scopes||(Xn.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const a=this.scopes.slice();for(t=0,n=a.length;t<n;t++)a[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const a=this.effects.slice();for(t=0,n=a.length;t<n;t++)a[t].resume()}}run(t){if(this._active){const n=Xn;try{return Xn=this,t()}finally{Xn=n}}}on(){++this._on===1&&(this.prevScope=Xn,Xn=this)}off(){if(this._on>0&&--this._on===0){if(Xn===this)Xn=this.prevScope;else{let t=Xn;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,a;for(n=0,a=this.effects.length;n<a;n++)this.effects[n].stop();for(this.effects.length=0,n=0,a=this.cleanups.length;n<a;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,a=o.length;n<a;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function uh(e){return new w6(e)}function bf(){return Xn}function ch(e,t=!1){Xn&&Xn.cleanups.push(e)}let xn;const S0=new WeakSet;class _6{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Xn&&(Xn.active?Xn.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,S0.has(this)&&(S0.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||S6(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pm(this),x6(this);const t=xn,n=yo;xn=this,yo=!0;try{return this.fn()}finally{k6(this),xn=t,yo=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ph(t);this.deps=this.depsTail=void 0,Pm(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?S0.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Pp(this)&&this.run()}get dirty(){return Pp(this)}}let C6=0,eu,tu;function S6(e,t=!1){if(e.flags|=8,t){e.next=tu,tu=e;return}e.next=eu,eu=e}function dh(){C6++}function fh(){if(--C6>0)return;if(tu){let t=tu;for(tu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;eu;){let t=eu;for(eu=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(a){e||(e=a)}t=n}}if(e)throw e}function x6(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function k6(e){let t,n=e.depsTail,a=n;for(;a;){const o=a.prevDep;a.version===-1?(a===n&&(n=o),ph(a),WC(a)):t=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=o}e.deps=t,e.depsTail=n}function Pp(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(E6(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function E6(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===hu)||(e.globalVersion=hu,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Pp(e))))return;e.flags|=2;const t=e.dep,n=xn,a=yo;xn=e,yo=!0;try{x6(e);const o=e.fn(e._value);(t.version===0||jo(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{xn=n,yo=a,k6(e),e.flags&=-3}}function ph(e,t=!1){const{dep:n,prevSub:a,nextSub:o}=e;if(a&&(a.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=a,e.nextSub=void 0),n.subs===e&&(n.subs=a,!a&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)ph(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function WC(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let yo=!0;const T6=[];function Er(){T6.push(yo),yo=!1}function Tr(){const e=T6.pop();yo=e===void 0?!0:e}function Pm(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xn;xn=void 0;try{t()}finally{xn=n}}}let hu=0;class qC{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hh{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xn||!yo||xn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xn)n=this.activeLink=new qC(xn,this),xn.deps?(n.prevDep=xn.depsTail,xn.depsTail.nextDep=n,xn.depsTail=n):xn.deps=xn.depsTail=n,M6(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const a=n.nextDep;a.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=a),n.prevDep=xn.depsTailLine truncated
* @vue/runtime-core v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Uu(e,t,n,a){try{return a?e(...a):e()}catch(o){Ef(o,t,n)}}function lo(e,t,n,a){if(Ue(e)){const o=Uu(e,t,n,a);return o&&cl(o)&&o.catch(r=>{Ef(r,t,n)}),o}if(we(e)){const o=[];for(let r=0;r<e.length;r++)o.push(lo(e[r],t,n,a));return o}}function Ef(e,t,n,a=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||wn;if(t){let s=t.parent;const u=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const d=s.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](e,u,c)===!1)return}s=s.parent}if(r){Er(),Uu(r,null,10,[e,u,c]),Tr();return}}gS(e,n,o,a,l)}function gS(e,t,n,a=!0,o=!1){if(o)throw e;console.error(e)}const ka=[];let Ho=-1;const Vs=[];let el=null,As=0;const z6=Promise.resolve();let Ed=null;function Ie(e){const t=Ed||z6;return e?t.then(this?e.bind(this):e):t}function yS(e){let t=Ho+1,n=ka.length;for(;t<n;){const a=t+n>>>1,o=ka[a],r=mu(o);r<e||r===e&&o.flags&2?t=a+1:n=a}return t}function vh(e){if(!(e.flags&1)){const t=mu(e),n=ka[ka.length-1];!n||!(e.flags&2)&&t>=mu(n)?ka.push(e):ka.splice(yS(t),0,e),e.flags|=1,H6()}}function H6(){Ed||(Ed=z6.then(K6))}function bS(e){if(!we(e))el&&e.id===-1?el.splice(As+1,0,e):e.flags&1||(Vs.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Vs.push(e[t]);H6()}function $m(e,t,n=Ho+1){for(;n<ka.length;n++){const a=ka[n];if(a&&a.flags&2){if(e&&a.id!==e.uid)continue;ka.splice(n,1),n--,a.flags&4&&(a.flags&=-2),a(),a.flags&4||(a.flags&=-2)}}}function F6(e){if(Vs.length){const t=[...new Set(Vs)].sort((n,a)=>mu(n)-mu(a));if(Vs.length=0,el){for(let n=0;n<t.length;n++)el.push(t[n]);return}for(el=t,As=0;As<el.length;As++){const n=el[As];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}el=null,As=0}}const mu=e=>e.id==null?e.flags&2?-1:1/0:e.id;function K6(e){try{for(Ho=0;Ho<ka.length;Ho++){const t=ka[Ho];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Uu(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ho<ka.length;Ho++){const t=ka[Ho];t&&(t.flags&=-2)}Ho=-1,ka.length=0,F6(),Ed=null,(ka.length||Vs.length)&&K6()}}let ra=null,j6=null;function Td(e){const t=ra;return ra=e,j6=e&&e.type.__scopeId||null,t}function re(e,t=ra,n){if(!t||e._n)return e;const a=(...o)=>{a._d&&Rd(-1);const r=Td(t),l=wr.length;let s;try{s=e(...o)}finally{for(let u=wr.length;u>l;u--)Eh();Td(r),a._d&&Rd(1)}return s};return a._n=!0,a._c=!0,a._d=!0,a}function vt(e,t){if(ra===null)return e;const n=Pf(ra),a=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,s,u=wn]=t[o];r&&(Ue(r)&&(r={mounted:r,updated:r}),r.deep&&vr(l),a.push({dir:r,instance:n,value:l,oldValue:void 0,arg:s,modifiers:u}))}return e}function _l(e,t,n,a){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const s=o[l];r&&(s.oldValue=r[l].value);let u=s.dir[a];u&&(Er(),lo(u,n,8,[e.el,s,e,t]),Tr())}}function Tt(e,t){if(va){let n=va.provides;const a=va.parent&&va.parent.provides;a===n&&(n=va.provides=Object.create(a)),n[e]=t}}function Le(e,t,n=!1){const a=gt();if(a||Fl){let o=Fl?Fl._context.provides:a?a.parent==null||a.ce?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Ue(t)?t.call(a&&a.proxy):t}}function mh(){return!!(gt()||Fl)}const wS=Symbol.for("v-scx"),_S=()=>Le(wS);function ya(e,t){return gh(e,null,t)}function fe(e,t,n){return gh(e,t,n)}function gh(e,t,n=wn){const{immediate:a,deep:o,flush:r,once:l}=n,s=qn({},n),u=t&&a||!t&&r!=="post";let c;if(wu){if(r==="sync"){const m=_S();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!u){const m=()=>{};return m.stop=ht,m.resume=ht,m.pause=ht,m}}const d=va;s.call=(m,v,h)=>lo(m,d,v,h);let f=!1;r==="post"?s.scheduler=m=>{Sa(m,d&&d.suspense)}:r!=="sync"&&(f=!0,s.scheduler=(m,v)=>{v?m():vh(m)}),s.augmentJob=m=>{t&&(m.flags|=4),f&&(m.flags|=2,d&&(m.id=d.uid,m.i=d))};const p=mS(e,t,s);return wu&&(c?c.push(p):u&&p()),p}function CS(e,t,n){const a=this.proxy,o=Be(e)?e.includes(".")?W6(a,e):()=>a[e]:e.bind(a,a);let r;Ue(t)?r=t:(r=t.handler,n=t);const l=Gu(this),s=gh(o,r.bind(a),n);return l(),s}function W6(e,t){const n=t.split(".");return()=>{let a=e;for(let o=0;o<n.length&&a;o++)a=a[n[o]];return a}}const Ur=new WeakMap,q6=Symbol("_vte"),Tf=e=>e.__isTeleport,Ol=e=>e&&(e.disabled||e.disabled===""),SS=e=>e&&(e.defer||e.defer===""),Im=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Lm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ip=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},xS={name:"Teleport",__isTeleport:!0,process(e,t,n,a,o,r,l,s,u,c){const{mc:d,pc:f,pbc:p,o:{insert:m,querySelector:v,createText:h,createComment:g,parentNode:y}}=c,b=Ol(t.props);let{dynamicChildren:C}=t;const w=(M,E,T)=>{M.shapeFlag&16&&d(M.children,E,T,o,r,l,s,u)},S=(M=t)=>{const E=Ol(M.props),T=M.target=Ip(M.props,v),A=Lp(T,M,h,m);T&&(l!=="svg"&&Im(T)?l="svg":l!=="mathml"&&Lm(T)&&(l="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(T),E||(w(M,T,A),ji(M,!1)))},k=M=>{const E=()=>{if(Ur.get(M)===E){if(Ur.delete(M),Ol(M.props)){const T=y(M.el)||n;w Line truncated
* @vue/runtime-dom v3.5.42
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Hp;const Xm=typeof window<"u"&&window.trustedTypes;if(Xm)try{Hp=Xm.createPolicy("vue",{createHTML:e=>e})}catch{}const ky=Hp?e=>Hp.createHTML(e):e=>e,yx="http://www.w3.org/2000/svg",bx="http://www.w3.org/1998/Math/MathML",dr=typeof document<"u"?document:null,Jm=dr&&dr.createElement("template"),wx={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const o=t==="svg"?dr.createElementNS(yx,e):t==="mathml"?dr.createElementNS(bx,e):n?dr.createElement(e,{is:n}):dr.createElement(e);return e==="select"&&a&&a.multiple!=null&&o.setAttribute("multiple",a.multiple),o},createText:e=>dr.createTextNode(e),createComment:e=>dr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,o,r){const l=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Jm.innerHTML=ky(a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e);const s=Jm.content;if(a==="svg"||a==="mathml"){const u=s.firstChild;for(;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Kr="transition",Ri="animation",Us=Symbol("_vtc"),Ey={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ty=qn({},Y6,Ey),_x=e=>(e.displayName="Transition",e.props=Ty,e),Jn=_x((e,{slots:t})=>Je(TS,My(e),t)),Sl=(e,t=[])=>{we(e)?e.forEach(n=>n(...t)):e&&e(...t)},Zm=e=>e?we(e)?e.some(t=>t.length>1):e.length>1:!1;function My(e){const t={};for(const P in e)P in Ey||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:a,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:u=r,appearActiveClass:c=l,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,v=Cx(o),h=v&&v[0],g=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:w,onLeaveCancelled:S,onBeforeAppear:k=y,onAppear:M=b,onAppearCancelled:E=C}=t,T=(P,L,U,z)=>{P._enterCancelled=z,Yr(P,L?d:s),Yr(P,L?c:l),U&&U()},A=(P,L)=>{P._isLeaving=!1,Yr(P,f),Yr(P,m),Yr(P,p),L&&L()},N=P=>(L,U)=>{const z=P?M:b,H=()=>T(L,P,U);Sl(z,[L,H]),Qm(()=>{Yr(L,P?u:r),zo(L,P?d:s),Zm(z)||e1(L,a,h,H)})};return qn(t,{onBeforeEnter(P){Sl(y,[P]),zo(P,r),zo(P,l)},onBeforeAppear(P){Sl(k,[P]),zo(P,u),zo(P,c)},onEnter:N(!1),onAppear:N(!0),onLeave(P,L){P._isLeaving=!0;const U=()=>A(P,L);zo(P,f),P._enterCancelled?(zo(P,p),Fp(P)):(Fp(P),zo(P,p)),Qm(()=>{P._isLeaving&&(Yr(P,f),zo(P,m),Zm(w)||e1(P,a,g,U))}),Sl(w,[P,U])},onEnterCancelled(P){T(P,!1,void 0,!0),Sl(C,[P])},onAppearCancelled(P){T(P,!0,void 0,!0),Sl(E,[P])},onLeaveCancelled(P){A(P),Sl(S,[P])}})}function Cx(e){if(e==null)return null;if(it(e))return[O0(e.enter),O0(e.leave)];{const t=O0(e);return[t,t]}}function O0(e){return VC(e)}function zo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Us]||(e[Us]=new Set)).add(t)}function Yr(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[Us];n&&(n.delete(t),n.size||(e[Us]=void 0))}function Qm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Sx=0;function e1(e,t,n,a){const o=e._endId=++Sx,r=()=>{o===e._endId&&a()};if(n!=null)return setTimeout(r,n);const{type:l,timeout:s,propCount:u}=Oy(e,t);if(!l)return a();const c=l+"end";let d=0;const f=()=>{e.removeEventListener(c,p),r()},p=m=>{m.target===e&&++d>=u&&f()};setTimeout(()=>{d<u&&f()},s+1),e.addEventListener(c,p)}function Oy(e,t){const n=window.getComputedStyle(e),a=v=>(n[v]||"").split(", "),o=a(`${Kr}Delay`),r=a(`${Kr}Duration`),l=t1(o,r),s=a(`${Ri}Delay`),u=a(`${Ri}Duration`),c=t1(s,u);let d=null,f=0,p=0;t===Kr?l>0&&(d=Kr,f=l,p=r.length):t===Ri?c>0&&(d=Ri,f=c,p=u.length):(f=Math.max(l,c),d=f>0?l>c?Kr:Ri:null,p=d?d===Kr?r.length:u.length:0);const m=d===Kr&&/\b(?:transform|all)(?:,|$)/.test(a(`${Kr}Property`).toString());return{type:d,timeout:f,propCount:p,hasTransform:m}}function t1(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,a)=>n1(n)+n1(e[a])))}function n1(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Fp(e){return(e?e.ownerDocument:document).body.offsetHeight}function xx(e,t,n){const a=e[Us];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $d=Symbol("_vod"),Th=Symbol("_vsh"),Bt={name:"show",beforeMount(e,{value:t},{transition:n}){e[$d]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Pi(e,t)},mounted(e,{value:t},{tra Line truncated
`))),e[Fa]=dl(o);const r=a||o.props&&o.props.type==="number";mr(e,t?"change":"input",l=>{l.target.composing||e[Fa](P0(e.value,n,r))}),(n||r)&&mr(e,"change",()=>{e.value=P0(e.value,n,r)}),t||(mr(e,"compositionstart",Ux),mr(e,"compositionend",c1),mr(e,"change",c1))},mounted(e,{value:t,modifiers:{trim:n,number:a}}){const o=t??"",r=e[Rc];delete e[Rc],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Fa](P0(e.value,n,a)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:a,trim:o,number:r}},l){if(e[Fa]=dl(l),e.composing)return;const s=(r||e.type==="number")&&!/^0\d/.test(e.value)?gf(e.value):e.value,u=t??"";if(s===u)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(a&&t===n||o&&e.value.trim()===u)||(e.value=u)}},Iy={deep:!0,created(e,t,n){e[Fa]=dl(n),mr(e,"change",()=>{const a=e._modelValue,o=Ys(e),r=e.checked,l=e[Fa];if(we(a)){const s=ih(a,o),u=s!==-1;if(r&&!u)l(a.concat(o));else if(!r&&u){const c=[...a];c.splice(s,1),l(c)}}else if(kr(a)){const s=new Set(a);r?s.add(o):s.delete(o),l(s)}else l(Vy(e,r))})},mounted:d1,beforeUpdate(e,t,n){e[Fa]=dl(n),d1(e,t,n)}};function d1(e,{value:t,oldValue:n},a){e._modelValue=t;let o;if(we(t))o=ih(t,a.props.value)>-1;else if(kr(t))o=t.has(a.props.value);else{if(t===n)return;o=Co(t,Vy(e,!0))}e.checked!==o&&(e.checked=o)}const Ly={created(e,{value:t},n){e.checked=Co(t,n.props.value),e[Fa]=dl(n),mr(e,"change",()=>{e[Fa](Ys(e))})},beforeUpdate(e,{value:t,oldValue:n},a){e[Fa]=dl(a),t!==n&&(e.checked=Co(t,a.props.value))}},zpe={deep:!0,created(e,{value:t,modifiers:{number:n}},a){e._modelValue=t,mr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>n?gf(Ys(u)):Ys(u)),r=e.multiple,l=r?kr(e._modelValue)?new Set(o):o:o[0],s=e._pendingValue=[r,r?we(l)?o.slice():o:l];try{e[Fa](l)}finally{Ie(()=>{e._pendingValue===s&&(e._pendingValue=void 0)})}}),e[Fa]=dl(a)},mounted(e,{value:t}){f1(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Fa]=dl(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Yx(t,n[1],n[0]))&&f1(e,t)}};function Yx(e,t,n){if(!n||we(e))return Co(e,t);if(kr(e)){if(e.size!==t.length)return!1;for(const a of t)if(!e.has(a))return!1;return!0}return!1}function f1(e,t){const n=e.multiple,a=we(t);if(!(n&&!a&&!kr(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],s=Ys(l);if(n)if(a){const u=typeof s;u==="string"||u==="number"?l.selected=t.some(c=>String(c)===String(s)):l.selected=ih(t,s)>-1}else l.selected=t.has(s);else if(Co(Ys(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ys(e){return"_value"in e?e._value:e.value}function Vy(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Gx=["ctrl","shift","alt","meta"],Xx={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gx.some(n=>e[`${n}Key`]&&!t.includes(n))},Ze=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=(o,...r)=>{for(let l=0;l<t.length;l++){const s=Xx[t[l]];if(s&&s(o,t))return}return e(o,...r)})},Jx={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},un=(e,t)=>{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=o=>{if(!("key"in o))return;const r=Rr(o.key);if(t.some(l=>l===r||Jx[l]===r))return e(o)})},Zx=qn({patchProp:Bx},wx);let p1;function By(){return p1||(p1=nx(Zx))}const fl=(...e)=>{By().render(...e)},Dy=(...e)=>{const t=By().createApp(...e),{mount:n}=t;return t.mount=a=>{const o=ek(a);if(!o)return;const r=t._component;!Ue(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,Qx(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t};function Qx(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ek(e){return Be(e)?document.querySelector(e):e}/*!
* pinia v2.3.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let zy;const Nf=e=>zy=e,Hy=Symbol();function Kp(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ou;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ou||(ou={}));function tk(){const e=uh(!0),t=e.run(()=>D({}));let n=[],a=[];const o=ao({install(r){Nf(o),o._a=r,r.provide(Hy,o),r.config.globalProperties.$pinia=o,a.forEach(l=>n.push(l)),a=[]},use(r){return this._a?n.push(r):a.push(r),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Fy=()=>{};function h1(e,t,n,a=Fy){e.push(t);const o=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),a())};return!n&&bf()&&ch(o),o}function ws(e,...t){e.slice().forEach(n=>{n(...t)})}const nk=e=>e(),v1=Symbol(),N0=Symbol();function jp(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,a)=>e.set(a,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const a=t[n],o=e[n];Kp(o)&&Kp(a)&&e.hasOwnProperty(n)&&!Jt(a)&&!br(a)?e[n]=jp(o,a):e[n]=a}return e}const ak=Symbol();function ok(e){return!Kp(e)||!e.hasOwnProperty(ak)}const{assign:Gr}=Object;function rk(e){return!!(Jt(e)&&e.effect)}function lk(e,t,n,a){const{state:o,actions:r,getters:l}=t,s=n.state.value[e];let u;function c(){s||(n.state.value[e]=o?o():{});const d=Bn(n.state.value[e]);return Gr(d,r,Object.keys(l||{}).reduce((f,p)=>(f[p]=ao(x(()=>{Nf(n);const m=n._s.get(e);return l[p].call(m,m)})),f),{}))}return u=Ky(e,c,t,n,a,!0),u}function Ky(e,t,n={},a,o,r){let l;const s=Gr({actions:{}},n),u={deep:!0};let c,d,f=[],p=[],m;const v=a.state.value[e];!r&&!v&&(a.state.value[e]={});let h;function g(E){let T;c=d=!1,typeof E=="function"?(E(a.state.value[e]),T={type:ou.patchFunction,storeId:e,events:m}):(jp(a.state.value[e],E),T={type:ou.patchObject,payload:E,storeId:e,events:m});const A=h=Symbol();Ie().then(()=>{h===A&&(c=!0)}),d=!0,ws(f,T,a.state.value[e])}const y=r?function(){const{state:T}=n,A=T?T():{};this.$patch(N=>{Gr(N,A)})}:Fy;function b(){l.stop(),f=[],p=[],a._s.delete(e)}const C=(E,T="")=>{if(v1 in E)return E[N0]=T,E;const A=function(){Nf(a);const N=Array.from(arguments),P=[],L=[];function U(I){P.push(I)}function z(I){L.push(I)}ws(p,{args:N,name:A[N0],store:S,after:U,onError:z});let H;try{H=E.apply(this&&this.$id===e?this:S,N)}catch(I){throw ws(L,I),I}return H instanceof Promise?H.then(I=>(ws(P,I),I)).catch(I=>(ws(L,I),Promise.reject(I))):(ws(P,H),H)};return A[v1]=!0,A[N0]=T,A},w={_p:a,$id:e,$onAction:h1.bind(null,p),$patch:g,$reset:y,$subscribe(E,T={}){const A=h1(f,E,T.detached,()=>N()),N=l.run(()=>fe(()=>a.state.value[e],P=>{(T.flush==="sync"?d:c)&&E({storeId:e,type:ou.direct,events:m},P)},Gr({},u,T)));return A},$dispose:b},S=zt(w);a._s.set(e,S);const M=(a._a&&a._a.runWithContext||nk)(()=>a._e.run(()=>(l=uh()).run(()=>t({action:C}))));for(const E in M){const T=M[E];if(Jt(T)&&!rk(T)||br(T))r||(v&&ok(T)&&(Jt(T)?T.value=v[E]:jp(T,v[E])),a.state.value[e][E]=T);else if(typeof T=="function"){const A=C(T,E);M[E]=A,s.actions[E]=T}}return Gr(S,M),Gr(en(S),M),Object.defineProperty(S,"$state",{get:()=>a.state.value[e],set:E=>{g(T=>{Gr(T,E)})}}),a._p.forEach(E=>{Gr(S,l.run(()=>E({store:S,app:a._a,pinia:a,options:s})))}),v&&r&&n.hydrate&&n.hydrate(S.$state,v),c=!0,d=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Mh(e,t,n){let a,o;const r=typeof t=="function";typeof e=="string"?(a=e,o=r?n:t):(o=e,a=e.id);function l(s,u){const c=mh();return s=s||(c?Le(Hy,null):null),s&&Nf(s),s=zy,s._s.has(a)||(r?Ky(a,t,o,s):lk(a,o,s)),s._s.get(a)}return l.$id=a,l}const Se={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},m1=["left","center","right"],sk=["year","years","month","months","date","dates","week","quarter","quarters","datetime","datetimerange","daterange","monthrange","yearrange","quarterrange"],$0=["sun","mon","tue","wed","thu","fri","sat"],st="update:modelValue",wt="change",Rn="input",g1=Symbol("INSTALLED_KEY"),Ro=["","default","small","large"];function jy(e,t){var n;const a=Mt();return ya(()=>{a.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),Ws(a)}function pl(e,t){return bf()?(ch(e,t),!0):!1}const I0=new WeakMap,ik=(...e)=>{var t;const n=e[0],a=(t=gt())===null||t===void 0?void 0:t.proxy,o=a??bf();if(o==null&&!mh())throw new Error("injectLocal must be called in setup");return o&&I0.has(o)&&n in I0.get(o)?I0.get(o)[n]:Le(...e)},Vt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const uk=e=>typeof e<"u",Wy=e=>e!=null,ck=Object.prototype.toString,dk=e=>ck.call(e)==="[object Object]",$f=(e,t,n)=>Math.min(n,Math.max(t,e)),ea=()=>{},Gs=fk();function fk(){var e,t,n;return Vt&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigatoLine truncated
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/const l2="_Mousewheel",rg=function(e,t){if(e&&e.addEventListener){qb(e);const n=function(a){const o=fA(a);t&&Reflect.apply(t,this,[a,o])};e[l2]={wheelHandler:n},e.addEventListener("wheel",n,{passive:!0})}},qb=e=>{var t;(t=e._Mousewheel)!=null&&t.wheelHandler&&(e.removeEventListener("wheel",e[l2].wheelHandler),e[l2]=null)},lg={beforeMount(e,t){rg(e,t.value)},unmounted(e){qb(e)},updated(e,t){t.value!==t.oldValue&&rg(e,t.value)}},Eu=e=>Object.keys(e),Ub=e=>Object.entries(e),sl=(e,t,n)=>({get value(){return kn(e,t,n)},set value(a){JO(e,t,a)}}),pA="__epPropKey",Z=e=>e,hA=e=>it(e)&&!!e.__epPropKey,No=(e,t)=>{if(!it(e)||hA(e))return e;const{values:n,required:a,default:o,type:r,validator:l}=e,s={type:r,required:!!a,validator:n||l?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Dt(e,"default")&&d.push(o),c||(c=d.includes(u))),l&&(c||(c=l(u))),!c&&d.length>0){const f=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");gx(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[pA]:!0};return Dt(e,"default")&&(s.default=o),s},Te=e=>Zs(Object.entries(e).map(([t,n])=>[t,No(n,t)])),vA=Te({zIndex:{type:Z([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"},teleported:Boolean,appendTo:{type:Z([String,Object]),default:"body"}}),mA={scroll:({scrollTop:e,fixed:t})=>Ke(e)&&Yt(t),[wt]:e=>Yt(e)};var Yb=class extends Error{constructor(e){super(e),this.name="ElementPlusError"}};function fn(e,t){throw new Yb(`[${e}] ${t}`)}function qt(e,t){{const n=Be(e)?new Yb(`[${e}] ${t}`):e;console.warn(n)}}const gA=["class","style"],yA=/^on[A-Z]/,qf=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,a=x(()=>((n==null?void 0:n.value)||[]).concat(gA)),o=gt();return o?x(()=>{var r;return Zs(Object.entries((r=o.proxy)==null?void 0:r.$attrs).filter(([l])=>!a.value.includes(l)&&!(t&&yA.test(l))))}):(qt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),x(()=>({})))};function Uh(){const e=Mt(),t=D(0),n=x(()=>({minWidth:`${Math.max(t.value,11)}px`}));return ln(e,()=>{var o;t.value=((o=e.value)==null?void 0:o.getBoundingClientRect().width)??0}),{calculatorRef:e,calculatorWidth:t,inputStyle:n}}const Uo=({from:e,replacement:t,scope:n,version:a,ref:o,type:r="API"},l)=>{fe(()=>i(l),s=>{s&&qt(n,`[${r}] ${e} is about to be deprecated in version ${a}, please use ${t} instead.
For more detail, please visit: ${o}
`)},{immediate:!0})},Yh=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),H0=e=>qu(e),bA="utils/dom/style",Gb=(e="")=>e.split(" ").filter(t=>!!t.trim()),oo=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},to=(e,t)=>{!e||!t.trim()||e.classList.add(...Gb(t))},ma=(e,t)=>{!e||!t.trim()||e.classList.remove(...Gb(t))},gr=(e,t)=>{var a;if(!Vt||!e||!t||Ib(e))return"";let n=aa(t);n==="float"&&(n="cssFloat");try{const o=e.style[n];if(o)return o;const r=(a=document.defaultView)==null?void 0:a.getComputedStyle(e,"");return r?r[n]:""}catch{return e.style[n]}},Xb=(e,t,n)=>{if(!(!e||!t))if(it(t))Ub(t).forEach(([a,o])=>Xb(e,a,o));else{const a=aa(t);e.style[a]=n}};function gn(e,t="px"){if(!e&&e!==0)return"";if(Ke(e)||aA(e))return`${e}${t}`;if(Be(e))return e;qt(bA,"binding value must be a string or number")}const Jb=(e,t,n,a)=>{const o={offsetX:0,offsetY:0},r=D(!1),l=(p,m)=>{if(e.value){const{offsetX:v,offsetY:h}=o,g=e.value.getBoundingClientRect(),y=Math.max(g.left,0),b=Math.max(g.top,0),C=g.width,w=g.height,S=document.documentElement.clientWidth,k=document.documentElement.clientHeight,M=-y+v,E=-b+h,T=S-y-C+v,A=k-b-(w<k?w:0)+h;a!=null&&a.value||(p=Pa(p,M,T),m=Pa(m,E,A)),o.offsetX=p,o.offsetY=m,e.value.style.transform=`translate(${gn(p)}, ${gn(m)})`}},s=p=>{const m=p.clientX,v=p.clientY,{offsetX:h,offsetY:g}=o,y=C=>{r.value||(r.value=!0),l(h+C.clientX-m,g+C.clientY-v)},b=()=>{r.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b)},u=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",s),window.addEventListener("resize",f))},c=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",s),window.removeEventListener("resize",f))},d=()=>{o.offsetX=0,o.offsetY=0,e.value&&(e.value.style.transform="")},f=()=>{const{offsetX:p,offsetY:m}=o;l(p,m)};return yt(()=>{ya(()=>{n.value?u():c()})}),Ht(()=>{c()}),{isDragging:r,resetPosition:d,updatePosition:f}};var wA={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",quarterTablePrompt:"Use the arrow keys and enter to select the quarter",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},input:{characters:"{count} / {max} characters"},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"R Line truncated
usage: app.provide(ID_INJECTION_KEY, {
prefix: number,
current: number,
})`);const n=Gh();return jy(()=>i(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Rs=[];const bg=e=>{Xt(e)===Se.esc&&Rs.forEach(t=>t(e))},VR=e=>{yt(()=>{Rs.length===0&&document.addEventListener("keydown",bg),Vt&&Rs.push(e)}),Ht(()=>{Rs=Rs.filter(t=>t!==e),Rs.length===0&&Vt&&document.removeEventListener("keydown",bg)})},h8=()=>{const e=Gh(),t=sv(),n=x(()=>`${e.value}-popper-container-${t.prefix}`);return{id:n,selector:x(()=>`#${n.value}`)}},BR=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},DR=()=>{const{id:e,selector:t}=h8();return Af(()=>{Vt&&(document.body.querySelector(t.value)||BR(e.value))}),{id:e,selector:t}},zR=Te({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),HR={showAfter:0,hideAfter:200,autoClose:0},FR=({showAfter:e,hideAfter:t,autoClose:n,open:a,close:o})=>{const{registerTimeout:r}=yg(),{registerTimeout:l,cancelTimeout:s}=yg();return{onOpen:(d,f=i(e))=>{r(()=>{a(d);const p=i(n);Ke(p)&&p>0&&l(()=>{o(d)},p)},f)},onClose:(d,f=i(t))=>{s(),r(()=>{o(d)},f)}}},v8=Symbol("elForwardRef"),KR=e=>{Tt(v8,{setForwardRef:n=>{e.value=n}})},jR=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),wg={current:0},_g=D(0),m8=2e3,Cg=Symbol("elZIndexContextKey"),g8=Symbol("zIndexContextKey"),lc=e=>{const t=gt()?Le(Cg,wg):wg,n=e||(gt()?Le(g8,void 0):void 0),a=x(()=>{const l=i(n);return Ke(l)?l:m8}),o=x(()=>a.value+_g.value),r=()=>(t.current++,_g.value=t.current,o.value);return!Vt&&!Le(Cg)&&qt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,currentZIndex:o,nextZIndex:r}},ai=Math.min,jl=Math.max,Fd=Math.round,Lc=Math.floor,Cr=e=>({x:e,y:e}),WR={left:"right",right:"left",bottom:"top",top:"bottom"};function y8(e,t,n){return jl(e,ai(t,n))}function sc(e,t){return typeof e=="function"?e(t):e}function oi(e){return e.split("-")[0]}function ic(e){return e.split("-")[1]}function b8(e){return e==="x"?"y":"x"}function iv(e){return e==="y"?"height":"width"}function al(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function uv(e){return b8(al(e))}function qR(e,t,n){n===void 0&&(n=!1);const a=ic(e),o=uv(e),r=iv(o);let l=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=Kd(l)),[l,Kd(l)]}function UR(e){const t=Kd(e);return[c2(e),t,c2(t)]}function c2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sg=["left","right"],xg=["right","left"],YR=["top","bottom"],GR=["bottom","top"];function XR(e,t,n){switch(e){case"top":case"bottom":return n?t?xg:Sg:t?Sg:xg;case"left":case"right":return t?YR:GR;default:return[]}}function JR(e,t,n,a){const o=ic(e);let r=XR(oi(e),n==="start",a);return o&&(r=r.map(l=>l+"-"+o),t&&(r=r.concat(r.map(c2)))),r}function Kd(e){const t=oi(e);return WR[t]+e.slice(t.length)}function ZR(e){var t,n,a,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(a=e.bottom)!=null?a:0,left:(o=e.left)!=null?o:0}}function w8(e){return typeof e!="number"?ZR(e):{top:e,right:e,bottom:e,left:e}}function jd(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function kg(e,t,n){let{reference:a,floating:o}=e;const r=al(t),l=uv(t),s=iv(l),u=oi(t),c=r==="y",d=a.x+a.width/2-o.width/2,f=a.y+a.height/2-o.height/2,p=a[s]/2-o[s]/2;let m;switch(u){case"top":m={x:d,y:a.y-o.height};break;case"bottom":m={x:d,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:f};break;case"left":m={x:a.x-o.width,y:f};break;default:m={x:a.x,y:a.y}}const v=ic(t);return v&&(m[l]+=p*(v==="end"?1:-1)*(n&&c?-1:1)),m}async function _8(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:r,rects:l,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=sc(t,e),v=w8(m),g=s[p?f==="floating"?"reference":"floating":f],y=jd(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),b=f==="floating"?{x:a,y:o,width:l.floating.width,height:l.floating.height}:l.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),w=await(r.isElement==null?void 0:r.isElement(C))&&await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1},S=jd(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:C,strategy:u}):b);return{top:(y.top-S.top+v.top)/w.y,bottom:(S.bottom-y.bottom+v.bottom)/w.y,left:(y.left-S.left+v.left)/w.x,right:(S.right-y.right+v.right)/w.x}}const QR=50,eP=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:r=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:_8},u=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=kg(c,a,u),p=a,m=0;const v={};for(let h=0;h<r.length;h++){const g=r[h];if(!g)continue;const{name:y,fn:b}=g,{x:C,y:w,data:S,reset:k}=await b({x:d,y:f,initialPlacement:a,placement:p,strategy:o,middlewareData:v,rects:c,platform:s,elements:{reference:e,floating:t}});d=C??d,f=w??f,v[y]={...v[y],...S},k&&m<QR&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:f}=kg(c,p,u)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:v}},tP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:r,platform:l,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=sc(e,t)||{};if(c==null)return{};const f=w8(d),p={x:n,y:a},m=uv(o),v=iv(m),h=await l.getDimensions(c),g=m==="y",y=g?"top":"left",b=g?"bottom":"right",C=g?"clientHeight":"clientWidth",w=r.reference[v]+r.reference[m]-p[m]-r.floating[v],S=p[m]-r.reference[m],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let M=k?k[C]:0;(!M||!await(l.isElement==null?void 0:l.isElement(k)))&&(M=s.floating[C]||r.floating[v]);const E=w/2-S/2,T=M/2-h[v]/2-1,A=ai(f[y],T),N=ai(f[b],T),P=M-h[v]-N,L=M/2-h[v]/2+E,U=y8(A,L,P),z=!u.arrow&&ic(o)!=null&&L!==U&&r.reference[v]/2-(L<A?A:N)-h[v]/2<0,H=z?L<A?L-A:L-P:0;return{[m]:p[m]+H,data:{[m]:U,centerOffset:L-U-H,...z&&{alignmentOffset:H}},reset:z}}}),nP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:r,rects:l,initialPlacement:s,platform:u,el Line truncated
(?:
(?:`+a+":){7}(?:"+a+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+a+":){6}(?:"+n+"|:"+a+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+a+":){5}(?::"+n+"|(?::"+a+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+a+":){4}(?:(?::"+a+"){0,1}:"+n+"|(?::"+a+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+a+":){3}(?:(?::"+a+"){0,2}:"+n+"|(?::"+a+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+a+":){2}(?:(?::"+a+"){0,3}:"+n+"|(?::"+a+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+a+":){1}(?:(?::"+a+"){0,4}:"+n+"|(?::"+a+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+a+"){0,5}:"+n+"|(?::"+a+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+n+"$)|(?:^"+o+"$)"),l=new RegExp("^"+n+"$"),s=new RegExp("^"+o+"$"),u=function(w){return w&&w.exact?r:new RegExp("(?:"+t(w)+n+t(w)+")|(?:"+t(w)+o+t(w)+")","g")};u.v4=function(C){return C&&C.exact?l:new RegExp(""+t(C)+n+t(C),"g")},u.v6=function(C){return C&&C.exact?s:new RegExp(""+t(C)+o+t(C),"g")};var c="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",f=u.v4().source,p=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',b="(?:"+c+"|www\\.)"+d+"(?:localhost|"+f+"|"+p+"|"+m+v+h+")"+g+y;return Bc=new RegExp("(?:^"+b+"$)","i"),Bc},Vg={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Yi={integer:function(t){return Yi.number(t)&&parseInt(t,10)===t},float:function(t){return Yi.number(t)&&!Yi.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Yi.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Vg.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(VK())},hex:function(t){return typeof t=="string"&&!!t.match(Vg.hex)}},BK=function(t,n,a,o,r){if(t.required&&n===void 0){dw(t,n,a,o,r);return}var l=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;l.indexOf(s)>-1?Yi[s](n)||o.push(Wa(r.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&o.push(Wa(r.messages.types[s],t.fullField,t.type))},DK=function(t,n,a,o,r){var l=typeof t.len=="number",s=typeof t.min=="number",u=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,f=null,p=typeof n=="number",m=typeof n=="string",v=Array.isArray(n);if(p?f="number":m?f="string":v&&(f="array"),!f)return!1;v&&(d=n.length),m&&(d=n.replace(c,"_").length),l?d!==t.len&&o.push(Wa(r.messages[f].len,t.fullField,t.len)):s&&!u&&d<t.min?o.push(Wa(r.messages[f].min,t.fullField,t.min)):u&&!s&&d>t.max?o.push(Wa(r.messages[f].max,t.fullField,t.max)):s&&u&&(d<t.min||d>t.max)&&o.push(Wa(r.messages[f].range,t.fullField,t.min,t.max))},Cs="enum",zK=function(t,n,a,o,r){t[Cs]=Array.isArray(t[Cs])?t[Cs]:[],t[Cs].indexOf(n)===-1&&o.push(Wa(r.messages[Cs],t.fullField,t[Cs].join(", ")))},HK=function(t,n,a,o,r){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(Wa(r.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var l=new RegExp(t.pattern);l.test(n)||o.push(Wa(r.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},nn={required:dw,whitespace:LK,type:BK,range:DK,enum:zK,pattern:HK},FK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n,"string")&&!t.required)return a();nn.required(t,n,o,l,r,"string"),Zn(n,"string")||(nn.type(t,n,o,l,r),nn.range(t,n,o,l,r),nn.pattern(t,n,o,l,r),t.whitespace===!0&&nn.whitespace(t,n,o,l,r))}a(l)},KK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),n!==void 0&&nn.type(t,n,o,l,r)}a(l)},jK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),n!==void 0&&(nn.type(t,n,o,l,r),nn.range(t,n,o,l,r))}a(l)},WK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),n!==void 0&&nn.type(t,n,o,l,r)}a(l)},qK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),Zn(n)||nn.type(t,n,o,l,r)}a(l)},UK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),n!==void 0&&(nn.type(t,n,o,l,r),nn.range(t,n,o,l,r))}a(l)},YK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Zn(n)&&!t.required)return a();nn.required(t,n,o,l,r),n!==void 0&&(nn.type(t,n,o,l,r),nn.range(t,n,o,l,r))}a(l)},GK=function(t,n,a,o,r){var l=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return a();nn.required(t,n,o,l,r,"array"),n!=null&&(nn.type(t,n,o,l,r),nn.range(t,n,o,l,r))}a(l)},XK=function(t,n,a,o,r){var Line truncated
You should set
width/height
to number when your layout is
horizontal/vertical
`);const c=Math.max(0,t*n-u),d=Math.min(c,r*n),f=Math.max(0,(r+1)*n-u);switch(l==="smart"&&(s>=f-u&&s<=d+u?l=no:l=qo),l){case $u:return d;case"end":return f;case qo:{const p=Math.round(f+(d-f)/2);return p<Math.ceil(u/2)?0:p>c+Math.floor(u/2)?c:p}case no:default:return s>=f&&s<=d?s:s<f?f:d}},getStartIndexForOffset:({total:e,itemSize:t},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:a,width:o},r,l)=>{const s=r*n,u=Lu(a)?o:e,c=Math.ceil((u+l-s)/n);return Math.max(0,Math.min(t-1,r+c-1))},initCache(){},clearCache:!0,validateProps(){}}),uY="ElDynamicSizeList",$s=(e,t,n)=>{const{itemSize:a}=e,{items:o,lastVisitedIndex:r}=n;if(t>r){let l=0;if(r>=0){const s=o[r];l=s.offset+s.size}for(let s=r+1;s<=t;s++){const u=a(s);o[s]={offset:l,size:u},l+=u}n.lastVisitedIndex=t}return o[t]},cY=(e,t,n)=>{const{items:a,lastVisitedIndex:o}=t;return(o>0?a[o].offset:0)>=n?o5(e,t,0,o,n):dY(e,t,Math.max(0,o),n)},o5=(e,t,n,a,o)=>{for(;n<=a;){const r=n+Math.floor((a-n)/2),l=$s(e,r,t).offset;if(l===o)return r;l<o?n=r+1:l>o&&(a=r-1)}return Math.max(0,n-1)},dY=(e,t,n,a)=>{const{total:o}=e;let r=1;for(;n<o&&$s(e,n,t).offset<a;)n+=r,r*=2;return o5(e,t,Math.floor(n/2),Math.min(n,o-1),a)},v4=({total:e},{items:t,estimatedItemSize:n,lastVisitedIndex:a})=>{let o=0;if(a>=e&&(a=e-1),a>=0){const l=t[a];o=l.offset+l.size}const r=(e-a-1)*n;return o+r},fY=a5({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>$s(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:v4,getOffset:(e,t,n,a,o)=>{const{height:r,layout:l,width:s}=e,u=Lu(l)?s:r,c=$s(e,t,o),d=v4(e,o),f=Math.max(0,Math.min(d-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch(n==="smart"&&(a>=p-u&&a<=f+u?n=no:n=qo),n){case $u:return f;case"end":return p;case qo:return Math.round(p+(f-p)/2);case no:default:return a>=p&&a<=f?a:a<p?p:f}},getStartIndexForOffset:(e,t,n)=>cY(e,n,t),getStopIndexForStartIndex:(e,t,n,a)=>{const{height:o,total:r,layout:l,width:s}=e,u=Lu(l)?s:o,c=$s(e,t,a),d=n+u;let f=c.offset+c.size,p=t;for(;p<r-1&&f<d;)p++,f+=$s(e,p,a).size;return p},initCache({estimatedItemSize:e=50},t){const n={items:{},estimatedItemSize:e,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(a,o=!0)=>{var r,l;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,a-1),(r=t.exposed)==null||r.getItemStyleCache(-1),o&&((l=t.proxy)==null||l.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{typeof e!="function"&&fn(uY,`
itemSize is required as function, but the given value was ${typeof e}
`)}}),pY=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:a},o)=>{let r=null,l=0,s=0;const u=(d,f)=>{const p=d<0&&t.value||d>0&&e.value,m=f<0&&a.value||f>0&&n.value;return p||m};return{hasReachedEdge:u,onWheel:d=>{ko(r);let f=d.deltaX,p=d.deltaY;if(Math.abs(f)>Math.abs(p)?p=0:f=0,d.shiftKey&&p!==0&&(f=p,p=0),u(f,p)){d.deltaX!==0&&f===0&&d.preventDefault();return}l+=f,s+=p,d.preventDefault(),r=ba(()=>{o(l,s),l=0,s=0})}}},hY=(e,t,n,a,o,r,l)=>{const s=D(0),u=D(0);let c,d=0,f=0;const p=v=>{ko(c),s.value=v.touches[0].clientX,u.value=v.touches[0].clientY,d=0,f=0},m=v=>{v.preventDefault(),ko(c),d+=s.value-v.touches[0].clientX,f+=u.value-v.touches[0].clientY,s.value=v.touches[0].clientX,u.value=v.touches[0].clientY,c=ba(()=>{const h=a.value-i(r),g=o.value-i(l);n({scrollLeft:Math.min(t.value.scrollLeft+d,h),scrollTop:Math.min(t.value.scrollTop+f,g)}),d=0,f=0})};return Kt(e,"touchstart",p,{passive:!0}),Kt(e,"touchmove",m,{passive:!1}),{touchStartX:s,touchStartY:u,handleTouchStart:p,handleTouchMove:m}},r5=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:a,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:r,getEstimatedTotalWidth:l,getColumnOffset:s,getRowOffset:u,getRowPosition:c,getRowStartIndexForOffset:d,getRowStopIndexForStartIndex:f,initCache:p,injectToInstance:m,validateProps:v})=>W({name:e??"ElVirtualList",props:ql,emits:[Xd,Jd],setup(h,{emit:g,expose:y,slots:b}){const C=be("vl");v(h);const w=gt(),S=D(p(h,w));m==null||m(w,S);const k=D(),M=D(),E=D(),T=D(),A=D({isScrolling:!1,scrollLeft:Ke(h.initScrollLeft)?h.initScrollLeft:0,scrollTop:Ke(h.initScrollTop)?h.initScrollTop:0,updateRequested:!1,xAxisScrollDir:Zd,yAxisScrollDir:Zd}),N=t5(),P=x(()=>Number.parseInt(`${h.height}`,10)),L=x(()=>Number.parseInt(`${h.width}`,10)),U=x(()=>{const{totalColumn:ge,totalRow:Oe,columnCache:_e}=h,{isScrolling:Ne,xAxisScrollDir:ze,scrollLeft:Qe}=i(A);if(ge===0||Oe===0)return[0,0,0,0];const et=a(h,Qe,i(S)),Xe=o(h,et,Qe,i(S)),_t=!Ne||ze==="backward"?Math.max(1,_e):1,Rt=!Ne||ze==="forward"?Math.max(1,_e):1;return[Math.max(0,et-_t),Math.max(0,Math.min(ge-1,Xe+Rt)),et,Xe]}),z=x(()=>{const{totalColumn:ge,totalRow:Oe,rowCache:_e}=h,{isScrolling:Ne,yAxisScrollDir:ze,scrollTop:Qe}=i(A);if(ge===0||Oe===0)return[0,0,0,0];const et=d(h,Qe,i(S)),Xe=f(h,et,Qe,i(S)),_t=!Ne||ze==="backward"?Math.max(1,_e):1,Rt=!Ne||ze==="forward"?Math.max(1,_e):1;return[Math.max(0,et-_t),Math.max(0,Math.min(Oe-1,Xe+Rt)),et,Xe]}),H=x(()=>r(h,i(S))),I=x(()=>l(h,i(S))),B=x(()=>[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:h.direction,height:Ke(h.height)?`${h.height}px`:h.height,width:Ke(h.width)?`${h.width}px`:h.width},h.style??{}]),j=x(()=>{const ge=`${i(I)}px`;return{height:`${i(H)}px`,pointerEvents:i(A).isScrolling?"none":void 0,width:ge,margin:0,boxSizing:"border-box"}}),K=()=>{const{totalColumn:ge,totalRow:Oe}=h;if(ge>0&&Oe>0){const[Xe,_t,Rt,Ut]=i(U),[Nt,jt,on,ke]=i(z);g(Xd,{columnCacheStart:Xe,columnCacheEnd:_t,rowCacheStart:Nt,rowCacheEnd:jt,columnVisibleStart:Rt,columnVisibleEnd:Ut,rowVisibleStart:on,rowVisibleEnd:ke})}const{scrollLeft:_e,scrollTop:Ne,updateRequested:ze,xAxisScrollDir:Qe,yAxisScrollDir:et}=i(A);g(Jd,{xAxisScrollDir:Qe,scrollLeft:_e,yAxisScrollDir:et,scrollTop:Ne,updateRequested:ze})},q=ge=>{const{clientHeight:Oe,clientWidth:_e,scrollHeight:Ne,scrollLeft:ze,scrollTop:Qe,scrollWidth:et}=ge.currentTarget,Xe=i(A);if(Xe.scrollTop===Qe&&Xe.scrollLeft===ze)return;let _t=ze;if(p4(h.direction))switch(ef()){case Iu:_t=-ze;break;case Nv:_t=et-_e-ze;break}A.value={...Xe,isScrolling:!0,scrollLeft:_t,scrollTop:Math.max(0,Math.min(Qe,Ne-Oe)),updateRequested:!0,xAxisScrollDir:Xi(Xe.scrollLeft,_t),yAxisScrollDir:Xi(Xe.scrollTop,Qe)},Ie(()=>F()),Y(),K()},V=(ge,Oe)=>{const _e=i(P),Ne=(H.value-_e)/Oe*ge;ne({scrollTop:Math.min(H.value-_e,Ne)})},G=(ge,Oe)=>{const _e=i(L),Ne=(I.value-_e)/Oe*ge;ne({scrollLeft:Math.min(I.value-_e,Ne)})},{onWheel:Q}=pY({atXStartEdge:x(()=>A.value.scrollLeft<=0),atXEndEdge:x(()=>A.value.scrollLeft>=I.value-i(L)),atYStartEdge:x(()=>A.value.scrollTop<=0),atYEndEdge:x(()=>A.value.scrollTop>=H.value-i(P))},(ge,Oe)=>{var ze,Qe,et,Xe;(Qe=(ze=M.value)==null?void 0:ze.onMouseUp)==null||Qe.call(ze),(Xe=(et=E.value)==null?void 0:et.onMouseUp)==null||Xe.call(et);const _e=i(L),Ne=i(P);ne({scrollLeft:Math.min(A.value.scrollLeft+ge,I.value-_e),scrollTop:Math.min(A.value.scrollTop+Oe,H.value-Ne)})});Kt(k,"wheel",Q,{passive:!1});const ne=({scrollLeft:ge=A.value.scrollLeft,scrollTop:Oe=A.value.scrollTop})=>{ge=Math.max(ge,0),Oe=Math.max(Oe,0);const _e=i(A);Oe===_e.scrollTop&&ge===_e.scrollLeft||(A.value={..._e,xAxisScrollDir:Xi(_e.scrollLeft,ge),yAxisScrollDir:Xi(_e.scrollTop,Oe),scrollLeft:ge,scrollTop:Oe,updateRequested:!0},Ie(()=>F()),Y(),K())},{touchStartX:oe,touchStartY:J,handleTouchStart:ue,handleTouchMove:le}=hY(k,A,ne,I,H,L,P),X=(ge=0,Oe=0,_e=no)=>{const Ne=i(A);Oe=Math.max(0,Math.min(Oe,h.totalColumn-1)),ge=Math.max(0,Math.min(ge,h.totalRow Line truncated
"columnWidth" must be passed as number,
instead ${typeof e} was given.
`),Ke(t)||fn(m4,`
"columnWidth" must be passed as number,
instead ${typeof t} was given.
`)}}),{max:tf,min:l5,floor:s5}=Math,g4="ElDynamicSizeGrid",mY={column:"columnWidth",row:"rowHeight"},R2={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},pr=(e,t,n,a)=>{const[o,r,l]=[n[a],e[mY[a]],n[R2[a]]];if(t>l){let s=0;if(l>=0){const u=o[l];s=u.offset+u.size}for(let u=l+1;u<=t;u++){const c=r(u);o[u]={offset:s,size:c},s+=c}n[R2[a]]=t}return o[t]},i5=(e,t,n,a,o,r)=>{for(;n<=a;){const l=n+s5((a-n)/2),s=pr(e,l,t,r).offset;if(s===o)return l;s<o?n=l+1:a=l-1}return tf(0,n-1)},gY=(e,t,n,a,o)=>{const r=o==="column"?e.totalColumn:e.totalRow;let l=1;for(;n<r&&pr(e,n,t,o).offset<a;)n+=l,l*=2;return i5(e,t,s5(n/2),l5(n,r-1),a,o)},y4=(e,t,n,a)=>{const[o,r]=[t[a],t[R2[a]]];return(r>0?o[r].offset:0)>=n?i5(e,t,0,r,n,a):gY(e,t,tf(0,r),n,a)},u5=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:a})=>{let o=0;if(n>=e&&(n=e-1),n>=0){const l=a[n];o=l.offset+l.size}const r=(e-n-1)*t;return o+r},c5=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:a})=>{let o=0;if(a>e&&(a=e-1),a>=0){const l=t[a];o=l.offset+l.size}const r=(e-a-1)*n;return o+r},yY={column:c5,row:u5},b4=(e,t,n,a,o,r,l)=>{const[s,u]=[r==="row"?e.height:e.width,yY[r]],c=pr(e,t,o,r),d=tf(0,l5(u(e,o)-s,c.offset)),f=tf(0,c.offset-s+l+c.size);switch(n==="smart"&&(a>=f-s&&a<=d+s?n=no:n=qo),n){case $u:return d;case"end":return f;case qo:return Math.round(f+(d-f)/2);case no:default:return a>=f&&a<=d?a:f>d||a<f?f:d}},bY=r5({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,n)=>{const a=pr(e,t,n,"column");return[a.size,a.offset]},getRowPosition:(e,t,n)=>{const a=pr(e,t,n,"row");return[a.size,a.offset]},getColumnOffset:(e,t,n,a,o,r)=>b4(e,t,n,a,o,"column",r),getRowOffset:(e,t,n,a,o,r)=>b4(e,t,n,a,o,"row",r),getColumnStartIndexForOffset:(e,t,n)=>y4(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,a)=>{const o=pr(e,t,a,"column"),r=n+e.width;let l=o.offset+o.size,s=t;for(;s<e.totalColumn-1&&l<r;)s++,l+=pr(e,t,a,"column").size;return s},getEstimatedTotalHeight:u5,getEstimatedTotalWidth:c5,getRowStartIndexForOffset:(e,t,n)=>y4(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,a)=>{const{totalRow:o,height:r}=e,l=pr(e,t,a,"row"),s=n+r;let u=l.size+l.offset,c=t;for(;c<o-1&&u<s;)c++,u+=pr(e,c,a,"row").size;return c},injectToInstance:(e,t)=>{const n=({columnIndex:r,rowIndex:l},s)=>{var u,c;s=Ot(s)?!0:s,Ke(r)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,r-1)),Ke(l)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,l-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),s&&((c=e.proxy)==null||c.$forceUpdate())},a=(r,l)=>{n({columnIndex:r},l)},o=(r,l)=>{n({rowIndex:r},l)};Object.assign(e.proxy,{resetAfterColumnIndex:a,resetAfterRowIndex:o,resetAfter:n})},initCache:({estimatedColumnWidth:e=50,estimatedRowHeight:t=50})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{Ue(e)||fn(g4,`
"columnWidth" must be passed as function,
instead ${typeof e} was given.
`),Ue(t)||fn(g4,`
"rowHeight" must be passed as function,
instead ${typeof t} was given.
`)}}),d5={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Ln,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...wa(["ariaControls"])},f5={[st]:e=>Be(e)||Ke(e)||Yt(e),change:e=>Be(e)||Ke(e)||Yt(e)},_i=Symbol("checkboxGroupContextKey"),wY=Te({modelValue:{type:Z(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Ln,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:Z(Array)},props:{type:Z(Object),default:()=>p5},type:{type:String,values:["checkbox","button"],default:"checkbox"},...wa(["ariaLabel"])}),_Y={[st]:e=>we(e),change:e=>we(e)},p5={label:"label",value:"value",disabled:"disabled"},CY=({model:e,isChecked:t})=>{const n=Le(_i,void 0),a=Le(ms,void 0),o=x(()=>{var s,u;const r=(s=n==null?void 0:n.max)==null?void 0:s.value,l=(u=n==null?void 0:n.min)==null?void 0:u.value;return!Ot(r)&&e.value.length>=r&&!t.value||!Ot(l)&&e.value.length<=l&&t.value});return{isDisabled:cn(x(()=>{var r;return n===void 0?(a==null?void 0:a.disabled)??o.value:((r=n.disabled)==null?void 0:r.value)||o.value})),isLimitDisabled:o}},SY=(e,{model:t,isLimitExceeded:n,hasOwnLabel:a,isDisabled:o,isLabeledByFormItem:r})=>{const l=Le(_i,void 0),{formItem:s}=Yn(),{emit:u}=gt();function c(v){return[!0,e.trueValue,e.trueLabel].includes(v)?e.trueValue??e.trueLabel??!0:e.falseValue??e.falseLabel??!1}function d(v,h){u(wt,c(v),h)}function f(v){if(n.value)return;const h=v.target;u(wt,c(h.checked),v)}async function p(v){n.value||!a.value&&!o.value&&r.value&&(v.composedPath().some(h=>h.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await Ie(),d(t.value,v)))}const m=x(()=>(l==null?void 0:l.validateEvent)||e.validateEvent);return fe(()=>e.modelValue,()=>{m.value&&(s==null||s.validate("change").catch(ht))}),{handleChange:f,onClickRoot:p}},xY=e=>{const t=D(!1),{emit:n,vnode:a}=gt(),o=Le(_i,void 0),r=x(()=>Ot(o)===!1),l=D(!1),s=x(()=>{const c=a.props??{};return"modelValue"in c||"model-value"in c}),u=x({get(){var c;return r.value?(c=o==null?void 0:o.modelValue)==null?void 0:c.value:s.value?e.modelValue:t.value},set(c){var d,f;r.value&&we(c)?(l.value=((d=o==null?void 0:o.max)==null?void 0:d.value)!==void 0&&c.length>(o==null?void 0:o.max.value)&&c.length>u.value.length,l.value===!1&&((f=o==null?void 0:o.changeEvent)==null||f.call(o,c))):(n(st,c),t.value=c)}});return{model:u,isGroup:r,isLimitExceeded:l}},kY=(e,t,{model:n})=>{const a=Le(_i,void 0),o=D(!1),r=x(()=>Ka(e.value)?e.label:e.value),l=x(()=>{const s=n.value;return Yt(s)?s:we(s)?it(r.value)?s.map(en).some(u=>vn(u,r.value)):s.map(en).includes(r.value):s!=null?s===e.trueValue||s===e.trueLabel:!!s});return{checkboxButtonSize:Pn(x(()=>{var s;return(s=a==null?void 0:a.size)==null?void 0:s.value}),{prop:!0}),isChecked:l,isFocused:o,checkboxSize:Pn(x(()=>{var s;return(s=a==null?void 0:a.size)==null?void 0:s.value})),hasOwnLabel:x(()=>!!t.default||!Ka(r.value)),actualValue:r}},h5=(e,t)=>{const{formItem:n}=Yn(),{model:a,isGroup:o,isLimitExceeded:r}=xY(e),{isFocused:l,isChecked:s,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=kY(e,t,{model:a}),{isDisabled:p}=CY({model:a,isChecked:s}),{inputId:m,isLabeledByFormItem:v}=Ba(e,{formItemContext:n,disableIdGeneration:d,disableIdManagement:o}),{handleChange:h,onClickRoot:g}=SY(e,{model:a,isLimitExceeded:r,hasOwnLabel:d,isDisabled:p,isLabeledByFormItem:v});return(()=>{function b(){we(a.value)&&!a.value.includes(f.value)?a.value.push(f.value):a.value=e.trueValue??e.trueLabel??!0}e.checked&&b()})(),Uo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>o.value&&Ka(e.value))),Uo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.trueLabel)),Uo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.falseLabel)),{inputId:m,isLabeledByFormItem:v,isChecked:s,isDisabled:p,isFocused:l,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:a,actualValue:f,handleChange:h,onClickRoot:g}},EY=["id","indeterminate","name","tabindex","disabled"];var TY=W({name:"ElCheckbox",__name:"checkbox",props:d5,emits:f5,setup(e){const t=e,{inputId:n,isLabeledByFormItem:a,isChecked:o,isDisabled:r,isFocused:l,checkboxSize:s,hasOwnLabel:u,mode Line truncated
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),A[2]||(A[2]=O("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):p.value&&e.node.checked?(_(),de(i(De),{key:2,class:$(i(r).e("prefix"))},{default:re(()=>[te(i(ns))]),_:1},8,["class"])):ie("v-if",!0),ie(" content "),te(i(WY),{node:e.node},null,8,["node"]),ie(" postfix "),p.value?ie("v-if",!0):(_(),R(je,{key:3},[e.node.loading?(_(),de(i(De),{key:0,class:$([i(r).is("loading"),i(r).e("postfix")])},{default:re(()=>[te(i(co))]),_:1},8,["class"])):(_(),de(i(De),{key:1,class:$(["arrow-right",i(r).e("postfix")])},{default:re(()=>[te(i(la))]),_:1},8,["class"]))],64))],42,qY))}}),w4=UY,YY=W({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0},virtualScroll:{type:Boolean,required:!1,default:!1},itemSize:{type:Number,required:!1,default:34},height:{type:Number,required:!1,default:204}},setup(e,{expose:t}){const n=e,a=gt(),o=be("cascader-menu"),{t:r}=kt(),l=oa();let s,u;const c=Le(l0),d=D(),f=D(),p=x(()=>!n.nodes.length),m=x(()=>!c.initialLoaded),v=x(()=>`${l.value}-${n.index}`),h=()=>{var E,T,A,N;let M;if(c.expandingNode){const{level:P,pathNodes:L}=c.expandingNode;n.index<P?M=(E=L[n.index])==null?void 0:E.uid:n.index===P&&c.checkedNodes.length>0&&(M=(A=(T=c.checkedNodes[0])==null?void 0:T.pathNodes[n.index])==null?void 0:A.uid)}else c.checkedNodes.length>0&&n.index<c.checkedNodes[0].pathNodes.length&&(M=(N=c.checkedNodes[0].pathNodes[n.index])==null?void 0:N.uid);return M!==void 0?n.nodes.findIndex(P=>P.uid===M):-1},g=M=>M?n.nodes.findIndex(E=>`${v.value}-${E.uid}`===M):-1,y=M=>{var T;const E=Pa(M,0,n.nodes.length-1);(T=f.value)==null||T.scrollToItem(E)},b=M=>{if(!n.nodes.length)return;const E=Pa(M,0,n.nodes.length-1);y(E),Ie(()=>{var A;const T=(A=a.vnode.el)==null?void 0:A.querySelector(`#${v.value}-${n.nodes[E].uid}`);T&&Hs(T)})},C=M=>{s=M.target},w=M=>{var E,T,A;if(!(!c.isHoverMenu||!s||!d.value))if(s.contains(M.target)){S();const N=a.vnode.el,{left:P}=N.getBoundingClientRect(),{offsetWidth:L,offsetHeight:U}=N,z=M.clientX-P,H=s.offsetTop,I=H+s.offsetHeight,B=n.virtualScroll?((T=(E=f.value)==null?void 0:E.states)==null?void 0:T.scrollOffset)||0:((A=N.querySelector(`.${o.e("wrap")}`))==null?void 0:A.scrollTop)||0;d.value.innerHTML=`
<path style="pointer-events: auto;" fill="transparent" d="M${z} ${H} L${L} ${B} V${H} Z" />
<path style="pointer-events: auto;" fill="transparent" d="M${z} ${I} L${L} ${U+B} V${I} Z" />
`}else u||(u=window.setTimeout(k,c.config.hoverThreshold))},S=()=>{u&&(clearTimeout(u),u=void 0)},k=()=>{d.value&&(d.value.innerHTML="",S())};return t({getActiveNodeIndex:h,getNodeIndexById:g,scrollToItem:y,focusNodeAt:b,virtualListRef:f,get $el(){return a.vnode.el}}),(M,E)=>{var T;return e.virtualScroll?(_(),R("div",{key:v.value,class:$(i(o).b()),onMousemove:w,onMouseleave:k},[te(i(mc),{ref_key:"virtualListRef",ref:f,height:e.height,"item-size":e.itemSize,data:e.nodes,total:e.nodes.length,"class-name":i(o).e("list"),"inner-element":"ul","inner-props":{role:"menu",class:i(o).is("empty",p.value)}},{default:re(({data:A,index:N,style:P})=>[(_(),de(w4,{key:A[N].uid,node:A[N],"menu-id":v.value,style:Ye(P),onExpand:C},null,8,["node","menu-id","style"]))]),_:1},8,["height","item-size","data","total","class-name","inner-props"]),m.value?(_(),R("div",{key:0,class:$(i(o).e("empty-text"))},[te(i(De),{size:14,class:$(i(o).is("loading"))},{default:re(()=>[te(i(co))]),_:1},8,["class"]),xt(" "+Ee(i(r)("el.cascader.loading")),1)],2)):p.value?(_(),R("div",{key:1,class:$(i(o).e("empty-text"))},[se(M.$slots,"empty",{},()=>[xt(Ee(i(r)("el.cascader.noData")),1)])],2)):(T=i(c))!=null&&T.isHoverMenu?(_(),R(je,{key:2},[ie(" eslint-disable vue/html-self-closing "),(_(),R("svg",{ref_key:"hoverZone",ref:d,class:$(i(o).e("hover-zone"))},null,2))],2112)):ie("v-if",!0),ie(" eslint-enable vue/html-self-closing ")],34)):(_(),de(i(Mo),{key:v.value,tag:"ul",role:"menu",class:$(i(o).b()),"wrap-class":i(o).e("wrap"),"view-class":[i(o).e("list"),i(o).is("empty",p.value)],onMousemove:w,onMouseleave:k},{default:re(()=>{var A;return[(_(!0),R(je,null,St(e.nodes,N=>(_(),de(w4,{key:N.uid,node:N,"menu-id":v.value,onExpand:C},null,8,["node","menu-id"]))),128)),m.value?(_(),R("div",{key:0,class:$(i(o).e("empty-text"))},[te(i(De),{size:14,class:$(i(o).is("loading"))},{default:re(()=>[te(i(co))]),_:1},8,["class"]),xt(" "+Ee(i(r)("el.cascader.loading")),1)],2)):p.value?(_(),R("div",{key:1,class:$(i(o).e("empty-text"))},[se(M.$slots,"empty",{},()=>[xt(Ee(i(r)("el.cascader.noData")),1)])],2)):(A=i(c))!=null&&A.isHoverMenu?(_(),R(je,{key:2},[ie(" eslint-disable vue/html-self-closing "),(_(),R("svg",{ref_key:"hoverZone",ref:d,class:$(i(o).e("hover-zone"))},null,2))],2112)):ie("v-if",!0),ie(" eslint-enable vue/html-self-closing ")]}),_:3},8,["class","wrap-class","view-class"]))}}}),GY=YY;let XY=0;const JY=e=>{const t=[e];let{parent:n}=e;for(;n;)t.unshift(n),n=n.parent;return t};var P2=class N2{constructor(t,n,a,o=!1){this.data=t,this.config=n,this.parent=a,this.root=o,this.uid=XY++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:r,label:l,children:s}=n,u=t[s],c=JY(this);this.level=o?0:a?a.level+1:1,this.value=t[r],this.label=t[l],this.pathNodes=c,this.pathValues=c.map(d=>d.value),this.pathLabels=c.map(d=>d.label),this.childrenData=u,this.children=(u||[]).map(d=>new N2(d,n,this)),this.loaded=!n.lazy||this.isLeaf||!Ea(u),this.text=""}get isDisabled(){const{data:t,parent:n,config:a}=this,{disabled:o,checkStrictly:r}=a;return(Ue(o)?o(t,this):!!t[o])||!r&&!!(n!=null&&n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:a,loaded:o}=this,{lazy:r,leaf:l}=n,s=Ue(l)?l(t,this):t[l];return Ot(s)?r&&!o?!1:!(we(a)&&a.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:a}=this,o=new N2(t,this.config,this);return we(n)?n.push(t):this.childrenData=[t],a.push(o),o}calcText(t,n){const a=t?this.pathLabels.join(n):this.label;return this.text=a,a}broadcast(t){this.children.forEach(n=>{var a;n&&(n.broadcast(t),(a=n.onParentCheck)==null||a.call(n,t))})}emit(){var n;const{parent:t}=this;t&&((n=t.onChildCheck)==null||n.call(t),t.emit())}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(o=>!o.isDisabled),a=n.length?n.every(o=>o.checked):!1;this.setCheckState(a)}setCheckState(t){const n=this.children.length,a=this.children.reduce((o,r)=>o+(r.checked?1:r.indeterminate?.5:0),0);this.checked=this.loaded&&this.children.filter(o=>!o.isDisabled).every(o=>o.loaded&&o.checked)&&t,this.indeterminate=this.loaded&&a!==n&&a>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:a}=this.config;n||!a?this.checked=t:(this.broadcast(t),this.setCheckState(t),this.emit())}};const $2=(e,t)=>e.reduce((n,a)=>(a.isLeaf?n.push(a):(!t&&n.push(a),n=n.concat($2(a.children,t))),n),[]);var _4=class{constructor(e,t){this.config=t;const n=(e||[]).map(a=>new P2(a,this.config));this.nodes=n,this.allNodes=$2(n,!1),this.leafNodes=$2(n,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,t){const n=t?t.appendChild(e):new P2(e,this.config);t||this.nodes.push(n),this.appendAllNodesAndLeafNodes(n)}appendNodes(e,t){e.length>0?e.forEach(n=>this.appendNode(n,t)):t&&t.isLeaf&&this.leafNodes.push(t)}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e. Line truncated
M 50 50
m 0 ${w?"":"-"}${C}
a ${C} ${C} 0 1 1 0 ${w?"-":""}${C*2}
a ${C} ${C} 0 1 1 0 ${w?"":"-"}${C*2}
`}),u=x(()=>2*Math.PI*l.value),c=x(()=>n.type==="dashboard"?.75:1),d=x(()=>`${-1*u.value*(1-c.value)/2}px`),f=x(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),p=x(()=>({strokeDasharray:`${u.value*c.value*(n.percentage/100)}px, ${u.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=x(()=>{let C;return n.color?C=b(n.percentage):C=t[n.status]||t.default,C}),v=x(()=>n.status==="warning"?fc:n.type==="line"?n.status==="success"?t0:Io:n.status==="success"?ns:Ga),h=x(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),g=x(()=>n.format(n.percentage));function y(C){const w=100/C.length;return C.map((S,k)=>Be(S)?{color:S,percentage:(k+1)*w}:S).sort((S,k)=>S.percentage-k.percentage)}const b=C=>{var S;const{color:w}=n;if(Ue(w))return w(C);if(Be(w))return w;{const k=y(w);for(const M of k)if(M.percentage>C)return M.color;return(S=k[k.length-1])==null?void 0:S.color}};return(C,w)=>(_(),R("div",{class:$([i(a).b(),i(a).m(e.type),i(a).is(e.status),{[i(a).m("without-text")]:!e.showText,[i(a).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(_(),R("div",{key:0,class:$(i(a).b("bar"))},[O("div",{class:$(i(a).be("bar","outer")),style:Ye({height:`${e.strokeWidth}px`})},[O("div",{class:$([i(a).be("bar","inner"),{[i(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[i(a).bem("bar","inner","striped")]:e.striped},{[i(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:Ye(o.value)},[(e.showText||C.$slots.default)&&e.textInside?(_(),R("div",{key:0,class:$(i(a).be("bar","innerText"))},[se(C.$slots,"default",{percentage:e.percentage},()=>[O("span",null,Ee(g.value),1)])],2)):ie("v-if",!0)],6)],6)],2)):(_(),R("div",{key:1,class:$(i(a).b("circle")),style:Ye({height:`${e.width}px`,width:`${e.width}px`})},[(_(),R("svg",Rne,[O("path",{class:$(i(a).be("circle","track")),d:s.value,stroke:`var(${i(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":r.value,fill:"none",style:Ye(f.value)},null,14,Pne),O("path",{class:$(i(a).be("circle","path")),d:s.value,stroke:m.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":r.value,style:Ye(p.value)},null,14,Nne)]))],6)),(e.showText||C.$slots.default)&&!e.textInside?(_(),R("div",{key:2,class:$(i(a).e("text")),style:Ye({fontSize:`${h.value}px`})},[se(C.$slots,"default",{percentage:e.percentage},()=>[e.status?(_(),de(i(De),{key:1},{default:re(()=>[(_(),de(dt(v.value)))]),_:1})):(_(),R("span",$ne,Ee(g.value),1))])],6)):ie("v-if",!0)],10,Ane))}}),Lne=Ine;const qv=ut(Lne),Vne=Te({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:Z([Array,Object]),default:()=>mn(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:Z([Array,Object]),default:()=>[Ui,Ui,Ui]},voidIcon:{type:Gt,default:()=>Q8},disabledVoidIcon:{type:Gt,default:()=>Ui},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Z(Array),default:()=>mn(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Ln,clearable:Boolean,...wa(["ariaLabel"])}),Bne={[wt]:e=>Ke(e),[st]:e=>Ke(e)},Dne=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax","tabindex","aria-disabled"],zne=["onMousemove","onClick"];var Hne=W({name:"ElRate",__name:"rate",props:Vne,emits:Bne,setup(e,{expose:t,emit:n}){function a(B,j){const K=V=>it(V),q=j[Object.keys(j).map(V=>+V).filter(V=>{const G=j[V];return K(G)&&G.excluded?B<V:B<=V}).sort((V,G)=>V-G)[0]];return K(q)&&q.value||q}const o=e,r=n,l=Le(ar,void 0),s=Pn(),u=be("rate"),{inputId:c,isLabeledByFormItem:d}=Ba(o,{formItemContext:l}),f=D(Pa(o.modelValue,0,o.max)),p=D(-1),m=D(!0),v=D([]),h=x(()=>v.value.map(B=>B.$el.clientWidth)),g=x(()=>[u.b(),u.m(s.value)]),y=cn(),b=x(()=>u.cssVarBlock({"void-color":o.voidColor,"disabled-void-color":o.disabledVoidColor,"fill-color":k.value})),C=x(()=>{let B="";return o.showScore?B=o.scoreTemplate.replace(/\{\s*value\s*\}/,y.value?`${o.modelValue}`:`${f.value}`):o.showText&&(B=o.texts[Math.ceil(f.value)-1]),B}),w=x(()=>o.modelValue*100-Math.floor(o.modelValue)*100),S=x(()=>we(o.colors)?{[o.lowThreshold]:o.colors[0],[o.highThreshold]:{value:o.colors[1],excluded:!0},[o.max]:o.colors[2]}:o.colors),k=x(()=>{const B=a(f.value,S.value);return it(B)?"":B}),M=x(()=>{let B="";return y.value?B=`${w.value}%`:o.allowHalf&&(B="50%"),{color:k.value,width:B}}),E=x(()=>{let B=we(o.icons)?[...o.icons]:{...o.icons};return B=ao(B),we(B)?{[o.lowThreshold]:B[0],[o.highThreshold]:{value:B[1],excluded:!0},[o.max]:B[2]}:B}),T=x(()=>a(o.modelValue,E.value)),A=x(()=>y.va Line truncated
`||c==="\r")){l=u;continue}if(r.includes(c)){const d=l===-1?a:l;s={pattern:o.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:l,selectionEnd:a};break}}return s},pue=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,o=t.useSelectionEnd?a:n,r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);const s=l.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";s.whiteSpace=c?"nowrap":"pre-wrap",c||(s.wordWrap="break-word"),s.position="absolute",t.debug||(s.visibility="hidden"),r.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const m=Number.parseInt(u.height),v=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),h=v+Number.parseInt(u.lineHeight);m>h?s.lineHeight=`${m-v}px`:m===h?s.lineHeight=u.lineHeight:s.lineHeight="0"}else s.lineHeight=u.height;else s[p]=u[p]}),Lf()?e.scrollHeight>Number.parseInt(u.height)&&(s.overflowY="scroll"):s.overflow="hidden",l.textContent=e.value.slice(0,Math.max(0,o)),c&&l.textContent&&(l.textContent=l.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,o))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,l.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(l),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},hue=Te({...Sv,options:{type:Z(Array),default:()=>[]},prefix:{type:Z([String,Array]),default:"@",validator:e=>Be(e)?e.length===1:e.every(t=>Be(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:Z([Boolean,Function]),default:()=>due,validator:e=>e===!1?!0:Ue(e)},placement:{type:Z(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:Z(Function)},modelValue:String,loading:Boolean,popperClass:an.popperClass,popperStyle:an.popperStyle,popperOptions:{type:Z(Object),default:()=>({})},props:{type:Z(Object),default:()=>S_}}),vue={[st]:e=>Be(e),"whole-remove":(e,t)=>Be(e)&&Be(t),input:e=>Be(e),search:(e,t)=>Be(e)&&Be(t),select:(e,t)=>it(e)&&Be(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},S_={value:"value",label:"label",disabled:"disabled"},mue=Te({options:{type:Z(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),gue={select:e=>Be(e.value)},yue=["id","aria-disabled","aria-selected","onMousemove","onClick"];var bue=W({name:"ElMentionDropdown",__name:"mention-dropdown",props:mue,emits:gue,setup(e,{expose:t,emit:n}){const a=e,o=n,r=be("mention"),{t:l}=kt(),s=D(-1),u=D(),c=D(),d=D(),f=(w,S)=>[r.be("dropdown","item"),r.is("hovering",s.value===S),r.is("disabled",w.disabled||a.disabled)],p=w=>{w.disabled||a.disabled||o("select",w)},m=w=>{s.value=w},v=x(()=>a.disabled||a.options.every(w=>w.disabled)),h=x(()=>a.options[s.value]),g=()=>{!h.value||h.value.disabled||a.disabled||o("select",h.value)},y=w=>{const{options:S}=a;if(S.length===0||v.value)return;w==="next"?(s.value++,s.value===S.length&&(s.value=0)):w==="prev"&&(s.value--,s.value<0&&(s.value=S.length-1));const k=S[s.value];if(k.disabled){y(w);return}Ie(()=>b(k))},b=w=>{var E,T,A,N;const{options:S}=a,k=S.findIndex(P=>P.value===w.value),M=(E=c.value)==null?void 0:E[k];if(M){const P=(A=(T=d.value)==null?void 0:T.querySelector)==null?void 0:A.call(T,`.${r.be("dropdown","wrap")}`);P&&Jh(P,M)}(N=u.value)==null||N.handleScroll()};return fe(()=>a.options,()=>{v.value||a.options.length===0?s.value=-1:s.value=a.options.findIndex(w=>!w.disabled)},{immediate:!0}),t({hoveringIndex:s,navigateOptions:y,selectHoverOption:g,hoverOption:h}),(w,S)=>(_(),R("div",{ref_key:"dropdownRef",ref:d,class:$(i(r).b("dropdown"))},[w.$slots.header?(_(),R("div",{key:0,class:$(i(r).be("dropdown","header"))},[se(w.$slots,"header")],2)):ie("v-if",!0),vt(te(i(Mo),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(r).be("dropdown","wrap"),"view-class":i(r).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:re(()=>[(_(!0),R(je,null,St(e.options,( Line truncated
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const Ns=typeof document<"u";function R_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Kce(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&R_(e.default)}const dn=Object.assign;function mp(e,t){const n={};for(const a in t){const o=t[a];n[a]=Oo(o)?o.map(e):e(o)}return n}const fu=()=>{},Oo=Array.isArray;function p3(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}const P_=/#/g,jce=/&/g,Wce=/\//g,qce=/=/g,Uce=/\?/g,N_=/\+/g,Yce=/%5B/g,Gce=/%5D/g,$_=/%5E/g,Xce=/%60/g,I_=/%7B/g,Jce=/%7C/g,L_=/%7D/g,Zce=/%20/g;function bm(e){return e==null?"":encodeURI(""+e).replace(Jce,"|").replace(Yce,"[").replace(Gce,"]")}function Qce(e){return bm(e).replace(I_,"{").replace(L_,"}").replace($_,"^")}function Q2(e){return bm(e).replace(N_,"%2B").replace(Zce,"+").replace(P_,"%23").replace(jce,"%26").replace(Xce,"`").replace(I_,"{").replace(L_,"}").replace($_,"^")}function ede(e){return Q2(e).replace(qce,"%3D")}function tde(e){return bm(e).replace(P_,"%23").replace(Uce,"%3F")}function nde(e){return tde(e).replace(Wce,"%2F")}function Fu(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const ade=/\/$/,ode=e=>e.replace(ade,"");function gp(e,t,n="/"){let a,o={},r="",l="";const s=t.indexOf("#");let u=t.indexOf("?");return u=s>=0&&u>s?-1:u,u>=0&&(a=t.slice(0,u),r=t.slice(u,s>0?s:t.length),o=e(r.slice(1))),s>=0&&(a=a||t.slice(0,s),l=t.slice(s,t.length)),a=ide(a??t,n),{fullPath:a+r+l,path:a,query:o,hash:Fu(l)}}function rde(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function h3(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lde(e,t,n){const a=t.matched.length-1,o=n.matched.length-1;return a>-1&&a===o&&ci(t.matched[a],n.matched[o])&&V_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ci(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function V_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!sde(e[n],t[n]))return!1;return!0}function sde(e,t){return Oo(e)?v3(e,t):Oo(t)?v3(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function v3(e,t){return Oo(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function ide(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),o=a[a.length-1];(o===".."||o===".")&&a.push("");let r=n.length-1,l,s;for(l=0;l<a.length;l++)if(s=a[l],s!==".")if(s==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+a.slice(l).join("/")}const jr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let eh=function(e){return e.pop="pop",e.push="push",e}({}),yp=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function ude(e){if(!e)if(Ns){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ode(e)}const cde=/^[^#]+#/;function dde(e,t){return e.replace(cde,"#")+t}function fde(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const m0=()=>({left:window.scrollX,top:window.scrollY});function pde(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=fde(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function m3(e,t){return(history.state?history.state.position-t:-1)+e}const th=new Map;function hde(e,t){th.set(e,t)}function vde(e){const t=th.get(e);return th.delete(e),t}function mde(e){return typeof e=="string"||e&&typeof e=="object"}function B_(e){return typeof e=="string"||typeof e=="symbol"}let In=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const D_=Symbol("");In.MATCHER_NOT_FOUND+"",In.NAVIGATION_GUARD_REDIRECT+"",In.NAVIGATION_ABORTED+"",In.NAVIGATION_CANCELLED+"",In.NAVIGATION_DUPLICATED+"";function di(e,t){return dn(new Error,{type:e,[D_]:!0},t)}function cr(e,t){return e instanceof Error&&D_ in e&&(t==null||!!(e.type&t))}const gde=["params","query","hash"];function yde(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of gde)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function bde(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;a<n.length;++a){const o=n[a].replace(N_," "),r=o.indexOf("="),l=Fu(r<0?o:o.slice(0,r)),s=r<0?null:Fu(o.slice(r+1));if(l in t){let uLine truncated
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Sde=()=>location.protocol+"//"+location.host;function z_(e,t){const{pathname:n,search:a,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,s=o.slice(l);return s[0]!=="/"&&(s="/"+s),h3(s,"")}return h3(n,e)+a+o}function xde(e,t,n,a){let o=[],r=[],l=null;const s=({state:p})=>{const m=z_(e,location),v=n.value,h=t.value;let g=0;if(p){if(n.value=m,t.value=p,l&&l===v){l=null;return}g=h?p.position-h.position:0}else a(m);o.forEach(y=>{y(n.value,v,{delta:g,type:eh.pop,direction:g?g>0?yp.forward:yp.back:yp.unknown})})};function u(){l=n.value}function c(p){o.push(p);const m=()=>{const v=o.indexOf(p);v>-1&&o.splice(v,1)};return r.push(m),m}function d(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(dn({},p.state,{scroll:m0()}),"")}}function f(){for(const p of r)p();r=[],window.removeEventListener("popstate",s),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",s),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:f}}function b3(e,t,n,a=!1,o=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:o?m0():null}}function kde(e){const{history:t,location:n}=window,a={value:z_(e,n)},o={value:t.state};o.value||r(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,c,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:Sde()+e+u;try{t[d?"replaceState":"pushState"](c,"",p),o.value=c}catch(m){console.error(m),n[d?"replace":"assign"](p)}}function l(u,c){r(u,dn({},t.state,b3(o.value.back,u,o.value.forward,!0),c,{position:o.value.position}),!0),a.value=u}function s(u,c){const d=dn({},o.value,t.state,{forward:u,scroll:m0()});r(d.current,d,!0),r(u,dn({},b3(a.value,u,null),{position:d.position+1},c),!1),a.value=u}return{location:a,state:o,push:s,replace:l}}function Ede(e){e=ude(e);const t=kde(e),n=xde(e,t.state,t.location,t.replace);function a(r,l=!0){l||n.pauseListeners(),history.go(r)}const o=dn({location:"",base:e,go:a,createHref:dde.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Bl=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Gn=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Gn||{});const Tde={type:Bl.Static,value:""},Mde=/[a-zA-Z0-9_]/;function Ode(e){if(!e)return[[]];if(e==="/")return[[Tde]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${c}": ${m}`)}let n=Gn.Static,a=n;const o=[];let r;function l(){r&&o.push(r),r=[]}let s=0,u,c="",d="";function f(){c&&(n===Gn.Static?r.push({type:Bl.Static,value:c}):n===Gn.Param||n===Gn.ParamRegExp||n===Gn.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Bl.Param,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=u}for(;s<e.length;){if(u=e[s++],u==="\\"&&n!==Gn.ParamRegExp){a=n,n=Gn.EscapeNext;continue}switch(n){case Gn.Static:u==="/"?(c&&f(),l()):u===":"?(f(),n=Gn.Param):p();break;case Gn.EscapeNext:p(),n=a;break;case Gn.Param:u==="("?n=Gn.ParamRegExp:Mde.test(u)?p():(f(),n=Gn.Static,u!=="*"&&u!=="?"&&u!=="+"&&s--);break;case Gn.ParamRegExp:u===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+u:n=Gn.ParamRegExpEnd:d+=u;break;case Gn.ParamRegExpEnd:f(),n=Gn.Static,u!=="*"&&u!=="?"&&u!=="+"&&s--,d="";break;default:t("Unknown state");break}}return n===Gn.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),l(),o}const w3="[^/]+?",Ade={sensitive:!1,strict:!1,start:!0,end:!0};var xa=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(xa||{});const Rde=/[.+*?^${}()[\]/\\]/g;function Pde(e,t){const n=dn({},Ade,t),a=[];let o=n.start?"^":"";const r=[];for(const c of e){const d=c.length?[]:[xa.Root];n.strict&&!c.length&&(o+="/");for(let f=0;f<c.length;f++){const p=c[f];let m=xa.Segment+(n.sensitive?xa.BonusCaseSensitive:0);if(p.type===Bl.Static)f||(o+="/"),o+=p.value.replace(Rde,"\\$&"),m+=xa.Static;else if(p.type===Bl.Param){const{value:v,repeatable:h,optional:g,regexp:y}=p;r.push({name:v,repeatable:h,optional:g});const b=y||w3;if(Line truncated
`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),a=l.substring(o+1).trim();const s=me.hasOwnProp(t,n);!n||s&&me.hasOwnProp(Kfe,n)||(n==="set-cookie"?s?t[n].push(a):t[n]=[a]:t[n]=s?t[n]+", "+a:a)}),t};function Wfe(e){let t=0,n=e.length;for(;t<n;){const a=e.charCodeAt(t);if(a!==9&&a!==32)break;t+=1}for(;n>t;){const a=e.charCodeAt(n-1);if(a!==9&&a!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const qfe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ufe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Cm(e,t){return me.isArray(e)?e.map(n=>Cm(n,t)):Wfe(String(e).replace(t,""))}const Yfe=e=>Cm(e,qfe),Gfe=e=>Cm(e,Ufe);function eC(e){const t=Object.create(null);return me.forEach(e.toJSON(),(n,a)=>{t[a]=Gfe(n)}),t}const R3=Symbol("internals");function zi(e){return e&&String(e).trim().toLowerCase()}function wd(e){return e===!1||e==null?e:me.isArray(e)?e.map(wd):Yfe(String(e))}function Xfe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const Jfe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function wp(e){let t=0,n=e.length;for(;t<n;){const a=e.charCodeAt(t);if(a!==9&&a!==32)break;t+=1}for(;n>t;){const a=e.charCodeAt(n-1);if(a!==9&&a!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Zfe(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let a=1;a<t;a++){const o=e.charCodeAt(a);if(o===34||o===92&&(a+=1,a>=t))return e;n+=e[a]}return n}function Qfe(e){const t=Object.create(null),n=String(e);let a=0,o=!1,r=!1;function l(s){const u=wp(n.slice(a,s)),c=u.indexOf("=");if(c<1)return;const d=wp(u.slice(0,c));if(!Jfe.test(d))return;const f=d.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=wp(u.slice(c+1));t[f]=Zfe(p)}for(let s=0;s<n.length;s++){const u=n.charCodeAt(s);o?r?r=!1:u===92?r=!0:u===34&&(o=!1):u===34?o=!0:(u===44||u===59)&&(l(s),a=s+1)}return l(n.length),t}const e0e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _p(e,t,n,a,o){if(me.isFunction(a))return a.call(this,t,n);if(o&&(t=n),!!me.isString(t)){if(me.isString(a))return t.indexOf(a)!==-1;if(me.isRegExp(a))return a.test(t)}}function t0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function n0e(e,t){const n=me.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{__proto__:null,value:function(o,r,l){return this[a].call(this,t,o,r,l)},configurable:!0})})}let ga=class{constructor(t){t&&this.set(t)}set(t,n,a){const o=this;function r(s,u,c){const d=zi(u);if(!d)return;const f=me.findKey(o,d);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||u]=wd(s))}const l=(s,u)=>me.forEach(s,(c,d)=>r(c,d,u));if(me.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(me.isString(t)&&(t=t.trim())&&!e0e(t))l(jfe(t),n);else if(me.isObject(t)&&me.isSafeIterable(t)){let s=Object.create(null),u,c;for(const d of t){if(!me.isArray(d))throw new TypeError("Object iterator must return a key-value pair");c=d[0],me.hasOwnProp(s,c)?(u=s[c],s[c]=me.isArray(u)?[...u,d[1]]:[u,d[1]]):s[c]=d[1]}l(s,n)}else t!=null&&r(n,t,a);return this}get(t,n){if(t=zi(t),t){const a=me.findKey(this,t);if(a){const o=this[a];if(!n)return o;if(n===!0)return Xfe(o);if(me.isFunction(n))return n.call(this,o,a);if(me.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zi(t),t){const a=me.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||_p(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let o=!1;function r(l){if(l=zi(l),l){const s=me.findKey(a,l);s&&(!n||_p(a,a[s],s,n))&&(delete a[s],o=!0)}}return me.isArray(t)?t.forEach(r):r(t),o}clear(t){const n=Object.keys(this);let a=n.length,o=!1;for(;a--;){const r=n[a];(!t||_p(this,this[r],r,t,!0))&&(delete this[r],o=!0)}return o}normalize(t){const n=this,a={};return me.forEach(this,(o,r)=>{const l=me.findKey(a,r);if(l){n[l]=wd(o),delete n[r];return}const s=t?t0e(r):String(r).trim();s!==r&&delete n[r],n[s]=wd(o),a[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return me.forEach(this,(a,o)=>{a!=null&&a!==!1&&(n[o]=t&&me.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){const t=this.get("set-cookie");return me.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Qfe(t)}static concat(t,...n){const a=new this(t);return n.forEach(o=>a.set(o)),a}static accessor(t){const a=(this[R3]=this[R3]={accessors:{}}).accessors,o=this.prototype;function r(l){const s=zi(l);a[s]||(n0e(o,l),a[s]=!0)}return me.isArray(t)?t.forEach(r):r(t),this}};ga.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(ga.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});me.freezeMethods(ga);const cf="[REDACTED ****]";function a0e(e){if(me.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(me.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function o0e(e,t){const n=new Set(t.map(r=>String(r).toLowerCase())),a=[],o=r=>{if(r===null||typeof r!="object"||me.isBuffer(r))return r;if(a.indexOf(r)!==-1)return;r instanceof ga&&(r=r.toJSON()),a.push(r);let l;if(me.isArray(r))l=[],r.forEach((s,u)=>{const c=o(s);me.isUndefined(c)||(l[u]=c)});else{if(!me.isPlainObject(r)&&a0e(r))return a.pop(),r;l=Object.create(null);for(const[s,u]of Object.entries(r)){const c=n.has(s.toLowerCase())?cf:o(u);me.isUndefined(c)||(l[s]=c)}}return a.pop(),l};return o(e)}function P3(e){try{return String(e)}catch{return""}}function r0e(e){return e.errors.map(n=>{try{return n&&n.message?P3(n.message):P3(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let pt=class tC extends Error{static from(t,n,a,o,r,l){let s=t.message;!s&&me.isArray(t.errors)&&t.errors.length&&(s=r0e(t));const u=new tC(s,n||t.code,a,o,r);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),l&&Object.assign(u,l),u}constructor(t,n,a,o,r){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),a&&(this.config=a),o&&(this.request=o),r&&(this.response=r,this.status=r.status)}toJSON(){const t=this.config,n=t&&me.hasOwnProp(t,"redact")?t.redact:void 0,a=me.isArray(n)&&n.length>0?o0e(t,n):me.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a,code:this.code,status:this.status}}};pt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pt.ERR_BAD_OPTION="ERR_BAD_OPTION";pt.ECONNABORTED="ECONNABORTED";pt.ETIMEDOUT="ETIMEDOUT";pt.ECONNREFUSED="ECONNREFUSED";pt.ERR_NETWORK="ERR_NETWORK";pt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pt.ERR_DEPRECATED="ERR_DEPRECATED";pt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pt.ERR_CANCELED="ERR_CANCELED";pt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pt.ERR_INVALID_URL="ERR_INVALID_URL";pt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const l0e=null,nC=100;function oh(e){return me.isPlainObject(e)||me.isArray(e)}function aC(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function Cp(e,t,n){return e?e.concat(t).map(function(o,r){return o=aC(o),!n&&r?"["+o+"]":o}).join(n?".":""):t}function s0e(e){return me.isArray(e)&&!e.some(oh)}const i0e=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function b0(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const a=(b,C)=>{const w=me.getSafeProp(n,b);return me.isUndefined(w)?C:w},o=a("metaTokens",!0),r=a("visitor")||h,l=a("dots",!1),s=a("indexes",!1),u=a("Blob")||typeof Blob<"u"&&Blob,c=a("maxDepth",nC),d=u&&me.isSpecCompliantForm(t),f=[];if(!me.isFunction(r))throw new TypeError("visitor must be a function");function p(b){if(b===null)return"";if(me.isDate(b))return b.toISOString();if(me.isBoolean(b))return b.toString();if(!d&&me.isBlob(b))throw new pt("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(b)||me.isTypedArray(b)){if(d&&typeof u=="function")return new u([b]);throw new pt("Blob is not supported. Use a Buffer instead.",pt.ERR_NOT_SUPPORT)}return b}function m(b){if(b>c)throw new pt("Object is too deeply nested ("+b+" levels). Max depth: "+c,pt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function v(b,C){if(c===1/0)return JSON.stringify(b);const w=[];return JSON.stringify(b,function(k,M){if(!me.isObject(M))return M;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(M),m(C+w.length-1),M})}function h(b,C,w){let S=b;if(me.isReactNative(t)&&me.isReactNativeBlob(b))return t.append(Cp(w,C,l),p(b)),!1;if(b&&!w&&typeof b=="object"){if(me.endsWith(C,"{}"))C=o?C:C.slice(0,-2),b=v(b,1);else if(me.isArray(b)&&s0e(b)||(me.isFileList(b)||me.endsWith(C,"[]"))&&(S=me.toArray(b)))return C=aC( Line truncated
`+l.map(U3).join(`
`):" "+U3(l[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+s,pt.ERR_NOT_SUPPORT)}return o}const gC={getAdapter:tpe,adapters:Tm};function kp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xc(null,e)}function Ep(e){const t=me.toSafeFlatObject(e);return kp(t),t.headers=ga.from(me.getSafeProp(t,"headers")),t.data=Sp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),gC.getAdapter(t.adapter||Sc.adapter,t)(t).then(function(o){kp(t),t.response=o;try{o.data=Sp.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=ga.from(o.headers),o},function(o){if(!cC(o)&&(kp(t),o&&o.response)){t.response=o.response;try{o.response.data=Sp.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=ga.from(o.response.headers)}return Promise.reject(o)})}const w0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{w0[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const Y3={};w0.transitional=function(t,n,a){function o(r,l){return"[Axios v"+Em+"] Transitional option '"+r+"'"+l+(a?". "+a:"")}return(r,l,s)=>{if(t===!1)throw new pt(o(l," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!Y3[l]&&(Y3[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(r,l,s):!0}};w0.spelling=function(t){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function npe(e,t,n){if(typeof e!="object"||e===null)throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const r=a[o],l=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(l){const s=e[r],u=s===void 0||l(s,r,e);if(u!==!0)throw new pt("option "+r+" must be "+u,pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pt("Unknown option "+r,pt.ERR_BAD_OPTION)}}const _d={assertOptions:npe,validators:w0},ca=_d.validators;let Yl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new I3,response:new I3}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const r=o.stack;let l="";if(typeof r=="string"){const s=r.indexOf(`
`);l=s===-1?"":r.slice(s+1)}if(!a.stack)a.stack=l;else if(l){const s=l.indexOf(`
`),u=s===-1?-1:l.indexOf(`
`,s+1),c=u===-1?"":l.slice(u+1);String(a.stack).endsWith(c)||(a.stack+=`
`+l)}}catch{}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cs(this.defaults,n);const{transitional:a,paramsSerializer:o,headers:r}=n;a!==void 0&&_d.assertOptions(a,{silentJSONParsing:ca.transitional(ca.boolean),forcedJSONParsing:ca.transitional(ca.boolean),clarifyTimeoutError:ca.transitional(ca.boolean),legacyInterceptorReqResOrdering:ca.transitional(ca.boolean),advertiseZstdAcceptEncoding:ca.transitional(ca.boolean),validateStatusUndefinedResolves:ca.transitional(ca.boolean)},!1),o!=null&&(me.isFunction(o)?n.paramsSerializer={serialize:o}:_d.assertOptions(o,{encode:ca.function,serialize:ca.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_d.assertOptions(n,{baseUrl:ca.spelling("baseURL"),withXsrfToken:ca.spelling("withXSRFToken")},!0),n.method=(me.getSafeProp(n,"method")||me.getSafeProp(this.defaults,"method")||"get").toLowerCase();let l=r&&me.merge(r.common,r[n.method]);r&&me.forEach(uC.concat("common"),v=>{delete r[v]}),n.headers=ga.concat(l,r);const s=[];let u=!0;this.interceptors.request.forEach(function(h){if(typeof h.runWhen=="function"&&h.runWhen(n)===!1)return;u=u&&h.synchronous;const g=n.transitional||xm;g&&g.legacyInterceptorReqResOrdering?s.unshift(h.fulfilled,h.rejected):s.push(h.fulfilled,h.rejected)});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,f=0,p;if(!u){const v=[Ep.bind(this),void 0];for(v.unshift(...s),v.push(...c),p=v.length,d=Promise.resolve(n);f<p;)d=d.then(v[f++],v[f++]);return d}p=s.length;let m=n;for(;f<p;){const v=s[f++],h=s[f++];try{m=v?v(m):m}catch(g){if(!h){d=Promise.reject(g);break}try{const y=h.call(this,g);me.isThenable(y)&&(d=Promise.resolve(y).then(()=>Ep.call(this,m)))}catch(y){d=Promise.reject(y)}break}}if(!d)try{d=Ep.call(this,m)}catch(v){d=Promise.reject(v)}for(f=0,p=c.length;f<p;)d=d.then(c[f++],c[f++]);return d}getUri(t){t=cs(this.defaults,t);const n=pC(t.baseURL,t.url,t.allowAbsoluteUrls,t);return rC(n,t.params,t.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(t){Yl.prototype[t]=function(n,a){return this.request(cs(a||{},{method:t,url:n,data:a&&me.hasOwnProp(a,"data")?a.data:void 0}))}});me.forEach(["post","put","patch","query"],function(t){function n(a){return function(r,l,s){return this.request(cs(s||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}Yl.prototype[t]=n(),t!=="query"&&(Yl.prototype[t+"Form"]=n(!0))});let ape=class yC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const a=this;this.promise.then(o=>{if(!a._listeners)return;let r=a._listeners.length;for(;r-- >0;)a._listeners[r](o);a._listeners=null}),this.promise.then=o=>{let r;const l=new Promise(s=>{a.subscribe(s),r=s}).then(o);return l.cancel=function(){a.unsubscribe(r)},l},t(function(r,l,s){a.reason||(a.reason=new xc(r,l,s),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=a=>{t.abort(a)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new yC(function(o){t=o}),cancel:t}}};function ope(e){return function(n){return e.apply(null,n)}}function rpe(e){return me.isObject(e)&&e.isAxiosError===!0}const Cd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,Timeou Line truncated
@@ -1 +1 @@
:root{--el-color-white:#fff;--el-color-black:#000;--el-color-primary-rgb:64, 158, 255;--el-color-success-rgb:103, 194, 58;--el-color-warning-rgb:230, 162, 60;--el-color-danger-rgb:245, 108, 108;--el-color-error-rgb:245, 108, 108;--el-color-info-rgb:144, 147, 153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#fff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#fff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#fff;--el-box-shadow:0px 12px 32px 4px #0000000a, 0px 8px 20px #00000014;--el-box-shadow-light:0px 0px 12px #0000001f;--el-box-shadow-lighter:0px 0px 6px #0000001f;--el-box-shadow-dark:0px 16px 48px 16px #00000014, 0px 12px 32px #0000001f, 0px 8px 16px -8px #00000029;--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:#000c;--el-overlay-color-light:#000000b3;--el-overlay-color-lighter:#00000080;--el-mask-color:#ffffffe6;--el-mask-color-extra-light:#ffffff4d;--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-Line truncated :root{--el-color-white:#fff;--el-color-black:#000;--el-color-primary-rgb:64, 158, 255;--el-color-success-rgb:103, 194, 58;--el-color-warning-rgb:230, 162, 60;--el-color-danger-rgb:245, 108, 108;--el-color-error-rgb:245, 108, 108;--el-color-info-rgb:144, 147, 153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#fff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#fff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#fff;--el-box-shadow:0px 12px 32px 4px #0000000a, 0px 8px 20px #00000014;--el-box-shadow-light:0px 0px 12px #0000001f;--el-box-shadow-lighter:0px 0px 6px #0000001f;--el-box-shadow-dark:0px 16px 48px 16px #00000014, 0px 12px 32px #0000001f, 0px 8px 16px -8px #00000029;--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:#000c;--el-overlay-color-light:#000000b3;--el-overlay-color-lighter:#00000080;--el-mask-color:#ffffffe6;--el-mask-color-extra-light:#ffffff4d;--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-Line truncated
+1
View File
@@ -0,0 +1 @@
import{L as t}from"./index-DU2fjqYh.js";const u={list:()=>t.get("/payees"),ownActive:()=>t.get("/metadata/payees"),eligibleUsers:()=>t.get("/payees/eligible-users"),create:e=>t.post("/payees",e),update:(e,s)=>t.put(`/payees/${e}`,s),deactivate:e=>t.delete(`/payees/${e}`),listSubjects:()=>t.get("/payees/subjects"),createSubject:e=>t.post("/payees/subjects",e),updateSubject:(e,s)=>t.put(`/payees/subjects/${e}`,s),deactivateSubject:e=>t.delete(`/payees/subjects/${e}`),listSubjectAccounts:e=>t.get(`/payees/subjects/${e}/accounts`),createSubjectAccount:(e,s)=>t.post(`/payees/subjects/${e}/accounts`,s),updateSubjectAccount:(e,s,c)=>t.put(`/payees/subjects/${e}/accounts/${s}`,c),setDefaultSubjectAccount:(e,s)=>t.put(`/payees/subjects/${e}/accounts/${s}/default`),deactivateSubjectAccount:(e,s)=>t.delete(`/payees/subjects/${e}/accounts/${s}`)};export{u as p};
+1
View File
@@ -0,0 +1 @@
const o=(r,t)=>{const a=String(r??"").trim().toLocaleLowerCase();return a?t.filter(e=>e.readable).flatMap(e=>e.values).some(e=>String(e??"").toLocaleLowerCase().includes(a)):!0};export{o as m};
-1
View File
@@ -1 +0,0 @@
import{d as v,c as z,b as f,t as b,k as h,y as l,B as P,j as y,w as g,r as S,T as _}from"./index-CXCTlxVW.js";const L=["aria-label"],E={class:"app-list-pagination__summary","aria-live":"polite"},I=v({__name:"AppListPagination",props:{page:{},pageSize:{},total:{},disabled:{type:Boolean,default:!1},ariaLabel:{default:"列表分页"},pageSizes:{default:()=>[10,20,50]}},emits:["update:page","update:pageSize"],setup(n,{emit:i}){const e=n,o=i,s=l({get:()=>e.page,set:a=>o("update:page",a)}),u=l({get:()=>e.pageSize,set:a=>o("update:pageSize",a)}),r=l(()=>{if(!e.total)return"共 0 条";const a=(e.page-1)*e.pageSize+1,t=Math.min(e.total,e.page*e.pageSize);return`第 ${a}–${t} 条,共 ${e.total} 条`});return(a,t)=>{const p=P("el-pagination");return y(),z("nav",{class:"app-list-pagination","aria-label":n.ariaLabel},[f("p",E,b(r.value),1),h(p,{"current-page":s.value,"onUpdate:currentPage":t[0]||(t[0]=c=>s.value=c),"page-size":u.value,"onUpdate:pageSize":t[1]||(t[1]=c=>u.value=c),"page-sizes":n.pageSizes,total:n.total,disabled:n.disabled,"pager-count":5,layout:"sizes, prev, pager, next, jumper",small:"",background:""},null,8,["current-page","page-size","page-sizes","total","disabled"])],8,L)}}}),M=[10,20,50],x=20;function k(n,i={}){var d;const e=S(1),o=Number(i.initialPageSize),s=S(M.includes(o)?o:x),u=l(()=>_(n)||[]),r=l(()=>u.value.length),a=l(()=>Math.max(1,Math.ceil(r.value/s.value))),t=()=>{e.value=Math.min(Math.max(1,Math.trunc(Number(e.value)||1)),a.value)},p=()=>{e.value=1},c=l(()=>{const m=(e.value-1)*s.value;return u.value.slice(m,m+s.value)});return g(s,p,{flush:"sync"}),g(r,t,{flush:"sync"}),(d=i.resetSources)!=null&&d.length&&g(i.resetSources,p,{flush:"sync"}),{page:e,pageSize:s,total:r,totalPages:a,paginatedItems:c,resetPage:p,clampPage:t}}export{I as _,k as u};
+1
View File
@@ -0,0 +1 @@
import{w as c,B as a,r as v,a5 as f}from"./index-DU2fjqYh.js";const P=[10,20,50],p=20;function I(g,s={}){var h;const e=v(1),l=Number(s.initialPageSize),t=v(P.includes(l)?l:p),o=a(()=>f(g)||[]),u=a(()=>o.value.length),r=a(()=>Math.max(1,Math.ceil(u.value/t.value))),i=()=>{e.value=Math.min(Math.max(1,Math.trunc(Number(e.value)||1)),r.value)},n=()=>{e.value=1},S=a(()=>{const m=(e.value-1)*t.value;return o.value.slice(m,m+t.value)});return c(t,n,{flush:"sync"}),c(u,i,{flush:"sync"}),(h=s.resetSources)!=null&&h.length&&c(s.resetSources,n,{flush:"sync"}),{page:e,pageSize:t,total:u,totalPages:r,paginatedItems:S,resetPage:n,clampPage:i}}export{I as u};
+2 -2
View File
@@ -4,8 +4,8 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>财务系统 - 统一费用支付平台</title> <title>财务系统 - 统一费用支付平台</title>
<script type="module" crossorigin src="/assets/index-CXCTlxVW.js"></script> <script type="module" crossorigin src="/assets/index-DU2fjqYh.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Bvt50oQ6.css"> <link rel="stylesheet" crossorigin href="/assets/index-DVkFAph5.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
+2 -2
View File
@@ -1,11 +1,11 @@
{ {
"name": "finance-system-frontend", "name": "financial_system_frontend",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "finance-system-frontend", "name": "financial_system_frontend",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.0", "@element-plus/icons-vue": "^2.3.0",
+2 -1
View File
@@ -1,11 +1,12 @@
{ {
"name": "finance-system-frontend", "name": "financial_system_frontend",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"build:artifact": "node scripts/build-artifact.mjs",
"test": "vitest", "test": "vitest",
"preview": "vite preview" "preview": "vite preview"
}, },
+250
View File
@@ -0,0 +1,250 @@
import { createHash } from 'node:crypto'
import {
existsSync,
lstatSync,
readFileSync,
readdirSync,
realpathSync,
statSync,
writeFileSync,
} from 'node:fs'
import path from 'node:path'
export const ARTIFACT_MANIFEST_FILENAME = 'artifact-manifest.json'
export const SOURCE_INPUTS = [
'src',
'scripts',
'public',
'index.html',
'package.json',
'package-lock.json',
'vite.config.ts',
'tsconfig.json',
'tsconfig.node.json',
'postcss.config.js',
'tailwind.config.js',
]
function isWithin(root, candidate) {
const relative = path.relative(root, candidate)
return relative === '' || (!relative.startsWith(`..${path.sep}`) && relative !== '..' && !path.isAbsolute(relative))
}
function canonicalizeCandidate(candidate) {
let existingAncestor = path.resolve(candidate)
const missingSegments = []
while (!existsSync(existingAncestor)) {
const parent = path.dirname(existingAncestor)
if (parent === existingAncestor) {
break
}
missingSegments.unshift(path.basename(existingAncestor))
existingAncestor = parent
}
const canonicalAncestor = existsSync(existingAncestor)
? realpathSync.native(existingAncestor)
: existingAncestor
return path.resolve(canonicalAncestor, ...missingSegments)
}
export function parseArtifactOutDir(argv) {
let outDir
for (let index = 0; index < argv.length; index += 1) {
const argument = argv[index]
if (argument === '--outDir') {
if (outDir !== undefined || index + 1 >= argv.length || argv[index + 1].startsWith('--')) {
throw new Error('Exactly one non-empty --outDir value is required')
}
outDir = argv[index + 1]
index += 1
continue
}
if (argument.startsWith('--outDir=')) {
if (outDir !== undefined) {
throw new Error('Exactly one non-empty --outDir value is required')
}
outDir = argument.slice('--outDir='.length)
continue
}
throw new Error(`Unsupported build:artifact argument: ${argument}`)
}
if (!outDir || outDir.trim() === '') {
throw new Error('A non-empty --outDir is required; release artifacts must not use financial_system_frontend/dist')
}
return outDir
}
export function resolveArtifactOutDir(rawOutDir, {
cwd,
frontendRoot,
repoRoot,
ciArtifactRoot,
}) {
const resolvedFrontendRoot = canonicalizeCandidate(frontendRoot)
const resolvedRepoRoot = canonicalizeCandidate(repoRoot)
const target = canonicalizeCandidate(path.resolve(cwd, rawOutDir))
const filesystemRoot = path.parse(target).root
if (target === filesystemRoot) {
throw new Error('Artifact output cannot be a filesystem root')
}
const frontendDist = canonicalizeCandidate(path.join(resolvedFrontendRoot, 'dist'))
if (isWithin(frontendDist, target)) {
throw new Error('Artifact output cannot be financial_system_frontend/dist or any path below it')
}
if (!isWithin(resolvedRepoRoot, target)) {
return target
}
if (!ciArtifactRoot || ciArtifactRoot.trim() === '') {
throw new Error('Artifact output inside the repository requires an explicit CI_ARTIFACT_DIR')
}
const resolvedCiRoot = canonicalizeCandidate(path.resolve(cwd, ciArtifactRoot))
const protectedRoots = [
path.join(resolvedRepoRoot, '.git'),
path.join(resolvedFrontendRoot, 'src'),
path.join(resolvedFrontendRoot, 'scripts'),
path.join(resolvedFrontendRoot, 'public'),
path.join(resolvedFrontendRoot, 'dist'),
].map(canonicalizeCandidate)
if (!isWithin(resolvedRepoRoot, resolvedCiRoot)
|| protectedRoots.some((protectedRoot) => isWithin(protectedRoot, resolvedCiRoot))) {
throw new Error('CI_ARTIFACT_DIR must be a dedicated, unprotected directory inside the repository')
}
if (!isWithin(resolvedCiRoot, target)) {
throw new Error('Artifact output must stay within CI_ARTIFACT_DIR')
}
return target
}
export function assertArtifactDirectoryReady(outDir) {
if (!existsSync(outDir)) {
return
}
if (!statSync(outDir).isDirectory()) {
throw new Error(`Artifact output already exists and is not a directory: ${outDir}`)
}
if (readdirSync(outDir).length > 0) {
throw new Error(`Artifact output directory must be empty: ${outDir}`)
}
}
export function sha256File(filePath) {
return createHash('sha256').update(readFileSync(filePath)).digest('hex')
}
function collectFiles(directory, relativeDirectory = '') {
const files = []
const absoluteDirectory = path.join(directory, relativeDirectory)
for (const entry of readdirSync(absoluteDirectory, { withFileTypes: true })) {
const relativePath = path.join(relativeDirectory, entry.name)
const absolutePath = path.join(directory, relativePath)
const fileInfo = lstatSync(absolutePath)
if (fileInfo.isSymbolicLink()) {
throw new Error(`Artifact output must not contain symbolic links: ${relativePath}`)
}
if (fileInfo.isDirectory()) {
files.push(...collectFiles(directory, relativePath))
continue
}
if (!fileInfo.isFile()) {
throw new Error(`Artifact output contains an unsupported entry: ${relativePath}`)
}
if (relativeDirectory === '' && entry.name === ARTIFACT_MANIFEST_FILENAME) {
continue
}
files.push({
path: relativePath.split(path.sep).join('/'),
sha256: sha256File(absolutePath),
size: fileInfo.size,
})
}
return files
}
function collectSourcePath(frontendRoot, relativePath) {
const absolutePath = path.join(frontendRoot, relativePath)
if (!existsSync(absolutePath)) return []
const info = lstatSync(absolutePath)
if (info.isSymbolicLink()) throw new Error(`Source input must not be a symbolic link: ${relativePath}`)
if (info.isDirectory()) {
return readdirSync(absolutePath, { withFileTypes: true })
.flatMap(entry => collectSourcePath(frontendRoot, path.join(relativePath, entry.name)))
}
if (!info.isFile()) throw new Error(`Source input is not a regular file: ${relativePath}`)
return [{
path: `financial_system_frontend/${relativePath.split(path.sep).join('/')}`,
sha256: sha256File(absolutePath),
size: info.size,
}]
}
export function collectSourceInputs(frontendRoot, inputs = SOURCE_INPUTS) {
return inputs.flatMap(relativePath => collectSourcePath(frontendRoot, relativePath))
.sort((left, right) => left.path === right.path ? 0 : left.path < right.path ? -1 : 1)
}
export function sourceTreeSha256(files) {
const canonical = files.map(file => `${file.path}\0${file.size}\0${file.sha256}\n`).join('')
return createHash('sha256').update(canonical, 'utf8').digest('hex')
}
export const gitStatusIsDirty = (porcelainOutput) => porcelainOutput.trim().length > 0
export function createArtifactManifest({
outDir,
packageLockPath,
sourceRevision,
buildUtc,
nodeVersion,
npmVersion,
sourceDirty,
sourceFiles,
}) {
const normalizedRevision = sourceRevision?.trim()
if (!normalizedRevision) {
throw new Error('A source revision is required for a release artifact')
}
return {
schemaVersion: 1,
sourceRevision: normalizedRevision,
source: {
dirty: sourceDirty === true,
treeSha256: sourceTreeSha256(sourceFiles),
files: sourceFiles,
},
packageLock: {
path: 'financial_system_frontend/package-lock.json',
sha256: sha256File(packageLockPath),
},
build: {
utc: buildUtc,
nodeVersion,
npmVersion,
},
files: collectFiles(outDir).sort((left, right) => {
if (left.path === right.path) return 0
return left.path < right.path ? -1 : 1
}),
}
}
export function serializeArtifactManifest(manifest) {
return `${JSON.stringify(manifest, null, 2)}\n`
}
export function writeArtifactManifest(outDir, manifest) {
const manifestPath = path.join(outDir, ARTIFACT_MANIFEST_FILENAME)
writeFileSync(manifestPath, serializeArtifactManifest(manifest), { encoding: 'utf8', flag: 'wx' })
return manifestPath
}
+107
View File
@@ -0,0 +1,107 @@
import { spawnSync } from 'node:child_process'
import { existsSync } from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import {
assertArtifactDirectoryReady,
collectSourceInputs,
createArtifactManifest,
gitStatusIsDirty,
parseArtifactOutDir,
resolveArtifactOutDir,
writeArtifactManifest,
} from './artifact-manifest.mjs'
const scriptPath = fileURLToPath(import.meta.url)
const frontendRoot = path.resolve(path.dirname(scriptPath), '..')
// The frontend is an independent Git repository after the workspace split.
const repoRoot = frontendRoot
function commandOutput(command, args, cwd) {
const result = spawnSync(command, args, {
cwd,
encoding: 'utf8',
windowsHide: true,
})
if (result.status !== 0) {
const detail = result.stderr?.trim() || result.error?.message || `${command} exited with status ${result.status}`
throw new Error(detail)
}
return result.stdout.trim()
}
function resolveSourceRevision() {
const configuredRevision = process.env.RELEASE_SOURCE_REVISION?.trim()
return configuredRevision || commandOutput('git', ['rev-parse', 'HEAD'], repoRoot)
}
function resolveNpmVersion() {
const userAgentMatch = process.env.npm_config_user_agent?.match(/(?:^|\s)npm\/([^\s]+)/)
if (userAgentMatch) {
return userAgentMatch[1]
}
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm'
return commandOutput(npmCommand, ['--version'], frontendRoot)
}
function runViteBuild(outDir) {
const viteEntry = path.join(frontendRoot, 'node_modules', 'vite', 'bin', 'vite.js')
if (!existsSync(viteEntry)) {
throw new Error('Vite is not installed; run npm ci before build:artifact')
}
const result = spawnSync(
process.execPath,
[viteEntry, 'build', '--outDir', outDir],
{
cwd: frontendRoot,
env: { ...process.env, NODE_ENV: 'production' },
stdio: 'inherit',
windowsHide: true,
},
)
if (result.status !== 0) {
throw new Error(result.error?.message || `Vite build exited with status ${result.status}`)
}
}
export function buildArtifact(argv = process.argv.slice(2)) {
const rawOutDir = parseArtifactOutDir(argv)
const outDir = resolveArtifactOutDir(rawOutDir, {
cwd: process.cwd(),
frontendRoot,
repoRoot,
ciArtifactRoot: process.env.CI_ARTIFACT_DIR,
})
assertArtifactDirectoryReady(outDir)
const sourceRevision = resolveSourceRevision()
const sourceDirty = gitStatusIsDirty(commandOutput('git', ['status', '--porcelain=v1', '--untracked-files=all'], repoRoot))
const sourceFiles = collectSourceInputs(frontendRoot)
const npmVersion = resolveNpmVersion()
runViteBuild(outDir)
const manifest = createArtifactManifest({
outDir,
packageLockPath: path.join(frontendRoot, 'package-lock.json'),
sourceRevision,
buildUtc: new Date().toISOString(),
nodeVersion: process.version,
npmVersion,
sourceDirty,
sourceFiles,
})
const manifestPath = writeArtifactManifest(outDir, manifest)
process.stdout.write(`[build:artifact] artifact: ${outDir}\n`)
process.stdout.write(`[build:artifact] manifest: ${manifestPath}\n`)
}
if (process.argv[1] && path.resolve(process.argv[1]) === scriptPath) {
try {
buildArtifact()
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
process.stderr.write(`[build:artifact] ${message}\n`)
process.exitCode = 1
}
}
+2 -3
View File
@@ -18,7 +18,6 @@ import { useUserStore } from '@/store/user'
import { useWorkbenchStore } from '@/store/workbench' import { useWorkbenchStore } from '@/store/workbench'
import { import {
AUTH_DAY_KEY, AUTH_DAY_KEY,
DEMO_SESSION_TOKEN,
TOKEN_KEY, TOKEN_KEY,
USER_INFO_KEY, USER_INFO_KEY,
getBusinessDay, getBusinessDay,
@@ -74,7 +73,7 @@ const handleStorage = (event: StorageEvent) => {
return return
} }
workbench.reset() workbench.reset()
if (router.currentRoute.value.path !== '/login') void router.replace('/dashboard') if (router.currentRoute.value.path !== '/login') void router.replace('/applications')
}, 0) }, 0)
} }
@@ -83,7 +82,7 @@ const initApp = async () => {
if (!checkDailySession()) return if (!checkDailySession()) return
const token = userStore.token const token = userStore.token
if (token && token !== DEMO_SESSION_TOKEN) { if (token) {
try { try {
await userStore.fetchUserInfo() await userStore.fetchUserInfo()
} catch { } catch {
+87
View File
@@ -0,0 +1,87 @@
const FOCUSABLE_SELECTOR = [
'a[href]',
'button',
'input',
'select',
'textarea',
'summary',
'iframe',
'object',
'embed',
'audio[controls]',
'video[controls]',
'[contenteditable="true"]',
'[tabindex]',
].join(',')
export type TabbableState = {
tabIndex: number
hidden: boolean
disabled: boolean
ariaHidden: boolean
ariaDisabled: boolean
display: string
visibility: string
rendered: boolean
}
export const isTabbableState = (state: TabbableState) => (
state.tabIndex >= 0
&& !state.hidden
&& !state.disabled
&& !state.ariaHidden
&& !state.ariaDisabled
&& state.display !== 'none'
&& state.visibility !== 'hidden'
&& state.rendered
)
export const resolveFocusTrapIndex = (currentIndex: number, itemCount: number, backwards: boolean) => {
if (itemCount <= 0) return -1
if (currentIndex < 0) return backwards ? itemCount - 1 : 0
return backwards
? (currentIndex - 1 + itemCount) % itemCount
: (currentIndex + 1) % itemCount
}
const isTabbableElement = (element: HTMLElement) => {
const view = element.ownerDocument.defaultView
const style = view?.getComputedStyle(element)
return isTabbableState({
tabIndex: element.tabIndex,
hidden: element.hidden,
disabled: element.hasAttribute('disabled'),
ariaHidden: element.getAttribute('aria-hidden') === 'true',
ariaDisabled: element.getAttribute('aria-disabled') === 'true',
display: style?.display || '',
visibility: style?.visibility || '',
rendered: element.getClientRects().length > 0,
})
}
export const visibleTabbableElements = (container: HTMLElement) => (
Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(isTabbableElement)
)
export const focusFirstTabbable = (container: HTMLElement) => {
const first = visibleTabbableElements(container)[0]
;(first || container).focus()
}
export const trapTabFocus = (container: HTMLElement, event: KeyboardEvent) => {
if (event.key !== 'Tab') return false
const items = visibleTabbableElements(container)
event.preventDefault()
if (!items.length) {
container.focus()
return true
}
const active = container.ownerDocument.activeElement
const currentIndex = active instanceof HTMLElement && container.contains(active)
? items.indexOf(active)
: -1
items[resolveFocusTrapIndex(currentIndex, items.length, event.shiftKey)]?.focus()
return true
}
+48 -2
View File
@@ -3,6 +3,14 @@ import request from './request'
export type Status = 'ACTIVE' | 'INACTIVE' export type Status = 'ACTIVE' | 'INACTIVE'
export type PermissionAccess = 'HIDDEN' | 'READ' | 'EDIT' export type PermissionAccess = 'HIDDEN' | 'READ' | 'EDIT'
export interface ManagedUser {
id: number
employeeNo?: string | null
realName: string
departmentName?: string | null
status: Status | string
}
export interface Role { export interface Role {
id: number id: number
roleCode: string roleCode: string
@@ -10,6 +18,8 @@ export interface Role {
description?: string description?: string
status: Status | string status: Status | string
builtIn: boolean builtIn: boolean
/** Higher tiers grant more authority; 100 is reserved for super administrators. */
privilegeTier?: number
memberCount?: number memberCount?: number
permissionCount?: number permissionCount?: number
} }
@@ -22,8 +32,12 @@ export interface PermissionItem {
/** ACTION and legacy BUTTON both represent editable operations. Unknown values remain accepted for compatibility. */ /** ACTION and legacy BUTTON both represent editable operations. Unknown values remain accepted for compatibility. */
type: 'MODULE' | 'PAGE' | 'MENU' | 'FIELD' | 'ACTION' | 'BUTTON' | (string & {}) type: 'MODULE' | 'PAGE' | 'MENU' | 'FIELD' | 'ACTION' | 'BUTTON' | (string & {})
parentCode?: string parentCode?: string
layer?: 'MENU' | 'PAGE' | 'LIST_FIELD' | 'FORM_FIELD' | 'BUTTON' | 'DIALOG' | 'DIALOG_FIELD' | 'DIALOG_ACTION' | 'COMPAT' | (string & {})
sortOrder?: number
resource?: string resource?: string
defaultAccess?: PermissionAccess defaultAccess?: PermissionAccess
delegable?: boolean
riskLevel?: 'NORMAL' | 'HIGH' | 'CRITICAL' | (string & {})
} }
export interface RolePermissions { export interface RolePermissions {
@@ -37,6 +51,28 @@ export interface UpdateRolePermissionsPayload extends RolePermissions {
expectedPermissionAccess: Record<string, PermissionAccess> expectedPermissionAccess: Record<string, PermissionAccess>
} }
export interface RoleAuthorizationProfile {
roleId: number
version: number
catalogVersion: number
permissionAccess: Record<string, PermissionAccess>
derivedSummary: RoleAuthorizationSummary
}
export interface UpdateRoleAuthorizationProfilePayload {
expectedVersion: number
catalogVersion: number
permissionAccess: Record<string, PermissionAccess>
}
export interface RoleAuthorizationSummary {
derivedCount: number
systemCount: number
legacyCount: number
riskCounts: Record<string, number>
scopeCounts: Record<string, number>
}
export interface UserGroup { export interface UserGroup {
id: number id: number
groupCode: string groupCode: string
@@ -54,8 +90,8 @@ export interface UserGroup {
export type UserGroupPayload = Pick<UserGroup, 'groupCode' | 'groupName' | 'description' | 'status'> export type UserGroupPayload = Pick<UserGroup, 'groupCode' | 'groupName' | 'description' | 'status'>
export interface DirectoryIdentity { export interface DirectoryIdentity {
/** Identity alias for the directory's currentRevision. */ /** Revision of the published directory snapshot. */
generationId: string revision: string
openId: string openId: string
/** Legacy identity hint. Directory v1 identities are keyed by openId. */ /** Legacy identity hint. Directory v1 identities are keyed by openId. */
userId?: string | null userId?: string | null
@@ -222,6 +258,9 @@ export interface KingdeePrepareTableResult {
} }
export const adminApi = { export const adminApi = {
listUsers: (): Promise<ManagedUser[]> => request.get('/users'),
updateUserStatus: (id: number, status: Status): Promise<ManagedUser> =>
request.put(`/users/${id}/status`, { status }),
listRoles: (): Promise<Role[]> => request.get('/roles'), listRoles: (): Promise<Role[]> => request.get('/roles'),
createRole: (body: RolePayload): Promise<Role> => createRole: (body: RolePayload): Promise<Role> =>
request.post('/roles', body), request.post('/roles', body),
@@ -232,8 +271,15 @@ export const adminApi = {
getRolePermissions: (id: number): Promise<RolePermissions> => request.get(`/roles/${id}/permissions`), getRolePermissions: (id: number): Promise<RolePermissions> => request.get(`/roles/${id}/permissions`),
updateRolePermissions: (id: number, body: UpdateRolePermissionsPayload): Promise<void> => updateRolePermissions: (id: number, body: UpdateRolePermissionsPayload): Promise<void> =>
request.put(`/roles/${id}/permissions`, body), request.put(`/roles/${id}/permissions`, body),
getRoleAuthorizationProfile: (id: number): Promise<RoleAuthorizationProfile> =>
request.get(`/roles/${id}/authorization-profile`),
updateRoleAuthorizationProfile: (id: number, body: UpdateRoleAuthorizationProfilePayload): Promise<RoleAuthorizationProfile> =>
request.put(`/roles/${id}/authorization-profile`, body, { suppressErrorNotification: true }),
listGroups: (): Promise<UserGroup[]> => request.get('/user-groups'), listGroups: (): Promise<UserGroup[]> => request.get('/user-groups'),
getRoleGroups: (id: number): Promise<{ groupIds: number[] }> => request.get(`/roles/${id}/groups`),
updateRoleGroups: (id: number, body: { groupIds: number[]; expectedGroupIds: number[] }): Promise<void> =>
request.put(`/roles/${id}/groups`, body, { suppressErrorNotification: true }),
createGroup: (body: UserGroupPayload): Promise<UserGroup> => createGroup: (body: UserGroupPayload): Promise<UserGroup> =>
request.post('/user-groups', body), request.post('/user-groups', body),
updateGroup: (id: number, body: UserGroupPayload): Promise<UserGroup> => updateGroup: (id: number, body: UserGroupPayload): Promise<UserGroup> =>
+4 -2
View File
@@ -2,6 +2,7 @@ import request from './request'
export interface UserProfile { export interface UserProfile {
id: number id: number
feishuOpenId?: string | null
employeeNo: string employeeNo: string
realName: string realName: string
avatarUrl: string avatarUrl: string
@@ -25,9 +26,10 @@ export interface LoginResponse {
export const authApi = { export const authApi = {
feishuLogin: (code: string, state?: string): Promise<LoginResponse> => feishuLogin: (code: string, state?: string): Promise<LoginResponse> =>
request.post('/auth/feishu-login', { code, state }), request.post('/auth/feishu-login', { code, state }, { suppressErrorNotification: true }),
getAuthUrl: (): Promise<{ authUrl: string }> => request.get('/feishu/auth-url'), getAuthUrl: (origin: string): Promise<{ authUrl: string }> =>
request.get('/feishu/auth-url', { params: { origin }, suppressErrorNotification: true }),
getUserInfo: (): Promise<UserProfile> => getUserInfo: (): Promise<UserProfile> =>
request.get('/auth/me'), request.get('/auth/me'),
+60
View File
@@ -0,0 +1,60 @@
import request from './request'
/** Internal compatibility types; no user-facing policy management API is exported. */
export type PolicyEffect = 'ALLOW' | 'DENY'
export type DataScope = 'SELF' | 'CURRENT_APPROVER' | 'DEPARTMENT' | 'DEPARTMENT_TREE' | 'ALL'
export type FieldAccess = 'HIDDEN' | 'MASKED' | 'READ' | 'EDIT'
export type PolicyRiskLevel = 'NORMAL' | 'HIGH' | 'CRITICAL'
export interface AuthorizationPolicy {
id: number
policyCode: string
resource: string
action: string
effect: PolicyEffect
dataScope: DataScope
scopeParameter?: string | null
priority: number
enabled: boolean
version: number
fieldAccess: Record<string, FieldAccess>
riskLevel?: PolicyRiskLevel
delegable?: boolean
protectedPolicy?: boolean
}
export interface CapabilityResponse {
capabilities: string[]
source: string
auditAccess?: string[]
auditSecurity?: string[]
auditBusiness?: string[]
auditIntegration?: string[]
financeActions?: string[]
}
export interface AuthorizationDecisionRequest {
resource: string
action: string
resourceId?: string
ownerId?: number
currentApproverId?: number
departmentId?: number
organizationId?: number
}
export interface AuthorizationDecision {
allowed: boolean
reasonCode: string
matchedPolicyIds: number[]
resolvedScope: DataScope | null
fieldAccess: Record<string, FieldAccess>
policyVersion: number
}
export const authorizationApi = {
capabilities: (): Promise<CapabilityResponse> => request.get('/authorization/capabilities'),
decision: (body: AuthorizationDecisionRequest): Promise<AuthorizationDecision> =>
request.post('/authorization/decision', body),
deleteBinding: (id: number): Promise<void> => request.delete(`/authorization/bindings/${id}`),
}
+193
View File
@@ -0,0 +1,193 @@
import request from "@/api/request";
export type Status = "ACTIVE" | "INACTIVE";
export type MasterResource =
| "legal-entities"
| "cost-centers"
| "currencies"
| "payment-methods"
| "payment-accounts";
export interface LegalEntity {
id: number;
code: string;
name: string;
creditCode: string;
status: Status;
}
export interface CostCenter {
id: number;
code: string;
name: string;
legalEntityId: number;
legalEntityName: string;
managerName: string;
status: Status;
}
export interface Currency {
id: number;
code: string;
name: string;
symbol: string;
decimalPlaces: number;
status: Status;
}
export interface PaymentMethod {
id: number;
code: string;
name: string;
description: string;
status: Status;
}
export interface PaymentMethodOption {
id: number;
code: string;
name: string;
}
export interface PaymentAccount {
id: number;
code: string;
legalEntityId: number;
legalEntityName: string;
branchName?: string | null;
bankName: string;
accountNoMask: string;
currencyCode: string;
paymentMethodIds: number[];
paymentMethods: PaymentMethodOption[];
status: Status;
}
export interface BudgetSubject {
id: number;
code: string;
name: string;
level: 1 | 2;
parentId?: number;
parentCode?: string;
parentName?: string;
description: string;
status: Status;
}
export interface BudgetLedger {
id: number;
fiscalYear: number;
legalEntityId: number;
legalEntityName: string;
costCenterId: number;
costCenterCode: string;
costCenterName: string;
subjectId: number;
subjectCode: string;
subjectName: string;
categoryCode: string;
categoryName: string;
currencyCode: string;
limitAmount: number;
occupiedAmount: number;
executedAmount: number;
availableAmount: number;
usagePercent: number;
status: Status;
}
export interface BudgetAdjustment {
id: number;
requestNo: string;
createdAt: string;
fiscalYear: number;
legalEntityName: string;
costCenterCode: string;
costCenterName: string;
subjectCode: string;
subjectName: string;
categoryName: string;
currencyCode: string;
direction: "INCREASE" | "DECREASE";
amount: number;
beforeLimit: number;
afterLimit: number;
reason: string;
approvalStatus: string;
applicantName: string;
}
export interface BudgetSummary {
currencyCode: string;
limitAmount: number;
occupiedAmount: number;
executedAmount: number;
availableAmount: number;
}
export interface BudgetOverview {
fiscalYear: number;
subjects: BudgetSubject[];
ledgers: BudgetLedger[];
adjustments: BudgetAdjustment[];
summary: BudgetSummary[];
}
export interface BusinessConfigReferences {
employees?: { openId: string; name: string }[];
legalEntities?: LegalEntity[];
costCenters?: CostCenter[];
currencies?: Currency[];
paymentMethods?: PaymentMethod[];
}
const list = <T>(resource: MasterResource) =>
request.get<T[]>(`/business-config/${resource}`, {
suppressErrorNotification: true,
});
export const businessConfigApi = {
references: () =>
request.get<BusinessConfigReferences>("/business-config/references", {
suppressErrorNotification: true,
}),
legalEntities: () => list<LegalEntity>("legal-entities"),
costCenters: () => list<CostCenter>("cost-centers"),
currencies: () => list<Currency>("currencies"),
paymentMethods: () => list<PaymentMethod>("payment-methods"),
paymentAccounts: () => list<PaymentAccount>("payment-accounts"),
create<T>(
resource: Exclude<MasterResource, "currencies">,
payload: Record<string, unknown>,
) {
return request.post<T>(`/business-config/${resource}`, payload);
},
changeStatus<T>(
resource: Exclude<MasterResource, "currencies">,
id: number,
status: Status,
) {
return request.patch<T>(`/business-config/${resource}/${id}/status`, {
status,
});
},
budgetOverview: () =>
request.get<BudgetOverview>("/business-config/budgets/overview", {
suppressErrorNotification: true,
}),
createBudgetSubject: (payload: {
parentId: number;
name: string;
description: string;
}) =>
request.post<BudgetSubject>("/business-config/budget-subjects", payload),
changeBudgetSubjectStatus: (id: number, status: Status) =>
request.patch<BudgetSubject>(
`/business-config/budget-subjects/${id}/status`,
{ status },
),
requestBudgetAdjustment: (payload: {
fiscalYear: number;
legalEntityId: number;
costCenterId: number;
subjectId: number;
currencyCode: string;
direction: "INCREASE" | "DECREASE";
amount: number;
reason: string;
}) =>
request.post<BudgetAdjustment>(
"/business-config/budget-adjustments",
payload,
),
};
-74
View File
@@ -1,74 +0,0 @@
import type { CreateApplicationRequest, PaymentRecord, ReimApplicationDetail, ReimApplicationSummary } from './reimbursement'
export interface FallbackUser {
id: number
employeeNo: string
realName: string
avatarUrl: string
email: string
departmentName: string
position: string
userType: string
status: string
feishuStatus: string
lastLoginAt: string
}
export interface FallbackWorkbench {
user: FallbackUser
reimbursements: ReimApplicationDetail[]
payments: PaymentRecord[]
notifications: number
}
const item = (id: string, title: string, owner: string, department: string, amount: number, applicationStatus: string, approvalStatus: string, approvalNode: string, receiptStatus: string, category: string, date: string, returnReason = ''): ReimApplicationDetail => ({
id, applicationNo: id, title, applicantName: owner, applicantEmployeeNo: owner === '李志豪' ? 'EMP000086' : 'EMP000102', departmentName: department,
expenseTypeId: 1, expenseTypeName: '员工报销', category, totalAmount: amount,
description: title === '上海客户现场技术交流差旅' ? '上海客户现场技术交流产生的交通及住宿费用。' : `${title},用于日常业务支持。`,
applicationStatus, approvalStatus, currentApprovalNode: approvalNode, receiptStatus, paymentStatus: '未付款', budgetStatus: receiptStatus === '已收单' ? '已转执行' : '已占用',
sourceDocNo: `TRIP${date.replace(/-/g, '')}`, sourceStatus: '已同步', payeeName: owner, payeeBankId: 1,
bankName: owner === '李志豪' ? '中国工商银行苏州新区支行' : '招商银行苏州工业园区支行', bankAccountMask: owner === '李志豪' ? '6222 **** 0728' : '6214 **** 8001',
returnReason, submitTime: `${date} 09:42`, createdAt: `${date} 09:42`, updatedAt: `${date} 10:24`,
expenseItems: [{ id: `${id}-1`, seqNo: 1, expenseDate: date, category, description: title, amount, attachmentIds: [] }],
invoices: amount === 3286.5 ? [] : [{ id: `${id}-invoice`, invoiceNo: `0330026001114${id.slice(-5)}`, invoiceType: '增值税普通发票', issueDate: date, amount, sellerName: '业务服务商', verifyStatus: '已校验' }],
attachments: [{ id: `${id}-attachment`, fileName: `${category}证明材料.pdf`, fileType: 'PDF', fileUrl: '' }], approvalRecords: [], payments: [],
})
export const fallbackWorkbench: FallbackWorkbench = {
user: { id: 86, employeeNo: 'EMP000086', realName: '李志豪', avatarUrl: '', email: '', departmentName: '销售中心', position: '销售经理', userType: 'EMPLOYEE', status: 'ACTIVE', feishuStatus: '已授权', lastLoginAt: '' },
reimbursements: [
item('BX20260812001', '上海客户现场技术交流差旅', '李志豪', '销售中心', 3286.5, '已提交', '退回', '申请人补充材料', '未触发', '差旅交通', '2026-08-12', '请补充住宿发票影像,并说明住宿日期。'),
item('BX20260809003', '八月客户拜访交通费', '李志豪', '销售中心', 1260, '已提交', '审批中', '应付会计审核', '未触发', '交通费', '2026-08-09'),
item('BX20260808006', '研发现场餐费报销', '王忠辉', '数字化中心', 680, '已提交', '审批中', '财务经理审批', '未触发', '业务招待', '2026-08-08'),
item('BX20260802011', '苏州园区客户拜访费用', '赵海峰', '供应链中心', 2180, '已提交', '审批通过', '流程已完成', '待收单', '交通费', '2026-08-02'),
item('BX20260801009', '七月云资源差旅补贴', '王忠辉', '数字化中心', 3200, '已提交', '审批通过', '流程已完成', '已收单', '差旅补贴', '2026-08-01'),
item('BX20260728004', '上海项目住宿费', '赵海峰', '供应链中心', 4100, '已提交', '审批通过', '流程已完成', '已收单', '住宿费', '2026-07-28'),
],
payments: [{ id: 'PAY-20260803-01', paymentNo: 'PAY-20260803-01', applicationId: 'BX20260728004', paymentAmount: 1800, totalAmount: 4100, paidAmount: 1800, remainingAmount: 2300, paymentMethod: '银行转账', paymentStatus: '有效', operatorName: '周敏', paymentTime: '2026-08-03 15:24', remark: 'FLOW202608030883' }],
notifications: 3,
}
export const fallbackLogin = (employeeNo = 'EMP000086'): { token: string; user: FallbackUser } => {
const finance = employeeNo.trim().toUpperCase() === 'FINANCE'
return {
token: 'demo-local-session',
user: {
...fallbackWorkbench.user,
employeeNo: finance ? 'FINANCE-DEMO' : employeeNo,
realName: finance ? '财务人员' : employeeNo === 'EMP000086' ? '李志豪' : '员工用户',
departmentName: finance ? '财务中心' : fallbackWorkbench.user.departmentName,
position: finance ? '财务专员' : fallbackWorkbench.user.position,
userType: finance ? 'FINANCE' : 'EMPLOYEE',
},
}
}
export const cloneFallback = (): FallbackWorkbench => structuredClone(fallbackWorkbench)
export const createFallbackDetail = (payload: CreateApplicationRequest, id: string, user: FallbackUser): ReimApplicationDetail => ({
id, applicationNo: id, title: payload.title, applicantName: user.realName, applicantEmployeeNo: user.employeeNo, departmentName: user.departmentName,
expenseTypeId: payload.expenseTypeId, expenseTypeName: '员工报销', category: payload.category, totalAmount: payload.totalAmount, description: payload.description,
applicationStatus: '草稿', approvalStatus: '未触发', currentApprovalNode: '未提交', receiptStatus: '未触发', paymentStatus: '未付款', budgetStatus: '已占用',
sourceDocNo: '', sourceStatus: '未关联', payeeName: payload.payeeName, payeeBankId: payload.payeeBankId, bankName: '收款账户', bankAccountMask: '已脱敏', returnReason: '', submitTime: '',
createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), expenseItems: payload.items, invoices: [], attachments: [], approvalRecords: [], payments: [],
})
+46
View File
@@ -37,6 +37,40 @@ export interface DirectoryRun {
errorMessage: string | null errorMessage: string | null
} }
export interface DirectoryRunCounts {
departments: number
usersSeen: number
eligible: number
excluded: number
created: number
updated: number
ineligible: number
outOfScope: number
}
export interface DirectoryRunRecord {
runId: string
trigger: 'MANUAL' | 'STARTUP' | 'SCHEDULED'
state: 'RUNNING' | 'SUCCEEDED' | 'FAILED'
queuedAt: string | null
startedAt: string | null
finishedAt: string | null
attempts: number
complete: boolean
applied: boolean
counts: DirectoryRunCounts
errorCode: string | null
/** The public endpoint deliberately omits provider and database error details. */
errorMessage: null
}
export interface DirectoryRunPage {
items: DirectoryRunRecord[]
page: number
size: number
total: number
}
export interface DirectoryStatus extends DirectoryAvailabilityContract { export interface DirectoryStatus extends DirectoryAvailabilityContract {
configured: boolean configured: boolean
running: boolean running: boolean
@@ -61,11 +95,16 @@ export interface DirectoryOrganizationUser {
openId: string openId: string
userId: string | null userId: string | null
name: string name: string
employeeNo: string | null
email: string email: string
mobile: string mobile: string
jobTitle: string jobTitle: string
avatarUrl: string avatarUrl: string
departmentIds: string[] departmentIds: string[]
employmentStatus: 'ACTIVE' | 'RESIGNED'
resigned: boolean
employmentStatusSource: string
employmentStatusObservedAt: string | null
} }
export interface DirectoryOrganization extends DirectoryAvailabilityContract { export interface DirectoryOrganization extends DirectoryAvailabilityContract {
@@ -81,6 +120,13 @@ export const feishuDirectoryApi = {
request.post('/feishu/directory/sync', undefined, { timeout: DIRECTORY_SYNC_TIMEOUT, signal }), request.post('/feishu/directory/sync', undefined, { timeout: DIRECTORY_SYNC_TIMEOUT, signal }),
status: (signal?: AbortSignal): Promise<DirectoryStatus> => status: (signal?: AbortSignal): Promise<DirectoryStatus> =>
request.get('/feishu/directory/status', { signal }), request.get('/feishu/directory/status', { signal }),
runs: (page = 0, size = 20, signal?: AbortSignal): Promise<DirectoryRunPage> =>
request.get('/feishu/directory/runs', {
signal,
params: { page, size },
timeout: 15_000,
suppressErrorNotification: true,
}),
/** Departments (+ optional full users). Default omits users so the shell paints quickly. */ /** Departments (+ optional full users). Default omits users so the shell paints quickly. */
organization: (signal?: AbortSignal, includeUsers = false): Promise<DirectoryOrganization> => organization: (signal?: AbortSignal, includeUsers = false): Promise<DirectoryOrganization> =>
request.get('/feishu/directory/organization', { signal, params: { includeUsers } }), request.get('/feishu/directory/organization', { signal, params: { includeUsers } }),
+6 -8
View File
@@ -1,10 +1,8 @@
import request from './request' import request from './request'
export interface KingdeeAccountBinding { export interface KingdeeAccountBinding {
userId: number employeeOpenId: string
realName: string realName: string
employeeNo?: string | null
status?: string | null
bound: boolean bound: boolean
kingdeeUsername?: string | null kingdeeUsername?: string | null
boundAt?: string | null boundAt?: string | null
@@ -15,9 +13,9 @@ export interface KingdeeAccountBinding {
export const kingdeeAccountsApi = { export const kingdeeAccountsApi = {
list: (): Promise<KingdeeAccountBinding[]> => request.get('/kingdee/account-bindings'), list: (): Promise<KingdeeAccountBinding[]> => request.get('/kingdee/account-bindings'),
me: (): Promise<KingdeeAccountBinding> => request.get('/kingdee/account-bindings/me'), me: (): Promise<KingdeeAccountBinding> => request.get('/kingdee/account-bindings/me'),
bind: (userId: number, body: { kingdeeUsername: string; kingdeePassword: string; verifyLogin?: boolean }): Promise<KingdeeAccountBinding> => bind: (employeeOpenId: string, body: { kingdeeUsername: string; kingdeePassword: string; verifyLogin?: boolean }): Promise<KingdeeAccountBinding> =>
request.put(`/kingdee/account-bindings/${userId}`, body), request.put(`/kingdee/account-bindings/${encodeURIComponent(employeeOpenId)}`, body),
unbind: (userId: number): Promise<void> => request.delete(`/kingdee/account-bindings/${userId}`), unbind: (employeeOpenId: string): Promise<void> => request.delete(`/kingdee/account-bindings/${encodeURIComponent(employeeOpenId)}`),
test: (userId: number): Promise<{ success: boolean; message: string }> => test: (employeeOpenId: string): Promise<{ success: boolean; message: string }> =>
request.post(`/kingdee/account-bindings/${userId}/test`), request.post(`/kingdee/account-bindings/${encodeURIComponent(employeeOpenId)}/test`),
} }
+139
View File
@@ -0,0 +1,139 @@
import request from './request'
import { sanitizeAccessLog, sanitizeAuditEvent } from '@/authorization/guards'
import type { AuditLane, AuditReadScope } from '@/authorization/audit'
export interface AccessLogItem {
id: number | string
requestId?: string
clientRequestId?: string
traceId?: string
operator?: string
operatorId?: number
operation?: string
action?: string
detail?: string
category?: string
method?: string
methodLabel?: string
path?: string
route?: string
statusCode?: number
statusLabel?: string
durationMs?: number
outcome?: string
outcomeLabel?: string
errorCode?: string
errorLabel?: string
time?: string
}
export interface AuditEventItem {
id: number | string
eventTime?: string
category?: string
categoryLabel?: string
action?: string
actionLabel?: string
outcome?: string
outcomeLabel?: string
reasonCode?: string
reasonLabel?: string
actorType?: string
actorLabel?: string
actorId?: number
targetType?: string
targetId?: string
resourceType?: string
resourceLabel?: string
resourceId?: string
requestId?: string
traceId?: string
source?: string
}
export interface CursorPage<T> {
items: T[]
nextEventTime?: string
nextId?: number | string
hasMore: boolean
}
export interface CursorQuery {
actorId?: number
outcome?: string
cursorTime?: string
cursorId?: number | string
limit?: number
}
export interface AccessLogQuery extends CursorQuery {
category?: string
operator?: string
}
export interface AuditEventQuery extends CursorQuery {
action?: string
resourceType?: string
resourceId?: string
}
const assertScope = (scope: AuditReadScope) => {
if (scope !== 'OWN' && scope !== 'ALL') throw new Error('审计读取范围无效')
}
const cursorParams = (query: CursorQuery) => ({
...(query.cursorTime ? { cursorTime: query.cursorTime } : {}),
...(query.cursorId != null ? { cursorId: query.cursorId } : {}),
...(query.limit != null ? { limit: query.limit } : {}),
})
const assertCursorPair = (query: CursorQuery) => {
if ((query.cursorTime == null) !== (query.cursorId == null)) throw new Error('审计游标必须成对提供')
}
const cursorPage = <T>(payload: unknown, sanitize: (row: unknown) => Record<string, unknown>, label: string): CursorPage<T> => {
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) throw new Error(`${label}响应格式无效`)
const value = payload as Record<string, unknown>
if (!Array.isArray(value.items) || typeof value.hasMore !== 'boolean') throw new Error(`${label}响应格式无效`)
const items = value.items.map(sanitize).filter(item => item.id != null) as T[]
const nextEventTime = typeof value.nextEventTime === 'string' ? value.nextEventTime : undefined
const nextId = typeof value.nextId === 'number' || typeof value.nextId === 'string' ? value.nextId : undefined
if (value.hasMore && (!nextEventTime || nextId == null)) throw new Error(`${label}游标缺失`)
return { items, hasMore: value.hasMore, nextEventTime, nextId }
}
export const logsApi = {
listAccess: async (query: AccessLogQuery, scope: AuditReadScope): Promise<CursorPage<AccessLogItem>> => {
assertScope(scope)
assertCursorPair(query)
const params = {
...cursorParams(query),
...(scope === 'ALL' && query.category ? { category: query.category } : {}),
...(scope === 'ALL' && query.actorId != null ? { actorId: query.actorId } : {}),
...(scope === 'ALL' && query.operator ? { operator: query.operator } : {}),
...(scope === 'ALL' && query.outcome ? { outcome: query.outcome } : {}),
}
const payload = await request.get<unknown>('/logs/cursor', { params })
return cursorPage<AccessLogItem>(payload, sanitizeAccessLog, '访问日志')
},
listAuditEvents: async (
lane: Exclude<AuditLane, 'access'>,
query: AuditEventQuery,
scope: AuditReadScope,
): Promise<CursorPage<AuditEventItem>> => {
assertScope(scope)
assertCursorPair(query)
if (!['security', 'business', 'integration'].includes(lane)) throw new Error('审计类别无效')
const params = {
...cursorParams(query),
...(scope === 'ALL' && query.actorId != null ? { actorId: query.actorId } : {}),
...(scope === 'ALL' && query.action ? { action: query.action } : {}),
...(scope === 'ALL' && query.outcome ? { outcome: query.outcome } : {}),
...(scope === 'ALL' && query.resourceType ? { resourceType: query.resourceType } : {}),
...(scope === 'ALL' && query.resourceId ? { resourceId: query.resourceId } : {}),
}
const payload = await request.get<unknown>(`/audit/events/${lane}`, { params })
return cursorPage<AuditEventItem>(payload, sanitizeAuditEvent, '审计事件')
},
}
+83
View File
@@ -0,0 +1,83 @@
import request from './request'
export type PayeeAccountStatus = 'ACTIVE' | 'INACTIVE'
export type PayeeSubjectType = 'EMPLOYEE' | 'SUPPLIER'
export interface PayeeAccount {
id: number
payeeId?: number | null
payeeType?: PayeeSubjectType
userId?: number | null
name: string
employeeNo?: string | null
department?: string | null
supplierCreditCode?: string | null
bankName: string
branchName?: string | null
bankAccountMask: string
isDefault: boolean
status: PayeeAccountStatus
manageable?: boolean
updatedAt?: string | null
}
export interface PayeeUser {
openId: string
realName: string
}
export interface PayeeInitialAccountPayload {
bankName: string
branchName?: string
accountNo: string
}
export interface PayeeAccountPayload {
userId?: number | null
bankName: string
branchName?: string
accountNo?: string
isDefault: boolean
status: PayeeAccountStatus
}
export interface PayeeSubject {
id: number
payeeType: PayeeSubjectType
displayName: string
employeeOpenId?: string | null
identityNumber?: string | null
supplierCreditCode?: string | null
status: PayeeAccountStatus
accountCount: number
manageable?: boolean
updatedAt?: string | null
}
export interface PayeeSubjectPayload {
payeeType: PayeeSubjectType
employeeOpenId?: string | null
identityNumber?: string | null
displayName: string
supplierCreditCode?: string
status: PayeeAccountStatus
initialAccount?: PayeeInitialAccountPayload
}
export const payeesApi = {
list: (): Promise<PayeeAccount[]> => request.get('/payees'),
ownActive: (): Promise<PayeeAccount[]> => request.get('/metadata/payees'),
eligibleUsers: (): Promise<PayeeUser[]> => request.get('/payees/eligible-users'),
create: (body: PayeeAccountPayload): Promise<PayeeAccount> => request.post('/payees', body),
update: (id: number, body: PayeeAccountPayload): Promise<PayeeAccount> => request.put(`/payees/${id}`, body),
deactivate: (id: number): Promise<PayeeAccount> => request.delete(`/payees/${id}`),
listSubjects: (): Promise<PayeeSubject[]> => request.get('/payees/subjects'),
createSubject: (body: PayeeSubjectPayload): Promise<PayeeSubject> => request.post('/payees/subjects', body),
updateSubject: (id: number, body: PayeeSubjectPayload): Promise<PayeeSubject> => request.put(`/payees/subjects/${id}`, body),
deactivateSubject: (id: number): Promise<PayeeSubject> => request.delete(`/payees/subjects/${id}`),
listSubjectAccounts: (payeeId: number): Promise<PayeeAccount[]> => request.get(`/payees/subjects/${payeeId}/accounts`),
createSubjectAccount: (payeeId: number, body: PayeeAccountPayload): Promise<PayeeAccount> => request.post(`/payees/subjects/${payeeId}/accounts`, body),
updateSubjectAccount: (payeeId: number, accountId: number, body: PayeeAccountPayload): Promise<PayeeAccount> => request.put(`/payees/subjects/${payeeId}/accounts/${accountId}`, body),
setDefaultSubjectAccount: (payeeId: number, accountId: number): Promise<PayeeAccount> => request.put(`/payees/subjects/${payeeId}/accounts/${accountId}/default`),
deactivateSubjectAccount: (payeeId: number, accountId: number): Promise<PayeeAccount> => request.delete(`/payees/subjects/${payeeId}/accounts/${accountId}`),
}
+52 -13
View File
@@ -54,7 +54,7 @@ export interface ReimApplicationDetail {
payeeBankId: number payeeBankId: number
bankName: string bankName: string
bankAccountMask: string bankAccountMask: string
returnReason: string returnReason?: string
submitTime: string submitTime: string
createdAt: string createdAt: string
updatedAt: string updatedAt: string
@@ -65,6 +65,7 @@ export interface ReimApplicationDetail {
payments: PaymentRecord[] payments: PaymentRecord[]
paidAmountSnapshot?: number paidAmountSnapshot?: number
remainingAmountSnapshot?: number remainingAmountSnapshot?: number
availableActions?: string[]
formSnapshot?: ReimbursementFormSnapshot formSnapshot?: ReimbursementFormSnapshot
} }
@@ -213,16 +214,45 @@ export interface PaymentRecord {
id: number | string id: number | string
paymentNo: string paymentNo: string
applicationId?: number | string applicationId?: number | string
paymentAmount: number paymentAmount?: number
totalAmount: number totalAmount?: number
paidAmount: number paidAmount?: number
remainingAmount: number remainingAmount?: number
paymentMethod: string paymentMethod: string
referenceNo?: string referenceNo?: string
paymentStatus: string paymentStatus: string
operatorName: string operatorName?: string
paymentTime: string paymentTime?: string
remark: string remark?: string
canVerify?: boolean
canReject?: boolean
availableActions?: string[]
}
export interface PaymentReviewRequest {
paymentId: number | string
rejectionCode?: string
}
export interface PaymentResult {
paymentNo?: string
paymentAmount?: number
paymentStatus: string
message?: string
}
export interface TransferApprovalRequest {
applicationId: number | string
targetApproverId: number | string
comment?: string
}
export interface ReimbursementWorkbenchResponse {
reimbursements?: ReimApplicationDetail[]
content?: ReimApplicationDetail[]
payments?: PaymentRecord[]
notifications?: number
user?: unknown
} }
export const reimbursementApi = { export const reimbursementApi = {
@@ -243,7 +273,7 @@ export const reimbursementApi = {
deleteFormAttachment: (id: number | string): Promise<void> => deleteFormAttachment: (id: number | string): Promise<void> =>
request.delete(`/v1/reimbursements/form-attachments/${encodeURIComponent(String(id))}`, { suppressErrorNotification: true }), request.delete(`/v1/reimbursements/form-attachments/${encodeURIComponent(String(id))}`, { suppressErrorNotification: true }),
getWorkbench: (): Promise<any> => getWorkbench: (): Promise<ReimbursementWorkbenchResponse> =>
request.get('/v1/reimbursements/workbench'), request.get('/v1/reimbursements/workbench'),
getMyApplications: (params?: { status?: string; page?: number; size?: number }): Promise<PageResponse<ReimApplicationSummary>> => getMyApplications: (params?: { status?: string; page?: number; size?: number }): Promise<PageResponse<ReimApplicationSummary>> =>
@@ -255,10 +285,10 @@ export const reimbursementApi = {
getByApplicationNo: (no: string): Promise<ReimApplicationDetail> => getByApplicationNo: (no: string): Promise<ReimApplicationDetail> =>
request.get(`/v1/reimbursements/no/${no}`), request.get(`/v1/reimbursements/no/${no}`),
create: (data: CreateApplicationRequest): Promise<ReimApplicationDetail> => create: (data: Partial<CreateApplicationRequest>): Promise<ReimApplicationDetail> =>
request.post('/v1/reimbursements', data), request.post('/v1/reimbursements', data),
update: (id: number | string, data: CreateApplicationRequest): Promise<ReimApplicationDetail> => update: (id: number | string, data: Partial<CreateApplicationRequest>): Promise<ReimApplicationDetail> =>
request.put(`/v1/reimbursements/${id}`, data), request.put(`/v1/reimbursements/${id}`, data),
getRoutePreview: (id: number | string): Promise<ApprovalRoutePreview> => getRoutePreview: (id: number | string): Promise<ApprovalRoutePreview> =>
@@ -287,6 +317,9 @@ export const accountsPayableApi = {
reject: (applicationId: number | string, comment: string, returnReason: string): Promise<void> => reject: (applicationId: number | string, comment: string, returnReason: string): Promise<void> =>
request.post('/v1/accounts-payable/reject', { applicationId, comment, returnReason }), request.post('/v1/accounts-payable/reject', { applicationId, comment, returnReason }),
transfer: (data: TransferApprovalRequest): Promise<void> =>
request.post('/v1/accounts-payable/transfer', data),
getHistory: (): Promise<ApprovalRecord[]> => getHistory: (): Promise<ApprovalRecord[]> =>
request.get('/v1/accounts-payable/history'), request.get('/v1/accounts-payable/history'),
} }
@@ -298,14 +331,20 @@ export const cashierApi = {
getTaskDetail: (id: number | string): Promise<any> => getTaskDetail: (id: number | string): Promise<any> =>
request.get(`/v1/cashier/tasks/${id}`), request.get(`/v1/cashier/tasks/${id}`),
executePayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise<any> => executePayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise<PaymentResult> =>
request.post('/v1/cashier/pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), request.post('/v1/cashier/pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined),
partialPayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise<any> => partialPayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise<PaymentResult> =>
request.post('/v1/cashier/partial-pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), request.post('/v1/cashier/partial-pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined),
getHistory: (): Promise<PaymentRecord[]> => getHistory: (): Promise<PaymentRecord[]> =>
request.get('/v1/cashier/history'), request.get('/v1/cashier/history'),
verify: (data: PaymentReviewRequest): Promise<PaymentResult> =>
request.post('/v1/cashier/payments/verify', data),
reject: (data: PaymentReviewRequest): Promise<PaymentResult> =>
request.post('/v1/cashier/payments/reject', data),
} }
export const dashboardApi = { export const dashboardApi = {
+7 -3
View File
@@ -1,6 +1,6 @@
import axios from 'axios' import axios from 'axios'
import type { AxiosRequestConfig } from 'axios' import type { AxiosRequestConfig } from 'axios'
import { ElMessage } from 'element-plus' import { ElMessage } from '@/utils/uiFeedback'
import router from '@/router' import router from '@/router'
type ClientRequestConfig = AxiosRequestConfig & { suppressErrorNotification?: boolean } type ClientRequestConfig = AxiosRequestConfig & { suppressErrorNotification?: boolean }
@@ -9,6 +9,7 @@ type ApiClient = {
get<T = unknown>(url: string, config?: ClientRequestConfig): Promise<T> get<T = unknown>(url: string, config?: ClientRequestConfig): Promise<T>
post<T = unknown>(url: string, data?: unknown, config?: ClientRequestConfig): Promise<T> post<T = unknown>(url: string, data?: unknown, config?: ClientRequestConfig): Promise<T>
put<T = unknown>(url: string, data?: unknown, config?: ClientRequestConfig): Promise<T> put<T = unknown>(url: string, data?: unknown, config?: ClientRequestConfig): Promise<T>
patch<T = unknown>(url: string, data?: unknown, config?: ClientRequestConfig): Promise<T>
delete<T = unknown>(url: string, config?: ClientRequestConfig): Promise<T> delete<T = unknown>(url: string, config?: ClientRequestConfig): Promise<T>
} }
@@ -84,7 +85,10 @@ axiosClient.interceptors.response.use(
if (res.code !== 200) { if (res.code !== 200) {
if (res.code === 401) clearOnlyIfRequestOwnsSession(response.config) if (res.code === 401) clearOnlyIfRequestOwnsSession(response.config)
if (!suppressErrorNotification(response.config)) notifyOnce(res.message || '请求失败') if (!suppressErrorNotification(response.config)) notifyOnce(res.message || '请求失败')
return Promise.reject(new Error(res.message || '请求失败')) const businessError = new Error(res.message || '请求失败') as Error & { status?: number; code?: number }
businessError.status = Number(res.code)
businessError.code = Number(res.code)
return Promise.reject(businessError)
} }
return res.data return res.data
}, },
@@ -98,7 +102,7 @@ axiosClient.interceptors.response.use(
if (!silent) notifyOnce('登录已过期,请重新登录') if (!silent) notifyOnce('登录已过期,请重新登录')
break break
case 403: case 403:
if (!silent) notifyOnce('权限不足') if (!silent) notifyOnce(data?.message || '权限不足')
break break
case 404: case 404:
if (!silent) notifyOnce('请求的资源不存在') if (!silent) notifyOnce('请求的资源不存在')
+25
View File
@@ -0,0 +1,25 @@
import request from './request'
export interface TravelApplication {
id: number
travelRequestNo: string
approvalInstanceId: string
applicant: string
applicantCode?: string | null
travelerCodes: string[]
travelers: string[]
entity?: string | null
department?: string | null
destination?: string | null
purpose?: string | null
startDate?: string | null
endDate?: string | null
estimate?: number | null
status: string
approvalSystem: string
syncedAt: string
}
export const travelApplicationsApi = {
mine: (): Promise<TravelApplication[]> => request.get('/v1/travel-applications/mine'),
}
+387
View File
@@ -0,0 +1,387 @@
.prototype-config-page {
display: flex;
width: 100%;
min-width: 0;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
}
.prototype-page-head {
flex: 0 0 auto;
}
.prototype-head-actions {
display: flex;
min-width: 0;
gap: 8px;
flex-wrap: wrap;
justify-content: flex-end;
}
.prototype-governance-note {
display: flex;
width: 100%;
min-width: 0;
flex: 0 0 auto;
align-items: center;
gap: 14px;
margin-bottom: 16px;
padding: 14px 16px;
border: 1px solid #c9daf3;
border-radius: var(--radius);
background: linear-gradient(110deg, #f1f6fd, #fff);
color: var(--muted);
font-size: 12px;
line-height: 1.6;
}
.prototype-governance-note strong {
color: var(--blue);
white-space: nowrap;
}
.prototype-config-card {
display: flex;
width: 100%;
min-width: 0;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
overflow: hidden;
}
.prototype-filter-bar {
display: flex;
width: 100%;
min-width: 0;
flex: 0 0 auto;
align-items: center;
gap: 10px;
flex-wrap: wrap;
padding: 16px var(--component-inset);
border-bottom: 1px solid var(--line);
background: var(--surface-raised, #fff);
}
.prototype-filter-bar input,
.prototype-filter-bar select {
width: auto;
min-width: 0;
height: var(--control-height);
min-height: var(--control-height);
box-sizing: border-box;
padding: 0 11px;
border: 1px solid var(--line-strong);
border-radius: var(--radius);
background: #fff;
color: var(--text);
font: inherit;
}
.prototype-filter-bar input:focus,
.prototype-filter-bar select:focus {
border-color: var(--blue);
outline: 0;
box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.12);
}
.prototype-filter-bar input {
flex: 2 1 320px;
}
.prototype-filter-bar select {
flex: 1 1 170px;
max-width: 240px;
}
.prototype-filter-spacer {
min-width: 0;
flex: 1 1 20px;
}
.prototype-result-count {
flex: 0 0 auto;
padding: 4px 10px;
border-radius: 999px;
background: var(--surface-2, #eef2f7);
color: var(--quiet);
font-size: 11px;
white-space: nowrap;
}
.prototype-config-card > .table-wrap {
min-height: 180px;
flex: 1 1 auto;
}
.prototype-table td,
.prototype-table th {
text-align: center !important;
vertical-align: middle;
}
.prototype-table .amount {
text-align: center !important;
}
.prototype-cell-stack {
display: grid;
justify-items: center;
gap: 3px;
}
.prototype-cell-stack small {
color: var(--muted);
}
.prototype-row-actions {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
white-space: nowrap;
}
.prototype-table-action {
padding: 0;
border: 0;
background: transparent;
color: var(--blue);
font-weight: 700;
cursor: pointer;
}
.prototype-table-action.danger {
color: #b42318;
}
.prototype-table-action:disabled {
color: var(--muted);
cursor: not-allowed;
}
.business-status {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 9px;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
}
.business-status:before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
}
.business-status.is-active {
background: #ecf8f2;
color: #137a4a;
}
.business-status.is-inactive {
background: #f2f4f7;
color: #667085;
}
.prototype-empty {
display: grid;
width: 100%;
place-items: center;
min-height: 220px;
flex: 1 1 auto;
padding: 28px;
color: var(--muted);
text-align: center;
}
.prototype-dialog {
width: min(760px, calc(100vw - 32px));
}
.prototype-dialog form {
margin: 0;
}
.prototype-dialog .modal-body {
display: grid;
gap: 16px;
}
.prototype-form-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.prototype-form-grid .field {
display: grid;
gap: 7px;
min-width: 0;
}
.prototype-form-grid .field.full {
grid-column: 1/-1;
}
.prototype-form-grid label {
font-size: 13px;
font-weight: 700;
}
.prototype-form-grid input,
.prototype-form-grid select,
.prototype-form-grid textarea {
width: 100%;
min-width: 0;
box-sizing: border-box;
border-color: var(--line-strong);
border-radius: var(--radius);
}
.prototype-form-grid input,
.prototype-form-grid select {
min-height: var(--control-height);
}
.prototype-form-grid textarea {
min-height: 92px;
resize: vertical;
}
.prototype-form-grid em {
color: #b42318;
font-style: normal;
}
.prototype-code-note {
padding: 12px 14px;
border-radius: var(--radius);
background: var(--surface-muted, #f5f7fa);
color: var(--muted);
font-size: 12px;
}
.prototype-form-error {
margin: 0;
color: #b42318;
}
.prototype-spec-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1px;
overflow: hidden;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--line);
}
.prototype-spec-grid > div {
min-height: 78px;
padding: 14px;
background: #fff;
}
.prototype-spec-grid span,
.prototype-spec-grid strong {
display: block;
}
.prototype-spec-grid span {
color: var(--muted);
font-size: 12px;
}
.prototype-spec-grid strong {
margin-top: 7px;
word-break: break-word;
}
.prototype-exchange-card {
display: flex;
width: 100%;
min-width: 0;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: 20px;
margin-bottom: 16px;
padding: 15px 17px;
border: 1px solid #c9daf3;
border-radius: var(--radius);
background: linear-gradient(110deg, #f1f6fd, #fff);
}
.prototype-exchange-card strong,
.prototype-exchange-card span {
display: block;
}
.prototype-exchange-card span {
margin-top: 4px;
color: var(--muted);
font-size: 12px;
}
.prototype-exchange-card a {
text-decoration: none;
white-space: nowrap;
}
.prototype-check-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
}
.prototype-check-row {
display: flex;
align-items: center;
gap: 8px;
padding: 10px;
border: 1px solid var(--line);
border-radius: var(--radius);
}
.prototype-check-row input {
width: auto;
}
.prototype-loading {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
gap: 10px;
min-height: 220px;
flex: 1 1 auto;
}
.prototype-error {
display: grid;
width: 100%;
place-items: center;
gap: 10px;
min-height: 220px;
flex: 1 1 auto;
color: #b42318;
text-align: center;
}
@container page-stage (max-width: 980px) {
.prototype-filter-bar input {
flex-basis: 100%;
}
.prototype-filter-bar select {
max-width: none;
}
}
@media (max-width: 760px) {
.prototype-page-head {
align-items: stretch;
flex-direction: column;
}
.prototype-head-actions {
justify-content: flex-start;
}
.prototype-filter-spacer {
display: none;
}
.prototype-result-count {
margin-left: auto;
}
.prototype-filter-bar input,
.prototype-filter-bar select {
width: 100%;
flex: 1 1 100%;
}
.prototype-form-grid,
.prototype-spec-grid,
.prototype-check-grid {
grid-template-columns: 1fr;
}
.prototype-form-grid .field.full {
grid-column: auto;
}
.prototype-exchange-card,
.prototype-governance-note {
align-items: flex-start;
flex-direction: column;
}
.prototype-dialog {
width: calc(100vw - 18px);
}
}
@media (max-width: 520px) {
.prototype-filter-bar {
align-items: stretch;
}
.prototype-filter-bar input,
.prototype-filter-bar select,
.prototype-result-count {
width: 100%;
max-width: none;
flex: 1 1 100%;
}
.prototype-result-count {
margin-left: 0;
text-align: center;
}
}
+879 -172
View File
File diff suppressed because it is too large.
+18
View File
@@ -0,0 +1,18 @@
export type AuditLane = 'access' | 'security' | 'business' | 'integration'
export type AuditReadScope = 'OWN' | 'ALL'
export const AUDIT_READ_CAPABILITIES: Record<AuditLane, readonly [string, string]> = {
access: ['audit.access:read-own', 'audit.access:read-all'],
security: ['audit.security:read-own', 'audit.security:read-all'],
business: ['audit.business:read-own', 'audit.business:read-all'],
integration: ['audit.integration:read-own', 'audit.integration:read-all'],
}
export const AUDIT_READ_ALL_CAPABILITY: Record<AuditLane, string> = {
access: 'audit.access:read-all',
security: 'audit.security:read-all',
business: 'audit.business:read-all',
integration: 'audit.integration:read-all',
}
export const AUDIT_ANY_READ_CAPABILITIES = Object.values(AUDIT_READ_CAPABILITIES).flat()
+89
View File
@@ -0,0 +1,89 @@
import type { AuthorizationPolicy, FieldAccess, PolicyRiskLevel } from '@/api/authorization'
const CAPABILITY = /^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*:[a-z][a-z0-9-]*$/
export const normalizeCapabilities = (payload: unknown): string[] => {
if (!payload || typeof payload !== 'object') throw new Error('能力响应缺失')
const values = (payload as { capabilities?: unknown }).capabilities
if (!Array.isArray(values) || !values.every(value => typeof value === 'string' && CAPABILITY.test(value))) {
throw new Error('能力响应格式无效')
}
return [...new Set(values)].sort()
}
/** Unknown, loading and failed states always deny. This helper controls UX only. */
export const hasCapability = (
capabilities: readonly string[],
loaded: boolean,
error: string,
required: string,
) => loaded && !error && CAPABILITY.test(required) && capabilities.includes(required)
export const hasAnyCapability = (
capabilities: readonly string[],
loaded: boolean,
error: string,
required: readonly string[],
) => required.some(code => hasCapability(capabilities, loaded, error, code))
/** Pick a protected landing page without ever returning a denied route to itself. */
export const canonicalCapabilityFallback = (can: (capability: string) => boolean): string => {
if (can('reimbursement.application:read')) return '/applications'
if (can('finance.receipt:receive') || can('finance.payment:read')) return '/finance-receipt'
return '/access-denied'
}
export const policyRiskLevel = (policy: Pick<AuthorizationPolicy, 'effect' | 'dataScope' | 'action' | 'riskLevel'>): PolicyRiskLevel => {
if (policy.riskLevel) return policy.riskLevel
if (policy.effect === 'DENY') return 'CRITICAL'
if (policy.dataScope === 'ALL' && /^(manage|delete|create|update|pay|approve)$/.test(policy.action)) return 'HIGH'
return 'NORMAL'
}
export const canDelegatePolicy = (policy: Pick<AuthorizationPolicy, 'delegable' | 'effect'>, isSuperAdmin: boolean) =>
isSuperAdmin && policy.delegable !== false && policy.effect !== 'DENY'
export const canAssignRolePolicies = (roleCode: string, builtIn: boolean, isSuperAdmin: boolean) =>
isSuperAdmin && !(builtIn && roleCode.trim().toUpperCase() === 'SUPER_ADMIN')
export const safeFieldAccess = (value: unknown): FieldAccess =>
value === 'MASKED' || value === 'READ' || value === 'EDIT' ? value : 'HIDDEN'
export const policyImpactSummary = (policies: readonly AuthorizationPolicy[]) => {
const enabled = policies.filter(policy => policy.enabled)
const deny = enabled.filter(policy => policy.effect === 'DENY').length
const allScope = enabled.filter(policy => policy.dataScope === 'ALL').length
const critical = enabled.filter(policy => policyRiskLevel(policy) === 'CRITICAL').length
const fields = enabled.reduce((count, policy) => count + Object.keys(policy.fieldAccess || {}).length, 0)
return { selected: policies.length, enabled: enabled.length, deny, allScope, critical, fields }
}
const SENSITIVE_LOG_KEYS = /(?:query|string|header|authorization|cookie|body|payload|secret|token|password|credential)/i
const SAFE_ACCESS_LOG_KEYS = new Set([
'id', 'requestId', 'clientRequestId', 'traceId', 'operator', 'operatorId', 'operation', 'action', 'detail',
'category', 'method', 'methodLabel', 'path', 'route', 'statusCode', 'statusLabel', 'durationMs',
'outcome', 'outcomeLabel', 'errorCode', 'errorLabel', 'time',
])
const SAFE_AUDIT_EVENT_KEYS = new Set([
'id', 'eventTime', 'category', 'categoryLabel', 'action', 'actionLabel', 'outcome', 'outcomeLabel',
'reasonCode', 'reasonLabel', 'actorType', 'actorLabel', 'actorId', 'targetType', 'targetId',
'resourceType', 'resourceLabel', 'resourceId', 'requestId', 'traceId', 'source',
])
const sanitizeScalarProjection = (row: unknown, allowedKeys: ReadonlySet<string>): Record<string, unknown> => {
if (!row || typeof row !== 'object' || Array.isArray(row)) return {}
return Object.fromEntries(Object.entries(row as Record<string, unknown>)
.filter(([key, value]) => allowedKeys.has(key)
&& !SENSITIVE_LOG_KEYS.test(key)
&& (value == null || ['string', 'number', 'boolean'].includes(typeof value))))
}
/** Retain only the documented access-log projection and reject sensitive names recursively. */
export const sanitizeAccessLog = (row: unknown): Record<string, unknown> => {
return sanitizeScalarProjection(row, SAFE_ACCESS_LOG_KEYS)
}
/** Audit query DTO allowlist. Payload, attributes, integrity data and nested values stay client-invisible. */
export const sanitizeAuditEvent = (row: unknown): Record<string, unknown> =>
sanitizeScalarProjection(row, SAFE_AUDIT_EVENT_KEYS)
+183
View File
@@ -0,0 +1,183 @@
import { AUDIT_READ_CAPABILITIES, type AuditLane } from '@/authorization/audit'
export type PageAccessKey =
| 'applications'
| 'applicationDetail'
| 'applicationCreate'
| 'applicationEdit'
| 'financeOperations'
| 'financeReceipt'
| 'sources'
| 'payments'
| 'logs'
| 'logsAccess'
| 'logsSecurity'
| 'logsBusiness'
| 'logsIntegration'
| 'expenseTypes'
| 'businessSettings'
| 'legalEntities'
| 'costCenters'
| 'currencies'
| 'budgets'
| 'paymentMethods'
| 'paymentAccounts'
| 'payees'
| 'users'
| 'userGroups'
| 'userRoles'
| 'directory'
| 'integrationSettings'
| 'integration'
| 'kingdee'
| 'scheduledTasks'
type PageAccessOption = {
permissions: readonly string[]
capabilities?: readonly string[]
}
const option = (permission: string, capabilities?: readonly string[]): PageAccessOption => ({
permissions: [permission],
capabilities,
})
const logsAccess = option('page.operation-log', AUDIT_READ_CAPABILITIES.access)
const logsSecurity = option('page.audit-log', AUDIT_READ_CAPABILITIES.security)
const logsBusiness = option('page.audit-log', AUDIT_READ_CAPABILITIES.business)
const logsIntegration = option('page.audit-log', AUDIT_READ_CAPABILITIES.integration)
const userGroups = option('page.groups', ['iam.group:read'])
const userRoles = option('page.roles', ['iam.role:read'])
const directory = option('page.feishu-directory', ['integration.feishu:read'])
const integration = option('page.integration-config', ['integration.config:read'])
const kingdee = option('page.kingdee-account-binding', [
'integration.kingdee:read',
'integration.kingdee.account:read-own',
'integration.kingdee.account:read-all',
])
export const PAGE_ACCESS_RULES: Record<PageAccessKey, readonly PageAccessOption[]> = {
applications: [option('page.applications', ['reimbursement.application:read'])],
applicationDetail: [option('page.application-detail', ['reimbursement.application:read'])],
applicationCreate: [option('page.application-create', ['reimbursement.application:create'])],
applicationEdit: [option('page.application-edit', ['reimbursement.application:edit'])],
financeOperations: [
option('page.finance-receipt', ['finance.receipt:receive']),
option('page.finance-receipt', ['finance.payment:read', 'finance.payment:register', 'finance.payment:review']),
],
financeReceipt: [option('page.finance-receipt', ['finance.receipt:receive'])],
sources: [option('page.source-documents')],
payments: [option('page.finance-receipt', ['finance.payment:read', 'finance.payment:register', 'finance.payment:review'])],
logs: [logsAccess, logsSecurity, logsBusiness, logsIntegration],
logsAccess: [logsAccess],
logsSecurity: [logsSecurity],
logsBusiness: [logsBusiness],
logsIntegration: [logsIntegration],
expenseTypes: [option('page.expense-types')],
businessSettings: [option('page.expense-types'), option('page.payees')],
legalEntities: [option('page.legal-entities')],
costCenters: [option('page.cost-centers')],
currencies: [option('page.currencies')],
budgets: [option('page.budgets')],
paymentMethods: [option('page.payment-methods')],
paymentAccounts: [option('page.payment-accounts')],
payees: [option('page.payees')],
users: [userGroups, userRoles, directory],
userGroups: [userGroups],
userRoles: [userRoles],
directory: [directory],
integrationSettings: [integration, kingdee],
integration: [integration],
kingdee: [kingdee],
scheduledTasks: [option('page.scheduled-tasks', ['integration.schedule:read'])],
}
export type PageAccessCheck = (code: string) => boolean
export const hasPageAccess = (
key: PageAccessKey,
canReadPage: PageAccessCheck,
canUseCapability: PageAccessCheck,
): boolean => PAGE_ACCESS_RULES[key].some(rule =>
rule.permissions.some(canReadPage)
&& (!rule.capabilities?.length || rule.capabilities.some(canUseCapability)),
)
const AUDIT_LANE_PAGE_ACCESS: Record<AuditLane, PageAccessKey> = {
access: 'logsAccess',
security: 'logsSecurity',
business: 'logsBusiness',
integration: 'logsIntegration',
}
export const hasAuditLaneAccess = (
lane: AuditLane,
canReadPage: PageAccessCheck,
canUseCapability: PageAccessCheck,
): boolean => hasPageAccess(AUDIT_LANE_PAGE_ACCESS[lane], canReadPage, canUseCapability)
export const visibleAuditLanes = (
canReadPage: PageAccessCheck,
canUseCapability: PageAccessCheck,
): AuditLane[] => (Object.keys(AUDIT_LANE_PAGE_ACCESS) as AuditLane[])
.filter(lane => hasAuditLaneAccess(lane, canReadPage, canUseCapability))
export const selectAccessibleTab = <T extends string>(
requested: unknown,
current: T,
available: readonly T[],
): T | null => {
const requestedKey = String(requested ?? '').trim() as T
if (available.includes(requestedKey)) return requestedKey
if (available.includes(current)) return current
return available[0] ?? null
}
export const pageAccessNeedsCapabilities = (key: PageAccessKey): boolean =>
PAGE_ACCESS_RULES[key].some(rule => Boolean(rule.capabilities?.length))
export const pageAccessHasPermissionOnlyOption = (key: PageAccessKey): boolean =>
PAGE_ACCESS_RULES[key].some(rule => !rule.capabilities?.length)
export const usersPageAccessKey = (tab: unknown): PageAccessKey => {
const normalized = String(tab ?? '').trim().toLowerCase()
if (normalized === 'directory') return 'directory'
if (normalized === 'groups') return 'userGroups'
if (normalized === 'roles') return 'userRoles'
if (normalized === 'users') return 'users'
return 'users'
}
export const integrationPageAccessKey = (tab: unknown): PageAccessKey =>
String(tab ?? '').trim().toLowerCase() === 'kingdee' ? 'kingdee' : 'integrationSettings'
export type PageLanding = { path: string; query?: Record<string, string> }
const landingCandidates: ReadonlyArray<{ key: PageAccessKey; target: PageLanding }> = [
{ key: 'applications', target: { path: '/applications' } },
{ key: 'applicationCreate', target: { path: '/applications/new' } },
{ key: 'financeOperations', target: { path: '/finance-receipt' } },
{ key: 'sources', target: { path: '/sources' } },
{ key: 'logs', target: { path: '/logs' } },
{ key: 'expenseTypes', target: { path: '/expense-types' } },
{ key: 'payees', target: { path: '/payees' } },
{ key: 'legalEntities', target: { path: '/legal-entities' } },
{ key: 'costCenters', target: { path: '/cost-centers' } },
{ key: 'currencies', target: { path: '/currencies' } },
{ key: 'budgets', target: { path: '/budgets' } },
{ key: 'paymentMethods', target: { path: '/payment-methods' } },
{ key: 'paymentAccounts', target: { path: '/payment-accounts' } },
{ key: 'userGroups', target: { path: '/users', query: { tab: 'groups' } } },
{ key: 'userRoles', target: { path: '/users', query: { tab: 'roles' } } },
{ key: 'directory', target: { path: '/users', query: { tab: 'directory' } } },
{ key: 'integration', target: { path: '/integration-config' } },
{ key: 'kingdee', target: { path: '/integration-config', query: { tab: 'kingdee' } } },
{ key: 'scheduledTasks', target: { path: '/scheduled-tasks' } },
]
export const firstAccessiblePage = (
canReadPage: PageAccessCheck,
canUseCapability: PageAccessCheck,
): PageLanding => landingCandidates.find(candidate =>
hasPageAccess(candidate.key, canReadPage, canUseCapability),
)?.target ?? { path: '/access-denied' }
+13
View File
@@ -0,0 +1,13 @@
export type SearchField = {
readable: boolean
values: readonly unknown[]
}
export const matchesReadableSearch = (query: unknown, fields: readonly SearchField[]): boolean => {
const normalized = String(query ?? '').trim().toLocaleLowerCase()
if (!normalized) return true
return fields
.filter(field => field.readable)
.flatMap(field => field.values)
.some(value => String(value ?? '').toLocaleLowerCase().includes(normalized))
}
+23
View File
@@ -0,0 +1,23 @@
import type { PermissionAccess } from '@/api/admin'
export type UiPermissionReader = (code: string) => PermissionAccess
const ACCESS_RANK: Record<PermissionAccess, number> = { HIDDEN: 0, READ: 1, EDIT: 2 }
/**
* The menu catalog is an additional UX boundary only. A catalog grant can
* hide UI that the canonical engine would allow, but can never turn a denied
* business capability into an allowed action.
*/
export const hasUiPermission = (
readAccess: UiPermissionReader,
code: string,
minimum: Exclude<PermissionAccess, 'HIDDEN'> = 'READ',
): boolean => ACCESS_RANK[readAccess(code) || 'HIDDEN'] >= ACCESS_RANK[minimum]
export const canUseUiPermission = (
readAccess: UiPermissionReader,
code: string,
canonicalAllowed: boolean,
minimum: Exclude<PermissionAccess, 'HIDDEN'> = 'READ',
): boolean => canonicalAllowed && hasUiPermission(readAccess, code, minimum)
+91
View File
@@ -0,0 +1,91 @@
<template>
<form class="employee-filter" role="search" aria-label="员工高级筛选" @submit.prevent="submit">
<div class="employee-filter__primary">
<label for="employee-filter-keyword">综合关键词</label>
<input id="employee-filter-keyword" v-model="draft.keyword" type="search" autocomplete="off" placeholder="姓名、工号、职位、邮箱、手机号或账号标识" :disabled="disabled || loading">
<button class="btn small employee-filter__toggle" type="button" :aria-expanded="advancedOpen" aria-controls="employee-filter-advanced" :disabled="disabled || loading" @click="advancedOpen = !advancedOpen">{{ advancedOpen ? '收起高级筛选' : '展开高级筛选' }}</button>
</div>
<div v-show="advancedOpen" id="employee-filter-advanced" class="employee-filter__advanced">
<label v-if="allows('name')">姓名<input v-model="draft.name" type="search" autocomplete="off" :disabled="disabled || loading"></label>
<label v-if="allows('employeeNo')">工号<input v-model="draft.employeeNo" type="search" autocomplete="off" :disabled="disabled || loading"></label>
<label v-if="allows('jobTitle')">职位<input v-model="draft.jobTitle" type="search" autocomplete="off" :disabled="disabled || loading"></label>
<label v-if="allows('email')">邮箱<input v-model="draft.email" type="search" autocomplete="off" inputmode="email" :disabled="disabled || loading"></label>
<label v-if="allows('mobile')">手机号<input v-model="draft.mobile" type="search" autocomplete="off" inputmode="tel" :disabled="disabled || loading"></label>
<label v-if="allows('accountId')">账号标识<input v-model="draft.accountId" type="search" autocomplete="off" placeholder="userId 或 openId" :disabled="disabled || loading"></label>
<label v-if="allows('employmentStatus')">在职状态<select v-model="draft.employmentStatus" :disabled="disabled || loading"><option value="">全部状态</option><option value="ACTIVE">在职</option><option value="RESIGNED">已离职</option></select></label>
</div>
<div class="employee-filter__footer">
<p class="employee-filter__summary" aria-live="polite">当前范围 {{ scopeTotal }} 人 · 匹配 {{ matchedTotal }} 人 · {{ activeCount }} 个有效条件</p>
<div class="employee-filter__actions">
<button class="btn small" type="button" :disabled="disabled || loading" @click="clear">清空</button>
<button class="btn primary small" type="submit" :disabled="disabled || loading">{{ loading ? '加载中…' : '搜索' }}</button>
</div>
</div>
</form>
</template>
<script setup lang="ts">
import { computed, reactive, ref, watch } from 'vue'
import { activeEmployeeFilterCount, employeeFilterFields, emptyEmployeeFilter, restrictEmployeeFilter, type EmployeeFilterConditions, type EmployeeFilterField } from '@/components/employeeDirectoryFilter'
const props = withDefaults(defineProps<{
modelValue: EmployeeFilterConditions
scopeTotal: number
matchedTotal: number
loading?: boolean
disabled?: boolean
allowedFields?: EmployeeFilterField[]
}>(), { loading: false, disabled: false, allowedFields: () => [...employeeFilterFields] })
const emit = defineEmits<{
'update:modelValue': [value: EmployeeFilterConditions]
apply: [value: EmployeeFilterConditions]
clear: []
}>()
const draft = reactive<EmployeeFilterConditions>(emptyEmployeeFilter())
const advancedOpen = ref(false)
const activeCount = computed(() => activeEmployeeFilterCount(props.modelValue))
const allows = (field: EmployeeFilterField) => props.allowedFields.includes(field)
watch(() => [props.modelValue, props.allowedFields] as const, ([value]) => Object.assign(draft, restrictEmployeeFilter(value, props.allowedFields)), { deep: true, immediate: true })
function submit() {
const value = restrictEmployeeFilter(draft, props.allowedFields)
emit('update:modelValue', value)
emit('apply', value)
}
function clear() {
const value = emptyEmployeeFilter()
Object.assign(draft, value)
emit('update:modelValue', value)
emit('clear')
}
</script>
<style scoped>
.employee-filter { display: grid; min-width: 0; flex: 1 1 720px; gap: 10px; container: employee-filter / inline-size; }
.employee-filter label { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 600; }
.employee-filter input, .employee-filter select { width: 100%; min-width: 0; box-sizing: border-box; }
.employee-filter__primary { display: grid; min-width: 0; align-items: end; grid-template-columns: minmax(220px, 1fr) auto; gap: 6px 10px; }
.employee-filter__primary > label { grid-column: 1 / -1; }
.employee-filter__advanced { display: grid; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px 10px; }
.employee-filter__advanced label { display: grid; gap: 5px; }
.employee-filter__footer { display: flex; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.employee-filter__summary { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.employee-filter__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@container employee-filter (max-width: 560px) {
.employee-filter__primary { grid-template-columns: minmax(0, 1fr); }
.employee-filter__primary > label { grid-column: auto; }
.employee-filter__toggle, .employee-filter__actions, .employee-filter__actions .btn { width: 100%; }
.employee-filter__advanced { grid-template-columns: minmax(0, 1fr); }
.employee-filter__footer { align-items: stretch; flex-direction: column; }
}
@media (max-width: 860px) {
.employee-filter { width: 100%; flex-basis: 100%; }
}
@media (max-width: 480px) {
.employee-filter__primary, .employee-filter__advanced { grid-template-columns: minmax(0, 1fr); }
.employee-filter__toggle, .employee-filter__actions, .employee-filter__actions .btn { width: 100%; }
}
</style>
+208 -90
View File
@@ -1,151 +1,269 @@
<template> <template>
<section class="card directory-panel" aria-labelledby="directory-title"> <section class="card directory-panel" aria-labelledby="directory-title">
<div class="card-head directory-head"> <div class="card-head directory-head">
<div><h2 id="directory-title">飞书通讯录同步</h2><p>同步飞书员工资料与目录状态;不作为 OAuth 登录条件;同步失败会保留当前目录</p></div> <div><h2 id="directory-title">飞书通讯录同步</h2><p>同步飞书员工资料与目录状态;同步失败会保留当前可用目录。</p></div>
<div class="directory-actions"> <div class="directory-actions">
<router-link v-if="canManageSchedule" class="btn small" to="/scheduled-tasks">管理自动同步</router-link> <router-link v-if="canManageSchedule" class="btn small" to="/scheduled-tasks">管理自动同步</router-link>
<button class="btn small" type="button" :disabled="loading || submitting" @click="refreshStatus">{{ loading ? '查询中…' : '刷新状态' }}</button> <button v-if="canViewRuns" class="btn small" type="button" @click="openRunsDialog">查看同步记录</button>
<button v-if="canSync" class="btn primary" type="button" :disabled="syncDisabled" :aria-busy="submitting" @click="sync">{{ submitting || status?.running ? '同步中…' : '同步飞书通讯录' }}</button> <button v-if="canSync" class="btn primary" type="button" :disabled="syncDisabled" :aria-busy="submitting || syncPending" @click="sync">{{ submitting || syncPending || status?.running ? '同步中…' : '同步飞书通讯录' }}</button>
</div> </div>
</div> </div>
<div class="directory-body"> <p class="sr-status" aria-live="polite" aria-atomic="true">{{ liveMessage }}</p>
<p v-if="loading" role="status">正在确认通讯录同步状态…</p>
<div v-if="error" class="inline-alert danger" role="alert"><span>{{ error }}</span><button class="btn small" type="button" :disabled="loading || submitting" @click="refreshStatus">重试查询状态</button></div> <dialog v-if="canViewRuns" ref="runsDialog" v-dialog-drag class="app-dialog directory-runs-dialog" aria-labelledby="directory-runs-title" aria-modal="true" @cancel="handleRunsCancel" @click="handleRunsBackdrop">
<div aria-live="polite" aria-atomic="true"> <section class="app-dialog__panel">
<p v-if="submitting || status?.running" role="status">同步正在进行,请勿重复提交。完成后将自动更新状态。</p> <header class="modal-head" data-dialog-drag-handle>
<template v-if="status"> <div><span class="eyebrow">DIRECTORY SYNC HISTORY</span><h2 id="directory-runs-title">同步记录</h2><p>按入队时间从新到旧显示;仅展示安全错误码,不展示上游错误明文。</p></div>
<p v-if="!status.configured">飞书通讯录尚未配置,请联系管理员配置应用凭证与通讯录权限。</p> <button class="modal-close" type="button" aria-label="关闭同步记录" @click="closeRunsDialog"></button>
<dl class="directory-meta"> </header>
<div><dt>当前目录</dt><dd>{{ availabilityLabels[currentAvailability] }}</dd></div> <div class="modal-body directory-runs-body">
<div><dt>上次成功更新 <span class="time-zone-label">本地时间</span></dt><dd>{{ formatLocalDateTime(status.lastSuccessfulAt, '暂无') }}</dd></div> <div class="directory-runs-toolbar"><span class="muted-copy">共 {{ runsTotal }} 条</span><button class="btn small" type="button" :disabled="runsLoading" @click="refreshRuns">{{ runsLoading ? '刷新中…' : '刷新' }}</button></div>
<div><dt>当前版本</dt><dd>{{ status.currentRevision || status.lastSuccessfulRunId || '暂无' }}</dd></div> <div v-if="runsLoading" class="load-wrap directory-runs-state" role="status" aria-live="polite"><span class="loader" aria-hidden="true"></span><span>正在加载同步记录…</span></div>
<div><dt>配置上下文</dt><dd>{{ contextLabels[currentContext] }}</dd></div> <div v-else-if="runsError" class="empty-state directory-runs-state" role="alert"><strong>同步记录加载失败</strong><span>{{ runsError }}</span><button class="btn small" type="button" @click="refreshRuns">重试</button></div>
</dl> <div v-else-if="!runs.length" class="empty-state directory-runs-state"><strong>暂无同步记录</strong><span>通讯录同步运行后,结果会显示在这里。</span></div>
<p v-if="currentContext === 'CHANGED'" class="directory-warning" role="status">应用配置上下文已变化,这是更新提示,不会停用已经可用的当前目录;可同步以更新资料。</p> <div v-else class="directory-run-list" role="list" aria-label="飞书通讯录同步记录">
<p v-else-if="status.snapshotState === 'STALE'" class="directory-warning" role="status">服务返回旧版 STALE 状态;{{ currentAvailability === 'AVAILABLE' ? '当前目录仍可继续使用,建议同步更新资料。' : '当前服务未确认目录可用,请同步后再添加成员。' }}</p> <article v-for="item in runs" :key="item.runId" class="directory-run" role="listitem">
</template> <div class="directory-run__head"><div><span class="state-badge" :class="runTone(item.state)">{{ stateLabels[item.state] }}</span><strong>{{ triggerLabels[item.trigger] }}</strong></div><span>{{ item.applied ? '已生效' : item.complete ? '未生效,保留原目录' : '尚未完成' }}</span></div>
<template v-if="run"> <dl class="directory-run__times"><div><dt>开始时间</dt><dd>{{ formatLocalDateTime(item.startedAt || item.queuedAt, '尚未开始') }}</dd></div><div><dt>结束时间</dt><dd>{{ formatLocalDateTime(item.finishedAt, '尚未结束') }}</dd></div><div><dt>触发方式</dt><dd>{{ triggerLabels[item.trigger] }}</dd></div></dl>
<p>最近运行:{{ triggerLabels[run.trigger] }} · {{ stateLabels[run.state] }} · {{ run.applied ? '已提交' : '未提交,保留当前目录' }}</p> <dl class="directory-run__counts"><div><dt>成功处理</dt><dd>{{ runSummary(item).success }}</dd></div><div><dt>失败运行</dt><dd>{{ runSummary(item).failed }}</dd></div><div><dt>跳过</dt><dd>{{ runSummary(item).skipped }}</dd></div><div><dt>扫描员工</dt><dd>{{ item.counts.usersSeen }}</dd></div></dl>
<p class="muted-copy">运行时间(本地时间):{{ formatLocalDateTime(run.startedAt) }} — {{ formatLocalDateTime(run.finishedAt, '尚未结束') }} · 运行 ID:{{ run.runId }}</p> <p v-if="safeErrorCode(item.errorCode)" class="directory-run__error">安全错误码:<code>{{ safeErrorCode(item.errorCode) }}</code></p>
<p v-if="run.state === 'FAILED' || run.errorMessage" class="directory-failure" role="alert">{{ run.errorCode || '同步失败' }}:{{ run.errorMessage || '同步未完成,请检查配置后重试。' }}</p> </article>
<dl class="directory-counts"><div v-for="(label, key) in countLabels" :key="key"><dt>{{ label }}</dt><dd>{{ run.counts[key] }}</dd></div></dl>
</template>
</div> </div>
<AppListPagination v-if="!runsLoading && !runsError && runsTotal" :page="runsPage" :page-size="runsPageSize" :total="runsTotal" :disabled="runsLoading" :page-sizes="[10, 20, 50]" aria-label="同步记录分页" @update:page="handleRunsPageChange" @update:page-size="handleRunsPageSizeChange" />
</div> </div>
<footer class="modal-actions"><button class="btn" type="button" @click="closeRunsDialog">关闭</button></footer>
</section>
</dialog>
</section> </section>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed, onMounted, onBeforeUnmount, ref } from 'vue' import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import { directoryAvailability, feishuDirectoryApi, type DirectoryContextState, type DirectoryRun, type DirectoryStatus } from '@/api/feishuDirectory' import { ElMessage } from '@/utils/uiFeedback'
import AppListPagination from '@/components/common/AppListPagination.vue'
import { feishuDirectoryApi, type DirectoryRun, type DirectoryRunRecord, type DirectoryStatus } from '@/api/feishuDirectory'
import { createDirectoryRunRequestGate, createDirectoryStatusPoller, directorySyncOutcome, summarizeDirectoryRun } from '@/components/feishuDirectoryRuns'
import { useAuthorizationStore } from '@/store/authorization'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
const emit = defineEmits<{ committed: [] }>() const emit = defineEmits<{ committed: [] }>()
const userStore = useUserStore() const userStore = useUserStore()
const canSync = computed(() => userStore.canEdit('system.feishu.directory.sync')) const authorizationStore = useAuthorizationStore()
const canRead = computed(() => userStore.canRead('page.feishu-directory')) const canSync = computed(() => userStore.canEdit('system.feishu.directory.sync') && authorizationStore.can('integration.feishu:sync'))
const canManageSchedule = computed(() => userStore.canRead('page.scheduled-tasks')) const canRead = computed(() => userStore.canRead('page.feishu-directory') && authorizationStore.can('integration.feishu:read'))
const canViewRuns = computed(() => canRead.value && userStore.canRead('dialog.directory.runs'))
const canManageSchedule = computed(() => userStore.canRead('page.scheduled-tasks') && authorizationStore.can('integration.schedule:read'))
const status = ref<DirectoryStatus | null>(null) const status = ref<DirectoryStatus | null>(null)
const run = ref<DirectoryRun | null>(null) const statusLoading = ref(false)
const loading = ref(false)
const submitting = ref(false) const submitting = ref(false)
const syncPending = ref(false)
const uncertain = ref(true) const uncertain = ref(true)
const error = ref('') const liveMessage = ref('')
const currentAvailability = computed(() => status.value ? directoryAvailability(status.value) : 'UNAVAILABLE') const syncDisabled = computed(() => !canSync.value || statusLoading.value || submitting.value || syncPending.value || uncertain.value || status.value?.running || (!!status.value && !status.value.configured))
const currentContext = computed<DirectoryContextState>(() => {
if (status.value?.contextState === 'MATCH' || status.value?.contextState === 'CHANGED' || status.value?.contextState === 'UNKNOWN') return status.value.contextState
return status.value?.snapshotState === 'CONTEXT_CHANGED' ? 'CHANGED' : 'UNKNOWN'
})
const syncDisabled = computed(() => !canSync.value || loading.value || submitting.value || uncertain.value || !status.value?.configured || status.value.running)
const controller = new AbortController()
let disposed = false
let timer: ReturnType<typeof setTimeout> | undefined
let observedSuccess: string | null | undefined
const availabilityLabels = { AVAILABLE: '可用', NEVER_SYNCED: '尚未同步', UNAVAILABLE: '不可用' }
const contextLabels: Record<DirectoryContextState, string> = { MATCH: '一致', CHANGED: '已变化(仅提示)', UNKNOWN: '未知' }
const stateLabels = { RUNNING: '运行中', SUCCEEDED: '成功', FAILED: '失败' }
const triggerLabels: Record<DirectoryRun['trigger'], string> = { MANUAL: '手动同步', STARTUP: '启动同步', SCHEDULED: '自动同步' }
const countLabels = { departments: '部门', usersSeen: '扫描员工', excluded: '排除', created: '新增用户', updated: '更新用户', outOfScope: '可见范围外' }
// Date getters intentionally use the browser's local timezone instead of const runsDialog = ref<HTMLDialogElement | null>(null)
// rendering the server's UTC ISO value. Keep the fallback caller-controlled so const runsOpen = ref(false)
// an absent successful result and an absent finish time can retain their own const runs = ref<DirectoryRunRecord[]>([])
// user-facing wording. const runsPage = ref(1)
const runsPageSize = ref(20)
const runsTotal = ref(0)
const runsLoading = ref(false)
const runsError = ref('')
const runsGate = createDirectoryRunRequestGate()
let disposed = false
let statusController: AbortController | null = null
let syncController: AbortController | null = null
let runsController: AbortController | null = null
let observedSuccess: string | null | undefined
const stateLabels: Record<DirectoryRunRecord['state'], string> = { RUNNING: '运行中', SUCCEEDED: '成功', FAILED: '失败' }
const triggerLabels: Record<DirectoryRunRecord['trigger'], string> = { MANUAL: '手动同步', STARTUP: '启动同步', SCHEDULED: '自动同步' }
const formatLocalDateTime = (value: unknown, fallback = '—') => { const formatLocalDateTime = (value: unknown, fallback = '—') => {
const date = value instanceof Date const date = value instanceof Date ? value : new Date(typeof value === 'string' || typeof value === 'number' ? value : '')
? value
: new Date(typeof value === 'string' || typeof value === 'number' ? value : '')
if (!Number.isFinite(date.getTime())) return fallback if (!Number.isFinite(date.getTime())) return fallback
const pad = (part: number) => String(part).padStart(2, '0') const pad = (part: number) => String(part).padStart(2, '0')
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}` return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`
} }
const safeErrorCode = (value: unknown) => typeof value === 'string' && /^[A-Z0-9_]{1,80}$/.test(value) ? value : ''
const runSummary = (item: DirectoryRunRecord) => summarizeDirectoryRun(item)
const runTone = (state: DirectoryRunRecord['state']) => state === 'SUCCEEDED' ? 'success' : state === 'FAILED' ? 'danger' : 'running'
const statusPoller = createDirectoryStatusPoller(
() => { void refreshStatus(false) },
() => canRead.value && !disposed,
)
function committed(id: string) { function committed(id: string) {
if (observedSuccess !== id) { if (observedSuccess === id) return
observedSuccess = id observedSuccess = id
emit('committed') emit('committed')
} if (runsOpen.value) void loadRuns(true)
} }
async function refreshStatus() { async function refreshStatus(notifyFailure = false) {
if (disposed || !canRead.value || loading.value) return if (disposed || !canRead.value) {
clearTimeout(timer) statusPoller.confirmIdle()
loading.value = true return false
}
if (statusLoading.value) return false
statusPoller.clearScheduled()
statusController?.abort()
const controller = new AbortController()
statusController = controller
statusLoading.value = true
uncertain.value = true uncertain.value = true
try { try {
const next = await feishuDirectoryApi.status(controller.signal) const next = await feishuDirectoryApi.status(controller.signal)
if (disposed) return if (disposed || controller.signal.aborted || statusController !== controller) return false
if (observedSuccess !== undefined && next.lastSuccessfulRunId) committed(next.lastSuccessfulRunId) if (observedSuccess !== undefined && next.lastSuccessfulRunId) committed(next.lastSuccessfulRunId)
else observedSuccess = next.lastSuccessfulRunId else observedSuccess = next.lastSuccessfulRunId
status.value = next status.value = next
run.value = next.lastRun
uncertain.value = false uncertain.value = false
error.value = '' syncPending.value = next.running
if (next.running) timer = setTimeout(() => void refreshStatus(), 5000) liveMessage.value = next.running ? '通讯录同步正在运行。' : ''
if (next.running) statusPoller.confirmRunning()
else statusPoller.confirmIdle()
return true
} catch { } catch {
if (!disposed) error.value = '无法确认同步状态,已暂停同步操作。请重试查询状态后再操作。' if (!disposed && !controller.signal.aborted) {
uncertain.value = true
statusPoller.recoverUnknown()
if (notifyFailure) ElMessage.error('无法确认同步状态,请稍后重试。')
}
return false
} finally { } finally {
loading.value = false if (statusController === controller) statusLoading.value = false
} }
} }
async function sync() { async function sync() {
if (syncDisabled.value) return if (syncDisabled.value) return
clearTimeout(timer) if (status.value?.running) return void ElMessage.warning('通讯录同步正在运行,请勿重复提交。')
if (status.value && !status.value.configured) return void ElMessage.warning('飞书通讯录尚未配置,暂时无法同步。')
statusPoller.clearScheduled()
syncController?.abort()
const controller = new AbortController()
syncController = controller
submitting.value = true submitting.value = true
uncertain.value = true liveMessage.value = '正在提交飞书通讯录同步。'
error.value = ''
try { try {
const result = await feishuDirectoryApi.sync(controller.signal) const result: DirectoryRun = await feishuDirectoryApi.sync(controller.signal)
if (disposed) return if (disposed || controller.signal.aborted) return
run.value = result const outcome = directorySyncOutcome(result)
if (result.state === 'SUCCEEDED' && result.complete && result.applied) committed(result.runId) if (outcome === 'RUNNING') {
uncertain.value = true
syncPending.value = true
status.value = status.value ? { ...status.value, running: true } : status.value
statusPoller.beginActive()
liveMessage.value = '同步任务已提交,正在等待服务器完成。'
ElMessage.info('同步任务已提交,正在后台同步。')
} else if (outcome === 'APPLIED') {
uncertain.value = false
syncPending.value = false
statusPoller.confirmIdle()
committed(result.runId)
ElMessage.success('飞书通讯录同步成功。')
} else {
uncertain.value = false
syncPending.value = false
statusPoller.confirmIdle()
const code = safeErrorCode(result.errorCode)
const prefix = outcome === 'FAILED' ? '同步失败' : '同步已完成但未生效'
ElMessage.warning(code ? `${prefix}(${code}),已保留原目录。` : `${prefix},已保留原目录。`)
}
} catch { } catch {
// Includes timeouts, network errors, 409 and failed runs returned as HTTP 503. if (!disposed && !controller.signal.aborted) {
// Never enable another POST until GET confirms the server is not running. uncertain.value = true
if (!disposed) error.value = '同步请求未确认(可能超时或失败),正在查询服务器状态,请勿重复提交。' syncPending.value = true
statusPoller.beginActive()
ElMessage.error('同步请求未确认,正在重新确认服务器状态,请勿重复提交。')
}
} finally { } finally {
await refreshStatus() if (!disposed) await refreshStatus(false)
submitting.value = false if (syncController === controller) submitting.value = false
} }
} }
onMounted(refreshStatus) async function loadRuns(resetPage = false) {
onBeforeUnmount(() => { disposed = true; clearTimeout(timer); controller.abort() }) if (!runsOpen.value || !canViewRuns.value || disposed) return
if (resetPage) runsPage.value = 1
runsController?.abort()
const controller = new AbortController()
runsController = controller
const requestGeneration = runsGate.begin()
runsLoading.value = true
runsError.value = ''
try {
const page = await feishuDirectoryApi.runs(runsPage.value - 1, runsPageSize.value, controller.signal)
if (disposed || controller.signal.aborted || !runsGate.isCurrent(requestGeneration) || !runsOpen.value) return
runs.value = Array.isArray(page.items) ? page.items : []
runsTotal.value = Number.isFinite(page.total) && page.total > 0 ? Math.floor(page.total) : 0
} catch {
if (disposed || controller.signal.aborted || !runsGate.isCurrent(requestGeneration) || !runsOpen.value) return
runs.value = []
runsError.value = '无法加载同步记录,请稍后重试。'
} finally {
if (runsGate.isCurrent(requestGeneration)) runsLoading.value = false
}
}
function openRunsDialog() {
if (!canViewRuns.value) return
runsOpen.value = true
runsPage.value = 1
runsError.value = ''
if (!runsDialog.value?.open) runsDialog.value?.showModal()
void loadRuns(true)
}
function closeRunsDialog() {
runsOpen.value = false
runsGate.invalidate()
runsController?.abort()
runsLoading.value = false
runsDialog.value?.close()
}
function handleRunsCancel(event: Event) { event.preventDefault(); closeRunsDialog() }
function handleRunsBackdrop(event: MouseEvent) { if (event.target === runsDialog.value) closeRunsDialog() }
function refreshRuns() { void loadRuns(true) }
function handleRunsPageChange(page: number) { runsPage.value = Math.max(1, Math.floor(page)); void loadRuns(false) }
function handleRunsPageSizeChange(size: number) { runsPageSize.value = [10, 20, 50].includes(Number(size)) ? Number(size) : 20; runsPage.value = 1; void loadRuns(false) }
onMounted(() => { void refreshStatus(false) })
onBeforeUnmount(() => {
disposed = true
statusPoller.dispose()
runsGate.invalidate()
statusController?.abort()
syncController?.abort()
runsController?.abort()
})
</script> </script>
<style scoped> <style scoped>
.directory-panel { min-width: 0; flex: none; } .directory-panel { min-width: 0; flex: none; }
.directory-head { flex-wrap: wrap; gap: 12px; } .directory-head { flex-wrap: wrap; gap: 12px; }
.directory-head > div:first-child { flex: 1 1 320px; min-width: 0; } .directory-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.directory-head p, .directory-body { overflow-wrap: anywhere; } .directory-head p, .directory-run { overflow-wrap: anywhere; }
.directory-actions { display: flex; flex-wrap: wrap; gap: 8px; } .directory-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.directory-body { padding: 0 22px 20px; font-size: 12px; color: var(--muted); } .directory-runs-dialog { width: min(920px, calc(100vw - 24px)); max-width: calc(100vw - 24px); overflow: hidden; }
.directory-body p { margin: 10px 0; } .directory-runs-dialog > .app-dialog__panel { width: 100%; min-width: 0; max-width: 100%; }
.directory-meta, .directory-counts { display: grid; gap: 12px; margin: 12px 0 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .directory-runs-body { min-width: 0; min-height: 220px; overflow-x: hidden; overflow-y: auto; }
.directory-counts { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); } .directory-runs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
dt { color: var(--muted); } dd { margin: 4px 0 0; color: var(--body); } .directory-runs-state { min-height: 190px; }
.time-zone-label { color: var(--quiet); font-size: 10px; font-weight: 400; white-space: nowrap; } .directory-run-list { display: grid; min-width: 0; gap: 12px; }
.directory-failure { color: var(--danger); } .directory-run { min-width: 0; padding: clamp(12px, 2vw, 18px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }
.directory-warning { color: var(--warning); } .directory-run__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.directory-run__head > div { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.directory-run__head > span { color: var(--muted); font-size: 11px; text-align: right; }
.directory-run__times, .directory-run__counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 8px 14px; margin: 12px 0 0; }
.directory-run__counts { grid-template-columns: repeat(auto-fit, minmax(min(90px, 100%), 1fr)); }
.directory-run dt { color: var(--muted); font-size: 10px; }
.directory-run dd { margin: 3px 0 0; color: var(--body); }
.directory-run__error { margin: 12px 0 0; color: var(--danger); }
.directory-run__error code { color: inherit; }
@media (max-width: 450px) {
.directory-actions, .directory-actions .btn { width: 100%; }
.directory-runs-toolbar, .directory-run__head { align-items: stretch; flex-direction: column; }
.directory-run__head > span { text-align: left; }
}
</style> </style>
+114 -51
View File
@@ -6,15 +6,26 @@
</div> </div>
<div class="card fill-list-card primary-list-card" :class="{ 'panel-card': embedded }"> <div class="card fill-list-card primary-list-card" :class="{ 'panel-card': embedded }">
<div class="filter-bar"> <div class="filter-bar list-toolbar">
<div class="list-toolbar__filters">
<label v-if="canViewAll" class="filter-search"> <label v-if="canViewAll" class="filter-search">
<span aria-hidden="true">&#x1F50D;</span> <span aria-hidden="true">&#x1F50D;</span>
<input v-model="search" type="search" placeholder="搜索姓名、工号或金蝶账号" aria-label="搜索财务人员"> <input v-model="search" type="search" placeholder="搜索姓名或金蝶账号" aria-label="搜索财务人员">
</label> </label>
<span v-else class="filter-hint">当前权限:仅查看本人</span> <span v-else class="filter-hint">当前权限:仅查看本人</span>
<span class="filter-spacer"></span> </div>
<div class="list-toolbar__meta">
<button
v-if="canCreateBinding"
class="btn small primary"
type="button"
:disabled="loading || !addCandidates.length"
:title="addButtonTitle"
@click="openCreate"
>新增绑定</button>
<span class="tag info">{{ filtered.length }} 人</span> <span class="tag info">{{ filtered.length }} 人</span>
<span class="tag" :class="boundCount ? 'success' : 'neutral'">已绑定 {{ boundCount }}</span> <span v-if="uiRead('ui.kingdee.binding.column.status')" class="tag" :class="boundCount ? 'success' : 'neutral'">已绑定 {{ boundCount }}</span>
</div>
</div> </div>
<div v-if="loading" class="load-wrap" role="status"> <div v-if="loading" class="load-wrap" role="status">
@@ -24,30 +35,26 @@
<table class="data-table responsive-table"> <table class="data-table responsive-table">
<thead> <thead>
<tr> <tr>
<th>财务人员</th> <th v-if="uiRead('ui.kingdee.binding.column.employee')">财务人员</th> <th v-if="uiRead('ui.kingdee.binding.column.username')">金蝶账号</th>
<th>工号</th> <th v-if="uiRead('ui.kingdee.binding.column.status')">绑定状态</th>
<th>金蝶账号</th>
<th>绑定状态</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="item in paginatedItems" :key="item.userId"> <tr v-for="item in paginatedItems" :key="item.employeeOpenId">
<td data-label="财务人员"> <td v-if="uiRead('ui.kingdee.binding.column.employee')" data-label="财务人员">
<strong>{{ item.realName }}</strong> <strong>{{ item.realName }}</strong>
<small v-if="item.userId === meId" class="self-mark">本人</small> <small v-if="item.employeeOpenId === meId" class="self-mark">本人</small>
</td> </td> <td v-if="uiRead('ui.kingdee.binding.column.username')" data-label="金蝶账号"><small>{{ item.kingdeeUsername || '—' }}</small></td>
<td data-label="工号"><small>{{ item.employeeNo || '—' }}</small></td> <td v-if="uiRead('ui.kingdee.binding.column.status')" data-label="绑定状态">
<td data-label="金蝶账号"><small>{{ item.kingdeeUsername || '—' }}</small></td>
<td data-label="绑定状态">
<span class="tag" :class="item.bound ? 'success' : 'neutral'">{{ item.bound ? '已绑定' : '未绑定' }}</span> <span class="tag" :class="item.bound ? 'success' : 'neutral'">{{ item.bound ? '已绑定' : '未绑定' }}</span>
</td> </td>
<td data-label="操作" class="actions-cell"> <td data-label="操作" class="actions-cell">
<button v-if="canBindRow(item)" class="table-action" type="button" @click="openBind(item)"> <button v-if="canBindRow(item)" class="table-action" type="button" @click="openBind(item)">
{{ item.bound ? '重新绑定' : '绑定' }} {{ item.bound ? '重新绑定' : '绑定' }}
</button> </button>
<button v-if="canBindRow(item) && item.bound" class="table-action" type="button" :disabled="testingId === item.userId" @click="testBinding(item)"> <button v-if="canTestRow(item) && item.bound" class="table-action" type="button" :disabled="testingId === item.employeeOpenId" @click="testBinding(item)">
{{ testingId === item.userId ? '验证中…' : '验证' }} {{ testingId === item.employeeOpenId ? '验证中…' : '验证' }}
</button> </button>
<button v-if="canUnbindRow(item) && item.bound" class="table-action danger-action" type="button" @click="unbind(item)">解绑</button> <button v-if="canUnbindRow(item) && item.bound" class="table-action danger-action" type="button" @click="unbind(item)">解绑</button>
</td> </td>
@@ -68,35 +75,42 @@
/> />
</div> </div>
<dialog ref="bindDialog" v-dialog-drag class="app-dialog" aria-labelledby="kingdee-bind-title" @cancel.prevent="closeBind"> <dialog v-if="canOpenDialog" ref="bindDialog" v-dialog-drag class="app-dialog" aria-labelledby="kingdee-bind-title" @cancel.prevent="closeBind">
<form @submit.prevent="saveBind"> <form @submit.prevent="saveBind">
<div class="modal-head" data-dialog-drag-handle> <div class="modal-head" data-dialog-drag-handle>
<div> <div>
<span class="eyebrow">BIND KINGDEE ACCOUNT</span> <span class="eyebrow">BIND KINGDEE ACCOUNT</span>
<h2 id="kingdee-bind-title">绑定金蝶账号 · {{ editing?.realName }}</h2> <h2 id="kingdee-bind-title">{{ adding ? '新增金蝶账号绑定' : '绑定金蝶账号' }} · {{ activeBinding?.realName || '请选择人员' }}</h2>
<p>填写该人员在金蝶云星空的登录用户名与密码;保存前默认验证登录。</p> <p>填写该人员在金蝶云星空的登录用户名与密码;保存前默认验证登录。</p>
</div> </div>
<button class="modal-close" type="button" aria-label="关闭" :disabled="saving" @click="closeBind">×</button> <button class="modal-close" type="button" aria-label="关闭" :disabled="saving" @click="closeBind">×</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-grid"> <div class="form-grid">
<div class="field"> <div v-if="adding" class="field full">
<label for="kingdee-username">金蝶用户名 <em>*</em></label> <label for="kingdee-binding-user">绑定人员 <em>*</em></label>
<input id="kingdee-username" v-model.trim="form.kingdeeUsername" required autocomplete="username" :disabled="saving"> <select id="kingdee-binding-user" v-model="selectedEmployeeOpenId" class="select" required :disabled="saving">
<option :value="null" disabled>请选择未绑定人员</option>
<option v-for="item in addCandidates" :key="item.employeeOpenId" :value="item.employeeOpenId">{{ addCandidateLabel(item) }}</option>
</select>
</div> </div>
<div class="field"> <div v-if="uiRead('dialog.kingdee.account.username')" class="field">
<label for="kingdee-username">金蝶用户名 <em>*</em></label>
<input id="kingdee-username" v-model.trim="form.kingdeeUsername" required autocomplete="username" :disabled="saving || !uiEdit('dialog.kingdee.account.username')">
</div>
<div v-if="uiRead('dialog.kingdee.account.password')" class="field">
<label for="kingdee-password">金蝶密码 <em>*</em></label> <label for="kingdee-password">金蝶密码 <em>*</em></label>
<input id="kingdee-password" v-model="form.kingdeePassword" type="password" required autocomplete="new-password" :disabled="saving" :placeholder="editing?.bound ? '请重新输入密码' : '请输入金蝶密码'"> <input id="kingdee-password" v-model="form.kingdeePassword" type="password" required autocomplete="new-password" :disabled="saving || !uiEdit('dialog.kingdee.account.password')" :placeholder="editing?.bound ? '已安全保存;编辑时请重新输入' : '请输入金蝶密码'">
</div> </div>
<label class="check-option full"> <label class="check-option full">
<input v-model="form.verifyLogin" type="checkbox" :disabled="saving"> <input v-model="form.verifyLogin" type="checkbox" :disabled="saving || !canEditCredentials">
<span>保存前验证金蝶登录</span> <span>保存前验证金蝶登录</span>
</label> </label>
</div> </div>
</div> </div>
<div class="modal-actions"> <div class="modal-actions">
<button class="btn" type="button" :disabled="saving" @click="closeBind">取消</button> <button class="btn" type="button" :disabled="saving" @click="closeBind">取消</button>
<button class="btn primary" type="submit" :disabled="saving">{{ saving ? '保存中…' : '保存绑定' }}</button> <button v-if="canEditCredentials" class="btn primary" type="submit" :disabled="saving">{{ saving ? '保存中…' : '保存绑定' }}</button>
</div> </div>
</form> </form>
</dialog> </dialog>
@@ -105,35 +119,49 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, nextTick, onMounted, reactive, ref } from 'vue' import { computed, nextTick, onMounted, reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from '@/utils/uiFeedback'
import AppListPagination from '@/components/common/AppListPagination.vue' import AppListPagination from '@/components/common/AppListPagination.vue'
import { matchesReadableSearch } from '@/authorization/searchProjection'
import { useListPagination } from '@/composables/useListPagination' import { useListPagination } from '@/composables/useListPagination'
import { kingdeeAccountsApi, type KingdeeAccountBinding } from '@/api/kingdeeAccounts' import { kingdeeAccountsApi, type KingdeeAccountBinding } from '@/api/kingdeeAccounts'
import { useAuthorizationStore } from '@/store/authorization'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
defineProps<{ embedded?: boolean }>() defineProps<{ embedded?: boolean }>()
const userStore = useUserStore() const userStore = useUserStore()
const meId = computed(() => Number(userStore.userInfo?.id || 0) || null) const authorizationStore = useAuthorizationStore()
const canViewAll = computed(() => userStore.canRead('finance.kingdee.account.view-all')) const uiRead = (code: string) => userStore.canRead(code)
const canBindAll = computed(() => userStore.canEdit('finance.kingdee.account.bind')) const uiEdit = (code: string) => userStore.canEdit(code)
const canBindOwn = computed(() => userStore.canEdit('finance.kingdee.account.bind-own')) const meId = computed(() => userStore.userInfo?.feishuOpenId || null)
const canUnbindAll = computed(() => userStore.canEdit('finance.kingdee.account.unbind')) const canViewAll = computed(() => userStore.canRead('finance.kingdee.account.view-all') && authorizationStore.can('integration.kingdee.account:read-all'))
const canUnbindOwn = computed(() => userStore.canEdit('finance.kingdee.account.unbind-own')) const canViewOwn = computed(() => userStore.canRead('finance.kingdee.account.view-own') && authorizationStore.can('integration.kingdee.account:read-own'))
const canViewAny = computed(() => canViewAll.value || canViewOwn.value)
const canBindAll = computed(() => userStore.canEdit('finance.kingdee.account.bind') && authorizationStore.can('integration.kingdee.account:manage-all'))
const canBindOwn = computed(() => userStore.canEdit('finance.kingdee.account.bind-own') && authorizationStore.can('integration.kingdee.account:manage-own'))
const canUnbindAll = computed(() => userStore.canEdit('finance.kingdee.account.unbind') && authorizationStore.can('integration.kingdee.account:manage-all'))
const canUnbindOwn = computed(() => userStore.canEdit('finance.kingdee.account.unbind-own') && authorizationStore.can('integration.kingdee.account:manage-own'))
const canOpenDialog = computed(() => uiRead('dialog.kingdee.account'))
const canEditCredentials = computed(() => uiEdit('dialog.kingdee.account.username') && uiEdit('dialog.kingdee.account.password'))
const canCreateBinding = computed(() => canOpenDialog.value && canEditCredentials.value && (canBindAll.value || canBindOwn.value))
const canBindRow = (item: KingdeeAccountBinding) => const canBindRow = (item: KingdeeAccountBinding) =>
canBindAll.value || (canBindOwn.value && item.userId === meId.value) canOpenDialog.value && (canBindAll.value || (canBindOwn.value && item.employeeOpenId === meId.value))
const canUnbindRow = (item: KingdeeAccountBinding) => const canUnbindRow = (item: KingdeeAccountBinding) =>
canUnbindAll.value || (canUnbindOwn.value && item.userId === meId.value) canUnbindAll.value || (canUnbindOwn.value && item.employeeOpenId === meId.value)
const canTestRow = (item: KingdeeAccountBinding) =>
(item.employeeOpenId === meId.value ? uiEdit('dialog.kingdee.account.test-own') : uiEdit('dialog.kingdee.account.test-all')) && canBindRow(item)
const items = ref<KingdeeAccountBinding[]>([]) const items = ref<KingdeeAccountBinding[]>([])
const loading = ref(false) const loading = ref(false)
const loadError = ref('') const loadError = ref('')
const search = ref('') const search = ref('')
const saving = ref(false) const saving = ref(false)
const testingId = ref<number | null>(null) const testingId = ref<string | null>(null)
const bindDialog = ref<HTMLDialogElement | null>(null) const bindDialog = ref<HTMLDialogElement | null>(null)
const editing = ref<KingdeeAccountBinding | null>(null) const editing = ref<KingdeeAccountBinding | null>(null)
const adding = ref(false)
const selectedEmployeeOpenId = ref<string | null>(null)
const form = reactive({ kingdeeUsername: '', kingdeePassword: '', verifyLogin: true }) const form = reactive({ kingdeeUsername: '', kingdeePassword: '', verifyLogin: true })
const errorText = (error: unknown) => { const errorText = (error: unknown) => {
@@ -143,16 +171,32 @@ const errorText = (error: unknown) => {
} }
const filtered = computed(() => { const filtered = computed(() => {
const q = search.value.trim().toLowerCase() return items.value.filter(item => matchesReadableSearch(search.value, [
if (!q) return items.value { readable: uiRead('ui.kingdee.binding.column.employee'), values: [item.realName] }, { readable: uiRead('ui.kingdee.binding.column.username'), values: [item.kingdeeUsername] },
return items.value.filter(item => ]))
[item.realName, item.employeeNo, item.kingdeeUsername]
.some(value => String(value || '').toLowerCase().includes(q)))
}) })
const boundCount = computed(() => items.value.filter(item => item.bound).length) const boundCount = computed(() => items.value.filter(item => item.bound).length)
const canReadEmployeeIdentity = computed(() => uiRead('ui.kingdee.binding.column.employee'))
const addCandidates = computed(() => items.value.filter(item =>
!item.bound && canBindRow(item) && (item.employeeOpenId === meId.value || canReadEmployeeIdentity.value),
))
const activeBinding = computed(() => adding.value
? addCandidates.value.find(item => item.employeeOpenId === selectedEmployeeOpenId.value) || null
: editing.value)
const addButtonTitle = computed(() => {
if (addCandidates.value.length) return '为未绑定人员新增金蝶账号绑定'
if (canBindAll.value && !canReadEmployeeIdentity.value && !canBindOwn.value) return '需要“财务人员”字段查看权限才能选择绑定人员'
return '当前没有可新增绑定的人员'
})
const addCandidateLabel = (item: KingdeeAccountBinding) => item.realName
const { page, pageSize, paginatedItems } = useListPagination(filtered, { resetSources: [search] }) const { page, pageSize, paginatedItems } = useListPagination(filtered, { resetSources: [search] })
const load = async () => { const load = async () => {
if (!canViewAny.value) {
items.value = []
loadError.value = '当前账号没有金蝶账号绑定查看权限。'
return
}
loading.value = true loading.value = true
loadError.value = '' loadError.value = ''
try { try {
@@ -167,6 +211,8 @@ const load = async () => {
const openBind = async (item: KingdeeAccountBinding) => { const openBind = async (item: KingdeeAccountBinding) => {
if (!canBindRow(item)) return if (!canBindRow(item)) return
adding.value = false
selectedEmployeeOpenId.value = item.employeeOpenId
editing.value = item editing.value = item
form.kingdeeUsername = item.kingdeeUsername || '' form.kingdeeUsername = item.kingdeeUsername || ''
form.kingdeePassword = '' form.kingdeePassword = ''
@@ -175,38 +221,55 @@ const openBind = async (item: KingdeeAccountBinding) => {
bindDialog.value?.showModal() bindDialog.value?.showModal()
} }
const openCreate = async () => {
if (!canCreateBinding.value || !addCandidates.value.length) return
adding.value = true
editing.value = null
selectedEmployeeOpenId.value = addCandidates.value[0].employeeOpenId
form.kingdeeUsername = ''
form.kingdeePassword = ''
form.verifyLogin = true
await nextTick()
bindDialog.value?.showModal()
}
const closeBind = () => { const closeBind = () => {
if (saving.value) return if (saving.value) return
bindDialog.value?.close() bindDialog.value?.close()
adding.value = false
selectedEmployeeOpenId.value = null
editing.value = null editing.value = null
} }
const saveBind = async () => { const saveBind = async () => {
if (!editing.value || !canBindRow(editing.value) || saving.value) return const target = activeBinding.value
if (!target || !canBindRow(target) || !canEditCredentials.value || saving.value) return
saving.value = true saving.value = true
let savedSuccessfully = false
try { try {
const saved = await kingdeeAccountsApi.bind(editing.value.userId, { const saved = await kingdeeAccountsApi.bind(target.employeeOpenId, {
kingdeeUsername: form.kingdeeUsername, kingdeeUsername: form.kingdeeUsername,
kingdeePassword: form.kingdeePassword, kingdeePassword: form.kingdeePassword,
verifyLogin: form.verifyLogin, verifyLogin: form.verifyLogin,
}) })
const index = items.value.findIndex(item => item.userId === saved.userId) const index = items.value.findIndex(item => item.employeeOpenId === saved.employeeOpenId)
if (index >= 0) items.value[index] = saved if (index >= 0) items.value[index] = saved
else items.value.push(saved) else items.value.push(saved)
savedSuccessfully = true
ElMessage.success('金蝶账号已绑定') ElMessage.success('金蝶账号已绑定')
closeBind()
} catch (error) { } catch (error) {
ElMessage.error(`绑定失败:${errorText(error)}`) ElMessage.error(`绑定失败:${errorText(error)}`)
} finally { } finally {
saving.value = false saving.value = false
if (savedSuccessfully) closeBind()
} }
} }
const testBinding = async (item: KingdeeAccountBinding) => { const testBinding = async (item: KingdeeAccountBinding) => {
if (!canBindRow(item) || testingId.value != null) return if (!canTestRow(item) || testingId.value != null) return
testingId.value = item.userId testingId.value = item.employeeOpenId
try { try {
const result = await kingdeeAccountsApi.test(item.userId) const result = await kingdeeAccountsApi.test(item.employeeOpenId)
if (result?.success) ElMessage.success(result.message || '验证成功') if (result?.success) ElMessage.success(result.message || '验证成功')
else ElMessage.error(result?.message || '验证失败') else ElMessage.error(result?.message || '验证失败')
} catch (error) { } catch (error) {
@@ -228,8 +291,8 @@ const unbind = async (item: KingdeeAccountBinding) => {
return return
} }
try { try {
await kingdeeAccountsApi.unbind(item.userId) await kingdeeAccountsApi.unbind(item.employeeOpenId)
const index = items.value.findIndex(row => row.userId === item.userId) const index = items.value.findIndex(row => row.employeeOpenId === item.employeeOpenId)
if (index >= 0) { if (index >= 0) {
items.value[index] = { items.value[index] = {
...items.value[index], ...items.value[index],
@@ -246,7 +309,7 @@ const unbind = async (item: KingdeeAccountBinding) => {
} }
} }
onMounted(() => { void load() }) onMounted(() => { if (canViewAny.value) void load() })
defineExpose({ reload: load }) defineExpose({ reload: load })
</script> </script>
+60 -50
View File
@@ -6,7 +6,7 @@
<h3 id="kingdee-sync-title">金蝶单据同步规则</h3> <h3 id="kingdee-sync-title">金蝶单据同步规则</h3>
<p>配置单据字段映射、过滤条件和同步目标表;过滤条件只接受结构化值,不接受原始 SQL。</p> <p>配置单据字段映射、过滤条件和同步目标表;过滤条件只接受结构化值,不接受原始 SQL。</p>
</div> </div>
<button v-if="canCreate" class="btn primary small" type="button" @click="openCreate">新建同步规则</button> <button v-if="mayCreate" class="btn primary small" type="button" @click="openCreate">新建同步规则</button>
</div> </div>
<div v-if="!canView" class="sync-empty" role="alert"> <div v-if="!canView" class="sync-empty" role="alert">
@@ -18,21 +18,21 @@
<div v-if="!configs.length" class="sync-empty"><strong>暂无同步规则</strong><span>新建规则后,可以创建目标表并执行单据同步。</span></div> <div v-if="!configs.length" class="sync-empty"><strong>暂无同步规则</strong><span>新建规则后,可以创建目标表并执行单据同步。</span></div>
<div v-else class="table-scroll" role="region" aria-label="金蝶同步规则列表" tabindex="0"> <div v-else class="table-scroll" role="region" aria-label="金蝶同步规则列表" tabindex="0">
<el-table :data="pagedConfigs" row-key="id" size="small" empty-text="暂无同步规则"> <el-table :data="pagedConfigs" row-key="id" size="small" empty-text="暂无同步规则">
<el-table-column prop="configName" label="配置名称" min-width="150" /> <el-table-column v-if="uiRead('ui.kingdee.rules.column.name')" prop="configName" label="配置名称" min-width="150" />
<el-table-column prop="formId" label="formId" min-width="140" /> <el-table-column v-if="uiRead('ui.kingdee.rules.column.form')" prop="formId" label="formId" min-width="140" />
<el-table-column prop="targetTableName" label="目标表" min-width="150" /> <el-table-column v-if="uiRead('ui.kingdee.rules.column.target')" prop="targetTableName" label="目标表" min-width="150" />
<el-table-column label="字段 / 过滤" width="105"> <el-table-column label="字段 / 过滤" width="105">
<template #default="scope">{{ scope.row.fields.length }} / {{ scope.row.filters.length }}</template> <template #default="scope">{{ scope.row.fields.length }} / {{ scope.row.filters.length }}</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="90"> <el-table-column v-if="uiRead('ui.kingdee.rules.column.status')" label="状态" width="90">
<template #default="scope"><el-tag :type="scope.row.enabled ? 'success' : 'info'" size="small">{{ scope.row.enabled ? '已启用' : '已停用' }}</el-tag></template> <template #default="scope"><el-tag :type="scope.row.enabled ? 'success' : 'info'" size="small">{{ scope.row.enabled ? '已启用' : '已停用' }}</el-tag></template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="155"> <el-table-column label="操作" fixed="right" width="155">
<template #default="scope"> <template #default="scope">
<div class="row-actions"> <div class="row-actions">
<el-button v-if="canView" link type="primary" size="small" @click="openEdit(scope.row.id)">{{ canUpdate ? '编辑' : '查看' }}</el-button> <el-button v-if="canOpenRuleDialog" link type="primary" size="small" @click="openEdit(scope.row.id)">{{ mayUpdate ? '编辑' : '查看' }}</el-button>
<el-button v-if="canDelete" link type="danger" size="small" @click="deleteConfig(scope.row)">删除</el-button> <el-button v-if="mayDelete" link type="danger" size="small" @click="deleteConfig(scope.row)">删除</el-button>
<span v-if="!canUpdate && !canDelete" class="muted-copy">只读</span> <span v-if="!mayUpdate && !mayDelete" class="muted-copy">只读</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -41,7 +41,7 @@
<AppListPagination v-if="configs.length" v-model:page="currentPage" v-model:page-size="pageSize" :total="configs.length" aria-label="金蝶同步规则分页" /> <AppListPagination v-if="configs.length" v-model:page="currentPage" v-model:page-size="pageSize" :total="configs.length" aria-label="金蝶同步规则分页" />
</template> </template>
<el-dialog ref="dialogRef" v-model="dialogVisible" :aria-label="editingId === null ? '新建金蝶同步规则' : '编辑金蝶同步规则'" width="min(1080px, 96vw)" align-center :draggable="desktopDialogDrag" :before-close="beforeKingdeeDialogClose" :close-on-click-modal="!dialogBusy" :close-on-press-escape="!dialogBusy" :show-close="!dialogBusy" destroy-on-close class="kingdee-sync-dialog" @closed="resetKingdeeDialogPosition"> <el-dialog v-if="canOpenRuleDialog" ref="dialogRef" v-model="dialogVisible" :aria-label="editingId === null ? '新建金蝶同步规则' : '编辑金蝶同步规则'" width="min(88vw, 1440px)" align-center :draggable="desktopDialogDrag" :before-close="beforeKingdeeDialogClose" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="!dialogBusy" destroy-on-close class="kingdee-sync-dialog" @closed="resetKingdeeDialogPosition">
<template #header> <template #header>
<div class="dialog-title-block"> <div class="dialog-title-block">
<span class="eyebrow">KINGDEE SYNC RULE</span> <span class="eyebrow">KINGDEE SYNC RULE</span>
@@ -55,34 +55,30 @@
<el-form v-else ref="formRef" :model="draft" label-position="top" @submit.prevent> <el-form v-else ref="formRef" :model="draft" label-position="top" @submit.prevent>
<div v-if="validationError" class="form-error" role="alert">{{ validationError }}</div> <div v-if="validationError" class="form-error" role="alert">{{ validationError }}</div>
<div class="sync-form-grid"> <div class="sync-form-grid">
<el-form-item label="单据名称" required :error="fieldError('configName')"><el-input v-model="draft.configName" :disabled="!canManage" maxlength="100" show-word-limit placeholder="例如:销售订单" /></el-form-item> <template v-if="uiRead('dialog.kingdee.rule.source')"><el-form-item label="单据名称" required :error="fieldError('configName')"><el-input v-model="draft.configName" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.source')" maxlength="100" show-word-limit placeholder="例如:销售订单" /></el-form-item><el-form-item label="金蝶单据标识(formId)" required :error="fieldError('formId')"><el-input v-model="draft.formId" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.source')" maxlength="100" placeholder="例如:SAL_SaleOrder" /></el-form-item><el-form-item label="最大同步行数" required :error="fieldError('maxRowsPerRun')"><el-input-number v-model="draft.maxRowsPerRun" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.source')" :min="1" :max="100000" controls-position="right" /></el-form-item></template>
<el-form-item label="金蝶单据标识(formId)" required :error="fieldError('formId')"><el-input v-model="draft.formId" :disabled="!canManage" maxlength="100" placeholder="例如:SAL_SaleOrder" /></el-form-item> <template v-if="uiRead('dialog.kingdee.rule.target')"><el-form-item label="数据库表名" required :error="fieldError('targetTableName')"><el-input v-model="draft.targetTableName" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.target')" maxlength="63" placeholder="例如:kd_sale_order" /></el-form-item><el-form-item label="表注释名"><el-input v-model="draft.targetTableComment" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.target')" maxlength="200" placeholder="可选" /></el-form-item><el-form-item label="启用"><el-switch v-model="draft.enabled" :disabled="!canManage || !uiEdit('dialog.kingdee.rule.target')" active-text="启用" inactive-text="停用" /></el-form-item></template>
<el-form-item label="数据库表名" required :error="fieldError('targetTableName')"><el-input v-model="draft.targetTableName" :disabled="!canManage" maxlength="63" placeholder="例如:kd_sale_order" /></el-form-item>
<el-form-item label="表注释名"><el-input v-model="draft.targetTableComment" :disabled="!canManage" maxlength="200" placeholder="可选" /></el-form-item>
<el-form-item label="启用"><el-switch v-model="draft.enabled" :disabled="!canManage" active-text="启用" inactive-text="停用" /></el-form-item>
<el-form-item label="最大同步行数" required :error="fieldError('maxRowsPerRun')"><el-input-number v-model="draft.maxRowsPerRun" :disabled="!canManage" :min="1" :max="100000" controls-position="right" /></el-form-item>
</div> </div>
<div class="subsection-head"><div><h4>字段映射</h4><p>必须包含 FBillNo 作为不可变来源主键;排序按列表顺序提交。</p></div><el-button v-if="canManage" type="primary" plain size="small" @click="addField">新增字段</el-button></div> <div v-if="uiRead('dialog.kingdee.rule.fields')" class="subsection-head"><div><h4>字段映射</h4><p>必须包含 FBillNo 作为不可变来源主键;排序按列表顺序提交。</p></div><el-button v-if="canManage && uiEdit('dialog.kingdee.rule.fields')" type="primary" plain size="small" @click="addField">新增字段</el-button></div>
<div v-if="fieldError('fields')" class="form-error compact-error" role="alert">{{ fieldError('fields') }}</div> <div v-if="fieldError('fields')" class="form-error compact-error" role="alert">{{ fieldError('fields') }}</div>
<div class="mapping-list"> <div v-if="uiRead('dialog.kingdee.rule.fields')" class="mapping-list">
<div v-for="(field, index) in draft.fields" :key="field._key" class="mapping-row"> <div v-for="(field, index) in draft.fields" :key="field._key" class="mapping-row">
<el-form-item label="源字段标识" required><el-input v-model="field.sourceFieldKey" :disabled="!canManage" placeholder="如:FMaterialId" /></el-form-item> <el-form-item label="源字段标识" required><el-input v-model="field.sourceFieldKey" :disabled="!canManageFields" placeholder="如:FMaterialId" /></el-form-item>
<el-form-item label="数据库字段名" required><el-input v-model="field.targetColumnName" :disabled="!canManage" placeholder="如:material_id" /></el-form-item> <el-form-item label="数据库字段名" required><el-input v-model="field.targetColumnName" :disabled="!canManageFields" placeholder="如:material_id" /></el-form-item>
<el-form-item label="字段注释"><el-input v-model="field.fieldComment" :disabled="!canManage" placeholder="可选" /></el-form-item> <el-form-item label="字段注释"><el-input v-model="field.fieldComment" :disabled="!canManageFields" placeholder="可选" /></el-form-item>
<el-form-item label="类型" required><el-select v-model="field.dataType" :disabled="!canManage" placeholder="选择类型" @change="onDataTypeChange(field)"><el-option v-for="type in dataTypes" :key="type" :label="type" :value="type" /></el-select></el-form-item> <el-form-item label="类型" required><el-select v-model="field.dataType" :disabled="!canManageFields" placeholder="选择类型" @change="onDataTypeChange(field)"><el-option v-for="type in dataTypes" :key="type" :label="type" :value="type" /></el-select></el-form-item>
<el-form-item label="长度"><el-input-number v-model="field.fieldLength" :disabled="!canManage || field.dataType !== 'STRING'" :min="1" :max="10000" controls-position="right" placeholder="可选" /></el-form-item> <el-form-item label="长度"><el-input-number v-model="field.fieldLength" :disabled="!canManageFields || field.dataType !== 'STRING'" :min="1" :max="10000" controls-position="right" placeholder="可选" /></el-form-item>
<el-button v-if="canManage" class="remove-row" link type="danger" :disabled="draft.fields.length <= 1" :aria-label="`删除第${index + 1}条字段`" @click="removeField(index)">删除</el-button> <el-button v-if="canManageFields" class="remove-row" link type="danger" :disabled="draft.fields.length <= 1" :aria-label="`删除第${index + 1}条字段`" @click="removeField(index)">删除</el-button>
</div> </div>
</div> </div>
<div class="subsection-head filter-head"><div><h4>过滤条件</h4><p>服务端会将结构化条件转换为查询条件,请勿填写 SQL 片段。</p></div><el-button v-if="canManage" type="primary" plain size="small" @click="addFilter">新增过滤</el-button></div> <div v-if="uiRead('dialog.kingdee.rule.filters')" class="subsection-head filter-head"><div><h4>过滤条件</h4><p>服务端会将结构化条件转换为查询条件,请勿填写 SQL 片段。</p></div><el-button v-if="canManage && uiEdit('dialog.kingdee.rule.filters')" type="primary" plain size="small" @click="addFilter">新增过滤</el-button></div>
<div class="filter-list"> <div v-if="uiRead('dialog.kingdee.rule.filters')" class="filter-list">
<div v-for="(filter, index) in draft.filters" :key="filter._key" class="filter-row"> <div v-for="(filter, index) in draft.filters" :key="filter._key" class="filter-row">
<el-form-item label="源字段标识"><el-input v-model="filter.sourceFieldKey" :disabled="!canManage" placeholder="如:FDocumentStatus" /></el-form-item> <el-form-item label="源字段标识"><el-input v-model="filter.sourceFieldKey" :disabled="!canManageFilters" placeholder="如:FDocumentStatus" /></el-form-item>
<el-form-item label="操作符"><el-select v-model="filter.operator" :disabled="!canManage"><el-option v-for="operator in operators" :key="operator.value" :label="operator.label" :value="operator.value" /></el-select></el-form-item> <el-form-item label="操作符"><el-select v-model="filter.operator" :disabled="!canManageFilters"><el-option v-for="operator in operators" :key="operator.value" :label="operator.label" :value="operator.value" /></el-select></el-form-item>
<el-form-item label="过滤值"><el-input v-model="filter.filterValue" :disabled="!canManage" placeholder="结构化值,如:A,B" /></el-form-item> <el-form-item label="过滤值"><el-input v-model="filter.filterValue" :disabled="!canManageFilters" placeholder="结构化值,如:A,B" /></el-form-item>
<el-button v-if="canManage" class="remove-row" link type="danger" :aria-label="`删除第${index + 1}条过滤条件`" @click="removeFilter(index)">删除</el-button> <el-button v-if="canManageFilters" class="remove-row" link type="danger" :aria-label="`删除第${index + 1}条过滤条件`" @click="removeFilter(index)">删除</el-button>
</div> </div>
<div v-if="!draft.filters.length" class="muted-copy filter-empty">未配置过滤条件,将按金蝶接口返回规则执行。</div> <div v-if="!draft.filters.length" class="muted-copy filter-empty">未配置过滤条件,将按金蝶接口返回规则执行。</div>
</div> </div>
@@ -90,8 +86,8 @@
<div v-if="!detailLoading && !detailError" class="detail-actions" aria-label="同步规则操作"> <div v-if="!detailLoading && !detailError" class="detail-actions" aria-label="同步规则操作">
<el-button type="primary" :disabled="!canManage || actionLoading === 'save'" :loading="actionLoading === 'save'" @click="saveConfig">保存配置</el-button> <el-button type="primary" :disabled="!canManage || actionLoading === 'save'" :loading="actionLoading === 'save'" @click="saveConfig">保存配置</el-button>
<el-button v-if="canPrepare" :disabled="editingId === null || Boolean(actionLoading)" :loading="actionLoading === 'prepare'" @click="prepareTable">创建/校验目标表</el-button> <el-button v-if="mayPrepare" :disabled="editingId === null || Boolean(actionLoading)" :loading="actionLoading === 'prepare'" @click="prepareTable">创建/校验目标表</el-button>
<el-button v-if="canPreview" :disabled="editingId === null || Boolean(actionLoading)" :loading="actionLoading === 'preview'" @click="previewData">预览数据</el-button> <el-button v-if="mayPreview" :disabled="editingId === null || Boolean(actionLoading)" :loading="actionLoading === 'preview'" @click="previewData">预览数据</el-button>
<el-button type="success" :disabled="syncDisabled" :loading="syncInProgress" @click="syncNow">{{ activeRun ? '同步运行中' : '立即同步' }}</el-button> <el-button type="success" :disabled="syncDisabled" :loading="syncInProgress" @click="syncNow">{{ activeRun ? '同步运行中' : '立即同步' }}</el-button>
</div> </div>
@@ -118,10 +114,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, onBeforeUnmount, ref, watch } from 'vue' import { computed, onBeforeUnmount, ref, watch } from 'vue'
import { ElMessage, ElMessageBox, type FormInstance } from 'element-plus' import { type FormInstance } from 'element-plus'
import { ElMessage, ElMessageBox } from '@/utils/uiFeedback'
import { adminApi, type KingdeePrepareTableResult, type KingdeeSyncConfig, type KingdeeSyncConfigId, type KingdeeSyncConfigPayload, type KingdeeSyncDataType, type KingdeeSyncFilterOperator, type KingdeeSyncPreview, type KingdeeSyncRun } from '@/api/admin' import { adminApi, type KingdeePrepareTableResult, type KingdeeSyncConfig, type KingdeeSyncConfigId, type KingdeeSyncConfigPayload, type KingdeeSyncDataType, type KingdeeSyncFilterOperator, type KingdeeSyncPreview, type KingdeeSyncRun } from '@/api/admin'
import AppListPagination from '@/components/common/AppListPagination.vue' import AppListPagination from '@/components/common/AppListPagination.vue'
import { useListPagination } from '@/composables/useListPagination' import { useListPagination } from '@/composables/useListPagination'
import { useUserStore } from '@/store/user'
type DraftField = KingdeeSyncConfigPayload['fields'][number] & { _key: string } type DraftField = KingdeeSyncConfigPayload['fields'][number] & { _key: string }
type DraftFilter = KingdeeSyncConfigPayload['filters'][number] & { _key: string } type DraftFilter = KingdeeSyncConfigPayload['filters'][number] & { _key: string }
@@ -130,6 +128,16 @@ type Action = '' | 'save' | 'prepare' | 'preview' | 'sync'
type DialogPositionInstance = { resetPosition: () => void } type DialogPositionInstance = { resetPosition: () => void }
const props = withDefaults(defineProps<{ canView: boolean; canCreate: boolean; canUpdate: boolean; canDelete: boolean; canPrepare: boolean; canPreview: boolean; canSync: boolean }>(), { canView: false, canCreate: false, canUpdate: false, canDelete: false, canPrepare: false, canPreview: false, canSync: false }) const props = withDefaults(defineProps<{ canView: boolean; canCreate: boolean; canUpdate: boolean; canDelete: boolean; canPrepare: boolean; canPreview: boolean; canSync: boolean }>(), { canView: false, canCreate: false, canUpdate: false, canDelete: false, canPrepare: false, canPreview: false, canSync: false })
const userStore = useUserStore()
const uiRead = (code: string) => userStore.canRead(code)
const uiEdit = (code: string) => userStore.canEdit(code)
const canOpenRuleDialog = computed(() => uiRead('dialog.kingdee.rule'))
const mayCreate = computed(() => props.canCreate && uiEdit('system.integration.kingdee.rule.create') && canOpenRuleDialog.value)
const mayUpdate = computed(() => props.canUpdate && uiEdit('system.integration.kingdee.rule.update') && canOpenRuleDialog.value)
const mayDelete = computed(() => props.canDelete && uiEdit('system.integration.kingdee.rule.delete'))
const mayPrepare = computed(() => props.canPrepare && uiEdit('system.integration.kingdee.table.prepare'))
const mayPreview = computed(() => props.canPreview && uiEdit('system.integration.kingdee.data.preview'))
const maySync = computed(() => props.canSync && uiEdit('system.integration.kingdee.sync.execute'))
const dataTypes: KingdeeSyncDataType[] = ['STRING', 'INTEGER', 'BIGINT', 'DECIMAL', 'DATE', 'DATETIME', 'BOOLEAN', 'JSON'] const dataTypes: KingdeeSyncDataType[] = ['STRING', 'INTEGER', 'BIGINT', 'DECIMAL', 'DATE', 'DATETIME', 'BOOLEAN', 'JSON']
const operators: Array<{ value: KingdeeSyncFilterOperator; label: string }> = [ const operators: Array<{ value: KingdeeSyncFilterOperator; label: string }> = [
{ value: 'EQ', label: '等于(EQ)' }, { value: 'NE', label: '不等于(NE)' }, { value: 'GT', label: '大于(GT)' }, { value: 'GE', label: '大于等于(GE)' }, { value: 'EQ', label: '等于(EQ)' }, { value: 'NE', label: '不等于(NE)' }, { value: 'GT', label: '大于(GT)' }, { value: 'GE', label: '大于等于(GE)' },
@@ -185,9 +193,11 @@ const previewColumns = computed(() => {
return Array.from(columns) return Array.from(columns)
}) })
const activeRun = computed(() => runs.value.find(run => run.status === 'RUNNING') || (latestRun.value?.status === 'RUNNING' ? latestRun.value : null)) const activeRun = computed(() => runs.value.find(run => run.status === 'RUNNING') || (latestRun.value?.status === 'RUNNING' ? latestRun.value : null))
const canManage = computed(() => editingId.value === null ? props.canCreate : props.canUpdate) const canManage = computed(() => editingId.value === null ? mayCreate.value : mayUpdate.value)
const canManageFields = computed(() => canManage.value && uiEdit('dialog.kingdee.rule.fields'))
const canManageFilters = computed(() => canManage.value && uiEdit('dialog.kingdee.rule.filters'))
const syncInProgress = computed(() => actionLoading.value === 'sync' || Boolean(activeRun.value) || syncUncertain.value) const syncInProgress = computed(() => actionLoading.value === 'sync' || Boolean(activeRun.value) || syncUncertain.value)
const syncDisabled = computed(() => !props.canSync || editingId.value === null || Boolean(actionLoading.value) || Boolean(activeRun.value) || syncUncertain.value) const syncDisabled = computed(() => !maySync.value || editingId.value === null || Boolean(actionLoading.value) || Boolean(activeRun.value) || syncUncertain.value)
const dialogBusy = computed(() => detailLoading.value || runLoading.value || Boolean(actionLoading.value) || syncInProgress.value) const dialogBusy = computed(() => detailLoading.value || runLoading.value || Boolean(actionLoading.value) || syncInProgress.value)
function beforeKingdeeDialogClose(done: () => void) { if (!dialogBusy.value) done() } function beforeKingdeeDialogClose(done: () => void) { if (!dialogBusy.value) done() }
@@ -253,9 +263,9 @@ watch(() => props.canView, value => {
else if (!value) { configLoadGeneration += 1; configRefreshQueued = false } else if (!value) { configLoadGeneration += 1; configRefreshQueued = false }
}, { immediate: true }) }, { immediate: true })
function openCreate() { if (!props.canCreate) return; runContext += 1; editingId.value = null; draft.value = emptyDraft(); resetResults(); dialogVisible.value = true } function openCreate() { if (!mayCreate.value) return; runContext += 1; editingId.value = null; draft.value = emptyDraft(); resetResults(); dialogVisible.value = true }
async function openEdit(id: KingdeeSyncConfigId) { async function openEdit(id: KingdeeSyncConfigId) {
if (!props.canView) return if (!props.canView || !canOpenRuleDialog.value) return
const context = ++runContext const context = ++runContext
editingId.value = id; draft.value = emptyDraft(); resetResults(); dialogVisible.value = true; detailLoading.value = true editingId.value = id; draft.value = emptyDraft(); resetResults(); dialogVisible.value = true; detailLoading.value = true
try { try {
@@ -267,17 +277,17 @@ async function openEdit(id: KingdeeSyncConfigId) {
finally { if (isCurrentRunContext(id, context)) detailLoading.value = false } finally { if (isCurrentRunContext(id, context)) detailLoading.value = false }
} }
async function deleteConfig(config: KingdeeSyncConfig) { async function deleteConfig(config: KingdeeSyncConfig) {
if (!props.canDelete) return if (!mayDelete.value) return
try { await ElMessageBox.confirm(`确定删除同步规则“${config.configName}”吗?`, '删除确认', { type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消' }) } try { await ElMessageBox.confirm(`确定删除同步规则“${config.configName}”吗?`, '删除确认', { type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消' }) }
catch { return } catch { return }
try { await adminApi.deleteKingdeeSyncConfig(config.id); ElMessage.success('同步规则已删除'); await loadConfigs() } try { await adminApi.deleteKingdeeSyncConfig(config.id); ElMessage.success('同步规则已删除'); await loadConfigs() }
catch (error) { ElMessage.error(`删除失败:${errorText(error)}`) } catch (error) { ElMessage.error(`删除失败:${errorText(error)}`) }
} }
function addField() { if (canManage.value) draft.value.fields.push(emptyField()) } function addField() { if (canManageFields.value) draft.value.fields.push(emptyField()) }
function removeField(index: number) { if (canManage.value && draft.value.fields.length > 1) draft.value.fields.splice(index, 1) } function removeField(index: number) { if (canManageFields.value && draft.value.fields.length > 1) draft.value.fields.splice(index, 1) }
function onDataTypeChange(field: DraftField) { if (field.dataType !== 'STRING') field.fieldLength = null } function onDataTypeChange(field: DraftField) { if (field.dataType !== 'STRING') field.fieldLength = null }
function addFilter() { if (canManage.value) draft.value.filters.push(emptyFilter()) } function addFilter() { if (canManageFilters.value) draft.value.filters.push(emptyFilter()) }
function removeFilter(index: number) { if (canManage.value) draft.value.filters.splice(index, 1) } function removeFilter(index: number) { if (canManageFilters.value) draft.value.filters.splice(index, 1) }
function fieldError(field: string) { function fieldError(field: string) {
if (!validationError.value) return '' if (!validationError.value) return ''
if (field === 'fields' && validationError.value.includes('字段')) return validationError.value if (field === 'fields' && validationError.value.includes('字段')) return validationError.value
@@ -328,7 +338,7 @@ async function saveConfig() {
} }
} }
async function prepareTable() { async function prepareTable() {
if (!props.canPrepare || editingId.value === null || actionLoading.value) return if (!mayPrepare.value || editingId.value === null || actionLoading.value) return
const id = editingId.value const id = editingId.value
const context = runContext const context = runContext
actionLoading.value = 'prepare'; prepareResult.value = null actionLoading.value = 'prepare'; prepareResult.value = null
@@ -343,7 +353,7 @@ async function prepareTable() {
} finally { if (isCurrentActionContext(id, context)) actionLoading.value = '' } } finally { if (isCurrentActionContext(id, context)) actionLoading.value = '' }
} }
async function previewData() { async function previewData() {
if (!props.canPreview || editingId.value === null || actionLoading.value) return if (!mayPreview.value || editingId.value === null || actionLoading.value) return
const id = editingId.value const id = editingId.value
const context = runContext const context = runContext
actionLoading.value = 'preview'; previewResult.value = null actionLoading.value = 'preview'; previewResult.value = null
@@ -480,7 +490,7 @@ function errorText(error: unknown) { return error instanceof Error && error.mess
</script> </script>
<style scoped> <style scoped>
.sync-panel { min-width: 0; margin: 18px 0 4px; padding: 16px 0 0; border-top: 1px solid var(--line); } .sync-panel { min-width: 0; margin: 18px 0 4px; padding: 16px 0 0; border-top: 1px solid var(--line); container-name: kingdee-sync; container-type: inline-size; }
.sync-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 0 14px; } .sync-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 0 14px; }
.sync-head > div { min-width: 0; flex: 1 1 320px; } .sync-head > div { min-width: 0; flex: 1 1 320px; }
.sync-head h3 { margin-top: 2px; font-size: 16px; } .sync-head h3 { margin-top: 2px; font-size: 16px; }
@@ -493,12 +503,12 @@ function errorText(error: unknown) { return error instanceof Error && error.mess
.table-scroll :deep(.el-table) { min-width: 720px; } .table-scroll :deep(.el-table) { min-width: 720px; }
.row-actions { display: flex; align-items: center; gap: 2px; white-space: nowrap; } .row-actions { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.dialog-content { min-width: 0; padding: 0 1px 2px; } .dialog-content { min-width: 0; padding: 0 1px 2px; }
.sync-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; } .sync-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 14px; }
.mapping-list, .filter-list { display: grid; gap: 10px; } .mapping-list, .filter-list { display: grid; gap: 10px; }
.mapping-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(130px, 1.2fr) minmax(120px, 1fr) minmax(125px, .8fr) minmax(100px, .7fr) auto; align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; } .mapping-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; }
.filter-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, .8fr) minmax(180px, 1.3fr) auto; align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; } .filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; }
.mapping-row :deep(.el-form-item), .filter-row :deep(.el-form-item) { margin-bottom: 0; } .mapping-row :deep(.el-form-item), .filter-row :deep(.el-form-item) { margin-bottom: 0; }
.remove-row { margin-top: 30px; } .remove-row { align-self: end; justify-self: end; margin-top: 30px; }
.subsection-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 10px; padding-top: 15px; border-top: 1px solid var(--line); } .subsection-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 10px; padding-top: 15px; border-top: 1px solid var(--line); }
.subsection-head h4, .result-title h4 { color: var(--text); font-size: 13px; } .subsection-head h4, .result-title h4 { color: var(--text); font-size: 13px; }
.subsection-head p, .result-meta { color: var(--muted); font-size: 11px; } .subsection-head p, .result-meta { color: var(--muted); font-size: 11px; }
@@ -517,6 +527,6 @@ function errorText(error: unknown) { return error instanceof Error && error.mess
.preview-table :deep(.el-table), .run-table :deep(.el-table) { min-width: 520px; } .preview-table :deep(.el-table), .run-table :deep(.el-table) { min-width: 520px; }
.run-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; color: var(--body); font: 12px var(--mono); } .run-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; color: var(--body); font: 12px var(--mono); }
.run-error { flex-basis: 100%; color: var(--danger); overflow-wrap: anywhere; } .run-error { flex-basis: 100%; color: var(--danger); overflow-wrap: anywhere; }
@media (max-width: 860px) { .sync-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mapping-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .remove-row { margin-top: 0; justify-self: start; } } @container kingdee-sync (max-width: 700px) { .sync-form-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); } .mapping-row, .filter-row { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); } .remove-row { margin-top: 0; justify-self: start; } }
@media (max-width: 560px) { .sync-form-grid { grid-template-columns: 1fr; } .mapping-row, .filter-row { grid-template-columns: 1fr; padding: 10px; } .detail-actions { align-items: stretch; flex-direction: column; } .detail-actions :deep(.el-button) { width: 100%; min-height: 44px; margin-left: 0; } } @container kingdee-sync (max-width: 560px) { .sync-form-grid, .mapping-row, .filter-row { grid-template-columns: minmax(0, 1fr); } .mapping-row, .filter-row { padding: 10px; } .detail-actions { align-items: stretch; flex-direction: column; } .detail-actions :deep(.el-button) { width: 100%; min-height: 44px; margin-left: 0; } }
</style> </style>
+227 -76
View File
@@ -20,30 +20,34 @@
<form v-else class="form-page" @submit.prevent="save(true)"> <form v-else class="form-page" @submit.prevent="save(true)">
<div v-if="isFeishu" class="definition-bar" aria-label="飞书表单模板信息"><strong>飞书审批表单</strong><span>版本 {{ shortFingerprint }}</span><span v-if="definition?.fetchedAt">同步于 {{ formatDateTime(definition.fetchedAt) }}</span></div> <div v-if="isFeishu" class="definition-bar" aria-label="飞书表单模板信息"><strong>飞书审批表单</strong><span>版本 {{ shortFingerprint }}</span><span v-if="definition?.fetchedAt">同步于 {{ formatDateTime(definition.fetchedAt) }}</span></div>
<section v-if="isFeishu" class="section-card" aria-labelledby="feishu-form-title"> <section v-if="isFeishu && uiRead('ui.application.form.dynamic')" class="section-card" aria-labelledby="feishu-form-title">
<div class="section-title"><h2 id="feishu-form-title">飞书审批信息</h2><span>按模板顺序 · * 为必填项</span></div> <div class="section-title"><div class="section-heading"><span class="section-marker">审批</span><div><h2 id="feishu-form-title">飞书审批信息</h2><p>填写本次报销的基础资料与飞书审批字段</p></div></div><span>按模板顺序 · * 为必填项</span></div>
<fieldset class="permission-fieldset" :disabled="!uiEdit('ui.application.form.dynamic')">
<FeishuFormFields :fields="activeFields" :form-values="formValues" :form="form" :derived="derivedValues" :show-errors="showValidationErrors" :items-total="itemsTotal" :amount-matches="amountMatches" :expense-types="expenseTypes" :form-fingerprint="pinnedFingerprint" @add-item="addItem" @remove-item="removeItem" @upload-state-change="attachmentRevision++" /> <FeishuFormFields :fields="activeFields" :form-values="formValues" :form="form" :derived="derivedValues" :show-errors="showValidationErrors" :items-total="itemsTotal" :amount-matches="amountMatches" :expense-types="expenseTypes" :form-fingerprint="pinnedFingerprint" @add-item="addItem" @remove-item="removeItem" @upload-state-change="attachmentRevision++" />
</fieldset>
</section> </section>
<section v-if="hasSupplementFields" class="section-card" :class="{ 'section-gap': isFeishu }" aria-labelledby="finance-supplement-title"> <section v-if="hasSupplementFields" class="section-card" :class="{ 'section-gap': isFeishu }" aria-labelledby="finance-supplement-title">
<div class="section-title"><h2 id="finance-supplement-title">财务补充信息</h2><span>审批与付款必需 · * 为必填项</span></div> <div class="section-title"><div class="section-heading"><span class="section-marker finance-marker">财务</span><div><h2 id="finance-supplement-title">财务补充信息</h2><p>核对费用归类、收款人及付款账户</p></div></div><span>审批与付款必需 · * 为必填项</span></div>
<div class="form-grid"> <div class="form-grid">
<div v-if="missingBinding('TITLE')" class="field"><label for="title">报销事项 <em>*</em></label><input id="title" v-model.trim="form.title" required maxlength="100"></div> <div v-if="missingBinding('TITLE') && showProjectedField('title')" class="field semantic-title"><label for="title">报销事项 <em>*</em></label><input id="title" v-model.trim="form.title" :readonly="readonlyProjectedField('title')" required maxlength="100"></div>
<div v-if="missingBinding('EXPENSE_TYPE')" class="field"><label for="expense-type">费用类型 <em>*</em></label><select id="expense-type" v-model.number="form.expenseTypeId" required @change="syncExpenseType"><option value="" disabled>请选择</option><option v-for="type in expenseTypes" :key="type.id" :value="type.id">{{ type.name }}</option></select></div> <div v-if="missingBinding('EXPENSE_TYPE') && showProjectedField('expenseTypeId')" class="field semantic-expense-type"><label for="expense-type">费用类型 <em>*</em></label><select id="expense-type" v-model.number="form.expenseTypeId" :disabled="readonlyProjectedField('expenseTypeId')" required @change="syncExpenseType"><option value="" disabled>请选择</option><option v-for="type in expenseTypes" :key="type.id" :value="type.id">{{ type.name }}</option></select></div>
<div v-if="missingBinding('TOTAL_AMOUNT') && showField('application:amount')" class="field"><label for="amount">报销金额(元) <em>*</em></label><input id="amount" v-model.number="form.totalAmount" type="number" min="0.01" step="0.01" :readonly="readonlyField('application:amount')" required><small v-if="readonlyField('application:amount')" class="form-help">当前字段只读</small></div> <div v-if="missingBinding('TOTAL_AMOUNT') && showField('application:amount')" class="field semantic-amount"><label for="amount">报销金额(元) <em>*</em></label><input id="amount" v-model.number="form.totalAmount" type="number" min="0.01" step="0.01" :readonly="readonlyField('application:amount')" required><small v-if="readonlyField('application:amount')" class="form-help">当前字段只读</small></div>
<div v-if="missingBinding('DESCRIPTION')" class="field full"><label for="description">费用说明 <em>*</em></label><textarea id="description" v-model.trim="form.description" required maxlength="500" rows="3"></textarea></div> <div v-if="missingBinding('DESCRIPTION') && showProjectedField('description')" class="field full semantic-description"><label for="description">费用说明 <em>*</em></label><textarea id="description" v-model.trim="form.description" :readonly="readonlyProjectedField('description')" required maxlength="500" rows="3"></textarea></div>
<div v-if="showField('application:payeeName')" class="field"><label for="payee">收款人 <em>*</em></label><input id="payee" v-model.trim="form.payeeName" :readonly="readonlyField('application:payeeName')" maxlength="100" required><small v-if="readonlyField('application:payeeName')" class="form-help">当前字段只读</small></div> <div v-if="showField('application:payeeName')" class="field semantic-payee"><label for="payee">收款人 <em>*</em></label><input id="payee" v-model.trim="form.payeeName" :readonly="readonlyField('application:payeeName')" maxlength="100" required><small v-if="readonlyField('application:payeeName')" class="form-help">当前字段只读</small></div>
<div v-if="showField('application:bankAccount')" class="field"><label for="bank">收款账户 ID <em>*</em></label><input id="bank" v-model.number="form.payeeBankId" type="number" min="1" step="1" :readonly="readonlyField('application:bankAccount')" required><small class="form-help">{{ readonlyField('application:bankAccount') ? '当前字段只读;账户信息不会明文展示。' : '后端按账户 ID 关联,详情页只显示脱敏账号。' }}</small></div> <div v-if="showField('application:bankAccount')" class="field semantic-bank-account"><label for="bank">收款账户 <em>*</em></label><select id="bank" v-model.number="form.payeeBankId" :disabled="readonlyField('application:bankAccount')" required><option value="" disabled>{{ activePayees.length ? '请选择本人启用账户' : '暂无可用账户' }}</option><option v-for="payee in activePayees" :key="payee.id" :value="payee.id">{{ payee.bankName }} · {{ payee.bankAccountMask }}{{ payee.isDefault ? ' · 默认' : '' }}</option></select><small class="form-help">{{ readonlyField('application:bankAccount') ? '当前字段只读;账户信息不会明文展示。' : activePayees.length ? '仅可选择本人启用的账户,详情页只显示脱敏账号。' : '当前没有启用的付款账户,请联系管理员维护。' }}</small></div>
</div> </div>
</section> </section>
<section v-if="missingBinding('EXPENSE_ITEMS')" class="section-card section-gap" aria-labelledby="expense-items-title"> <section v-if="missingBinding('EXPENSE_ITEMS') && showProjectedField('expenseItems')" class="section-card section-gap" aria-labelledby="expense-items-title">
<div class="section-title"><h2 id="expense-items-title">费用明细</h2><button class="btn small" type="button" @click="addItem">+ 添加明细</button></div> <fieldset class="permission-fieldset" :disabled="readonlyProjectedField('expenseItems')">
<div class="section-title"><div class="section-heading"><span class="section-marker detail-marker">明细</span><div><h2 id="expense-items-title">费用明细</h2><p>逐笔填写发生日期、类别、金额和用途</p></div></div><button class="btn small" type="button" @click="addItem">+ 添加明细</button></div>
<div class="expense-items"> <div class="expense-items">
<div v-for="(item, index) in form.items" :key="item.key" class="expense-item"> <div v-for="(item, index) in form.items" :key="item.key" class="expense-item">
<div class="field"><label :for="`expense-date-${item.key}`">日期 <em>*</em></label><input :id="`expense-date-${item.key}`" v-model="item.expenseDate" type="date" required></div> <div class="expense-item-heading"><div><span>费用明细</span><strong>第 {{ index + 1 }} 笔</strong></div><button v-if="form.items.length > 1" class="remove-item" type="button" :aria-label="`删除第 ${index + 1} 条费用明细`" @click="removeItem(index)">删除</button></div>
<div class="field"><label :for="`expense-category-${item.key}`">类别 <em>*</em></label><input :id="`expense-category-${item.key}`" v-model.trim="item.category" required maxlength="50"></div> <div class="field expense-date"><label :for="`expense-date-${item.key}`">日期 <em>*</em></label><input :id="`expense-date-${item.key}`" v-model="item.expenseDate" type="date" required></div>
<div class="field"> <div class="field expense-category"><label :for="`expense-category-${item.key}`">类别 <em>*</em></label><input :id="`expense-category-${item.key}`" v-model.trim="item.category" required maxlength="50"></div>
<div class="field expense-amount">
<label :for="`expense-amount-${item.key}`">金额 <em>*</em></label> <label :for="`expense-amount-${item.key}`">金额 <em>*</em></label>
<input <input
:id="`expense-amount-${item.key}`" :id="`expense-amount-${item.key}`"
@@ -60,18 +64,18 @@
<small v-if="showValidationErrors && itemAmountError(item)" class="field-error" role="alert">! {{ itemAmountError(item) }}</small> <small v-if="showValidationErrors && itemAmountError(item)" class="field-error" role="alert">! {{ itemAmountError(item) }}</small>
<small v-else class="form-help">请填写大于 0 的金额,最多两位小数,上限 99,999,999.99 元</small> <small v-else class="form-help">请填写大于 0 的金额,最多两位小数,上限 99,999,999.99 元</small>
</div> </div>
<div class="field"><label :for="`expense-description-${item.key}`">说明 <em>*</em></label><input :id="`expense-description-${item.key}`" v-model.trim="item.description" required maxlength="200"></div> <div class="field expense-description"><label :for="`expense-description-${item.key}`">说明 <em>*</em></label><input :id="`expense-description-${item.key}`" v-model.trim="item.description" required maxlength="200"></div>
<button v-if="form.items.length > 1" class="remove-item" type="button" :aria-label="`删除第 ${index + 1} 条费用明细`" @click="removeItem(index)">删除</button>
</div> </div>
</div> </div>
<div class="amount-summary" :class="{ 'amount-mismatch': form.totalAmount > 0 && !amountMatches }"><span>明细合计</span><strong>{{ money(itemsTotal) }}</strong><span>申请金额 {{ money(form.totalAmount) }}</span></div> <div class="amount-summary" :class="{ 'amount-mismatch': form.totalAmount > 0 && !amountMatches }"><span>明细合计</span><strong>{{ money(itemsTotal) }}</strong><span>申请金额 {{ money(form.totalAmount) }}</span></div>
<small v-if="form.totalAmount > 0 && !amountMatches" class="field-error" role="status">明细合计须与申请金额一致,请核对各行金额。</small> <small v-if="form.totalAmount > 0 && !amountMatches" class="field-error" role="status">明细合计须与申请金额一致,请核对各行金额。</small>
</fieldset>
</section> </section>
<div v-if="canWriteApplication" class="form-actions"><button class="btn" type="button" :disabled="saving || staleDefinition || hasAttachmentBlocks" :title="hasAttachmentBlocks ? attachmentBlockMessage : undefined" @click="save(false)">{{ saving ? '保存中…' : '保存草稿' }}</button><button v-if="canSubmit" class="btn primary" type="submit" :disabled="saving || staleDefinition || hasUnsupported || hasAttachmentBlocks" :title="hasAttachmentBlocks ? attachmentBlockMessage : undefined" :aria-busy="saving">{{ saving ? '处理中…' : '提交报销' }}</button></div> <div v-if="canWriteApplication" class="form-actions"><button class="btn" type="button" :disabled="saving || staleDefinition || hasAttachmentBlocks" :title="hasAttachmentBlocks ? attachmentBlockMessage : undefined" @click="save(false)">{{ saving ? '保存中…' : '保存草稿' }}</button><button v-if="canSubmit" class="btn primary" type="submit" :disabled="saving || staleDefinition || hasUnsupported || hasAttachmentBlocks" :title="hasAttachmentBlocks ? attachmentBlockMessage : undefined" :aria-busy="saving">{{ saving ? '处理中…' : '提交报销' }}</button></div>
</form> </form>
<dialog ref="previewDialog" v-dialog-drag class="app-dialog route-dialog" aria-modal="true" aria-labelledby="route-dialog-title" aria-describedby="route-dialog-description" @cancel="handleDialogCancel" @click="handleBackdropClick"> <dialog v-if="canPreviewRoute" ref="previewDialog" v-dialog-drag class="app-dialog route-dialog" aria-modal="true" aria-labelledby="route-dialog-title" aria-describedby="route-dialog-description" @cancel="handleDialogCancel" @click="handleBackdropClick">
<div class="app-dialog__panel route-dialog-panel"> <div class="app-dialog__panel route-dialog-panel">
<header class="route-dialog-head" data-dialog-drag-handle> <header class="route-dialog-head" data-dialog-drag-handle>
<div><span class="eyebrow">APPROVAL PREVIEW</span><h2 id="route-dialog-title">确认审批路线</h2><p id="route-dialog-description">以下为预计审批路径,实际审批人可能在提交时由飞书确定。</p></div> <div><span class="eyebrow">APPROVAL PREVIEW</span><h2 id="route-dialog-title">确认审批路线</h2><p id="route-dialog-description">以下为预计审批路径,实际审批人可能在提交时由飞书确定。</p></div>
@@ -106,13 +110,17 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue' import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus' import { ElMessage } from '@/utils/uiFeedback'
import { reimbursementApi, type ApprovalRoutePreview, type CreateApplicationRequest, type ExpenseItem, type ExpenseTypeMetadata, type ReimbursementFormAttachment, type ReimbursementFormDefinition, type ReimbursementFormField } from '@/api/reimbursement' import { reimbursementApi, type ApprovalRoutePreview, type CreateApplicationRequest, type ExpenseItem, type ExpenseTypeMetadata, type ReimApplicationDetail, type ReimbursementFormAttachment, type ReimbursementFormDefinition, type ReimbursementFormField } from '@/api/reimbursement'
import { payeesApi, type PayeeAccount } from '@/api/payees'
import FeishuFormFields from '@/components/reimbursement/FeishuFormFields.vue' import FeishuFormFields from '@/components/reimbursement/FeishuFormFields.vue'
import { hasOwnField } from '@/finance/financeUi'
import { attachmentIdsMissingMetadata, expenseItemAttachmentMetadata, hydratedAttachmentIds } from '@/modules/reimbursementAttachments' import { attachmentIdsMissingMetadata, expenseItemAttachmentMetadata, hydratedAttachmentIds } from '@/modules/reimbursementAttachments'
import { useAuthorizationStore } from '@/store/authorization'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
import { useWorkbenchStore } from '@/store/workbench' import { useWorkbenchStore } from '@/store/workbench'
import { inspectMoneyAmount, moneyAmountMessage, normalizeMoneyAmount } from '@/utils/moneyAmount' import { inspectMoneyAmount, moneyAmountMessage, normalizeMoneyAmount } from '@/utils/moneyAmount'
import { isReimbursementConflict, isReimbursementFormConflict, reimbursementErrorMessage, reimbursementPayeeSelectorErrorMessage } from '@/modules/reimbursementFormErrors'
type FieldLevel = 'HIDDEN' | 'READ' | 'EDIT' type FieldLevel = 'HIDDEN' | 'READ' | 'EDIT'
interface AttachmentEntry extends ReimbursementFormAttachment { localKey: string; status: 'uploaded' | 'pending' | 'failed' | 'deleting'; error?: string } interface AttachmentEntry extends ReimbursementFormAttachment { localKey: string; status: 'uploaded' | 'pending' | 'failed' | 'deleting'; error?: string }
@@ -121,6 +129,7 @@ interface FormItem extends ExpenseItem { key: number; description: string; attac
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const userStore = useUserStore() const userStore = useUserStore()
const authorization = useAuthorizationStore()
const store = useWorkbenchStore() const store = useWorkbenchStore()
const id = computed(() => route.params.id ? String(route.params.id) : '') const id = computed(() => route.params.id ? String(route.params.id) : '')
const existing = computed(() => id.value ? store.getById(id.value) : null) const existing = computed(() => id.value ? store.getById(id.value) : null)
@@ -131,6 +140,7 @@ const loadError = ref('')
const definitionError = ref('') const definitionError = ref('')
const definition = ref<ReimbursementFormDefinition | null>(null) const definition = ref<ReimbursementFormDefinition | null>(null)
const expenseTypes = ref<ExpenseTypeMetadata[]>([]) const expenseTypes = ref<ExpenseTypeMetadata[]>([])
const activePayees = ref<PayeeAccount[]>([])
const activeFields = ref<ReimbursementFormField[]>([]) const activeFields = ref<ReimbursementFormField[]>([])
const activeMode = ref<'FEISHU' | 'LOCAL'>('LOCAL') const activeMode = ref<'FEISHU' | 'LOCAL'>('LOCAL')
const pinnedFingerprint = ref<string>() const pinnedFingerprint = ref<string>()
@@ -158,11 +168,32 @@ const newItem = (value?: Partial<ExpenseItem>, applicationAttachments: Parameter
} }
const form = reactive({ title: '', expenseTypeId: undefined as number | undefined, category: '', totalAmount: 0, description: '', payeeName: '', payeeBankId: undefined as number | undefined, items: [newItem()] }) const form = reactive({ title: '', expenseTypeId: undefined as number | undefined, category: '', totalAmount: 0, description: '', payeeName: '', payeeBankId: undefined as number | undefined, items: [newItem()] })
const canWriteApplication = computed(() => userStore.canEdit(id.value ? 'reimbursement.application.edit' : 'reimbursement.application.create'))
const canSubmit = computed(() => userStore.canEdit('reimbursement.application.submit'))
const fieldLevel = (code: string): FieldLevel => userStore.access(code) const fieldLevel = (code: string): FieldLevel => userStore.access(code)
const showField = (code: string) => fieldLevel(code) !== 'HIDDEN' const uiRead = (code: string) => fieldLevel(code) !== 'HIDDEN'
const readonlyField = (code: string) => fieldLevel(code) === 'READ' const uiEdit = (code: string) => fieldLevel(code) === 'EDIT'
const writeActionCode = computed(() => id.value ? 'reimbursement.application.edit' : 'reimbursement.application.create')
const canWriteApplication = computed(() => authorization.can(id.value ? 'reimbursement.application:edit' : 'reimbursement.application:create') && uiEdit(writeActionCode.value))
const canPreviewRoute = computed(() => uiRead('dialog.application.route-preview') && uiRead('dialog.application.route-preview.nodes'))
const canSubmit = computed(() => authorization.can('reimbursement.application:submit') && canPreviewRoute.value && uiEdit('dialog.application.submit'))
const fieldKeys: Record<string, keyof ReimApplicationDetail> = { 'application:amount': 'totalAmount', 'application:payeeName': 'payeeName', 'application:bankAccount': 'payeeBankId' }
const projectedFieldCodes: Partial<Record<keyof ReimApplicationDetail, string>> = {
title: 'ui.application.form.title',
expenseTypeId: 'ui.application.form.expense-type',
description: 'ui.application.form.description',
expenseItems: 'ui.application.form.expense-items',
}
const editableField = (key: keyof ReimApplicationDetail) => !id.value || Boolean(existing.value && hasOwnField(existing.value, key))
const showField = (code: string) => fieldLevel(code) !== 'HIDDEN' && editableField(fieldKeys[code])
const readonlyField = (code: string) => fieldLevel(code) !== 'EDIT'
const projectedFieldCode = (key: keyof ReimApplicationDetail) => projectedFieldCodes[key]
const showProjectedField = (key: keyof ReimApplicationDetail) => {
const code = projectedFieldCode(key)
return editableField(key) && Boolean(code && uiRead(code))
}
const readonlyProjectedField = (key: keyof ReimApplicationDetail) => {
const code = projectedFieldCode(key)
return !code || !uiEdit(code)
}
const itemsTotal = computed(() => form.items.reduce((sum, item) => sum + (Number(item.amount) || 0), 0)) const itemsTotal = computed(() => form.items.reduce((sum, item) => sum + (Number(item.amount) || 0), 0))
const amountMatches = computed(() => form.items.length > 0 && form.totalAmount > 0 && Math.abs(itemsTotal.value - form.totalAmount) < 0.005) const amountMatches = computed(() => form.items.length > 0 && form.totalAmount > 0 && Math.abs(itemsTotal.value - form.totalAmount) < 0.005)
const localAmountDrafts = reactive<Record<number, string>>({}) const localAmountDrafts = reactive<Record<number, string>>({})
@@ -217,7 +248,14 @@ const writableCanonicalField = (field: ReimbursementFormField) => {
const renderedBindings = computed(() => new Set(activeFields.value.filter(writableCanonicalField).map(field => field.binding))) const renderedBindings = computed(() => new Set(activeFields.value.filter(writableCanonicalField).map(field => field.binding)))
const rowReasonCaptured = computed(() => activeFields.value.some(field => field.type === 'EXPENSE_ITEMS' && field.binding === 'EXPENSE_ITEMS' && field.children.some(child => child.binding === 'EXPENSE_DESCRIPTION' && validExpenseChild(child)))) const rowReasonCaptured = computed(() => activeFields.value.some(field => field.type === 'EXPENSE_ITEMS' && field.binding === 'EXPENSE_ITEMS' && field.children.some(child => child.binding === 'EXPENSE_DESCRIPTION' && validExpenseChild(child))))
const missingBinding = (binding: string) => !isFeishu.value || (!(['TITLE', 'DESCRIPTION'].includes(binding) && rowReasonCaptured.value) && !renderedBindings.value.has(binding as ReimbursementFormField['binding'])) const missingBinding = (binding: string) => !isFeishu.value || (!(['TITLE', 'DESCRIPTION'].includes(binding) && rowReasonCaptured.value) && !renderedBindings.value.has(binding as ReimbursementFormField['binding']))
const hasSupplementFields = computed(() => ['TITLE', 'EXPENSE_TYPE', 'TOTAL_AMOUNT', 'DESCRIPTION'].some(missingBinding) || showField('application:payeeName') || showField('application:bankAccount')) const hasSupplementFields = computed(() => (
(missingBinding('TITLE') && showProjectedField('title'))
|| (missingBinding('EXPENSE_TYPE') && showProjectedField('expenseTypeId'))
|| (missingBinding('TOTAL_AMOUNT') && showField('application:amount'))
|| (missingBinding('DESCRIPTION') && showProjectedField('description'))
|| showField('application:payeeName')
|| showField('application:bankAccount')
))
const shortFingerprint = computed(() => pinnedFingerprint.value?.slice(0, 8) || '未知') const shortFingerprint = computed(() => pinnedFingerprint.value?.slice(0, 8) || '未知')
const hasUnsupported = computed(() => activeFields.value.some(field => { const hasUnsupported = computed(() => activeFields.value.some(field => {
if (field.type === 'CONTACT') return field.binding !== 'APPLICANT_CONTACT' if (field.type === 'CONTACT') return field.binding !== 'APPLICANT_CONTACT'
@@ -246,13 +284,13 @@ const hydrate = () => {
const item = existing.value const item = existing.value
if (!item) { form.payeeName = userName.value; return } if (!item) { form.payeeName = userName.value; return }
persistedApplicationId.value = item.id persistedApplicationId.value = item.id
form.title = item.title if (hasOwnField(item, 'title')) form.title = item.title
form.expenseTypeId = item.expenseTypeId || undefined if (hasOwnField(item, 'expenseTypeId')) form.expenseTypeId = item.expenseTypeId || undefined
form.category = item.expenseTypeName || item.category if (hasOwnField(item, 'category')) form.category = item.expenseTypeName || item.category
form.totalAmount = item.totalAmount if (hasOwnField(item, 'totalAmount')) form.totalAmount = item.totalAmount
form.description = item.description if (hasOwnField(item, 'description')) form.description = item.description
form.payeeName = item.payeeName || userName.value if (hasOwnField(item, 'payeeName')) form.payeeName = item.payeeName
form.payeeBankId = item.payeeBankId || undefined if (hasOwnField(item, 'payeeBankId')) form.payeeBankId = item.payeeBankId || undefined
form.items = item.expenseItems.length ? item.expenseItems.map(expense => newItem(expense, item.attachments)) : [newItem({ amount: item.totalAmount, category: item.category, description: item.title })] form.items = item.expenseItems.length ? item.expenseItems.map(expense => newItem(expense, item.attachments)) : [newItem({ amount: item.totalAmount, category: item.category, description: item.title })]
if (item.formSnapshot?.mode === 'FEISHU') { if (item.formSnapshot?.mode === 'FEISHU') {
activeMode.value = 'FEISHU' activeMode.value = 'FEISHU'
@@ -262,7 +300,6 @@ const hydrate = () => {
activeFields.value.filter(field => field.binding === 'APPLICANT_CONTACT' || field.binding === 'APPLICANT_DEPARTMENT').forEach(field => delete formValues[field.valueKey]) activeFields.value.filter(field => field.binding === 'APPLICANT_CONTACT' || field.binding === 'APPLICANT_DEPARTMENT').forEach(field => delete formValues[field.valueKey])
} }
} }
const localDefinition = (): ReimbursementFormDefinition => ({ mode: 'LOCAL', fields: [] })
/** One short retry — sync may still be flushing the snapshot when the create page opens. */ /** One short retry — sync may still be flushing the snapshot when the create page opens. */
const loadFormDefinitionWithRetry = async (): Promise<ReimbursementFormDefinition> => { const loadFormDefinitionWithRetry = async (): Promise<ReimbursementFormDefinition> => {
try { try {
@@ -277,6 +314,7 @@ const loadFormDefinitionWithRetry = async (): Promise<ReimbursementFormDefinitio
} }
} }
const loadPage = async () => { const loadPage = async () => {
const preservedFormValues = { ...formValues }
loading.value = true loading.value = true
definitionError.value = '' definitionError.value = ''
loadError.value = '' loadError.value = ''
@@ -291,11 +329,28 @@ const loadPage = async () => {
} else if (!store.reimbursements.length) await store.load() } else if (!store.reimbursements.length) await store.load()
hydrate() hydrate()
if (id.value && !existing.value) throw new Error('未找到该报销单,无法编辑') if (id.value && !existing.value) throw new Error('未找到该报销单,无法编辑')
const [definitionResult, expenseTypesResult] = await Promise.allSettled([loadFormDefinitionWithRetry(), reimbursementApi.getExpenseTypes()]) const [definitionResult, expenseTypesResult, payeesResult] = await Promise.allSettled([loadFormDefinitionWithRetry(), reimbursementApi.getExpenseTypes(), payeesApi.ownActive()])
if (expenseTypesResult.status === 'rejected') throw expenseTypesResult.reason if (expenseTypesResult.status === 'rejected') throw expenseTypesResult.reason
if (payeesResult.status === 'rejected') {
const message = reimbursementPayeeSelectorErrorMessage(payeesResult.reason, '无法读取本人启用账户,请稍后重试。')
if ((payeesResult.reason as { response?: { status?: number } } | null)?.response?.status === 403) {
activePayees.value = []
loadError.value = message
Object.assign(formValues, preservedFormValues)
} else {
throw payeesResult.reason
}
}
expenseTypes.value = expenseTypesResult.value expenseTypes.value = expenseTypesResult.value
if (payeesResult.status === 'fulfilled') {
activePayees.value = Array.isArray(payeesResult.value) ? payeesResult.value : []
}
if (!id.value && !form.payeeBankId && activePayees.value.length) {
const preferred = activePayees.value.find(payee => payee.isDefault) || activePayees.value[0]
form.payeeBankId = preferred.id
if (!form.payeeName) form.payeeName = preferred.name
}
if (definitionResult.status === 'fulfilled') definition.value = definitionResult.value if (definitionResult.status === 'fulfilled') definition.value = definitionResult.value
else if (store.source === 'fallback') definition.value = localDefinition()
else throw definitionResult.reason else throw definitionResult.reason
if (!definition.value || !Array.isArray(definition.value.fields)) throw new Error('审批模板响应格式无效,请联系管理员重新同步') if (!definition.value || !Array.isArray(definition.value.fields)) throw new Error('审批模板响应格式无效,请联系管理员重新同步')
if (!Array.isArray(expenseTypes.value) || !expenseTypes.value.length) throw new Error('没有可用费用类型,无法填写报销。') if (!Array.isArray(expenseTypes.value) || !expenseTypes.value.length) throw new Error('没有可用费用类型,无法填写报销。')
@@ -359,14 +414,9 @@ const removeItem = async (index: number) => {
} }
const syncExpenseType = () => { const type = expenseTypes.value.find(entry => entry.id === form.expenseTypeId); form.category = type?.category || type?.name || ''; form.items.forEach(item => { item.category = form.category }) } const syncExpenseType = () => { const type = expenseTypes.value.find(entry => entry.id === form.expenseTypeId); form.category = type?.category || type?.name || ''; form.items.forEach(item => { item.category = form.category }) }
const permissionBlock = (code: string, label: string, value: unknown) => { const level = fieldLevel(code); const missing = value === undefined || value === null || value === '' || Number(value) === 0; return level !== 'EDIT' && missing ? `当前字段“${label}”为${level === 'HIDDEN' ? '隐藏' : '只读'},但业务接口仍要求该字段,请联系管理员开放字段权限后再提交。` : '' } const permissionBlock = (code: string, label: string, value: unknown) => { const level = fieldLevel(code); const missing = value === undefined || value === null || value === '' || Number(value) === 0; return level !== 'EDIT' && missing ? `当前字段“${label}”为${level === 'HIDDEN' ? '隐藏' : '只读'},但业务接口仍要求该字段,请联系管理员开放字段权限后再提交。` : '' }
const errorMessage = (error: unknown, fallback: string) => { const errorMessage = reimbursementErrorMessage
const responseMessage = (error as { response?: { data?: { message?: unknown } } })?.response?.data?.message const isConflict = isReimbursementConflict
if (typeof responseMessage === 'string' && responseMessage.trim()) return responseMessage.trim() const isFormConflict = isReimbursementFormConflict
return error instanceof Error && error.message ? error.message : fallback
}
const isConflict = (error: unknown) => (error as { response?: { status?: number } } | null)?.response?.status === 409
const conflictMessage = (error: unknown) => String((error as { response?: { data?: { message?: unknown } } } | null)?.response?.data?.message || '')
const isFormConflict = (error: unknown) => isConflict(error) && /表单|模板|fingerprint/i.test(conflictMessage(error))
const compatibleCustomType = (oldField: ReimbursementFormField, currentField: ReimbursementFormField) => { const compatibleCustomType = (oldField: ReimbursementFormField, currentField: ReimbursementFormField) => {
if (oldField.type === currentField.type) return true if (oldField.type === currentField.type) return true
const textTypes = new Set<ReimbursementFormField['type']>(['TEXT', 'TEXTAREA']) const textTypes = new Set<ReimbursementFormField['type']>(['TEXT', 'TEXTAREA'])
@@ -410,6 +460,7 @@ const invalidatePreview = (closeDialog = false) => {
if (closeDialog && previewDialog.value?.open) previewDialog.value.close() if (closeDialog && previewDialog.value?.open) previewDialog.value.close()
} }
const openPreview = async () => { const openPreview = async () => {
if (!canPreviewRoute.value) return
if (!previewDialog.value?.open) previewDialog.value?.showModal() if (!previewDialog.value?.open) previewDialog.value?.showModal()
await nextTick() await nextTick()
} }
@@ -425,7 +476,7 @@ const handleBackdropClick = (event: MouseEvent) => {
if (event.target === previewDialog.value) closePreview() if (event.target === previewDialog.value) closePreview()
} }
const requestPreview = async () => { const requestPreview = async () => {
if (previewLoading.value || submitting.value || !persistedApplicationId.value) return if (!canPreviewRoute.value || previewLoading.value || submitting.value || !persistedApplicationId.value) return
const version = ++previewRequestVersion const version = ++previewRequestVersion
preview.value = null preview.value = null
previewError.value = '' previewError.value = ''
@@ -437,7 +488,7 @@ const requestPreview = async () => {
if (version === previewRequestVersion) { if (version === previewRequestVersion) {
if (isFormConflict(error)) { if (isFormConflict(error)) {
staleDefinition.value = true staleDefinition.value = true
loadError.value = '审批模板已更新(409)。已保留当前输入,请刷新后按最新模板重新核对。' loadError.value = '审批模板已更新(409)。已保留当前输入,请点击“升级到最新模板并核对”。'
previewDialog.value?.close() previewDialog.value?.close()
} else previewError.value = errorMessage(error, '无法获取预计审批路径,请重试。') } else previewError.value = errorMessage(error, '无法获取预计审批路径,请重试。')
} }
@@ -451,25 +502,32 @@ const requestPreview = async () => {
const submittedCustomValues = () => Object.fromEntries(activeFields.value const submittedCustomValues = () => Object.fromEntries(activeFields.value
.filter(field => field.binding === 'CUSTOM' && !field.readOnly && field.type !== 'CONTACT' && field.type !== 'DISPLAY' && field.type !== 'EXPENSE_ITEMS') .filter(field => field.binding === 'CUSTOM' && !field.readOnly && field.type !== 'CONTACT' && field.type !== 'DISPLAY' && field.type !== 'EXPENSE_ITEMS')
.map(field => [field.valueKey, formValues[field.valueKey]])) .map(field => [field.valueKey, formValues[field.valueKey]]))
const payload = (): CreateApplicationRequest => ({ const writableProjectedField = (key: keyof ReimApplicationDetail, code?: string) => {
title: form.title, const catalogCode = code || projectedFieldCode(key)
expenseTypeId: form.expenseTypeId!, return editableField(key) && (!catalogCode || fieldLevel(catalogCode) === 'EDIT')
category: form.category, }
totalAmount: Number(form.totalAmount.toFixed(2)), const payload = (): Partial<CreateApplicationRequest> => {
description: form.description, const result: Partial<CreateApplicationRequest> = {}
payeeName: form.payeeName, if (writableProjectedField('title')) result.title = form.title
payeeBankId: form.payeeBankId!, if (writableProjectedField('expenseTypeId')) result.expenseTypeId = form.expenseTypeId!
items: form.items.map((item, index) => ({ seqNo: index + 1, expenseDate: item.expenseDate, category: item.category, description: item.description, amount: normalizeMoneyAmount(item.amount), attachmentIds: [...item.attachmentIds] })), if (writableProjectedField('category')) result.category = form.category
...(isFeishu.value ? { formFingerprint: pinnedFingerprint.value, formValues: submittedCustomValues() } : {}), if (writableProjectedField('totalAmount', 'application:amount')) result.totalAmount = Number(form.totalAmount.toFixed(2))
}) if (writableProjectedField('description')) result.description = form.description
if (writableProjectedField('payeeName', 'application:payeeName')) result.payeeName = form.payeeName
if (writableProjectedField('payeeBankId', 'application:bankAccount')) result.payeeBankId = form.payeeBankId!
if (writableProjectedField('expenseItems')) result.items = form.items.map((item, index) => ({ seqNo: index + 1, expenseDate: item.expenseDate, category: item.category, description: item.description, amount: normalizeMoneyAmount(item.amount), attachmentIds: [...item.attachmentIds] }))
if (isFeishu.value && uiEdit('ui.application.form.dynamic') && (!id.value || hasOwnField(existing.value, 'formSnapshot'))) {
result.formFingerprint = pinnedFingerprint.value
result.formValues = submittedCustomValues()
}
return result
}
const validate = () => { const validate = () => {
if (staleDefinition.value) return '审批模板已更新,请刷新后重新核对并录入。' if (staleDefinition.value) return '审批模板已更新,请点击“升级到最新模板并核对”。'
if (hasUnsupported.value) return '审批模板包含当前系统不支持的控件,无法保存或提交,请联系管理员。' if (hasUnsupported.value) return '审批模板包含当前系统不支持的控件,无法保存或提交,请联系管理员。'
if (attachmentIntegrityError.value) return attachmentIntegrityError.value if (attachmentIntegrityError.value) return attachmentIntegrityError.value
if (hasAttachmentBlocks.value) return '请等待附件上传或移除完成,并处理上传失败的文件。' if (hasAttachmentBlocks.value) return '请等待附件上传或移除完成,并处理上传失败的文件。'
if (attachmentRequired.value && form.items.some(item => !item.attachmentIds.length)) return '请为每条费用明细上传必填附件。' if (attachmentRequired.value && form.items.some(item => !item.attachmentIds.length)) return '请为每条费用明细上传必填附件。'
const hiddenRequired = [permissionBlock('application:amount', '报销金额', form.totalAmount), permissionBlock('application:payeeName', '收款人', form.payeeName), permissionBlock('application:bankAccount', '收款账户', form.payeeBankId)].find(Boolean)
if (hiddenRequired) return hiddenRequired
const missingCustom = activeFields.value.find(field => field.binding === 'CUSTOM' && field.required && !field.readOnly && (formValues[field.valueKey] == null || formValues[field.valueKey] === '' || (Array.isArray(formValues[field.valueKey]) && !(formValues[field.valueKey] as unknown[]).length))) const missingCustom = activeFields.value.find(field => field.binding === 'CUSTOM' && field.required && !field.readOnly && (formValues[field.valueKey] == null || formValues[field.valueKey] === '' || (Array.isArray(formValues[field.valueKey]) && !(formValues[field.valueKey] as unknown[]).length)))
if (missingCustom) return `请填写飞书表单必填项“${missingCustom.label}”` if (missingCustom) return `请填写飞书表单必填项“${missingCustom.label}”`
const invalidDecimal = activeFields.value.find(field => field.binding === 'CUSTOM' && field.type === 'DECIMAL' && !field.readOnly && formValues[field.valueKey] != null && formValues[field.valueKey] !== '' && !/^-?\d+(\.\d+)?$/.test(String(formValues[field.valueKey]))) const invalidDecimal = activeFields.value.find(field => field.binding === 'CUSTOM' && field.type === 'DECIMAL' && !field.readOnly && formValues[field.valueKey] != null && formValues[field.valueKey] !== '' && !/^-?\d+(\.\d+)?$/.test(String(formValues[field.valueKey])))
@@ -480,11 +538,10 @@ const validate = () => {
const issue = inspectMoneyAmount(localAmountSource(item) || item.amount)! const issue = inspectMoneyAmount(localAmountSource(item) || item.amount)!
return `第 ${badAmountIndex + 1} 条费用明细:${moneyAmountMessage(issue, '金额')}` return `第 ${badAmountIndex + 1} 条费用明细:${moneyAmountMessage(issue, '金额')}`
} }
const totalIssue = inspectMoneyAmount(form.totalAmount > 0 ? form.totalAmount : '') if (writableProjectedField('totalAmount', 'application:amount')) { const totalIssue = inspectMoneyAmount(form.totalAmount > 0 ? form.totalAmount : ''); if (totalIssue) return moneyAmountMessage(totalIssue, '申请金额') }
if (totalIssue) return moneyAmountMessage(totalIssue, '申请金额') if ((writableProjectedField('title') && !form.title) || (writableProjectedField('description') && !form.description) || (writableProjectedField('expenseTypeId') && !form.expenseTypeId) || (writableProjectedField('category') && !form.category) || (writableProjectedField('payeeName', 'application:payeeName') && !form.payeeName) || (writableProjectedField('payeeBankId', 'application:bankAccount') && !form.payeeBankId) || (writableProjectedField('expenseItems') && !form.items.length)) return '请完善可编辑的必填信息后再保存'
if (!form.title || !form.description || !form.expenseTypeId || !form.category || !form.payeeName || !form.payeeBankId || !form.items.length) return '请完善必填信息后再保存' if (writableProjectedField('expenseItems') && form.items.some(item => !item.expenseDate || !item.category || !item.description)) return '请完善费用明细的日期、类别和说明'
if (form.items.some(item => !item.expenseDate || !item.category || !item.description)) return '请完善费用明细的日期、类别和说明' if (writableProjectedField('expenseItems') && writableProjectedField('totalAmount', 'application:amount') && !amountMatches.value) return '明细合计须与申请金额一致,请核对各行金额'
if (!amountMatches.value) return '明细合计须与申请金额一致,请核对各行金额'
return '' return ''
} }
const save = async (submit: boolean) => { const save = async (submit: boolean) => {
@@ -510,9 +567,9 @@ const save = async (submit: boolean) => {
await openPreview() await openPreview()
await requestPreview() await requestPreview()
} catch (error) { } catch (error) {
if (isConflict(error)) { if (isFormConflict(error)) {
staleDefinition.value = true staleDefinition.value = true
loadError.value = '审批模板已更新(409)。已保留当前输入,请刷新后按最新模板重新核对。' loadError.value = '审批模板已更新(409)。已保留当前输入,请点击“升级到最新模板并核对”。'
} else loadError.value = errorMessage(error, '保存报销草稿失败,请重试。') } else loadError.value = errorMessage(error, '保存报销草稿失败,请重试。')
ElMessage.error(loadError.value) ElMessage.error(loadError.value)
} finally { } finally {
@@ -532,7 +589,7 @@ const confirmSubmit = async () => {
} catch (error) { } catch (error) {
if (isFormConflict(error)) { if (isFormConflict(error)) {
staleDefinition.value = true staleDefinition.value = true
loadError.value = '审批模板已更新(409)。已保留当前输入,请刷新后按最新模板重新核对。' loadError.value = '审批模板已更新(409)。已保留当前输入,请点击“升级到最新模板并核对”。'
previewDialog.value?.close() previewDialog.value?.close()
} else if (isConflict(error)) { } else if (isConflict(error)) {
invalidatePreview(false) invalidatePreview(false)
@@ -564,22 +621,64 @@ onMounted(loadPage)
</script> </script>
<style scoped> <style scoped>
/* Mixed reading/work area: it grows with the CSS viewport, while the 1900px cap
keeps labels and long text readable on ultra-wide displays. */
.application-form {
width: 100%;
max-width: clamp(1120px, 86vw, 1900px);
margin-right: auto;
margin-left: auto;
container-name: reimbursement-form;
container-type: inline-size;
}
.application-form { .application-form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 18px; gap: 20px;
} }
.application-form :deep(.page-head) { margin-bottom: 0; } .application-form :deep(.page-head) { margin-bottom: 0; }
.application-form :deep(.step-rail) { margin: 0; } .application-form :deep(.step-rail) { margin: 0; }
.application-form :deep(.inline-alert) { margin: 0; } .application-form :deep(.inline-alert) { margin: 0; }
.form-page { display: flex; flex-direction: column; gap: 16px; } .form-page { display: flex; flex-direction: column; gap: 20px; }
.form-page .section-card { margin: 0; } .permission-fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.form-page .section-card { margin: 0; border-color: #dbe4ec; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(23, 45, 66, .06); }
.form-page .section-gap { margin-top: 0; } .form-page .section-gap { margin-top: 0; }
.form-page .section-title { min-height: 78px; padding: 17px 22px; border-bottom: 1px solid #e4eaf0; background: linear-gradient(135deg, #f8fbfe 0%, #fff 72%); }
.section-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.section-heading > div { min-width: 0; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.section-marker { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 10px; background: #e5f1fd; color: var(--blue); font-size: 11px; font-weight: 700; }
.finance-marker { background: #e9f5ee; color: var(--success); }
.detail-marker { background: #fff2dc; color: #98640b; }
.form-page :deep(.form-grid) { .form-page :deep(.form-grid) {
gap: 16px 20px; grid-template-columns: minmax(0, 1fr);
padding: 20px 22px 22px; gap: 22px 24px;
padding: 24px 26px 28px;
} }
.form-page :deep(.field) { gap: 8px; } .form-page :deep(.field) { min-width: 0; align-content: start; gap: 8px; }
.form-page :deep(.field label),
.form-page :deep(.form-help),
.form-page :deep(.field-error) { overflow-wrap: anywhere; }
.form-page :deep(.field > label) { display: flex; min-height: 2.8em; align-items: flex-end; line-height: 1.4; }
.form-page :deep(.field input),
.form-page :deep(.field select),
.form-page :deep(.field textarea) { width: 100%; min-width: 0; max-inline-size: none; box-sizing: border-box; }
.form-page :deep(.field input),
.form-page :deep(.field select) { min-height: 42px; }
.form-page :deep(.field textarea) { min-height: 92px; resize: vertical; }
.form-page .expense-item :is(input, select, textarea) { width: 100%; min-width: 0; max-inline-size: none; box-sizing: border-box; }
.form-page .expense-items { gap: 16px; padding: 18px 22px 10px; }
.form-page .expense-item { grid-template-columns: minmax(0, 1fr); gap: 18px 20px; padding: 0 18px 20px; overflow: hidden; border-color: #dbe4ec; border-radius: 10px; background: #fff; }
.expense-item-heading { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -18px; padding: 12px 16px; border-bottom: 1px solid #e4eaf0; background: #f7f9fb; }
.expense-item-heading > div { display: flex; align-items: baseline; gap: 8px; }
.expense-item-heading span { color: var(--quiet); font-size: 10px; letter-spacing: .06em; }
.expense-item-heading strong { color: var(--navy); font-size: 12px; }
.expense-item-heading .remove-item { position: static; width: auto; margin: 0; padding: 5px 8px; border-radius: 5px; background: var(--danger-soft); }
.form-page :deep(.amount-summary) { margin: 10px 22px 22px; padding: 14px 16px; border: 1px solid #d8e5f1; border-radius: 9px; background: #f4f9fe; }
.form-page :deep(.amount-summary span) { color: var(--muted); }
.form-page :deep(.amount-summary strong) { font-size: 18px; }
.form-page :deep(.amount-mismatch-tip) { margin: -12px 24px 22px; }
.definition-bar { .definition-bar {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -598,11 +697,11 @@ onMounted(loadPage)
.conflict-alert { align-items: center; } .conflict-alert { align-items: center; }
.conflict-alert .btn { flex: 0 0 auto; margin-left: auto; } .conflict-alert .btn { flex: 0 0 auto; margin-left: auto; }
.migration-alert { border-color: #b9d7c4; background: var(--success-soft); color: var(--success); } .migration-alert { border-color: #b9d7c4; background: var(--success-soft); color: var(--success); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 8px 0 4px; } .form-actions { position: sticky; z-index: 4; bottom: 12px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding: 12px 14px; border: 1px solid #dbe4ec; border-radius: 10px; background: rgba(255,255,255,.96); box-shadow: 0 10px 30px rgba(23,45,66,.12); backdrop-filter: blur(10px); }
.route-dialog { width: min(680px, calc(100vw - 32px)); max-width: 100%; max-height: calc(100dvh - 32px); } .route-dialog { width: min(680px, calc(100vw - 32px)); max-width: 100%; max-height: calc(100dvh - 32px); }
.route-dialog-panel { display: flex; min-width: 0; max-height: calc(100dvh - 32px); flex-direction: column; } .route-dialog-panel { display: flex; min-width: 0; max-height: calc(100dvh - 32px); flex-direction: column; }
.route-dialog-body { min-width: 0; padding: 20px 24px; overflow-x: hidden; overflow-y: auto; } .route-dialog-body { min-width: 0; padding: 20px 24px; overflow-x: hidden; overflow-y: auto; }
.route-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr); gap: 1px; margin: 0 0 18px; overflow: hidden; border: 1px solid #d7e0e8; border-radius: 6px; background: var(--line); } .route-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 1px; margin: 0 0 18px; overflow: hidden; border: 1px solid #d7e0e8; border-radius: 6px; background: var(--line); }
.route-summary div { min-width: 0; padding: 11px 12px; background: var(--surface-raised); } .route-summary div { min-width: 0; padding: 11px 12px; background: var(--surface-raised); }
.route-summary dt { color: var(--quiet); font-size: 10px; } .route-summary dt { color: var(--quiet); font-size: 10px; }
.route-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; } .route-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
@@ -624,12 +723,64 @@ onMounted(loadPage)
.dynamic-approver strong { color: var(--body); } .dynamic-approver strong { color: var(--body); }
.quiet-copy { margin: 7px 0 0; color: var(--quiet); font-size: 11px; } .quiet-copy { margin: 7px 0 0; color: var(--quiet); font-size: 11px; }
.route-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 24px; border-top: 1px solid var(--line); background: var(--surface-raised); } .route-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 24px; border-top: 1px solid var(--line); background: var(--surface-raised); }
/* No-CQ fallback is mobile first and precedes the named container rules, so
modern browsers always use the form's real allocated width. */
@media (min-width: 800px) {
.form-page :deep(.form-grid),
.form-page .expense-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
.form-page :deep(.form-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 799px) {
.form-page :deep(.form-grid) { padding: 16px; }
.form-page :deep(.field.full) { grid-column: 1; }
.form-page :deep(.field > label) { min-height: 0; }
.form-actions { flex-direction: column-reverse; }
.form-actions .btn { width: 100%; }
}
@container reimbursement-form (min-width: 1050px) {
.form-page :deep(.form-grid) { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-page :deep(.semantic-title),
.form-page :deep(.semantic-expense-type),
.form-page :deep(.semantic-amount),
.form-page :deep(.semantic-payee),
.form-page :deep(.semantic-bank-account) { grid-column: span 6; }
.form-page :deep(.semantic-description) { grid-column: 1 / -1; }
.form-page .expense-item { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-page .expense-item-heading { grid-column: 1 / -1; }
.form-page .expense-date,
.form-page .expense-category,
.form-page .expense-amount,
.form-page .expense-description { grid-column: span 3; }
}
@container reimbursement-form (max-width: 1049px) {
.form-page :deep(.form-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-page .expense-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-page .expense-item-heading { grid-column: 1 / -1; }
}
@container reimbursement-form (max-width: 799px) {
.form-page :deep(.form-grid) { grid-template-columns: minmax(0, 1fr); padding: 16px; }
.form-page :deep(.field.full) { grid-column: 1; }
.form-page :deep(.field > label) { min-height: 0; }
.form-page .expense-item { grid-template-columns: minmax(0, 1fr); padding-right: 14px; padding-left: 14px; }
.form-page .expense-item-heading { grid-column: 1; margin-right: -14px; margin-left: -14px; }
.form-page .expense-description { grid-column: 1; }
.form-page :deep(.amount-summary) { align-items: flex-start; margin-right: 14px; margin-left: 14px; }
.form-actions { flex-direction: column-reverse; }
.form-actions .btn { width: 100%; }
}
@container reimbursement-form (min-width: 1500px) {
.form-page :deep(.semantic-title),
.form-page :deep(.semantic-expense-type),
.form-page :deep(.semantic-amount),
.form-page :deep(.semantic-payee),
.form-page :deep(.semantic-bank-account) { grid-column: span 4; }
}
@media (max-width: 560px) { @media (max-width: 560px) {
.definition-state > div { width: 100%; flex-direction: column; } .definition-state > div { width: 100%; flex-direction: column; }
.conflict-alert { align-items: flex-start; } .conflict-alert { align-items: flex-start; }
.conflict-alert .btn { width: 100%; margin-left: 0; } .conflict-alert .btn { width: 100%; margin-left: 0; }
.form-actions { flex-direction: column-reverse; }
.form-actions .btn { width: 100%; }
.route-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } .route-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
.route-dialog-panel { max-height: calc(100dvh - 20px); } .route-dialog-panel { max-height: calc(100dvh - 20px); }
.route-dialog-body { padding-right: 17px; padding-left: 17px; } .route-dialog-body { padding-right: 17px; padding-left: 17px; }
@@ -0,0 +1,152 @@
<template>
<section class="permission-editor" aria-labelledby="permission-editor-title">
<header class="editor-head">
<div><h3 id="permission-editor-title">系统导航权限</h3><p>目录与系统导航保持同一层级;右侧只配置当前页面的字段、按钮和弹窗。</p></div>
<label class="permission-search"><span class="sr-only">搜索导航或权限</span><input v-model="query" type="search" placeholder="搜索菜单、页面或功能"></label>
</header>
<div class="tree-toolbar">
<button class="btn small" type="button" @click="expandAll">展开全部</button><button class="btn small" type="button" @click="collapseAll">折叠全部</button>
<button class="btn small" type="button" :disabled="editorDisabled" @click="bulkNavigation(true)">全选目录</button><button class="btn small" type="button" :disabled="editorDisabled" @click="bulkNavigation(false)">清空目录</button>
<label class="linkage-toggle"><input v-model="linked" type="checkbox" :disabled="disabled"> 父子联动</label><span class="authorization-summary">{{ accessSummary }}</span>
</div>
<div v-if="!mayConfigure" class="permission-readonly">当前账号只能查看权限配置,不能修改。</div>
<div v-if="catalogError" class="inline-alert danger" role="alert">{{ catalogError }}</div>
<div class="permission-workspace">
<aside class="navigation-pane" aria-label="系统导航目录">
<div class="pane-title"><strong>系统导航目录</strong><span>{{ navigationBranches.length }} 项</span></div>
<div class="navigation-tree" role="tree">
<div v-for="entry in visibleNavigation" :key="entry.branch.code" class="navigation-row" :class="{ selected: selectedCode === entry.branch.code }" role="treeitem" :aria-level="entry.depth + 1" :aria-selected="selectedCode === entry.branch.code" :style="{ '--tree-depth': entry.depth }">
<button v-if="hasNavigationChildren(entry.branch)" class="tree-expander" type="button" :aria-expanded="isExpanded(entry.branch.code)" @click="toggleExpanded(entry.branch.code)">{{ isExpanded(entry.branch.code) || normalizedQuery ? '▾' : '▸' }}</button><span v-else class="tree-expander-spacer"></span>
<button class="tree-check" :class="navigationState(entry.branch)" type="button" role="checkbox" :aria-checked="navigationState(entry.branch).indeterminate ? 'mixed' : navigationState(entry.branch).checked" :disabled="editorDisabled || isProtected(entry.branch)" @click="toggleNavigation(entry.branch)"><span>{{ navigationState(entry.branch).indeterminate ? '−' : navigationState(entry.branch).checked ? '✓' : '' }}</span></button>
<button class="navigation-label" type="button" @click="selectNavigation(entry.branch)"><span class="navigation-icon">{{ permissionKind(entry.branch) === 'menu' ? '▦' : '·' }}</span><span><strong>{{ entry.branch.name }}</strong><small>{{ entry.branch.code }}</small></span></button>
</div>
<button v-if="compatibilityCount" class="compatibility-navigation" :class="{ selected: selectedCode === COMPATIBILITY_CODE }" type="button" @click="selectedCode = COMPATIBILITY_CODE"><span>◇</span><span><strong>兼容权限</strong><small>{{ compatibilityCount }} 项未归入导航目录</small></span></button>
<div v-if="!visibleNavigation.length" class="navigation-empty">没有匹配的导航或权限</div>
</div>
</aside>
<main class="permission-detail" aria-live="polite">
<template v-if="selectedNode">
<header class="detail-head"><div><span class="detail-type">{{ permissionKind(selectedNode) === 'menu' ? '导航分组' : '页面权限' }}</span><h4>{{ selectedNode.name }}</h4><code>{{ selectedNode.code }}</code></div><AccessSwitch :item="selectedNode" /></header>
<div v-if="permissionKind(selectedNode) === 'menu'" class="menu-overview">
<div class="menu-overview-copy"><strong>选择具体页面继续配置</strong><span>目录授权只控制导航可见性,不会自动授予提交、审批或付款。</span></div>
<button v-for="page in descendantPages(selectedNode)" :key="page.code" type="button" @click="selectNavigation(page)"><span>{{ page.name }}</span><small>{{ page.code }}</small></button>
<div v-if="!descendantPages(selectedNode).length" class="detail-empty">此导航分组下暂无页面。</div>
</div>
<div v-else class="feature-editor">
<div class="page-rule"><strong>页面与业务权限相互独立</strong><span>关闭页面会撤销其下功能;开启页面不会自动授予字段编辑或业务操作。</span></div>
<section v-for="section in featureSections" :key="section.key" class="feature-section"><header><h5>{{ section.label }}</h5><span>{{ section.rows.length }} 项</span></header><div class="permission-list"><PermissionRow v-for="row in section.rows" :key="row.item.code" :item="row.item" :depth="row.depth" /></div></section>
<div v-if="!featureSections.length" class="detail-empty">当前页面没有字段、按钮或弹窗权限。</div>
</div>
</template>
<template v-else-if="selectedCode === COMPATIBILITY_CODE">
<header class="detail-head"><div><span class="detail-type">历史兼容</span><h4>兼容权限</h4><code>不属于当前系统导航目录</code></div></header>
<div class="compatibility-copy">可识别的兼容项仍可配置;未知历史项只读保留,保存时不会丢失。</div>
<section v-if="catalogCompatibility.length" class="feature-section"><header><h5>可配置兼容项</h5><span>{{ catalogCompatibility.length }} 项</span></header><div class="permission-list"><PermissionRow v-for="item in catalogCompatibility" :key="item.code" :item="item" :depth="0" /></div></section>
<section v-if="unknownCompatibility.length" class="feature-section"><header><h5>未知历史项</h5><span>{{ unknownCompatibility.length }} 项</span></header><div class="permission-list"><div v-for="item in unknownCompatibility" :key="item.code" class="permission-row"><span class="permission-copy"><strong>{{ item.code }}</strong><small>目录中已不存在,原值保留</small></span><span class="legacy-level">{{ levelLabel(item.level) }}</span></div></div></section>
</template>
<div v-else class="detail-empty standalone">请从左侧选择一个菜单或页面。</div>
</main>
</div>
<div class="permission-footnote"><span>父子联动仅用于导航目录;页面内字段、按钮和弹窗仍需逐项配置。</span><span v-if="summary">派生 {{ summary.derivedCount }} · 系统 {{ summary.systemCount }} · 兼容 {{ summary.legacyCount }}</span></div>
</section>
</template>
<script setup lang="ts">
import { computed, defineComponent, h, ref, watch, type PropType } from 'vue'
import type { PermissionAccess, PermissionItem, RoleAuthorizationSummary } from '@/api/admin'
import { buildPermissionForest, descendants, permissionKind, setCatalogAccess, validatePermissionCatalog, type PermissionBranch } from '@/composables/permissionEditor'
import { useUserStore } from '@/store/user'
import { useAuthorizationStore } from '@/store/authorization'
type NavigationEntry = { branch: PermissionBranch; depth: number }
type FeatureRow = { item: PermissionBranch; depth: number }
type FeatureSection = { key: string; label: string; rows: FeatureRow[] }
const COMPATIBILITY_CODE = '__compatibility__'
const props = defineProps<{ catalog: PermissionItem[]; modelValue: Record<string, PermissionAccess>; summary?: RoleAuthorizationSummary; disabled?: boolean }>()
const emit = defineEmits<{ 'update:modelValue': [Record<string, PermissionAccess>] }>()
const userStore = useUserStore(), authorizationStore = useAuthorizationStore()
const mayConfigure = computed(() => authorizationStore.can('iam.policy:manage'))
const isSuperAdmin = computed(() => userStore.userInfo?.isSuperAdmin === true || (userStore.userInfo?.roleCodes || []).some(code => String(code).toUpperCase() === 'SUPER_ADMIN'))
const isProtected = (item: PermissionItem) => item.delegable === false && !isSuperAdmin.value
const query = ref(''), linked = ref(true), selectedCode = ref(''), expandedCodes = ref(new Set<string>()), initializedCatalog = ref('')
const catalogError = computed(() => validatePermissionCatalog(props.catalog))
const editorDisabled = computed(() => Boolean(props.disabled) || !mayConfigure.value || Boolean(catalogError.value))
const forest = computed(() => buildPermissionForest(props.catalog))
const descendantsOf = (items: PermissionBranch[]): PermissionBranch[] => items.flatMap(item => descendants(item))
const allBranches = computed(() => descendantsOf(forest.value))
const known = computed(() => new Set(props.catalog.map(item => item.code)))
const byCode = computed(() => new Map(allBranches.value.map(item => [item.code, item])))
const protectedCodes = computed(() => new Set(props.catalog.filter(isProtected).map(item => item.code)))
const normalizedQuery = computed(() => query.value.trim().toLocaleLowerCase())
const ordered = (items: PermissionBranch[]) => [...items].sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0) || a.code.localeCompare(b.code, 'zh-CN'))
const isNavigation = (item: PermissionItem) => ['menu', 'page'].includes(permissionKind(item))
const navigationChildren = (item: PermissionBranch) => ordered(item.children.filter(isNavigation))
const hasNavigationChildren = (item: PermissionBranch) => navigationChildren(item).length > 0
const navigationBranches = computed(() => allBranches.value.filter(isNavigation))
const branchMatches = (item: PermissionBranch): boolean => !normalizedQuery.value || `${item.name} ${item.code}`.toLocaleLowerCase().includes(normalizedQuery.value) || item.children.some(branchMatches)
const flattenNavigation = (items: PermissionBranch[], depth = 0): NavigationEntry[] => ordered(items.filter(isNavigation)).flatMap(branch => {
if (!branchMatches(branch)) return []
const entry = { branch, depth }
return normalizedQuery.value || expandedCodes.value.has(branch.code) ? [entry, ...flattenNavigation(navigationChildren(branch), depth + 1)] : [entry]
})
const visibleNavigation = computed(() => flattenNavigation(forest.value))
const selectedNode = computed(() => selectedCode.value === COMPATIBILITY_CODE ? undefined : byCode.value.get(selectedCode.value))
const isExpanded = (code: string) => expandedCodes.value.has(code)
const toggleExpanded = (code: string) => { const next = new Set(expandedCodes.value); next.has(code) ? next.delete(code) : next.add(code); expandedCodes.value = next }
const expandAll = () => { expandedCodes.value = new Set(navigationBranches.value.filter(hasNavigationChildren).map(item => item.code)) }
const collapseAll = () => { expandedCodes.value = new Set() }
const selectNavigation = (item: PermissionBranch) => { selectedCode.value = item.code; const next = new Set(expandedCodes.value); let parentCode = item.parentCode; while (parentCode) { next.add(parentCode); parentCode = byCode.value.get(parentCode)?.parentCode } expandedCodes.value = next }
const navigationDescendants = (branch: PermissionBranch) => descendants(branch).filter(isNavigation)
const navigationState = (branch: PermissionBranch) => { const items = navigationDescendants(branch); const selected = items.filter(item => (props.modelValue[item.code] || 'HIDDEN') !== 'HIDDEN').length; return { checked: Boolean(items.length) && selected === items.length, indeterminate: selected > 0 && selected < items.length } }
const toggleNavigation = (branch: PermissionBranch) => {
if (editorDisabled.value || isProtected(branch)) return
const checked = !navigationState(branch).checked
let next = { ...props.modelValue }
if (!checked) next = setCatalogAccess(branch.code, 'HIDDEN', next, props.catalog, protectedCodes.value)
else (linked.value ? navigationDescendants(branch) : [branch]).filter(item => !isProtected(item)).forEach(item => { next = setCatalogAccess(item.code, 'READ', next, props.catalog, protectedCodes.value) })
emit('update:modelValue', next)
}
const bulkNavigation = (checked: boolean) => {
if (editorDisabled.value) return
let next = { ...props.modelValue }
const targets = checked ? navigationBranches.value : ordered(forest.value.filter(isNavigation))
targets.filter(item => !isProtected(item)).forEach(item => { next = setCatalogAccess(item.code, checked ? 'READ' : 'HIDDEN', next, props.catalog, protectedCodes.value) })
emit('update:modelValue', next)
}
const level = (code: string): PermissionAccess => props.modelValue[code] || 'HIDDEN'
const setAccess = (code: string, value: PermissionAccess) => { const item = byCode.value.get(code); if (!item || editorDisabled.value || isProtected(item)) return; emit('update:modelValue', setCatalogAccess(code, value, props.modelValue, props.catalog, protectedCodes.value)) }
const allowedLevels = (item: PermissionItem): PermissionAccess[] => { const kind = permissionKind(item); if (kind === 'action') return ['HIDDEN', 'READ', 'EDIT']; if (kind === 'formField' || kind === 'dialogField' || kind === 'compat') return ['HIDDEN', 'READ', 'EDIT']; return ['HIDDEN', 'READ'] }
const levelLabel = (value: PermissionAccess) => value === 'HIDDEN' ? '隐藏' : value === 'READ' ? '只读 / 可见' : '可编辑 / 可执行'
const shortLevelLabel = (value: PermissionAccess) => value === 'HIDDEN' ? '隐藏' : value === 'READ' ? '可见' : '编辑'
const riskLabel = (item: PermissionItem) => item.riskLevel === 'CRITICAL' ? '关键' : item.riskLevel === 'HIGH' ? '高风险' : ''
const AccessSwitch = defineComponent({ props: { item: { type: Object as PropType<PermissionBranch>, required: true } }, setup(rowProps) { return () => h('div', { class: 'access-switch' }, allowedLevels(rowProps.item).map(value => h('button', { type: 'button', class: ['access-option', value.toLowerCase(), { active: level(rowProps.item.code) === value }], disabled: editorDisabled.value || isProtected(rowProps.item), 'aria-pressed': level(rowProps.item.code) === value, onClick: () => setAccess(rowProps.item.code, value) }, shortLevelLabel(value)))) } })
const PermissionRow = defineComponent({ props: { item: { type: Object as PropType<PermissionBranch>, required: true }, depth: { type: Number, default: 0 } }, setup(rowProps) { return () => h('div', { class: ['permission-row', { protected: isProtected(rowProps.item) }], style: { '--feature-depth': rowProps.depth } }, [h('span', { class: 'permission-copy' }, [h('span', { class: 'permission-name' }, [h('strong', rowProps.item.name), isProtected(rowProps.item) ? h('em', { class: 'permission-badge protected-badge' }, '不可委派') : null, riskLabel(rowProps.item) ? h('em', { class: ['permission-badge', `risk-${String(rowProps.item.riskLevel).toLowerCase()}`] }, riskLabel(rowProps.item)) : null]), h('small', rowProps.item.code)]), h(AccessSwitch, { item: rowProps.item })]) } })
const flattenFeature = (item: PermissionBranch, depth = 0): FeatureRow[] => [{ item, depth }, ...ordered(item.children.filter(child => !isNavigation(child) && permissionKind(child) !== 'compat')).flatMap(child => flattenFeature(child, depth + 1))]
const featureSections = computed<FeatureSection[]>(() => {
const page = selectedNode.value
if (!page || permissionKind(page) !== 'page') return []
const direct = ordered(page.children.filter(item => !isNavigation(item) && permissionKind(item) !== 'compat'))
const dialogs = direct.filter(item => permissionKind(item) === 'dialog')
const dialogCodes = new Set(dialogs.flatMap(item => flattenFeature(item).map(row => row.item.code)))
const definitions: Array<[string, string, (item: PermissionBranch) => boolean]> = [['list-fields', '列表字段', item => permissionKind(item) === 'listField'], ['form-fields', '表单字段', item => permissionKind(item) === 'formField'], ['actions', '页面按钮与业务动作', item => permissionKind(item) === 'action']]
const sections: FeatureSection[] = definitions.map(([key, label, matches]) => ({ key, label, rows: direct.filter(item => !dialogCodes.has(item.code) && matches(item)).map(item => ({ item, depth: 0 })) })).filter(section => section.rows.length)
if (dialogs.length) sections.push({ key: 'dialogs', label: '弹窗、弹窗字段与操作', rows: dialogs.flatMap(item => flattenFeature(item)) })
const assigned = new Set(sections.flatMap(section => section.rows.map(row => row.item.code)))
const other = direct.filter(item => !dialogCodes.has(item.code) && !assigned.has(item.code)).map(item => ({ item, depth: 0 }))
if (other.length) sections.push({ key: 'other', label: '其他功能', rows: other })
return sections
})
const descendantPages = (item: PermissionBranch) => descendants(item).filter(child => child.code !== item.code && permissionKind(child) === 'page')
const catalogCompatibility = computed(() => allBranches.value.filter(item => permissionKind(item) === 'compat'))
const unknownCompatibility = computed(() => Object.entries(props.modelValue).filter(([code]) => !known.value.has(code)).map(([code, value]) => ({ code, level: value })))
const compatibilityCount = computed(() => catalogCompatibility.value.length + unknownCompatibility.value.length)
const accessSummary = computed(() => { const values = Object.values(props.modelValue).filter(value => value !== 'HIDDEN'); return `已授权 ${values.length} 项 · 可编辑/执行 ${values.filter(value => value === 'EDIT').length} 项` })
watch(() => props.catalog, catalog => { const signature = catalog.map(item => item.code).join('|'); if (signature === initializedCatalog.value) return; initializedCatalog.value = signature; expandAll(); selectedCode.value = navigationBranches.value.find(item => permissionKind(item) === 'page')?.code || navigationBranches.value[0]?.code || (compatibilityCount.value ? COMPATIBILITY_CODE : '') }, { immediate: true })
watch(visibleNavigation, entries => { if (!normalizedQuery.value || selectedCode.value === COMPATIBILITY_CODE || entries.some(entry => entry.branch.code === selectedCode.value)) return; selectedCode.value = entries.find(entry => permissionKind(entry.branch) === 'page')?.branch.code || entries[0]?.branch.code || '' })
</script>
<style scoped>
.permission-editor{display:grid;min-width:0;gap:12px;padding:14px 16px 16px;container-name:permission-editor;container-type:inline-size}.editor-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.editor-head h3{color:var(--navy);font-size:14px}.editor-head p{margin-top:3px;color:var(--muted);font-size:11px}.permission-search{width:min(320px,100%)}.permission-search input{width:100%;min-height:38px;padding:7px 10px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:var(--text)}.tree-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--line)}.linkage-toggle{display:flex;align-items:center;gap:5px;margin-left:3px;font-size:11px}.linkage-toggle input{width:15px;height:15px;accent-color:var(--blue)}.authorization-summary{margin-left:auto;color:var(--muted);font-size:11px}.permission-readonly{padding:9px 12px;border-left:3px solid var(--warning);background:#fff8e8;color:var(--muted);font-size:11px}.permission-workspace{display:grid;grid-template-columns:minmax(250px,30%) minmax(0,1fr);height:clamp(480px,58vh,640px);min-height:0;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#fff}.navigation-pane{display:flex;min-width:0;min-height:0;flex-direction:column;border-right:1px solid var(--line);background:#f7f9fb}.pane-title{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 14px;border-bottom:1px solid var(--line);background:#fff}.pane-title strong{color:var(--navy);font-size:12px}.pane-title span{color:var(--quiet);font-size:10px}.navigation-tree{min-height:0;padding:8px 6px 12px;overflow:auto}.navigation-row{display:grid;grid-template-columns:22px 22px minmax(0,1fr);align-items:center;min-height:42px;padding-left:calc(var(--tree-depth)*14px);border-radius:5px;color:var(--body)}.navigation-row:hover{background:#edf3f9}.navigation-row.selected{background:#dfeefe;color:var(--navy)}.tree-expander,.tree-check,.navigation-label{border:0;background:transparent;color:inherit}.tree-expander{width:22px;height:30px;padding:0;color:var(--muted);cursor:pointer}.tree-expander-spacer{width:22px}.tree-check{display:grid;width:17px;height:17px;padding:0;place-items:center;border:1px solid #aab8c6;border-radius:3px;background:#fff;font-size:12px;line-height:1;cursor:pointer}.tree-check.checked,.tree-check.indeterminate{border-color:var(--blue);background:var(--blue);color:#fff}.tree-check:disabled{cursor:not-allowed;opacity:.55}.navigation-label{display:flex;min-width:0;align-items:center;gap:7px;padding:5px 6px;text-align:left;cursor:pointer}.navigation-icon{width:13px;flex:none;color:var(--blue);font-weight:700;text-align:center}.navigation-label>span:last-child,.compatibility-navigation>span:last-child{display:grid;min-width:0;gap:1px}.navigation-label strong,.compatibility-navigation strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.navigation-label small,.compatibility-navigation small{overflow:hidden;color:var(--quiet);font:9px var(--mono);text-overflow:ellipsis;white-space:nowrap}.compatibility-navigation{display:flex;width:calc(100% - 8px);align-items:center;gap:9px;margin:8px 4px 0;padding:10px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--body);text-align:left;cursor:pointer}.compatibility-navigation.selected{background:#dfeefe;color:var(--navy)}.navigation-empty{padding:24px 12px;color:var(--muted);font-size:11px;text-align:center}.permission-detail{min-width:0;min-height:0;overflow:auto}.detail-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:82px;padding:13px 18px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.96)}.detail-head>div:first-child{display:grid;min-width:0;gap:2px}.detail-type{color:var(--blue);font:700 9px var(--mono);letter-spacing:.08em}.detail-head h4{color:var(--navy);font-size:16px}.detail-head code{color:var(--quiet);font:10px var(--mono);overflow-wrap:anywhere}.access-switch{display:inline-flex;flex:none;padding:2px;border:1px solid var(--line);border-radius:6px;background:#f4f6f8}.access-option{min-width:50px;min-height:30px;padding:4px 8px;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:10px;cursor:pointer}.access-option.active{background:#fff;color:var(--navy);box-shadow:0 1px 3px rgba(16,42,67,.16);font-weight:700}.access-option.read.active{color:var(--blue)}.access-option.edit.active{color:var(--success)}.access-option.hidden.active{color:var(--danger)}.access-option:disabled{cursor:not-allowed;opacity:.6}.page-rule,.compatibility-copy{display:flex;align-items:baseline;gap:10px;padding:11px 18px;border-bottom:1px solid var(--line);background:#f8fafc;color:var(--muted);font-size:10px}.page-rule strong{flex:none;color:var(--navy);font-size:11px}.feature-section+.feature-section{border-top:1px solid var(--line)}.feature-section>header{display:flex;aliLine truncated
@container permission-editor (max-width:760px){.editor-head{align-items:stretch;flex-direction:column;gap:9px}.permission-search{width:100%}.authorization-summary{width:100%;margin-left:0}.permission-workspace{grid-template-columns:minmax(0,1fr);height:auto}.navigation-pane{max-height:320px;border-right:0;border-bottom:1px solid var(--line)}.permission-detail{min-height:420px;max-height:600px}.permission-footnote{align-items:flex-start;flex-direction:column}.detail-head{align-items:flex-start;flex-direction:column}.access-switch{width:100%}.access-option{flex:1}.page-rule{align-items:flex-start;flex-direction:column;gap:3px}}
@container permission-editor (max-width:480px){.permission-editor{padding-right:10px;padding-left:10px}.tree-toolbar .btn{flex:1}.permission-row{align-items:stretch;flex-direction:column}.permission-row .access-switch{width:100%}.permission-row .access-option{flex:1}.menu-overview{grid-template-columns:1fr}}
</style>
Loaded 100 of 148 files, more files were not shown because too many files have changed in this diff.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.