feat(sj_map_reduce): 工作流新增上下文字段
This commit is contained in:
parent
5657119c10
commit
b622d3a217
@ -63,8 +63,11 @@ watch(
|
||||
} else {
|
||||
title = '请选择组';
|
||||
}
|
||||
if (val.wfContext) {
|
||||
form.value.wfContext = JSON.parse(val.wfContext).init;
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const formRef = ref<FormInst>();
|
||||
@ -78,6 +81,7 @@ const save = () => {
|
||||
formRef.value
|
||||
?.validate(errors => {
|
||||
if (!errors) {
|
||||
form.value.wfContext = JSON.stringify({ init: form.value.wfContext });
|
||||
close();
|
||||
emit('save', form.value);
|
||||
}
|
||||
@ -201,6 +205,9 @@ const rules: Record<RuleKey, FormItemRule> = {
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NFormItem path="wfContext" label="工作流上下文">
|
||||
<CodeMirror v-model="form.wfContext" lang="json" placeholder="请输入工作流上下文" />
|
||||
</NFormItem>
|
||||
<NFormItem path="workflowStatus" label="节点状态">
|
||||
<NRadioGroup v-model:value="form.workflowStatus">
|
||||
<NSpace>
|
||||
|
@ -119,7 +119,7 @@ const onDragstop = () => {
|
||||
<template>
|
||||
<div class="workflow">
|
||||
<div class="workflow-affix">
|
||||
<NAffix :trigger-top="0">
|
||||
<NAffix :trigger-top="0" class="position-sticky z-2">
|
||||
<div class="header">
|
||||
<div>
|
||||
<NTooltip>
|
||||
@ -152,6 +152,7 @@ const onDragstop = () => {
|
||||
class="vue-drag"
|
||||
:is-draggable="true"
|
||||
:is-resizable="false"
|
||||
:z="1"
|
||||
@dragging="onDragging"
|
||||
@dragstop="onDragstop"
|
||||
>
|
||||
|
2
src/typings/workflow.d.ts
vendored
2
src/typings/workflow.d.ts
vendored
@ -15,6 +15,8 @@ declare namespace Workflow {
|
||||
blockStrategy?: Api.Common.BlockStrategy;
|
||||
/** 执行超时时间 */
|
||||
executorTimeout?: number;
|
||||
/** 方法参数 */
|
||||
wfContext?: string;
|
||||
/** 工作流状态 */
|
||||
workflowStatus?: Api.Common.WorkFlowNodeStatus;
|
||||
/** 描述 */
|
||||
|
@ -19,7 +19,8 @@ const node = ref<Workflow.NodeDataType>({
|
||||
workflowStatus: 1,
|
||||
blockStrategy: 1,
|
||||
description: undefined,
|
||||
executorTimeout: 60
|
||||
executorTimeout: 60,
|
||||
wfContext: '{"init":""}'
|
||||
});
|
||||
|
||||
const save = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user