|
|
@ -23,7 +23,7 @@ import { ReloadOutlined, EyeOutlined } from '@vicons/antd' |
|
|
|
import { useRelation } from './use-relation' |
|
|
|
import { useRelation } from './use-relation' |
|
|
|
import Card from '@/components/card' |
|
|
|
import Card from '@/components/card' |
|
|
|
import Graph from './components/Graph' |
|
|
|
import Graph from './components/Graph' |
|
|
|
import Result from "@/components/result"; |
|
|
|
import Result from '@/components/result' |
|
|
|
|
|
|
|
|
|
|
|
const workflowRelation = defineComponent({ |
|
|
|
const workflowRelation = defineComponent({ |
|
|
|
name: 'workflow-relation', |
|
|
|
name: 'workflow-relation', |
|
|
@ -61,71 +61,76 @@ const workflowRelation = defineComponent({ |
|
|
|
const { t, handleResetDate } = this |
|
|
|
const { t, handleResetDate } = this |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
this.seriesData.length === 0 && ( |
|
|
|
(this.seriesData.length === 0 && ( |
|
|
|
<Result |
|
|
|
<Result |
|
|
|
title={t('project.workflow.workflow_relation_no_data_result_title')} |
|
|
|
title={t('project.workflow.workflow_relation_no_data_result_title')} |
|
|
|
description={t('project.workflow.workflow_relation_no_data_result_desc')} |
|
|
|
description={t( |
|
|
|
status={"info"} |
|
|
|
'project.workflow.workflow_relation_no_data_result_desc' |
|
|
|
size={"medium"}/> |
|
|
|
)} |
|
|
|
) |
|
|
|
status={'info'} |
|
|
|
) || ( |
|
|
|
size={'medium'} |
|
|
|
this.seriesData.length > 0 && ( |
|
|
|
/> |
|
|
|
<Card title={t('project.workflow.workflow_relation')}> |
|
|
|
)) || |
|
|
|
{{ |
|
|
|
(this.seriesData.length > 0 && ( |
|
|
|
default: () => |
|
|
|
<Card title={t('project.workflow.workflow_relation')}> |
|
|
|
Object.keys(this.seriesData).length > 0 && ( |
|
|
|
{{ |
|
|
|
<Graph seriesData={this.seriesData} labelShow={this.labelShow} /> |
|
|
|
default: () => |
|
|
|
), |
|
|
|
Object.keys(this.seriesData).length > 0 && ( |
|
|
|
'header-extra': () => ( |
|
|
|
<Graph |
|
|
|
<NSpace> |
|
|
|
seriesData={this.seriesData} |
|
|
|
<NSelect |
|
|
|
labelShow={this.labelShow} |
|
|
|
clearable |
|
|
|
/> |
|
|
|
style={{ width: '300px' }} |
|
|
|
), |
|
|
|
placeholder={t('project.workflow.workflow_name')} |
|
|
|
'header-extra': () => ( |
|
|
|
options={this.workflowOptions} |
|
|
|
<NSpace> |
|
|
|
v-model={[this.workflow, 'value']} |
|
|
|
<NSelect |
|
|
|
/> |
|
|
|
clearable |
|
|
|
<NTooltip trigger={'hover'}> |
|
|
|
style={{ width: '300px' }} |
|
|
|
{{ |
|
|
|
placeholder={t('project.workflow.workflow_name')} |
|
|
|
default: () => t('project.workflow.refresh'), |
|
|
|
options={this.workflowOptions} |
|
|
|
trigger: () => ( |
|
|
|
v-model={[this.workflow, 'value']} |
|
|
|
<NButton |
|
|
|
/> |
|
|
|
strong |
|
|
|
<NTooltip trigger={'hover'}> |
|
|
|
secondary |
|
|
|
{{ |
|
|
|
circle |
|
|
|
default: () => t('project.workflow.refresh'), |
|
|
|
type='info' |
|
|
|
trigger: () => ( |
|
|
|
onClick={handleResetDate} |
|
|
|
<NButton |
|
|
|
> |
|
|
|
strong |
|
|
|
<NIcon> |
|
|
|
secondary |
|
|
|
<ReloadOutlined /> |
|
|
|
circle |
|
|
|
</NIcon> |
|
|
|
type='info' |
|
|
|
</NButton> |
|
|
|
onClick={handleResetDate} |
|
|
|
) |
|
|
|
> |
|
|
|
}} |
|
|
|
<NIcon> |
|
|
|
</NTooltip> |
|
|
|
<ReloadOutlined /> |
|
|
|
<NTooltip trigger={'hover'}> |
|
|
|
</NIcon> |
|
|
|
{{ |
|
|
|
</NButton> |
|
|
|
default: () => t('project.workflow.show_hide_label'), |
|
|
|
) |
|
|
|
trigger: () => ( |
|
|
|
}} |
|
|
|
<NButton |
|
|
|
</NTooltip> |
|
|
|
strong |
|
|
|
<NTooltip trigger={'hover'}> |
|
|
|
secondary |
|
|
|
{{ |
|
|
|
circle |
|
|
|
default: () => t('project.workflow.show_hide_label'), |
|
|
|
type='info' |
|
|
|
trigger: () => ( |
|
|
|
onClick={() => (this.labelShow = !this.labelShow)} |
|
|
|
<NButton |
|
|
|
> |
|
|
|
strong |
|
|
|
<NIcon> |
|
|
|
secondary |
|
|
|
<EyeOutlined /> |
|
|
|
circle |
|
|
|
</NIcon> |
|
|
|
type='info' |
|
|
|
</NButton> |
|
|
|
onClick={() => (this.labelShow = !this.labelShow)} |
|
|
|
) |
|
|
|
> |
|
|
|
}} |
|
|
|
<NIcon> |
|
|
|
</NTooltip> |
|
|
|
<EyeOutlined /> |
|
|
|
</NSpace> |
|
|
|
</NIcon> |
|
|
|
) |
|
|
|
</NButton> |
|
|
|
}} |
|
|
|
) |
|
|
|
</Card> |
|
|
|
}} |
|
|
|
) |
|
|
|
</NTooltip> |
|
|
|
|
|
|
|
</NSpace> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
</Card> |
|
|
|
|
|
|
|
)) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|