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