feat(sj_map_reduce): 工作流节点新增节点ID展示

This commit is contained in:
xlsea 2024-07-01 20:19:55 +08:00
parent e344c95e0f
commit 3c19775395
7 changed files with 18 additions and 6 deletions

View File

@ -36,7 +36,7 @@ const form = ref<Workflow.ConditionNodeType>({
decision: {
logicalCondition: 1,
expressionType: 1,
checkContent: []
checkContents: []
}
});
@ -156,8 +156,8 @@ const rules: FormRules = {
:extensions="[oneDark]"
/>
</NFormItem>
<NFormItem path="decision.checkContent" label="模拟上下文">
<DynamicInput v-model:value="form.decision!.checkContent!" path="decision.checkContent" />
<NFormItem path="decision.checkContents" label="模拟上下文">
<DynamicInput v-model:value="form.decision!.checkContents!" path="decision.checkContents" />
</NFormItem>
</NForm>

View File

@ -206,6 +206,11 @@ const getClass = (item: Workflow.ConditionNodeType) => {
<span class="node-title">
<NBadge dot processing color="#52c41a" />
&nbsp;{{ item.nodeName }}
<span
v-if="item.id && item.nodeName !== $t('workflow.node.condition.conditionNodes.otherNodeName')"
>
&nbsp;({{ item.id }})
</span>
<NTooltip v-if="item.nodeName === $t('workflow.node.condition.conditionNodes.otherNodeName')">
<template #trigger>
<icon-ant-design:info-circle-outlined class="ml-3px text-16px" />

View File

@ -148,6 +148,7 @@ const getClass = (item: Workflow.ConditionNodeType) => {
<span class="text text-#935af6">
<NBadge processing dot :color="item.workflowNodeStatus === 1 ? '#52c41a' : '#ff4d4f'" />
&nbsp;{{ item.nodeName }}
<span v-if="item.id">&nbsp;({{ item.id }})</span>
</span>
<icon-ant-design:close-outlined v-if="!disabled" class="close" @click.stop="delTerm" />
</div>

View File

@ -83,7 +83,11 @@ const show = () => {
<div class="title">
<span class="text">
<NBadge dot :color="nodeData.workflowStatus === 1 ? '#52c41a' : '#ff000d'" />
<span class="text-#ff943e">&nbsp;{{ nodeData.workflowName ? nodeData.workflowName : '请选择组' }}</span>
<span class="text-#ff943e">
&nbsp;{{
nodeData.workflowName ? `${nodeData.workflowName} ${nodeData.id ? ` (${nodeData.id})` : ''}` : '请选择组'
}}
</span>
</span>
</div>
<div v-if="nodeData.groupName" class="content">

View File

@ -216,6 +216,7 @@ const isShow = (taskBatchStatus: number) => {
<span class="text color-#3296fa">
<NBadge processing dot :color="item.workflowNodeStatus === 1 ? '#52c41a' : '#ff4d4f'" />
&nbsp;{{ item.nodeName }}
<span v-if="item.id">&nbsp;({{ item.id }})</span>
</span>
<span class="priority-title">{{ $t('workflow.node.priority') }}{{ item.priorityLevel }}</span>
<icon-ant-design:close-outlined v-if="!disabled" class="close" @click.stop="delTerm(i)" />

View File

@ -70,7 +70,7 @@ export function fetchCheckNodeExpression(expression: Workflow.BrachNodeType) {
method: 'post',
data: {
...expression,
checkContent: JSON.stringify(parseContent(expression.checkContent))
checkContent: JSON.stringify(parseContent(expression.checkContents))
}
});
}

View File

@ -86,7 +86,8 @@ declare namespace Workflow {
/** 条件节点表达式 */
nodeExpression?: string;
/** 模拟上下文 */
checkContent?: { key: string; value: string | number | boolean; type: string }[];
checkContent?: string;
checkContents?: { key: string; value: string | number | boolean; type: string }[];
/** 表达式类型 */
expressionType?: Api.Common.Expression;
/** 判定逻辑 */