chore: 重新编译前端产物(补装CodeMirror依赖)
This commit is contained in:
1 parent
23e9e3da62
commit
4e384ca401
115 files changed
+147
-147
No files matched your search
@@ -0,0 +1 @@
|
||||
import{j as e,r as v}from"./vendor-codemirror-B1SGo4xl.js";import{m as b,B as i,D as M,a as V,b as q,c as H,d as Q,e as G,t as T}from"./index-Dungj95X.js";import{C as u,a as j,b as ye,c as Ne,d as we}from"./card-BIfzBCEy.js";import{B as C}from"./badge-CGJlVD3L.js";import{T as pe}from"./textarea-BxfjmLq5.js";import{b as k}from"./approval-BY_CqGOr.js";import{I as le}from"./input-CXoUQQLm.js";import{h as fe,aQ as Te,F as _,C as D,a as F,L as $,S as De,x as Fe,af as Ce,J as oe,aJ as Pe,ae as Se,b as ce,P as ke}from"./vendor-icons-DmqcWdzX.js";import{L as _e}from"./label-CMpUoC87.js";import{S as Le,a as Oe,b as Ie,c as $e,d as Re}from"./select-CiTqGGhE.js";import"./index-5FEebgvX.js";function ze(a){if(Array.isArray(a))return a;if(typeof a=="string")try{const r=JSON.parse(a);return Array.isArray(r)?r:[]}catch{return[]}return[]}function I(a){if(!a)return[];const r=typeof a=="string"?(()=>{try{return JSON.parse(a)}catch{return null}})():a;return r?Array.isArray(r.fields)?r.fields:[]:[]}function Be(a,r){if(!a)return null;let s;try{s=typeof a=="string"?JSON.parse(a):a}catch{return null}if(!s||typeof s!="object")return null;const o=I(r?.form_schema),n=new Map;o.forEach(p=>n.set(p.key,p.label));const m=Object.entries(s).filter(([,p])=>p!=null&&p!=="");return m.length===0?null:e.jsx("div",{"code-path":"src/components/approval/helpers.tsx:54:5",className:"grid grid-cols-2 gap-x-4 gap-y-3",children:m.map(([p,d])=>e.jsxs("div",{"code-path":"src/components/approval/helpers.tsx:56:9",className:"min-w-0",children:[e.jsx("p",{"code-path":"src/components/approval/helpers.tsx:57:11",className:"text-xs text-[var(--dg-text-muted)] mb-0.5",children:n.get(p)||p}),e.jsx("p",{"code-path":"src/components/approval/helpers.tsx:58:11",className:"text-sm text-[var(--dg-text-primary)] break-words",children:String(d)})]},p))})}const R=[{value:"server_apply",label:"云服务器申请",icon:fe,color:"var(--dg-cyan)"},{value:"app_deploy",label:"应用部署申请",icon:Te,color:"var(--dg-blue)"}],Y=a=>R.find(r=>r.value===a)?.label||a||"通用审批",L=a=>R.find(r=>r.value===a)?.color||"var(--dg-text-secondary)",Ee=a=>R.find(r=>r.value===a)?.icon||_,A=a=>a?.template?.type||a?.type||"";function U(a){const r=ze(a.steps),s=a.current_step??0,o=r.length,n=r.filter(p=>p.status==="approved"||p.status==="completed").length,m=o>0?Math.round(n/o*100):0;return{steps:r,currentIndex:s,total:o,completed:n,percentage:m}}function X(a){const{steps:r,currentIndex:s}=U(a);return r.length===0?null:e.jsx("div",{"code-path":"src/components/approval/helpers.tsx:100:5",className:"flex items-center gap-1 overflow-x-auto",children:r.map((o,n)=>{const m=o.status==="approved"||o.status==="completed",p=n===s,d=o.status==="rejected";return e.jsxs("div",{"code-path":"src/components/approval/helpers.tsx:106:11",className:"flex items-center",children:[e.jsxs("div",{"code-path":"src/components/approval/helpers.tsx:107:13",className:b("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs whitespace-nowrap",m&&"bg-emerald-500/10 text-emerald-400",p&&!d&&"bg-amber-500/10 text-amber-400 border border-amber-500/30",d&&"bg-red-500/10 text-red-400",!m&&!p&&!d&&"bg-[var(--dg-bg-tertiary)] text-[var(--dg-text-muted)]"),children:[m&&e.jsx(D,{"code-path":"src/components/approval/helpers.tsx:116:31",className:"h-3 w-3"}),d&&e.jsx(F,{"code-path":"src/components/approval/helpers.tsx:117:30",className:"h-3 w-3"}),p&&!d&&e.jsx($,{"code-path":"src/components/approval/helpers.tsx:118:44",className:"h-3 w-3 animate-spin"}),e.jsx("span",{"code-path":"src/components/approval/helpers.tsx:119:15",children:o.name||o.approver_name||`步骤 ${n+1}`})]}),n<r.length-1&&e.jsx("div",{"code-path":"src/components/approval/helpers.tsx:122:15",className:b("w-4 h-px",m?"bg-emerald-500/30":"bg-[var(--dg-border)]")})]},o.id||n)})})}const Je=[{key:"all",label:"全部",value:""},{key:"pending",label:"待审批",value:"pending"},{key:"approved",label:"已通过",value:"approved"},{key:"rejected",label:"已拒绝",value:"rejected"},{key:"processing",label:"进行中",value:"processing"},{key:"completed",label:"已完成",value:"completed"}];function Me(a){const r={pending:{label:"待审批",className:"border-amber-500/30 text-amber-400 bg-amber-500/10",dot:"bg-amber-400"},approved:{label:"已通过",className:"border-emerald-500/30 text-emerald-400 bg-emerald-500/10",dot:"bg-emerald-400"},rejected:{label:"已拒绝",className:"border-red-500/30 text-red-400 bg-red-500/10",dot:"bg-red-400"},processing:{label:"进行中",className:"border-[var(--dg-blue)]/30 text-[var(--dg-blue)] bg-[var(--dg-blue)]/10",dot:"bg-[var(--dg-blue)]"},completed:{label:"已完成",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)] bg-[var(--dg-bg-tertiary)]",dot:"bg-[var(--dg-text-secondary)]"}},s=r[a]||r.pending;return e.jsxs(C,{"code-path":"src/components/approval/ApprovalProcessTab.tsx:65:5",variant:"outline",className:s.className,children:[e.jsx("div",{"code-path":"src/components/approval/ApprovalProcessTab.tsx:66:7",cLine truncated
|
||||
Reference in new issue
Block a user