Refine workflow list for agent orchestration
This commit is contained in:
@@ -36,7 +36,6 @@ import {
|
||||
ElOption,
|
||||
ElPagination,
|
||||
ElSelect,
|
||||
ElSwitch,
|
||||
ElTag,
|
||||
ElTooltip,
|
||||
} from 'element-plus';
|
||||
@@ -62,14 +61,20 @@ const appContextStore = useAppContextStore();
|
||||
|
||||
// 工作流类型选项
|
||||
const workflowTypeOptions = computed(() => [
|
||||
{ label: $t('ai-platform.workflow.type.general'), value: 'general' },
|
||||
{ label: $t('ai-platform.workflow.type.application'), value: 'application' },
|
||||
{ label: $t('ai-platform.workflow.type.form'), value: 'form' },
|
||||
{ label: $t('ai-platform.workflow.type.report'), value: 'report' },
|
||||
{ label: $t('ai-platform.workflow.type.dataProcess'), value: 'data_process' },
|
||||
{ label: $t('ai-platform.workflow.type.automation'), value: 'automation' },
|
||||
{ label: '智能体协作', value: 'general' },
|
||||
{ label: '自动化编排', value: 'automation' },
|
||||
{ label: 'LLM 数据流', value: 'data_process' },
|
||||
]);
|
||||
|
||||
const workflowTypeLabelMap: Record<string, string> = {
|
||||
application: '智能体协作',
|
||||
automation: '自动化编排',
|
||||
data_process: 'LLM 数据流',
|
||||
form: '智能体协作',
|
||||
general: '智能体协作',
|
||||
report: '智能体协作',
|
||||
};
|
||||
|
||||
// 弹窗表单数据
|
||||
const createForm = reactive({
|
||||
id: '',
|
||||
@@ -81,7 +86,6 @@ const createForm = reactive({
|
||||
});
|
||||
|
||||
// 是否在主应用下(只有主应用才显示“子应用可见”开关)
|
||||
const isMainApp = !appContextStore.currentApp?.id;
|
||||
const formRef = ref();
|
||||
const isEditMode = ref(false);
|
||||
const formLoading = ref(false);
|
||||
@@ -344,7 +348,7 @@ const getWorkflowTypeText = (type: string) => {
|
||||
const item = workflowTypeOptions.value.find(
|
||||
(o: { label: string; value: string }) => o.value === type,
|
||||
);
|
||||
return item?.label || type;
|
||||
return item?.label || workflowTypeLabelMap[type] || '智能体协作';
|
||||
};
|
||||
|
||||
const getStatusType = (status: string) => {
|
||||
@@ -469,11 +473,7 @@ onMounted(() => {
|
||||
{{ $t('ai-platform.workflow.publish') }}
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
v-if="
|
||||
item.status === 'published' &&
|
||||
(item.workflow_type === 'data_process' ||
|
||||
item.workflow_type === 'automation')
|
||||
"
|
||||
v-if="item.status === 'published'"
|
||||
command="run"
|
||||
>
|
||||
<Play class="mr-2 h-4 w-4" />
|
||||
@@ -518,10 +518,8 @@ onMounted(() => {
|
||||
<!-- 应用名称 + 创建时间 -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-muted-foreground text-xs">
|
||||
<span v-if="item.application_name">{{
|
||||
item.application_name
|
||||
}}</span>
|
||||
<span v-else>{{ $t('ai-platform.workflow.mainApp') }}</span>
|
||||
v{{ item.published_version || item.version || '-' }} ·
|
||||
{{ item.run_count || 0 }} 次运行
|
||||
</div>
|
||||
<span class="text-muted-foreground text-xs">
|
||||
{{ item.sys_create_datetime }}
|
||||
@@ -625,12 +623,6 @@ onMounted(() => {
|
||||
:rows="3"
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem
|
||||
v-if="isMainApp"
|
||||
:label="$t('ai-platform.workflow.form.globalVisible')"
|
||||
>
|
||||
<ElSwitch v-model="createForm.is_global" />
|
||||
</ElFormItem>
|
||||
</ElForm>
|
||||
</ZqDialog>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user