openxiangda 2.75.6 → 2.75.8
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/browser/components/workflow/WorkflowDesigner.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowDesigner.js +62 -13
- package/dist/browser/components/workflow/WorkflowDesigner.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowDiagram.d.ts +2 -1
- package/dist/browser/components/workflow/WorkflowDiagram.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowDiagram.js +2 -2
- package/dist/browser/components/workflow/WorkflowDiagram.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowDraftHandlingEditor.d.ts +3 -1
- package/dist/browser/components/workflow/WorkflowDraftHandlingEditor.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowDraftHandlingEditor.js +13 -11
- package/dist/browser/components/workflow/WorkflowDraftHandlingEditor.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowFlowCanvas.d.ts +1 -0
- package/dist/browser/components/workflow/WorkflowFlowCanvas.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowFlowCanvas.js +24 -11
- package/dist/browser/components/workflow/WorkflowFlowCanvas.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowNodeConfigurationEditor.d.ts +3 -1
- package/dist/browser/components/workflow/WorkflowNodeConfigurationEditor.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowNodeConfigurationEditor.js +22 -12
- package/dist/browser/components/workflow/WorkflowNodeConfigurationEditor.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowPeopleSourceEditor.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowPeopleSourceEditor.js +19 -16
- package/dist/browser/components/workflow/WorkflowPeopleSourceEditor.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowPeopleSourceParametersEditor.d.ts.map +1 -1
- package/dist/browser/components/workflow/WorkflowPeopleSourceParametersEditor.js +9 -3
- package/dist/browser/components/workflow/WorkflowPeopleSourceParametersEditor.js.map +1 -1
- package/dist/browser/components/workflow/WorkflowReturnPolicyEditor.js +2 -2
- package/dist/browser/components/workflow/WorkflowReturnPolicyEditor.js.map +1 -1
- package/dist/browser/components/workflow/workflow-canvas-editing.d.ts +5 -0
- package/dist/browser/components/workflow/workflow-canvas-editing.d.ts.map +1 -0
- package/dist/browser/components/workflow/workflow-canvas-editing.js +56 -0
- package/dist/browser/components/workflow/workflow-canvas-editing.js.map +1 -0
- package/dist/browser/components/workflow/workflow-people-source-presentation.d.ts.map +1 -1
- package/dist/browser/components/workflow/workflow-people-source-presentation.js +2 -0
- package/dist/browser/components/workflow/workflow-people-source-presentation.js.map +1 -1
- package/dist/browser/styles.css +11 -0
- package/documentation/getting-started.md +7 -7
- package/documentation/manifest.json +2 -2
- package/package.json +28 -26
- package/releases/2.75.8.json +37 -0
- package/skills/manifest.json +1 -1
- package/skills/openxiangda-v2/SKILL.md +4 -4
- package/skills/openxiangda-v2/references/getting-started.md +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowDesigner.d.ts","sourceRoot":"","sources":["../../../../src/browser/components/workflow/WorkflowDesigner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkflowDesigner.d.ts","sourceRoot":"","sources":["../../../../src/browser/components/workflow/WorkflowDesigner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACxI,YAAY,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAYhF,OAAO,EAAiiB,KAAK,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAiB/mB,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE;IAAE,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;CAAE,2CAuf3Y"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { workflowPeopleSourceSummary } from './workflow-people-source-presentation';
|
|
3
|
+
import { reconnectWorkflowCanvasEdge, moveWorkflowCanvasNode } from './workflow-canvas-editing';
|
|
2
4
|
import { workflowGraphWithChoices, workflowVariablesWithChoices } from './workflow-variable-presentation';
|
|
3
5
|
import { workflowDesignerAllowedActions, isWorkflowDesignerAuthorityLoss, isWorkflowDesignerAuthorityBusy } from './workflow-designer-authority';
|
|
4
6
|
import { workflowAssignmentLeaves, workflowAuthoringCatalog, workflowCanvasBindingKey, createWorkflowHumanNode, pruneWorkflowCanvasBindings, validateWorkflowBusinessSteps } from 'openxiangda-contracts/browser';
|
|
@@ -8,9 +10,9 @@ import { WorkflowReminderEditor } from './WorkflowReminderEditor.js';
|
|
|
8
10
|
import { WorkflowNotificationEditor } from './WorkflowNotificationEditor.js';
|
|
9
11
|
import { WorkflowReturnPolicyEditor } from './WorkflowReturnPolicyEditor.js';
|
|
10
12
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
|
-
import { Alert, App, Button, Checkbox, Collapse, Drawer, Input, Modal, Popconfirm, Radio, Segmented, Select, Skeleton, Space, Spin, Table, Tag, Tooltip } from 'antd';
|
|
13
|
+
import { Alert, App, Button, Checkbox, Collapse, Tabs, Drawer, Input, Modal, Popconfirm, Radio, Segmented, Select, Skeleton, Space, Spin, Table, Tag, Tooltip } from 'antd';
|
|
12
14
|
import { ArrowLeftOutlined, CheckCircleOutlined, CloseOutlined, HistoryOutlined, MenuFoldOutlined, MenuUnfoldOutlined, RedoOutlined, RobotOutlined, SafetyOutlined, UndoOutlined, UserOutlined, FormOutlined, CodeOutlined, CopyOutlined, BranchesOutlined, BellOutlined, PlayCircleOutlined } from '@ant-design/icons';
|
|
13
|
-
import { workflowReturnTargets,
|
|
15
|
+
import { workflowReturnTargets, isWorkflowPlatformNotify, WORKFLOW_PLATFORM_NOTIFY_HANDLER, WORKFLOW_PLATFORM_NOTIFY_INPUT_SCHEMA, WORKFLOW_PLATFORM_NOTIFY_OUTPUT_SCHEMA, editWorkflowDesignerDefinition, projectWorkflowGraph, validateWorkflowDesignerDocument, workflowDesignerVariables } from 'openxiangda-contracts/browser';
|
|
14
16
|
import { OpenXiangdaPlatformRequestError, loadWorkflowDesignerRead, loadWorkflowDesignerOriginalOutcome, loadWorkflowNodeConfigurations, loadApplicationAdministrationContext, saveWorkflowDesignerDraft, previewWorkflowDesignerPublication, publishWorkflowDesigner, loadWorkflowDesignerPublication, listWorkflowDesignerPublications, restoreWorkflowDesignerVersion, controlWorkflowDesignerPublication, searchWorkflowDesignerHoldCandidates } from '../../platform-client';
|
|
15
17
|
import { createBrowserUuid } from '../../uuid';
|
|
16
18
|
import { WorkflowDiagram } from './WorkflowDiagram';
|
|
@@ -49,6 +51,8 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
49
51
|
const [nativeHeadRevision, setNativeHeadRevision] = useState();
|
|
50
52
|
const [configurations, setConfigurations] = useState();
|
|
51
53
|
const [selected, setSelected] = useState('');
|
|
54
|
+
const [canvasAction, setCanvasAction] = useState();
|
|
55
|
+
const [inspectorTab, setInspectorTab] = useState('people');
|
|
52
56
|
const [selectedEdge, setSelectedEdge] = useState();
|
|
53
57
|
const [publishedView, setPublishedView] = useState(false);
|
|
54
58
|
const [outline, setOutline] = useState(false);
|
|
@@ -162,8 +166,16 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
162
166
|
}, [shown, variableChoices]);
|
|
163
167
|
const displayGraph = useMemo(() => {
|
|
164
168
|
const activeReturn = structureKeys.includes('return') ? shown?.nodes[selected] : undefined;
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
if (!graph)
|
|
170
|
+
return undefined;
|
|
171
|
+
const display = workflowDesignerDisplayGraph(graph, activeReturn?.id, activeReturn && ['approval', 'handle'].includes(activeReturn.kind) ? workflowReturnTargets(activeReturn) : []);
|
|
172
|
+
const edge = graph.edges.find(edge => edge.id === selectedEdge && edge.kind === 'reject');
|
|
173
|
+
if (edge) {
|
|
174
|
+
const target = graph.nodes.find(node => node.id === edge.to);
|
|
175
|
+
return { ...display, nodes: target && !display.nodes.some(node => node.id === target.id) ? [...display.nodes, target] : display.nodes, edges: [...display.edges, edge] };
|
|
176
|
+
}
|
|
177
|
+
return display;
|
|
178
|
+
}, [graph, structureKeys, selected, shown, selectedEdge]);
|
|
167
179
|
const outlineNodes = useMemo(() => displayGraph ? workflowDesignerOutlineRows(displayGraph) : [], [displayGraph]);
|
|
168
180
|
useEffect(() => { if (shown && selected !== workflowDesignerStartId && !shown.nodes[selected])
|
|
169
181
|
setSelected(shown.startAt); }, [shown, selected]);
|
|
@@ -317,17 +329,54 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
317
329
|
leaveHandling.current(close);
|
|
318
330
|
else
|
|
319
331
|
close(); };
|
|
332
|
+
const moveOnCanvas = (nodeId, edgeId) => {
|
|
333
|
+
if (!definition || disabled || !inspectorReady())
|
|
334
|
+
return;
|
|
335
|
+
const apply = () => { try {
|
|
336
|
+
mutate(moveWorkflowCanvasNode(definition, nodeId, edgeId));
|
|
337
|
+
setCanvasAction(undefined);
|
|
338
|
+
}
|
|
339
|
+
catch (error) {
|
|
340
|
+
message.error(error.message);
|
|
341
|
+
} };
|
|
342
|
+
if (leaveHandling.current)
|
|
343
|
+
leaveHandling.current(apply);
|
|
344
|
+
else
|
|
345
|
+
apply();
|
|
346
|
+
};
|
|
320
347
|
const selectNode = (value, edgeId) => {
|
|
348
|
+
if (canvasAction?.type === 'reconnect') {
|
|
349
|
+
if (!definition || disabled || !inspectorReady())
|
|
350
|
+
return;
|
|
351
|
+
const apply = () => { try {
|
|
352
|
+
mutate(reconnectWorkflowCanvasEdge(definition, canvasAction.edgeId, value));
|
|
353
|
+
setCanvasAction(undefined);
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
message.error(error.message);
|
|
357
|
+
} };
|
|
358
|
+
if (leaveHandling.current)
|
|
359
|
+
leaveHandling.current(apply);
|
|
360
|
+
else
|
|
361
|
+
apply();
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
321
364
|
if (value !== selected && !inspectorReady())
|
|
322
365
|
return;
|
|
323
|
-
const next = () => { setSelected(value); setSelectedEdge(edgeId); if (value !== selected)
|
|
324
|
-
setStructureKeys([]);
|
|
366
|
+
const next = () => { setSelected(value); setSelectedEdge(edgeId); if (value !== selected) {
|
|
367
|
+
setStructureKeys([]);
|
|
368
|
+
setInspectorTab('people');
|
|
369
|
+
} setInspector(value !== workflowDesignerStartId); };
|
|
325
370
|
if (value !== selected && leaveHandling.current)
|
|
326
371
|
leaveHandling.current(next);
|
|
327
372
|
else
|
|
328
373
|
next();
|
|
329
374
|
};
|
|
330
375
|
const selectEdge = (value) => {
|
|
376
|
+
if (canvasAction?.type === 'move') {
|
|
377
|
+
moveOnCanvas(canvasAction.nodeId, value);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
331
380
|
const edge = displayGraph?.edges.find(edge => edge.id === value);
|
|
332
381
|
if (edge && ['branch', 'default'].includes(edge.kind))
|
|
333
382
|
selectNode(edge.from, value);
|
|
@@ -648,18 +697,18 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
648
697
|
const NodeIcon = isWorkflowPlatformNotify(node) ? BellOutlined : typeIcons[node?.kind] || CodeOutlined;
|
|
649
698
|
const summaries = Object.fromEntries((configurations?.nodes || []).map(item => {
|
|
650
699
|
const binding = item.effective.binding;
|
|
651
|
-
const source = binding?.provider === 'fixed_users' ?
|
|
700
|
+
const source = binding?.provider === 'fixed_users' ? '指定成员:' + (binding.users || []).map(id => configurations.principals.users.find(user => user.value === id)?.label || '成员').join('、') : binding ? workflowPeopleSourceSummary(binding, variables, configurations.principals) : '按已配置的人员规则';
|
|
652
701
|
const mode = { single: '单人', any: '或签', all: '会签', sequence: '依次审批' }[item.effective.mode || ''] || '';
|
|
653
702
|
return [item.nodeId, `${mode}${mode ? ' · ' : ''}${source}`];
|
|
654
703
|
}));
|
|
655
704
|
const human = node?.kind === 'approval' || node?.kind === 'handle';
|
|
656
|
-
const
|
|
657
|
-
|
|
705
|
+
const nodeReturnEditor = human && node ? _jsxs("details", { onToggle: event => setStructureKeys(event.currentTarget.open ? ['return'] : []), children: [_jsx("summary", { children: "\u7F16\u8F91\u672C\u8282\u70B9\u9000\u56DE\u89C4\u5219" }), _jsxs("p", { children: ["\u5F53\u524D\u8282\u70B9\uFF1A", node.title, " \u00B7 \u4FEE\u6539\u968F\u6D41\u7A0B\u8349\u7A3F\u53D1\u5E03"] }), _jsx(WorkflowReturnPolicyEditor, { definition: definition, node: node, disabled: disabled, onChange: returnPolicy => patch({ returnPolicy, returnTargets: returnPolicy.targets.map(target => target.nodeId) }) })] }, node.id) : undefined;
|
|
706
|
+
const panel = _jsxs("div", { className: "oxa-workflow-designer-inspector", children: [_jsxs("header", { children: [_jsx("span", { className: `oxa-designer-inspector-icon kind-${node?.kind || 'start'}`, children: _jsx(NodeIcon, {}) }), _jsx("h2", { children: node?.title || '流程发起' }), _jsx(Tag, { children: isWorkflowPlatformNotify(node) ? '通知节点' : kinds[node?.kind || ''] || '发起' }), _jsx(Button, { type: "text", icon: _jsx(CloseOutlined, {}), "aria-label": "\u5173\u95ED\u8282\u70B9\u8BBE\u7F6E", onClick: closeInspector })] }), node ? _jsxs(_Fragment, { children: [human && _jsx(Tabs, { activeKey: inspectorTab, onChange: value => setInspectorTab(value), items: [{ key: 'people', label: node.kind === 'handle' ? '办理人' : '审批人' }, { key: 'operations', label: '审批操作' }, { key: 'more', label: '更多设置' }] }), human && inspectorTab === 'more' && liveState.dirty && _jsx(Alert, { type: "info", showIcon: true, title: "\u5BA1\u6279\u4EBA\u6216\u5BA1\u6279\u64CD\u4F5C\u6709\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF0C\u8BF7\u8FD4\u56DE\u5BF9\u5E94\u9875\u7B7E\u4FDD\u5B58\u3002" }), _jsx("div", { hidden: human && inspectorTab === 'more', children: liveNode && configurations && ['approval', 'handle', 'cc'].includes(node.kind) ? _jsx(WorkflowNodeConfigurationEditor, { workflowCode: workflowCode, node: liveNode, principals: configurations.principals, variableChoices: variableChoices, conditionalAssignment: configurations.conditionalAssignment, expectedHeadRevision: nativeHeadRevision, presentation: "inline", readOnly: !canHandle || authorityStopped.current, compact: false, section: human ? inspectorTab : undefined, onSectionRequest: setInspectorTab, onExpand: () => { setDetailInspector(true); setOutline(false); }, onClose: closeInspector, onStateChange: handlingStateChanged, onLeaveGuardChange: handlingGuardChanged, onAuthorityLoss: loseAuthority, returnSummary: nodeReturnEditor, onSaved: () => { void refreshHandling().catch(failure => setError(`办理设置已保存,重新读取失败:${String(failure.message)}`)); } }, `${liveNode.nodeId}:${liveNode.configuration.revision}`) : draft.publishedDefinition.nodes[node.id] && ['approval', 'handle', 'cc'].includes(node.kind) ? _jsx(Alert, { type: "warning", showIcon: true, title: "\u5DF2\u53D1\u5E03\u8282\u70B9\u7684\u529E\u7406\u8BBE\u7F6E\u672A\u80FD\u8F7D\u5165", description: "\u6B64\u8282\u70B9\u4E0D\u662F\u65B0\u589E\u8349\u7A3F\u8282\u70B9\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u914D\u7F6E\u540E\u4FEE\u6539\u3002", action: _jsx(Button, { onClick: () => void refreshHandling().catch(failure => setError(String(failure.message))), children: "\u91CD\u65B0\u8BFB\u53D6\u529E\u7406\u8BBE\u7F6E" }) }) : ['approval', 'handle', 'cc'].includes(node.kind) && _jsx(WorkflowDraftHandlingEditor, { section: human ? inspectorTab : undefined, returnEditor: nodeReturnEditor, peopleSourceTemplates: catalog?.nativePeopleAuthoring ? catalog.peopleSourceTemplates : undefined, variableChoices: variableChoices, node: node, baseline: node, bindingOptions: Object.keys(draft.publishedBinding.bindings).map(value => ({ value, label: value })), conditionalContext: catalog?.conditionalAssignments ? { definition, nodeId: node.id, standardProviders: ['fixed_users', 'app_role'], peopleSourceTemplates: catalog.nativePeopleAuthoring ? catalog.peopleSourceTemplates : undefined, releasedSources: Object.fromEntries(Object.entries(catalog.peopleSources).flatMap(([key, source]) => workflowAssignmentLeaves(source).map((leaf, index) => [`${key}/${index}`, leaf]))) } : undefined, binding: binding?.bindings['binding' in node ? node.binding : ''], sources: catalog.peopleSources, variables: variables, principals: configurations?.principals || { users: [], roles: [] }, disabled: disabled, onBindingChange: entry => { if (!('binding' in node) || !binding)
|
|
707
|
+
return; mutate({ ...definition, nodes: { ...definition.nodes, [node.id]: { ...node, ...((entry.provider === 'conditional' ? [...entry.cases.map(rule => rule.assignee), entry.otherwise] : [entry]).some(leaf => leaf.provider === 'supervisor_chain' && leaf.continuous !== false) ? { mode: 'sequence' } : {}) } } }, { ...binding, bindings: { ...binding.bindings, [node.binding]: entry } }); }, onChange: patch }) }), node.kind === 'action' && !isWorkflowPlatformNotify(node) && catalog && _jsx(WorkflowBusinessStepEditor, { node: node, catalog: catalog, variables: variables, disabled: disabled, onValidityChange: setStepInputInvalid, onChange: patch, onAssistant: () => { setAssistantContext(`当前步骤:${node.title}(${node.handler.code} v${node.handler.version})。需要新增业务能力时,请提出源代码与发布契约的改造方案,不要假设新能力已经发布。`); setAssistantOpen(true); setInspector(true); } }, `${node.id}:${node.handler.code}`), node.kind === 'parallel' && _jsx(WorkflowParallelConfigurationEditor, { node: node, selectedBranch: node.branches[(graph.edges.find(edge => edge.id === selectedEdge && edge.from === node.id)?.priority || 0) - 1]?.id, variables: variables, disabled: disabled, onChange: value => patch({ branches: value.branches }), onRemove: branchId => mutate(editWorkflowDesignerDefinition(definition, { type: 'remove_parallel_branch', nodeId: node.id, branchId })) }, node.id), node.kind === 'join' && _jsx(Alert, { type: "info", showIcon: true, title: "\u672C\u6B21\u8FDB\u5165\u7684\u5168\u90E8\u5206\u652F\u5B8C\u6210\u540E\u7EE7\u7EED", description: "\u6C47\u5408\u70B9\u4E0E\u5E76\u884C\u5206\u652F\u6210\u5BF9\u7EF4\u62A4\u3002\u82E5\u8981\u5220\u9664\u6574\u4E2A\u5E76\u884C\u533A\u57DF\uFF0C\u8BF7\u5728\u5E76\u884C\u8282\u70B9\u8BBE\u7F6E\u4E2D\u64CD\u4F5C\u3002" }), node.kind === 'condition' && _jsx(WorkflowConditionConfigurationEditor, { node: node, variables: variables, targets: targets, selectedBranch: graph.edges.find(edge => edge.id === selectedEdge && edge.from === node.id && edge.kind === 'branch')?.priority ? graph.edges.find(edge => edge.id === selectedEdge).priority - 1 : undefined, disabled: disabled, onChange: value => patch({ branches: value.branches, otherwise: value.otherwise }) }, node.id), _jsxs("section", { className: "oxa-designer-draft-band", hidden: human && inspectorTab !== 'more', children: [_jsx("h3", { children: "\u6D41\u7A0B\u7ED3\u6784 \u00B7 \u968F\u8349\u7A3F\u53D1\u5E03" }), _jsx(Collapse, { ghost: true, activeKey: structureKeys, onChange: keys => setStructureKeys(Array.isArray(keys) ? keys : [keys]), items: [
|
|
658
708
|
{ key: 'name', label: '节点名称', extra: _jsx("span", { children: node.title || '未命名节点' }), children: _jsxs("label", { children: ["\u8282\u70B9\u540D\u79F0", _jsx(Input, { disabled: disabled, value: node.title || '', onChange: event => patch({ title: event.target.value }) })] }) },
|
|
659
|
-
...(human ? [{ key: 'return', label: '退回设置', extra: _jsx("span", { children: (node.returnPolicy?.targets || node.returnTargets || []).length ? `可退回 ${(node.returnPolicy?.targets || node.returnTargets || []).length} 个节点` : '未配置退回目标' }), children: null }] : []),
|
|
660
709
|
...(['approval', 'handle', 'correction'].includes(node.kind) ? [{ key: 'reminder', label: '办理提醒', extra: _jsx("span", { children: 'reminders' in node && node.reminders ? `${node.reminders.afterSeconds >= 3600 ? `${node.reminders.afterSeconds / 3600} 小时` : `${node.reminders.afterSeconds / 60} 分钟`}后提醒` : '未设置提醒' }), children: _jsx(_Fragment, { children: ['approval', 'handle', 'correction'].includes(node.kind) && _jsx(WorkflowReminderEditor, { rule: 'reminders' in node ? node.reminders : undefined, disabled: disabled, onDirtyChange: setReminderDirty, onChange: reminders => patch({ reminders }) }, node.id) }) }] : []),
|
|
661
710
|
...((human || 'taskPageCode' in node) ? [{ key: 'page', label: '本节点表单', extra: _jsx("span", { children: definition.taskPages?.[node.taskPageCode || '']?.title || '应用自定义页面' }), children: _jsxs(_Fragment, { children: [human && !liveNode ? _jsx(Select, { "aria-label": "\u672C\u8282\u70B9\u8868\u5355", allowClear: true, disabled: disabled, value: node.taskPageCode, placeholder: "\u6807\u51C6\u53EA\u8BFB\u8BE6\u60C5\uFF08\u4E0D\u4FDD\u5B58\u8868\u5355\uFF09", options: Object.entries(catalog.taskPages).map(([value, page]) => ({ value, label: page.title })), onChange: pageCode => { const standard = createWorkflowHumanNode(node.id, node.kind, node.title, node.kind === 'approval' ? node.onApprove : node.next, pageCode, catalog.taskPages, node.kind === 'approval' ? node.onReject : undefined); patch({ taskPageCode: pageCode, fieldPolicy: 'fieldPolicy' in standard ? standard.fieldPolicy : undefined, administration: 'administration' in standard ? standard.administration : undefined, allowedOperations: 'allowedOperations' in standard ? standard.allowedOperations : undefined, requiredOperations: 'requiredOperations' in standard ? standard.requiredOperations : undefined, operationPolicy: 'operationPolicy' in standard ? standard.operationPolicy : undefined }); } }) : null, _jsx("p", { children: "\u9875\u9762\u5185\u5BB9\u4E0E\u53EF\u7F16\u8F91\u5B57\u6BB5\u4E0A\u9650\u6765\u81EA\u5E94\u7528\u53D1\u5E03\u7684\u9875\u9762\uFF1B\u6CA1\u6709\u4EFB\u52A1\u8868\u5355\u65F6\u4F7F\u7528\u6807\u51C6\u53EA\u8BFB\u8BE6\u60C5\uFF0C\u4E0D\u63D0\u4F9B\u8868\u5355\u4FDD\u5B58\u3002" })] }) }] : []),
|
|
662
|
-
{ key: 'advanced', label:
|
|
711
|
+
{ key: 'advanced', label: '节点管理', children: _jsxs(_Fragment, { children: [node.kind === 'action' && isWorkflowPlatformNotify(node) && _jsx(WorkflowNotificationEditor, { node: node, variables: variables, roles: configurations?.principals.roles || [], users: configurations?.principals.users || [], disabled: disabled, onChange: patch }), 'taskPageCode' in node && _jsxs("p", { children: ["\u672C\u8282\u70B9\u9875\u9762\uFF1A", definition.taskPages?.[node.taskPageCode || '']?.title || '按应用页面规则填写' || '标准审批页面'] }), !['end', 'correction', 'join'].includes(node.kind) && _jsx(Popconfirm, { title: node.kind === 'parallel' ? '删除并行区域及其中的所有节点?' : '删除节点并连接后续路径?', onConfirm: () => { if (!inspectorReady())
|
|
663
712
|
return; try {
|
|
664
713
|
const next = editWorkflowDesignerDefinition(definition, { type: 'remove', nodeId: node.id, ...(node.kind === 'condition' ? { reconnectTo: node.otherwise } : {}) });
|
|
665
714
|
mutate(next);
|
|
@@ -695,7 +744,7 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
695
744
|
toggle(); } })] }), outline && _jsx(Input.Search, { size: "small", "aria-label": "\u641C\u7D22\u6D41\u7A0B\u8282\u70B9", placeholder: "\u641C\u7D22\u8282\u70B9", value: outlineKeyword, allowClear: true, onChange: event => setOutlineKeyword(event.target.value) }), _jsx("nav", { children: outlineNodes.filter(item => !outlineKeyword || item.title.includes(outlineKeyword)).map(item => {
|
|
696
745
|
const Icon = item.presentation === 'notification' ? BellOutlined : typeIcons[item.kind] || CodeOutlined;
|
|
697
746
|
return _jsx(Tooltip, { title: !outline ? item.title : undefined, placement: "right", children: _jsxs("button", { type: "button", className: `kind-${item.kind}`, "aria-label": item.title, "aria-pressed": item.edgeId ? selectedEdge === item.edgeId : selected === item.nodeId, style: outline && item.depth ? { paddingLeft: 14 + item.depth * 16 } : undefined, onClick: () => item.edgeId ? selectEdge(item.edgeId) : selectNode(item.nodeId), children: [_jsx(Icon, {}), outline && _jsx("span", { children: item.title })] }) }, item.id);
|
|
698
|
-
}) }), outline && _jsxs("footer", { children: [_jsx("strong", { children: "\u68C0\u67E5\u7ED3\u679C" }), _jsxs("button", { type: "button", onClick: () => setChecksOpen(true), children: [_jsx(CheckCircleOutlined, {}), " ", errors.length ? `发现 ${errors.length} 项问题` : '未发现问题'] })] })] }), _jsxs("main", { children: [_jsxs("div", { className: "oxa-designer-banner", children: [publishedView ? `正在查看已发布 v${draft.definitionVersion}` : canEdit ? '正在编辑草稿' : '正在审阅草稿', " \u00B7 \u53D1\u5E03\u5E76\u542F\u7528\u65F6\u53EF\u66F4\u65B0\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7"] }), _jsx(WorkflowDiagram, { graph: displayGraph, summaries: summaries, selectedNodeId: selected, selectedEdgeId: selectedEdge, onSelectEdge: selectEdge, onSelectNode: selectNode, presentation: "designer", insertionOptions: [{ value: 'approval', label: '审批', kind: 'approval' }, { value: 'handle', label: '办理', kind: 'handle' }, { value: 'cc', label: '抄送', kind: 'cc' }, ...(variables.length ? [{ value: 'condition', label: '条件分支', kind: 'condition' }] : []), { value: 'parallel', label: '并行分支', kind: 'parallel' }, { value: 'action', label: '业务步骤', kind: 'action' }, { value: 'platform_notify', label: '发送通知', kind: 'notification' }], onInsertEdge: disabled || stepInputInvalid || reminderDirty ? undefined : (value, chosenTemplate) => { const open = () => { if (chosenTemplate) {
|
|
747
|
+
}) }), outline && _jsxs("footer", { children: [_jsx("strong", { children: "\u68C0\u67E5\u7ED3\u679C" }), _jsxs("button", { type: "button", onClick: () => setChecksOpen(true), children: [_jsx(CheckCircleOutlined, {}), " ", errors.length ? `发现 ${errors.length} 项问题` : '未发现问题'] })] })] }), _jsxs("main", { children: [_jsxs("div", { className: "oxa-designer-banner", children: [publishedView ? `正在查看已发布 v${draft.definitionVersion}` : canEdit ? '正在编辑草稿' : '正在审阅草稿', " \u00B7 \u53D1\u5E03\u5E76\u542F\u7528\u65F6\u53EF\u66F4\u65B0\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7"] }), !disabled && _jsxs("div", { className: "oxa-canvas-path-tools", role: "region", "aria-label": "\u753B\u5E03\u8DEF\u5F84\u7F16\u8F91", style: { padding: '8px 16px', display: 'flex', gap: 8, alignItems: 'center', flexWrap: 'wrap' }, children: [!outline && _jsx(Button, { icon: _jsx(MenuUnfoldOutlined, {}), "aria-label": "\u5C55\u5F00\u6D41\u7A0B\u5927\u7EB2", onClick: () => setOutline(true), children: "\u6D41\u7A0B\u5927\u7EB2" }), canvasAction ? _jsxs(_Fragment, { children: [_jsx("strong", { children: canvasAction.type === 'reconnect' ? '请选择画布上的目标节点' : '请选择画布上的目标路径,将节点移到此处' }), _jsx(Button, { onClick: () => setCanvasAction(undefined), children: "\u53D6\u6D88\u8DEF\u5F84\u7F16\u8F91" }), canvasAction.type === 'move' && _jsxs("details", { children: [_jsx("summary", { children: "\u9009\u62E9\u76EE\u6807\u8DEF\u5F84\uFF08\u952E\u76D8\uFF09" }), _jsx("div", { style: { maxHeight: 160, overflow: 'auto', display: 'flex', flexWrap: 'wrap', gap: 8 }, children: graph.edges.filter(edge => !['return', 'resubmit', 'reject'].includes(edge.kind) && edge.from !== canvasAction.nodeId && edge.to !== canvasAction.nodeId).map(edge => _jsx(Button, { onFocus: () => setSelectedEdge(edge.id), onClick: () => moveOnCanvas(canvasAction.nodeId, edge.id), children: (definition.nodes[edge.from]?.title || '节点') + ' · ' + edge.label + ' → ' + (definition.nodes[edge.to]?.title || '目标') }, edge.id)) })] })] }) : _jsxs(_Fragment, { children: [node && graph.edges.filter(edge => edge.from === node.id && ['approve', 'reject', 'next'].includes(edge.kind)).map(edge => _jsxs(Button, { type: selectedEdge === edge.id ? 'primary' : 'default', onClick: () => selectEdge(edge.id), children: [edge.label, " \u2192 ", definition.nodes[edge.to]?.title || '目标节点'] }, edge.id)), node && ['approval', 'handle', 'cc', 'action'].includes(node.kind) && _jsx(Button, { onClick: () => setCanvasAction({ type: 'move', nodeId: node.id }), children: "\u79FB\u52A8\u6240\u9009\u8282\u70B9" }), selectedEdge && graph.edges.some(edge => edge.id === selectedEdge && ['approve', 'reject', 'next'].includes(edge.kind)) && _jsxs(_Fragment, { children: [_jsx("span", { children: (() => { const edge = graph.edges.find(edge => edge.id === selectedEdge); return (definition.nodes[edge.from]?.title || '节点') + ' · ' + edge.label + ' → ' + (definition.nodes[edge.to]?.title || '目标'); })() }), _jsx(Button, { onClick: () => setCanvasAction({ type: 'reconnect', edgeId: selectedEdge }), children: "\u4FEE\u6539\u6B64\u8DEF\u5F84\u76EE\u6807" })] }), _jsx("small", { children: "\u62D6\u52A8\u8282\u70B9\u5230\u76EE\u6807\u8DEF\u5F84\uFF1B\u4E5F\u53EF\u4F7F\u7528\u79FB\u52A8\u6309\u94AE\u53CA\u952E\u76D8\u9009\u62E9\u3002" })] })] }), _jsx(WorkflowDiagram, { onMoveNode: disabled ? undefined : moveOnCanvas, graph: displayGraph, summaries: summaries, selectedNodeId: selected, selectedEdgeId: selectedEdge, onSelectEdge: selectEdge, onSelectNode: selectNode, presentation: "designer", insertionOptions: [{ value: 'approval', label: '审批', kind: 'approval' }, { value: 'handle', label: '办理', kind: 'handle' }, { value: 'cc', label: '抄送', kind: 'cc' }, ...(variables.length ? [{ value: 'condition', label: '条件分支', kind: 'condition' }] : []), { value: 'parallel', label: '并行分支', kind: 'parallel' }, { value: 'action', label: '业务步骤', kind: 'action' }, { value: 'platform_notify', label: '发送通知', kind: 'notification' }], onInsertEdge: disabled || stepInputInvalid || reminderDirty ? undefined : (value, chosenTemplate) => { const open = () => { if (chosenTemplate) {
|
|
699
748
|
const title = chosenTemplate === 'parallel' ? '并行分支' : chosenTemplate === 'condition' ? '条件分支' : chosenTemplate === 'platform_notify' ? '发送通知' : kinds[chosenTemplate] || draft.publishedDefinition.nodes[chosenTemplate]?.title || '新增节点';
|
|
700
749
|
insertNode(chosenTemplate, title, value);
|
|
701
750
|
}
|
|
@@ -706,7 +755,7 @@ export function WorkflowDesigner({ workflowCode, onPublished, onDirtyChange, onS
|
|
|
706
755
|
} }; if (leaveHandling.current)
|
|
707
756
|
leaveHandling.current(open);
|
|
708
757
|
else
|
|
709
|
-
open(); } }), !outline && _jsx(Button, { className: "oxa-designer-show-outline", icon: _jsx(MenuUnfoldOutlined, {}), "aria-label": "\u5C55\u5F00\u6D41\u7A0B\u5927\u7EB2", onClick: () => setOutline(true), children: "\u6D41\u7A0B\u5927\u7EB2" })] }), inspector && narrow && _jsx("button", { type: "button", className: "oxa-designer-inspector-backdrop", "aria-label": "\u5173\u95ED\u8282\u70B9\u8BBE\u7F6E", onClick: closeInspector }), _jsxs("aside", { style: { display: inspector ? undefined : 'none' }, ref: inspectorElement, className: "oxa-designer-desktop-inspector", role: narrow ? 'dialog' : undefined, "aria-modal": narrow ? true : undefined, "aria-label": assistantOpen ? 'AI 助手' : '节点设置', children: [_jsx("div", { hidden: assistantOpen, children: panel }), _jsx(WorkflowDesignerAssistant, { presentation: "panel", workflowCode: workflowCode, draft: draft, variableChoices: variableChoices, context: assistantContext, open: assistantOpen && canEdit, canApply: canEdit && !authorityStopped.current && !dirty && !busy && !liveState.dirty && !liveState.busy && !liveState.unknown && !frozenSave.current && !frozenPublish.current && !frozenAux.current, onClose: () => setAssistantOpen(false), onApplied: value => { setPublishedView(false); setDraft(value); setDefinition(value.definition); setBinding(value.binding); setHistory(current => { const snapshots = [...current, { definition, binding: binding }].slice(-25); while (snapshots.length > 1 && snapshots.reduce((bytes, item) => bytes + JSON.stringify(item).length, 0) > 4 * 1024 * 1024)
|
|
758
|
+
open(); } }), !outline && disabled && _jsx(Button, { className: "oxa-designer-show-outline", icon: _jsx(MenuUnfoldOutlined, {}), "aria-label": "\u5C55\u5F00\u6D41\u7A0B\u5927\u7EB2", onClick: () => setOutline(true), children: "\u6D41\u7A0B\u5927\u7EB2" })] }), inspector && narrow && _jsx("button", { type: "button", className: "oxa-designer-inspector-backdrop", "aria-label": "\u5173\u95ED\u8282\u70B9\u8BBE\u7F6E", onClick: closeInspector }), _jsxs("aside", { style: { display: inspector ? undefined : 'none' }, ref: inspectorElement, className: "oxa-designer-desktop-inspector", role: narrow ? 'dialog' : undefined, "aria-modal": narrow ? true : undefined, "aria-label": assistantOpen ? 'AI 助手' : '节点设置', children: [_jsx("div", { hidden: assistantOpen, children: panel }), _jsx(WorkflowDesignerAssistant, { presentation: "panel", workflowCode: workflowCode, draft: draft, variableChoices: variableChoices, context: assistantContext, open: assistantOpen && canEdit, canApply: canEdit && !authorityStopped.current && !dirty && !busy && !liveState.dirty && !liveState.busy && !liveState.unknown && !frozenSave.current && !frozenPublish.current && !frozenAux.current, onClose: () => setAssistantOpen(false), onApplied: value => { setPublishedView(false); setDraft(value); setDefinition(value.definition); setBinding(value.binding); setHistory(current => { const snapshots = [...current, { definition, binding: binding }].slice(-25); while (snapshots.length > 1 && snapshots.reduce((bytes, item) => bytes + JSON.stringify(item).length, 0) > 4 * 1024 * 1024)
|
|
710
759
|
snapshots.shift(); return snapshots; }); setFuture([]); setError(undefined); }, onStateChange: setAssistantState, onAuthorityLoss: loseAuthority })] })] }), _jsx(Drawer, { open: checksOpen, title: "\u6D41\u7A0B\u7ED3\u6784\u68C0\u67E5", width: 440, onClose: () => setChecksOpen(false), children: _jsx(Alert, { showIcon: true, type: errors.length ? 'warning' : 'success', title: errors.length ? `发现 ${errors.length} 项待修正的问题` : '未发现结构问题', description: errors.length ? errors.map(diagnostic).join(';') : '节点与流转路径已通过结构校验。发布时还会检查当前应用的人员规则、页面和业务步骤。' }) }), _jsxs(Modal, { open: !!insert, title: "\u65B0\u589E\u8282\u70B9", onCancel: () => setInsert(undefined), onOk: () => insertNode(), okText: "\u6DFB\u52A0", okButtonProps: { disabled: !nodeTitle.trim() || !template }, children: [_jsx("p", { children: "\u65B0\u589E\u7A7A\u767D\u8282\u70B9\u540E\u81EA\u884C\u914D\u7F6E\u4EBA\u5458\u3001\u6309\u94AE\u548C\u63D0\u9192\u3002\u4E1A\u52A1\u6B65\u9AA4\u4F7F\u7528\u5E94\u7528\u5DF2\u53D1\u5E03\u7684\u80FD\u529B\u3002" }), _jsxs("label", { children: ["\u8282\u70B9\u7C7B\u578B", _jsx(Select, { style: { width: '100%' }, value: template, onChange: setTemplate, options: [{ value: 'approval', label: '审批(空白)' }, { value: 'handle', label: '办理(空白)' }, { value: 'cc', label: '抄送(空白)' }, { value: 'action', label: '已发布业务步骤' }, { value: 'parallel', label: '并行分支' }, { value: 'platform_notify', label: '发送通知' }, ...(variables.length ? [{ value: 'condition', label: '条件分支' }] : []), ...Object.values(draft.publishedDefinition.nodes).filter(node => ['approval', 'handle', 'cc', 'action'].includes(node.kind)).map(node => ({ value: node.id, label: `复制已有配置 · ${node.title}` }))] })] }), _jsxs("label", { children: ["\u8282\u70B9\u540D\u79F0", _jsx(Input, { value: nodeTitle, onChange: event => setNodeTitle(event.target.value) })] })] }), _jsx(Drawer, { open: versionsOpen, title: "\u6D41\u7A0B\u7248\u672C\u8BB0\u5F55", width: 620, onClose: () => setVersionsOpen(false), children: _jsx(Table, { loading: busy, rowKey: "publicationId", dataSource: versions, pagination: { pageSize: 10 }, columns: [{ title: '版本', render: (_, item) => `v${item.definitionVersion}` }, { title: '说明', dataIndex: 'reason' }, { title: '发布时间', dataIndex: 'createdAt', render: value => new Date(value).toLocaleString() }, { title: '操作', render: (_, item) => _jsx(Popconfirm, { title: "\u5C06\u8BE5\u7248\u672C\u6062\u590D\u5230\u5171\u4EAB\u8349\u7A3F\uFF1F", description: "\u5F53\u524D\u8349\u7A3F\u5C06\u88AB\u66FF\u6362\uFF1B\u53D1\u5E03\u540E\u624D\u4F1A\u751F\u6548\u3002", onConfirm: () => void restore(item.definitionVersion), children: _jsx(Button, { disabled: !canEdit || authorityStopped.current || busy || dirty || liveState.dirty || liveState.busy || liveState.unknown || !!frozenSave.current || !!frozenPublish.current || !!frozenAux.current, children: "\u6062\u590D\u5230\u8349\u7A3F" }) }) }] }) }), _jsxs(Modal, { open: publication, title: "\u53D1\u5E03\u5E76\u542F\u7528", width: 648, className: "oxa-designer-publish-modal", cancelText: "\u7EE7\u7EED\u7F16\u8F91", onCancel: () => { if (!frozenPublish.current)
|
|
711
760
|
setPublication(false); }, onOk: () => void publish(), confirmLoading: busy, okText: frozenPublish.current ? '重试原发布请求' : '发布并启用', okButtonProps: { disabled: !canPublish || authorityStopped.current || !reason.trim() || scope === 'running_and_new' && (holdIds.length > 0 || holdNodeIds.length > 0) && !holdReason.trim() || !preview || preview.truncated || scope === 'running_and_new' && !!preview.counts.excepted && !acknowledge }, children: [_jsxs("p", { children: ["\u5C06\u5F53\u524D\u8349\u7A3F\u53D1\u5E03\u5230", draft.environmentKey === 'production' ? '正式环境' : '测试环境', "\u3002\u68C0\u67E5\u901A\u8FC7\u540E\u7ACB\u5373\u751F\u6548\u3002"] }), _jsxs(Spin, { spinning: busy, children: [_jsxs("div", { className: "oxa-designer-publish-checks", children: [_jsx(CheckCircleOutlined, {}), _jsx("span", { children: preview ? '流程与应用能力检查已完成' : '正在检查流程与应用能力' })] }), _jsxs("fieldset", { disabled: busy || !!frozenPublish.current, children: [_jsx("h3", { children: "\u751F\u6548\u8303\u56F4" }), _jsxs(Radio.Group, { value: scope, disabled: busy || !!frozenPublish.current, onChange: event => setScope(event.target.value), className: "oxa-designer-publish-scope", children: [_jsxs(Radio, { value: "running_and_new", children: [_jsxs("strong", { children: ["\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7\u548C\u65B0\u53D1\u8D77\u7684\u7533\u8BF7\u90FD\u4F7F\u7528\u65B0\u7248\u672C", _jsx(Tag, { color: "blue", children: "\u9ED8\u8BA4" })] }), _jsx("small", { children: "\u5DF2\u8FDB\u5165\u7684\u4EFB\u52A1\u4FDD\u7559\u539F\u6709\u4EBA\u9009\u3001\u6309\u94AE\u548C\u9875\u9762\uFF0C\u540E\u7EED\u6D41\u8F6C\u4F7F\u7528\u65B0\u7248\u672C\u3002" })] }), _jsxs(Radio, { value: "new_only", children: [_jsx("strong", { children: "\u4EC5\u65B0\u53D1\u8D77\u7684\u7533\u8BF7\u4F7F\u7528\u65B0\u7248\u672C" }), _jsx("small", { children: "\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7\u7EE7\u7EED\u6309\u539F\u7248\u672C\u529E\u7406\u3002" })] })] }), scope === 'running_and_new' && _jsxs("details", { className: "oxa-designer-publish-holds", children: [_jsxs("summary", { children: ["\u6307\u5B9A\u4FDD\u7559\u5728\u539F\u7248\u672C\u7684\u7533\u8BF7", (holdIds.length > 0 || holdNodeIds.length > 0) && _jsx(Tag, { children: "\u5DF2\u6307\u5B9A" })] }), _jsxs("label", { children: ["\u4FDD\u7559\u539F\u7248\u672C\u7684\u7533\u8BF7", _jsx(Select, { mode: "multiple", showSearch: true, filterOption: false, onSearch: keyword => void searchHolds(keyword), disabled: busy || !!frozenPublish.current, value: holdIds, onChange: value => { setHoldIds(value); setPreview(undefined); }, options: holdCandidates.map(item => ({ value: item.instanceId, label: `${item.businessKey} · ${item.nodeTitle}` })) })] }), _jsxs("label", { children: ["\u4FDD\u7559\u5F53\u524D\u505C\u5728\u8FD9\u4E9B\u8282\u70B9\u7684\u7533\u8BF7", _jsx(Select, { mode: "multiple", disabled: busy || !!frozenPublish.current, value: holdNodeIds, options: Object.values(definition.nodes).filter(node => ['approval', 'handle', 'correction', 'action'].includes(node.kind)).map(node => ({ value: node.id, label: node.title || '流程节点' })), onChange: value => { setHoldNodeIds(value); setPreview(undefined); } })] }), (holdIds.length > 0 || holdNodeIds.length > 0) && _jsxs("label", { children: ["\u4FDD\u7559\u539F\u56E0", _jsx(Input, { disabled: busy || !!frozenPublish.current, value: holdReason, maxLength: 1000, onChange: event => setHoldReason(event.target.value) })] }), _jsx(Button, { disabled: busy || !!frozenPublish.current, onClick: () => void check(), children: "\u91CD\u65B0\u68C0\u67E5\u5F71\u54CD" })] }), preview && scope === 'running_and_new' && _jsxs(_Fragment, { children: [_jsx("h3", { children: "\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7" }), _jsx("dl", { className: "oxa-designer-publish-counts", children: Object.entries(preview.counts).map(([key, count]) => _jsxs("div", { className: `outcome-${key}`, children: [_jsx("dt", { children: outcomeLabels[key] || key }), _jsx("dd", { children: count })] }, key)) }), preview.items.some(item => item.outcome !== 'eligible') && _jsxs("details", { className: "oxa-designer-publish-exceptions", children: [_jsx("summary", { children: "\u67E5\u770B\u9700\u5355\u72EC\u5904\u7406\u7684\u7533\u8BF7" }), _jsx(Table, { size: "small", rowKey: "instanceId", dataSource: preview.items.filter(item => item.outcome !== 'eligible'), pagination: { pageSize: 5 }, columns: [{ title: '申请', dataIndex: 'businessKey' }, { title: '处理', render: (_, item) => outcomeLabels[item.outcome] }, { title: '原因', dataIndex: 'reason' }] })] }), !!preview.counts.excepted && _jsx(Checkbox, { disabled: !!frozenPublish.current || busy, checked: acknowledge, onChange: event => setAcknowledge(event.target.checked), children: "\u6211\u5DF2\u4E86\u89E3\u4E0D\u80FD\u66F4\u65B0\u7684\u7533\u8BF7\u5C06\u4FDD\u7559\u539F\u7248\u672C\uFF0C\u5E76\u5728\u66F4\u65B0\u8BB0\u5F55\u4E2D\u5355\u72EC\u5217\u51FA\u3002" })] }), scope === 'new_only' && _jsx("p", { children: "\u65B0\u53D1\u8D77\u7684\u7533\u8BF7\u4F7F\u7528\u6B64\u7248\u672C\uFF0C\u8FDB\u884C\u4E2D\u7684\u7533\u8BF7\u4FDD\u6301\u5F53\u524D\u7248\u672C\u3002" }), _jsxs("label", { className: "oxa-designer-publish-reason", children: ["\u7248\u672C\u8BF4\u660E", _jsx(Input, { "aria-label": "\u6D41\u7A0B\u7248\u672C\u8BF4\u660E", disabled: busy || !!frozenPublish.current, value: reason, maxLength: 1000, onChange: event => setReason(event.target.value), placeholder: "\u8BF4\u660E\u672C\u6B21\u6D41\u7A0B\u7684\u8C03\u6574" })] })] })] })] })] });
|
|
712
761
|
}
|