|
|
|
@ -162,84 +162,113 @@ export default defineComponent({
|
|
|
|
|
Styles[themeStore.darkTheme ? 'toolbar-dark' : 'toolbar-light'] |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
<div> |
|
|
|
|
<span class={Styles['workflow-name']}> |
|
|
|
|
{props.definition?.processDefinition?.name || |
|
|
|
|
<span class={Styles['workflow-name']}> |
|
|
|
|
{route.name === 'workflow-instance-detail' |
|
|
|
|
? props.instance?.name |
|
|
|
|
: props.definition?.processDefinition?.name || |
|
|
|
|
t('project.dag.create')} |
|
|
|
|
</span> |
|
|
|
|
{props.definition?.processDefinition?.name && ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => copy(props.definition?.processDefinition?.name)} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<CopyOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
)} |
|
|
|
|
</span> |
|
|
|
|
{props.definition?.processDefinition?.name && ( |
|
|
|
|
<NTooltip |
|
|
|
|
v-slots={{ |
|
|
|
|
trigger: () => ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => { |
|
|
|
|
const name = |
|
|
|
|
route.name === 'workflow-instance-detail' |
|
|
|
|
? props.instance?.name |
|
|
|
|
: props.definition?.processDefinition?.name |
|
|
|
|
copy(name) |
|
|
|
|
}} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<CopyOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
), |
|
|
|
|
default: () => t('project.dag.copy_name') |
|
|
|
|
}} |
|
|
|
|
></NTooltip> |
|
|
|
|
)} |
|
|
|
|
<div class={Styles['toolbar-left-part']}> |
|
|
|
|
{route.name === 'workflow-instance-detail' && ( |
|
|
|
|
<> |
|
|
|
|
<NPopover |
|
|
|
|
show={paramPopoverRef.value} |
|
|
|
|
placement='bottom' |
|
|
|
|
trigger='manual' |
|
|
|
|
> |
|
|
|
|
{{ |
|
|
|
|
<NTooltip |
|
|
|
|
v-slots={{ |
|
|
|
|
trigger: () => ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => |
|
|
|
|
(paramPopoverRef.value = !paramPopoverRef.value) |
|
|
|
|
} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
<NPopover |
|
|
|
|
show={paramPopoverRef.value} |
|
|
|
|
placement='bottom' |
|
|
|
|
trigger='manual' |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<FundViewOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
), |
|
|
|
|
header: () => ( |
|
|
|
|
<NText strong depth={1}> |
|
|
|
|
{t('project.workflow.parameters_variables')} |
|
|
|
|
</NText> |
|
|
|
|
{{ |
|
|
|
|
trigger: () => ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => |
|
|
|
|
(paramPopoverRef.value = !paramPopoverRef.value) |
|
|
|
|
} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<FundViewOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
), |
|
|
|
|
header: () => ( |
|
|
|
|
<NText strong depth={1}> |
|
|
|
|
{t('project.workflow.parameters_variables')} |
|
|
|
|
</NText> |
|
|
|
|
), |
|
|
|
|
default: () => <VariablesView onCopy={copy} /> |
|
|
|
|
}} |
|
|
|
|
</NPopover> |
|
|
|
|
), |
|
|
|
|
default: () => <VariablesView onCopy={copy} /> |
|
|
|
|
default: () => t('project.dag.view_variables') |
|
|
|
|
}} |
|
|
|
|
</NPopover> |
|
|
|
|
|
|
|
|
|
<NPopover |
|
|
|
|
show={startupPopoverRef.value} |
|
|
|
|
placement='bottom' |
|
|
|
|
trigger='manual' |
|
|
|
|
> |
|
|
|
|
{{ |
|
|
|
|
></NTooltip> |
|
|
|
|
<NTooltip |
|
|
|
|
v-slots={{ |
|
|
|
|
trigger: () => ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => |
|
|
|
|
(startupPopoverRef.value = !startupPopoverRef.value) |
|
|
|
|
} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
<NPopover |
|
|
|
|
show={startupPopoverRef.value} |
|
|
|
|
placement='bottom' |
|
|
|
|
trigger='manual' |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<RightCircleOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
), |
|
|
|
|
header: () => ( |
|
|
|
|
<NText strong depth={1}> |
|
|
|
|
{t('project.workflow.startup_parameter')} |
|
|
|
|
</NText> |
|
|
|
|
{{ |
|
|
|
|
trigger: () => ( |
|
|
|
|
<NButton |
|
|
|
|
quaternary |
|
|
|
|
circle |
|
|
|
|
onClick={() => |
|
|
|
|
(startupPopoverRef.value = |
|
|
|
|
!startupPopoverRef.value) |
|
|
|
|
} |
|
|
|
|
class={Styles['toolbar-btn']} |
|
|
|
|
> |
|
|
|
|
<NIcon> |
|
|
|
|
<RightCircleOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
), |
|
|
|
|
header: () => ( |
|
|
|
|
<NText strong depth={1}> |
|
|
|
|
{t('project.workflow.startup_parameter')} |
|
|
|
|
</NText> |
|
|
|
|
), |
|
|
|
|
default: () => ( |
|
|
|
|
<StartupParam startupParam={props.instance} /> |
|
|
|
|
) |
|
|
|
|
}} |
|
|
|
|
</NPopover> |
|
|
|
|
), |
|
|
|
|
default: () => ( |
|
|
|
|
<StartupParam startupParam={props.instance.value} /> |
|
|
|
|
) |
|
|
|
|
default: () => t('project.dag.startup_parameter') |
|
|
|
|
}} |
|
|
|
|
</NPopover> |
|
|
|
|
></NTooltip> |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|