@vef-framework-react/approval 2.12.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/detail/admin.cjs +1 -1
- package/dist/cjs/components/detail/index.cjs +1 -1
- package/dist/cjs/components/timeline/index.cjs +1 -1
- package/dist/cjs/pages/delegation-page/columns.cjs +1 -1
- package/dist/cjs/pages/delegation-page/form.cjs +1 -1
- package/dist/cjs/pages/delegation-page/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
- package/dist/es/api/admin-api.js +1 -1
- package/dist/es/api/category-api.js +1 -1
- package/dist/es/api/delegation-api.js +1 -1
- package/dist/es/api/flow-api.js +1 -1
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/instance-api.js +1 -1
- package/dist/es/api/my-api.js +1 -1
- package/dist/es/api/query.js +1 -1
- package/dist/es/components/detail/action-modals.js +1 -1
- package/dist/es/components/detail/admin.js +2 -1
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +24 -15
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/form-panel/index.js +1 -1
- package/dist/es/components/format.js +1 -1
- package/dist/es/components/icon.js +1 -1
- package/dist/es/components/index.js +1 -1
- package/dist/es/components/principal/index.js +1 -1
- package/dist/es/components/status/colors.js +1 -1
- package/dist/es/components/status/index.js +1 -1
- package/dist/es/components/status/labels.js +1 -1
- package/dist/es/components/timeline/index.js +15 -9
- package/dist/es/components/user/index.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/pages/admin-page/index.js +1 -1
- package/dist/es/pages/admin-page/instances.js +1 -1
- package/dist/es/pages/admin-page/metrics.js +1 -1
- package/dist/es/pages/admin-page/projections.js +1 -1
- package/dist/es/pages/admin-page/tasks.js +1 -1
- package/dist/es/pages/category-page/columns.js +1 -1
- package/dist/es/pages/category-page/form.js +1 -1
- package/dist/es/pages/category-page/index.js +1 -1
- package/dist/es/pages/delegation-page/columns.js +3 -3
- package/dist/es/pages/delegation-page/form.js +3 -3
- package/dist/es/pages/delegation-page/index.js +3 -3
- package/dist/es/pages/flow-page/columns.js +1 -1
- package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
- package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
- package/dist/es/pages/flow-page/designer/form-step.js +1 -1
- package/dist/es/pages/flow-page/designer/index.js +134 -134
- package/dist/es/pages/flow-page/designer/review-step.js +40 -39
- package/dist/es/pages/flow-page/designer/types.js +5 -2
- package/dist/es/pages/flow-page/index.js +1 -1
- package/dist/es/pages/flow-page/search.js +1 -1
- package/dist/es/pages/flow-page/versions.js +1 -1
- package/dist/es/pages/index.js +1 -1
- package/dist/es/pages/initiate-page/index.js +1 -1
- package/dist/es/pages/initiate-page/start-drawer.js +1 -1
- package/dist/es/pages/my-instances-page/index.js +1 -1
- package/dist/es/pages/task-center-page/index.js +1 -1
- package/dist/es/permissions.js +1 -1
- package/dist/es/plugins/index.js +1 -1
- package/dist/es/types/enums.js +1 -1
- package/dist/es/types/index.js +1 -1
- package/dist/types/components/detail/index.d.ts +2 -1
- package/dist/types/pages/flow-page/designer/types.d.ts +14 -0
- package/dist/types/types/admin.d.ts +1 -0
- package/dist/types/types/delegation.d.ts +4 -4
- package/dist/types/types/detail.d.ts +6 -2
- package/dist/types/types/my.d.ts +2 -0
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../api/admin-api.cjs"),t=require("../status/labels.cjs"),n=require("../flow-graph/index.cjs"),r=require("../form-panel/index.cjs"),i=require("../format.cjs"),a=require("../user/index.cjs"),o=require("../timeline/index.cjs"),s=require("./index.cjs");let c=require("@vef-framework-react/core"),l=require("react"),u=require("@vef-framework-react/components"),d=require("@emotion/react/jsx-runtime");var f=[{title:`操作`,dataIndex:`action`,width:110,render:e=>(0,d.jsx)(u.Tag,{children:t.ACTIVITY_ACTION_LABELS[e]})},{title:`操作人`,dataIndex:`operator`,width:160,render:e=>(0,d.jsx)(a.UserLabel,{user:e})},{title:`详情`,dataIndex:`logId`,render:(e,t)=>{let n=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return(0,d.jsxs)(u.Stack,{gap:4,children:[t.transferTo&&(0,d.jsx)(u.Text,{type:`secondary`,children:`转办给 ${t.transferTo.name||t.transferTo.id}`}),n.length>0&&(0,d.jsx)(a.UserGroup,{avatarSize:20,users:n}),t.opinion&&(0,d.jsx)(u.Text,{style:{whiteSpace:`pre-wrap`},children:t.opinion})]})}},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>i.formatTimestamp(e)}];function p({instanceId:t}){let n=e.useAdminApprovalApi(),[r,i]=(0,l.useState)(1),[a,o]=(0,l.useState)(10),{data:s,isLoading:p}=(0,c.useQuery)({queryFn:n.findActionLogs,queryKey:[n.findActionLogs.key,{instanceId:t,[u.SYMBOL_PAGINATION]:{page:r,size:a}}]});return(0,d.jsx)(u.Table,{columns:f,dataSource:s?.items??[],loading:p,rowKey:`logId`,size:`small`,pagination:{current:r,pageSize:a,total:s?.total??0,showSizeChanger:!0,pageSizeOptions:u.pageSizeOptions,onChange:(e,t)=>{i(e),o(t)}}})}function m({instanceId:t}){let i=e.useAdminApprovalApi(),{data:a,isLoading:l}=(0,c.useQuery)({queryFn:i.getInstanceDetail,queryKey:[i.getInstanceDetail.key,{instanceId:t}]});if(l)return(0,d.jsx)(u.Flex,{align:`center`,justify:`center`,style:{minHeight:240},children:(0,d.jsx)(u.Spin,{})});if(!a)return(0,d.jsx)(u.Empty,{description:`未找到审批单`});let{instance:f}=a;return(0,d.jsxs)(u.Stack,{gap:20,children:[(0,d.jsx)(s.InstanceHeader,{applicant:f.applicant,businessRef:f.businessRef,createdAt:f.createdAt,currentNodeName:f.currentNodeName,finishedAt:f.finishedAt,flowName:f.flowName,instanceNo:f.instanceNo,labels:f.labels,status:f.status,title:f.title}),(0,d.jsx)(u.Tabs,{items:[{key:`form`,label:`审批表单`,children:(0,d.jsx)(r.InstanceFormPanel,{disabled:!0,formData:f.formData,schema:a.formSchema})},{key:`timeline`,label:`流转记录`,children:(0,d.jsx)(o.InstanceTimeline,{timeline:a.timeline})},{key:`graph`,label:`流程图`,children:(0,d.jsx)(n.InstanceFlowGraphViewer,{flowGraph:a.flowGraph})},{key:`logs`,label:`操作日志`,children:(0,d.jsx)(p,{instanceId:t})}]})]})}exports.AdminInstanceDetailPanel=m;
|
|
1
|
+
const e=require("../../api/admin-api.cjs"),t=require("../status/labels.cjs"),n=require("../flow-graph/index.cjs"),r=require("../form-panel/index.cjs"),i=require("../format.cjs"),a=require("../user/index.cjs"),o=require("../timeline/index.cjs"),s=require("./index.cjs");let c=require("@vef-framework-react/core"),l=require("react"),u=require("@vef-framework-react/components"),d=require("@emotion/react/jsx-runtime");var f=[{title:`操作`,dataIndex:`action`,width:110,render:e=>(0,d.jsx)(u.Tag,{children:t.ACTIVITY_ACTION_LABELS[e]})},{title:`操作人`,dataIndex:`operator`,width:160,render:e=>(0,d.jsx)(a.UserLabel,{user:e})},{title:`详情`,dataIndex:`logId`,render:(e,t)=>{let n=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return(0,d.jsxs)(u.Stack,{gap:4,children:[t.transferTo&&(0,d.jsx)(u.Text,{type:`secondary`,children:`转办给 ${t.transferTo.name||t.transferTo.id}`}),n.length>0&&(0,d.jsx)(a.UserGroup,{avatarSize:20,users:n}),t.opinion&&(0,d.jsx)(u.Text,{style:{whiteSpace:`pre-wrap`},children:t.opinion})]})}},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>i.formatTimestamp(e)}];function p({instanceId:t}){let n=e.useAdminApprovalApi(),[r,i]=(0,l.useState)(1),[a,o]=(0,l.useState)(10),{data:s,isLoading:p}=(0,c.useQuery)({queryFn:n.findActionLogs,queryKey:[n.findActionLogs.key,{instanceId:t,[u.SYMBOL_PAGINATION]:{page:r,size:a}}]});return(0,d.jsx)(u.Table,{columns:f,dataSource:s?.items??[],loading:p,rowKey:`logId`,size:`small`,pagination:{current:r,pageSize:a,total:s?.total??0,showSizeChanger:!0,pageSizeOptions:u.pageSizeOptions,onChange:(e,t)=>{i(e),o(t)}}})}function m({instanceId:t}){let i=e.useAdminApprovalApi(),{data:a,isLoading:l}=(0,c.useQuery)({queryFn:i.getInstanceDetail,queryKey:[i.getInstanceDetail.key,{instanceId:t}]});if(l)return(0,d.jsx)(u.Flex,{align:`center`,justify:`center`,style:{minHeight:240},children:(0,d.jsx)(u.Spin,{})});if(!a)return(0,d.jsx)(u.Empty,{description:`未找到审批单`});let{instance:f}=a;return(0,d.jsxs)(u.Stack,{gap:20,children:[(0,d.jsx)(s.InstanceHeader,{applicant:f.applicant,businessRef:f.businessRef,createdAt:f.createdAt,currentNodeName:f.currentNodeName,finishedAt:f.finishedAt,flowCode:f.flowCode,flowName:f.flowName,instanceNo:f.instanceNo,labels:f.labels,status:f.status,title:f.title}),(0,d.jsx)(u.Tabs,{items:[{key:`form`,label:`审批表单`,children:(0,d.jsx)(r.InstanceFormPanel,{disabled:!0,formData:f.formData,schema:a.formSchema})},{key:`timeline`,label:`流转记录`,children:(0,d.jsx)(o.InstanceTimeline,{timeline:a.timeline})},{key:`graph`,label:`流程图`,children:(0,d.jsx)(n.InstanceFlowGraphViewer,{flowGraph:a.flowGraph})},{key:`logs`,label:`操作日志`,children:(0,d.jsx)(p,{instanceId:t})}]})]})}exports.AdminInstanceDetailPanel=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../api/instance-api.cjs"),t=require("../../api/my-api.cjs"),n=require("../../plugins/index.cjs"),r=require("../flow-graph/index.cjs"),i=require("../form-panel/index.cjs"),a=require("../format.cjs"),o=require("../status/index.cjs"),s=require("../user/index.cjs"),c=require("../timeline/index.cjs"),l=require("./action-modals.cjs");let u=require("@vef-framework-react/core"),d=require("react"),f=require("@vef-framework-react/components"),p=require("lucide-react"),m=require("@emotion/react/jsx-runtime");function h({title:e,status:t,instanceNo:r,flowName:i,
|
|
1
|
+
const e=require("../../api/instance-api.cjs"),t=require("../../api/my-api.cjs"),n=require("../../plugins/index.cjs"),r=require("../flow-graph/index.cjs"),i=require("../form-panel/index.cjs"),a=require("../format.cjs"),o=require("../status/index.cjs"),s=require("../user/index.cjs"),c=require("../timeline/index.cjs"),l=require("./action-modals.cjs");let u=require("@vef-framework-react/core"),d=require("react"),f=require("@vef-framework-react/components"),p=require("lucide-react"),m=require("@emotion/react/jsx-runtime");function h({title:e,status:t,instanceNo:r,flowName:i,flowCode:c,applicant:l,createdAt:u,finishedAt:d,currentNodeName:p,businessRef:h,labels:g}){let{renderBusinessRef:_}=n.useApprovalPlugins(),v=[{key:`no`,label:`审批单号`,children:(0,m.jsx)(f.Text,{copyable:!0,children:r})},{key:`flow`,label:`所属流程`,children:i},...c?[{key:`flowCode`,label:`流程编码`,children:(0,m.jsx)(f.Text,{copyable:!0,children:c})}]:[],{key:`applicant`,label:`申请人`,children:(0,m.jsx)(s.UserLabel,{user:l})},{key:`created`,label:`提交时间`,children:a.formatTimestamp(u)}];return p!==void 0&&v.push({key:`node`,label:`当前节点`,children:p}),d!==void 0&&v.push({key:`finished`,label:`完成时间`,children:a.formatTimestamp(d)}),h!==void 0&&h!==``&&v.push({key:`businessRef`,label:`业务单据`,children:_?_(h):(0,m.jsx)(f.Text,{code:!0,children:h})}),g!==void 0&&Object.keys(g).length>0&&v.push({key:`labels`,label:`流程标签`,children:(0,m.jsx)(f.LabelsDisplay,{labels:g})}),(0,m.jsxs)(f.Stack,{gap:12,children:[(0,m.jsxs)(f.Flex,{align:`center`,gap:`middle`,wrap:`wrap`,children:[(0,m.jsx)(f.Title,{level:4,style:{margin:0},children:e}),(0,m.jsx)(o.InstanceStatusTag,{status:t})]}),(0,m.jsx)(f.Descriptions,{colon:!0,items:v,size:`small`,column:{xs:1,sm:2,lg:3}})]})}function g({instanceId:n,onActionCompleted:a}){let o=t.useMyApprovalApi(),s=e.useInstanceApi(),{data:g,isLoading:_,refetch:v}=(0,u.useQuery)({queryFn:o.getInstanceDetail,queryKey:[o.getInstanceDetail.key,{instanceId:n}]}),y={meta:{shouldShowSuccessFeedback:!1}},b=(0,u.useMutation)({mutationFn:s.processTask,...y}),x=(0,u.useMutation)({mutationFn:s.resubmit,...y}),S=(0,u.useMutation)({mutationFn:s.withdraw,...y}),C=(0,u.useMutation)({mutationFn:s.addAssignee,...y}),w=(0,u.useMutation)({mutationFn:s.removeAssignee,...y}),T=(0,u.useMutation)({mutationFn:s.addCC,...y}),E=(0,u.useMutation)({mutationFn:s.urgeTask,...y}),[D,O]=(0,d.useState)(null),[k,A]=(0,d.useState)(``),[j,M]=(0,d.useState)(!1),N=(0,d.useRef)(null),P=(0,d.useRef)(null),F=(0,d.useMemo)(()=>new Set(g?.availableActions),[g]),I=g?.myTask,L=(0,d.useMemo)(()=>{let e=[],t=g?.timeline??[];for(let n of t){if(n.kind!==`approval`&&n.kind!==`handle`)continue;let t=n.participants??[];for(let r of t)r.status===`pending`&&e.push({taskId:r.taskId,assigneeName:r.user.name||r.user.id,nodeName:n.name??``})}return e},[g]);if(_)return(0,m.jsx)(f.Flex,{align:`center`,justify:`center`,style:{minHeight:240},children:(0,m.jsx)(f.Spin,{})});if(!g)return(0,m.jsx)(f.Empty,{description:`未找到审批单`});let{instance:R}=g,z=F.has(`handle`)?`handle`:F.has(`approve`)?`approve`:null,B=z!==null&&I!==void 0,V=F.has(`resubmit`),H=B||V;async function U(e){(0,f.showSuccessMessage)(e),A(``),await v(),a?.()}async function W(e,t){M(!0);try{await e(),await U(t)}catch{}finally{M(!1)}}function G(){return I?.isOpinionRequired&&k.trim()===``?((0,f.showWarningMessage)(`该节点要求填写审批意见`),!1):!0}async function K(e){if(!(e!==`resubmit`&&!G())){if(!g?.formSchema){await J(e,void 0);return}P.current=e;try{await N.current?.submit()}finally{P.current=null}}}function q(e){let t=P.current;t!==null&&J(t,e)}async function J(e,t){if(e===`resubmit`){await W(()=>x.mutateAsync({instanceId:n,formData:t}),`已重新提交`);return}I!==void 0&&await W(()=>b.mutateAsync({taskId:I.taskId,action:e,opinion:k.trim()||void 0,formData:t}),e===`handle`?`已办理`:`已通过`)}async function Y(){if(I===void 0||!G())return;let e=N.current?.getSubmitValues();await W(()=>b.mutateAsync({taskId:I.taskId,action:`reject`,opinion:k.trim()||void 0,formData:e}),`已拒绝`)}let X=[];F.has(`transfer`)&&I!==void 0&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.CornerUpLeftIcon}),onClick:()=>O(`transfer`),children:`转办`},`transfer`)),F.has(`rollback`)&&(I?.rollbackTargets?.length??0)>0&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.Undo2Icon}),onClick:()=>O(`rollback`),children:`回退`},`rollback`)),F.has(`add_assignee`)&&(I?.addAssigneeTypes?.length??0)>0&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.UserPlusIcon}),onClick:()=>O(`addAssignee`),children:`加签`},`addAssignee`)),F.has(`remove_assignee`)&&(I?.removableAssignees?.length??0)>0&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.UserMinusIcon}),onClick:()=>O(`removeAssignee`),children:`减签`},`removeAssignee`)),F.has(`add_cc`)&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.MailPlusIcon}),onClick:()=>O(`cc`),children:`抄送`},`cc`)),F.has(`urge`)&&L.length>0&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.MegaphoneIcon}),onClick:()=>O(`urge`),children:`催办`},`urge`)),F.has(`withdraw`)&&X.push((0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.RotateCcwIcon}),onClick:()=>O(`withdraw`),children:`撤回`},`withdraw`));let Z=B||V||X.length>0,Q=(0,m.jsxs)(f.Stack,{gap:16,children:[(0,m.jsx)(i.InstanceFormPanel,{apiRef:N,disabled:!H,fieldPermissions:g.fieldPermissions,formData:R.formData,schema:g.formSchema,onSubmit:q}),Z&&(0,m.jsxs)(f.Stack,{gap:12,style:{borderTop:`1px solid ${f.globalCssVars.colorBorderSecondary}`,paddingTop:16},children:[B&&(0,m.jsx)(f.Labeled,{label:`审批意见`,required:I?.isOpinionRequired===!0,children:(0,m.jsx)(f.Input.TextArea,{maxLength:2e3,placeholder:`请输入审批意见`,rows:3,value:k,onChange:e=>A(e.target.value)})}),(0,m.jsxs)(f.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[B&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.CheckIcon}),loading:j,type:`primary`,onClick:()=>void K(z),children:z===`handle`?`办理`:`通过`}),(0,m.jsx)(f.Button,{danger:!0,icon:(0,m.jsx)(f.Icon,{component:p.XIcon}),loading:j,onClick:()=>void Y(),children:`拒绝`})]}),V&&(0,m.jsx)(f.Button,{icon:(0,m.jsx)(f.Icon,{component:p.SendIcon}),loading:j,type:`primary`,onClick:()=>void K(`resubmit`),children:`重新提交`}),(0,m.jsx)(f.Space,{wrap:!0,size:8,children:X})]})]})]});return(0,m.jsxs)(f.Stack,{gap:20,children:[(0,m.jsx)(h,{applicant:R.applicant,businessRef:R.businessRef,createdAt:R.createdAt,currentNodeName:R.currentNodeName,finishedAt:R.finishedAt,flowCode:R.flowCode,flowName:R.flowName,instanceNo:R.instanceNo,status:R.status,title:R.title}),(0,m.jsx)(f.Tabs,{items:[{key:`form`,label:`审批表单`,children:Q},{key:`timeline`,label:`流转记录`,children:(0,m.jsx)(c.InstanceTimeline,{timeline:g.timeline})},{key:`graph`,label:`流程图`,children:(0,m.jsx)(r.InstanceFlowGraphViewer,{flowGraph:g.flowGraph})}]}),(0,m.jsx)(l.TransferModal,{open:D===`transfer`,onClose:()=>O(null),onConfirm:async(e,t)=>{I!==void 0&&(await b.mutateAsync({taskId:I.taskId,action:`transfer`,transferToId:e,opinion:t.trim()||void 0}),await U(`已转办`))}}),(0,m.jsx)(l.RollbackModal,{open:D===`rollback`,targets:I?.rollbackTargets??[],onClose:()=>O(null),onConfirm:async(e,t)=>{I!==void 0&&(await b.mutateAsync({taskId:I.taskId,action:`rollback`,targetNodeId:e,opinion:t.trim()||void 0}),await U(`已回退`))}}),(0,m.jsx)(l.AddAssigneeModal,{allowedTypes:I?.addAssigneeTypes??[],open:D===`addAssignee`,onClose:()=>O(null),onConfirm:async(e,t)=>{I!==void 0&&(await C.mutateAsync({taskId:I.taskId,userIds:e,addType:t}),await U(`已加签`))}}),(0,m.jsx)(l.RemoveAssigneeModal,{open:D===`removeAssignee`,targets:I?.removableAssignees??[],onClose:()=>O(null),onConfirm:async e=>{await w.mutateAsync({taskId:e}),await U(`已减签`)}}),(0,m.jsx)(l.CCModal,{open:D===`cc`,onClose:()=>O(null),onConfirm:async e=>{await T.mutateAsync({instanceId:n,ccUserIds:e}),await U(`已抄送`)}}),(0,m.jsx)(l.UrgeModal,{open:D===`urge`,targets:L,onClose:()=>O(null),onConfirm:async(e,t)=>{await E.mutateAsync({taskId:e,message:t.trim()||void 0}),await U(`已催办`)}}),(0,m.jsx)(l.ReasonModal,{okText:`撤回`,open:D===`withdraw`,placeholder:`请输入撤回原因(可选)`,title:`撤回审批单`,onClose:()=>O(null),onConfirm:async e=>{await S.mutateAsync({instanceId:n,reason:e.trim()||void 0}),await U(`已撤回`)}})]})}exports.InstanceDetailPanel=g,exports.InstanceHeader=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../status/labels.cjs"),t=require("../format.cjs"),n=require("../status/index.cjs"),r=require("../user/index.cjs");let i=require("@vef-framework-react/components"),a=require("@emotion/react/jsx-runtime");var o={active:`blue`,passed:`green`,rejected:`red`,returned:`orange`,canceled:`gray`};function s({opinion:e}){return(0,a.jsx)(`div`,{style:{padding:`4px 10px`,borderInlineStart:`3px solid ${i.globalCssVars.colorBorder}`,background:i.globalCssVars.colorFillQuaternary,borderRadius:4},children:(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm,whiteSpace:`pre-wrap`},children:e})})}function c({participant:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{user:e.user}),e.delegator&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`(受 ${e.delegator.name||e.delegator.id} 委托)`}),(0,a.jsx)(n.TaskStatusTag,{status:e.status}),e.isTimeout&&(0,a.jsx)(i.Tag,{color:`error`,children:`已超时`}),e.transferTo&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`转办给 ${e.transferTo.name||e.transferTo.id}`}),e.actionTime&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.actionTime)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function l(t){let n=[e.ACTIVITY_ACTION_LABELS[t.action]];t.transferTo&&n.push(`给 ${t.transferTo.name||t.transferTo.id}`),t.target&&n.push(`(${t.target.name||t.target.id})`),t.rollbackToNodeName&&n.push(`至「${t.rollbackToNodeName}」`);let r=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return r.length>0&&n.push(r.map(e=>e.name||e.id).join(`、`)),n.join(` `)}function u({activity:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{avatarSize:18,user:e.operator}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},children:l(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.createdAt)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function d({recipients:e}){let n=e.filter(e=>e.readAt).length;return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`抄送`}),e.map(e=>(0,a.jsx)(i.Tooltip,{title:e.readAt?`已读 ${t.formatTimestamp(e.readAt)}`:`未读`,children:(0,a.jsx)(i.Tag,{color:e.readAt?`success`:`default`,style:{marginInlineEnd:0},children:e.user.name||e.user.id})},e.user.id)),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`已读 ${n}/${e.length}`})]})}function f(e){return e.kind===`withdraw`?`gray`:e.kind===`terminate`?`red`:e.status?o[e.status]:`gray`}function p(e){return e.kind===`withdraw`?`撤回`:e.kind===`terminate`?`终止`:e.name??``}function m({entry:e}){return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{strong:!0,children:p(e)}),(0,a.
|
|
1
|
+
const e=require("../status/labels.cjs"),t=require("../format.cjs"),n=require("../status/index.cjs"),r=require("../user/index.cjs");let i=require("@vef-framework-react/components"),a=require("@emotion/react/jsx-runtime");var o={active:`blue`,passed:`green`,rejected:`red`,returned:`orange`,canceled:`gray`};function s({opinion:e}){return(0,a.jsx)(`div`,{style:{padding:`4px 10px`,borderInlineStart:`3px solid ${i.globalCssVars.colorBorder}`,background:i.globalCssVars.colorFillQuaternary,borderRadius:4},children:(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm,whiteSpace:`pre-wrap`},children:e})})}function c({participant:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{user:e.user}),e.delegator&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`(受 ${e.delegator.name||e.delegator.id} 委托)`}),(0,a.jsx)(n.TaskStatusTag,{status:e.status}),e.isTimeout&&(0,a.jsx)(i.Tag,{color:`error`,children:`已超时`}),e.transferTo&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`转办给 ${e.transferTo.name||e.transferTo.id}`}),e.actionTime&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.actionTime)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function l(t){let n=[e.ACTIVITY_ACTION_LABELS[t.action]];t.transferTo&&n.push(`给 ${t.transferTo.name||t.transferTo.id}`),t.target&&n.push(`(${t.target.name||t.target.id})`),t.rollbackToNodeName&&n.push(`至「${t.rollbackToNodeName}」`);let r=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return r.length>0&&n.push(r.map(e=>e.name||e.id).join(`、`)),n.join(` `)}function u({activity:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{avatarSize:18,user:e.operator}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},children:l(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.createdAt)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function d({recipients:e}){let n=e.filter(e=>e.readAt).length;return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`抄送`}),e.map(e=>(0,a.jsx)(i.Tooltip,{title:e.readAt?`已读 ${t.formatTimestamp(e.readAt)}`:`未读`,children:(0,a.jsx)(i.Tag,{color:e.readAt?`success`:`default`,style:{marginInlineEnd:0},children:e.user.name||e.user.id})},e.user.id)),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`已读 ${n}/${e.length}`})]})}function f(e){return e.kind===`withdraw`?`gray`:e.kind===`terminate`?`red`:e.status?o[e.status]:`gray`}function p(e){return e.kind===`withdraw`?`撤回`:e.kind===`terminate`?`终止`:e.name??``}function m(e){let n=t.formatTimestamp(e.startedAt);if(!e.finishedAt)return n;let r=t.formatTimestamp(e.finishedAt);return r===n?n:`${n} → ${r}`}function h({entry:e}){return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{strong:!0,children:p(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:m(e)})]})}function g({entry:e}){let t=e.participants??[],n=e.activities??[],r=e.ccRecipients??[];return t.length===0&&n.length===0&&r.length===0?null:(0,a.jsxs)(i.Stack,{gap:8,children:[t.map(e=>(0,a.jsx)(c,{participant:e},e.taskId)),r.length>0&&(0,a.jsx)(d,{recipients:r}),n.map((e,t)=>(0,a.jsx)(u,{activity:e},t))]})}function _({timeline:e}){if(e.length===0)return(0,a.jsx)(i.Empty,{description:`暂无流转记录`});let t=e.map((e,t)=>({key:String(t),color:f(e),title:(0,a.jsx)(h,{entry:e}),content:(0,a.jsx)(g,{entry:e})}));return(0,a.jsx)(i.Timeline,{items:t,mode:`left`})}exports.InstanceTimeline=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../components/format.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");var r=[{title:`委托人`,dataIndex:`delegatorId`,width:160,render:e=>(0,n.jsx)(t.Text,{children:e})},{title:`被委托人`,dataIndex:`delegateeId`,width:160,render:e=>(0,n.jsx)(t.Text,{children:e})},{title:`生效时间`,dataIndex:`
|
|
1
|
+
const e=require("../../components/format.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");var r=[{title:`委托人`,dataIndex:`delegatorId`,width:160,render:e=>(0,n.jsx)(t.Text,{children:e})},{title:`被委托人`,dataIndex:`delegateeId`,width:160,render:e=>(0,n.jsx)(t.Text,{children:e})},{title:`生效时间`,dataIndex:`startsAt`,width:160,render:t=>e.formatTimestamp(t)},{title:`失效时间`,dataIndex:`endsAt`,width:160,render:t=>e.formatTimestamp(t)},{title:`限定范围`,dataIndex:`flowId`,render:(e,r)=>!r.flowCategoryId&&!r.flowId?(0,n.jsx)(t.Tag,{color:`blue`,children:`全部流程`}):(0,n.jsx)(t.Text,{type:`secondary`,children:[r.flowCategoryId?`分类 ${r.flowCategoryId}`:null,r.flowId?`流程 ${r.flowId}`:null].filter(e=>e!==null).join(` / `)})},{title:`状态`,dataIndex:`isActive`,width:90,align:`center`,render:e=>(0,n.jsx)(t.Tag,{color:e?`success`:`default`,children:e?`启用`:`停用`})},{title:`原因`,dataIndex:`reason`,ellipsis:!0,render:e=>e??`-`}];exports.delegationColumns=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../api/category-api.cjs"),t=require("../../components/principal/index.cjs"),n=require("../category-page/form.cjs");let r=require("@vef-framework-react/core"),i=require("react"),a=require("@vef-framework-react/components"),o=require("@emotion/react/jsx-runtime");function s({label:e,required:n,value:r,onChange:s}){let c=(0,i.useMemo)(()=>r?[r]:[],[r]);return(0,o.jsx)(a.Labeled,{label:e,required:n,children:(0,o.jsx)(t.PrincipalSelect,{kind:`user`,maxCount:1,value:c,onChange:e=>s(e[0])})})}function c(){let{AppField:t}=(0,a.useFormContext)(),c=e.useCategoryApi(),{data:l}=(0,r.useQuery)({queryFn:c.findTree,queryKey:[c.findTree.key,{}]}),u=(0,i.useMemo)(()=>n.buildCategoryTreeOptions(l??[]),[l]);return(0,o.jsxs)(a.Grid,{columnGap:`small`,children:[(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`delegatorId`,children:e=>(0,o.jsx)(s,{required:!0,label:`委托人`,value:e.state.value,onChange:t=>e.handleChange(t??``)})})}),(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`delegateeId`,children:e=>(0,o.jsx)(s,{required:!0,label:`被委托人`,value:e.state.value,onChange:t=>e.handleChange(t??``)})})}),(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`
|
|
1
|
+
const e=require("../../api/category-api.cjs"),t=require("../../components/principal/index.cjs"),n=require("../category-page/form.cjs");let r=require("@vef-framework-react/core"),i=require("react"),a=require("@vef-framework-react/components"),o=require("@emotion/react/jsx-runtime");function s({label:e,required:n,value:r,onChange:s}){let c=(0,i.useMemo)(()=>r?[r]:[],[r]);return(0,o.jsx)(a.Labeled,{label:e,required:n,children:(0,o.jsx)(t.PrincipalSelect,{kind:`user`,maxCount:1,value:c,onChange:e=>s(e[0])})})}function c(){let{AppField:t}=(0,a.useFormContext)(),c=e.useCategoryApi(),{data:l}=(0,r.useQuery)({queryFn:c.findTree,queryKey:[c.findTree.key,{}]}),u=(0,i.useMemo)(()=>n.buildCategoryTreeOptions(l??[]),[l]);return(0,o.jsxs)(a.Grid,{columnGap:`small`,children:[(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`delegatorId`,children:e=>(0,o.jsx)(s,{required:!0,label:`委托人`,value:e.state.value,onChange:t=>e.handleChange(t??``)})})}),(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`delegateeId`,children:e=>(0,o.jsx)(s,{required:!0,label:`被委托人`,value:e.state.value,onChange:t=>e.handleChange(t??``)})})}),(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`startsAt`,children:e=>(0,o.jsx)(e.DatePicker,{required:!0,showTime:!0,label:`开始时间`,placeholder:`选择开始时间`})})}),(0,o.jsx)(a.Grid.Item,{span:12,children:(0,o.jsx)(t,{name:`endsAt`,children:e=>(0,o.jsx)(e.DatePicker,{required:!0,showTime:!0,label:`结束时间`,placeholder:`选择结束时间`})})}),(0,o.jsx)(a.Grid.Item,{span:24,children:(0,o.jsx)(t,{name:`flowCategoryId`,children:e=>(0,o.jsx)(e.TreeSelect,{allowClear:!0,extra:`留空表示不限分类`,label:`限定分类`,placeholder:`选择流程分类(可选)`,treeData:u})})}),(0,o.jsx)(a.Grid.Item,{span:24,children:(0,o.jsx)(t,{name:`reason`,children:e=>(0,o.jsx)(e.TextArea,{label:`委托原因`,maxLength:500,placeholder:`如 休假期间由同事代审(可选)`,rows:2})})}),(0,o.jsx)(a.Grid.Item,{span:24,children:(0,o.jsx)(t,{name:`isActive`,children:e=>(0,o.jsx)(e.Bool,{label:`启用`,variant:`switch`})})})]})}exports.DelegationForm=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../api/delegation-api.cjs"),t=require("../../permissions.cjs"),n=require("./columns.cjs"),r=require("./form.cjs");let i=require("@vef-framework-react/components"),a=require("lucide-react"),o=require("@emotion/react/jsx-runtime");var s={xxs:`100vw`,sm:520},{OperationButtonGroup:c,ActionButtonGroup:l}=(0,i.createCrudKit)();function u(e){return{id:e.id,delegatorId:e.delegatorId,delegateeId:e.delegateeId,flowCategoryId:e.flowCategoryId??void 0,flowId:e.flowId??void 0,
|
|
1
|
+
const e=require("../../api/delegation-api.cjs"),t=require("../../permissions.cjs"),n=require("./columns.cjs"),r=require("./form.cjs");let i=require("@vef-framework-react/components"),a=require("lucide-react"),o=require("@emotion/react/jsx-runtime");var s={xxs:`100vw`,sm:520},{OperationButtonGroup:c,ActionButtonGroup:l}=(0,i.createCrudKit)();function u(e){return{id:e.id,delegatorId:e.delegatorId,delegateeId:e.delegateeId,flowCategoryId:e.flowCategoryId??void 0,flowId:e.flowId??void 0,startsAt:e.startsAt,endsAt:e.endsAt,isActive:e.isActive,reason:e.reason??void 0}}function d(){let{AppField:e}=(0,i.useFormContext)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e,{name:`delegatorId`,children:e=>(0,o.jsx)(e.Input,{allowClear:!0,noWrapper:!0,placeholder:`委托人 ID`})}),(0,o.jsx)(e,{name:`delegateeId`,children:e=>(0,o.jsx)(e.Input,{allowClear:!0,noWrapper:!0,placeholder:`被委托人 ID`})})]})}function f({permissions:f,columnStorageKey:p=`approval.delegation`,title:m}){let h=e.useDelegationApi(),g={...t.APPROVAL_PERMISSIONS.delegation,...f};return(0,o.jsx)(i.CrudPage,{basicSearch:(0,o.jsx)(d,{}),columnSettings:{storageKey:p},deleteMutationFn:h.remove,formLayout:{layout:`vertical`},queryFn:h.findPage,renderForm:()=>(0,o.jsx)(r.DelegationForm,{}),rowKey:`id`,tableColumns:n.delegationColumns,title:m,formMutationFns:{create:h.create,update:h.update},operationColumn:{width:160,render(e){return(0,o.jsx)(c,{selector:e=>[e.openForm,e.delete,e.refetchQuery],children:([t,n,r])=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.OperationButton,{color:`primary`,icon:(0,o.jsx)(i.Icon,{component:a.EditIcon}),requiredPermissions:g.update,onClick:()=>t({scene:`update`,values:u(e),title:`编辑委托`,mode:`drawer`,width:s}),children:`编辑`}),(0,o.jsx)(i.OperationButton,{confirmable:!0,color:`danger`,confirmDescription:`确定删除该委托?`,icon:(0,o.jsx)(i.Icon,{component:a.TrashIcon}),requiredPermissions:g.delete,onClick:async()=>{try{await n(e),r()}catch{}},children:`删除`})]})})}},sceneDefaultFormValues:{create:{isActive:!0}},toolbarActions:(0,o.jsx)(l,{selector:e=>[e.openForm],children:([e])=>(0,o.jsx)(i.PermissionGate,{requiredPermissions:g.create,children:(0,o.jsx)(i.ActionButton,{icon:(0,o.jsx)(i.Icon,{component:a.PlusIcon}),type:`primary`,onClick:()=>e({scene:`create`,title:`新增委托`,mode:`drawer`,width:s}),children:`新增委托`})})})})}exports.ApprovalDelegationPage=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../api/category-api.cjs"),t=require("../../../api/flow-api.cjs"),n=require("../../../plugins/index.cjs"),r=require("../../category-page/form.cjs"),i=require("./basic-step.cjs"),a=require("./flow-step.cjs"),o=require("./form-step.cjs"),s=require("./
|
|
1
|
+
const e=require("../../../api/category-api.cjs"),t=require("../../../api/flow-api.cjs"),n=require("../../../plugins/index.cjs"),r=require("../../category-page/form.cjs"),i=require("./basic-step.cjs"),a=require("./flow-step.cjs"),o=require("./form-step.cjs"),s=require("./types.cjs"),c=require("./review-step.cjs");let l=require("@vef-framework-react/core"),u=require("react"),d=require("@vef-framework-react/components"),f=require("@vef-framework-react/approval-form-bridge"),p=require("@emotion/react/jsx-runtime"),m=require("@vef-framework-react/approval-flow-editor");var h=[{title:`流程设置`},{title:`表单设计`},{title:`流程设计`},{title:`审阅提交`}];function g({flow:g,tenantId:_,onClose:v}){let y=t.useFlowApi(),b=e.useCategoryApi(),x=n.useApprovalPlugins(),S=g!==void 0,[C,w]=(0,u.useState)(0),[T,E]=(0,u.useState)(()=>S?null:s.createEmptyDraft(_)),[D,O]=(0,u.useState)(``),[k,A]=(0,u.useState)(!0),[j,M]=(0,u.useState)(!1),{data:N}=(0,l.useQuery)({queryFn:b.findTree,queryKey:[b.findTree.key,{}]}),P=(0,u.useMemo)(()=>r.buildCategoryTreeOptions(N??[]),[N]),{data:F}=(0,l.useQuery)({queryFn:y.findVersions,queryKey:[y.findVersions.key,{flowId:g?.id??``}],enabled:S}),I=F?.[0]?.id,{data:L}=(0,l.useQuery)({queryFn:y.getGraph,queryKey:[y.getGraph.key,{flowId:g?.id??``,versionId:I??``}],enabled:S&&I!==void 0}),{data:R}=(0,l.useQuery)({queryFn:y.findInitiators,queryKey:[y.findInitiators.key,{flowId:g?.id??``}],enabled:S});(0,u.useEffect)(()=>{if(!S||T!==null||F===void 0||R===void 0||F.length>0&&L===void 0)return;let e=L?.version??null;E({flowId:g.id,basic:{tenantId:g.tenantId,code:g.code,name:g.name,categoryId:g.categoryId,icon:g.icon??void 0,description:g.description??void 0,labels:g.labels??{},bindingMode:g.bindingMode,businessBinding:g.businessBinding??void 0,adminUserIds:g.adminUserIds,isAllInitiationAllowed:g.isAllInitiationAllowed,instanceTitleTemplate:g.instanceTitleTemplate},initiators:R.map(e=>({kind:e.kind,ids:e.ids})),storageMode:e?.storageMode??`json`,formSchema:e?.formSchema??null,flowDefinition:e?.flowSchema??s.EMPTY_FLOW_DEFINITION})},[S,T,F,L,R,g]);let z={shouldShowSuccessFeedback:!1,invalidates:[[y.findFlows.key],[y.findVersions.key]]},B=(0,l.useMutation)({mutationFn:y.create,meta:z}),V=(0,l.useMutation)({mutationFn:y.update,meta:z}),H=(0,l.useMutation)({mutationFn:y.deploy,meta:z}),U=(0,l.useMutation)({mutationFn:y.publishVersion,meta:z}),W=(0,u.useMemo)(()=>T?.formSchema?(0,f.projectFormSchema)(T.formSchema):null,[T?.formSchema]),G=(0,u.useMemo)(()=>T?.formSchema?(0,f.validateApprovalSchema)(T.formSchema,x.registries):null,[T?.formSchema,x.registries]),K=(0,u.useMemo)(()=>T?(0,m.validateFlowDefinition)(T.flowDefinition,W?.formFields??[]):[],[T,W]),q=(0,u.useMemo)(()=>n.toEditorPlugins(x,W?.formFields??[]),[x,W]),J=(0,u.useCallback)(e=>{E(t=>t&&{...t,basic:{...t.basic,...e}})},[]),Y=(0,u.useCallback)(e=>{E(t=>t&&{...t,initiators:e})},[]),X=(0,u.useCallback)(e=>{E(t=>t&&{...t,formSchema:e})},[]),Z=(0,u.useCallback)(e=>{E(t=>t&&{...t,flowDefinition:e})},[]);if(T===null)return(0,p.jsx)(d.Flex,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,p.jsx)(d.Spin,{})});let Q=T,{basic:$}=Q,ee=[$.code.trim()!==``&&$.name.trim()!==``&&$.categoryId!==``&&$.instanceTitleTemplate.trim()!==``&&($.bindingMode!==`business`||s.isBindingValid($.businessBinding))&&($.isAllInitiationAllowed||s.initiatorsForSubmit(T).length>0),G===null||G.valid,K.length===0,!0][C]??!1;async function te(){M(!0);try{let e=$.bindingMode===`business`?$.businessBinding:void 0,t=s.initiatorsForSubmit(Q),n;n=Q.flowId===void 0?(await B.mutateAsync({tenantId:$.tenantId,code:$.code,name:$.name,categoryId:$.categoryId,icon:$.icon,description:$.description,labels:$.labels,bindingMode:$.bindingMode,businessBinding:e,adminUserIds:$.adminUserIds,isAllInitiationAllowed:$.isAllInitiationAllowed,instanceTitleTemplate:$.instanceTitleTemplate,initiators:t})).id:(await V.mutateAsync({flowId:Q.flowId,name:$.name,icon:$.icon,description:$.description,labels:$.labels,bindingMode:$.bindingMode,businessBinding:e,adminUserIds:$.adminUserIds,isAllInitiationAllowed:$.isAllInitiationAllowed,instanceTitleTemplate:$.instanceTitleTemplate,initiators:t})).id;let r=await H.mutateAsync({flowId:n,description:D.trim()||void 0,storageMode:Q.storageMode,flowDefinition:Q.flowDefinition,formSchema:Q.formSchema??void 0});k&&await U.mutateAsync({versionId:r.id}),(0,d.showSuccessMessage)(k?`流程已部署并发布`:`流程已部署为草稿版本`),v()}catch{}finally{M(!1)}}let ne=[(0,p.jsx)(i.BasicStep,{basic:$,categoryOptions:P,initiators:T.initiators,isEditing:S,onBasicChange:J,onInitiatorsChange:Y},`basic`),(0,p.jsx)(o.FormStep,{initialSchema:T.formSchema??void 0,issues:G?.issues??[],registries:x.registries,storageMode:T.storageMode,onSchemaChange:X,onStorageModeChange:e=>E(t=>t&&{...t,storageMode:e})},`form`),(0,p.jsx)(a.FlowStep,{errors:K,plugins:q,value:T.flowDefinition,onChange:Z},`flow`),(0,p.jsx)(c.ReviewStep,{draft:T,fields:W?.fields??[],publishNow:k,versionDescription:D,onPublishNowChange:A,onVersionDescriptionChange:O},`review`)];return(0,p.jsxs)(d.Flex,{style:{height:`100%`,flexDirection:`column`},children:[(0,p.jsx)(`div`,{style:{padding:`12px 32px`,borderBottom:`1px solid var(--vef-color-border-secondary)`},children:(0,p.jsx)(d.Steps,{current:C,items:h,size:`small`,style:{maxWidth:720,marginInline:`auto`}})}),(0,p.jsx)(`div`,{style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:ne.map((e,t)=>{let n=t===C,r=t===0||t===3;return(0,p.jsx)(`div`,{style:{display:n?`flex`:`none`,flexDirection:`column`,flex:1,minHeight:0,overflow:r?`auto`:`hidden`,padding:r?`24px 32px`:`16px 24px`},children:e},t)})}),(0,p.jsxs)(d.Flex,{align:`center`,justify:`space-between`,style:{padding:`12px 32px`,borderTop:`1px solid var(--vef-color-border-secondary)`},children:[(0,p.jsx)(d.Button,{disabled:C===0||j,onClick:()=>w(e=>e-1),children:`上一步`}),C<h.length-1?(0,p.jsx)(d.Button,{disabled:!ee,type:`primary`,onClick:()=>w(e=>e+1),children:`下一步`}):(0,p.jsx)(d.Button,{loading:j,type:`primary`,onClick:()=>void te(),children:k?`部署并发布`:`部署为草稿`})]})]})}function _({open:e,flow:t,tenantId:n,onClose:r}){return(0,p.jsx)(d.Drawer,{destroyOnHidden:!0,open:e,placement:`right`,size:`100%`,styles:{body:{padding:0}},title:t?`流程设计 · ${t.name}`:`新建流程`,onClose:r,children:e&&(0,p.jsx)(g,{flow:t,tenantId:n,onClose:r},t?.id??`create`)})}exports.FlowDesignerDrawer=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require("./types.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");function r({draft:r,fields:i,versionDescription:a,publishNow:o,onVersionDescriptionChange:s,onPublishNowChange:c}){let{basic:l}=r,u=r.flowDefinition.nodes.length;return(0,n.jsxs)(t.Stack,{gap:16,style:{maxWidth:920,marginInline:`auto`,width:`100%`},children:[(0,n.jsx)(t.Card,{title:`流程设置`,children:(0,n.jsx)(t.Descriptions,{colon:!0,column:{xs:1,sm:2},size:`small`,items:[{key:`code`,label:`流程编码`,children:(0,n.jsx)(t.Text,{code:!0,children:l.code})},{key:`name`,label:`流程名称`,children:l.name},{key:`binding`,label:`业务绑定`,children:l.bindingMode===`business`?(0,n.jsx)(t.Tag,{color:`blue`,children:`业务表 ${l.businessBinding?.tableName??``}`}):(0,n.jsx)(t.Tag,{children:`独立存储`})},{key:`initiation`,label:`发起权限`,children:l.isAllInitiationAllowed?`所有人可发起`:`${e.initiatorsForSubmit(r).length} 条发起规则`},{key:`labels`,label:`标签`,children:(0,n.jsx)(t.LabelsDisplay,{labels:l.labels})},{key:`storage`,label:`存储模式`,children:r.storageMode===`table`?`独立表存储`:`JSON 存储`}]})}),(0,n.jsx)(t.Card,{title:`表单字段(${i.length})`,children:i.length===0?(0,n.jsx)(t.Text,{type:`secondary`,children:`该流程未设计表单。`}):(0,n.jsx)(t.Table,{dataSource:i,pagination:!1,rowKey:`key`,size:`small`,columns:[{title:`字段键`,dataIndex:`key`,width:220,render:e=>(0,n.jsx)(t.Text,{code:!0,children:e})},{title:`名称`,dataIndex:`label`},{title:`类型`,dataIndex:`kind`,width:120,render:e=>(0,n.jsx)(t.Tag,{children:e})}]})}),(0,n.jsx)(t.Card,{title:`发布选项`,children:(0,n.jsxs)(t.Stack,{gap:12,children:[(0,n.jsx)(t.Text,{style:{fontSize:t.globalCssVars.fontSizeSm},type:`secondary`,children:`流程图共 ${u} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`}),(0,n.jsx)(t.Labeled,{label:`版本说明`,children:(0,n.jsx)(t.Input.TextArea,{maxLength:500,placeholder:`本次变更说明(可选)`,rows:2,value:a,onChange:e=>s(e.target.value)})}),(0,n.jsxs)(t.Flex,{align:`center`,gap:`small`,children:[(0,n.jsx)(t.Switch,{checked:o,onChange:c}),(0,n.jsx)(t.Text,{children:`部署后立即发布`})]})]})})]})}exports.ReviewStep=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={nodes:[],edges:[]};function t(t){return{basic:{tenantId:t,code:``,name:``,categoryId:``,labels:{},bindingMode:`standalone`,adminUserIds:[],isAllInitiationAllowed:!1,instanceTitleTemplate:``},initiators:[],storageMode:`json`,formSchema:null,flowDefinition:e}}var n=/^[A-Z_]\w{0,62}$/i;function r(e){if(!e)return!1;let t=[e.tableName,...e.keyColumns,e.statusColumn,...e.instanceIdColumn===void 0?[]:[e.instanceIdColumn],...e.startedAtColumn!==void 0&&e.startedAtColumn!==``?[e.startedAtColumn]:[],...e.finishedAtColumn!==void 0&&e.finishedAtColumn!==``?[e.finishedAtColumn]:[]];return e.keyColumns.length>0&&e.instanceIdColumn!==void 0&&e.instanceIdColumn!==``&&t.every(e=>n.test(e))&&Object.values(e.statusMapping??{}).every(e=>e===void 0||e.trim()!==``)}exports.BUSINESS_IDENTIFIER_PATTERN=n,exports.EMPTY_FLOW_DEFINITION=e,exports.createEmptyDraft=t,exports.isBindingValid=
|
|
1
|
+
var e={nodes:[],edges:[]};function t(t){return{basic:{tenantId:t,code:``,name:``,categoryId:``,labels:{},bindingMode:`standalone`,adminUserIds:[],isAllInitiationAllowed:!1,instanceTitleTemplate:``},initiators:[],storageMode:`json`,formSchema:null,flowDefinition:e}}var n=/^[A-Z_]\w{0,62}$/i;function r(e){return e.basic.isAllInitiationAllowed?[]:e.initiators.filter(e=>e.ids.length>0)}function i(e){if(!e)return!1;let t=[e.tableName,...e.keyColumns,e.statusColumn,...e.instanceIdColumn===void 0?[]:[e.instanceIdColumn],...e.startedAtColumn!==void 0&&e.startedAtColumn!==``?[e.startedAtColumn]:[],...e.finishedAtColumn!==void 0&&e.finishedAtColumn!==``?[e.finishedAtColumn]:[]];return e.keyColumns.length>0&&e.instanceIdColumn!==void 0&&e.instanceIdColumn!==``&&t.every(e=>n.test(e))&&Object.values(e.statusMapping??{}).every(e=>e===void 0||e.trim()!==``)}exports.BUSINESS_IDENTIFIER_PATTERN=n,exports.EMPTY_FLOW_DEFINITION=e,exports.createEmptyDraft=t,exports.initiatorsForSubmit=r,exports.isBindingValid=i;
|
package/dist/es/api/admin-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
package/dist/es/api/flow-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
package/dist/es/api/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { useAdminApprovalApi as n } from "./admin-api.js";
|
|
4
4
|
import { useCategoryApi as r } from "./category-api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
package/dist/es/api/my-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
package/dist/es/api/query.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { SYMBOL_PAGINATION as e } from "@vef-framework-react/components";
|
|
3
3
|
//#region src/api/query.ts
|
|
4
4
|
var t = "/api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { TASK_STATUS_LABELS as e } from "../status/labels.js";
|
|
3
3
|
import { isTaskStatus as t } from "../status/index.js";
|
|
4
4
|
import { PrincipalSelect as n } from "../principal/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { ACTIVITY_ACTION_LABELS as t } from "../status/labels.js";
|
|
4
4
|
import { InstanceFlowGraphViewer as n } from "../flow-graph/index.js";
|
|
@@ -110,6 +110,7 @@ function T({ instanceId: t }) {
|
|
|
110
110
|
createdAt: u.createdAt,
|
|
111
111
|
currentNodeName: u.currentNodeName,
|
|
112
112
|
finishedAt: u.finishedAt,
|
|
113
|
+
flowCode: u.flowCode,
|
|
113
114
|
flowName: u.flowName,
|
|
114
115
|
instanceNo: u.instanceNo,
|
|
115
116
|
labels: u.labels,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { InstanceDetailPanel as e } from "./index.js";
|
|
3
3
|
import { Drawer as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useInstanceApi as e } from "../../api/instance-api.js";
|
|
3
3
|
import { useMyApprovalApi as t } from "../../api/my-api.js";
|
|
4
4
|
import { useApprovalPlugins as n } from "../../plugins/index.js";
|
|
@@ -15,8 +15,8 @@ import { Button as b, Descriptions as x, Empty as te, Flex as S, Icon as C, Inpu
|
|
|
15
15
|
import { CheckIcon as le, CornerUpLeftIcon as ue, MailPlusIcon as de, MegaphoneIcon as fe, RotateCcwIcon as pe, SendIcon as me, Undo2Icon as he, UserMinusIcon as ge, UserPlusIcon as _e, XIcon as ve } from "lucide-react";
|
|
16
16
|
import { Fragment as ye, jsx as k, jsxs as A } from "@emotion/react/jsx-runtime";
|
|
17
17
|
//#region src/components/detail/index.tsx
|
|
18
|
-
function j({ title: e, status: t, instanceNo: r, flowName: i,
|
|
19
|
-
let { renderBusinessRef:
|
|
18
|
+
function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, applicant: l, createdAt: u, finishedAt: d, currentNodeName: f, businessRef: p, labels: m }) {
|
|
19
|
+
let { renderBusinessRef: h } = n(), g = [
|
|
20
20
|
{
|
|
21
21
|
key: "no",
|
|
22
22
|
label: "审批单号",
|
|
@@ -30,36 +30,44 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, applicant: c, crea
|
|
|
30
30
|
label: "所属流程",
|
|
31
31
|
children: i
|
|
32
32
|
},
|
|
33
|
+
...c ? [{
|
|
34
|
+
key: "flowCode",
|
|
35
|
+
label: "流程编码",
|
|
36
|
+
children: /* @__PURE__ */ k(D, {
|
|
37
|
+
copyable: !0,
|
|
38
|
+
children: c
|
|
39
|
+
})
|
|
40
|
+
}] : [],
|
|
33
41
|
{
|
|
34
42
|
key: "applicant",
|
|
35
43
|
label: "申请人",
|
|
36
|
-
children: /* @__PURE__ */ k(s, { user:
|
|
44
|
+
children: /* @__PURE__ */ k(s, { user: l })
|
|
37
45
|
},
|
|
38
46
|
{
|
|
39
47
|
key: "created",
|
|
40
48
|
label: "提交时间",
|
|
41
|
-
children: a(
|
|
49
|
+
children: a(u)
|
|
42
50
|
}
|
|
43
51
|
];
|
|
44
|
-
return
|
|
52
|
+
return f !== void 0 && g.push({
|
|
45
53
|
key: "node",
|
|
46
54
|
label: "当前节点",
|
|
47
|
-
children:
|
|
48
|
-
}),
|
|
55
|
+
children: f
|
|
56
|
+
}), d !== void 0 && g.push({
|
|
49
57
|
key: "finished",
|
|
50
58
|
label: "完成时间",
|
|
51
|
-
children: a(
|
|
52
|
-
}),
|
|
59
|
+
children: a(d)
|
|
60
|
+
}), p !== void 0 && p !== "" && g.push({
|
|
53
61
|
key: "businessRef",
|
|
54
62
|
label: "业务单据",
|
|
55
|
-
children:
|
|
63
|
+
children: h ? h(p) : /* @__PURE__ */ k(D, {
|
|
56
64
|
code: !0,
|
|
57
|
-
children:
|
|
65
|
+
children: p
|
|
58
66
|
})
|
|
59
|
-
}),
|
|
67
|
+
}), m !== void 0 && Object.keys(m).length > 0 && g.push({
|
|
60
68
|
key: "labels",
|
|
61
69
|
label: "流程标签",
|
|
62
|
-
children: /* @__PURE__ */ k(T, { labels:
|
|
70
|
+
children: /* @__PURE__ */ k(T, { labels: m })
|
|
63
71
|
}), /* @__PURE__ */ A(E, {
|
|
64
72
|
gap: 12,
|
|
65
73
|
children: [/* @__PURE__ */ A(S, {
|
|
@@ -73,7 +81,7 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, applicant: c, crea
|
|
|
73
81
|
}), /* @__PURE__ */ k(o, { status: t })]
|
|
74
82
|
}), /* @__PURE__ */ k(x, {
|
|
75
83
|
colon: !0,
|
|
76
|
-
items:
|
|
84
|
+
items: g,
|
|
77
85
|
size: "small",
|
|
78
86
|
column: {
|
|
79
87
|
xs: 1,
|
|
@@ -284,6 +292,7 @@ function M({ instanceId: n, onActionCompleted: a }) {
|
|
|
284
292
|
createdAt: W.createdAt,
|
|
285
293
|
currentNodeName: W.currentNodeName,
|
|
286
294
|
finishedAt: W.finishedAt,
|
|
295
|
+
flowCode: W.flowCode,
|
|
287
296
|
flowName: W.flowName,
|
|
288
297
|
instanceNo: W.instanceNo,
|
|
289
298
|
status: W.status,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { NODE_PROGRESS_LABELS as e } from "../status/labels.js";
|
|
3
3
|
import { useMemo as t } from "react";
|
|
4
4
|
import { Icon as n, Tooltip as r, globalCssVars as i } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useApprovalPlugins as e } from "../../plugins/index.js";
|
|
3
3
|
import { Empty as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { DynamicIcon as e } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/components/icon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { ACTIVITY_ACTION_LABELS as e, BINDING_PROJECTION_STATUS_LABELS as t, BINDING_PROJECTION_STATUS_OPTIONS as n, INSTANCE_STATUS_LABELS as r, INSTANCE_STATUS_OPTIONS as i, NODE_PROGRESS_LABELS as a, PROCESS_TASK_ACTION_LABELS as o, TASK_STATUS_LABELS as s, TASK_STATUS_OPTIONS as c, VERSION_STATUS_LABELS as l } from "./status/labels.js";
|
|
3
3
|
import { InstanceFlowGraphViewer as u } from "./flow-graph/index.js";
|
|
4
4
|
import { InstanceFormPanel as d } from "./form-panel/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useApprovalPlugins as e } from "../../plugins/index.js";
|
|
3
3
|
import { Select as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { BINDING_PROJECTION_STATUS_LABELS as e, INSTANCE_STATUS_LABELS as t, NODE_PROGRESS_LABELS as n, TASK_STATUS_LABELS as r, VERSION_STATUS_LABELS as i } from "./labels.js";
|
|
3
3
|
import { BINDING_PROJECTION_STATUS_COLORS as a, INSTANCE_STATUS_COLORS as o, NODE_PROGRESS_COLORS as s, TASK_STATUS_COLORS as c, VERSION_STATUS_COLORS as l } from "./colors.js";
|
|
4
4
|
import { Tag as u } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { ACTIVITY_ACTION_LABELS as e } from "../status/labels.js";
|
|
3
3
|
import { formatTimestamp as t } from "../format.js";
|
|
4
4
|
import { TaskStatusTag as n } from "../status/index.js";
|
|
@@ -132,7 +132,13 @@ function b(e) {
|
|
|
132
132
|
function x(e) {
|
|
133
133
|
return e.kind === "withdraw" ? "撤回" : e.kind === "terminate" ? "终止" : e.name ?? "";
|
|
134
134
|
}
|
|
135
|
-
function S(
|
|
135
|
+
function S(e) {
|
|
136
|
+
let n = t(e.startedAt);
|
|
137
|
+
if (!e.finishedAt) return n;
|
|
138
|
+
let r = t(e.finishedAt);
|
|
139
|
+
return r === n ? n : `${n} → ${r}`;
|
|
140
|
+
}
|
|
141
|
+
function C({ entry: e }) {
|
|
136
142
|
return /* @__PURE__ */ p(a, {
|
|
137
143
|
align: "center",
|
|
138
144
|
gap: "small",
|
|
@@ -140,14 +146,14 @@ function S({ entry: e }) {
|
|
|
140
146
|
children: [/* @__PURE__ */ f(c, {
|
|
141
147
|
strong: !0,
|
|
142
148
|
children: x(e)
|
|
143
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ f(c, {
|
|
144
150
|
style: { fontSize: d.fontSizeSm },
|
|
145
151
|
type: "secondary",
|
|
146
|
-
children:
|
|
152
|
+
children: S(e)
|
|
147
153
|
})]
|
|
148
154
|
});
|
|
149
155
|
}
|
|
150
|
-
function
|
|
156
|
+
function w({ entry: e }) {
|
|
151
157
|
let t = e.participants ?? [], n = e.activities ?? [], r = e.ccRecipients ?? [];
|
|
152
158
|
return t.length === 0 && n.length === 0 && r.length === 0 ? null : /* @__PURE__ */ p(o, {
|
|
153
159
|
gap: 8,
|
|
@@ -158,16 +164,16 @@ function C({ entry: e }) {
|
|
|
158
164
|
]
|
|
159
165
|
});
|
|
160
166
|
}
|
|
161
|
-
function
|
|
167
|
+
function T({ timeline: e }) {
|
|
162
168
|
return e.length === 0 ? /* @__PURE__ */ f(i, { description: "暂无流转记录" }) : /* @__PURE__ */ f(l, {
|
|
163
169
|
items: e.map((e, t) => ({
|
|
164
170
|
key: String(t),
|
|
165
171
|
color: b(e),
|
|
166
|
-
title: /* @__PURE__ */ f(
|
|
167
|
-
content: /* @__PURE__ */ f(
|
|
172
|
+
title: /* @__PURE__ */ f(C, { entry: e }),
|
|
173
|
+
content: /* @__PURE__ */ f(w, { entry: e })
|
|
168
174
|
})),
|
|
169
175
|
mode: "left"
|
|
170
176
|
});
|
|
171
177
|
}
|
|
172
178
|
//#endregion
|
|
173
|
-
export {
|
|
179
|
+
export { T as InstanceTimeline };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { Avatar as e, Space as t, Text as n, Tooltip as r } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/components/user/index.tsx
|
package/dist/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./api/query.js";
|
|
3
3
|
import { useAdminApprovalApi as n } from "./api/admin-api.js";
|
|
4
4
|
import { useCategoryApi as r } from "./api/category-api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { APPROVAL_PERMISSIONS as e } from "../../permissions.js";
|
|
3
3
|
import { InstancesPanel as t } from "./instances.js";
|
|
4
4
|
import { MetricsPanel as n } from "./metrics.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { INSTANCE_STATUS_OPTIONS as t } from "../../components/status/labels.js";
|
|
4
4
|
import { formatTimestamp as n } from "../../components/format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { BINDING_PROJECTION_STATUS_LABELS as t, INSTANCE_STATUS_LABELS as n, TASK_STATUS_LABELS as r } from "../../components/status/labels.js";
|
|
4
4
|
import { formatDurationSeconds as i, formatTimestamp as a } from "../../components/format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { BINDING_PROJECTION_STATUS_OPTIONS as t } from "../../components/status/labels.js";
|
|
4
4
|
import { formatTimestamp as n } from "../../components/format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { TASK_STATUS_OPTIONS as t } from "../../components/status/labels.js";
|
|
4
4
|
import { formatTimestamp as n } from "../../components/format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { FlowIcon as t } from "../../components/icon.js";
|
|
4
4
|
import { Flex as n, Tag as r, Text as i } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { Grid as e, useFormContext as t } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { z as i } from "@vef-framework-react/shared";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../api/category-api.js";
|
|
3
3
|
import { APPROVAL_PERMISSIONS as t } from "../../permissions.js";
|
|
4
4
|
import { categoryColumns as n } from "./columns.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { Tag as t, Text as n } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
@@ -18,13 +18,13 @@ var i = [
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
title: "生效时间",
|
|
21
|
-
dataIndex: "
|
|
21
|
+
dataIndex: "startsAt",
|
|
22
22
|
width: 160,
|
|
23
23
|
render: (t) => e(t)
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
title: "失效时间",
|
|
27
|
-
dataIndex: "
|
|
27
|
+
dataIndex: "endsAt",
|
|
28
28
|
width: 160,
|
|
29
29
|
render: (t) => e(t)
|
|
30
30
|
},
|